captcha

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Captcha_SendEmailCaptcha_FullMethodName   = "/api.captcha.Captcha/SendEmailCaptcha"
	Captcha_VerifyEmailCaptcha_FullMethodName = "/api.captcha.Captcha/VerifyEmailCaptcha"
)
View Source
const OperationCaptchaSendEmailCaptcha = "/api.captcha.Captcha/SendEmailCaptcha"
View Source
const OperationCaptchaVerifyEmailCaptcha = "/api.captcha.Captcha/VerifyEmailCaptcha"

Variables

View Source
var Captcha_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.captcha.Captcha",
	HandlerType: (*CaptchaServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendEmailCaptcha",
			Handler:    _Captcha_SendEmailCaptcha_Handler,
		},
		{
			MethodName: "VerifyEmailCaptcha",
			Handler:    _Captcha_VerifyEmailCaptcha_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "captcha/captcha.proto",
}

Captcha_ServiceDesc is the grpc.ServiceDesc for Captcha service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_captcha_captcha_proto protoreflect.FileDescriptor

Functions

func RegisterCaptchaHTTPServer

func RegisterCaptchaHTTPServer(s *http.Server, srv CaptchaHTTPServer)

func RegisterCaptchaServer

func RegisterCaptchaServer(s grpc.ServiceRegistrar, srv CaptchaServer)

Types

type CaptchaClient

type CaptchaClient interface {
	SendEmailCaptcha(ctx context.Context, in *SendEmailCaptchaReq, opts ...grpc.CallOption) (*Empty, error)
	VerifyEmailCaptcha(ctx context.Context, in *VerifyEmailCaptchaReq, opts ...grpc.CallOption) (*Empty, error)
}

CaptchaClient is the client API for Captcha service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewCaptchaClient

func NewCaptchaClient(cc grpc.ClientConnInterface) CaptchaClient

type CaptchaHTTPClient

type CaptchaHTTPClient interface {
	SendEmailCaptcha(ctx context.Context, req *SendEmailCaptchaReq, opts ...http.CallOption) (rsp *Empty, err error)
	VerifyEmailCaptcha(ctx context.Context, req *VerifyEmailCaptchaReq, opts ...http.CallOption) (rsp *Empty, err error)
}

func NewCaptchaHTTPClient

func NewCaptchaHTTPClient(client *http.Client) CaptchaHTTPClient

type CaptchaHTTPClientImpl

type CaptchaHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*CaptchaHTTPClientImpl) SendEmailCaptcha

func (c *CaptchaHTTPClientImpl) SendEmailCaptcha(ctx context.Context, in *SendEmailCaptchaReq, opts ...http.CallOption) (*Empty, error)

func (*CaptchaHTTPClientImpl) VerifyEmailCaptcha

func (c *CaptchaHTTPClientImpl) VerifyEmailCaptcha(ctx context.Context, in *VerifyEmailCaptchaReq, opts ...http.CallOption) (*Empty, error)

type CaptchaHTTPServer

type CaptchaHTTPServer interface {
	SendEmailCaptcha(context.Context, *SendEmailCaptchaReq) (*Empty, error)
	VerifyEmailCaptcha(context.Context, *VerifyEmailCaptchaReq) (*Empty, error)
}

type CaptchaServer

type CaptchaServer interface {
	SendEmailCaptcha(context.Context, *SendEmailCaptchaReq) (*Empty, error)
	VerifyEmailCaptcha(context.Context, *VerifyEmailCaptchaReq) (*Empty, error)
	// contains filtered or unexported methods
}

CaptchaServer is the server API for Captcha service. All implementations must embed UnimplementedCaptchaServer for forward compatibility.

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type SendEmailCaptchaReq

type SendEmailCaptchaReq struct {
	Async  bool   `protobuf:"varint,1,opt,name=async,proto3" json:"async,omitempty"`
	UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Email  string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*SendEmailCaptchaReq) Descriptor deprecated

func (*SendEmailCaptchaReq) Descriptor() ([]byte, []int)

Deprecated: Use SendEmailCaptchaReq.ProtoReflect.Descriptor instead.

func (*SendEmailCaptchaReq) GetAsync

func (x *SendEmailCaptchaReq) GetAsync() bool

func (*SendEmailCaptchaReq) GetEmail

func (x *SendEmailCaptchaReq) GetEmail() string

func (*SendEmailCaptchaReq) GetUserId

func (x *SendEmailCaptchaReq) GetUserId() string

func (*SendEmailCaptchaReq) ProtoMessage

func (*SendEmailCaptchaReq) ProtoMessage()

func (*SendEmailCaptchaReq) ProtoReflect

func (x *SendEmailCaptchaReq) ProtoReflect() protoreflect.Message

func (*SendEmailCaptchaReq) Reset

func (x *SendEmailCaptchaReq) Reset()

func (*SendEmailCaptchaReq) String

func (x *SendEmailCaptchaReq) String() string

type UnimplementedCaptchaServer

type UnimplementedCaptchaServer struct{}

UnimplementedCaptchaServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedCaptchaServer) SendEmailCaptcha

func (UnimplementedCaptchaServer) VerifyEmailCaptcha

type UnsafeCaptchaServer

type UnsafeCaptchaServer interface {
	// contains filtered or unexported methods
}

UnsafeCaptchaServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CaptchaServer will result in compilation errors.

type VerifyEmailCaptchaReq

type VerifyEmailCaptchaReq struct {
	UserId  string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Email   string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Captcha string `protobuf:"bytes,3,opt,name=captcha,proto3" json:"captcha,omitempty"`
	// contains filtered or unexported fields
}

func (*VerifyEmailCaptchaReq) Descriptor deprecated

func (*VerifyEmailCaptchaReq) Descriptor() ([]byte, []int)

Deprecated: Use VerifyEmailCaptchaReq.ProtoReflect.Descriptor instead.

func (*VerifyEmailCaptchaReq) GetCaptcha

func (x *VerifyEmailCaptchaReq) GetCaptcha() string

func (*VerifyEmailCaptchaReq) GetEmail

func (x *VerifyEmailCaptchaReq) GetEmail() string

func (*VerifyEmailCaptchaReq) GetUserId

func (x *VerifyEmailCaptchaReq) GetUserId() string

func (*VerifyEmailCaptchaReq) ProtoMessage

func (*VerifyEmailCaptchaReq) ProtoMessage()

func (*VerifyEmailCaptchaReq) ProtoReflect

func (x *VerifyEmailCaptchaReq) ProtoReflect() protoreflect.Message

func (*VerifyEmailCaptchaReq) Reset

func (x *VerifyEmailCaptchaReq) Reset()

func (*VerifyEmailCaptchaReq) String

func (x *VerifyEmailCaptchaReq) String() string

Jump to

Keyboard shortcuts

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