You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.5 KiB

// Code generated by protoc-gen-go-http. DO NOT EDIT.
// versions:
// - protoc-gen-go-http v2.7.3
// - protoc v5.27.1
// source: matchmaking/v1/backend/backend.proto
package v1
import (
context "context"
http "github.com/go-kratos/kratos/v2/transport/http"
binding "github.com/go-kratos/kratos/v2/transport/http/binding"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the kratos package it is being compiled against.
var _ = new(context.Context)
var _ = binding.EncodeURL
const _ = http.SupportPackageIsVersion1
const OperationBackendUpdateBotUsersByIsReal = "/matchmaking.v1.Backend/UpdateBotUsersByIsReal"
type BackendHTTPServer interface {
// UpdateBotUsersByIsReal UpdateBotUsersByIsReal 更新用户KYC认证
UpdateBotUsersByIsReal(context.Context, *BotUsersNullRequest) (*BotUsersReply, error)
}
func RegisterBackendHTTPServer(s *http.Server, srv BackendHTTPServer) {
r := s.Route("/")
r.POST("/order_backend/update_is_real", _Backend_UpdateBotUsersByIsReal0_HTTP_Handler(srv))
}
func _Backend_UpdateBotUsersByIsReal0_HTTP_Handler(srv BackendHTTPServer) func(ctx http.Context) error {
return func(ctx http.Context) error {
var in BotUsersNullRequest
if err := ctx.Bind(&in); err != nil {
return err
}
if err := ctx.BindQuery(&in); err != nil {
return err
}
http.SetOperation(ctx, OperationBackendUpdateBotUsersByIsReal)
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.UpdateBotUsersByIsReal(ctx, req.(*BotUsersNullRequest))
})
out, err := h(ctx, &in)
if err != nil {
return err
}
reply := out.(*BotUsersReply)
return ctx.Result(200, reply)
}
}
type BackendHTTPClient interface {
UpdateBotUsersByIsReal(ctx context.Context, req *BotUsersNullRequest, opts ...http.CallOption) (rsp *BotUsersReply, err error)
}
type BackendHTTPClientImpl struct {
cc *http.Client
}
func NewBackendHTTPClient(client *http.Client) BackendHTTPClient {
return &BackendHTTPClientImpl{client}
}
func (c *BackendHTTPClientImpl) UpdateBotUsersByIsReal(ctx context.Context, in *BotUsersNullRequest, opts ...http.CallOption) (*BotUsersReply, error) {
var out BotUsersReply
pattern := "/order_backend/update_is_real"
path := binding.EncodeURL(pattern, in, false)
opts = append(opts, http.Operation(OperationBackendUpdateBotUsersByIsReal))
opts = append(opts, http.PathTemplate(pattern))
err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
if err != nil {
return nil, err
}
return &out, nil
}