diff --git a/cmd/definitions/bindata/bindata.go b/cmd/definitions/bindata/bindata.go index 87d05f714..82d889c8b 100644 --- a/cmd/definitions/bindata/bindata.go +++ b/cmd/definitions/bindata/bindata.go @@ -11,7 +11,7 @@ // cmd/definitions/tmpl/object.tmpl (2.388kB) // cmd/definitions/tmpl/operation.tmpl (2.113kB) // cmd/definitions/tmpl/pair.tmpl (513B) -// cmd/definitions/tmpl/service.tmpl (11.221kB) +// cmd/definitions/tmpl/service.tmpl (12.311kB) // +build tools @@ -302,7 +302,7 @@ func cmdDefinitionsTmplPairTmpl() (*asset, error) { return a, nil } -var _cmdDefinitionsTmplServiceTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5a\xdd\x6f\x1b\xb9\x11\x7f\xd7\x5f\x31\xb7\x30\x0a\x29\x50\x76\xef\x8a\xbe\xd4\x85\x1f\x5a\x3b\x4d\x8d\xcb\x87\x11\xe7\x7a\x0f\xb9\x83\x41\xef\xce\x4a\xac\x76\xc9\x0d\x49\xc9\x31\x54\xfd\xef\xc5\x90\xdc\x4f\x71\x65\x29\xb9\xbb\xa0\x40\xf2\x92\x15\x39\x1c\x0e\xe7\xe3\xc7\x1f\x49\x27\x09\x5c\xca\x0c\x61\x81\x02\x15\x33\x98\xc1\xfd\x23\x2c\x64\xf3\x1b\x36\x9c\x41\x5a\x66\x49\x86\x39\x17\xdc\x70\x29\xf4\xdf\xe0\xea\x2d\xbc\x79\xfb\x1e\x5e\x5c\x5d\xbf\x8f\x27\x15\x4b\x57\x6c\x81\xb0\xdd\x42\xfc\x86\x95\x08\xbb\xdd\x64\xc2\xcb\x4a\x2a\x03\xd3\x09\x00\x40\x94\x4a\x61\xf0\x93\x89\xdc\x2f\x2e\xfd\x87\x40\x93\x2c\x8d\xa9\xfc\x4f\xc3\x4b\x8c\x26\xee\x7b\xc1\xcd\x72\x7d\x1f\xa7\xb2\x4c\xee\xf1\x51\x8a\x4c\x1b\xa9\xd8\x02\x93\x85\x7c\x5e\x7f\x6e\xfe\x92\x54\xab\x85\xd5\x90\x16\x1c\x45\xad\xff\xc8\xb1\x1a\xd5\x86\xa7\xa8\xdd\xa8\xf8\xe8\x71\xe6\xb1\xa2\x41\xb3\xc9\x64\xc3\x14\xdc\xc1\xad\xeb\x52\xfe\x67\xad\x36\xbe\x75\x1f\x2f\x94\x92\x75\x5f\x6b\x6a\xfc\xb6\xb2\xbe\xf4\x1d\xb4\xf4\xf8\x6a\xad\x18\x35\x76\x84\xe3\x77\xf8\x71\x8d\xda\x4c\x26\x49\x02\xef\x1f\x2b\x04\xae\xc1\x2c\x11\xc8\x08\xc8\xa5\xea\x79\x3d\x95\x42\x1b\x27\x76\x01\x51\xa7\x27\xb2\xe3\xdf\xde\xff\x07\x53\x73\xfb\xa8\x0d\x96\xaf\xd1\xb0\x8c\x19\x06\xb4\x30\xd4\xa0\x6d\x2b\x94\x75\x33\xa9\x96\x56\x3e\x9e\xd8\xb9\x46\x06\xab\x75\x6a\x60\x3b\xd9\x6e\x9f\x83\x62\x62\x81\x70\x76\x37\x87\xb3\x0d\x9c\x5f\x40\x7c\x2d\x72\xa9\xc9\x2e\xf2\x2f\x49\xf0\x1c\xf0\x23\x9c\x6d\xe2\xdb\x54\x56\x08\x91\x9b\x20\x1a\x88\x08\x69\x48\xe6\x65\x21\xef\x59\xd1\xed\x3b\xab\x04\x2d\xe7\xfc\x82\xba\xed\xca\xfe\x0b\x46\xde\x30\x9d\xf6\xe5\x78\x4e\x02\x57\x5c\x57\x05\x7b\xac\x7d\x03\xfe\x5f\x47\xd1\xc5\x88\x18\x89\xa0\xc8\xda\x9f\x56\x0e\x75\xaa\xb8\x0d\x5a\xb7\xc3\x69\xda\xed\xbc\x94\xf5\xfd\x98\x9a\xe6\x67\xe7\x73\x67\x23\xf3\x12\x4d\xd0\xbf\x0f\xbc\x28\x60\x81\x26\xec\xfd\x5c\xc9\xd2\xf7\xc4\x93\x24\x21\x45\xcf\xe1\xfd\x92\x6b\xc8\xd7\x22\xb5\x96\xea\xa5\x5c\x17\x99\x75\xe9\x3d\x42\xca\x8a\xc2\x55\xb8\x4f\x52\xe0\x65\x55\x60\x89\xc2\xa0\x8a\xeb\xf1\x08\x0a\xcd\x5a\x09\x2e\x16\xf5\xbc\x4e\xba\x99\x98\x6b\x50\xc8\x32\x90\xa2\x78\x04\x26\xb2\xc1\x34\xa5\xcc\x78\xce\x31\x8b\x27\x64\xc7\xd8\xe2\xa6\x12\x9e\xb9\xf6\x59\x78\x79\x5b\xeb\x36\x5d\xce\x41\xae\x28\xe8\x32\x7e\x89\x43\x1d\x33\x2b\xc3\x73\x12\xd9\x36\x31\x76\xf6\x83\x2e\xe3\x69\x48\xb3\x1b\xe4\xa2\xe2\x45\x43\x62\xdb\x3a\x3a\xfa\x50\x74\xf4\x58\x74\xb8\x30\xf2\xb8\xe8\x58\x37\xb6\xe1\x91\x22\xc5\x39\x54\x05\x32\x8d\x50\xb2\x15\x82\x5e\x2b\x04\x56\x14\x60\x15\x2f\x99\x86\x7b\x44\x01\x0f\x8a\x1b\x83\x02\xee\x31\x97\x0a\xc9\x12\xef\xf1\x11\x83\x5b\x8f\xcf\x41\x97\x41\xab\x67\xde\x8b\x32\xbe\xdd\xf3\xb5\x2e\x67\xde\x21\x1e\xf1\x8e\x47\x12\x8f\x9e\xb6\xd1\xe3\xc9\x98\x8e\x2f\x02\x14\x3f\x4f\x34\x2c\xf8\x31\x54\x09\x80\xc2\x41\x74\x19\xe8\x1c\x47\x99\x13\xd0\xa6\x2b\xda\x81\x8b\xb6\x79\x04\x7d\xba\x02\x07\x50\xe8\x74\x24\x0a\x47\xa6\x81\xa2\x10\x08\xf9\x21\xaf\x6d\x78\xdb\x5c\xef\x22\x49\x58\xeb\xc9\x48\x12\x54\x33\xd5\xf0\xac\x63\xc2\x6c\x64\xb2\x21\xa0\xe8\xcf\x01\x94\xa0\xea\x00\xa2\x04\xe5\xba\x90\x72\xc0\xcd\x7a\xdf\xcd\x16\x4d\x46\xdc\xfc\x07\x41\xca\x31\xae\xb7\xc0\x12\x76\x51\xed\xfe\x71\x64\x09\xd6\xfc\x0d\xe3\x4a\xd7\xa9\x1a\xaa\xe3\x63\x6a\xb7\xad\xd7\x4b\x29\xf2\x82\xa7\x86\x5a\x93\x04\xae\xb0\x52\x98\x12\xef\x3d\x87\x9f\x34\x42\x45\xb3\xc5\x3f\x73\xb3\xec\x95\x15\x17\xda\x20\xcb\xac\xd3\x3b\x25\x93\x24\xb0\x27\x6a\x03\xc8\xaa\xaa\x78\xf4\xc5\xe8\x6b\x1d\x36\xac\x58\x23\xd0\x9e\xe0\x98\x9f\x57\x16\xa8\xee\x1e\xb2\xd9\x5a\x8e\xee\xa5\x2c\x2c\xaa\xd9\x60\x0c\x27\x9d\xce\x80\xdc\xb4\x9f\xb0\xd4\xda\x36\xfe\x88\x8f\xe7\x96\x16\xb6\x56\x45\xf3\xa6\xf7\xdf\x64\xdf\x39\x18\xb5\xc6\xb9\x4f\x67\x8f\x0f\x85\xc6\xf1\xa9\x37\x7d\xcc\xf9\x0d\x2d\xd9\x0c\xcc\xd8\x43\xac\xce\xa7\xa5\xcc\x14\xbc\xd7\xac\x82\x0b\x28\x59\xf5\x41\x1b\xc5\xc5\xe2\x57\xf7\x9f\x37\xe8\x70\x86\x9d\xb2\x13\x0c\x8c\x6f\x56\xe3\xdd\xe0\x57\xd3\x87\xd7\xe0\xec\xa4\x41\x57\x2c\xc5\x9e\x09\x06\xcb\xaa\xa0\xe3\x57\xc4\x89\x9b\xe5\xd4\x1f\xd9\xca\xbd\x2d\x88\xb7\xd5\x53\x9f\x6d\xe2\xeb\x46\x20\xac\x20\x47\x66\xd6\x6a\x74\xf8\x3f\xd7\x22\xd5\xf6\xc3\xcb\x85\xb5\x90\x6f\xef\x04\x3e\x74\xb5\x4c\x43\xfe\x99\xd9\x46\x7c\x18\x57\x33\xb0\xa4\x35\x22\x6c\xbe\x47\xb6\xc3\xf6\x0f\xb2\x81\xbe\xed\x81\x75\xe0\xc0\x16\x2e\xc8\xf7\x5c\x64\xf8\x09\x62\xf8\xbe\x69\xb7\xb2\xba\xdb\xf7\x03\xf5\x51\x72\x4d\x47\x13\xa8\x1e\xe5\xcd\xbf\xeb\xd6\x7d\x2f\x71\xe0\x02\xfe\xe4\x6a\xa7\xdf\xbe\xdd\xdb\x96\x67\xa3\xab\x69\xa3\x39\xb6\x96\x7d\xe4\x3b\xcb\xc5\xfe\x9a\x5c\x47\xaf\xfd\xcf\x76\x36\xcb\xce\xbc\x99\xbb\x5d\x93\x15\x0d\x33\x1b\x75\x43\xae\x8f\x3a\x31\x05\x3d\x43\xf8\xb6\x5f\x31\x63\x4e\x68\x93\xf1\xa9\x80\xe6\x62\x6f\xe1\x75\xc7\xca\x19\x2d\x42\x15\x4e\xc8\x4e\x93\x34\x6e\xa0\x0f\x1a\x42\x7b\x81\x3b\x80\x57\x4c\x69\xcc\xbc\x5b\x9c\xd3\x06\x23\x68\xc0\x6e\xd7\x77\x9c\xcd\x7f\xf8\xf0\x2b\x61\x8e\xbb\xe9\x48\x12\xa0\x33\x3e\x57\x98\xb9\xde\x90\x83\xa9\xa3\x36\xb7\x91\xf6\x3e\xfd\x17\xd3\x76\x52\xc6\x55\xc8\xb3\xd0\xf5\xed\x21\xb1\xb6\xfb\xc0\x21\x36\x49\xfc\xf6\xc5\x8a\xe3\xac\x6d\xa4\x7f\x6b\x6b\x9f\xb6\xb7\x0e\xa3\xd2\x78\x33\x12\x4b\xbb\x59\x5b\x09\xb7\x6d\x69\x8b\x2e\x96\x6b\x3d\x1b\x89\xbf\xdb\x06\x0f\x69\x9d\xca\xca\xd4\x31\x9e\xc1\x74\x44\xcf\x1c\x50\x29\xa9\x6a\x5a\xa4\x50\xaf\x0b\x43\x5e\x1b\x91\x6f\x37\x4f\xeb\xf7\x73\xa0\x59\xea\x1d\xd2\xfe\x47\x07\xad\xbb\x39\xd8\x62\x74\xd1\xb0\x86\xb4\x03\xf5\x03\x37\xe9\x12\x36\xf1\x8f\xf8\xd8\x69\x0e\x67\xe0\x89\x59\x48\xff\x52\x62\x97\x51\x3f\x6e\xb4\x37\xf6\x8e\x2b\x3c\xf7\x6b\x8d\x9f\x48\x85\xed\xde\x61\x2a\x95\xc2\x70\xb1\xc6\x5e\x47\xff\x30\x74\x9c\xea\x0b\xcb\x72\x42\x03\x0f\x8f\xda\xc4\x96\x9a\xc4\xd3\x61\xea\xcd\xc6\x8e\x5a\xe3\x35\x73\x62\xdd\x7c\xf3\xef\xa8\x7f\x77\xdd\x22\x38\x21\x65\x79\x0e\xdf\x9d\xea\x2a\xcf\x66\xc7\x6a\x74\x37\x6f\xaf\x7f\xa9\xfc\xeb\x29\xed\x1d\xf0\x96\x68\xaf\x3e\xff\xe0\x29\xe9\x36\x10\x4a\xd8\x35\xab\x19\x2c\xb6\x7b\xb4\x74\x46\xcf\x41\xf0\xe2\x89\x4d\xf2\x08\xca\x63\xcf\x7f\xe1\x3d\xb2\xf2\x7b\x64\x35\xba\x47\x5e\x61\xce\xd6\x85\x71\xae\x20\x0f\x38\x2e\xcd\x35\x59\x41\x3d\x7e\xc3\xb3\x77\x40\x15\xa6\x3c\xe7\x29\x30\xcb\xe7\xdc\x96\x39\xa2\xe0\xe0\x35\x90\x33\xf9\x29\x46\xe1\xf7\xd8\xfe\x7e\x10\xc8\x90\x7d\x95\x10\x64\xad\x3d\xfa\x59\x09\x38\xdb\x1c\xbc\x4d\xd9\x0b\xc5\x17\x70\x95\xc3\x71\x38\x99\xce\xac\x4e\xe7\x33\x83\x21\x4f\x50\x9a\xaf\x41\x5e\x8e\xa3\x2f\xff\x47\x44\x65\xf5\x39\x4c\x65\x15\xa0\x2a\x53\x0d\xcf\xda\xde\xd9\xc1\x69\x46\xa9\xcb\xea\x54\xee\xb2\xfa\x83\xc8\xcb\x37\x8a\x72\xf2\x16\x1a\xb4\x33\xb0\xaf\x7e\x63\x27\xbf\x9b\x6b\xfd\xee\x78\x1e\x7c\x54\xa8\x04\xad\xc0\x1f\xbc\x5f\x49\xe9\xca\x75\x78\xed\x9f\x24\x50\x50\xdf\x9d\x8d\x8b\xbf\x16\x20\x40\x50\x32\x5b\xa7\x98\x01\x17\xf0\xf2\xf6\xe6\xf9\x0f\xdf\xff\x35\x1e\x0e\xbc\xce\x61\xad\x51\x01\x0a\x76\x5f\x20\x18\x7b\x83\xec\x34\x34\x04\xa6\xbe\x49\xe6\x0b\x21\x15\xda\x6b\x57\xbd\xae\xec\xa3\xbe\x9d\xd1\x22\x40\x3c\x0c\xae\x8e\xeb\x0b\x8a\xb8\xb5\xfc\xb3\x62\x39\xf2\x1c\xb2\x47\xc0\x56\x87\x19\xd8\x4f\xc2\x5b\x5d\x93\x30\x6a\x3c\xdf\x8c\xb0\xc7\x24\x81\xcb\x25\xa6\x2b\x50\xbd\x03\x51\xfc\x55\xa8\xe5\x13\x2b\xfb\x9a\xdc\xb2\x73\x29\xd7\xbf\x37\x3d\x74\x15\xd5\x88\x85\x29\x67\xc0\xc5\xe3\xdc\xcc\x5d\xe6\xbf\x92\x83\xb7\xb9\x3e\x6d\x2b\xa8\xfb\xae\xb6\x75\x94\xc0\x35\xde\xf0\xf7\xdc\x61\x65\xc7\xab\x79\xea\xa1\x2d\xe8\xc9\xcf\xa5\x87\xc7\x50\xbf\x0e\x8d\x70\x9f\xc3\xab\x39\xf7\x94\xd4\x7f\x48\xb2\x84\x23\x55\x48\x8b\x67\xe0\xff\x80\x07\xee\x1f\x6b\xec\x8a\xbb\xec\xe2\xac\x12\xbb\xdd\xac\x33\xd1\xd4\x5e\x7f\xc5\x37\x4c\xb1\x52\xc7\xb7\x36\x29\x49\xc2\xb7\xbf\xb3\x59\xd6\xed\x70\x75\x90\x9a\x4f\xb4\x16\x3f\x5b\xfc\x0f\x96\xae\x16\x4a\xae\x45\xe6\xdf\xe5\xea\x77\xb8\xb8\x9d\xe9\x67\x6e\x96\x97\x4e\x7e\x9a\x9a\x4f\x73\xe8\xcd\x7c\xc9\x8a\x02\x15\x41\xf4\xd0\x15\x9d\x71\x23\x5e\x39\xb4\xbe\xc1\xac\x8d\xc5\xbe\x6d\x60\xc5\xd1\xeb\xcf\x30\x47\x65\x63\x30\x9d\xf5\x39\xce\x59\xc5\xcc\xb2\x8e\xb3\x57\x7b\xc3\xcc\xd2\x2d\x30\x50\x1e\x4c\x64\x30\xc5\x8f\x7e\x60\x14\xcd\xfc\x2f\x01\x91\xff\x73\x8e\x68\x16\x7c\x4a\x26\xf1\x0b\x88\xe6\xbf\x44\xbf\x44\x7b\x0f\xe9\x03\x44\x46\xa5\xe0\x82\x40\x5f\xaa\x92\x19\x8b\x44\xd3\xc8\x2d\x91\x72\x71\xb7\x8b\x2c\x55\x6c\x15\xef\x76\xe0\xdf\x4a\xa7\xb3\xb6\xe4\x79\x0e\x02\x1d\xb1\xb0\x7f\x93\xf0\x5a\x66\x08\x51\x1f\x5b\x4a\x6a\xab\xe9\x47\x2b\xb5\x0f\x31\x84\xbd\x32\xa6\xce\xf8\xda\x42\xaf\x1d\x69\x1f\xc9\xb6\x43\xc3\x6b\x3c\x6d\x15\x5e\x8b\x0d\x2b\xb8\x07\xd5\x17\x9f\x2a\x4c\xed\xdb\x20\x75\x75\x74\xcd\xe1\xef\xa9\x59\xb3\xe2\x1c\xdc\x4c\xbb\x01\x8a\x1f\xc0\x59\x77\x5c\xba\x00\x56\x55\x28\x32\x4b\xb1\xf5\x1c\x74\xec\xcb\xca\x9e\x7f\x3b\xe9\x1d\xc7\xb1\x73\xd8\x86\x29\xa2\xc4\x63\x57\x0f\x4e\xb9\xac\xcc\xbc\x09\xca\xc1\x3b\x4a\x3b\x6f\xf3\xd8\x4d\x43\xbe\xbb\x20\xd0\xdf\xdb\x90\xba\xdb\xe3\xa0\xfc\x5a\xbc\xb9\x64\x25\x52\x00\x02\x15\xf8\x5e\xf1\xf2\x15\xd3\xc6\x97\xe2\x0b\x91\x11\x93\x5f\x5e\xca\xb2\x64\xbb\x1d\x59\x3c\x3b\xb0\xd1\x0c\x21\xfc\xd0\x6e\xd3\xed\x0b\x81\x65\x9d\xe1\x4f\x00\xa6\xe7\x01\x4f\x82\xa6\x93\xab\xc5\x4f\x05\x4f\x1a\xf6\x3b\x00\xe8\x97\x64\xd8\xd1\x59\xe6\x97\x7c\xed\x98\xa1\x25\x82\xf0\xb0\xe4\x05\xc2\x92\x89\xac\xe0\x62\x01\x36\x6e\xb4\x40\xff\xd4\x5d\x0f\xb3\x09\x7a\x77\x74\x7a\x0e\xc9\x91\xb5\x7b\x24\xf5\x4e\xce\x3a\x97\xd8\xdd\xcc\xb3\x01\xe1\x82\x9b\x06\x2b\x8e\x7c\xb2\xa5\x7f\x0d\x98\xbc\xc3\x05\xd7\x06\xd5\xd8\xd5\x94\x9a\xd2\xb9\x61\x0e\x6f\xf0\x61\x54\x64\x16\xba\xbd\xd8\x9b\xe1\x36\x5d\x62\xc9\xbc\x3a\xff\xfa\x4d\xd5\xf4\xbf\x00\x00\x00\xff\xff\x97\xed\xfa\x0d\xd5\x2b\x00\x00") +var _cmdDefinitionsTmplServiceTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5a\x5f\x93\xdb\xb6\x11\x7f\xd7\xa7\xd8\x70\x6e\x3a\x92\x47\x26\x93\xb6\x2f\xbd\x8e\x1e\xda\xb3\xeb\xde\x24\xb6\x6f\x7c\x4e\xf3\xe0\x64\x6e\x20\x72\x29\xa1\x22\x01\x1a\x80\x74\xd6\xa8\xfa\xee\x1d\xfc\xe1\x5f\x81\x14\xe5\x4b\xe2\x3c\xf8\x5e\x8e\x02\x16\x8b\xc5\x2e\xf6\x87\xdf\x12\x8c\x22\xb8\xe1\x09\xc2\x0a\x19\x0a\xa2\x30\x81\xe5\x1e\x56\xbc\xfa\x0d\x3b\x4a\x20\xce\x93\x28\xc1\x94\x32\xaa\x28\x67\xf2\xef\xf0\xe2\x2d\xbc\x79\xfb\x1e\x5e\xbe\xb8\x7d\x1f\x4e\x0a\x12\x6f\xc8\x0a\xe1\x70\x80\xf0\x0d\xc9\x11\x8e\xc7\xc9\x84\xe6\x05\x17\x0a\xa6\x13\x00\x80\x20\xe6\x4c\xe1\x27\x15\xd8\x5f\x94\xbb\x07\x86\x2a\x5a\x2b\x55\xb8\x9f\x8a\xe6\x18\x4c\xec\xf3\x8a\xaa\xf5\x76\x19\xc6\x3c\x8f\x96\xb8\xe7\x2c\x91\x8a\x0b\xb2\xc2\x68\xc5\x9f\x97\x8f\xbb\xbf\x46\xc5\x66\x65\x34\xc4\x19\x45\x56\xea\x1f\x39\x56\xa2\xd8\xd1\x18\xa5\x1d\x15\x8e\x1e\xa7\xf6\x85\x1e\x34\x9b\x4c\x76\x44\xc0\x03\xdc\xdb\x2e\xe1\x7e\x96\x6a\xc3\x7b\xfb\xf0\x52\x08\x5e\xf6\xd5\xa6\x86\x6f\x0b\xe3\x4b\xd7\xa1\x97\x1e\xbe\xd8\x0a\xa2\x1b\x1b\xc2\xe1\x3b\xfc\xb8\x45\xa9\x26\x93\x28\x82\xf7\xfb\x02\x81\x4a\x50\x6b\x04\x6d\x04\xa4\x5c\xb4\xbc\x1e\x73\x26\x95\x15\x5b\x40\xd0\xe8\x09\xcc\xf8\xb7\xcb\xff\x62\xac\xee\xf7\x52\x61\xfe\x1a\x15\x49\x88\x22\xa0\x17\x86\x12\xa4\x69\x85\xbc\x6c\xd6\xaa\xb9\x91\x0f\x27\x66\xae\x9e\xc1\x62\x1b\x2b\x38\x4c\x0e\x87\xe7\x20\x08\x5b\x21\x5c\x3d\xcc\xe1\x6a\x07\xd7\x0b\x08\x6f\x59\xca\xa5\xb6\x4b\xfb\x57\x4b\xd0\x14\xf0\x23\x5c\xed\xc2\xfb\x98\x17\x08\x81\x9d\x20\xe8\x88\x30\xae\xb4\xcc\xab\x8c\x2f\x49\xd6\xec\xbb\x2a\x98\x5e\xce\xf5\x42\x77\x9b\x95\xfd\x0f\x14\xbf\x23\x32\x6e\xcb\xd1\x54\x0b\xbc\xa0\xb2\xc8\xc8\xbe\xf4\x0d\xb8\xbf\x86\xa2\x45\x8f\x98\x16\x41\x96\xd4\x3f\x8d\x1c\xca\x58\x50\x13\xb4\x66\x87\xd5\x74\x3c\x3a\x29\xe3\xfb\x3e\x35\xd5\xcf\xc6\xe3\xd1\x44\xe6\x15\x2a\xaf\x7f\x1f\x69\x96\xc1\x0a\x95\xdf\xfb\xa9\xe0\xb9\xeb\x09\x27\x51\xa4\x15\x3d\x87\xf7\x6b\x2a\x21\xdd\xb2\xd8\x58\x2a\xd7\x7c\x9b\x25\xc6\xa5\x4b\x84\x98\x64\x99\xcd\x70\xb7\x49\x81\xe6\x45\x86\x39\x32\x85\x22\x2c\xc7\x23\x08\x54\x5b\xc1\x28\x5b\x95\xf3\x5a\xe9\x6a\x62\x2a\x41\x20\x49\x80\xb3\x6c\x0f\x84\x25\x9d\x69\x72\x9e\xd0\x94\x62\x12\x4e\xb4\x1d\x7d\x8b\x9b\x72\x78\x66\xdb\x67\xfe\xe5\x1d\x8c\xdb\x64\x3e\x07\xbe\xd1\x41\xe7\xe1\x2b\xec\xea\x98\x19\x19\x9a\x6a\x91\x43\x15\x63\x6b\x3f\xc8\x3c\x9c\xfa\x34\xdb\x41\x36\x2a\x4e\xd4\x27\x76\x28\xa3\x23\x87\xa2\x23\xfb\xa2\x43\x99\xe2\xe3\xa2\x63\xdc\x58\x87\x87\xb3\x18\xe7\x50\x64\x48\x24\x42\x4e\x36\x08\x72\x2b\x10\x48\x96\x81\x51\xbc\x26\x12\x96\x88\x0c\x1e\x05\x55\x0a\x19\x2c\x31\xe5\x02\xb5\x25\xce\xe3\x3d\x06\xd7\x1e\x9f\x83\xcc\xbd\x56\xcf\x9c\x17\x79\x78\x7f\xe2\x6b\x99\xcf\x9c\x43\x1c\xe2\x8d\x47\x12\x87\x9e\xa6\xd1\xe1\x49\x9f\x8e\x27\x01\x8a\x9b\x27\xe8\x26\x7c\x1f\xaa\x78\x40\x61\x10\x5d\x3a\x3a\xfb\x51\xe6\x02\xb4\x69\x8a\x36\xe0\xa2\x6e\xee\x41\x9f\xa6\xc0\x00\x0a\x5d\x8e\x44\xfe\xc8\x54\x50\xe4\x03\x21\x37\xe4\xb5\x09\x6f\xbd\xd7\x9b\x48\xe2\xd7\x7a\x31\x92\x78\xd5\x4c\x25\x3c\x6b\x98\x30\xeb\x99\xac\x0b\x28\xf2\x73\x00\xc5\xab\xda\x83\x28\x5e\xb9\x26\xa4\x0c\xb8\x59\x9e\xba\xd9\xa0\x49\x8f\x9b\x7f\x27\x48\x19\xe3\x7a\x03\x2c\x7e\x17\x95\xee\xef\x47\x16\x6f\xce\xdf\x11\x2a\x64\xb9\x55\x7d\x79\x3c\x26\x77\xeb\x7c\xbd\xe1\x2c\xcd\x68\xac\x74\x6b\x14\xc1\x0b\x2c\x04\xc6\x9a\xf7\x5e\xc3\x8f\x12\xa1\xd0\xb3\x85\x3f\x51\xb5\x6e\xa5\x15\x65\x52\x21\x49\x8c\xd3\x1b\x29\x13\x45\x70\x22\x6a\x02\x48\x8a\x22\xdb\xbb\x64\x74\xb9\x0e\x3b\x92\x6d\x11\xf4\x99\x60\x99\x9f\x53\xe6\xc9\xee\x16\xb2\x99\x5c\x0e\x96\x9c\x67\x06\xd5\x4c\x30\xba\x93\x4e\x67\xa0\xdd\x74\xba\x61\x75\x6b\xdd\xf8\x3d\xee\xaf\x0d\x2d\xac\xad\x0a\xe6\x55\xef\x7f\xb4\x7d\xd7\xa0\xc4\x16\xe7\x6e\x3b\x3b\x7c\xc8\x24\xf6\x4f\xbd\x6b\x63\xce\xaf\x68\xc9\xae\x63\xc6\x09\x62\x35\x1e\x0d\x65\xd6\xc1\x7b\x4d\x0a\x58\x40\x4e\x8a\x0f\x52\x09\xca\x56\xbf\xd8\x7f\xce\xa0\xe1\x1d\x76\xc9\x49\xd0\x31\xbe\x5a\x8d\x73\x83\x5b\x4d\x1b\x5e\xbd\xb3\x6b\x0d\xb2\x20\x31\xb6\x4c\x50\x98\x17\x99\x2e\xbf\x02\xaa\xb9\x59\xaa\xfb\x03\x93\xb9\xf7\x99\xe6\x6d\xe5\xd4\x57\xbb\xf0\xb6\x12\xf0\x2b\x48\x91\xa8\xad\xe8\x1d\xfe\xaf\x2d\x8b\xa5\x79\x70\x72\x7e\x2d\xda\xb7\x0f\x0c\x1f\x9b\x5a\xa6\x3e\xff\xcc\x4c\x23\x3e\xb6\x54\x9a\x3d\x9e\x92\x6d\xa6\xc8\x32\xc3\xfe\x19\x3a\x46\xd6\xf6\xf9\x57\xe6\x40\x6f\x78\x69\x9d\x8d\xa2\x9f\x4d\x2d\xdb\xf1\x6d\x8d\x24\x3a\x2c\x94\x25\xf8\x09\x42\xf8\xb6\x6a\x37\xb2\xb2\xd9\xf7\x9d\xee\xd3\xfb\x6e\xda\xbb\xb7\xca\x51\xce\xfc\x87\x26\x24\xb4\xf6\x14\x2c\xe0\x4f\x36\xad\xda\xed\x87\x93\x13\x7b\xd6\xbb\x9a\x3a\xd0\x7d\x6b\x39\x05\xc5\xab\x94\x9d\xae\xc9\x76\xb4\xda\xff\x6c\x66\x33\xc4\xcd\x99\x79\x3c\x56\xd1\xad\x48\x5b\xaf\x1b\x52\x39\xaa\x98\xf2\x7a\x46\x43\xdf\x69\x32\xf5\x39\xa1\xde\xa7\xe7\x02\x9a\xb2\x9e\x85\xa7\x27\x0b\x37\xed\x49\xd1\x6c\xff\x4b\x35\xf3\x55\xca\x36\x76\x91\xcc\x07\x16\xfa\x90\xd0\x46\x55\x6e\xd3\x0f\x7a\x88\x3e\x56\x6c\x2d\x5f\x10\x21\x31\x71\x6e\xb4\x4e\xee\x8c\xd0\x03\x8e\xc7\xb6\xa3\x4d\xbe\xc0\x87\x5f\x34\x7c\xd9\x97\x26\x51\x04\xef\xf0\xe3\x96\x0a\x4c\x6c\xaf\x2f\x20\xba\xa3\x34\xb7\x92\x76\x31\xf8\x37\x91\x66\x52\x42\x85\x2f\x12\xd0\x8c\xc5\x90\x58\xdd\x3d\x50\x0f\x47\x91\x3b\x09\x49\x36\xce\xda\x4a\xfa\xd7\xb6\x76\xb4\xbd\x2f\x99\x81\xaf\x32\xd1\x86\x0d\x4e\xcb\x81\x6b\x22\xed\xc0\x21\x33\x2a\x5b\xcf\x8b\xb6\x57\xd6\xb5\xd1\xe1\xec\x08\x97\x26\x45\xc3\xc2\x51\xb6\x3d\x31\xea\x65\x32\x08\x89\x77\x3d\x19\x61\xd8\x93\x91\xb0\x3c\x42\x1a\x4c\x37\xe4\xf7\x59\x4f\x16\x59\x5e\x32\xa4\x75\xca\x0b\x55\x66\xca\x0c\xa6\x3d\x7a\xe6\x80\x42\x70\x51\xf2\x54\x81\x52\xbb\xf1\x7a\xd1\x97\xbd\x35\x9b\x31\xae\xbe\x06\x3d\x4b\x49\x59\xcc\x3f\x5d\xf9\x3e\xcc\xc1\x40\xa0\x0d\x80\x31\xa4\x1e\x28\x1f\xa9\x8a\xd7\xb0\x0b\xbf\xc7\x7d\xa3\xd9\x9f\xc7\x17\xe6\xb2\xfe\x8b\x35\xdd\x0f\xda\x51\xd3\x64\xa5\x55\x3f\xd2\xd4\xad\x35\x3c\x93\x50\x87\x93\xea\x36\xe6\x4c\x51\xb6\xc5\x56\x47\xbb\x3a\x1d\xa7\x7a\x61\x68\xa7\x6f\xe0\xf0\xa8\x5d\x68\xb8\x62\x38\xed\x6e\xbd\x59\x5f\xed\xdb\x8f\x3c\x17\xa2\xcf\x57\xff\x0e\xf9\xd7\x87\x94\x83\x0e\x4e\x4f\xfd\x8a\x46\xc7\xc3\x68\xf7\x8e\xc2\xd9\xa7\x38\x79\xd4\x04\xfd\xae\xbe\x78\xac\xdf\xb5\xa7\x00\x3f\xe4\xd8\x1a\xe4\xe1\xf2\x0d\x7b\xe6\x5c\x78\xa2\x2f\xff\x38\x1b\xf6\xd8\x44\xed\x0b\x30\x96\xa6\xf0\xcd\xa5\xb9\xed\xea\xe1\xbe\x43\xe5\x38\xaf\x2f\x90\xf4\x79\x55\x4e\x69\x6e\x91\x0e\xba\x70\x96\xd7\x1f\x5c\x51\x7b\xf0\x84\x12\x8e\xd5\x6a\x3a\x8b\x6d\xbe\x9c\xb2\x46\xcf\x81\xd1\xec\x0c\x97\x1e\x51\x19\x99\x37\x48\x5d\x2a\x5d\x0e\xb1\xd4\xb8\xe8\xa5\xc6\x6e\x37\x5b\x57\x68\x0f\xd8\x6a\x9c\x4a\x6d\x45\xbd\xcf\xed\x5b\xe4\x02\x63\x9a\xd2\x18\x88\x29\xfb\x2c\x53\xee\x51\x30\xf8\x22\xd9\x9a\x7c\xae\xf0\x70\xd4\xba\x4d\x60\x3c\x3b\xe4\x54\x25\x78\x8b\xdb\x56\x95\x5a\x30\xb8\xda\x0d\xbe\x8f\x3d\x09\xc5\x67\x95\x34\x63\xe2\x70\x71\x15\xb3\xb9\xbc\x8c\xe9\x0c\x39\x53\xc9\x7c\x89\x9a\x65\x5c\x15\xf0\xc7\xac\x4f\xbc\xcc\x7a\xf3\x39\xd4\x7a\xe3\xe1\xd6\x53\x09\xcf\xea\xde\xd9\xe0\x34\xbd\x5c\x7b\x73\x29\xd9\xde\xfc\x4e\x6c\xfb\x2b\xa7\xbe\xf8\x08\xf5\xda\xe9\x39\x57\xbf\xd2\xe9\xdf\xcc\xb5\xee\x74\x6c\xfb\xa6\xbc\xe6\x28\x98\x5e\x81\x7b\x3f\xf7\x03\xe7\x36\x5d\xbb\x17\x87\x51\x04\x99\xee\x7b\x30\x71\x71\x54\x5d\x03\x82\xe0\xc9\x36\xc6\x04\x28\x83\x57\xf7\x77\xcf\xbf\xfb\xf6\x6f\x61\x77\xe0\x6d\x0a\x5b\x89\x02\x2c\x47\x07\x65\xee\xa0\xac\x86\x8a\xc0\x94\x77\x51\x74\xc5\xb8\x40\x73\x71\x23\xb7\x85\xf9\x2c\xc8\xcc\x68\x10\x20\xec\x06\x57\x86\x65\xd1\x10\xd6\x96\x7f\x56\x2c\x7b\x2e\x54\x4f\x08\xd8\x66\x98\x81\xfd\xc8\x9c\xd5\x25\x09\xd3\x8d\xd7\xbb\x1e\xf6\x18\x45\x70\xb3\xc6\x78\x03\xa2\x55\xc1\x87\x5f\x84\x5a\x9e\x59\xd9\x97\xe4\x96\x8d\x77\xf7\xed\x9b\x97\xa1\x37\xd6\x95\x98\x9f\x72\x7a\x5c\xdc\xcf\xcd\xec\x75\xe0\x0f\xbc\x73\xbb\xdf\xa6\x6d\x99\xee\x7e\x28\x6d\xed\x25\x70\x95\x37\xdc\x4d\x99\x5f\xd9\x78\x35\xe7\xae\xea\xbd\x9e\xfc\x5c\x7a\x38\x86\xfa\x35\x68\x84\x7d\xec\xbe\xc1\xb7\x97\xd1\xed\xab\x68\x43\x38\x62\x81\x7a\xf1\x04\xdc\x27\x80\xb0\xdc\x97\xd8\x15\x36\xd9\xc5\x55\xc1\x8e\xc7\x59\x63\xa2\xa9\x79\xeb\x1d\xde\x11\x41\x72\x19\xde\x9b\x4d\xa9\x25\x5c\xfb\x3b\xb3\xcb\x9a\x1d\x36\x0f\x62\xf5\x49\xaf\xc5\xcd\x16\xfe\x93\xc4\x9b\x95\xe0\x5b\x96\xb8\x9b\xfd\xf2\x26\x3f\xac\x67\xfa\x89\xaa\xf5\x8d\x95\x9f\xc6\xea\xd3\x1c\x5a\x33\xdf\x90\x2c\x43\xa1\x21\xba\xeb\x8a\xc6\xb8\x1e\xaf\x0c\xad\xaf\x33\x6b\x65\xb1\x6b\xeb\x58\x31\x7a\xfd\x09\xa6\x28\x4c\x0c\xa6\xb3\x36\xc7\xb9\x2a\x88\x5a\x97\x71\x76\x6a\xef\x88\x5a\xdb\x05\x7a\xd2\x83\xb0\x04\xa6\xf8\xd1\x0d\x0c\x82\x99\xfb\xc5\x20\x70\x1f\x84\x05\x33\xef\xc7\x28\x5a\x7c\x01\xc1\xfc\xe7\xe0\xe7\xe0\xe4\x53\x9c\x0e\x22\xa3\x10\xb0\xd0\xa0\xcf\x45\x4e\x94\x41\xa2\x69\x60\x97\xa8\xf7\xe2\xf1\x18\x18\xaa\x58\x2b\x3e\x1e\xc1\x7d\x6d\x31\x9d\xd5\x29\x4f\x53\x60\x68\x89\x85\xf9\xaa\xe9\x35\x4f\x10\x82\x36\xb6\xe4\xba\xad\xa4\x1f\xb5\xd4\x29\xc4\x68\xec\xe5\xa1\xee\x0c\x6f\x0d\xf4\x9a\x91\xe6\x9a\xfd\xd0\x35\xbc\xc4\xd3\x5a\xe1\x2d\xdb\x91\x8c\x3a\x50\x7d\xf9\xa9\xc0\xd8\x7c\x5d\xa0\xbb\x1a\xba\xe6\xf0\x8f\x58\x6d\x49\x76\x0d\x76\xa6\x63\x07\xc5\x07\x70\xd6\x96\x4b\x0b\x20\x45\x81\x2c\x31\x14\x5b\xce\x41\x86\x2e\xad\x4c\xfd\xdb\xd8\xde\x61\x18\x5a\x87\xed\x88\xd0\x94\xb8\xef\xd5\x83\x55\xce\x0b\x35\xaf\x82\x32\xf8\x52\xdd\xcc\x5b\x7d\x2e\xa3\x87\x7c\xb3\xd0\xa0\x7f\x72\x20\x35\x8f\xc7\x4e\xfa\xd5\x78\x73\x43\x72\xd4\x01\xf0\x64\xe0\x7b\x41\xf3\x1f\x88\x54\x2e\x15\x5f\xb2\x44\x33\xf9\xf5\x0d\xcf\x73\x72\x3c\x6a\x8b\x67\x03\x07\x4d\x17\xc2\x87\x4e\x9b\x66\x9f\x0f\x2c\xcb\x1d\x7e\x06\x30\x1d\x0f\x38\x0b\x9a\x56\xae\x14\xbf\x14\x3c\xf5\xb0\xdf\x00\x40\x9f\xb2\xc3\x46\xef\x32\xb7\xe4\x5b\xcb\x0c\x0d\x11\x84\xc7\x35\xcd\x10\xd6\x84\x25\x19\x65\x2b\x30\x71\xd3\x0b\x74\x1f\xcb\x94\xc3\xcc\x06\x7d\x18\xbd\x3d\xbb\xe4\xc8\xd8\xdd\xb3\xf5\x2e\xde\x75\x76\x63\x37\x77\x9e\x09\x08\x65\x54\x55\x58\x31\xf2\xa3\x0f\xfd\x57\x81\xc9\x3b\x5c\x51\xa9\x50\xf4\xbd\x9a\x12\x53\x5d\x37\xcc\xe1\x0d\x3e\xf6\x8a\xcc\x7c\x6f\x2f\x4e\x66\xb8\x8f\xd7\x98\x13\xa7\xce\x7d\x3f\xa3\xb3\xe9\xff\x01\x00\x00\xff\xff\xe9\x42\x26\x4e\x17\x30\x00\x00") func cmdDefinitionsTmplServiceTmplBytes() ([]byte, error) { return bindataRead( @@ -318,7 +318,7 @@ func cmdDefinitionsTmplServiceTmpl() (*asset, error) { } info := bindataFileInfo{name: "cmd/definitions/tmpl/service.tmpl", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9b, 0xd9, 0xc7, 0x92, 0x5e, 0xe1, 0x18, 0x8e, 0x5a, 0x1e, 0xa4, 0xc7, 0xbd, 0x58, 0x87, 0xb8, 0x7f, 0x7f, 0xf2, 0x12, 0x10, 0xaa, 0xc8, 0x22, 0xc9, 0xb3, 0x1c, 0x8a, 0x51, 0x48, 0xd8, 0x7b}} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x4, 0xd3, 0x16, 0x3d, 0xe7, 0x18, 0x42, 0x6a, 0x1e, 0x97, 0xcf, 0xf, 0x1e, 0x2b, 0x3a, 0xe1, 0xcf, 0x62, 0xdd, 0x63, 0xce, 0xc, 0xd7, 0xd9, 0xc5, 0x7e, 0xc2, 0x6b, 0xfc, 0xd, 0x8, 0xe7}} return a, nil } diff --git a/cmd/definitions/tmpl/service.tmpl b/cmd/definitions/tmpl/service.tmpl index 8a08af662..c8c3ef16b 100644 --- a/cmd/definitions/tmpl/service.tmpl +++ b/cmd/definitions/tmpl/service.tmpl @@ -128,7 +128,7 @@ var pairMap = map[string]string { {{- range $_, $v := .Namespaces }} {{- template "interfaces" makeSlice $v.Name $v.Interfaces }} {{- template "features" makeSlice $v.Name $v.Funcs $v.Features }} - {{- template "pair_new" makeSlice ( $v.Name | toPascal ) $v.New }} + {{- template "pair_new" makeSlice ( $v.Name | toPascal ) $v.New $v.Features $v.Defaultable }} {{- template "pairs" makeSlice $v $v.Funcs }} {{- template "functions" makeSlice $v.Name $v.Funcs }} {{- end }} @@ -159,6 +159,8 @@ type {{ $pn }}Features struct { {{- define "pair_new" }} {{- $pn := index . 0 }} {{- $fn := index . 1 }} +{{- $ff := index . 2 }} +{{- $dp := index . 3 }} {{- $fnk := $fn.Name | toPascal }} @@ -176,6 +178,16 @@ type pair{{ $pn }}{{$fnk}} struct { Has{{ $pair.Name | toPascal }} bool {{ $pair.Name | toPascal }} {{ $pair.Type }} {{- end }} + // Enable features + {{- range $_, $pair := $ff }} + hasEnable{{ $pair.Name | toPascal }} bool + Enable{{ $pair.Name | toPascal }} bool + {{- end }} + // Default pairs + {{- range $_, $pair := $dp }} + has{{ $pair.Name | toPascal }} bool + {{ $pair.Name | toPascal }} {{ $pair.Type }} + {{- end }} } // parsePair{{ $pn }}{{ $fnk }} will parse Pair slice into *pair{{ $pn }}{{ $fnk }} @@ -204,6 +216,24 @@ func parsePair{{ $pn }}{{ $fnk }}(opts []Pair) (pair{{ $pn }}{{ $fnk }}, error) result.Has{{ $pair.Name | toPascal }} = true result.{{ $pair.Name | toPascal }} = v.Value.({{ $pair.Type }}) {{- end }} + // Enable features + {{- range $_, $pair := $ff }} + case "enable_{{ $pair.Name }}": + if result.hasEnable{{ $pair.Name | toPascal }} { + continue + } + result.hasEnable{{ $pair.Name | toPascal }} = true + result.Enable{{ $pair.Name | toPascal }} = true + {{- end }} + // Default pairs + {{- range $_, $pair := $dp }} + case "{{ $pair.Name }}": + if result.has{{ $pair.Name | toPascal }} { + continue + } + result.has{{ $pair.Name | toPascal }} = true + result.{{ $pair.Name | toPascal }} = v.Value.({{ $pair.Type }}) + {{- end }} } } diff --git a/services/new.go b/services/new.go index e9ad4d769..e2d92c6a6 100644 --- a/services/new.go +++ b/services/new.go @@ -167,8 +167,12 @@ func parseConnectionString(ConnStr string) (ty string, ps []types.Pair, err erro for _, v := range strings.Split(rest, "&") { opt := strings.SplitN(v, "=", 2) if len(opt) != 2 { - // && or &key&, ignore - continue + if v != "" { + opt = append(opt, "true") + } else { + // &&, ignore + continue + } } pair, parseErr := parse(m, opt[0], opt[1]) if parseErr != nil { diff --git a/tests/connstr_test.go b/tests/connstr_test.go index bb1d8dde5..95a0d0080 100644 --- a/tests/connstr_test.go +++ b/tests/connstr_test.go @@ -56,7 +56,7 @@ func TestFromString(t *testing.T) { }, { "stupid, but valid (ignored)", - "tests:///?&??&&&", + "tests:///?&&&", []Pair{ pairs.WithWorkDir("/"), }, @@ -103,19 +103,36 @@ func TestFromString(t *testing.T) { services.ErrConnectionStringInvalid, }, { - "key without value is ignored (even not registered pair)", + "key without value (not registered pair)", "tests://abc/tmp?not_a_pair&&", + nil, + services.ErrConnectionStringInvalid, + }, + { + "not parsable pair", + "tests://abc/tmp?io_call_back=a", + nil, + services.ErrConnectionStringInvalid, + }, + { + "key with features", + "tests://abc/tmp?enable_loose_pair", []Pair{ pairs.WithName("abc"), pairs.WithWorkDir("/tmp"), + WithEnableLoosePair(), }, nil, }, { - "not parseable pair", - "tests://abc/tmp?io_call_back=a", + "key with default paris", + "tests://abc/tmp?default_storage_class=STANDARD", + []Pair{ + pairs.WithName("abc"), + pairs.WithWorkDir("/tmp"), + WithDefaultStorageClass("STANDARD"), + }, nil, - services.ErrConnectionStringInvalid, }, } diff --git a/tests/generated.go b/tests/generated.go index 732bb9f56..86999e2c5 100644 --- a/tests/generated.go +++ b/tests/generated.go @@ -255,6 +255,8 @@ type pairServiceNew struct { HTTPClientOptions *httpclient.Options HasServiceFeatures bool ServiceFeatures ServiceFeatures + // Enable features + // Default pairs } // parsePairServiceNew will parse Pair slice into *pairServiceNew @@ -297,6 +299,8 @@ func parsePairServiceNew(opts []Pair) (pairServiceNew, error) { } result.HasServiceFeatures = true result.ServiceFeatures = v.Value.(ServiceFeatures) + // Enable features + // Default pairs } } if !result.HasCredential { @@ -592,6 +596,16 @@ type pairStorageNew struct { StorageFeatures StorageFeatures HasWorkDir bool WorkDir string + // Enable features + hasEnableLoosePair bool + EnableLoosePair bool + hasEnableVirtualDir bool + EnableVirtualDir bool + // Default pairs + hasDefaultContentType bool + DefaultContentType string + hasDefaultStorageClass bool + DefaultStorageClass string } // parsePairStorageNew will parse Pair slice into *pairStorageNew @@ -646,6 +660,32 @@ func parsePairStorageNew(opts []Pair) (pairStorageNew, error) { } result.HasWorkDir = true result.WorkDir = v.Value.(string) + // Enable features + case "enable_loose_pair": + if result.hasEnableLoosePair { + continue + } + result.hasEnableLoosePair = true + result.EnableLoosePair = true + case "enable_virtual_dir": + if result.hasEnableVirtualDir { + continue + } + result.hasEnableVirtualDir = true + result.EnableVirtualDir = true + // Default pairs + case "default_content_type": + if result.hasDefaultContentType { + continue + } + result.hasDefaultContentType = true + result.DefaultContentType = v.Value.(string) + case "default_storage_class": + if result.hasDefaultStorageClass { + continue + } + result.hasDefaultStorageClass = true + result.DefaultStorageClass = v.Value.(string) } } if !result.HasName {