v1

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

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

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

func RegisterV1XCaptchaService(e *bm.Engine, svc XCaptcha, midMap map[string]bm.HandlerFunc)

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) Descriptor() ([]byte, []int)

func (*CheckReq) GetAnti

func (m *CheckReq) GetAnti() string

func (*CheckReq) GetClientIp

func (m *CheckReq) GetClientIp() string

func (*CheckReq) GetUid

func (m *CheckReq) GetUid() int64

func (*CheckReq) Marshal

func (m *CheckReq) Marshal() (dAtA []byte, err error)

func (*CheckReq) MarshalTo

func (m *CheckReq) MarshalTo(dAtA []byte) (int, error)

func (*CheckReq) ProtoMessage

func (*CheckReq) ProtoMessage()

func (*CheckReq) Reset

func (m *CheckReq) Reset()

func (*CheckReq) Size

func (m *CheckReq) Size() (n int)

func (*CheckReq) String

func (m *CheckReq) String() string

func (*CheckReq) Unmarshal

func (m *CheckReq) Unmarshal(dAtA []byte) error

func (*CheckReq) XXX_DiscardUnknown

func (m *CheckReq) XXX_DiscardUnknown()

func (*CheckReq) XXX_Marshal

func (m *CheckReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CheckReq) XXX_Merge

func (dst *CheckReq) XXX_Merge(src proto.Message)

func (*CheckReq) XXX_Size

func (m *CheckReq) XXX_Size() int

func (*CheckReq) XXX_Unmarshal

func (m *CheckReq) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*CheckResp) GetToken

func (m *CheckResp) GetToken() string

func (*CheckResp) GetType

func (m *CheckResp) GetType() int64

func (*CheckResp) Marshal

func (m *CheckResp) Marshal() (dAtA []byte, err error)

func (*CheckResp) MarshalTo

func (m *CheckResp) MarshalTo(dAtA []byte) (int, error)

func (*CheckResp) ProtoMessage

func (*CheckResp) ProtoMessage()

func (*CheckResp) Reset

func (m *CheckResp) Reset()

func (*CheckResp) Size

func (m *CheckResp) Size() (n int)

func (*CheckResp) String

func (m *CheckResp) String() string

func (*CheckResp) Unmarshal

func (m *CheckResp) Unmarshal(dAtA []byte) error

func (*CheckResp) XXX_DiscardUnknown

func (m *CheckResp) XXX_DiscardUnknown()

func (*CheckResp) XXX_Marshal

func (m *CheckResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CheckResp) XXX_Merge

func (dst *CheckResp) XXX_Merge(src proto.Message)

func (*CheckResp) XXX_Size

func (m *CheckResp) XXX_Size() int

func (*CheckResp) XXX_Unmarshal

func (m *CheckResp) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*GeeTest) GetChallenge

func (m *GeeTest) GetChallenge() string

func (*GeeTest) GetGt

func (m *GeeTest) GetGt() string

func (*GeeTest) Marshal

func (m *GeeTest) Marshal() (dAtA []byte, err error)

func (*GeeTest) MarshalTo

func (m *GeeTest) MarshalTo(dAtA []byte) (int, error)

func (*GeeTest) ProtoMessage

func (*GeeTest) ProtoMessage()

func (*GeeTest) Reset

func (m *GeeTest) Reset()

func (*GeeTest) Size

func (m *GeeTest) Size() (n int)

func (*GeeTest) String

func (m *GeeTest) String() string

func (*GeeTest) Unmarshal

func (m *GeeTest) Unmarshal(dAtA []byte) error

func (*GeeTest) XXX_DiscardUnknown

func (m *GeeTest) XXX_DiscardUnknown()

func (*GeeTest) XXX_Marshal

func (m *GeeTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GeeTest) XXX_Merge

func (dst *GeeTest) XXX_Merge(src proto.Message)

func (*GeeTest) XXX_Size

func (m *GeeTest) XXX_Size() int

func (*GeeTest) XXX_Unmarshal

func (m *GeeTest) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Image) GetContent

func (m *Image) GetContent() string

func (*Image) GetTips

func (m *Image) GetTips() string

func (*Image) GetToken

func (m *Image) GetToken() string

func (*Image) Marshal

func (m *Image) Marshal() (dAtA []byte, err error)

func (*Image) MarshalTo

func (m *Image) MarshalTo(dAtA []byte) (int, error)

func (*Image) ProtoMessage

func (*Image) ProtoMessage()

func (*Image) Reset

func (m *Image) Reset()

func (*Image) Size

func (m *Image) Size() (n int)

func (*Image) String

func (m *Image) String() string

func (*Image) Unmarshal

func (m *Image) Unmarshal(dAtA []byte) error

func (*Image) XXX_DiscardUnknown

func (m *Image) XXX_DiscardUnknown()

func (*Image) XXX_Marshal

func (m *Image) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Image) XXX_Merge

func (dst *Image) XXX_Merge(src proto.Message)

func (*Image) XXX_Size

func (m *Image) XXX_Size() int

func (*Image) XXX_Unmarshal

func (m *Image) XXX_Unmarshal(b []byte) error

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) MarshalTo

func (m *XVerifyReq) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *XVerifyResp) MarshalTo(dAtA []byte) (int, 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL