diff --git a/_examples/golang-basics/example.gen.go b/_examples/golang-basics/example.gen.go index 6603744..4480219 100644 --- a/_examples/golang-basics/example.gen.go +++ b/_examples/golang-basics/example.gen.go @@ -161,13 +161,37 @@ type ComplexType struct { } var ( - methodAnnotations = map[string]map[string]string{ - "/rpc/ExampleService/Ping": {}, - "/rpc/ExampleService/Status": {"internal": ""}, - "/rpc/ExampleService/Version": {}, - "/rpc/ExampleService/GetUser": {}, - "/rpc/ExampleService/FindUser": {}, - "/rpc/ExampleService/LogEvent": {}, + methodAnnotations = map[string]MethodCtx{ + "/rpc/ExampleService/Ping": { + Name: "Ping", + Service: "ExampleService", + Annotations: map[string]string{}, + }, + "/rpc/ExampleService/Status": { + Name: "Status", + Service: "ExampleService", + Annotations: map[string]string{"internal": ""}, + }, + "/rpc/ExampleService/Version": { + Name: "Version", + Service: "ExampleService", + Annotations: map[string]string{}, + }, + "/rpc/ExampleService/GetUser": { + Name: "GetUser", + Service: "ExampleService", + Annotations: map[string]string{}, + }, + "/rpc/ExampleService/FindUser": { + Name: "FindUser", + Service: "ExampleService", + Annotations: map[string]string{}, + }, + "/rpc/ExampleService/LogEvent": { + Name: "LogEvent", + Service: "ExampleService", + Annotations: map[string]string{}, + }, } ) diff --git a/_examples/golang-imports/api.gen.go b/_examples/golang-imports/api.gen.go index 7222f61..d0283db 100644 --- a/_examples/golang-imports/api.gen.go +++ b/_examples/golang-imports/api.gen.go @@ -85,10 +85,22 @@ func (x *Location) Is(values ...Location) bool { } var ( - methodAnnotations = map[string]map[string]string{ - "/rpc/ExampleAPI/Ping": {}, - "/rpc/ExampleAPI/Status": {}, - "/rpc/ExampleAPI/GetUsers": {}, + methodAnnotations = map[string]MethodCtx{ + "/rpc/ExampleAPI/Ping": { + Name: "Ping", + Service: "ExampleAPI", + Annotations: map[string]string{}, + }, + "/rpc/ExampleAPI/Status": { + Name: "Status", + Service: "ExampleAPI", + Annotations: map[string]string{}, + }, + "/rpc/ExampleAPI/GetUsers": { + Name: "GetUsers", + Service: "ExampleAPI", + Annotations: map[string]string{}, + }, } ) @@ -512,9 +524,9 @@ func HTTPRequestHeaders(ctx context.Context) (http.Header, bool) { // type MethodCtx struct { - Name string - Service string - Annotations map[string]string + Name string + Service string + Annotations map[string]string } type contextKey struct {