(srv DemoHTTPServer)
| 56 | } |
| 57 | |
| 58 | func _Demo_CreateUser0_HTTP_Handler(srv DemoHTTPServer) func(ctx http.Context) error { |
| 59 | return func(ctx http.Context) error { |
| 60 | var in CreateUserRequest |
| 61 | if err := ctx.Bind(&in); err != nil { |
| 62 | return err |
| 63 | } |
| 64 | if err := ctx.BindQuery(&in); err != nil { |
| 65 | return err |
| 66 | } |
| 67 | http.SetOperation(ctx, OperationDemoCreateUser) |
| 68 | h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { |
| 69 | return srv.CreateUser(ctx, req.(*CreateUserRequest)) |
| 70 | }) |
| 71 | out, err := h(ctx, &in) |
| 72 | if err != nil { |
| 73 | return err |
| 74 | } |
| 75 | reply := out.(*CreateUserReply) |
| 76 | return ctx.Result(200, reply) |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | type DemoHTTPClient interface { |
| 81 | CreateUser(ctx context.Context, req *CreateUserRequest, opts ...http.CallOption) (rsp *CreateUserReply, err error) |
no test coverage detected