diff --git a/.travis.yml b/.travis.yml index 1782613..e78aecd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,9 +18,10 @@ before_install: - export PATH=$HOME/bin/:$PATH # golang/protobuf contains protoc-gen-go which generates the .pb.go files - - go get -v github.com/golang/protobuf/... + #- go get -v github.com/golang/protobuf/... || true + - go get -v github.com/golang/protobuf/protoc-gen-go # For http annotation support - - go get -v google.golang.org/genproto/... + - go get -v github.com/TuneLab/go-genproto/... || true # go-bindata is used to create binary data from template files - go get -v github.com/jteeuwen/go-bindata/... diff --git a/Makefile b/Makefile index 859df42..349b158 100644 --- a/Makefile +++ b/Makefile @@ -8,12 +8,12 @@ default: truss dependencies: go get github.com/go-kit/kit - go get google.golang.org/genproto + go get github.com/TuneLab/go-genproto go get github.com/golang/protobuf/{proto,protoc-gen-go} update-dependencies: go get -u github.com/go-kit/kit - go get -u google.golang.org/genproto + go get -u github.com/TuneLab/go-genproto go get -u github.com/golang/protobuf/{proto,protoc-gen-go} # Generate go files containing the all template files in []byte form diff --git a/README.md b/README.md index cf57b62..f8417ee 100644 --- a/README.md +++ b/README.md @@ -21,15 +21,15 @@ To install this software, you must: download a release from [github](https://github.com/google/protobuf/releases) and add to `$PATH`. Otherwise [install from source.](https://github.com/google/protobuf) -1. Install the `proto` and `protoc-gen-go` packages. (`protoc-gen-go` must be in `$PATH`) +1. Install the `protoc-gen-go` package (must be in `$PATH`). ``` - go get -u github.com/golang/protobuf/{proto,protoc-gen-go} + go get -u github.com/golang/protobuf/protoc-gen-go ``` 1. Install HTTP Annotations ``` - go get -u google.golang.org/genproto + go get -u github.com/TuneLab/go-genproto ``` 1. Install Truss with diff --git a/TUTORIAL.md b/TUTORIAL.md index 6ee83e5..940e77d 100644 --- a/TUTORIAL.md +++ b/TUTORIAL.md @@ -34,8 +34,9 @@ message LouderRequest { } ``` The RPC calls can be annotated with HTTP transport option (endpoint name and type of request). For this we must import the google annotations library. + ``` -import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; +import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; service Echo { ... @@ -185,4 +186,4 @@ Executing this command will place the *.pb.go files into `$GOPATH/truss-demo/int ## Middlewares - TODO \ No newline at end of file + TODO diff --git a/_example/echo.proto b/_example/echo.proto index 6198d8b..6dda601 100644 --- a/_example/echo.proto +++ b/_example/echo.proto @@ -8,7 +8,7 @@ syntax = "proto3"; // for `package echo;` truss will create the directory "echo-service". package echo; -import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; +import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; service Echo { // Echo "echos" the incoming string diff --git a/cmd/_integration-tests/README.md b/cmd/_integration-tests/README.md index a59c471..33af55f 100644 --- a/cmd/_integration-tests/README.md +++ b/cmd/_integration-tests/README.md @@ -14,8 +14,8 @@ in a sane way, even for requests not made with the generated HTTP client. The test harness works as follows: -- Runs truss against `transport/transport-test.proto`, which generates `transport/transport-service` -- Copy `transport/handlers` into `transport/transport-service` +- Runs truss against `transport/transport-test.proto`, which generates `transport/transportpermutations-service` +- Copy `transport/handlers` into `transport/transportpermutations-service` - Run `go test -v` - Runs truss again against `transport/transport-test.proto` (for regeneration tests) - Run `go test -v` diff --git a/cmd/_integration-tests/cli/cli_test.go b/cmd/_integration-tests/cli/cli_test.go index ead8706..f1ad105 100644 --- a/cmd/_integration-tests/cli/cli_test.go +++ b/cmd/_integration-tests/cli/cli_test.go @@ -135,7 +135,7 @@ func truss(path string, options ...string) (string, error) { return string(out), err } -// buildTestService builds a truss service with the package TEST +// buildTestService builds a truss service with the package "test" // into the `serviceDir`/bin directory func buildTestService(serviceDir string) (err error) { @@ -156,14 +156,14 @@ func buildTestService(serviceDir string) (err error) { return err } - const serverPath = "/TEST-service/TEST-server" - const clientPath = "/TEST-service/TEST-cli-client" + const serverPath = "/test-service/test-server" + const clientPath = "/test-service/test-cli-client" // Build server and client errChan := make(chan error) - go goBuild("TEST-server", binDir, filepath.Join(relDir, serverPath), errChan) - go goBuild("TEST-cli-client", binDir, filepath.Join(relDir, clientPath), errChan) + go goBuild("test-server", binDir, filepath.Join(relDir, serverPath), errChan) + go goBuild("test-cli-client", binDir, filepath.Join(relDir, clientPath), errChan) err = <-errChan if err != nil { @@ -218,12 +218,12 @@ func goBuild(name, outputPath, relCodePath string, errChan chan error) { errChan <- nil } -// runServerAndClient execs a TEST-server and TEST-client and puts a +// runServerAndClient execs a test-server and test-client and puts a // runReference to their interaction on the runRefs channel func runServerAndClient(path string, port int, debugPort int) runReference { // From within a folder with a truss `service` // These are the paths to the compiled binaries - const relativeServerPath = "/bin/TEST-server" + const relativeServerPath = "/bin/test-server" // Output buffer for the server Stdout and Stderr serverOut := bytes.NewBuffer(nil) @@ -299,7 +299,7 @@ func runServerAndClient(path string, port int, debugPort int) runReference { } func runClient(path string, trans string, port int) ([]byte, bool) { - const relativeClientPath = "/bin/TEST-cli-client" + const relativeClientPath = "/bin/test-cli-client" var client *exec.Cmd switch trans { @@ -354,7 +354,7 @@ func cleanTests(servicesDir string) { // removeTestFiles removes all files created by running truss and building the // service from a single definition directory func removeTestFiles(defDir string) { - os.RemoveAll(filepath.Join(defDir, "TEST-service")) + os.RemoveAll(filepath.Join(defDir, "test-service")) os.RemoveAll(filepath.Join(defDir, "bin")) os.RemoveAll(filepath.Join(defDir, "pbout")) os.MkdirAll(filepath.Join(defDir, "pbout"), 0777) diff --git a/cmd/_integration-tests/cli/test-service-definitions/1-basic/basic.proto b/cmd/_integration-tests/cli/test-service-definitions/1-basic/basic.proto index 11bff00..92f8830 100644 --- a/cmd/_integration-tests/cli/test-service-definitions/1-basic/basic.proto +++ b/cmd/_integration-tests/cli/test-service-definitions/1-basic/basic.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -package TEST; +package basic; -import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; +import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; -service Basic { +service TEST { rpc GetBasic (BasicTypeRequest) returns (BasicTypeResponse) { option (google.api.http) = { get: "/1" diff --git a/cmd/_integration-tests/cli/test-service-definitions/1-multifile/basic.proto b/cmd/_integration-tests/cli/test-service-definitions/1-multifile/basic.proto index b7e3a2c..b3e7b2b 100644 --- a/cmd/_integration-tests/cli/test-service-definitions/1-multifile/basic.proto +++ b/cmd/_integration-tests/cli/test-service-definitions/1-multifile/basic.proto @@ -1,12 +1,12 @@ syntax = "proto3"; -package TEST; +package multifile; -import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; +import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; import "imported.proto"; -service Basic { +service TEST { rpc GetBasic (BasicTypeRequest) returns (BasicTypeResponse) { option (google.api.http) = { get: "/1" diff --git a/cmd/_integration-tests/cli/test-service-definitions/1-multifile/imported.proto b/cmd/_integration-tests/cli/test-service-definitions/1-multifile/imported.proto index 48fdf2e..ceb9260 100644 --- a/cmd/_integration-tests/cli/test-service-definitions/1-multifile/imported.proto +++ b/cmd/_integration-tests/cli/test-service-definitions/1-multifile/imported.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package TEST; +package multifile; -import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; +import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; message BasicTypeRequest { double A = 1; diff --git a/cmd/_integration-tests/cli/test-service-definitions/2-repeated/repeated.proto b/cmd/_integration-tests/cli/test-service-definitions/2-repeated/repeated.proto index fd1f111..093f54b 100644 --- a/cmd/_integration-tests/cli/test-service-definitions/2-repeated/repeated.proto +++ b/cmd/_integration-tests/cli/test-service-definitions/2-repeated/repeated.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -package TEST; +package Repeated; -import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; +import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; -service Repeated { +service TEST { rpc GetRepeated (RepeatedTypeRequest) returns (RepeatedTypeResponse) { option (google.api.http) = { get: "/1" diff --git a/cmd/_integration-tests/cli/test-service-definitions/3-nested/nested.proto b/cmd/_integration-tests/cli/test-service-definitions/3-nested/nested.proto index 4ca5abc..bcc68d9 100644 --- a/cmd/_integration-tests/cli/test-service-definitions/3-nested/nested.proto +++ b/cmd/_integration-tests/cli/test-service-definitions/3-nested/nested.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -package TEST; +package nested; -import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; +import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; -service Nested { +service TEST { rpc GetNested (NestedTypeRequest) returns (NestedTypeResponse) { option (google.api.http) = { get: "/1" diff --git a/cmd/_integration-tests/cli/test-service-definitions/4-maps/maps.proto b/cmd/_integration-tests/cli/test-service-definitions/4-maps/maps.proto index bf31a39..d0af3ab 100644 --- a/cmd/_integration-tests/cli/test-service-definitions/4-maps/maps.proto +++ b/cmd/_integration-tests/cli/test-service-definitions/4-maps/maps.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -package TEST; +package map; -import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; +import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; -service Map { +service TEST { rpc GetMap (MapTypeRequest) returns (MapTypeResponse) { option (google.api.http) = { get: "/1" diff --git a/cmd/_integration-tests/transport/Makefile b/cmd/_integration-tests/transport/Makefile index 495ba5d..c467fcc 100644 --- a/cmd/_integration-tests/transport/Makefile +++ b/cmd/_integration-tests/transport/Makefile @@ -14,7 +14,7 @@ all: test test: @echo -e '$(TRUSS_MSG)' truss transport-test.proto - cp -r handlers transport-service + cp -r handlers transportpermutations-service @echo -e '$(TEST_RUNNING_MSG)' go test -v @echo -e '$(TRUSS_AGAIN_MSG)' @@ -24,4 +24,4 @@ test: $(MAKE) clean clean: - rm -rf transport-service + rm -rf transportpermutations-service diff --git a/cmd/_integration-tests/transport/grpc_test.go b/cmd/_integration-tests/transport/grpc_test.go index 17231c7..699d6b0 100644 --- a/cmd/_integration-tests/transport/grpc_test.go +++ b/cmd/_integration-tests/transport/grpc_test.go @@ -8,8 +8,8 @@ import ( "golang.org/x/net/context" "google.golang.org/grpc" - pb "github.com/TuneLab/go-truss/cmd/_integration-tests/transport/transport-service" - grpcclient "github.com/TuneLab/go-truss/cmd/_integration-tests/transport/transport-service/generated/client/grpc" + pb "github.com/TuneLab/go-truss/cmd/_integration-tests/transport/transportpermutations-service" + grpcclient "github.com/TuneLab/go-truss/cmd/_integration-tests/transport/transportpermutations-service/generated/client/grpc" ) var grpcAddr string diff --git a/cmd/_integration-tests/transport/handlers/server/server_handler.go b/cmd/_integration-tests/transport/handlers/server/server_handler.go index d0a2e42..482b506 100644 --- a/cmd/_integration-tests/transport/handlers/server/server_handler.go +++ b/cmd/_integration-tests/transport/handlers/server/server_handler.go @@ -8,7 +8,7 @@ import ( "golang.org/x/net/context" - pb "github.com/TuneLab/go-truss/cmd/_integration-tests/transport/transport-service" + pb "github.com/TuneLab/go-truss/cmd/_integration-tests/transport/transportpermutations-service" ) // NewService returns a naïve, stateless implementation of Service. diff --git a/cmd/_integration-tests/transport/http_test.go b/cmd/_integration-tests/transport/http_test.go index 535b095..ed5e754 100644 --- a/cmd/_integration-tests/transport/http_test.go +++ b/cmd/_integration-tests/transport/http_test.go @@ -13,8 +13,8 @@ import ( // 3d Party "golang.org/x/net/context" // This Service - pb "github.com/TuneLab/go-truss/cmd/_integration-tests/transport/transport-service" - httpclient "github.com/TuneLab/go-truss/cmd/_integration-tests/transport/transport-service/generated/client/http" + pb "github.com/TuneLab/go-truss/cmd/_integration-tests/transport/transportpermutations-service" + httpclient "github.com/TuneLab/go-truss/cmd/_integration-tests/transport/transportpermutations-service/generated/client/http" "github.com/pkg/errors" ) diff --git a/cmd/_integration-tests/transport/setup_test.go b/cmd/_integration-tests/transport/setup_test.go index 06b10bf..65392a4 100644 --- a/cmd/_integration-tests/transport/setup_test.go +++ b/cmd/_integration-tests/transport/setup_test.go @@ -14,9 +14,9 @@ import ( // Go Kit "github.com/go-kit/kit/log" - pb "github.com/TuneLab/go-truss/cmd/_integration-tests/transport/transport-service" - svc "github.com/TuneLab/go-truss/cmd/_integration-tests/transport/transport-service/generated" - handler "github.com/TuneLab/go-truss/cmd/_integration-tests/transport/transport-service/handlers/server" + pb "github.com/TuneLab/go-truss/cmd/_integration-tests/transport/transportpermutations-service" + svc "github.com/TuneLab/go-truss/cmd/_integration-tests/transport/transportpermutations-service/generated" + handler "github.com/TuneLab/go-truss/cmd/_integration-tests/transport/transportpermutations-service/handlers/server" ) func TestMain(m *testing.M) { diff --git a/cmd/_integration-tests/transport/transport-test.proto b/cmd/_integration-tests/transport/transport-test.proto index 3ad0aa0..252cd97 100644 --- a/cmd/_integration-tests/transport/transport-test.proto +++ b/cmd/_integration-tests/transport/transport-test.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package transport; -import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; +import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; service TransportPermutations { rpc GetWithQuery (GetWithQueryRequest) returns (GetWithQueryResponse) { diff --git a/cmd/truss/main.go b/cmd/truss/main.go index 2788e9f..e334cb0 100644 --- a/cmd/truss/main.go +++ b/cmd/truss/main.go @@ -14,7 +14,7 @@ import ( "github.com/TuneLab/go-truss/truss" "github.com/TuneLab/go-truss/truss/execprotoc" - "github.com/TuneLab/go-truss/truss/parsepkgname" + "github.com/TuneLab/go-truss/truss/parsesvcname" "github.com/TuneLab/go-truss/deftree" "github.com/TuneLab/go-truss/gendoc" @@ -111,13 +111,10 @@ func parseInput() (*truss.Config, error) { } // Service Path - defFile, err := os.Open(cfg.DefPaths[0]) + svcName, err := parsesvcname.FromPaths(cfg.GoPath, cfg.DefPaths) + svcName = strings.ToLower(svcName) if err != nil { - return nil, errors.Wrapf(err, "cannot open package file %q", cfg.DefPaths[0]) - } - svcName, err := parsepkgname.FromReader(defFile) - if err != nil { - return nil, errors.Wrapf(err, "cannot parse package name from file %q", cfg.DefPaths[0]) + return nil, errors.Wrap(err, "cannot parse service name from the provided definition files") } svcFolderName := svcName + "-service" @@ -195,16 +192,15 @@ func parseServiceDefinition(cfg *truss.Config) (deftree.Deftree, *svcdef.Svcdef, return nil, nil, errors.Wrap(err, "cannot create .pb.go files") } - // Open all .pb.go files and store in slice to be passed to svcdef.New() - //var openFiles func([]string) ([]io.Reader, error) - openFiles := func(paths []string) ([]io.Reader, error) { - rv := []io.Reader{} + // Open all .pb.go files and store in map to be passed to svcdef.New() + openFiles := func(paths []string) (map[string]io.Reader, error) { + rv := map[string]io.Reader{} for _, p := range paths { reader, err := os.Open(p) if err != nil { return nil, errors.Wrapf(err, "cannot open file %q", p) } - rv = append(rv, reader) + rv[p] = reader } return rv, nil } @@ -228,7 +224,7 @@ func parseServiceDefinition(cfg *truss.Config) (deftree.Deftree, *svcdef.Svcdef, // Create the svcdef sd, err := svcdef.New(pbgoFiles, pbFiles) if err != nil { - return nil, nil, errors.Wrap(err, "cannot create svcdef") + return nil, nil, errors.Wrapf(err, "failed to create service definition; did you pass ALL the protobuf files to truss?") } // Create the Deftree diff --git a/deftree/build_deftree_test.go b/deftree/build_deftree_test.go index 7504b45..daf7f97 100644 --- a/deftree/build_deftree_test.go +++ b/deftree/build_deftree_test.go @@ -28,7 +28,7 @@ func TestNewFromString(t *testing.T) { // General package package general; - import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; // RequestMessage is so foo message RequestMessage { diff --git a/gendoc/gendoc.go b/gendoc/gendoc.go index 0a520f1..d024268 100644 --- a/gendoc/gendoc.go +++ b/gendoc/gendoc.go @@ -7,8 +7,19 @@ import ( "strings" "github.com/TuneLab/go-truss/deftree" + "github.com/golang/protobuf/protoc-gen-go/generator" ) +func findServiceName(md *deftree.MicroserviceDefinition) string { + rv := "default" + for _, f := range md.Files { + for _, svc := range f.Services { + rv = svc.GetName() + } + } + return rv +} + // GenerateDocs accepts a deftree that represents an ast of a group of // protofiles and returns map[string]io.Reader that represents a relative // filestructure of generated docs @@ -23,7 +34,10 @@ func GenerateDocs(dt deftree.Deftree) map[string]io.Reader { } files := make(map[string]io.Reader) - files[dt.GetName()+"-service/docs/docs.md"] = strings.NewReader(response) + md := dt.(*deftree.MicroserviceDefinition) + // Normalize the service to prevent diversion from convention + svcname := strings.ToLower(generator.CamelCase(findServiceName(md))) + files[svcname+"-service/docs/docs.md"] = strings.NewReader(response) return files } diff --git a/gengokit/clientarggen/client_argument_generator_test.go b/gengokit/clientarggen/client_argument_generator_test.go index 8c39c4d..de8214f 100644 --- a/gengokit/clientarggen/client_argument_generator_test.go +++ b/gengokit/clientarggen/client_argument_generator_test.go @@ -31,7 +31,7 @@ func TestNewClientServiceArgs(t *testing.T) { // General package package general; - import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; message SumRequest { repeated int64 a = 1; diff --git a/gengokit/generator/gen.go b/gengokit/generator/gen.go index 6ea07d2..37fee5f 100644 --- a/gengokit/generator/gen.go +++ b/gengokit/generator/gen.go @@ -6,6 +6,7 @@ import ( "go/format" "io" "io/ioutil" + "path" "strings" log "github.com/Sirupsen/logrus" @@ -30,8 +31,12 @@ func GenerateGokit(sd *svcdef.Svcdef, conf gengokit.Config) (map[string]io.Reade codeGenFiles := make(map[string]io.Reader) + // Remove the suffix "-service" since it's added back in by templatePathToActual + svcname := strings.TrimSuffix(path.Base(conf.GoPackage), "-service") for _, templPath := range templFiles.AssetNames() { - actualPath := templatePathToActual(templPath, sd.PkgName) + // Re-derive the actual path for this file based on the service output + // path provided by the truss main.go + actualPath := templatePathToActual(templPath, svcname) file, err := generateResponseFile(templPath, data, conf.PreviousFiles[actualPath]) if err != nil { return nil, errors.Wrap(err, "cannot render template") diff --git a/gengokit/generator/gen_test.go b/gengokit/generator/gen_test.go index e505ffe..a52105f 100644 --- a/gengokit/generator/gen_test.go +++ b/gengokit/generator/gen_test.go @@ -49,7 +49,7 @@ func TestApplyTemplateFromPath(t *testing.T) { // General package package general; - import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; // RequestMessage is so foo message RequestMessage { @@ -141,7 +141,7 @@ func TestAllTemplates(t *testing.T) { // General package package general; - import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; // RequestMessage is so foo message RequestMessage { @@ -171,7 +171,7 @@ func TestAllTemplates(t *testing.T) { // General package package general; - import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; // RequestMessage is so foo message RequestMessage { diff --git a/gengokit/gengokit_test.go b/gengokit/gengokit_test.go index 575dd84..b9ccbb8 100644 --- a/gengokit/gengokit_test.go +++ b/gengokit/gengokit_test.go @@ -21,7 +21,7 @@ func TestNewData(t *testing.T) { // General package package general; - import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; // RequestMessage is so foo message RequestMessage { diff --git a/gengokit/handler/handler_test.go b/gengokit/handler/handler_test.go index a8b9585..4a9cf00 100644 --- a/gengokit/handler/handler_test.go +++ b/gengokit/handler/handler_test.go @@ -38,7 +38,7 @@ func TestServerMethsTempl(t *testing.T) { // General package package general; - import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; // RequestMessage is so foo message RequestMessage { @@ -98,7 +98,7 @@ func TestApplyServerTempl(t *testing.T) { // General package package general; - import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; // RequestMessage is so foo message RequestMessage { @@ -190,7 +190,7 @@ func TestIsValidFunc(t *testing.T) { // General package package general; - import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; // RequestMessage is so foo message RequestMessage { @@ -257,7 +257,7 @@ func TestPruneDecls(t *testing.T) { // General package package general; - import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; // RequestMessage is so foo message RequestMessage { @@ -384,7 +384,7 @@ func TestUpdateMethods(t *testing.T) { // General package package general; - import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; // RequestMessage is so foo message RequestMessage { diff --git a/gengokit/httptransport/httptransport_test.go b/gengokit/httptransport/httptransport_test.go index ff94a7e..a0b3cbf 100644 --- a/gengokit/httptransport/httptransport_test.go +++ b/gengokit/httptransport/httptransport_test.go @@ -28,7 +28,7 @@ func TestNewMethod(t *testing.T) { // General package package general; - import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; message SumRequest { int64 a = 1; diff --git a/gengokit/middlewares/middlewares_test.go b/gengokit/middlewares/middlewares_test.go index dfe3f65..10bbcfe 100644 --- a/gengokit/middlewares/middlewares_test.go +++ b/gengokit/middlewares/middlewares_test.go @@ -217,7 +217,7 @@ func generalService() (*svcdef.Svcdef, *gengokit.Data, error) { // General package package general; - import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; // RequestMessage is so foo message RequestMessage { diff --git a/gengokit/template/template.go b/gengokit/template/template.go index 991a2a5..49dd579 100644 --- a/gengokit/template/template.go +++ b/gengokit/template/template.go @@ -78,7 +78,7 @@ func (fi bindataFileInfo) Sys() interface{} { return nil } -var _nameServiceNameCliClientClient_mainGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xac\x56\x4d\x6f\xdb\x38\x10\x3d\x4b\xbf\x62\x2a\x24\x80\x5c\x38\x74\x17\xd8\xbd\x18\xf0\x21\xcd\xb6\xdb\x00\xdb\xc2\x48\x02\xf4\x52\x60\x41\x53\x23\x89\x1b\x8a\x54\x49\x5a\x49\x40\xe8\xbf\x2f\x86\x92\x65\xbb\x89\x91\xfd\x0a\x90\x48\x1a\xcd\xbc\xf9\x7a\x8f\x4a\xcb\xc5\x3d\xaf\x10\x1a\x2e\x75\x9a\xca\xa6\x35\xd6\x43\x9e\x26\x19\x6a\x61\x0a\xa9\xab\xc5\x9f\xce\xe8\x2c\x4d\xb2\x52\xf1\x2a\x5e\x1b\x4f\x17\xe3\xe8\xaf\xf3\x56\x18\xdd\x8d\xb7\x52\x57\xd1\xea\x65\x83\x59\x9a\x26\x59\x65\x14\xd7\x15\x33\xb6\x5a\x3c\x2e\x34\xfa\x85\x30\xda\xe3\x63\x04\xa8\x8c\xa9\x14\xb2\x03\x97\xca\xb6\x62\x08\x93\xbe\xde\x6e\x98\x30\xcd\xa2\xbd\xaf\x16\x68\xad\xb1\x8e\xde\x2c\x16\x70\x57\x4b\x07\xb7\x68\x3b\x29\x30\x4d\x84\x92\xa8\xfd\x27\xae\x0b\x85\x16\xb2\x10\xd8\x75\x6c\x61\xcd\x7d\x0d\x17\x7d\x0f\x8b\x0a\x35\x5a\xee\xb1\x58\x08\x25\x17\xf5\xe0\x49\x55\x52\xb6\x21\xfc\xf5\x38\xd4\x7e\xac\x2e\xa9\xbd\x6f\xff\x49\x18\xf9\x67\x69\xd2\x6e\xa2\xfb\xfa\xfd\x71\x40\x96\xce\xd2\xb4\xe3\x96\x46\xfe\x07\xac\x60\x9c\x27\x5b\x73\xeb\xf0\x5a\xfb\xc9\x4a\xa3\x65\xb7\xad\x92\xa3\x89\xb6\xc2\xae\x4c\xd3\x72\x31\x5a\x86\x29\xb1\xaf\x96\xb7\xe5\x60\x69\x37\xec\x06\x2b\xe9\x3c\xda\x10\xd8\x38\x33\xf6\x85\x37\xd8\xf7\xf4\x84\x96\xb2\xa7\xe5\x56\x8b\xb8\xff\x7c\x06\x61\x9c\x31\x02\x2f\x0a\xa1\x24\xb4\x16\xdd\xb6\x41\x07\xda\x80\x1b\x10\xa0\x90\x4e\x98\x0e\xed\x13\xb8\x27\xe7\xb1\x99\x03\xd7\x05\xe0\x63\x8b\xc2\x3b\xd8\x3a\xb4\x0e\xbc\x89\x48\xad\x35\x9d\x2c\x10\x7c\x4d\x61\x16\x85\x27\x60\x8b\xce\x81\x29\x81\xeb\x1d\x26\x1b\xf6\x3a\x64\x6b\xbd\x34\x1a\xa4\x03\x8b\xa5\x42\xe1\xb1\x00\xa9\x23\x1c\xc1\x50\x55\x1b\xa9\xb9\x7d\x8a\x69\xc9\x34\x9a\x69\x27\x23\x9f\xdd\x32\x1a\x2f\xbc\xe5\xda\xd1\xc0\x19\xa5\x05\xe2\xb0\x8b\x48\x14\xda\x71\x2b\xcd\xd6\xed\x42\x85\xd1\xce\xdb\xad\xf0\xc6\x3a\xd8\x18\x5f\x8f\x2d\x41\x6d\x9c\x5f\x46\x61\xec\x16\x91\xa6\xc9\xb8\xb4\xc8\x87\x4b\xc2\x1e\x7e\x56\x31\x07\xbb\x8d\x8e\x79\x46\x6f\x63\xea\x6c\x0e\x19\xfd\x7e\xba\xbb\x5b\x1f\x8d\xa0\x28\x5c\x27\xb2\x59\x9a\x44\x42\x9e\x46\xa2\xb7\x13\xd2\xf2\x97\x77\x3f\xbf\xa3\x9b\xea\x66\x7d\x05\x39\x81\xce\x4e\xa0\x36\xe8\x6b\x53\x00\xbc\x8c\x3a\xbc\x25\xa4\x10\x2c\xd7\x15\xc2\x99\xd4\x05\x3e\xce\xe1\x4c\xc2\x72\x05\x13\x6b\x3e\x47\x47\xd7\xf7\x21\xc8\x72\x74\xa2\x07\x54\x0e\xe9\x7a\x67\x7e\x37\x0f\x68\xe1\x4c\x8e\x04\x0b\x01\x75\x31\x5d\xb2\x79\xf2\xef\x32\xcc\x27\x9c\x53\x19\xa8\xcb\xd9\xc1\x42\x42\x60\x57\x71\xa1\x97\xb6\x72\xec\x52\xa9\x8f\xb4\xf4\xbe\x27\xaf\x24\x36\x1f\xc5\x95\x13\xf5\xa7\xa0\x1d\xb5\xdb\x0d\x0b\xe1\x37\x43\x09\xe0\x65\xc5\x24\x09\xda\x61\x45\x51\x70\x11\x55\x96\xf0\x76\xe2\xc1\x9b\x15\x64\x19\x09\x69\x07\x3a\x27\x4f\x58\xc1\xfe\xe4\x60\x5f\xf0\x21\x9f\x22\x66\x69\xd2\x03\xcd\x11\x08\x67\x62\xc1\x1e\x47\x18\xad\x07\x90\xe5\x0a\x22\x0f\x7e\x95\x5c\xe5\x93\xeb\x7c\x30\x7e\x95\xbe\xbe\xd6\x0e\xc5\xd6\x62\x3e\x3b\x30\xde\xc9\x06\xcd\xd6\xe7\x74\x2c\xb3\x5b\x14\x46\x17\x33\xa2\x86\x2c\x23\xe8\x9b\x15\x68\xa9\x62\xa6\xa4\x6c\x3c\xfb\xd8\x5a\xa9\x7d\x99\x1b\xc7\x6e\x7d\x81\xd6\xce\x21\xfb\x40\xbd\xc2\x43\x2d\x15\xe9\x98\x2b\xa9\xab\x88\x4f\xa2\xd1\x28\x48\xb0\x4b\x38\xef\xb2\x58\x26\x61\x27\xc6\xb1\x0f\x8f\xd2\xe7\x3f\xd1\x53\x9f\x26\x49\x81\x25\xda\xe8\xcf\xae\x94\x89\x0b\x78\x36\xa2\xfd\x99\x1c\x47\x44\xce\xfb\xe9\x50\x81\xa7\xea\x8b\xbb\x58\xd2\x21\x65\xb1\x31\x1e\x27\x31\xb8\x16\x85\x2c\x25\x16\xdf\x74\x94\xc3\x61\x59\x7d\xfa\xc2\x08\x5e\xc9\x70\xde\x7d\xd3\xfb\x2e\x8f\xd1\xd2\xc4\x3d\x48\x2f\x6a\x78\x3b\x8a\x2e\xa4\x21\xc0\x83\xf4\x35\x9c\x79\x8c\x64\x27\x1a\xee\x75\x40\xa6\x33\x8f\xcf\x25\x40\x4b\xe7\x0e\x49\x95\xcf\x68\x9f\x2d\x69\xbc\x21\x5c\x0c\xc8\x51\x27\x11\xe5\x80\xf5\x04\x44\x37\xbb\x28\xfa\xd4\x50\x54\xe4\x3b\x35\x3c\x72\x37\x02\xb1\xcf\xdc\xba\x9a\xef\x75\x32\xa0\x47\x71\xd1\x83\xc5\xef\x5b\x74\x7e\x62\xe0\xd1\x37\x97\x85\x30\x55\x96\x87\xf0\xf7\x4b\x22\xfd\xb2\x2b\xae\x14\x19\x27\x31\x47\xea\xbc\xc0\xcb\x57\x88\x29\xb8\x8a\x94\x3c\x59\xda\x8f\x8b\xfb\x81\x9f\x71\x79\x49\xd2\x4d\x3d\xee\x3e\x4b\x87\xdd\x8d\xff\xbb\xb0\xf7\x5c\xdc\x57\xd6\x6c\x75\x41\x2a\x1b\xa7\xf3\x1f\x0b\x7f\x21\xdf\xeb\x25\x8f\xe8\x6b\x02\x57\x3a\xcf\x86\x69\xc3\xcd\x50\x11\x16\x91\x20\xcb\x48\xfb\x23\xc7\xff\x69\x4d\x47\xb9\x87\xd3\x11\x6e\xd0\xb5\x46\x17\xa7\x73\x77\xb3\xf4\x80\x5d\x07\x3c\x2b\xb0\xe4\x5b\xe5\x97\xaf\x4b\x50\xea\x8e\x2b\x59\xc0\x28\xb2\xf3\xef\x71\x4a\xc3\xd3\x73\x51\xf6\x69\xfa\x57\x00\x00\x00\xff\xff\x6c\xf0\x67\x0a\xe4\x0a\x00\x00") +var _nameServiceNameCliClientClient_mainGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xac\x56\xef\x6f\x9b\x48\x10\xfd\x0c\x7f\xc5\x1c\x6a\x24\x5c\x39\xd0\x93\xee\xbe\x58\xca\x87\x34\xd7\x5e\x23\x5d\x2b\x2b\x89\xd4\x2f\x27\x9d\x08\xac\x61\xaf\xb0\x4b\x77\x17\x27\x15\xf2\xff\x7e\x6f\x16\x8c\xed\xc6\x96\xef\x57\xa4\x04\x58\x66\xde\xcc\xbe\x79\x6f\x49\x9b\xe5\x5f\xb2\x52\x50\x93\x49\x15\x86\xb2\x69\xb5\x71\x14\x87\x41\x24\x54\xae\x0b\xa9\xca\xf4\x4f\xab\x55\x84\x85\x55\x9d\x95\xfe\xda\x38\xbe\x68\xcb\x7f\xad\x33\xb9\x56\xeb\xf1\x16\xe1\x7e\xd5\xc9\x46\x44\x21\x6e\x4a\x5d\x67\xaa\x4c\xb4\x29\xd3\xe7\x54\x09\x97\x22\xd8\x89\x67\x0f\x50\x6a\x5d\xd6\x22\xd9\x0b\x29\x4d\x9b\x0f\x69\xd2\x55\xdd\x63\x92\xeb\x26\x6d\xbf\x94\xa9\x30\x46\x1b\xcb\x6f\xd2\x94\x1e\x2a\x69\xe9\x5e\x98\xb5\xcc\x45\x18\xe4\xb5\x14\xca\x7d\xc8\x54\x51\x0b\x43\x51\xdf\x27\xb7\x7e\x0b\xcb\xcc\x55\x74\xb9\xd9\x50\x5a\x0a\x25\x4c\xe6\x44\x91\x22\x36\xad\x86\x48\xee\x92\xab\x0d\xe9\xe7\xf3\x10\x34\x76\x17\x54\xce\xb5\xff\x24\x8d\xe3\x91\xd6\x3e\xfa\xf0\xe5\xdb\xc3\x84\x28\x9c\x85\xe1\x3a\x33\x4c\xf9\x1f\x74\x45\x23\x9f\xc9\x32\x33\x56\xdc\x2a\x37\xad\x32\xb5\xc9\x7d\x5b\xcb\x71\x89\xa7\x92\xdc\xe8\x06\xf3\x1b\x57\x06\x96\x92\xcf\x26\x6b\x57\xc3\x4a\xfb\x98\xdc\x89\x52\x5a\x27\x0c\x4a\x8f\x9c\x25\x9f\xb2\x46\x6c\x36\xfc\x24\x0c\x57\x0f\x57\x9d\xca\xfd\xfc\xe3\x19\xf5\x23\xc7\x82\xb2\xa2\xc0\x0e\xa8\x35\xc2\x76\x8d\xb0\xa4\x34\xd9\x01\x81\x0a\x69\x73\x8d\xec\x6f\x64\xbf\x01\xbc\x99\x13\x58\x25\xf1\xdc\x8a\xdc\x59\xea\x10\x66\xc9\x69\x8f\xd4\x1a\xbd\x96\x85\x20\x57\x71\x9a\x41\x00\x03\x03\xd3\x92\x5e\x21\x6d\x8b\x99\x0c\x73\x1d\xaa\xb5\x4e\x6a\x45\x78\x34\x62\x55\x23\x45\x14\x04\x71\x32\x1c\xc3\x70\x57\x8f\x52\x65\x28\xcf\x65\x79\x69\x5c\xe6\x99\x8c\x7a\xb6\x0b\xbf\x78\xe9\x4c\xa6\x2c\x13\x9e\x70\x59\x62\x0d\x5b\x8f\xc4\xa9\xe0\x5d\xea\xce\x6e\x53\x41\x3c\x88\xee\x72\x07\x1a\xe9\x51\x63\x40\xc3\x96\xa8\xd2\xd6\x2d\xbc\x31\xb6\x83\x80\x14\xc7\xa1\x79\x3d\x5c\x33\xf6\xf0\x73\xe5\x6b\x24\xf7\x3e\x30\x8e\xf8\xad\x2f\x1d\xcd\x29\xe2\xdf\x0f\x0f\x0f\xcb\x03\x0a\x8a\xc2\xae\xf3\x68\x06\x24\x16\xd8\x69\x24\x7e\x3b\x21\x2d\x7e\x7e\xf3\xd3\x1b\xbe\x29\xef\x96\x37\x14\x33\xe8\xec\x04\x6a\x23\x5c\xa5\x0b\xa2\xe3\xa8\xc3\x5b\x46\xea\x7b\x50\x85\x83\xe0\x95\x54\x85\x78\x9e\xe3\x4a\x8b\x2b\x9a\x54\xf3\xd1\x07\xda\xcd\xa6\xef\xe5\x6a\x0c\xe2\x07\x51\x5b\xc1\xd7\x07\xfd\x9b\x7e\x82\x05\x5f\xc9\x51\x60\x78\xa5\x8a\xe9\x12\xcd\x83\x7f\x57\x61\x3e\xe1\x9c\xaa\xc0\xbb\x9c\xed\x0d\x04\x52\xbf\xf1\x03\xbd\x36\x98\xd4\x75\x5d\xbf\xe7\xa1\x6f\x36\x1c\x15\xf8\xcd\x7b\x73\xc5\x2c\xfd\x29\x69\x2b\x6d\x58\xa6\xef\x7f\xd5\x5c\x80\x8e\x3b\x26\x08\x60\x34\x4f\xa5\x37\x9c\x47\x45\xbf\xaf\x27\x1d\xfc\x70\x85\x49\xb3\x91\xb6\xa0\x73\x8e\x04\xf1\xbb\x93\x23\xf9\x24\x9e\xe2\x29\x03\x00\x1b\x62\x1e\x89\x71\x26\x15\xec\x70\x20\x4c\x35\x80\x80\x2f\xaf\x83\x5f\x64\x56\xc7\x53\xe8\x7c\x58\xfc\x8c\x53\xf3\x56\x59\x91\x77\x06\xbb\xdb\x5b\x7c\xc0\x71\xac\x3b\x17\xf3\xb1\x8c\x4d\x01\xae\x98\xb1\x34\x50\x8e\x41\x51\x48\xc9\xda\x57\x0a\x70\xb8\x27\xef\x5b\x68\xc3\xad\x62\x8d\x03\xc7\x15\x88\x80\x3a\xde\xf1\x5e\xe9\xa9\x92\x35\xfb\x38\xab\x21\x1e\x8f\xcf\xa6\x51\xf0\x08\x0c\xbb\xa0\x8b\x75\xe4\xdb\x64\xec\x00\xd9\xef\x9e\xa5\x8b\x7f\xe4\x27\x90\x1f\x14\x62\x85\xe9\x71\x3c\xe6\xa3\xfd\x00\x5e\x50\xb4\x3b\x93\x3d\x45\x1c\xbc\x63\x87\x1b\x3c\xd5\x9f\x9f\xc5\x82\x0f\x29\x23\x1a\xed\xc4\x64\x06\x0b\x07\xcb\x95\x14\xc5\xef\xca\xdb\x61\xbf\xad\x4d\x78\x84\x82\x33\x15\x2e\xd6\x00\x9a\x76\x79\x88\x16\x06\xf6\x49\xba\xbc\xa2\xd7\xa3\xe9\xfa\xb0\xef\x09\x4b\x15\xbd\x42\x4b\x2c\x76\x96\xe1\xce\x07\xbc\x84\x37\x2f\x2d\xc0\x43\xcf\xb0\xe5\xe8\x88\xec\xa3\x05\xd3\xdb\xf7\x97\x03\xb2\xf7\x89\x47\xd9\x53\x3d\x03\xf1\xcd\x36\x8b\x3f\x35\x9c\xe5\xf5\xce\x1b\x1e\xb5\xeb\x81\x92\x8f\xf0\x43\x95\xed\x7c\x32\xa0\x7b\x73\xf1\x83\x11\x5f\x3b\x61\xdd\xa4\xc0\x83\x6f\x2e\xec\x32\x75\x16\xf7\xfd\xdf\x6f\x89\xfd\x9b\xdc\x64\x75\xcd\x8b\x93\x99\xbd\x74\x8e\xe8\xf2\x8c\x30\x73\xe0\xb0\x24\x4f\xb6\xf6\xfd\xe0\xbe\xd3\xa7\x1f\x1e\xd8\x99\xf6\xb8\xfd\x2c\xed\xef\x6e\xfc\xdf\x25\x79\x8b\x4f\x4c\x69\x74\xa7\x0a\x76\xd9\xc8\xce\x7f\x6c\xfc\x48\xbd\xf3\x2d\x8f\xe8\x4b\x06\xaf\x55\x1c\x0d\x6c\xd3\xdd\xd0\x11\xbe\x9a\x3c\x8d\x85\x97\xfd\x41\xe0\xff\x34\xa6\x83\xda\xc3\xe9\x88\xda\xf8\xda\x02\xf7\x64\xed\xf5\x2c\xdc\x53\xd7\x9e\xce\x70\x3c\x64\x5d\xed\x16\xe7\x2d\x28\xd5\x1a\x07\x50\x41\xa3\xc9\x2e\xbe\x7a\x96\x86\xa7\x97\xa6\xc4\x64\xff\x0a\x00\x00\xff\xff\x6c\xf0\x67\x0a\xe4\x0a\x00\x00") func nameServiceNameCliClientClient_mainGotemplateBytes() ([]byte, error) { return bindataRead( @@ -93,12 +93,12 @@ func nameServiceNameCliClientClient_mainGotemplate() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "NAME-service/NAME-cli-client/client_main.gotemplate", size: 2788, mode: os.FileMode(420), modTime: time.Unix(1479253692, 0)} + info := bindataFileInfo{name: "NAME-service/NAME-cli-client/client_main.gotemplate", size: 2788, mode: os.FileMode(436), modTime: time.Unix(1478723139, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _nameServiceNameServerServer_mainGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xac\x56\x5b\x6f\xdb\x38\x13\x7d\x96\x7e\xc5\x54\xe8\x57\x48\x1f\x1c\xaa\x8b\x6d\xf7\x21\xa8\x1f\x9a\x4b\xd3\x60\x93\xac\x61\xbb\xe8\xe3\x82\x96\xc6\x34\x11\x89\x14\x48\xda\x71\x20\xf8\xbf\x2f\x86\x92\x6c\x39\xb1\xdd\x3c\x34\x40\xac\xcb\x1c\x9d\xb9\x91\x87\x53\xf1\xec\x91\x0b\x84\x92\x4b\x15\x86\xb2\xac\xb4\x71\x10\x87\x41\x34\x2f\xb8\x88\xe8\x5a\x3a\xba\x28\xec\x2e\xe9\xc2\xb9\xaa\x7f\x9f\x56\x95\xd1\x73\x7a\xa3\x6d\xf3\x9b\x5a\x29\x14\x2f\xe8\xc1\x3e\xdb\x8c\x17\x45\x14\x86\x41\x9a\xc2\x9f\x39\x8c\xb8\x71\xcf\x61\x10\x09\x5d\x70\x25\x98\x36\x22\x5d\xa7\x44\x95\x69\xe5\x70\xed\xbd\x08\xad\x45\x81\xac\x07\x11\xa6\xca\x5a\x8e\x1b\x0d\x7f\x4b\x47\x28\xe9\x16\xcb\x19\xcb\x74\x99\x0a\x7d\xf6\x28\x5d\x4a\xff\x85\x16\x2d\x70\xba\x90\x16\x26\x68\x56\x32\xc3\x30\x58\x70\x95\x17\x68\x20\xaa\x6b\x76\xeb\xd3\x1c\x71\xb7\x80\xb3\xcd\x06\xd2\xd6\x66\x53\x8b\x66\x85\x26\x0a\x03\xbb\xca\x0e\x22\x05\x2a\x34\xdc\x61\x1e\x85\x41\x35\xf3\x90\xd1\xc5\x3e\x28\x0a\x83\x52\xe6\x79\x81\x4f\xdc\xa0\x3d\xc8\xd2\xb3\x47\x61\x12\x86\xf3\xa5\xca\x7c\x07\xe2\x04\xea\x30\x58\x71\x43\x2d\x08\x72\x9c\x2d\xc5\xd7\x3c\x37\xe0\xff\x86\x40\x3d\x61\x13\x67\xa4\x12\x71\xe4\xad\x8c\xe7\xb9\x89\x06\x10\x9d\x7f\xfe\xf8\xd7\x47\xba\xb9\xa2\xd7\xc0\x55\x0e\x25\x3a\x23\x33\x0b\x85\xb4\x0e\x15\x10\x12\xad\x8d\x92\x30\x08\xa8\x6d\x3b\xe2\x97\xcc\x64\xed\x13\x7f\xf6\xc4\xdf\xa7\xd3\xd1\x21\x2e\x6a\xcd\x71\x2e\xb2\xf6\xb9\x3e\x79\x2e\x31\x1e\x5d\x42\x4c\x8c\xc9\x01\xca\x24\x0c\x3c\xc7\x88\x1b\x8b\x71\xd2\x74\xf3\x87\x45\x40\xb5\x92\x46\xab\x12\x95\x83\x15\x37\x92\xcf\x0a\xb4\x03\x90\x73\xb0\xe8\x18\x7c\x2b\xb8\xb0\xb0\xe0\x2b\x84\xca\x48\x6d\xa4\x7b\x06\xbd\x42\x03\xd7\x6a\x45\x78\xcb\xc2\x40\xce\x41\x5b\x76\x83\x0e\xd5\x2a\x8e\xae\xae\x2f\x7e\xdc\xfc\xfb\xf5\xea\x6a\x1c\x25\xf0\x6e\x08\x51\x04\xf0\xe1\x03\xfc\x7f\x57\xf9\xe1\xb0\xab\x2d\x75\x26\xe8\x5b\x8e\x11\x85\xc1\xe6\xa5\x1f\xca\xf4\x80\x9b\x6d\x1b\x5a\x2f\x9f\x3b\x2f\x3b\xc3\x11\x96\x03\x3e\x6e\xc6\xa3\xcb\x7d\x1f\xe4\x62\xdb\x9d\xd6\xc5\xa7\xce\xc5\xce\x70\x84\xe4\x80\x8b\xd1\x3f\xe3\xe9\x1e\xfb\x5b\x12\x98\x97\x8e\x4d\x2a\x23\x95\x9b\xc7\xd1\xf9\xff\x6c\x34\x78\x4d\xe9\x9d\xf9\x36\xdf\x69\x21\xa4\x12\x90\x6b\xda\x0f\xac\xd9\x0c\x85\x16\x02\xfd\x85\xdd\xf9\xdb\x30\x20\x2f\xed\xeb\xa1\x37\x3c\xe0\xd3\x9d\x16\xf3\xd2\x35\x88\x58\x5b\x36\x71\xb9\x5e\xba\xe4\x00\xf2\xb2\xd1\x9a\xb8\x79\x9f\xb0\x9f\xd2\x2d\xe2\xc8\x51\x6c\x84\xb8\xc2\x39\x5f\x16\x6e\x2a\x4b\xb4\x8e\x97\xd5\x8f\xe9\xe5\xdb\x59\x48\xee\xd0\xec\x33\x5d\xfa\x77\x4d\x49\x1b\x34\x25\x12\x47\xa5\x15\xb4\x1d\x16\x58\x14\x9a\x2a\x9e\xe3\x1c\xbb\x74\xf7\x10\x42\xeb\x7c\xf6\x8c\x51\xbb\x19\x2e\x96\x56\x2a\xb4\x76\xbf\x4c\xb6\xd1\x3a\xa8\x66\xac\xae\x6f\xf4\x03\x2f\x11\x58\x2b\x80\x8c\x9e\x36\x9b\x89\x17\xb8\xa6\x7c\x1d\x7c\x08\xad\xfe\x51\x4e\x2d\x3c\xa6\x7c\xd3\x14\x7e\x1a\x5e\x75\x1a\x0a\x4f\xd2\x2d\xa0\xa7\x5d\x0c\x26\x88\xc0\x58\x5f\xcf\xd2\x96\x95\x09\xbd\xe7\xa2\xff\x19\x91\x76\x7e\x5a\xc4\x6e\x01\x5c\xab\xbc\xd2\x52\xb9\xfd\xd4\xe2\x30\xa8\x6b\xc3\x95\x40\x78\x2f\xe1\x7c\xb8\xcb\xeb\x1e\xdd\x42\xe7\x96\x84\x35\x0c\x82\xba\x9e\xea\x3b\xfd\x84\x06\xde\xcb\x36\xe5\x2d\xe1\x10\xec\x2a\x63\xf7\xfc\x11\xeb\xfa\x95\xb5\x17\x48\x5d\xa3\xca\x89\xad\x2d\xb6\xaf\x41\x87\xb3\x6f\xab\x02\x76\x70\x5f\x87\xed\x13\x45\x4e\x41\x6c\xd9\xea\x37\xe7\xf5\x2a\xe2\x73\x52\xdb\x97\x65\xdd\xa6\x73\xa2\x10\xc9\xa0\x97\xe3\xa6\x97\xa3\xc5\x02\x33\x87\xf9\xef\x4a\xf6\x75\xd7\xb7\xc4\xf1\x16\xd5\x16\xf9\x1e\xb3\x05\x57\x32\xe3\xc5\xae\xf1\x68\x4c\x46\x35\x29\xf9\x23\xc6\x64\x06\x34\x46\xd3\x36\xca\xdc\x9a\x0c\xed\xc8\xc0\x2e\x78\xf6\x28\x8c\x5e\xaa\xbc\x3b\x2d\x6e\x95\x43\x63\x96\x95\xdb\xae\xed\x30\x10\x1a\xe8\xa0\x6d\xce\xd8\xe0\x05\x33\xc9\x85\x1f\x5a\x06\xf0\x07\xad\xfd\x66\x82\x61\x0f\xda\xc9\xf9\x73\x9c\x0d\xa0\x1d\x64\xd8\xe4\xf6\xe6\xf6\x61\xba\xf7\x3c\xbd\x1e\xdf\xd3\x37\x3e\xde\x2f\x67\x5e\xf1\xae\x29\xd2\x79\x1c\x79\xbd\xfb\x72\x96\xd1\x02\xef\x82\x6b\x8e\xe8\xe6\xdc\x3b\x10\x59\x2b\x33\xe7\xbf\x52\x2b\xc3\x95\xa5\xb9\x82\xf4\xc1\x1f\x4b\x5e\x1d\x82\x92\xbe\xf4\x47\x78\xbb\x9d\xf1\x7e\xb9\xf6\xfb\xb9\x64\xdf\x7d\x31\xe2\x28\xf5\xf8\x66\x70\x4b\xa3\x41\x03\x6f\x8c\xe6\x1b\x45\xe2\x2d\xec\x56\xe5\xb8\x4e\x4e\x7c\x9a\x95\x79\x21\x15\x1e\x67\xb8\x6c\x00\xa7\x38\xe8\x47\x16\x27\x38\x46\x0d\xe0\x14\x87\x7d\x2e\x67\xba\x38\x4e\x31\xf1\xf6\x53\x0c\xce\xf0\xec\x44\x0c\x53\x32\x27\xbe\xbe\x7d\x75\x6e\x07\x9b\xdd\x54\xd0\x5f\x06\x9e\xea\xce\x77\xf9\xab\xca\x7d\x27\xe2\x1d\x72\x00\x65\x7f\x4d\xf8\xe9\x6a\xdb\xd2\xdf\xb2\x26\x88\xb2\x99\xf6\x3a\xd9\x21\xed\xa3\xb7\x6d\x7e\x71\xe6\xd6\x03\xd8\xee\xc4\x41\x7b\xf0\x24\x47\x92\xec\xce\xf4\x5f\xe6\xd8\x01\x07\xb0\xe8\xa7\xe8\x87\xbe\xdf\x9b\x22\x51\x36\xab\xbe\x50\x03\x52\x07\xfa\x5c\xa1\x6b\x43\x8a\x23\x97\x55\x14\x7a\x37\xec\x50\xe8\x72\xee\x81\xef\x86\xa0\x64\xe1\x3d\x6f\xb3\x41\x63\xe8\xd1\xa0\x5b\x1a\x15\x06\x5e\x1c\x03\x6b\x56\xfd\xfa\xd1\x84\xd4\x9c\xa2\x2f\xca\xe7\x55\x83\x90\x7e\xe4\xed\xf6\x9e\xf1\x3b\xaf\x9a\xb1\x31\x0a\x8a\xc9\xd4\xf5\xc1\x23\x39\xb6\x03\xb0\x66\x75\x74\x85\xf5\x33\xe8\xc2\xb5\xac\x29\x78\xa1\xfa\x65\x1e\x2f\xd5\xbb\xfd\x29\x03\xd7\xd2\x79\x15\xa2\x0f\x93\x70\x13\xfe\x17\x00\x00\xff\xff\xe0\xad\xd9\xe1\xf5\x0d\x00\x00") +var _nameServiceNameServerServer_mainGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xac\x56\x4d\x6f\xdb\x38\x13\x3e\x4b\xbf\x82\x15\xfa\x16\xd2\x0b\x87\xea\x62\xdb\x3d\x04\xf5\xa1\xf9\xa8\x1b\x6c\x9c\x35\x6c\x07\x7b\x5c\xc8\x12\x2d\x73\x23\x91\x02\x49\x3b\x36\x04\xff\xf7\x9d\xa1\x28\x5b\x4e\x6c\x27\x87\x16\x8d\x25\x71\x1e\x3e\xf3\x45\xce\x4c\x95\xa4\x4f\x49\xce\x48\x99\x70\xe1\xfb\xbc\xac\xa4\x32\x24\xf4\xbd\x60\x5e\x24\x79\x80\xcf\xd2\xe0\x43\xb0\xf6\x11\x2f\x8c\xa9\xba\xef\x71\x55\x29\x39\xc7\x15\xa9\x9b\xdf\x58\xf3\x5c\x24\x05\x7e\xe8\x8d\x4e\x93\x02\x5e\x7d\x2f\x8e\xc9\xef\x19\x19\x25\xca\x6c\x40\x90\xcb\x22\x11\x39\x95\x2a\x8f\xd7\x31\x52\xa5\x52\x18\xb6\xb6\x5a\x72\x29\xf3\x82\xd1\x0e\x24\x57\x55\xea\x38\x06\x92\xfc\xc9\x0d\xa2\xb8\x59\x2c\x67\x34\x95\x65\x9c\xcb\x8b\x27\x6e\x62\xfc\x2b\x64\xee\x80\xd3\x05\xd7\x64\xc2\xd4\x8a\xa7\xcc\xf7\x16\x89\xc8\x0a\xa6\x48\x50\xd7\xf4\xce\xba\x39\x4a\xcc\x82\x5c\x6c\xb7\x24\x76\x32\xb0\x1b\xd0\x4c\x81\x09\x7a\x95\x1e\x45\xe6\x4c\x30\x95\x18\x96\x01\xa6\x9a\x59\xc8\xe8\xea\x10\x04\x92\x92\x67\xc0\xf7\x9c\x28\xa6\x8f\xb2\x74\xe4\x81\x1f\xf9\xfe\x7c\x29\x52\x9b\x81\x30\x22\xb5\xef\xad\x12\x85\x29\xf0\x32\x36\x5b\xe6\xdf\xb3\x4c\x11\xfb\xaf\x4f\x30\x27\x74\x62\x14\x17\x79\x18\x58\x29\x4d\x40\x1c\xf4\x48\x70\xf9\xf5\xf3\x1f\x9f\xf1\xe5\x06\x97\x09\x38\x44\x4a\x06\xc8\x54\x93\x82\x6b\xc3\x04\x41\x24\xd3\x3a\x88\x80\x19\xd3\xb6\x27\x7e\xc9\x8c\xd2\x2e\xf1\x57\x4b\xfc\x73\x3a\x1d\x1d\xe3\xc2\xd4\x9c\xe6\x42\x69\x97\xeb\x8b\xe5\xca\xc7\xa3\x6b\x12\x22\x63\x74\x84\x12\xfe\x5b\x0e\x38\x2a\x9a\x85\x51\x93\xcd\x47\xcd\x08\x13\x2b\xae\xa4\x28\x99\x30\x04\x82\xc4\x93\x59\xc1\x74\x8f\xf0\x39\xd1\xcc\x50\xf2\x03\x36\x69\xb2\x48\x56\x8c\x54\x8a\x4b\xc5\xcd\x86\x48\xc8\x27\xb9\x15\x2b\xc4\x6b\xea\x7b\x80\x95\x9a\x0e\x18\xa8\x5c\x85\xc1\xcd\xed\xd5\xe3\xe0\x9f\xef\x37\x37\xe3\x20\x22\x1f\xfa\x24\x08\x08\xf9\xf4\x89\xfc\x7f\x1f\xf9\x7e\xbf\x8d\x2d\x66\xc6\xeb\x4a\x4e\x11\xf9\xde\xf6\xa5\x1e\xf4\xf4\x88\x9a\x5d\x1a\x9c\x96\xaf\xad\x96\xbd\xe0\x04\xcb\x11\x1d\x03\x88\xe9\xa1\x0e\x54\xb1\xcb\x8e\x53\xf1\xa5\x55\xb1\x17\x9c\x20\x39\xa2\x62\xf4\xd7\x78\x7a\xc0\xfe\x1e\x07\xa0\x80\xd0\x09\xe4\x43\x98\x79\x18\x5c\xfe\x4f\x43\xfe\x5f\x51\x5a\x65\x36\xcd\xf7\x32\xcf\xe1\xe0\x90\x4c\xe2\x7d\xa0\xcd\x65\x80\x3b\x9d\x33\xfb\xa0\xf7\xf6\xd5\xf7\x50\x8b\x5b\xee\x5b\xc1\x03\x7b\x06\x19\x28\x6b\x10\x21\xe8\x98\x98\x4c\x2e\x4d\x74\x04\x79\xdd\xd4\x9a\xb0\x59\x8f\xe8\xdf\x50\x4a\xc2\xc0\xa0\x6d\x88\xb8\x61\xf3\x64\x59\x98\x29\x2f\x99\x36\x49\x59\x3d\x4e\xaf\xdf\xcf\x82\xe5\x8e\xa9\x43\xa6\x6b\xbb\xd6\x84\xb4\x41\xa3\x23\x61\x50\xea\x1c\xaf\xc3\x82\x15\x85\xc4\x88\x67\x6c\xce\x5a\x77\x0f\x10\x50\x11\xb3\xd9\x86\x05\xee\x32\x5c\x2d\x35\x17\x70\x5b\x0e\xc3\xa4\x9b\x5a\x47\xaa\x19\xad\xeb\x81\x7c\x48\x4a\x46\xa8\x2b\x80\x14\xbf\xb6\xdb\x89\x2d\x70\x4d\xf8\x5a\x78\x9f\xb8\xfa\x87\x3e\x39\x78\x88\xfe\x82\xa2\x3b\xf1\x2f\x4b\x4d\x5b\x45\x49\xa7\x70\x51\x58\x04\x7a\xda\x2d\x66\xb1\xa3\x84\xca\x7d\xc0\xdf\xdd\xd6\x30\x3a\xc2\xe1\x5e\x10\x3a\xf8\xfe\x28\xdc\x8a\xac\x92\x70\x6c\x0e\x9d\x84\xc2\x58\xd7\x0a\xfa\x02\x23\x1f\x39\xb9\xec\xef\x3d\x1c\x32\xb3\x90\x99\xc6\x12\x0b\xda\xeb\x7a\x2a\xef\xe5\x33\x84\xf3\x23\x77\xce\xef\x08\xfb\x04\xea\x3b\x1d\x26\x4f\xac\xae\x5f\x49\x3b\x86\xd4\x35\x13\x19\xb2\xb9\xb0\xbb\x68\xec\x78\xde\x0a\x07\x73\x40\x6d\x03\xb2\xfb\x42\xab\xd1\x80\x96\x47\xd7\xef\xf6\xe9\x95\xb5\x97\x58\x73\x5f\xc7\xb7\x15\x77\x03\x7c\x26\x22\x51\xaf\xe3\xac\x0b\xff\x90\xa5\x70\x2e\x38\x1c\xe7\x7d\x02\x98\x52\x29\xda\x57\x42\xe8\x42\x14\x13\x58\x91\x78\xb0\x53\xb3\x46\x81\x6b\xe2\xf4\x0a\xc6\x8a\x5c\xc9\xa5\xc8\xc2\x5d\xec\x0c\x60\x97\x95\xd9\x9d\x36\xdf\xcb\x25\xc1\xd6\xd7\x74\x3d\xef\x05\x33\x5e\x60\x3b\x46\xf4\xc8\x6f\x78\x1a\x9b\x99\x82\x3e\x48\xc3\xe7\x9b\x30\xed\x11\x37\x5a\xd0\xc9\xdd\xe0\xee\x61\x7a\xf0\x3d\xbd\x1d\x0f\x71\x8f\xb5\xf7\xdb\x85\xad\x41\xb7\x68\x29\x94\x20\x5b\x81\xbe\x5d\xa4\x78\xd0\x5a\xe3\x9a\xa6\xd9\x74\xa2\x23\x96\xb9\x8b\x7f\xf9\x56\xfd\x80\x14\x6a\xec\xf4\x78\x63\x6d\xa3\xb0\xf7\xd5\x2b\x71\xa7\x6d\xaa\xee\x82\xb1\xe1\x72\x6d\x6f\x58\x49\x7f\xda\x60\x84\x41\x6c\xf1\xcd\x28\x15\xc3\x7e\x0b\x6f\x84\xea\x07\x5a\x62\x25\x90\xdd\x8c\xad\xa3\x33\x5b\xd3\x32\x2b\xa0\x34\x9c\x66\xb8\x6e\x00\xe7\x38\xf0\x87\x17\x67\x38\x46\x0d\xe0\x1c\x87\xde\x94\x33\x59\x9c\xa6\x98\x58\xf9\x39\x06\x88\x66\x7a\xc6\x86\x29\x8a\x23\x1b\xdf\x6e\xbd\x74\xa3\xc6\xbe\x4f\x77\x8f\x81\xa5\xba\xb7\x59\xfe\x2e\x32\x9b\x89\x70\x8f\xec\x91\xb2\x7b\x26\xec\xbc\xb3\x4b\xe9\x2f\x39\x13\x48\xd9\xcc\x5f\x6d\x09\xc0\x1a\x84\xab\xce\xbf\x10\xae\x51\x8f\xec\x0a\x45\xcf\xb5\x82\xe8\x84\x93\x6d\x97\x7d\xd3\xc7\x16\x08\xd1\xec\xba\x68\xc7\xb0\x5f\xeb\x22\x52\x36\xa7\xbe\x10\x3d\xac\x0e\xb8\x1d\xc6\x7b\x67\x12\xa0\xd3\x0a\x4d\x6f\xc7\x0f\x34\x1d\x86\x0c\x04\xc2\x58\x21\x78\x61\x35\xef\xbc\x81\x27\x7e\x2a\x66\x96\x4a\xc0\x1b\xd6\x26\x4f\xab\x55\x37\x7e\x38\xb3\x34\x7d\xed\x45\xf8\x6c\xd5\x40\xa4\x1d\x42\xdb\xbb\xa7\xec\xcd\x83\x1e\x39\x66\x39\xda\xa4\x60\x40\x3f\xd6\x24\x43\x08\x3f\x68\x3a\x79\xc2\xba\x1e\xb4\xe6\x6a\xda\x04\xbc\x10\xdd\x30\x8f\x97\xe2\xc3\x61\xdf\x67\x6b\x6e\x6c\x15\xc2\x8d\x91\xbf\xf5\xff\x0b\x00\x00\xff\xff\x21\xb8\xc5\xb4\x87\x0d\x00\x00") func nameServiceNameServerServer_mainGotemplateBytes() ([]byte, error) { return bindataRead( @@ -113,12 +113,12 @@ func nameServiceNameServerServer_mainGotemplate() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "NAME-service/NAME-server/server_main.gotemplate", size: 3573, mode: os.FileMode(420), modTime: time.Unix(1481779952, 0)} + info := bindataFileInfo{name: "NAME-service/NAME-server/server_main.gotemplate", size: 3463, mode: os.FileMode(436), modTime: time.Unix(1481916361, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _nameServiceGeneratedCliHandlersClient_handlerGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8c\x52\x4d\x8f\xda\x30\x10\x3d\xdb\xbf\x62\x84\x22\x94\x54\x60\xee\x48\x3d\x40\xd5\x22\x0e\xad\x10\xed\x1f\x30\xc9\x90\x58\x4d\x1c\xaf\xe3\xec\x87\x46\xfe\xef\x2b\x1b\x43\x96\xbd\xb0\x97\x64\xf2\xde\x9b\xe7\xf1\x9b\x18\x59\xfe\x97\x35\x42\xd9\x2a\xd4\xae\x91\xba\x6a\xd1\x72\xae\x3a\xd3\x5b\x07\x39\x67\xe6\x04\x33\xa2\x4c\x1c\xb6\xfb\x88\x1d\xa4\x6b\x60\xe9\xfd\x8c\x17\x9c\x13\xc1\x8b\x72\x0d\x64\x0e\x61\xfd\x1d\x84\xf7\x9c\x11\x59\xa9\x6b\x84\x4c\x05\x28\x73\x28\xfe\xa2\x7d\x56\x25\x8a\xdf\xe8\x9a\xbe\x1a\x82\x68\xb5\x02\xa2\x4c\x89\x3f\xb2\x43\xef\x41\x75\xa6\xc5\x0e\xb5\x1b\xe0\x2a\xe6\xec\x3c\xea\xf2\xa3\x2a\x27\x8a\x87\x29\x5d\xe1\x6b\x34\xfe\x11\x87\xde\xd8\x7a\x88\xde\xa1\x80\x9b\x9c\x68\xd7\x87\x0a\xc4\xaf\x51\x97\x4e\xf5\x3a\xf0\x01\x47\x5d\x79\x5f\x40\xfe\xcd\x9c\xc4\x4d\x95\x29\x71\xc4\xa7\x11\x07\xf7\xef\xcd\x60\xf2\x58\x00\x5a\xdb\xdb\x82\x38\x63\xf6\xc2\x86\x4b\x3d\xec\x0b\x7a\xa2\x65\x0a\xa7\x43\xd7\x84\xb6\x2f\x0d\x1e\xb2\xe5\x8c\x4d\x31\x1a\x69\x65\x17\xa3\x0c\x3e\x22\x6a\x93\x26\x9e\xa1\xce\x20\x75\x05\x79\x7c\xe8\xde\xa5\x0e\xb1\x1f\xb6\x72\xc0\x30\x54\x71\x87\x1f\xd1\xa0\x74\x58\x15\xf7\xf0\x4f\x3d\x76\x45\xb2\x65\xd3\xed\x2e\x64\x5a\xd3\x1a\xe6\x9f\x99\x5d\xbf\xb1\xb5\xf7\x8b\xdb\x38\xd8\x0e\x08\x0f\x7d\x1e\xdb\xe8\x6a\x4a\x62\xfa\x48\x54\xac\x7d\x5c\x8a\x1b\xad\x86\x79\x5a\xce\x02\xb4\x6a\x39\x8b\x7f\xe1\x45\x76\x7d\xbf\x07\x00\x00\xff\xff\x50\xcc\x31\x90\xe8\x02\x00\x00") +var _nameServiceGeneratedCliHandlersClient_handlerGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8c\x52\x4d\x6f\xea\x30\x10\x3c\xc7\xbf\x62\x85\x10\x4a\x9e\xc0\xdc\x91\xde\xe1\xf1\xd4\x22\x0e\xad\x10\xed\x1f\x30\xc9\x02\x56\x13\x27\xb5\x9d\x7e\xc8\xf2\x7f\xef\xda\x98\x50\x7a\xa1\x17\xb0\x77\x66\xc7\xb3\xb3\xe9\x44\xf9\x22\x0e\x08\x65\x2d\x51\xd9\xa3\x50\x55\x8d\x9a\x31\xd9\x74\xad\xb6\x90\xb3\xac\xdb\xc1\xc8\xb9\x31\xdf\x2c\xd7\xb1\xb6\x11\xf6\x08\x33\xef\x47\xac\x60\xcc\x39\x78\x97\x74\x1f\x5b\x84\xc5\x5f\xe0\xde\xb3\xcc\x39\x2d\x14\x29\x8e\x65\x28\x11\xc2\x9f\x50\xbf\xc9\x12\xf9\x03\xda\x63\x5b\x99\x40\x9a\xcf\x81\x44\x25\x7f\x14\x0d\x7a\x0f\xf4\x5c\x8d\x0d\x19\x30\x70\x26\xb3\x6c\xdf\xab\xf2\x3b\x2b\x77\x2e\x3e\x26\x55\x85\x1f\x51\xf8\x7f\x34\xfd\x4f\x1f\x4c\xd4\x0e\x07\x18\xe8\xce\xad\xda\x70\x02\x7e\x4f\x42\x56\xb6\x2a\xe0\xa1\x8e\xaa\xf2\xbe\x80\xfc\x4f\xb7\xe3\x03\x8b\xfa\xb6\xf8\xda\xa3\xb1\xcf\x9f\x1d\x26\x8d\x29\xa0\xd6\xad\x2e\x1c\xcb\x32\x7d\x42\xc3\x50\x37\xfb\x02\xdf\xb9\x59\x0a\xa7\x21\x6f\xa1\xed\x57\xc6\x43\xb6\xd4\x7d\x89\xb1\x13\x5a\x34\x31\xca\xa0\xc3\x23\x37\x71\xe2\x1b\x72\x0f\xb4\x35\xc8\xe3\x8f\x6a\x6d\xea\xe0\x6b\xb3\x14\x06\x83\xa9\xe2\xaa\xbe\xc5\x0e\x85\xc5\xaa\xb8\x2e\xdf\xa9\xbe\x29\x92\x6c\x76\x99\xee\x04\xa6\x35\x2d\x60\xf2\x13\x59\xb5\x64\x88\x82\x1a\xec\x60\x6d\x10\x6e\xea\xdc\x96\xa1\x69\x86\x24\x2e\x97\x04\xc5\xb3\x8f\x4b\xb1\xbd\x56\x30\x49\xcb\x99\x82\x92\x35\xcb\xe2\x57\x78\xa2\x9d\xff\xbf\x02\x00\x00\xff\xff\x50\xcc\x31\x90\xe8\x02\x00\x00") func nameServiceGeneratedCliHandlersClient_handlerGotemplateBytes() ([]byte, error) { return bindataRead( @@ -133,12 +133,12 @@ func nameServiceGeneratedCliHandlersClient_handlerGotemplate() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "NAME-service/generated/cli/handlers/client_handler.gotemplate", size: 744, mode: os.FileMode(420), modTime: time.Unix(1479253692, 0)} + info := bindataFileInfo{name: "NAME-service/generated/cli/handlers/client_handler.gotemplate", size: 744, mode: os.FileMode(436), modTime: time.Unix(1478723139, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _nameServiceGeneratedClientGrpcClientGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x7c\x55\x4d\x6f\xe3\x36\x10\x3d\x8b\xbf\x62\x6a\x04\x85\x14\x28\xd4\x3d\x85\x2f\xeb\xdd\x2e\xb6\x68\x52\x23\x1b\xb4\x87\xc5\xa2\xa0\xa9\xb1\x4c\x58\x26\x55\x92\x76\x6c\x08\xfa\xef\xc5\x90\x94\x23\x7b\x93\x3d\x04\x11\x87\x8f\xf3\xf1\x66\xde\xb8\xaa\x60\x29\xe4\x56\x34\x08\x8d\xed\x24\x74\xd6\x1c\x54\x8d\x0e\x04\x34\x4f\xcb\x05\xc8\x56\xa1\xf6\xb0\x36\x16\xfc\x06\xa1\xef\xf9\x57\xb4\x07\x25\x91\x3f\x8a\x1d\x0e\x03\xb8\x74\x64\xdd\xc4\x0d\x63\x6a\xd7\x19\xeb\x21\x67\xd9\xac\x31\xad\xd0\x0d\x37\xb6\xa9\x8e\x95\x46\x5f\x49\xa3\x3d\x1e\xfd\x2c\xdc\x99\xa6\x45\x3e\x81\xd0\xf3\xf7\x6f\xaa\x1d\x7a\x51\x0b\x2f\x02\x44\xf9\xcd\x7e\xc5\xa5\xd9\x55\xdd\xb6\xa9\xd0\x5a\x63\xdd\x8c\x5d\xde\x34\xe6\x6e\xab\x7c\x45\x7f\xa8\xeb\xce\x28\x4d\x81\xc9\x97\xb7\x42\xbb\x90\xe5\x3b\xf8\x33\x20\x25\xc5\xb2\xaa\x82\xe7\x8d\x72\x90\x38\x60\x99\x3b\x48\x98\xf5\x3d\xff\x12\xca\x5d\x0a\xbf\x81\xbb\x61\x80\xaa\x41\x8d\x56\x78\xac\x67\x2c\xeb\x56\x01\xb2\xfc\x70\x09\x9a\xb1\x82\xb1\xaa\x82\x47\x7c\x01\x8b\x7e\x6f\xb5\x03\xa1\x47\x3e\x61\x25\xe4\x16\x6b\x58\x9d\xae\x3a\x21\x8d\xd6\x28\xbd\x32\x9a\xc3\x17\x0f\xca\x51\x5f\xc8\x8f\x45\xd7\x19\xed\xd4\x4a\xb5\xca\x9f\xc0\xac\x43\xc3\xa4\x68\x5b\xb4\xe0\x0d\xd4\x4a\xb4\x25\x08\x5d\x43\x2b\x3c\x5a\x90\xad\x71\x58\x46\xd0\xab\x4f\xb6\xde\x6b\x49\x39\xe5\x64\x84\x5b\xaa\x9c\x2f\x42\xe8\x85\xd1\xba\x04\xd3\x11\xce\x01\xe7\xc9\xfc\x57\x30\x14\x90\x77\x2b\xde\xf7\x9f\x0d\xcd\x05\x5c\x4d\x09\x9d\xd0\x96\x10\x5a\x54\x40\xcf\xb2\x83\xb0\x20\x65\x2a\x6a\x61\xf4\x5a\x35\x8c\x65\x34\x66\xff\x96\xb0\x86\xfb\x39\x58\xa1\x1b\x3c\x87\xeb\x59\x96\xa1\xb5\x74\xb1\xce\x7f\x95\xb2\x60\x59\xa6\xd6\xe4\x10\x7e\x99\x83\x56\x6d\x40\x64\x91\x48\x3a\xa7\x60\x8e\xff\x63\x45\x97\xa3\xb5\x25\xcc\xa4\xd0\xda\x78\x10\x5d\xd7\x9e\x92\xe7\x19\x39\x1a\x58\x36\x30\x96\xc9\x49\x3d\x8e\x22\x7d\xfb\x7e\x31\x27\x17\x05\x53\xb8\xb7\x6e\x3f\xe0\xda\x58\xcc\x29\x99\x34\xe7\x7f\x8b\x76\x8f\xee\xd9\x7c\x7e\x5a\x2e\x1e\xd2\xf8\xe6\x52\xf2\x0d\x8a\x1a\xad\x2b\x8a\x92\xc2\x67\x7d\x7f\x07\x2f\xca\x6f\xe0\xc6\x23\x05\xe7\xc3\xc0\xb2\x89\xb5\xdb\x36\x81\xda\xfb\x39\x21\x78\x52\x6d\xe4\x97\xa2\x11\x32\x72\x76\xa3\x46\xd0\xd8\x85\x07\xf4\x1b\x53\xbb\x08\x0c\xdc\xf7\xfd\xb3\xf9\xd3\xbc\xa0\x85\x1b\x95\x9a\xf4\x29\xc9\x03\x46\x9d\xf0\xd1\x12\x5e\x05\x7e\x29\xcc\xfb\x0f\xe7\x70\xc9\xc8\x23\xbe\x44\x52\xf2\xf8\x96\x18\xd1\x65\xfa\x9e\xf5\xfd\x58\xd3\x30\xf0\xbe\x9f\xe6\x1b\x8d\xb3\x29\x54\x5d\x1b\xdd\x41\xf2\x4f\x5a\x9a\x1a\x89\xd8\x09\xe2\x09\xff\xdb\xa3\xf3\x53\xdc\x47\x7c\x13\x17\x04\x83\x23\x70\x3a\xbf\x37\x8a\x8f\xd7\xcf\xa7\x6e\x4c\xa8\x1f\x46\xec\xc5\xa8\x70\xce\x93\xbd\x38\x53\x96\x17\xc1\x92\x3a\x83\xba\x4e\xdd\x4c\x5f\xe3\x07\x1b\x27\x36\x56\x13\xdf\xba\x9e\x00\xd3\x5e\x5e\x37\x92\xf6\x47\x70\xf7\x43\x0f\xee\x01\xe0\x67\xcd\x2d\x5f\x63\x67\x43\x49\x42\x61\x03\x63\xfe\xd4\xe1\x85\x16\xc1\x79\xbb\x97\x9e\x44\x95\xc6\x14\xbe\x7d\x77\xde\x2a\xdd\x10\xbe\xaa\x60\xaa\x05\xda\x42\x02\x68\x73\x84\x93\xdf\x08\x0f\x3b\x53\xab\xb5\x42\x17\x17\xcc\x79\x77\x91\xce\x43\xb4\x8b\xf7\xf4\x34\xbf\x9d\x26\x50\x44\xf9\xb2\xb8\x8f\x16\xfe\x38\xaa\xe8\x2b\xea\x3a\xdf\xe2\x29\x6c\xa0\x98\x51\x71\xe9\xac\x3f\x93\x1a\xdc\x1a\x78\xcb\x71\x58\x17\x66\xd4\x20\xcc\x81\x5c\xb2\xe9\x02\x21\x51\x0e\x29\xfe\xcf\x94\x1c\x72\x19\xc9\x29\xae\x14\x90\x66\xf1\x77\x72\x72\x95\x97\xf4\xc7\xd1\x2f\x5f\xc4\xff\x25\xec\x6a\xb8\x1d\x7f\xe2\xf8\xc3\xc7\xe2\x1a\x11\xd2\x26\xfd\x76\x42\x4d\x7b\x92\x8d\xab\x73\xfb\xba\x3a\x43\x62\x41\xb5\x6a\x0d\x87\x12\x4c\xb8\x93\xfe\xc8\x43\x1d\xf9\xb6\xe0\x79\xca\xfa\x37\xba\x8c\x02\x8f\x8e\xe7\xb4\x24\x89\xe9\x70\x2c\x61\x5b\xc2\x21\x4c\xf4\x10\xd6\x65\x5c\xbe\x11\x3a\x5d\xbf\xb7\xbb\x1a\xe6\x70\x2e\xe0\x0f\xa3\x74\x7e\xbb\xab\xcb\x57\xd3\x92\xde\x44\xaf\x9c\xf3\xa2\x18\xdd\x25\x66\xa4\x3f\x46\xde\xff\x0f\x00\x00\xff\xff\xe3\x54\x2c\xcd\x98\x08\x00\x00") +var _nameServiceGeneratedClientGrpcClientGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x7c\x55\xdf\x6f\xdb\x36\x10\x7e\x96\xfe\x8a\x9b\x11\x0c\x52\xa0\x50\xef\x1d\xfc\x52\x77\x2b\x3a\xac\x9d\xd1\x06\xdb\xc3\x30\x0c\x34\x45\xcb\x84\x65\x52\xa3\x68\x27\x86\xa0\xff\x7d\x77\xfc\xe1\xc8\x5e\xd2\xa2\x41\xc4\xe3\xc7\xfb\xf1\xdd\x7d\x97\xba\x86\x35\x17\x7b\xde\x4a\x68\x6d\x2f\xa0\xb7\xe6\xa4\x1a\x39\x00\x87\xf6\xeb\x7a\x05\xa2\x53\x52\x3b\xd8\x1a\x0b\x6e\x27\x61\x1c\xd9\x37\x69\x4f\x4a\x48\xf6\x85\x1f\xe4\x34\xc1\x10\x8f\x79\x3f\x73\x93\xe7\xea\xd0\x1b\xeb\xa0\xc8\xb3\x45\x6b\x3a\xae\x5b\x66\x6c\x5b\x3f\xd7\x5a\xba\x5a\x18\xed\xe4\xb3\x5b\xf8\x3b\xd3\x76\x92\xcd\x20\xf4\xfc\xed\x9b\xfa\x20\x1d\x6f\xb8\xe3\x1e\xa2\xdc\xee\xb8\x61\xc2\x1c\xea\x7e\xdf\xd6\xd2\x5a\x63\x87\x45\x7e\x7d\xd3\x9a\x87\xbd\x72\x35\xfd\x48\xdd\xf4\x46\x69\x0a\x4c\xbe\x9c\xe5\x7a\xf0\x59\xbe\x81\xbf\x00\x62\x52\x79\x86\x6c\x3d\xee\xd4\x00\x91\x83\x3c\x1b\x4e\x02\x16\x48\xca\x27\x5f\xee\x9a\xbb\x1d\x3c\x20\x29\x75\x2b\xb5\xb4\xdc\xc9\x06\x63\xf5\x1b\x0f\x59\xbf\xbf\x06\x2d\xf2\x32\xcf\xd1\xe1\x17\xf9\x04\x56\xba\xa3\xd5\x48\xba\x4e\x7c\xc2\x06\xe9\x94\x0d\x6c\xce\x37\x9d\x40\xf2\xb4\x14\x4e\x19\xcd\xe0\x93\x03\x4c\x06\xfb\x42\x7e\xac\xc4\x5c\xf5\xa0\x36\xaa\x53\xee\x0c\x66\xeb\x1b\x26\x78\xd7\x49\xec\x9d\x81\x46\xf1\xae\xc2\x08\x0d\x74\x98\x98\x45\x7f\x66\x90\x55\x00\xbd\xf8\xcc\xb7\x47\x2d\x28\xa7\x82\x8c\x70\x4f\x95\xb3\x95\x0f\xbd\x42\x43\x05\xa6\x27\xdc\x00\x8c\x45\xf3\xef\xde\x50\x42\xd1\x6f\xd8\x38\x7e\x34\x34\x17\x70\x33\x25\x74\x92\xb6\x02\xdf\xa2\x12\xc6\x3c\x3b\x71\xcc\x40\xc4\xa2\xd0\xf3\x56\xb5\xc8\x2f\x8d\xd9\x3f\x15\x6c\xe1\xdd\x12\x90\x7c\x9c\xa6\x14\x0e\x9f\x64\xf8\x9a\x2e\xb6\xc5\x8f\x42\x94\x78\x56\x5b\x72\x08\x3f\x2c\x41\xab\xce\x23\xb2\x40\x24\x9d\x63\xb0\x81\xfd\x69\x79\x5f\xe0\x77\x05\x0b\xc1\xb5\x36\x0e\x78\xdf\x77\xe7\xe8\x79\x41\x8e\xa6\x1c\xff\xe7\x99\x98\xd5\x33\x50\xa4\xbf\xfe\xbe\x9a\x93\xab\x82\x29\xdc\x6b\xb7\xef\x25\x16\x21\x0b\x4a\x26\xce\xf9\x1f\xbc\x3b\xca\xe1\xd1\x7c\xc4\x2e\x7e\x8e\xe3\x5b\x08\xc1\x76\x92\x37\xd2\x0e\x65\x59\x51\xf8\x6c\x1c\x1f\xe0\x09\xe7\x10\xee\x9c\xa4\xe0\x6c\x42\xe3\xcc\x8a\x23\xee\xa9\xc5\x2b\x44\xb0\xa8\xda\xc0\x2f\x45\x23\x64\xe0\xec\x4e\x25\x50\xea\x02\x86\xdd\x99\x66\x08\x40\xcf\xfd\x38\x3e\x9a\xdf\xcc\x13\xce\xc1\x9d\x8a\x4d\xfa\x39\xca\x03\x92\x4e\x58\xb2\xf8\x57\x9e\x5f\x0a\xf3\xf6\xc3\x25\x5c\x33\x82\x63\x14\x48\x29\xc2\x5b\x62\x44\x57\xf1\x1b\x35\x91\x6a\x9a\x26\x9c\x9c\x79\xbe\xc1\xb8\x98\x43\xd5\xad\x11\xa5\x87\x09\x0a\xd3\x48\x22\x76\x86\xf8\x2a\xff\x45\xbe\xdd\x1c\xf7\x41\xbe\x8a\xf3\x82\x91\x09\x38\x9f\x5f\x04\xa5\xeb\xc7\x73\x9f\x12\x1a\xa7\x84\xbd\x1a\x15\x94\x42\xb4\x97\x17\xca\x8a\xd2\x5b\x62\x67\x90\xd1\xd8\xcd\xf8\x95\x3e\xf2\x34\xb1\xa1\x9a\xf0\x76\x18\x09\x30\xef\xe5\x6d\x23\x69\x7f\x78\x77\xff\xeb\xc1\x3b\xc0\x7f\xdf\xe9\x51\xf5\x12\x3b\x9b\x2a\x12\x4a\x8e\x59\x38\xac\xf1\x4a\x8b\x30\x38\x7b\x14\x8e\x44\x15\xc7\x14\xc5\x80\x36\xa5\x5b\xc2\xe3\xba\x99\x6b\x81\xb6\x10\x07\xda\x1c\xfe\xe4\x76\xdc\xc1\xc1\x34\x6a\xab\xe4\x10\x16\xcc\x65\x77\x91\xce\x7d\xb4\xab\xf7\xf4\xb4\xb8\x9f\x27\x50\x06\xf9\xe6\x61\x1f\xad\xdc\x73\x52\xd1\x37\x4c\xbe\xd8\xcb\xb3\xdf\x40\x21\xa3\xf2\xda\xd9\x78\x21\xd5\xbb\x35\xf0\x9a\x63\xbf\x2e\x4c\xd2\x20\x4e\x2e\xb9\xcc\xe7\x0b\x84\x44\x39\xc5\xf8\xdf\x53\xb2\xcf\x25\x91\x53\xde\x28\x20\xce\xe2\x2f\xe4\xe4\x26\x2f\xe1\x9e\x93\x5f\xb6\x0a\xbf\x2b\x38\x34\x70\x9f\xfe\xc4\xb1\xcf\x1f\xca\x5b\x84\x4f\x9b\xf4\xdb\x73\x35\xef\x49\x96\x56\xe7\xfe\x65\x75\xfa\xc4\xbc\x6a\x71\x51\x9e\x70\x73\xfb\x3b\x0c\xcb\x7c\x1d\xc5\xbe\x64\x45\xcc\xfa\x27\xba\x0c\x02\x0f\x8e\x97\xb4\x24\x89\x69\x7f\x44\xb7\x15\x9c\xfc\x44\x4f\x7e\x5d\x86\xe5\x1b\xa0\xf3\xf5\x7b\x8f\xf9\x2f\xe1\x52\xc0\xaf\x38\x71\x05\xda\xaa\x17\xd3\x9a\xde\x04\xaf\xd8\xbf\xb2\x4c\xee\x22\x33\x98\x5d\xe0\xfd\xbf\x00\x00\x00\xff\xff\xe3\x54\x2c\xcd\x98\x08\x00\x00") func nameServiceGeneratedClientGrpcClientGotemplateBytes() ([]byte, error) { return bindataRead( @@ -153,12 +153,12 @@ func nameServiceGeneratedClientGrpcClientGotemplate() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "NAME-service/generated/client/grpc/client.gotemplate", size: 2200, mode: os.FileMode(420), modTime: time.Unix(1481583945, 0)} + info := bindataFileInfo{name: "NAME-service/generated/client/grpc/client.gotemplate", size: 2200, mode: os.FileMode(436), modTime: time.Unix(1481916361, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _nameServiceGeneratedClientHttpClientGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x2c\xcb\xb1\x0d\xc2\x30\x10\x05\xd0\x3e\x53\x5c\x1d\x09\xdf\x10\x34\x29\x91\xc8\x02\x56\xf8\x98\x88\xc3\x67\x9d\x3f\x95\xe5\xdd\x69\x18\xe0\x8d\xa1\xab\xdc\x01\x29\x7e\x61\x7c\x7b\xd7\x82\x5a\xfc\x7d\x52\x5f\x64\x63\xe4\xda\x9b\x07\x95\xf8\x34\xcb\x44\x2a\x2e\x4f\x0f\x39\xfc\x01\x59\x75\xce\x65\x8c\x23\x9b\x49\xda\xf6\xfd\xb6\xc1\x1a\x22\x5d\xed\x44\xe5\xfe\x27\x92\xe6\x5c\x7e\x01\x00\x00\xff\xff\x0b\x3c\x4c\x9e\x69\x00\x00\x00") +var _nameServiceGeneratedClientHttpClientGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x2c\xcb\x31\x0e\xc2\x30\x0c\x05\xd0\x9d\x53\x78\xae\x44\x7c\x08\x96\x8e\x48\xe4\x02\x51\xf9\x84\x0a\x13\x47\xce\x67\x8a\x7a\x77\x18\xd8\xdf\x9b\x53\x17\xb9\x01\x52\xfd\xcc\xf8\x8c\xa1\x15\xad\xfa\x6b\xa7\x3e\xc9\xce\x28\x6d\x74\x0f\x2a\xf1\xee\x56\x88\x54\x5d\x1e\x1e\xb2\xf9\x1d\xb2\xe8\x71\x9c\xe6\xdc\x8a\x99\xa4\x35\xe7\xeb\x0a\xeb\x88\x74\xb1\x1d\x8d\xf9\x5f\x24\xfd\xd4\x37\x00\x00\xff\xff\x0b\x3c\x4c\x9e\x69\x00\x00\x00") func nameServiceGeneratedClientHttpClientGotemplateBytes() ([]byte, error) { return bindataRead( @@ -173,12 +173,12 @@ func nameServiceGeneratedClientHttpClientGotemplate() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "NAME-service/generated/client/http/client.gotemplate", size: 105, mode: os.FileMode(420), modTime: time.Unix(1479253692, 0)} + info := bindataFileInfo{name: "NAME-service/generated/client/http/client.gotemplate", size: 105, mode: os.FileMode(436), modTime: time.Unix(1477930115, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _nameServiceGeneratedEndpointsGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8c\x55\xdd\x6e\xdc\x38\x0f\xbd\x1e\x3f\x05\xbf\x20\x40\x67\x3e\x4c\x34\xf7\x0b\xf4\x66\x8b\xfd\xc9\x45\x8b\x62\xdb\x17\xd0\xc8\xf4\x98\x88\x2c\xa9\x12\x3d\xc9\xac\xe1\x77\x5f\x50\xb2\x1d\x67\x63\x2c\x7a\x11\x38\x43\x53\x87\x87\xe7\x90\x72\xd0\xe6\x49\x5f\x10\xd2\xd5\x54\xd5\xe9\x04\xdf\x5b\x4a\xd0\x90\x45\x30\xde\xb1\x26\x97\xa0\x43\x6e\x7d\x9d\x80\x3d\x74\xfa\x09\x81\x5c\x4d\x57\xaa\x7b\x6d\x01\x5d\x1d\x3c\x39\x4e\xd0\x44\xdf\x41\xc2\x78\x25\x83\xe9\x28\x48\x11\x7f\xf4\x98\x18\xb4\xab\x21\x62\x0a\xde\x25\x04\xbe\x05\xcc\x48\x92\x8a\xc0\xad\x4f\xf8\x8a\x72\x04\x9d\xe0\x19\xad\x95\x27\x3a\xe3\x6b\x8c\x49\x00\x04\xaf\xc6\xe9\x77\xe3\xe3\x74\x30\xa3\x1d\x73\x40\x5b\x0b\xbe\x01\xdf\x47\x48\x7d\x08\x3e\x32\xd6\xc0\x51\xbb\x24\xff\x4b\x39\xd2\x96\xfe\xd6\x4c\xde\x09\x5a\xe3\x63\xa7\x39\x29\x78\x64\xd0\x36\x79\x20\x67\x6c\x5f\x63\x5a\xd8\x40\x47\x75\x6d\xf1\x59\x47\x4c\xaa\xaa\xa8\xcb\x40\xfb\x6a\x77\x77\xf1\x56\xbb\x8b\xf2\xf1\x72\x7a\x39\x39\xe4\x93\x48\x85\x2f\x7c\x57\xc9\x4b\xe2\xb6\x3f\x2b\xe3\xbb\xd3\xc5\x3f\x3c\x11\x9f\xe4\x6f\x06\x95\x94\x70\x86\xbb\x61\x50\x5f\x7f\x7d\xcc\x90\x5f\x35\xb7\xf0\x30\x8e\x77\xd5\x21\x3b\xf0\xdb\xa2\xa9\xf1\xd6\xa2\xe1\x34\x37\xc7\xed\x4a\x2b\xe0\x56\x33\x18\xdf\x05\x51\x42\x3b\xd0\x75\x3d\x1b\x20\x5d\x7d\x48\x02\xd6\xa1\x76\x2c\x7a\x9f\x11\xfa\x84\xb5\x08\xab\xa1\x45\x1b\x30\x42\xe2\xd8\x1b\x3e\xca\xeb\xa9\xd4\x76\x25\x72\xec\x41\x0b\x5c\x22\x77\xb1\x08\x41\x47\xdd\x21\x63\x54\xd5\xe9\x24\xf1\x47\x07\xba\x58\x1a\x8f\x40\xfc\x21\x49\xb1\xa6\xb7\xd9\x9a\xa6\x77\x46\x64\x9f\x28\x3b\x14\x67\x3c\xf8\x80\x51\x33\x82\x97\xb3\x01\xe3\xc3\x5c\x50\x00\xcf\x3a\x51\x52\xf0\xbb\x8f\x80\x2f\xba\x0b\x16\x8f\x70\xf3\x3d\x74\x74\x69\x19\x82\x4e\x32\x16\x2b\xa9\x84\xe0\x52\xa8\xd4\x09\xd1\xd7\xbd\xc1\x2c\x83\x76\xd0\x32\x07\xf5\xa7\x76\xb5\x15\x8e\xcf\xc4\x2d\xa0\x36\xed\x34\xdd\xb0\x9f\xab\x1f\xe0\x99\x22\xd6\xd0\x87\x02\x9a\x02\x1a\x6a\xc8\x40\xd0\xdc\x2a\xd8\x3f\x66\x7e\x94\x04\xff\xac\xcf\xf6\x06\x1a\x3a\x4a\x5c\x36\x03\x6a\x4c\x74\x71\x72\x94\xdc\xd5\x3f\x61\x96\xf2\x5b\xb1\x65\xd9\xa4\x4c\x11\xdf\x9a\x5d\xcc\x10\x88\x59\x49\x75\x58\xab\x6b\x2c\xa1\xe3\xb7\xea\xae\x8c\x7b\x5d\x4a\x7b\x93\xd5\x2d\x70\x58\xff\x97\x8d\xb2\x3e\x45\x2b\x12\x85\x3b\x2c\x63\xf5\xca\x97\x1c\x63\x6c\xb4\x0c\xd4\xb6\x13\x02\xb6\x14\xdb\xbe\x18\x7a\x29\xf6\xba\x89\xa7\xec\xc3\x17\x7c\xfe\x34\xf5\x63\x7c\x77\x26\x97\x75\xea\xb2\xb2\x99\xe5\xca\xdb\xe3\x74\x83\x70\x1f\x1d\x50\x1e\x66\xe1\x68\xb4\xb5\x18\xcb\x3c\x4f\x7c\x55\x95\x3b\x7a\xa7\xe9\x50\x0d\x43\xd4\xee\x82\x70\x4f\xf0\xcb\x47\x50\x73\xfe\xe7\xe2\xc7\x38\x56\xbb\x61\xb8\x27\xf5\x45\x77\x38\x8e\xf3\x79\x00\x58\xfa\x50\x73\xb0\x1a\x86\x07\x89\x8e\x63\x35\xbe\x5d\xd7\x9f\x28\x22\x03\x0a\xfb\x15\xc3\x03\xac\xea\xee\x0d\xbf\xc0\x74\x95\xa8\x4f\xe5\x79\x94\x81\xf8\x7f\x38\xab\x61\xf8\xc3\x4b\x1a\xdc\x93\xfa\xab\xdc\xac\xdf\x6f\x01\xa7\xa3\x07\xd8\xbf\x4f\x2a\x57\xee\x2a\xeb\x08\x18\xa3\x8f\x07\x18\xaa\xdd\x6e\xbe\x92\x73\x50\x08\xa3\xda\xd0\x40\x38\x09\x87\x43\xb5\xdb\x51\x93\x53\xff\xf7\x11\x1c\xd9\x8c\xb1\x9b\x5c\x71\x64\x33\x4c\xb5\xdb\x8d\xd5\x12\x9d\x2b\xa8\x9f\xe1\x76\x38\x0a\x4a\xb5\x1b\xab\x61\x28\xf2\x8a\xb8\x9f\x65\xab\xd6\x0a\xe7\xbd\xbd\x67\xcc\x0a\x17\xdf\xd6\xa2\xdf\x33\x6e\xe9\x5e\x84\x17\xb0\xad\x16\x13\x64\x7a\xeb\xb3\x25\xe3\x5b\x5e\xc3\xc3\xfb\x21\x78\xd3\xbc\x60\x6f\x5b\x37\x7f\x01\x97\x35\x1a\xc4\xa8\xe5\x5b\xb8\x0a\x17\x13\x56\xee\x08\xfa\x0f\xe9\x68\xc2\xd8\xd2\xf0\xdd\x10\xe4\x73\xd7\xc5\xd0\xa4\xfe\x35\x5c\x99\x51\xc9\xda\xf0\x72\xcb\xcd\xe2\xe7\xf2\xe6\x3a\x99\x54\xc2\x59\xfd\xe2\xd5\xfc\xfc\x27\x00\x00\xff\xff\x5a\xa4\x38\xcd\x4e\x08\x00\x00") +var _nameServiceGeneratedEndpointsGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8c\x55\x5f\x6f\xdc\x36\x0c\x7f\x3e\x7f\x0a\x2e\x08\xb0\xbb\xc1\xd1\xbd\x0f\xe8\xcb\x8a\xfd\xc9\x43\x8b\x62\xed\x17\xd0\xc9\xb4\x2d\x44\x96\x5c\x49\xbe\x24\x33\xfc\xdd\x47\x4a\xb6\xe3\xec\x8c\xa1\x05\x1a\xdb\x14\xf9\x23\xf9\xfb\x91\xba\x5e\xaa\x27\xd9\x20\x84\xab\x2a\x8a\xf3\x19\xbe\xb5\x3a\x40\xad\x0d\x82\x72\x36\x4a\x6d\x03\x74\x18\x5b\x57\x05\x88\x0e\x3a\xf9\x84\xa0\x6d\xa5\xaf\xba\x1a\xa4\x01\xb4\x55\xef\xb4\x8d\x14\xe2\x5d\x07\x01\xfd\x55\x2b\x0c\x25\x23\x79\xfc\x3e\x60\x88\x20\x6d\x45\xef\xa1\x77\x36\x20\xc4\xd7\x1e\x13\x12\xbb\xd2\x67\xeb\xc8\xb8\xa2\x94\x20\x03\x3c\xa3\x31\xfc\x44\xab\x5c\x85\x3e\x30\x00\xe3\x55\x38\x7f\xd7\xce\xcf\x81\x09\xad\x4c\x06\x49\x41\xae\x06\x37\x78\x08\x43\xdf\x3b\x1f\xb1\x82\xe8\xa5\x0d\xfc\xce\xe9\xb4\x34\xfa\x1f\x19\xb5\xb3\x8c\x46\x31\x9d\x8c\x41\xc0\x23\x55\x68\x82\xa3\xae\x94\x19\x2a\x0c\x6b\x35\xd0\xe9\xaa\x32\xf8\x2c\xa9\x78\x51\x14\xba\x4b\x40\xc7\xe2\x70\xd7\x38\x23\x6d\x23\x9c\x6f\xce\x2f\x67\x8b\xf1\xcc\x54\xe1\x4b\xbc\x2b\xf8\x50\xc7\x76\xb8\x08\xe5\xba\x73\xe3\x1e\x9e\x74\x3c\xf3\xff\x05\x94\x5d\xfa\x0b\xdc\x8d\xa3\xf8\xf2\xdb\x63\x82\xfc\x22\x63\x0b\x0f\xd3\x74\x57\x9c\x92\x02\xbf\xaf\x9c\x2a\x67\x0c\x2a\x7a\x99\x9b\x8b\xed\x86\x2b\xfa\x92\x91\x5c\x08\x83\x98\x90\x16\x64\x55\x2d\x02\x70\x57\x3f\x07\x06\xeb\x50\x52\x27\xc4\xf7\x05\x61\x08\x44\x09\x11\x2b\xa1\x45\xd3\x23\x11\x15\xfd\xa0\x62\xc9\xc7\x73\xaa\xfd\x4c\xf4\xc7\x81\x64\xb8\xa0\x6d\x43\xa3\xd1\x4b\x2f\x69\x2a\xd0\x0b\x32\xb2\xfd\x91\xd2\x67\x49\x7d\x09\x9a\x72\x73\xb2\x7a\x30\x49\x9a\x7a\xb0\x8a\x69\x9f\x4b\xb6\xc8\xca\x38\x70\x54\x82\x8c\x08\x8e\x63\xe9\xfd\x61\x49\xc8\x80\x17\x19\x34\x89\xf3\x07\x85\xe3\x8b\xec\x7a\x83\x25\xbc\xba\x81\x34\x69\xda\x48\xf9\x03\x8f\xc5\x86\x2a\x2e\x70\x4d\x94\xf3\xf4\xde\x55\x03\x0d\x23\xc3\x91\x6f\x1b\x63\x2f\xfe\xa2\x59\x32\x5c\xe3\x33\xa9\x04\x28\x55\x3b\x4f\x37\x1c\x97\xec\x27\x3a\xf3\x54\xe1\xd0\x67\xd0\xd0\xa3\xd2\xb5\x56\x94\x34\xb6\x02\x8e\x8f\xa9\x3e\x5a\x12\xc2\xbf\xc8\x8b\x79\x25\x9f\x4e\x87\x98\x37\x83\xa6\x34\xe8\xc6\x72\xa8\xb6\x57\xf7\x84\x89\xca\xaf\x59\x96\x75\x93\x52\x89\xf8\x5e\xec\x2c\x06\x43\x2c\x4c\x8a\xd3\x96\x5d\x65\x34\xda\xf8\x9e\xdd\x8d\x70\x6f\x4b\x49\x15\xd1\x3c\x66\x38\xea\xe3\x7f\x64\xe4\xf5\xc9\x5c\x69\x66\xb8\xc3\x3c\x56\x6f\xf5\x52\x04\xfa\x5a\xf2\x40\xed\x2b\xc1\x60\x6b\xb2\xfd\x8b\x61\xe0\x64\x6f\x9b\x78\x4e\x3a\x7c\xc6\xe7\x8f\x73\x3f\x34\xc1\x17\x6d\x13\x4f\x5d\x62\x36\x55\xb9\xd1\xb6\x9c\x6f\x90\x38\x78\x4b\xdd\x73\xd3\x5c\xa3\xa2\x4e\x69\x86\xd3\x3c\xcf\xf5\x8a\x22\x75\x74\xc3\xe9\x58\x8c\x23\xe5\xa7\x5b\xee\x5e\xc3\xaf\x1f\x40\x2c\xfe\x9f\xb2\x1e\xd3\x54\x1c\xc6\xf1\x5e\x8b\xcf\x34\xd5\xd3\xb4\xc4\x03\xfd\x5b\xfa\x10\x8b\x91\xa0\x1e\xd8\x4a\x31\xd3\xfb\x75\xfd\x81\x24\x3c\xa0\x34\x69\x6f\x31\x27\xd8\xe4\x3d\xaa\xf8\x02\xf3\x55\x22\x3e\xe6\x67\xc9\x03\xf1\x4b\x7f\x11\xe3\xf8\xa7\x63\x37\x42\x17\x7f\xe7\x9b\xf5\x1b\x35\x3b\x87\x9e\xe0\x78\xeb\x94\xaf\xdc\x8d\x57\x09\xe8\xbd\xf3\x94\xb4\x38\x1c\x96\x2b\x39\x19\xb9\x60\x14\x3b\x1c\x70\x4d\x5c\xc3\x89\x22\x74\x9d\x5c\x7f\xfa\x00\x56\x9b\x84\x71\x98\x55\xa1\xef\x04\x43\xa6\xa9\x58\xad\x4b\x06\xf1\x23\xb5\x9d\x4a\x46\x29\x28\x7e\x1c\x33\xbd\x4c\xee\x27\xde\xaa\x2d\xc3\x69\x6f\xef\xe9\xd6\x60\x86\xb3\x6e\x5b\xd2\xe9\x64\x8f\xf7\x4c\x3c\x83\xed\xb5\x48\xab\xcc\xe5\x6d\x63\xb3\xc7\xd7\xb4\x86\xa7\xdb\x21\x78\xd7\x3c\x63\xef\x4b\xb7\xfc\x02\xae\x6b\x34\xb2\x50\xeb\x6f\xe1\xc6\x9c\x45\xd8\xa8\xc3\xe8\xdf\xb9\xa3\x19\x63\x8f\xc3\x9b\x21\x48\x71\xd7\x55\xd0\x20\xfe\x33\x5c\xa9\xa2\xec\xb5\xa3\xe5\x9e\x9a\x59\xcf\xf5\xe4\x3a\x8b\x94\xcd\x89\xfd\xac\xd5\xf2\xfc\x37\x00\x00\xff\xff\x5a\xa4\x38\xcd\x4e\x08\x00\x00") func nameServiceGeneratedEndpointsGotemplateBytes() ([]byte, error) { return bindataRead( @@ -193,12 +193,12 @@ func nameServiceGeneratedEndpointsGotemplate() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "NAME-service/generated/endpoints.gotemplate", size: 2126, mode: os.FileMode(420), modTime: time.Unix(1479253692, 0)} + info := bindataFileInfo{name: "NAME-service/generated/endpoints.gotemplate", size: 2126, mode: os.FileMode(436), modTime: time.Unix(1478128977, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _nameServiceGeneratedTransport_grpcGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xa4\x57\x4f\x6f\xe3\xb6\x13\x3d\x8b\x9f\x62\x7e\x46\xf0\x83\x1d\x38\x52\xcf\x01\x72\xd9\xec\x76\xb3\x68\xb3\x0d\xd2\xa0\x3d\x2c\x16\x0b\x5a\x1a\x4b\x84\x29\x52\x21\x69\x27\xae\xa0\xef\x5e\x0c\x29\xc9\x4a\xec\xc8\xde\xe6\x10\x38\x16\xe7\xcf\x9b\xf7\x66\x46\x74\xc5\xd3\x15\xcf\x11\xec\x26\x65\x2c\x49\xe0\xa1\x10\x16\x96\x42\x22\x54\x46\x6f\x44\x86\x16\x2c\x9a\x0d\x9a\x0b\x2b\x32\x84\x85\x50\x99\x50\xb9\x85\xa5\x36\xe0\x0a\x84\xfc\xfe\xee\x1a\x9c\xe1\xca\x56\xda\xb8\x98\x42\x7c\x71\xb0\x76\x42\x8a\x7f\xd0\x7a\x93\xfe\x34\xc9\x4d\x95\xc6\x7f\xfa\x70\x31\x63\xa2\xa4\x87\x30\x65\xd1\x44\xa1\x4b\x0a\xe7\xaa\x09\x63\xd1\x24\xd7\x92\xab\x3c\xd6\x26\x4f\x9e\x13\x3a\x49\xb5\x72\xf8\xec\x26\xfe\x4c\xe7\x12\xe3\x81\x09\xc5\x4c\x4a\x74\x3c\xe3\x8e\x93\x3f\x3d\xe8\x53\xc2\x24\x17\xae\x58\x2f\xe2\x54\x97\x49\xae\x2f\x56\xc2\x25\xf4\xf7\x12\x13\xb9\x75\xb5\x13\x3c\x91\x22\x8b\xaa\x05\x4c\xea\x3a\xbe\xfb\xf0\xc5\xe3\xbc\xe3\xae\x80\x8b\xa6\x99\xb0\x19\xf3\x4c\xdd\xf2\x15\x7e\xbe\xbf\xbb\x0e\xf5\x40\xc9\x57\x68\x81\x83\x45\x07\x7a\x09\xa8\xb2\x4a\x0b\xe5\x2c\xf0\x0d\x17\x92\x2f\x24\x02\xa7\x73\x4f\x58\x5d\x7f\xd6\x5f\x79\x89\x10\xb7\xe9\x62\xfa\xd6\x34\x1d\x37\xcb\xb5\x4a\x5f\x25\x98\xa6\xee\x19\x5a\x26\xe2\xeb\xf0\x39\x1f\xa4\xf9\xd4\xfd\x37\x83\x6a\x11\x8f\x27\x80\x9a\x45\x41\xd5\x3f\x2a\x27\xb4\xb2\x70\x79\x05\xdf\xbe\xbf\x60\xae\xd5\x29\x18\xd4\x2c\x8a\xe0\xd0\xf1\x07\x5c\x6a\x83\xd3\x8e\xff\x07\xdd\x22\x9b\xcd\x59\xd4\xb0\xc8\xa0\x5b\x1b\x05\xff\x27\xd7\xe0\x50\x7b\xa6\xeb\x1a\x1e\xf4\xef\xfa\x09\xcd\x4b\x80\xd0\x34\x2c\xaa\x6b\xc3\x55\x8e\x70\x26\x08\x56\x7f\x7e\x8b\xae\xd0\x99\x25\x8b\xa8\xae\x3b\xf7\x33\xd1\x56\x76\xf9\x0a\xdf\x57\x7c\x6a\x89\x63\x51\x14\xa5\xee\x79\x4e\x9f\x3d\x5f\x71\x5d\xf7\xae\x1d\x75\xde\xe2\x23\xa6\x3a\xf3\xbc\x0f\x2c\xee\xf1\x71\x8d\x36\x18\x7c\x52\x07\x0d\x6c\xa5\x95\x45\x6f\xf1\x82\xda\x38\x8e\xe9\x21\x11\x52\xd7\x17\x24\x18\x55\xd0\xb0\xc6\x37\xd1\x8e\x18\x10\x65\x25\xb1\x44\xd2\x92\xa6\xe6\x88\x82\x42\x39\x34\x4b\x9e\x22\x73\xdb\x0a\x87\x71\xac\x33\xeb\xd4\x41\xcd\x8e\xf3\x78\x80\x46\x80\x57\x3c\xde\x70\x95\x49\x34\x6c\x07\x3e\x20\x6f\xc3\xf8\x45\x30\xc8\xee\xf4\xae\x90\xd3\x6b\x38\x0a\xd5\x0f\xc4\xd4\xc2\xf9\x2e\xd5\x6c\x17\xbe\x47\x7f\x78\x48\x0c\x3e\xc2\xf9\x70\x28\xce\x44\xdc\x2a\xfa\xb0\xad\x3a\x50\x33\x98\xee\x1b\x05\x55\x07\x56\x73\x40\x63\x34\x25\x67\xd1\x0f\x0a\x5d\xf9\x27\x04\x9b\x7a\x6a\x8f\xcf\x30\x27\xd4\x2d\x84\xcd\x63\x99\xb1\x48\x2c\xbd\xd3\xff\xae\x40\x09\x49\xa1\xba\x49\x51\x42\xfa\x78\xc3\xe9\x31\x58\xc5\xa7\x40\x9b\xcd\xc9\x9d\x35\xac\xae\x83\x50\x24\x53\x4b\x75\xe8\xea\xe3\x3c\x27\x09\x8c\x0d\x00\x08\x5a\x61\xaf\x16\x7a\x70\x68\x2d\x7e\x25\xa1\x5c\xc1\x1d\xc9\xb0\x41\x43\x0b\xd0\x37\x7a\x58\x7b\xfb\xfd\x66\xda\xc8\x4e\x03\x87\xb5\x45\x73\x91\xe9\x92\x0b\x35\x66\x1c\xc3\x9d\x11\x25\x37\x42\x6e\xc9\x65\xb9\x96\x20\x94\xdf\xbd\x83\xf5\x39\x56\xc7\xf4\xc7\x7e\x97\x50\x2d\xf7\xf8\xb8\xeb\xca\x9a\x5a\x62\xf0\x6d\x28\x3d\xb5\xd4\xe5\x55\xe7\x73\x48\x9e\xbd\xf6\x1a\xe8\xf9\xb8\xa7\x14\x51\x74\x2d\x05\x0d\xcd\xfb\xa5\x0a\x9d\x31\xaa\x55\x30\xf9\x0f\x62\x55\x72\x7b\xaa\x54\x21\xc7\x5b\x5a\xa5\xbe\xda\x71\xad\x42\x84\xb7\xc5\x22\x30\x27\xca\x45\xa6\xbd\x60\x95\xdc\x9e\x36\x51\xc3\x19\x94\xdb\x91\xf9\x0a\x2f\x85\x93\x44\x1b\x7d\x7f\x1c\x14\x2d\x78\x1c\x13\xed\x54\x41\x82\x7c\xe3\x12\x9f\x34\x60\xa3\x85\x1c\x12\xad\x47\x70\xa2\x66\xb6\x22\x16\xfb\x46\xfa\x59\xc5\x6c\x35\x36\x66\xef\x57\xec\xed\x8d\xd8\x09\x36\xba\x11\x4f\xdc\x75\x47\xe5\x1a\xdd\x88\x2f\xa6\x6c\xac\x8e\xc3\x7a\xb5\x25\xfe\xc4\x46\xec\xf0\xbc\x7b\x23\x26\x09\xdc\xa0\xac\xd0\x58\x16\xd0\xef\xdd\x31\x0f\xbf\xec\xcb\x0c\xce\x3b\xd3\xf8\xf6\xe3\xec\xb5\x05\x61\xa5\x3b\xcb\x6a\x0e\x1b\x0f\xd8\xcb\x7f\x5e\x66\xfe\x35\x2c\x96\xb0\x19\xbe\x96\xc3\xcf\x02\x84\x15\x6e\xbd\xd2\x59\x86\x19\x2c\xb4\x2b\x88\xde\x2e\x0d\xdd\x81\x4a\xee\x60\xba\x9a\xc1\x53\x21\xd2\xc2\x9b\x4a\x09\x92\xc4\x6a\xa3\x70\x95\xf9\x7b\x1d\xfd\xcc\x89\xaf\xb9\xd2\x4a\xa4\x5c\xde\x20\xcf\xd0\xfc\x86\x5b\xfa\xcd\xe0\xda\x44\x56\x87\x7e\x11\x0e\x52\xae\x60\x81\x5d\x88\x34\x45\x6b\x31\xa3\xdc\x28\x5c\x81\xa6\xcd\xdc\xde\x70\xe1\xaa\x2f\xf6\x6f\xe1\x8a\xbf\xb8\x5c\x63\xb8\x75\x50\xb1\xdf\x7e\xf9\x3e\x3b\x6a\xf8\x06\xba\xe9\x6a\xb6\x8b\xe0\xaf\xaf\xbd\x76\xa9\x7b\x66\x0d\xfb\x37\x00\x00\xff\xff\x09\x00\x51\xc2\x47\x0e\x00\x00") +var _nameServiceGeneratedTransport_grpcGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xa4\x57\xdf\x6f\xdb\x36\x10\x7e\xb6\xfe\x8a\x9b\x51\x0c\x56\x10\xcb\x7b\x2e\x90\x97\xa6\x5d\x53\x6c\xe9\x82\x2e\xd8\x1e\x8a\xa2\xa0\xa5\xb3\x4c\x58\x12\x15\x92\x76\x92\x09\xfe\xdf\x77\x47\x4a\xb2\xfc\x23\xb2\xda\x3c\x04\x0e\xc5\xfb\xf1\xdd\xf7\xdd\x51\x54\x29\xe2\x95\x48\x11\xcc\x26\x0e\x82\xd9\x0c\xee\x97\xd2\xc0\x42\x66\x08\xa5\x56\x1b\x99\xa0\x01\x83\x7a\x83\x7a\x6a\x68\x01\x73\x59\x24\xb2\x48\xc9\x44\x69\xb0\x4b\x84\xf4\xcb\xdd\x35\x58\x2d\x0a\x53\x2a\x6d\x23\x0e\xf1\xc9\xc2\xda\xca\x4c\xfe\x47\xbe\x6c\xd2\xee\xce\x52\x5d\xc6\xd1\xdf\x2e\x5c\x14\x04\x32\xe7\x87\x30\x09\x46\xe3\x02\xed\x6c\x69\x6d\x39\x0e\x68\x91\xaa\x4c\x14\x69\xa4\x74\x3a\x7b\x9a\xf1\x4e\xac\x0a\x8b\x4f\x76\xec\xf6\x54\x9a\x61\xd4\x31\xe1\x98\xb3\x1c\xad\x48\x84\x15\xec\xcf\x0f\xda\x94\x30\x4e\xa5\x5d\xae\xe7\x51\xac\xf2\x59\xaa\xa6\x2b\x69\x67\xfc\xb7\x8f\x89\xdd\x9a\xda\x19\x9e\x8c\x31\x18\x95\x73\x18\x57\x55\x74\xf7\xee\x93\xc3\x79\x27\xec\x12\xa6\xdb\xed\x38\x08\x03\xc7\xd4\xad\x58\xe1\x47\xaa\xde\xd7\x03\x39\x2d\x0d\x08\x62\xcb\x82\x5a\x00\x16\x49\xa9\x64\x61\xe9\xd1\x46\xc8\x4c\xcc\x89\x51\xc1\xfb\x8e\xb0\xaa\xfa\xa8\x3e\x8b\x1c\x21\xaa\xd3\x45\xbc\xda\x6e\x1b\x6e\x16\xeb\x22\x3e\x48\x30\x89\xed\x13\xd4\x4c\x44\xd7\xfe\xf7\xb2\x93\xe6\x43\xf3\x5f\x08\xe5\x3c\xea\x4f\x00\x55\x30\xf2\xaa\xfe\x55\x5a\xa9\x0a\x03\x6f\xaf\xe0\xeb\xb7\x3d\xe6\x6a\x9d\xbc\x01\xd9\x8f\xe0\xd4\xf6\x3b\xa4\x46\xc0\x49\xc3\xff\xbd\xaa\x91\x85\x97\xc1\x68\x1b\x8c\x34\xda\xb5\x2e\xe0\x57\x76\xf5\x0e\x95\x63\xba\xaa\xe0\x5e\xfd\xa9\x1e\x09\xca\x1e\x40\xd8\x92\x53\x55\x51\x12\x6a\xc9\x37\x92\x61\xb5\xfb\xb7\x68\x97\x2a\x31\x6c\x41\x26\x8d\xfb\x1b\x59\x57\xf6\xf6\x00\xdf\x67\x7c\xac\x89\x23\xfb\x11\x91\x77\xc9\xbf\x2d\x5f\xc4\x50\xeb\xda\x50\xe7\x2c\xde\x63\xac\x12\xc7\x7b\xc7\xe2\x0b\x3e\xac\xd1\x78\x83\x0f\xc5\x49\x03\xca\x5a\x18\x74\x16\x7b\xd4\x46\x51\xc4\x0f\x99\x90\xaa\x9a\xb2\x60\x5c\xc1\x36\xd8\xba\x26\xda\x11\x03\x34\x0e\x19\xe6\xc8\x5a\xf2\xd4\x9c\x51\x90\xe0\xa2\x5e\x08\x6a\x54\xfb\x5c\x62\x37\x8e\xb1\x7a\x1d\x5b\x92\xf8\x3c\x8f\x27\x68\x04\x38\xe0\xf1\x46\x14\x49\x86\x3a\xd8\x81\xf7\xc8\xeb\x30\xee\x20\xe8\x64\xb7\x6a\x57\xc8\xf0\x1a\xce\x42\x75\x03\x31\x31\x70\xb1\x4b\x15\xee\xc2\xb7\xe8\x4f\x0f\x89\xc6\x07\xb8\xe8\x0e\x05\xd9\xd7\x8a\xde\x13\x79\xb5\x6f\x08\x93\x63\x23\xaf\x6a\xc7\x8a\x46\x4e\x6b\xc5\xc9\x83\xd1\x77\x0e\x5d\xba\x27\x0c\x9b\x7b\xea\x88\x4f\x3f\x27\xdc\x2d\x8c\xcd\x61\x09\x83\x91\x5c\x38\xa7\x5f\xae\xa0\x90\x19\x87\x6a\x26\x85\x96\x2e\x5e\x77\x7a\x28\x47\x34\x04\x5a\x78\xc9\xee\x24\x4f\x55\x79\xa1\x58\xa6\x9a\x6a\xdf\xd5\xe7\x79\x26\x8f\xbe\x01\x00\xc9\x47\xd8\xc1\x81\xee\x1d\x6a\x8b\xdf\x59\x28\xbb\x14\x96\x65\xa0\xcc\x7c\x00\xba\x46\xf7\xc7\xde\x71\xbf\xe9\x3a\x32\x35\x8e\x80\x35\x8d\xce\x34\x51\xb9\x90\x45\x9f\x71\x04\x77\x5a\xe6\x42\xcb\xec\x99\x5d\x16\xeb\x8c\x7a\xc9\x9d\xbd\x9d\xe3\xb3\xaf\x8e\xc9\xf7\xe3\x2e\xe1\x5a\x68\x7b\xd7\x95\x15\xb7\x44\x67\xd5\x95\x9e\x5b\x8a\x18\xac\x7d\x4e\xc9\x73\xd4\x5e\x1d\x3d\x1f\x8e\x94\x62\x8a\xae\x33\xc9\x43\xf3\x7a\xa9\x7c\x67\xf4\x6a\xe5\x4d\x7e\x42\xac\x92\x28\x1f\x28\x95\xcf\xf1\x92\x56\xb1\xab\xb6\x5f\x2b\x1f\xe1\x65\xb1\x18\xcc\x40\xb9\xd8\xb4\x15\x8c\x16\xc3\x26\xaa\x3b\x83\xd9\x73\xcf\x7c\xf9\x97\xc2\x20\xd1\x7a\xdf\x1f\x27\x45\xf3\x1e\xe7\x44\x1b\x2a\x88\x97\xaf\x5f\xe2\x41\x03\xd6\x5b\xc8\x29\xd1\x5a\x04\x03\x35\x33\x25\xb3\xd8\x36\xd2\x8f\x2a\x66\xca\xbe\x31\x7b\xbd\x62\x2f\x9f\x88\x8d\x60\xbd\x27\xe2\xc0\xb3\xee\xac\x5c\xbd\x27\xe2\xde\x94\xf5\xd5\x71\x5a\xaf\xba\xc4\x1f\x38\x11\x1b\x3c\xaf\x3e\x11\x89\xa1\x1b\xcc\x4a\xd4\x26\xf0\xe8\x8f\xee\x98\xa7\x5f\xf6\x79\x02\x17\x8d\x69\x74\xfb\x3e\x3c\xb4\x60\xac\x7c\x67\x59\x5d\xc2\xc6\x01\x76\xf2\x5f\x90\x1b\xbf\x86\xe9\xc5\xbc\xe9\xbe\x96\xfd\x67\x01\xc2\x0a\x9f\x9d\xd2\x49\x82\x09\xcc\x15\x7d\x0a\x10\xbd\x4d\x1a\xbe\x03\xe5\xa4\xef\x64\x15\xc2\xe3\x52\xc6\x4b\x67\x9a\x65\x90\xb1\x58\x75\x14\xba\x46\xb9\x7b\x1d\x7f\xe6\x44\xd7\xa2\x50\x85\x8c\x45\x76\x83\x22\x41\xfd\x07\x45\xa7\x6f\x06\x5b\x27\x32\xca\xf7\x8b\xa4\x96\x11\x05\xcc\xb1\x09\x11\xc7\x68\x0c\x01\xa0\xdc\x48\x9f\x35\xd4\x08\x3e\x73\x7d\xc3\x85\xab\xb6\xd8\x7f\x69\xfb\x1f\x91\xad\xd1\xdf\x3a\xb8\xd8\xaf\xbf\x7d\x0b\xcf\x1a\xbe\x80\x8e\x2a\xdb\x45\x70\xd7\xd7\x56\x3b\x72\x23\xd9\xfe\x0f\x00\x00\xff\xff\x09\x00\x51\xc2\x47\x0e\x00\x00") func nameServiceGeneratedTransport_grpcGotemplateBytes() ([]byte, error) { return bindataRead( @@ -213,12 +213,12 @@ func nameServiceGeneratedTransport_grpcGotemplate() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "NAME-service/generated/transport_grpc.gotemplate", size: 3655, mode: os.FileMode(420), modTime: time.Unix(1479253692, 0)} + info := bindataFileInfo{name: "NAME-service/generated/transport_grpc.gotemplate", size: 3655, mode: os.FileMode(436), modTime: time.Unix(1478128977, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _nameServiceGeneratedTransport_httpGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x2c\xcb\xb1\x0d\xc2\x30\x10\x05\xd0\x3e\x53\x5c\x1d\x09\xdf\x1a\x29\x91\xe2\x05\xac\xf0\x31\x08\x93\xb3\xce\x1f\x1a\xeb\x76\xa7\x61\x80\x37\xa7\xae\xb2\x03\x52\xed\x42\xff\x8c\xa1\x15\x67\xb5\xd7\x93\xfa\x20\x3b\xbd\x9c\xa3\x9b\x53\x89\x77\x6f\x85\x18\xa9\x9a\xdc\xcd\xe5\xb0\x1b\x64\xd5\x88\x65\xce\xa3\xb4\x26\x69\xcb\xf9\xba\xa1\x75\x78\xda\xe1\x5f\x78\xfe\x1b\x49\x11\xcb\x2f\x00\x00\xff\xff\xdd\x3a\x4a\x8f\x6a\x00\x00\x00") +var _nameServiceGeneratedTransport_httpGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x2c\xcb\x31\x0e\xc2\x30\x0c\x05\xd0\x9d\x53\x78\xae\x44\x7c\x8d\x8e\x48\xcd\x05\xa2\xf2\x09\x88\x50\x47\xce\x87\xc5\xca\xdd\x61\x60\x7f\x2f\x42\x17\xd9\x00\xa9\x76\xa6\xbf\xc7\xd0\x8a\xa3\xda\xf3\x41\xbd\x93\x9d\x5e\x8e\xd1\xcd\xa9\xc4\xab\xb7\x42\x8c\x54\x4d\x6e\xe6\xb2\xdb\x15\xb2\xe8\x9c\xa7\x88\xbd\xb4\x26\x69\xcd\xf9\xb2\xa2\x75\x78\xda\xe0\x1f\x78\xfe\x1f\x49\x3f\xf5\x0d\x00\x00\xff\xff\xdd\x3a\x4a\x8f\x6a\x00\x00\x00") func nameServiceGeneratedTransport_httpGotemplateBytes() ([]byte, error) { return bindataRead( @@ -233,7 +233,7 @@ func nameServiceGeneratedTransport_httpGotemplate() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "NAME-service/generated/transport_http.gotemplate", size: 106, mode: os.FileMode(420), modTime: time.Unix(1480630738, 0)} + info := bindataFileInfo{name: "NAME-service/generated/transport_http.gotemplate", size: 106, mode: os.FileMode(436), modTime: time.Unix(1479408041, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -253,12 +253,12 @@ func nameServiceHandlersServerServer_handlerGotemplate() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "NAME-service/handlers/server/server_handler.gotemplate", size: 62, mode: os.FileMode(420), modTime: time.Unix(1480630738, 0)} + info := bindataFileInfo{name: "NAME-service/handlers/server/server_handler.gotemplate", size: 62, mode: os.FileMode(436), modTime: time.Unix(1479408041, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _nameServiceMiddlewaresEndpointsGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x04\xc0\x41\x0a\xc4\x20\x0c\x05\xd0\xfd\x9c\x22\x6b\x61\x26\x87\x99\x13\x48\xf3\x1b\xa4\x6a\xc4\xa4\x74\x21\xde\xbd\x6f\x2d\x4e\xf4\x07\x48\xed\x1b\xf3\x76\x67\x45\x57\xbb\x4a\x70\x2b\x22\x15\x4f\x9e\x70\x0e\xb4\x51\x73\xc0\x19\x5d\x86\x95\x1e\xfe\x53\xa3\xd3\x26\x1d\x26\xa0\xc4\x7b\x7f\xde\x00\x00\x00\xff\xff\x80\x45\x66\x4f\x4c\x00\x00\x00") +var _nameServiceMiddlewaresEndpointsGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x0c\xc6\xc1\x0d\xc3\x20\x0c\x05\xd0\x7b\xa7\xf0\x19\xa9\xf5\x30\x9d\x00\xd5\xbf\x16\x0a\x60\x84\x1d\xe5\x80\xd8\x3d\xb9\xbd\xb5\x38\xd1\x17\x20\xb5\x77\xcc\xd3\x9d\x15\x5d\xed\x28\xc1\xad\x88\x54\x5c\x79\xc2\x39\xd0\x46\xcd\xf1\x08\x5d\x86\x95\x1e\xfe\x51\xa3\xbf\x4d\xfa\x99\x80\x12\xef\xfd\xba\x03\x00\x00\xff\xff\x80\x45\x66\x4f\x4c\x00\x00\x00") func nameServiceMiddlewaresEndpointsGotemplateBytes() ([]byte, error) { return bindataRead( @@ -273,12 +273,12 @@ func nameServiceMiddlewaresEndpointsGotemplate() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "NAME-service/middlewares/endpoints.gotemplate", size: 76, mode: os.FileMode(420), modTime: time.Unix(1480980409, 0)} + info := bindataFileInfo{name: "NAME-service/middlewares/endpoints.gotemplate", size: 76, mode: os.FileMode(436), modTime: time.Unix(1481916361, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _nameServiceMiddlewaresServiceGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x04\xc0\x41\x0a\xc4\x20\x0c\x05\xd0\xfd\x9c\x22\x6b\x61\x26\x87\x99\x13\x48\xf3\x1b\xa4\x6a\xc4\xa4\x74\x21\xde\xbd\x6f\x2d\x4e\xf4\x07\x48\xed\x1b\xf3\x76\x67\x45\x57\xbb\x4a\x70\x2b\x22\x15\x4f\x9e\x70\x0e\xb4\x51\x73\xc0\x19\x5d\x86\x95\x1e\xfe\x53\xa3\xd3\x26\x1d\x26\xa0\xc4\x7b\x7f\xde\x00\x00\x00\xff\xff\x80\x45\x66\x4f\x4c\x00\x00\x00") +var _nameServiceMiddlewaresServiceGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x0c\xc6\xc1\x0d\xc3\x20\x0c\x05\xd0\x7b\xa7\xf0\x19\xa9\xf5\x30\x9d\x00\xd5\xbf\x16\x0a\x60\x84\x1d\xe5\x80\xd8\x3d\xb9\xbd\xb5\x38\xd1\x17\x20\xb5\x77\xcc\xd3\x9d\x15\x5d\xed\x28\xc1\xad\x88\x54\x5c\x79\xc2\x39\xd0\x46\xcd\xf1\x08\x5d\x86\x95\x1e\xfe\x51\xa3\xbf\x4d\xfa\x99\x80\x12\xef\xfd\xba\x03\x00\x00\xff\xff\x80\x45\x66\x4f\x4c\x00\x00\x00") func nameServiceMiddlewaresServiceGotemplateBytes() ([]byte, error) { return bindataRead( @@ -293,7 +293,7 @@ func nameServiceMiddlewaresServiceGotemplate() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "NAME-service/middlewares/service.gotemplate", size: 76, mode: os.FileMode(420), modTime: time.Unix(1480980409, 0)} + info := bindataFileInfo{name: "NAME-service/middlewares/service.gotemplate", size: 76, mode: os.FileMode(436), modTime: time.Unix(1481916361, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/svcdef/consolidate_http.go b/svcdef/consolidate_http.go index 04196c0..b1b06e7 100644 --- a/svcdef/consolidate_http.go +++ b/svcdef/consolidate_http.go @@ -36,7 +36,7 @@ func isEOF(err error) bool { // each `HTTPBinding` will have a populated list of all the http parameters // that that binding requires, where that parameter should be located, and the // type of each parameter. -func consolidateHTTP(sd *Svcdef, protoFiles []io.Reader) error { +func consolidateHTTP(sd *Svcdef, protoFiles map[string]io.Reader) error { for _, pfile := range protoFiles { lex := svcparse.NewSvcLexer(pfile) protosvc, err := svcparse.ParseService(lex) diff --git a/svcdef/consolidate_http_test.go b/svcdef/consolidate_http_test.go index f6e1cb5..c05aabe 100644 --- a/svcdef/consolidate_http_test.go +++ b/svcdef/consolidate_http_test.go @@ -56,7 +56,7 @@ type MapServer interface { protoCode := ` syntax = "proto3"; package TEST; -import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; +import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; enum EnumType { A = 0; @@ -84,7 +84,7 @@ service Map { } }` // From code, build our SvcDef - sd, err := New([]io.Reader{strings.NewReader(goCode)}, []io.Reader{strings.NewReader(protoCode)}) + sd, err := New(map[string]io.Reader{"/tmp/notreal": strings.NewReader(goCode)}, map[string]io.Reader{"/tmp/alsonotreal": strings.NewReader(protoCode)}) if err != nil { t.Fatal(err) } diff --git a/svcdef/newfromstring.go b/svcdef/newfromstring.go index 6732f11..1e94710 100644 --- a/svcdef/newfromstring.go +++ b/svcdef/newfromstring.go @@ -44,7 +44,13 @@ func NewFromString(def string, gopath []string) (*Svcdef, error) { } pbgo := string(buf) - sd, err := New([]io.Reader{strings.NewReader(pbgo)}, []io.Reader{strings.NewReader(def)}) + pbgoMap := map[string]io.Reader{ + "/tmp/doesntexist.pb.go": strings.NewReader(pbgo), + } + pFileMap := map[string]io.Reader{ + "/tmp/doesntexist.proto": strings.NewReader(def), + } + sd, err := New(pbgoMap, pFileMap) if err != nil { return nil, errors.Wrap(err, "cannot create new svcdef from pb.go and definition") } diff --git a/svcdef/newfromstring_test.go b/svcdef/newfromstring_test.go index a8d0610..e32d334 100644 --- a/svcdef/newfromstring_test.go +++ b/svcdef/newfromstring_test.go @@ -23,7 +23,7 @@ func basicFromString(t *testing.T) *Svcdef { // General package package general; - import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; message SumRequest { int64 a = 1; @@ -158,7 +158,7 @@ func TestNoHTTPBinding(t *testing.T) { // General package package general; - import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; message SumRequest { int64 a = 1; diff --git a/svcdef/svcdef.go b/svcdef/svcdef.go index 582494a..ed1025a 100644 --- a/svcdef/svcdef.go +++ b/svcdef/svcdef.go @@ -17,6 +17,7 @@ the path of an HTTP annotation. package svcdef import ( + "fmt" "go/ast" "go/parser" "go/token" @@ -135,16 +136,65 @@ func retrieveTypeSpecs(f *ast.File) ([]*ast.TypeSpec, error) { return rv, nil } +// DebugInfo contains context necessary for many functions to provide useful +// debugging output when encountering errors. All DebugInfo methods are +// implemented such that calling them with `nil` recievers means they'll return +// empty values. And since DebugInfo is used PURELY for creating nice error +// messages and no actual business logic depends on them, this means you can +// safely pass 'nil' DebugInfo structs to functions and you'll just get +// unhelpful error messages out, it won't break things. This is done to make +// the code more testable. +type DebugInfo struct { + Fset *token.FileSet + Path string +} + +func (di *DebugInfo) Position(pos token.Pos) string { + if di == nil { + return "" + } else { + return fmt.Sprintf("%s", di.Fset.Position(pos)) + } +} + +// LocationError is a special kind of error, carrying special information about +// where the error was encountered within a file. +type LocationError struct { + Path string + Position string + Err string +} + +func NewLocationError(err string, path string, pos string) LocationError { + return LocationError{ + Path: path, + Position: pos, + Err: err, + } +} + +func (le LocationError) Error() string { + return fmt.Sprintf("%s in file %q at line %s", le.Err, le.Path, le.Position) +} + +func (le LocationError) Location() string { + return le.Position +} + // New creates a Svcdef by parsing the provided Go and Protobuf source files to // derive type information, gRPC service data, and HTTP annotations. -func New(goFiles []io.Reader, protoFiles []io.Reader) (*Svcdef, error) { +func New(goFiles map[string]io.Reader, protoFiles map[string]io.Reader) (*Svcdef, error) { rv := Svcdef{} - for _, gofile := range goFiles { + for path, gofile := range goFiles { fset := token.NewFileSet() fileAst, err := parser.ParseFile(fset, "", gofile, parser.ParseComments) if err != nil { - return nil, errors.Wrap(err, "couldn't parse go file to create Svcdef") + return nil, errors.Wrapf(err, "couldn't parse go file %q to create Svcdef", path) + } + debugInfo := &DebugInfo{ + Path: path, + Fset: fset, } rv.PkgName = fileAst.Name.Name @@ -180,7 +230,7 @@ func New(goFiles []io.Reader, protoFiles []io.Reader) (*Svcdef, error) { if strings.HasSuffix("Client", t.Name.Name) { break } - nsvc, err := NewService(t) + nsvc, err := NewService(t, debugInfo) if err != nil { return nil, errors.Wrapf(err, "error parsing service %q", t.Name.Name) } @@ -263,13 +313,13 @@ func NewMap(m ast.Expr) (*Map, error) { // NewService returns a new Service struct derived from an *ast.TypeSpec with a // Type of *ast.InterfaceType representing an "{SVCNAME}Server" interface. -func NewService(s *ast.TypeSpec) (*Service, error) { +func NewService(s *ast.TypeSpec, info *DebugInfo) (*Service, error) { rv := &Service{ Name: strings.TrimSuffix(s.Name.Name, "Server"), } asvc := s.Type.(*ast.InterfaceType) for _, m := range asvc.Methods.List { - nmeth, err := NewServiceMethod(m) + nmeth, err := NewServiceMethod(m, info) if err != nil { return nil, errors.Wrapf(err, "Couldn't create service method %q of service %q", m.Names[0].Name, rv.Name) } @@ -281,13 +331,15 @@ func NewService(s *ast.TypeSpec) (*Service, error) { // NewServiceMethod returns a new ServiceMethod derived from a method of a // Service interface. This is accepted in the form of an *ast.Field which // contains the name of the method. -func NewServiceMethod(m *ast.Field) (*ServiceMethod, error) { +func NewServiceMethod(m *ast.Field, info *DebugInfo) (*ServiceMethod, error) { rv := &ServiceMethod{ Name: m.Names[0].Name, } ft, ok := m.Type.(*ast.FuncType) if !ok { - return nil, errors.New("Provided *ast.Field.Type is not of type *ast.FuncType; cannot proceed") + return nil, NewLocationError("Provided *ast.Field.Type is not of type "+ + "*ast.FuncType; cannot proceed", + info.Path, info.Position(m.Pos())) } input := ft.Params.List @@ -308,11 +360,15 @@ func NewServiceMethod(m *ast.Field) (*ServiceMethod, error) { makeFieldType := func(in *ast.Field) (*FieldType, error) { star, ok := in.Type.(*ast.StarExpr) if !ok { - return nil, errors.New("could not create FieldType, in.Type is not *ast.StarExpr") + return nil, NewLocationError("could not create FieldType, in.Type "+ + "is not *ast.StarExpr", + info.Path, info.Position(in.Pos())) } ident, ok := star.X.(*ast.Ident) if !ok { - return nil, errors.New("could not create FieldType, star.Type is not *ast.Ident") + return nil, NewLocationError("could not create FieldType, "+ + "star.Type is not *ast.Ident", + info.Path, info.Position(star.Pos())) } return &FieldType{ Name: ident.Name, diff --git a/svcdef/svcdef_test.go b/svcdef/svcdef_test.go index bb3e1e1..344b172 100644 --- a/svcdef/svcdef_test.go +++ b/svcdef/svcdef_test.go @@ -17,7 +17,7 @@ func TestSvcdef(t *testing.T) { t.Fatal(err) } - sd, err := New([]io.Reader{gf}, []io.Reader{pf}) + sd, err := New(map[string]io.Reader{"./test-go.txt": gf}, map[string]io.Reader{"./test-proto.txt": pf}) if err != nil { t.Fatal(err) } @@ -46,7 +46,7 @@ type NestedTypeRequest struct { B []*NestedMessageB C EnumType }` - sd, err := New([]io.Reader{strings.NewReader(caseCode)}, nil) + sd, err := New(map[string]io.Reader{"/tmp/notreal": strings.NewReader(caseCode)}, nil) if err != nil { t.Fatal(err) } @@ -109,7 +109,7 @@ type MsgWithMap struct { Beta map[int64]*NestedMessageC } ` - sd, err := New([]io.Reader{strings.NewReader(caseCode)}, nil) + sd, err := New(map[string]io.Reader{"/tmp/notreal": strings.NewReader(caseCode)}, nil) if err != nil { t.Fatal(err) } diff --git a/svcdef/test-proto.txt b/svcdef/test-proto.txt index b468b91..67355d1 100644 --- a/svcdef/test-proto.txt +++ b/svcdef/test-proto.txt @@ -3,7 +3,7 @@ syntax = "proto3"; package TEST; -import "google.golang.org/genproto/googleapis/api/serviceconfig/annotations.proto"; +import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; service Map { rpc GetMap (MapTypeRequest) returns (MapTypeResponse) { diff --git a/truss/parsepkgname/parsepkgname.go b/truss/parsepkgname/parsepkgname.go deleted file mode 100644 index 8d14087..0000000 --- a/truss/parsepkgname/parsepkgname.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -Package parsepkgname provides functions for extracting the name of a package -from a protocol buffer definition file. For example, given a protocol buffer 3 -file like this: - - // A comment about this proto file - package examplepackage; - - // and the rest of the file goes here - -The functions in this package would extract the name "examplepackage" as the -name of the protobuf package. -*/ -package parsepkgname - -import ( - "io" - "unicode" - - "github.com/TuneLab/go-truss/deftree/svcparse" -) - -type token int - -const ( - ident token = iota - whitespaceToken - comment - other -) - -type Scanner interface { - // ReadUnit must return groups of runes representing at least the following - // lexical groups: - // - // ident - // comments (c++ style single line comments and block comments) - // whitespace - // - // If you need a scanner which provides these out of the box, see the - // SvcScanner struct in github.com/TuneLab/go-truss/deftree/svcparse - ReadUnit() ([]rune, error) -} - -func categorize(unit []rune) token { - rv := other - r := unit[0] - switch { - case unicode.IsLetter(r): - rv = ident - case unicode.IsDigit(r): - rv = ident - case r == '_': - rv = ident - case unicode.IsSpace(r): - rv = whitespaceToken - case r == '/' && len(unit) > 1: - rv = comment - } - return rv -} - -// FromReader accepts an io.Reader, the contents of which should be a -// valid proto3 file, and returns the name of the protobuf package which that -// file belongs to. -func FromReader(protofile io.Reader) (string, error) { - scanner := svcparse.NewSvcScanner(protofile) - return FromScanner(scanner) -} - -// FromScanner accepts a Scanner for a protobuf file and returns the name of -// the protobuf package that the file belongs to. -func FromScanner(scanner Scanner) (string, error) { - foundpackage := false - - // A nice way to ignore comments. Recursively calls itself until it - // recieves a unit from the scanner which is not a comment. - var readIgnoreComment func(Scanner) (token, []rune, error) - readIgnoreComment = func(scn Scanner) (token, []rune, error) { - unit, err := scn.ReadUnit() - if err != nil { - return other, nil, err - } - tkn := categorize(unit) - if tkn == comment { - return readIgnoreComment(scn) - } - return tkn, unit, err - } - - // A tiny state machine to find two sequential idents: the ident "package" - // and the ident immediately following. That second ident will be the name - // of the package. - for { - tkn, unit, err := readIgnoreComment(scanner) - if err != nil { - return "", err - } - if foundpackage { - if tkn == ident { - return string(unit), nil - } else if tkn == whitespaceToken { - continue - } else { - foundpackage = false - } - } else { - if tkn == ident && string(unit) == "package" { - foundpackage = true - } - } - } -} diff --git a/truss/parsepkgname/parsepkgname_test.go b/truss/parsepkgname/parsepkgname_test.go deleted file mode 100644 index 65f3c13..0000000 --- a/truss/parsepkgname/parsepkgname_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package parsepkgname - -import ( - "io" - "strings" - "testing" -) - -type testScanner struct { - contents [][]rune - position int -} - -func (t *testScanner) ReadUnit() ([]rune, error) { - if t.position < len(t.contents) { - rv := t.contents[t.position] - t.position += 1 - return rv, nil - } - return nil, io.EOF -} - -func NewTestScanner(units []string) *testScanner { - rv := testScanner{position: 0} - for _, u := range units { - rv.contents = append(rv.contents, []rune(u)) - } - return &rv -} - -func TestFromScanner_simple(t *testing.T) { - basicContents := []string{ - "\n", - "package", - " ", - "examplename", - ";", - "\n", - } - scn := NewTestScanner(basicContents) - want := "examplename" - got, err := FromScanner(scn) - if err != nil { - t.Fatal(err) - } - if got != want { - t.Fatalf("Got %q for package name, want %q", got, want) - } -} - -func TestFromScanner_mid_comment(t *testing.T) { - contents := []string{ - "\n", - "package", - " ", - "/* comment in the middle of the declaration */", - "examplename", - ";", - "\n", - } - scn := NewTestScanner(contents) - want := "examplename" - got, err := FromScanner(scn) - if err != nil { - t.Fatal(err) - } - if got != want { - t.Fatalf("Got %q for package name, want %q", got, want) - } -} - -func TestFromReader(t *testing.T) { - code := ` -// A comment about this proto file -package /* some mid-definition comment */ examplepackage; - -// and the rest of the file goes here -` - name, err := FromReader(strings.NewReader(code)) - if err != nil { - t.Fatal(err) - } - got := name - want := "examplepackage" - if got != want { - t.Fatalf("Got %q for package name, want %q", got, want) - } -} diff --git a/truss/parsesvcname/parsesvcname.go b/truss/parsesvcname/parsesvcname.go new file mode 100644 index 0000000..fb7ce76 --- /dev/null +++ b/truss/parsesvcname/parsesvcname.go @@ -0,0 +1,89 @@ +// Package parsesvcname will parse the service name of a protobuf package. The +// name returned will always be camelcased according to the conventions +// outlined in github.com/golang/protobuf/protoc-gen-go/generator.CamelCase. +package parsesvcname + +import ( + "io" + "io/ioutil" + "os" + "path/filepath" + "strings" + + "github.com/TuneLab/go-truss/svcdef" + "github.com/TuneLab/go-truss/truss/execprotoc" + "github.com/pkg/errors" +) + +// FromPaths accepts the paths of protobuf definition files and returns the +// name of the service in that protobuf definition file. +func FromPaths(gopath []string, protoDefPaths []string) (string, error) { + td, err := ioutil.TempDir("", "parsesvcname") + defer os.RemoveAll(td) + if err != nil { + return "", errors.Wrap(err, "failed to create temporary directory for .pb.go files") + } + err = execprotoc.GeneratePBDotGo(protoDefPaths, gopath, td) + if err != nil { + return "", errors.Wrap(err, "failed to generate .pb.go files from protobuf definition files") + } + + // Get path names of .pb.go files + pbgoPaths := []string{} + for _, p := range protoDefPaths { + base := filepath.Base(p) + barename := strings.TrimSuffix(base, filepath.Ext(p)) + pbgp := filepath.Join(td, barename+".pb.go") + pbgoPaths = append(pbgoPaths, pbgp) + } + + // Open all .pb.go files and store in map to be passed to svcdef.New() + openFiles := func(paths []string) (map[string]io.Reader, error) { + rv := map[string]io.Reader{} + for _, p := range paths { + reader, err := os.Open(p) + if err != nil { + return nil, errors.Wrapf(err, "cannot open file %q", p) + } + rv[p] = reader + } + return rv, nil + } + pbgoFiles, err := openFiles(pbgoPaths) + if err != nil { + return "", errors.Wrap(err, "cannot open all .pb.go files") + } + pbFiles, err := openFiles(protoDefPaths) + if err != nil { + return "", errors.Wrap(err, "cannot open all .proto files") + } + + sd, err := svcdef.New(pbgoFiles, pbFiles) + if err != nil { + return "", errors.Wrapf(err, "failed to create service definition; did you pass ALL the protobuf files to truss?") + } + + return sd.Service.Name, nil +} + +func FromReaders(gopath []string, protoDefReaders []io.Reader) (string, error) { + protoDir, err := ioutil.TempDir("", "parsesvcname-fromreaders") + if err != nil { + return "", errors.Wrap(err, "failed to create temporary directory for protobuf files") + } + // Ensures all the temporary files are removed + defer os.RemoveAll(protoDir) + + protoDefPaths := []string{} + for _, rdr := range protoDefReaders { + f, err := ioutil.TempFile(protoDir, "parsesvcname-fromreader") + _, err = io.Copy(f, rdr) + if err != nil { + return "", errors.Wrap(err, "couldn't copy contents of our proto file into the os.File: ") + } + path := f.Name() + f.Close() + protoDefPaths = append(protoDefPaths, path) + } + return FromPaths(gopath, protoDefPaths) +} diff --git a/truss/parsesvcname/parsesvcname_test.go b/truss/parsesvcname/parsesvcname_test.go new file mode 100644 index 0000000..3ecb0eb --- /dev/null +++ b/truss/parsesvcname/parsesvcname_test.go @@ -0,0 +1,169 @@ +package parsesvcname + +import ( + "io" + "io/ioutil" + "os" + "strings" + "testing" +) + +// Provide a basic proto file to test that FromPaths returns the name of the +// service in the file at the provided path. +func TestFromPaths(t *testing.T) { + protoStr := ` + syntax = "proto3"; + package echo; + + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; + + service BounceEcho { + rpc Echo (EchoRequest) returns (EchoResponse) { + option (google.api.http) = { + get: "/echo" + }; + } + } + message EchoRequest { + string In = 1; + } + message EchoResponse { + string Out = 1; + } + ` + protoDir, err := ioutil.TempDir("", "parsesvcname-test") + if err != nil { + t.Fatal("cannot create temp directory to store proto definition: ", err) + } + defer os.RemoveAll(protoDir) + f, err := ioutil.TempFile(protoDir, "trusstest") + _, err = io.Copy(f, strings.NewReader(protoStr)) + if err != nil { + t.Fatal("couldn't copy contents of our proto file into the os.File: ", err) + } + path := f.Name() + f.Close() + + svcname, err := FromPaths([]string{os.Getenv("GOPATH")}, []string{path}) + if err != nil { + t.Fatal("failed to get service name from path: ", err) + } + + if got, want := svcname, "BounceEcho"; got != want { + t.Fatalf("got != want; got = %q, want = %q", got, want) + } +} + +// Provide a basic protobuf file to FromReader to ensure it returns the service +// name we expect. +func TestFromReader(t *testing.T) { + protoStr := ` + syntax = "proto3"; + package echo; + + import "github.com/TuneLab/go-genproto/googleapis/api/serviceconfig/annotations.proto"; + + service BounceEcho { + rpc Echo (EchoRequest) returns (EchoResponse) { + option (google.api.http) = { + get: "/echo" + }; + } + } + message EchoRequest { + string In = 1; + } + message EchoResponse { + string Out = 1; + } + ` + svcname, err := FromReaders([]string{os.Getenv("GOPATH")}, []io.Reader{strings.NewReader(protoStr)}) + if err != nil { + t.Fatal("failed to get service name from path: ", err) + } + + if got, want := svcname, "BounceEcho"; got != want { + t.Fatalf("got != want; got = %q, want = %q", got, want) + } +} + +// Ensure that passing a protobuf file that's not importing google annotations +// will function properly. +func TestNoAnnotations(t *testing.T) { + protoStr := ` + syntax = "proto3"; + package echo; + + service BounceEcho { + rpc Echo (EchoRequest) returns (EchoResponse) {} + } + message EchoRequest { + string In = 1; + } + message EchoResponse { + string Out = 1; + } + ` + svcname, err := FromReaders([]string{os.Getenv("GOPATH")}, []io.Reader{strings.NewReader(protoStr)}) + if err != nil { + t.Fatal("failed to get service name from path: ", err) + } + + if got, want := svcname, "BounceEcho"; got != want { + t.Fatalf("got != want; got = %q, want = %q", got, want) + } +} + +// Test that having a service name which includes an underscore doesn't cause +// problems. +func TestUnderscoreService(t *testing.T) { + protoStr := ` + syntax = "proto3"; + package echo; + + service foo_bar_test { + rpc Echo (EchoRequest) returns (EchoResponse) {} + } + message EchoRequest { + string In = 1; + } + message EchoResponse { + string Out = 1; + } + ` + svcname, err := FromReaders([]string{os.Getenv("GOPATH")}, []io.Reader{strings.NewReader(protoStr)}) + if err != nil { + t.Fatal("failed to get service name from path: ", err) + } + + if got, want := svcname, "FooBarTest"; got != want { + t.Fatalf("got != want; got = %q, want = %q", got, want) + } +} + +// Test that having a service name which starts with an underscore doesn't +// cause problems. +func TestLeadingUnderscoreService(t *testing.T) { + protoStr := ` + syntax = "proto3"; + package echo; + + service _Foo_Bar { + rpc Echo (EchoRequest) returns (EchoResponse) {} + } + message EchoRequest { + string In = 1; + } + message EchoResponse { + string Out = 1; + } + ` + svcname, err := FromReaders([]string{os.Getenv("GOPATH")}, []io.Reader{strings.NewReader(protoStr)}) + if err != nil { + t.Fatal("failed to get service name from path: ", err) + } + + if got, want := svcname, "XFoo_Bar"; got != want { + t.Fatalf("got != want; got = %q, want = %q", got, want) + } +}