...

Source file src/github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/standalone/unannotated_echo_service.pb.gw.go

Documentation: github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/standalone

     1  // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
     2  // source: examples/internal/proto/examplepb/unannotated_echo_service.proto
     3  
     4  /*
     5  Package examplepb is a reverse proxy.
     6  
     7  It translates gRPC into RESTful JSON APIs.
     8  */
     9  package examplepb
    10  
    11  import (
    12  	"context"
    13  	"io"
    14  	"net/http"
    15  
    16  	extExamplepb "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb"
    17  	"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
    18  	"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
    19  	"google.golang.org/grpc"
    20  	"google.golang.org/grpc/codes"
    21  	"google.golang.org/grpc/grpclog"
    22  	"google.golang.org/grpc/metadata"
    23  	"google.golang.org/grpc/status"
    24  	"google.golang.org/protobuf/proto"
    25  )
    26  
    27  // Suppress "imported and not used" errors
    28  var _ codes.Code
    29  var _ io.Reader
    30  var _ status.Status
    31  var _ = runtime.String
    32  var _ = utilities.NewDoubleArray
    33  var _ = metadata.Join
    34  
    35  var (
    36  	filter_UnannotatedEchoService_Echo_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
    37  )
    38  
    39  func request_UnannotatedEchoService_Echo_0(ctx context.Context, marshaler runtime.Marshaler, client extExamplepb.UnannotatedEchoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
    40  	var protoReq extExamplepb.UnannotatedSimpleMessage
    41  	var metadata runtime.ServerMetadata
    42  
    43  	var (
    44  		val string
    45  		ok  bool
    46  		err error
    47  		_   = err
    48  	)
    49  
    50  	val, ok = pathParams["id"]
    51  	if !ok {
    52  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
    53  	}
    54  
    55  	protoReq.Id, err = runtime.String(val)
    56  	if err != nil {
    57  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
    58  	}
    59  
    60  	if err := req.ParseForm(); err != nil {
    61  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
    62  	}
    63  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UnannotatedEchoService_Echo_0); err != nil {
    64  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
    65  	}
    66  
    67  	msg, err := client.Echo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
    68  	return msg, metadata, err
    69  
    70  }
    71  
    72  func local_request_UnannotatedEchoService_Echo_0(ctx context.Context, marshaler runtime.Marshaler, server extExamplepb.UnannotatedEchoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
    73  	var protoReq extExamplepb.UnannotatedSimpleMessage
    74  	var metadata runtime.ServerMetadata
    75  
    76  	var (
    77  		val string
    78  		ok  bool
    79  		err error
    80  		_   = err
    81  	)
    82  
    83  	val, ok = pathParams["id"]
    84  	if !ok {
    85  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
    86  	}
    87  
    88  	protoReq.Id, err = runtime.String(val)
    89  	if err != nil {
    90  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
    91  	}
    92  
    93  	if err := req.ParseForm(); err != nil {
    94  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
    95  	}
    96  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UnannotatedEchoService_Echo_0); err != nil {
    97  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
    98  	}
    99  
   100  	msg, err := server.Echo(ctx, &protoReq)
   101  	return msg, metadata, err
   102  
   103  }
   104  
   105  var (
   106  	filter_UnannotatedEchoService_Echo_1 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0, "num": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}
   107  )
   108  
   109  func request_UnannotatedEchoService_Echo_1(ctx context.Context, marshaler runtime.Marshaler, client extExamplepb.UnannotatedEchoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   110  	var protoReq extExamplepb.UnannotatedSimpleMessage
   111  	var metadata runtime.ServerMetadata
   112  
   113  	var (
   114  		val string
   115  		ok  bool
   116  		err error
   117  		_   = err
   118  	)
   119  
   120  	val, ok = pathParams["id"]
   121  	if !ok {
   122  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
   123  	}
   124  
   125  	protoReq.Id, err = runtime.String(val)
   126  	if err != nil {
   127  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
   128  	}
   129  
   130  	val, ok = pathParams["num"]
   131  	if !ok {
   132  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "num")
   133  	}
   134  
   135  	protoReq.Num, err = runtime.Int64(val)
   136  	if err != nil {
   137  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "num", err)
   138  	}
   139  
   140  	if err := req.ParseForm(); err != nil {
   141  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   142  	}
   143  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UnannotatedEchoService_Echo_1); err != nil {
   144  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   145  	}
   146  
   147  	msg, err := client.Echo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
   148  	return msg, metadata, err
   149  
   150  }
   151  
   152  func local_request_UnannotatedEchoService_Echo_1(ctx context.Context, marshaler runtime.Marshaler, server extExamplepb.UnannotatedEchoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   153  	var protoReq extExamplepb.UnannotatedSimpleMessage
   154  	var metadata runtime.ServerMetadata
   155  
   156  	var (
   157  		val string
   158  		ok  bool
   159  		err error
   160  		_   = err
   161  	)
   162  
   163  	val, ok = pathParams["id"]
   164  	if !ok {
   165  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
   166  	}
   167  
   168  	protoReq.Id, err = runtime.String(val)
   169  	if err != nil {
   170  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
   171  	}
   172  
   173  	val, ok = pathParams["num"]
   174  	if !ok {
   175  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "num")
   176  	}
   177  
   178  	protoReq.Num, err = runtime.Int64(val)
   179  	if err != nil {
   180  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "num", err)
   181  	}
   182  
   183  	if err := req.ParseForm(); err != nil {
   184  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   185  	}
   186  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UnannotatedEchoService_Echo_1); err != nil {
   187  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   188  	}
   189  
   190  	msg, err := server.Echo(ctx, &protoReq)
   191  	return msg, metadata, err
   192  
   193  }
   194  
   195  var (
   196  	filter_UnannotatedEchoService_Echo_2 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0, "num": 1, "lang": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}}
   197  )
   198  
   199  func request_UnannotatedEchoService_Echo_2(ctx context.Context, marshaler runtime.Marshaler, client extExamplepb.UnannotatedEchoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   200  	var protoReq extExamplepb.UnannotatedSimpleMessage
   201  	var metadata runtime.ServerMetadata
   202  
   203  	var (
   204  		val string
   205  		ok  bool
   206  		err error
   207  		_   = err
   208  	)
   209  
   210  	val, ok = pathParams["id"]
   211  	if !ok {
   212  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
   213  	}
   214  
   215  	protoReq.Id, err = runtime.String(val)
   216  	if err != nil {
   217  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
   218  	}
   219  
   220  	val, ok = pathParams["num"]
   221  	if !ok {
   222  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "num")
   223  	}
   224  
   225  	protoReq.Num, err = runtime.Int64(val)
   226  	if err != nil {
   227  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "num", err)
   228  	}
   229  
   230  	val, ok = pathParams["lang"]
   231  	if !ok {
   232  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "lang")
   233  	}
   234  
   235  	if protoReq.Code == nil {
   236  		protoReq.Code = &extExamplepb.UnannotatedSimpleMessage_Lang{}
   237  	} else if _, ok := protoReq.Code.(*extExamplepb.UnannotatedSimpleMessage_Lang); !ok {
   238  		return nil, metadata, status.Errorf(codes.InvalidArgument, "expect type: *extExamplepb.UnannotatedSimpleMessage_Lang, but: %t\n", protoReq.Code)
   239  	}
   240  	protoReq.Code.(*extExamplepb.UnannotatedSimpleMessage_Lang).Lang, err = runtime.String(val)
   241  	if err != nil {
   242  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "lang", err)
   243  	}
   244  
   245  	if err := req.ParseForm(); err != nil {
   246  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   247  	}
   248  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UnannotatedEchoService_Echo_2); err != nil {
   249  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   250  	}
   251  
   252  	msg, err := client.Echo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
   253  	return msg, metadata, err
   254  
   255  }
   256  
   257  func local_request_UnannotatedEchoService_Echo_2(ctx context.Context, marshaler runtime.Marshaler, server extExamplepb.UnannotatedEchoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   258  	var protoReq extExamplepb.UnannotatedSimpleMessage
   259  	var metadata runtime.ServerMetadata
   260  
   261  	var (
   262  		val string
   263  		ok  bool
   264  		err error
   265  		_   = err
   266  	)
   267  
   268  	val, ok = pathParams["id"]
   269  	if !ok {
   270  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
   271  	}
   272  
   273  	protoReq.Id, err = runtime.String(val)
   274  	if err != nil {
   275  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
   276  	}
   277  
   278  	val, ok = pathParams["num"]
   279  	if !ok {
   280  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "num")
   281  	}
   282  
   283  	protoReq.Num, err = runtime.Int64(val)
   284  	if err != nil {
   285  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "num", err)
   286  	}
   287  
   288  	val, ok = pathParams["lang"]
   289  	if !ok {
   290  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "lang")
   291  	}
   292  
   293  	if protoReq.Code == nil {
   294  		protoReq.Code = &extExamplepb.UnannotatedSimpleMessage_Lang{}
   295  	} else if _, ok := protoReq.Code.(*extExamplepb.UnannotatedSimpleMessage_Lang); !ok {
   296  		return nil, metadata, status.Errorf(codes.InvalidArgument, "expect type: *extExamplepb.UnannotatedSimpleMessage_Lang, but: %t\n", protoReq.Code)
   297  	}
   298  	protoReq.Code.(*extExamplepb.UnannotatedSimpleMessage_Lang).Lang, err = runtime.String(val)
   299  	if err != nil {
   300  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "lang", err)
   301  	}
   302  
   303  	if err := req.ParseForm(); err != nil {
   304  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   305  	}
   306  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UnannotatedEchoService_Echo_2); err != nil {
   307  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   308  	}
   309  
   310  	msg, err := server.Echo(ctx, &protoReq)
   311  	return msg, metadata, err
   312  
   313  }
   314  
   315  var (
   316  	filter_UnannotatedEchoService_Echo_3 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0, "line_num": 1, "status": 2, "note": 3}, Base: []int{1, 1, 2, 1, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 4, 2, 3, 5}}
   317  )
   318  
   319  func request_UnannotatedEchoService_Echo_3(ctx context.Context, marshaler runtime.Marshaler, client extExamplepb.UnannotatedEchoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   320  	var protoReq extExamplepb.UnannotatedSimpleMessage
   321  	var metadata runtime.ServerMetadata
   322  
   323  	var (
   324  		val string
   325  		ok  bool
   326  		err error
   327  		_   = err
   328  	)
   329  
   330  	val, ok = pathParams["id"]
   331  	if !ok {
   332  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
   333  	}
   334  
   335  	protoReq.Id, err = runtime.String(val)
   336  	if err != nil {
   337  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
   338  	}
   339  
   340  	val, ok = pathParams["line_num"]
   341  	if !ok {
   342  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "line_num")
   343  	}
   344  
   345  	if protoReq.Code == nil {
   346  		protoReq.Code = &extExamplepb.UnannotatedSimpleMessage_LineNum{}
   347  	} else if _, ok := protoReq.Code.(*extExamplepb.UnannotatedSimpleMessage_LineNum); !ok {
   348  		return nil, metadata, status.Errorf(codes.InvalidArgument, "expect type: *extExamplepb.UnannotatedSimpleMessage_LineNum, but: %t\n", protoReq.Code)
   349  	}
   350  	protoReq.Code.(*extExamplepb.UnannotatedSimpleMessage_LineNum).LineNum, err = runtime.Int64(val)
   351  	if err != nil {
   352  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "line_num", err)
   353  	}
   354  
   355  	val, ok = pathParams["status.note"]
   356  	if !ok {
   357  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status.note")
   358  	}
   359  
   360  	err = runtime.PopulateFieldFromPath(&protoReq, "status.note", val)
   361  	if err != nil {
   362  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status.note", err)
   363  	}
   364  
   365  	if err := req.ParseForm(); err != nil {
   366  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   367  	}
   368  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UnannotatedEchoService_Echo_3); err != nil {
   369  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   370  	}
   371  
   372  	msg, err := client.Echo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
   373  	return msg, metadata, err
   374  
   375  }
   376  
   377  func local_request_UnannotatedEchoService_Echo_3(ctx context.Context, marshaler runtime.Marshaler, server extExamplepb.UnannotatedEchoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   378  	var protoReq extExamplepb.UnannotatedSimpleMessage
   379  	var metadata runtime.ServerMetadata
   380  
   381  	var (
   382  		val string
   383  		ok  bool
   384  		err error
   385  		_   = err
   386  	)
   387  
   388  	val, ok = pathParams["id"]
   389  	if !ok {
   390  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
   391  	}
   392  
   393  	protoReq.Id, err = runtime.String(val)
   394  	if err != nil {
   395  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
   396  	}
   397  
   398  	val, ok = pathParams["line_num"]
   399  	if !ok {
   400  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "line_num")
   401  	}
   402  
   403  	if protoReq.Code == nil {
   404  		protoReq.Code = &extExamplepb.UnannotatedSimpleMessage_LineNum{}
   405  	} else if _, ok := protoReq.Code.(*extExamplepb.UnannotatedSimpleMessage_LineNum); !ok {
   406  		return nil, metadata, status.Errorf(codes.InvalidArgument, "expect type: *extExamplepb.UnannotatedSimpleMessage_LineNum, but: %t\n", protoReq.Code)
   407  	}
   408  	protoReq.Code.(*extExamplepb.UnannotatedSimpleMessage_LineNum).LineNum, err = runtime.Int64(val)
   409  	if err != nil {
   410  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "line_num", err)
   411  	}
   412  
   413  	val, ok = pathParams["status.note"]
   414  	if !ok {
   415  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status.note")
   416  	}
   417  
   418  	err = runtime.PopulateFieldFromPath(&protoReq, "status.note", val)
   419  	if err != nil {
   420  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status.note", err)
   421  	}
   422  
   423  	if err := req.ParseForm(); err != nil {
   424  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   425  	}
   426  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UnannotatedEchoService_Echo_3); err != nil {
   427  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   428  	}
   429  
   430  	msg, err := server.Echo(ctx, &protoReq)
   431  	return msg, metadata, err
   432  
   433  }
   434  
   435  var (
   436  	filter_UnannotatedEchoService_Echo_4 = &utilities.DoubleArray{Encoding: map[string]int{"no": 0, "note": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}}
   437  )
   438  
   439  func request_UnannotatedEchoService_Echo_4(ctx context.Context, marshaler runtime.Marshaler, client extExamplepb.UnannotatedEchoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   440  	var protoReq extExamplepb.UnannotatedSimpleMessage
   441  	var metadata runtime.ServerMetadata
   442  
   443  	var (
   444  		val string
   445  		ok  bool
   446  		err error
   447  		_   = err
   448  	)
   449  
   450  	val, ok = pathParams["no.note"]
   451  	if !ok {
   452  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "no.note")
   453  	}
   454  
   455  	err = runtime.PopulateFieldFromPath(&protoReq, "no.note", val)
   456  	if err != nil {
   457  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "no.note", err)
   458  	}
   459  
   460  	if err := req.ParseForm(); err != nil {
   461  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   462  	}
   463  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UnannotatedEchoService_Echo_4); err != nil {
   464  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   465  	}
   466  
   467  	msg, err := client.Echo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
   468  	return msg, metadata, err
   469  
   470  }
   471  
   472  func local_request_UnannotatedEchoService_Echo_4(ctx context.Context, marshaler runtime.Marshaler, server extExamplepb.UnannotatedEchoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   473  	var protoReq extExamplepb.UnannotatedSimpleMessage
   474  	var metadata runtime.ServerMetadata
   475  
   476  	var (
   477  		val string
   478  		ok  bool
   479  		err error
   480  		_   = err
   481  	)
   482  
   483  	val, ok = pathParams["no.note"]
   484  	if !ok {
   485  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "no.note")
   486  	}
   487  
   488  	err = runtime.PopulateFieldFromPath(&protoReq, "no.note", val)
   489  	if err != nil {
   490  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "no.note", err)
   491  	}
   492  
   493  	if err := req.ParseForm(); err != nil {
   494  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   495  	}
   496  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UnannotatedEchoService_Echo_4); err != nil {
   497  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   498  	}
   499  
   500  	msg, err := server.Echo(ctx, &protoReq)
   501  	return msg, metadata, err
   502  
   503  }
   504  
   505  func request_UnannotatedEchoService_EchoBody_0(ctx context.Context, marshaler runtime.Marshaler, client extExamplepb.UnannotatedEchoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   506  	var protoReq extExamplepb.UnannotatedSimpleMessage
   507  	var metadata runtime.ServerMetadata
   508  
   509  	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
   510  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   511  	}
   512  
   513  	msg, err := client.EchoBody(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
   514  	return msg, metadata, err
   515  
   516  }
   517  
   518  func local_request_UnannotatedEchoService_EchoBody_0(ctx context.Context, marshaler runtime.Marshaler, server extExamplepb.UnannotatedEchoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   519  	var protoReq extExamplepb.UnannotatedSimpleMessage
   520  	var metadata runtime.ServerMetadata
   521  
   522  	if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
   523  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   524  	}
   525  
   526  	msg, err := server.EchoBody(ctx, &protoReq)
   527  	return msg, metadata, err
   528  
   529  }
   530  
   531  var (
   532  	filter_UnannotatedEchoService_EchoDelete_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
   533  )
   534  
   535  func request_UnannotatedEchoService_EchoDelete_0(ctx context.Context, marshaler runtime.Marshaler, client extExamplepb.UnannotatedEchoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   536  	var protoReq extExamplepb.UnannotatedSimpleMessage
   537  	var metadata runtime.ServerMetadata
   538  
   539  	if err := req.ParseForm(); err != nil {
   540  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   541  	}
   542  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UnannotatedEchoService_EchoDelete_0); err != nil {
   543  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   544  	}
   545  
   546  	msg, err := client.EchoDelete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
   547  	return msg, metadata, err
   548  
   549  }
   550  
   551  func local_request_UnannotatedEchoService_EchoDelete_0(ctx context.Context, marshaler runtime.Marshaler, server extExamplepb.UnannotatedEchoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   552  	var protoReq extExamplepb.UnannotatedSimpleMessage
   553  	var metadata runtime.ServerMetadata
   554  
   555  	if err := req.ParseForm(); err != nil {
   556  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   557  	}
   558  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UnannotatedEchoService_EchoDelete_0); err != nil {
   559  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   560  	}
   561  
   562  	msg, err := server.EchoDelete(ctx, &protoReq)
   563  	return msg, metadata, err
   564  
   565  }
   566  
   567  // RegisterUnannotatedEchoServiceHandlerServer registers the http handlers for service UnannotatedEchoService to "mux".
   568  // UnaryRPC     :call UnannotatedEchoServiceServer directly.
   569  // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
   570  // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUnannotatedEchoServiceHandlerFromEndpoint instead.
   571  func RegisterUnannotatedEchoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extExamplepb.UnannotatedEchoServiceServer) error {
   572  
   573  	mux.Handle("POST", pattern_UnannotatedEchoService_Echo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   574  		ctx, cancel := context.WithCancel(req.Context())
   575  		defer cancel()
   576  		var stream runtime.ServerTransportStream
   577  		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
   578  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   579  		var err error
   580  		var annotatedContext context.Context
   581  		annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo/{id}"))
   582  		if err != nil {
   583  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   584  			return
   585  		}
   586  		resp, md, err := local_request_UnannotatedEchoService_Echo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
   587  		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
   588  		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
   589  		if err != nil {
   590  			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
   591  			return
   592  		}
   593  
   594  		forward_UnannotatedEchoService_Echo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   595  
   596  	})
   597  
   598  	mux.Handle("GET", pattern_UnannotatedEchoService_Echo_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   599  		ctx, cancel := context.WithCancel(req.Context())
   600  		defer cancel()
   601  		var stream runtime.ServerTransportStream
   602  		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
   603  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   604  		var err error
   605  		var annotatedContext context.Context
   606  		annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo/{id}/{num}"))
   607  		if err != nil {
   608  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   609  			return
   610  		}
   611  		resp, md, err := local_request_UnannotatedEchoService_Echo_1(annotatedContext, inboundMarshaler, server, req, pathParams)
   612  		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
   613  		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
   614  		if err != nil {
   615  			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
   616  			return
   617  		}
   618  
   619  		forward_UnannotatedEchoService_Echo_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   620  
   621  	})
   622  
   623  	mux.Handle("GET", pattern_UnannotatedEchoService_Echo_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   624  		ctx, cancel := context.WithCancel(req.Context())
   625  		defer cancel()
   626  		var stream runtime.ServerTransportStream
   627  		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
   628  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   629  		var err error
   630  		var annotatedContext context.Context
   631  		annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo/{id}/{num}/{lang}"))
   632  		if err != nil {
   633  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   634  			return
   635  		}
   636  		resp, md, err := local_request_UnannotatedEchoService_Echo_2(annotatedContext, inboundMarshaler, server, req, pathParams)
   637  		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
   638  		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
   639  		if err != nil {
   640  			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
   641  			return
   642  		}
   643  
   644  		forward_UnannotatedEchoService_Echo_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   645  
   646  	})
   647  
   648  	mux.Handle("GET", pattern_UnannotatedEchoService_Echo_3, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   649  		ctx, cancel := context.WithCancel(req.Context())
   650  		defer cancel()
   651  		var stream runtime.ServerTransportStream
   652  		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
   653  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   654  		var err error
   655  		var annotatedContext context.Context
   656  		annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo1/{id}/{line_num}/{status.note}"))
   657  		if err != nil {
   658  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   659  			return
   660  		}
   661  		resp, md, err := local_request_UnannotatedEchoService_Echo_3(annotatedContext, inboundMarshaler, server, req, pathParams)
   662  		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
   663  		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
   664  		if err != nil {
   665  			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
   666  			return
   667  		}
   668  
   669  		forward_UnannotatedEchoService_Echo_3(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   670  
   671  	})
   672  
   673  	mux.Handle("GET", pattern_UnannotatedEchoService_Echo_4, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   674  		ctx, cancel := context.WithCancel(req.Context())
   675  		defer cancel()
   676  		var stream runtime.ServerTransportStream
   677  		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
   678  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   679  		var err error
   680  		var annotatedContext context.Context
   681  		annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo2/{no.note}"))
   682  		if err != nil {
   683  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   684  			return
   685  		}
   686  		resp, md, err := local_request_UnannotatedEchoService_Echo_4(annotatedContext, inboundMarshaler, server, req, pathParams)
   687  		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
   688  		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
   689  		if err != nil {
   690  			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
   691  			return
   692  		}
   693  
   694  		forward_UnannotatedEchoService_Echo_4(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   695  
   696  	})
   697  
   698  	mux.Handle("POST", pattern_UnannotatedEchoService_EchoBody_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   699  		ctx, cancel := context.WithCancel(req.Context())
   700  		defer cancel()
   701  		var stream runtime.ServerTransportStream
   702  		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
   703  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   704  		var err error
   705  		var annotatedContext context.Context
   706  		annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoBody", runtime.WithHTTPPathPattern("/v2/example/echo_body"))
   707  		if err != nil {
   708  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   709  			return
   710  		}
   711  		resp, md, err := local_request_UnannotatedEchoService_EchoBody_0(annotatedContext, inboundMarshaler, server, req, pathParams)
   712  		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
   713  		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
   714  		if err != nil {
   715  			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
   716  			return
   717  		}
   718  
   719  		forward_UnannotatedEchoService_EchoBody_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   720  
   721  	})
   722  
   723  	mux.Handle("DELETE", pattern_UnannotatedEchoService_EchoDelete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   724  		ctx, cancel := context.WithCancel(req.Context())
   725  		defer cancel()
   726  		var stream runtime.ServerTransportStream
   727  		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
   728  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   729  		var err error
   730  		var annotatedContext context.Context
   731  		annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoDelete", runtime.WithHTTPPathPattern("/v2/example/echo_delete"))
   732  		if err != nil {
   733  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   734  			return
   735  		}
   736  		resp, md, err := local_request_UnannotatedEchoService_EchoDelete_0(annotatedContext, inboundMarshaler, server, req, pathParams)
   737  		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
   738  		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
   739  		if err != nil {
   740  			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
   741  			return
   742  		}
   743  
   744  		forward_UnannotatedEchoService_EchoDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   745  
   746  	})
   747  
   748  	return nil
   749  }
   750  
   751  // RegisterUnannotatedEchoServiceHandlerFromEndpoint is same as RegisterUnannotatedEchoServiceHandler but
   752  // automatically dials to "endpoint" and closes the connection when "ctx" gets done.
   753  func RegisterUnannotatedEchoServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
   754  	conn, err := grpc.DialContext(ctx, endpoint, opts...)
   755  	if err != nil {
   756  		return err
   757  	}
   758  	defer func() {
   759  		if err != nil {
   760  			if cerr := conn.Close(); cerr != nil {
   761  				grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
   762  			}
   763  			return
   764  		}
   765  		go func() {
   766  			<-ctx.Done()
   767  			if cerr := conn.Close(); cerr != nil {
   768  				grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
   769  			}
   770  		}()
   771  	}()
   772  
   773  	return RegisterUnannotatedEchoServiceHandler(ctx, mux, conn)
   774  }
   775  
   776  // RegisterUnannotatedEchoServiceHandler registers the http handlers for service UnannotatedEchoService to "mux".
   777  // The handlers forward requests to the grpc endpoint over "conn".
   778  func RegisterUnannotatedEchoServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
   779  	return RegisterUnannotatedEchoServiceHandlerClient(ctx, mux, extExamplepb.NewUnannotatedEchoServiceClient(conn))
   780  }
   781  
   782  // RegisterUnannotatedEchoServiceHandlerClient registers the http handlers for service UnannotatedEchoService
   783  // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "extExamplepb.UnannotatedEchoServiceClient".
   784  // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "extExamplepb.UnannotatedEchoServiceClient"
   785  // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
   786  // "extExamplepb.UnannotatedEchoServiceClient" to call the correct interceptors.
   787  func RegisterUnannotatedEchoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extExamplepb.UnannotatedEchoServiceClient) error {
   788  
   789  	mux.Handle("POST", pattern_UnannotatedEchoService_Echo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   790  		ctx, cancel := context.WithCancel(req.Context())
   791  		defer cancel()
   792  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   793  		var err error
   794  		var annotatedContext context.Context
   795  		annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo/{id}"))
   796  		if err != nil {
   797  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   798  			return
   799  		}
   800  		resp, md, err := request_UnannotatedEchoService_Echo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
   801  		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
   802  		if err != nil {
   803  			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
   804  			return
   805  		}
   806  
   807  		forward_UnannotatedEchoService_Echo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   808  
   809  	})
   810  
   811  	mux.Handle("GET", pattern_UnannotatedEchoService_Echo_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   812  		ctx, cancel := context.WithCancel(req.Context())
   813  		defer cancel()
   814  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   815  		var err error
   816  		var annotatedContext context.Context
   817  		annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo/{id}/{num}"))
   818  		if err != nil {
   819  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   820  			return
   821  		}
   822  		resp, md, err := request_UnannotatedEchoService_Echo_1(annotatedContext, inboundMarshaler, client, req, pathParams)
   823  		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
   824  		if err != nil {
   825  			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
   826  			return
   827  		}
   828  
   829  		forward_UnannotatedEchoService_Echo_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   830  
   831  	})
   832  
   833  	mux.Handle("GET", pattern_UnannotatedEchoService_Echo_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   834  		ctx, cancel := context.WithCancel(req.Context())
   835  		defer cancel()
   836  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   837  		var err error
   838  		var annotatedContext context.Context
   839  		annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo/{id}/{num}/{lang}"))
   840  		if err != nil {
   841  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   842  			return
   843  		}
   844  		resp, md, err := request_UnannotatedEchoService_Echo_2(annotatedContext, inboundMarshaler, client, req, pathParams)
   845  		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
   846  		if err != nil {
   847  			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
   848  			return
   849  		}
   850  
   851  		forward_UnannotatedEchoService_Echo_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   852  
   853  	})
   854  
   855  	mux.Handle("GET", pattern_UnannotatedEchoService_Echo_3, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   856  		ctx, cancel := context.WithCancel(req.Context())
   857  		defer cancel()
   858  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   859  		var err error
   860  		var annotatedContext context.Context
   861  		annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo1/{id}/{line_num}/{status.note}"))
   862  		if err != nil {
   863  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   864  			return
   865  		}
   866  		resp, md, err := request_UnannotatedEchoService_Echo_3(annotatedContext, inboundMarshaler, client, req, pathParams)
   867  		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
   868  		if err != nil {
   869  			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
   870  			return
   871  		}
   872  
   873  		forward_UnannotatedEchoService_Echo_3(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   874  
   875  	})
   876  
   877  	mux.Handle("GET", pattern_UnannotatedEchoService_Echo_4, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   878  		ctx, cancel := context.WithCancel(req.Context())
   879  		defer cancel()
   880  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   881  		var err error
   882  		var annotatedContext context.Context
   883  		annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo2/{no.note}"))
   884  		if err != nil {
   885  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   886  			return
   887  		}
   888  		resp, md, err := request_UnannotatedEchoService_Echo_4(annotatedContext, inboundMarshaler, client, req, pathParams)
   889  		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
   890  		if err != nil {
   891  			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
   892  			return
   893  		}
   894  
   895  		forward_UnannotatedEchoService_Echo_4(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   896  
   897  	})
   898  
   899  	mux.Handle("POST", pattern_UnannotatedEchoService_EchoBody_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   900  		ctx, cancel := context.WithCancel(req.Context())
   901  		defer cancel()
   902  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   903  		var err error
   904  		var annotatedContext context.Context
   905  		annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoBody", runtime.WithHTTPPathPattern("/v2/example/echo_body"))
   906  		if err != nil {
   907  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   908  			return
   909  		}
   910  		resp, md, err := request_UnannotatedEchoService_EchoBody_0(annotatedContext, inboundMarshaler, client, req, pathParams)
   911  		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
   912  		if err != nil {
   913  			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
   914  			return
   915  		}
   916  
   917  		forward_UnannotatedEchoService_EchoBody_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   918  
   919  	})
   920  
   921  	mux.Handle("DELETE", pattern_UnannotatedEchoService_EchoDelete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   922  		ctx, cancel := context.WithCancel(req.Context())
   923  		defer cancel()
   924  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   925  		var err error
   926  		var annotatedContext context.Context
   927  		annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoDelete", runtime.WithHTTPPathPattern("/v2/example/echo_delete"))
   928  		if err != nil {
   929  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   930  			return
   931  		}
   932  		resp, md, err := request_UnannotatedEchoService_EchoDelete_0(annotatedContext, inboundMarshaler, client, req, pathParams)
   933  		annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
   934  		if err != nil {
   935  			runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
   936  			return
   937  		}
   938  
   939  		forward_UnannotatedEchoService_EchoDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   940  
   941  	})
   942  
   943  	return nil
   944  }
   945  
   946  var (
   947  	pattern_UnannotatedEchoService_Echo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v2", "example", "echo", "id"}, ""))
   948  
   949  	pattern_UnannotatedEchoService_Echo_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"v2", "example", "echo", "id", "num"}, ""))
   950  
   951  	pattern_UnannotatedEchoService_Echo_2 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"v2", "example", "echo", "id", "num", "lang"}, ""))
   952  
   953  	pattern_UnannotatedEchoService_Echo_3 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"v2", "example", "echo1", "id", "line_num", "status.note"}, ""))
   954  
   955  	pattern_UnannotatedEchoService_Echo_4 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v2", "example", "echo2", "no.note"}, ""))
   956  
   957  	pattern_UnannotatedEchoService_EchoBody_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "example", "echo_body"}, ""))
   958  
   959  	pattern_UnannotatedEchoService_EchoDelete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "example", "echo_delete"}, ""))
   960  )
   961  
   962  var (
   963  	forward_UnannotatedEchoService_Echo_0 = runtime.ForwardResponseMessage
   964  
   965  	forward_UnannotatedEchoService_Echo_1 = runtime.ForwardResponseMessage
   966  
   967  	forward_UnannotatedEchoService_Echo_2 = runtime.ForwardResponseMessage
   968  
   969  	forward_UnannotatedEchoService_Echo_3 = runtime.ForwardResponseMessage
   970  
   971  	forward_UnannotatedEchoService_Echo_4 = runtime.ForwardResponseMessage
   972  
   973  	forward_UnannotatedEchoService_EchoBody_0 = runtime.ForwardResponseMessage
   974  
   975  	forward_UnannotatedEchoService_EchoDelete_0 = runtime.ForwardResponseMessage
   976  )
   977  

View as plain text