Documentation ¶
Overview ¶
Package v1 is a generated blademaster stub package. This code was generated with go-common/app/tool/bmgen/protoc-gen-bm v0.1.
It is generated from these files:
api/grpc/v1/api.proto
Index ¶
- Constants
- Variables
- func RegisterV1XCaptchaService(e *bm.Engine, svc XCaptcha, midMap map[string]bm.HandlerFunc)
- func RegisterXCaptchaServer(s *grpc.Server, srv XCaptchaServer)
- type CheckReq
- func (*CheckReq) Descriptor() ([]byte, []int)
- func (m *CheckReq) GetAnti() string
- func (m *CheckReq) GetClientIp() string
- func (m *CheckReq) GetUid() int64
- func (m *CheckReq) Marshal() (dAtA []byte, err error)
- func (m *CheckReq) MarshalTo(dAtA []byte) (int, error)
- func (*CheckReq) ProtoMessage()
- func (m *CheckReq) Reset()
- func (m *CheckReq) Size() (n int)
- func (m *CheckReq) String() string
- func (m *CheckReq) Unmarshal(dAtA []byte) error
- func (m *CheckReq) XXX_DiscardUnknown()
- func (m *CheckReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *CheckReq) XXX_Merge(src proto.Message)
- func (m *CheckReq) XXX_Size() int
- func (m *CheckReq) XXX_Unmarshal(b []byte) error
- type CheckResp
- func (*CheckResp) Descriptor() ([]byte, []int)
- func (m *CheckResp) GetToken() string
- func (m *CheckResp) GetType() int64
- func (m *CheckResp) Marshal() (dAtA []byte, err error)
- func (m *CheckResp) MarshalTo(dAtA []byte) (int, error)
- func (*CheckResp) ProtoMessage()
- func (m *CheckResp) Reset()
- func (m *CheckResp) Size() (n int)
- func (m *CheckResp) String() string
- func (m *CheckResp) Unmarshal(dAtA []byte) error
- func (m *CheckResp) XXX_DiscardUnknown()
- func (m *CheckResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *CheckResp) XXX_Merge(src proto.Message)
- func (m *CheckResp) XXX_Size() int
- func (m *CheckResp) XXX_Unmarshal(b []byte) error
- type Client
- type GeeTest
- func (*GeeTest) Descriptor() ([]byte, []int)
- func (m *GeeTest) GetChallenge() string
- func (m *GeeTest) GetGt() string
- func (m *GeeTest) Marshal() (dAtA []byte, err error)
- func (m *GeeTest) MarshalTo(dAtA []byte) (int, error)
- func (*GeeTest) ProtoMessage()
- func (m *GeeTest) Reset()
- func (m *GeeTest) Size() (n int)
- func (m *GeeTest) String() string
- func (m *GeeTest) Unmarshal(dAtA []byte) error
- func (m *GeeTest) XXX_DiscardUnknown()
- func (m *GeeTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GeeTest) XXX_Merge(src proto.Message)
- func (m *GeeTest) XXX_Size() int
- func (m *GeeTest) XXX_Unmarshal(b []byte) error
- type Image
- func (*Image) Descriptor() ([]byte, []int)
- func (m *Image) GetContent() string
- func (m *Image) GetTips() string
- func (m *Image) GetToken() string
- func (m *Image) Marshal() (dAtA []byte, err error)
- func (m *Image) MarshalTo(dAtA []byte) (int, error)
- func (*Image) ProtoMessage()
- func (m *Image) Reset()
- func (m *Image) Size() (n int)
- func (m *Image) String() string
- func (m *Image) Unmarshal(dAtA []byte) error
- func (m *Image) XXX_DiscardUnknown()
- func (m *Image) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Image) XXX_Merge(src proto.Message)
- func (m *Image) XXX_Size() int
- func (m *Image) XXX_Unmarshal(b []byte) error
- type XCaptcha
- type XCaptchaClient
- type XCaptchaServer
- type XCreateCaptchaReq
- func (*XCreateCaptchaReq) Descriptor() ([]byte, []int)
- func (m *XCreateCaptchaReq) GetClientIp() string
- func (m *XCreateCaptchaReq) GetClientType() string
- func (m *XCreateCaptchaReq) GetHeight() int64
- func (m *XCreateCaptchaReq) GetType() int64
- func (m *XCreateCaptchaReq) GetUid() int64
- func (m *XCreateCaptchaReq) GetWidth() int64
- func (m *XCreateCaptchaReq) Marshal() (dAtA []byte, err error)
- func (m *XCreateCaptchaReq) MarshalTo(dAtA []byte) (int, error)
- func (*XCreateCaptchaReq) ProtoMessage()
- func (m *XCreateCaptchaReq) Reset()
- func (m *XCreateCaptchaReq) Size() (n int)
- func (m *XCreateCaptchaReq) String() string
- func (m *XCreateCaptchaReq) Unmarshal(dAtA []byte) error
- func (m *XCreateCaptchaReq) XXX_DiscardUnknown()
- func (m *XCreateCaptchaReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *XCreateCaptchaReq) XXX_Merge(src proto.Message)
- func (m *XCreateCaptchaReq) XXX_Size() int
- func (m *XCreateCaptchaReq) XXX_Unmarshal(b []byte) error
- type XCreateCaptchaResp
- func (*XCreateCaptchaResp) Descriptor() ([]byte, []int)
- func (m *XCreateCaptchaResp) GetGeetest() *GeeTest
- func (m *XCreateCaptchaResp) GetImage() *Image
- func (m *XCreateCaptchaResp) GetType() int64
- func (m *XCreateCaptchaResp) Marshal() (dAtA []byte, err error)
- func (m *XCreateCaptchaResp) MarshalTo(dAtA []byte) (int, error)
- func (*XCreateCaptchaResp) ProtoMessage()
- func (m *XCreateCaptchaResp) Reset()
- func (m *XCreateCaptchaResp) Size() (n int)
- func (m *XCreateCaptchaResp) String() string
- func (m *XCreateCaptchaResp) Unmarshal(dAtA []byte) error
- func (m *XCreateCaptchaResp) XXX_DiscardUnknown()
- func (m *XCreateCaptchaResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *XCreateCaptchaResp) XXX_Merge(src proto.Message)
- func (m *XCreateCaptchaResp) XXX_Size() int
- func (m *XCreateCaptchaResp) XXX_Unmarshal(b []byte) error
- type XVerifyReq
- func (*XVerifyReq) Descriptor() ([]byte, []int)
- func (m *XVerifyReq) GetClientIp() string
- func (m *XVerifyReq) GetRoomId() int64
- func (m *XVerifyReq) GetUid() int64
- func (m *XVerifyReq) GetXAnti() string
- func (m *XVerifyReq) Marshal() (dAtA []byte, err error)
- func (m *XVerifyReq) MarshalTo(dAtA []byte) (int, error)
- func (*XVerifyReq) ProtoMessage()
- func (m *XVerifyReq) Reset()
- func (m *XVerifyReq) Size() (n int)
- func (m *XVerifyReq) String() string
- func (m *XVerifyReq) Unmarshal(dAtA []byte) error
- func (m *XVerifyReq) XXX_DiscardUnknown()
- func (m *XVerifyReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *XVerifyReq) XXX_Merge(src proto.Message)
- func (m *XVerifyReq) XXX_Size() int
- func (m *XVerifyReq) XXX_Unmarshal(b []byte) error
- type XVerifyResp
- func (*XVerifyResp) Descriptor() ([]byte, []int)
- func (m *XVerifyResp) Marshal() (dAtA []byte, err error)
- func (m *XVerifyResp) MarshalTo(dAtA []byte) (int, error)
- func (*XVerifyResp) ProtoMessage()
- func (m *XVerifyResp) Reset()
- func (m *XVerifyResp) Size() (n int)
- func (m *XVerifyResp) String() string
- func (m *XVerifyResp) Unmarshal(dAtA []byte) error
- func (m *XVerifyResp) XXX_DiscardUnknown()
- func (m *XVerifyResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *XVerifyResp) XXX_Merge(src proto.Message)
- func (m *XVerifyResp) XXX_Size() int
- func (m *XVerifyResp) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const AppID = "live.xcaptcha"
AppID 服务app_id
Variables ¶
View Source
var ( ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterV1XCaptchaService ¶
RegisterV1XCaptchaService Register the blademaster route with middleware map midMap is the middleware map, the key is defined in proto
func RegisterXCaptchaServer ¶
func RegisterXCaptchaServer(s *grpc.Server, srv XCaptchaServer)
Types ¶
type CheckReq ¶
type CheckReq struct { Anti string `protobuf:"bytes,1,opt,name=anti,proto3" json:"anti,omitempty" form:"anti" validate:"required"` Uid int64 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty" form:"uid" validate:"required"` ClientIp string `protobuf:"bytes,3,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty" form:"client_ip"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CheckReq) Descriptor ¶
func (*CheckReq) GetClientIp ¶
func (*CheckReq) ProtoMessage ¶
func (*CheckReq) ProtoMessage()
func (*CheckReq) XXX_DiscardUnknown ¶
func (m *CheckReq) XXX_DiscardUnknown()
func (*CheckReq) XXX_Marshal ¶
func (*CheckReq) XXX_Unmarshal ¶
type CheckResp ¶
type CheckResp struct { Type int64 `protobuf:"varint,1,opt,name=type,proto3" json:"type"` Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CheckResp) Descriptor ¶
func (*CheckResp) ProtoMessage ¶
func (*CheckResp) ProtoMessage()
func (*CheckResp) XXX_DiscardUnknown ¶
func (m *CheckResp) XXX_DiscardUnknown()
func (*CheckResp) XXX_Marshal ¶
func (*CheckResp) XXX_Unmarshal ¶
type Client ¶
type Client struct {
XCaptchaClient
}
Client grpc xcaptcha
func NewClient ¶
func NewClient(cfg *warden.ClientConfig, opts ...grpc.DialOption) (*Client, error)
NewClient new resource grpc client
type GeeTest ¶
type GeeTest struct { Gt string `protobuf:"bytes,1,opt,name=gt,proto3" json:"gt"` Challenge string `protobuf:"bytes,2,opt,name=challenge,proto3" json:"challenge"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GeeTest) Descriptor ¶
func (*GeeTest) GetChallenge ¶
func (*GeeTest) ProtoMessage ¶
func (*GeeTest) ProtoMessage()
func (*GeeTest) XXX_DiscardUnknown ¶
func (m *GeeTest) XXX_DiscardUnknown()
func (*GeeTest) XXX_Marshal ¶
func (*GeeTest) XXX_Unmarshal ¶
type Image ¶
type Image struct { Tips string `protobuf:"bytes,1,opt,name=tips,proto3" json:"tips"` Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token"` Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Image) Descriptor ¶
func (*Image) GetContent ¶
func (*Image) ProtoMessage ¶
func (*Image) ProtoMessage()
func (*Image) XXX_DiscardUnknown ¶
func (m *Image) XXX_DiscardUnknown()
func (*Image) XXX_Marshal ¶
func (*Image) XXX_Unmarshal ¶
type XCaptcha ¶
type XCaptcha interface { // 创建验证码 Create(ctx context.Context, req *XCreateCaptchaReq) (resp *XCreateCaptchaResp, err error) // 二次校验checkToken `internal:"true"` Verify(ctx context.Context, req *XVerifyReq) (resp *XVerifyResp, err error) // 验证码校验 `internal:"true"` Check(ctx context.Context, req *CheckReq) (resp *CheckResp, err error) }
XCaptcha
type XCaptchaClient ¶
type XCaptchaClient interface { // 创建验证码 Create(ctx context.Context, in *XCreateCaptchaReq, opts ...grpc.CallOption) (*XCreateCaptchaResp, error) // 二次校验checkToken `internal:"true"` Verify(ctx context.Context, in *XVerifyReq, opts ...grpc.CallOption) (*XVerifyResp, error) // 验证码校验 `internal:"true"` Check(ctx context.Context, in *CheckReq, opts ...grpc.CallOption) (*CheckResp, error) }
XCaptchaClient is the client API for XCaptcha service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewXCaptchaClient ¶
func NewXCaptchaClient(cc *grpc.ClientConn) XCaptchaClient
type XCaptchaServer ¶
type XCaptchaServer interface { // 创建验证码 Create(context.Context, *XCreateCaptchaReq) (*XCreateCaptchaResp, error) // 二次校验checkToken `internal:"true"` Verify(context.Context, *XVerifyReq) (*XVerifyResp, error) // 验证码校验 `internal:"true"` Check(context.Context, *CheckReq) (*CheckResp, error) }
XCaptchaServer is the server API for XCaptcha service.
type XCreateCaptchaReq ¶
type XCreateCaptchaReq struct { Type int64 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty" form:"type"` ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty" form:"client_type"` Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty" form:"height"` Width int64 `protobuf:"varint,4,opt,name=width,proto3" json:"width,omitempty" form:"width"` Uid int64 `protobuf:"varint,5,opt,name=uid,proto3" json:"uid,omitempty" form:"uid"` ClientIp string `protobuf:"bytes,6,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty" form:"client_ip"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*XCreateCaptchaReq) Descriptor ¶
func (*XCreateCaptchaReq) Descriptor() ([]byte, []int)
func (*XCreateCaptchaReq) GetClientIp ¶
func (m *XCreateCaptchaReq) GetClientIp() string
func (*XCreateCaptchaReq) GetClientType ¶
func (m *XCreateCaptchaReq) GetClientType() string
func (*XCreateCaptchaReq) GetHeight ¶
func (m *XCreateCaptchaReq) GetHeight() int64
func (*XCreateCaptchaReq) GetType ¶
func (m *XCreateCaptchaReq) GetType() int64
func (*XCreateCaptchaReq) GetUid ¶
func (m *XCreateCaptchaReq) GetUid() int64
func (*XCreateCaptchaReq) GetWidth ¶
func (m *XCreateCaptchaReq) GetWidth() int64
func (*XCreateCaptchaReq) Marshal ¶
func (m *XCreateCaptchaReq) Marshal() (dAtA []byte, err error)
func (*XCreateCaptchaReq) MarshalTo ¶
func (m *XCreateCaptchaReq) MarshalTo(dAtA []byte) (int, error)
func (*XCreateCaptchaReq) ProtoMessage ¶
func (*XCreateCaptchaReq) ProtoMessage()
func (*XCreateCaptchaReq) Reset ¶
func (m *XCreateCaptchaReq) Reset()
func (*XCreateCaptchaReq) Size ¶
func (m *XCreateCaptchaReq) Size() (n int)
func (*XCreateCaptchaReq) String ¶
func (m *XCreateCaptchaReq) String() string
func (*XCreateCaptchaReq) Unmarshal ¶
func (m *XCreateCaptchaReq) Unmarshal(dAtA []byte) error
func (*XCreateCaptchaReq) XXX_DiscardUnknown ¶
func (m *XCreateCaptchaReq) XXX_DiscardUnknown()
func (*XCreateCaptchaReq) XXX_Marshal ¶
func (m *XCreateCaptchaReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*XCreateCaptchaReq) XXX_Merge ¶
func (dst *XCreateCaptchaReq) XXX_Merge(src proto.Message)
func (*XCreateCaptchaReq) XXX_Size ¶
func (m *XCreateCaptchaReq) XXX_Size() int
func (*XCreateCaptchaReq) XXX_Unmarshal ¶
func (m *XCreateCaptchaReq) XXX_Unmarshal(b []byte) error
type XCreateCaptchaResp ¶
type XCreateCaptchaResp struct { Type int64 `protobuf:"varint,1,opt,name=type,proto3" json:"type"` Geetest *GeeTest `protobuf:"bytes,2,opt,name=geetest" json:"geetest"` Image *Image `protobuf:"bytes,3,opt,name=image" json:"image"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*XCreateCaptchaResp) Descriptor ¶
func (*XCreateCaptchaResp) Descriptor() ([]byte, []int)
func (*XCreateCaptchaResp) GetGeetest ¶
func (m *XCreateCaptchaResp) GetGeetest() *GeeTest
func (*XCreateCaptchaResp) GetImage ¶
func (m *XCreateCaptchaResp) GetImage() *Image
func (*XCreateCaptchaResp) GetType ¶
func (m *XCreateCaptchaResp) GetType() int64
func (*XCreateCaptchaResp) Marshal ¶
func (m *XCreateCaptchaResp) Marshal() (dAtA []byte, err error)
func (*XCreateCaptchaResp) MarshalTo ¶
func (m *XCreateCaptchaResp) MarshalTo(dAtA []byte) (int, error)
func (*XCreateCaptchaResp) ProtoMessage ¶
func (*XCreateCaptchaResp) ProtoMessage()
func (*XCreateCaptchaResp) Reset ¶
func (m *XCreateCaptchaResp) Reset()
func (*XCreateCaptchaResp) Size ¶
func (m *XCreateCaptchaResp) Size() (n int)
func (*XCreateCaptchaResp) String ¶
func (m *XCreateCaptchaResp) String() string
func (*XCreateCaptchaResp) Unmarshal ¶
func (m *XCreateCaptchaResp) Unmarshal(dAtA []byte) error
func (*XCreateCaptchaResp) XXX_DiscardUnknown ¶
func (m *XCreateCaptchaResp) XXX_DiscardUnknown()
func (*XCreateCaptchaResp) XXX_Marshal ¶
func (m *XCreateCaptchaResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*XCreateCaptchaResp) XXX_Merge ¶
func (dst *XCreateCaptchaResp) XXX_Merge(src proto.Message)
func (*XCreateCaptchaResp) XXX_Size ¶
func (m *XCreateCaptchaResp) XXX_Size() int
func (*XCreateCaptchaResp) XXX_Unmarshal ¶
func (m *XCreateCaptchaResp) XXX_Unmarshal(b []byte) error
type XVerifyReq ¶
type XVerifyReq struct { XAnti string `protobuf:"bytes,1,opt,name=_anti,json=Anti,proto3" json:"_anti,omitempty" form:"_anti" validate:"required"` Uid int64 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty" form:"uid" validate:"required"` ClientIp string `protobuf:"bytes,3,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty" form:"client_ip"` RoomId int64 `protobuf:"varint,4,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty" form:"room_id"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*XVerifyReq) Descriptor ¶
func (*XVerifyReq) Descriptor() ([]byte, []int)
func (*XVerifyReq) GetClientIp ¶
func (m *XVerifyReq) GetClientIp() string
func (*XVerifyReq) GetRoomId ¶
func (m *XVerifyReq) GetRoomId() int64
func (*XVerifyReq) GetUid ¶
func (m *XVerifyReq) GetUid() int64
func (*XVerifyReq) GetXAnti ¶
func (m *XVerifyReq) GetXAnti() string
func (*XVerifyReq) Marshal ¶
func (m *XVerifyReq) Marshal() (dAtA []byte, err error)
func (*XVerifyReq) ProtoMessage ¶
func (*XVerifyReq) ProtoMessage()
func (*XVerifyReq) Reset ¶
func (m *XVerifyReq) Reset()
func (*XVerifyReq) Size ¶
func (m *XVerifyReq) Size() (n int)
func (*XVerifyReq) String ¶
func (m *XVerifyReq) String() string
func (*XVerifyReq) Unmarshal ¶
func (m *XVerifyReq) Unmarshal(dAtA []byte) error
func (*XVerifyReq) XXX_DiscardUnknown ¶
func (m *XVerifyReq) XXX_DiscardUnknown()
func (*XVerifyReq) XXX_Marshal ¶
func (m *XVerifyReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*XVerifyReq) XXX_Merge ¶
func (dst *XVerifyReq) XXX_Merge(src proto.Message)
func (*XVerifyReq) XXX_Size ¶
func (m *XVerifyReq) XXX_Size() int
func (*XVerifyReq) XXX_Unmarshal ¶
func (m *XVerifyReq) XXX_Unmarshal(b []byte) error
type XVerifyResp ¶
type XVerifyResp struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*XVerifyResp) Descriptor ¶
func (*XVerifyResp) Descriptor() ([]byte, []int)
func (*XVerifyResp) Marshal ¶
func (m *XVerifyResp) Marshal() (dAtA []byte, err error)
func (*XVerifyResp) ProtoMessage ¶
func (*XVerifyResp) ProtoMessage()
func (*XVerifyResp) Reset ¶
func (m *XVerifyResp) Reset()
func (*XVerifyResp) Size ¶
func (m *XVerifyResp) Size() (n int)
func (*XVerifyResp) String ¶
func (m *XVerifyResp) String() string
func (*XVerifyResp) Unmarshal ¶
func (m *XVerifyResp) Unmarshal(dAtA []byte) error
func (*XVerifyResp) XXX_DiscardUnknown ¶
func (m *XVerifyResp) XXX_DiscardUnknown()
func (*XVerifyResp) XXX_Marshal ¶
func (m *XVerifyResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*XVerifyResp) XXX_Merge ¶
func (dst *XVerifyResp) XXX_Merge(src proto.Message)
func (*XVerifyResp) XXX_Size ¶
func (m *XVerifyResp) XXX_Size() int
func (*XVerifyResp) XXX_Unmarshal ¶
func (m *XVerifyResp) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.