| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 | // Code generated by protoc-gen-go-http. DO NOT EDIT.// versions:// protoc-gen-go-http v2.0.0package checkimport (	context "context"	base "git.ikuban.com/server/base-protobuf/kuban/api/base"	reply "git.ikuban.com/server/kratos-utils/http/reply"	http "github.com/go-kratos/kratos/v2/transport/http"	binding "github.com/go-kratos/kratos/v2/transport/http/binding"	ioutil "io/ioutil"	time "time")// 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.EncodeURLvar _ = ioutil.Discardvar _ = new(time.Time)var _ = new(reply.SuccessReply)var _ = new(base.Html)const _ = http.SupportPackageIsVersion1type CheckHTTPServer interface {	CheckTextHttp(context.Context, *CheckTextHttpRequest) (*CheckReply, error)}func RegisterCheckHTTPServer(s *http.Server, srv CheckHTTPServer) {	r := s.Route("/")	r.POST("/api/check/text", _Check_CheckTextHttp0_HTTP_Handler(srv))}func _Check_CheckTextHttp0_HTTP_Handler(srv CheckHTTPServer) func(ctx http.Context) error {	return func(ctx http.Context) error {		var in CheckTextHttpRequest		if err := ctx.Bind(&in); err != nil {			return err		}		if err := ctx.BindQuery(&in); err != nil {			return err		}		http.SetOperation(ctx, "/api.check.Check/CheckTextHttp")		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {			return srv.CheckTextHttp(ctx, req.(*CheckTextHttpRequest))		})		out, err := h(ctx, &in)		if err != nil {			return err		}		success := &reply.SuccessReply{			Code: 0,		}		if out != nil {			success.Data = out		}		return ctx.Result(200, success)	}}type CheckHTTPClient interface {	CheckTextHttp(ctx context.Context, req *CheckTextHttpRequest, opts ...http.CallOption) (rsp *CheckReply, err error)}type CheckHTTPClientImpl struct {	cc *http.Client}func NewCheckHTTPClient(client *http.Client) CheckHTTPClient {	return &CheckHTTPClientImpl{client}}func (c *CheckHTTPClientImpl) CheckTextHttp(ctx context.Context, in *CheckTextHttpRequest, opts ...http.CallOption) (*CheckReply, error) {	var out CheckReply	pattern := "/api/check/text"	path := binding.EncodeURL(pattern, in, false)	opts = append(opts, http.Operation("/api.check.Check/CheckTextHttp"))	opts = append(opts, http.PathTemplate(pattern))	err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)	if err != nil {		return nil, err	}	return &out, err}
 |