v1

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Common_GetCaptcha_FullMethodName    = "/api.common.v1.Common/GetCaptcha"
	Common_VerifyCaptcha_FullMethodName = "/api.common.v1.Common/VerifyCaptcha"
)
View Source
const OperationCommonGetCaptcha = "/api.common.v1.Common/GetCaptcha"
View Source
const OperationCommonVerifyCaptcha = "/api.common.v1.Common/VerifyCaptcha"

Variables

View Source
var Common_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.common.v1.Common",
	HandlerType: (*CommonServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetCaptcha",
			Handler:    _Common_GetCaptcha_Handler,
		},
		{
			MethodName: "VerifyCaptcha",
			Handler:    _Common_VerifyCaptcha_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "common/v1/common.proto",
}

Common_ServiceDesc is the grpc.ServiceDesc for Common 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_api_common_v1_common_proto protoreflect.FileDescriptor

Functions

func RegisterCommonHTTPServer

func RegisterCommonHTTPServer(s *http.Server, srv CommonHTTPServer)

func RegisterCommonServer

func RegisterCommonServer(s grpc.ServiceRegistrar, srv CommonServer)

Types

type CommonClient

type CommonClient interface {
	// 获取验证码
	GetCaptcha(ctx context.Context, in *GetCaptchaRequest, opts ...grpc.CallOption) (*GetCaptchaReply, error)
	// 验证验证码
	VerifyCaptcha(ctx context.Context, in *VerifyCaptchaRequest, opts ...grpc.CallOption) (*VerifyCaptchaReply, error)
}

CommonClient is the client API for Common 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 NewCommonClient

func NewCommonClient(cc grpc.ClientConnInterface) CommonClient

type CommonHTTPClient

type CommonHTTPClient interface {
	GetCaptcha(ctx context.Context, req *GetCaptchaRequest, opts ...http.CallOption) (rsp *GetCaptchaReply, err error)
	VerifyCaptcha(ctx context.Context, req *VerifyCaptchaRequest, opts ...http.CallOption) (rsp *VerifyCaptchaReply, err error)
}

func NewCommonHTTPClient

func NewCommonHTTPClient(client *http.Client) CommonHTTPClient

type CommonHTTPClientImpl

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

func (*CommonHTTPClientImpl) GetCaptcha

func (*CommonHTTPClientImpl) VerifyCaptcha

type CommonHTTPServer

type CommonHTTPServer interface {
	// GetCaptcha 获取验证码
	GetCaptcha(context.Context, *GetCaptchaRequest) (*GetCaptchaReply, error)
	// VerifyCaptcha 验证验证码
	VerifyCaptcha(context.Context, *VerifyCaptchaRequest) (*VerifyCaptchaReply, error)
}

type CommonServer

type CommonServer interface {
	// 获取验证码
	GetCaptcha(context.Context, *GetCaptchaRequest) (*GetCaptchaReply, error)
	// 验证验证码
	VerifyCaptcha(context.Context, *VerifyCaptchaRequest) (*VerifyCaptchaReply, error)
	// contains filtered or unexported methods
}

CommonServer is the server API for Common service. All implementations must embed UnimplementedCommonServer for forward compatibility

type FireWallReply added in v0.0.22

type FireWallReply struct {
	Status bool `protobuf:"varint,1,opt,name=Status,proto3" json:"Status,omitempty"`
	// contains filtered or unexported fields
}

FireWallReply 获取验证码返回

func (*FireWallReply) Descriptor deprecated added in v0.0.22

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

Deprecated: Use FireWallReply.ProtoReflect.Descriptor instead.

func (*FireWallReply) GetStatus added in v0.0.22

func (x *FireWallReply) GetStatus() bool

func (*FireWallReply) ProtoMessage added in v0.0.22

func (*FireWallReply) ProtoMessage()

func (*FireWallReply) ProtoReflect added in v0.0.22

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

func (*FireWallReply) Reset added in v0.0.22

func (x *FireWallReply) Reset()

func (*FireWallReply) String added in v0.0.22

func (x *FireWallReply) String() string

func (*FireWallReply) Validate added in v0.0.22

func (m *FireWallReply) Validate() error

Validate checks the field values on FireWallReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*FireWallReply) ValidateAll added in v0.0.22

func (m *FireWallReply) ValidateAll() error

ValidateAll checks the field values on FireWallReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in FireWallReplyMultiError, or nil if none found.

type FireWallReplyMultiError added in v0.0.22

type FireWallReplyMultiError []error

FireWallReplyMultiError is an error wrapping multiple validation errors returned by FireWallReply.ValidateAll() if the designated constraints aren't met.

func (FireWallReplyMultiError) AllErrors added in v0.0.22

func (m FireWallReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (FireWallReplyMultiError) Error added in v0.0.22

func (m FireWallReplyMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type FireWallReplyValidationError added in v0.0.22

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

FireWallReplyValidationError is the validation error returned by FireWallReply.Validate if the designated constraints aren't met.

func (FireWallReplyValidationError) Cause added in v0.0.22

Cause function returns cause value.

func (FireWallReplyValidationError) Error added in v0.0.22

Error satisfies the builtin error interface

func (FireWallReplyValidationError) ErrorName added in v0.0.22

func (e FireWallReplyValidationError) ErrorName() string

ErrorName returns error name.

func (FireWallReplyValidationError) Field added in v0.0.22

Field function returns field value.

func (FireWallReplyValidationError) Key added in v0.0.22

Key function returns key value.

func (FireWallReplyValidationError) Reason added in v0.0.22

Reason function returns reason value.

type FireWallRequest added in v0.0.22

type FireWallRequest struct {

	// IP
	LastIp string `protobuf:"bytes,2,opt,name=LastIp,proto3" json:"LastIp,omitempty"`
	// contains filtered or unexported fields
}

FireWallRequest 获取图形验证码

func (*FireWallRequest) Descriptor deprecated added in v0.0.22

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

Deprecated: Use FireWallRequest.ProtoReflect.Descriptor instead.

func (*FireWallRequest) GetLastIp added in v0.0.22

func (x *FireWallRequest) GetLastIp() string

func (*FireWallRequest) ProtoMessage added in v0.0.22

func (*FireWallRequest) ProtoMessage()

func (*FireWallRequest) ProtoReflect added in v0.0.22

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

func (*FireWallRequest) Reset added in v0.0.22

func (x *FireWallRequest) Reset()

func (*FireWallRequest) String added in v0.0.22

func (x *FireWallRequest) String() string

func (*FireWallRequest) Validate added in v0.0.22

func (m *FireWallRequest) Validate() error

Validate checks the field values on FireWallRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*FireWallRequest) ValidateAll added in v0.0.22

func (m *FireWallRequest) ValidateAll() error

ValidateAll checks the field values on FireWallRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in FireWallRequestMultiError, or nil if none found.

type FireWallRequestMultiError added in v0.0.22

type FireWallRequestMultiError []error

FireWallRequestMultiError is an error wrapping multiple validation errors returned by FireWallRequest.ValidateAll() if the designated constraints aren't met.

func (FireWallRequestMultiError) AllErrors added in v0.0.22

func (m FireWallRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (FireWallRequestMultiError) Error added in v0.0.22

Error returns a concatenation of all the error messages it wraps.

type FireWallRequestValidationError added in v0.0.22

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

FireWallRequestValidationError is the validation error returned by FireWallRequest.Validate if the designated constraints aren't met.

func (FireWallRequestValidationError) Cause added in v0.0.22

Cause function returns cause value.

func (FireWallRequestValidationError) Error added in v0.0.22

Error satisfies the builtin error interface

func (FireWallRequestValidationError) ErrorName added in v0.0.22

func (e FireWallRequestValidationError) ErrorName() string

ErrorName returns error name.

func (FireWallRequestValidationError) Field added in v0.0.22

Field function returns field value.

func (FireWallRequestValidationError) Key added in v0.0.22

Key function returns key value.

func (FireWallRequestValidationError) Reason added in v0.0.22

Reason function returns reason value.

type GetCaptchaReply

type GetCaptchaReply struct {
	CaptchaId string `protobuf:"bytes,2,opt,name=captchaId,proto3" json:"captchaId,omitempty"`
	Data      string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

GetCaptchaReply 获取验证码返回

func (*GetCaptchaReply) Descriptor deprecated

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

Deprecated: Use GetCaptchaReply.ProtoReflect.Descriptor instead.

func (*GetCaptchaReply) GetCaptchaId

func (x *GetCaptchaReply) GetCaptchaId() string

func (*GetCaptchaReply) GetData

func (x *GetCaptchaReply) GetData() string

func (*GetCaptchaReply) ProtoMessage

func (*GetCaptchaReply) ProtoMessage()

func (*GetCaptchaReply) ProtoReflect

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

func (*GetCaptchaReply) Reset

func (x *GetCaptchaReply) Reset()

func (*GetCaptchaReply) String

func (x *GetCaptchaReply) String() string

func (*GetCaptchaReply) Validate

func (m *GetCaptchaReply) Validate() error

Validate checks the field values on GetCaptchaReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetCaptchaReply) ValidateAll

func (m *GetCaptchaReply) ValidateAll() error

ValidateAll checks the field values on GetCaptchaReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetCaptchaReplyMultiError, or nil if none found.

type GetCaptchaReplyMultiError

type GetCaptchaReplyMultiError []error

GetCaptchaReplyMultiError is an error wrapping multiple validation errors returned by GetCaptchaReply.ValidateAll() if the designated constraints aren't met.

func (GetCaptchaReplyMultiError) AllErrors

func (m GetCaptchaReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetCaptchaReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetCaptchaReplyValidationError

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

GetCaptchaReplyValidationError is the validation error returned by GetCaptchaReply.Validate if the designated constraints aren't met.

func (GetCaptchaReplyValidationError) Cause

Cause function returns cause value.

func (GetCaptchaReplyValidationError) Error

Error satisfies the builtin error interface

func (GetCaptchaReplyValidationError) ErrorName

func (e GetCaptchaReplyValidationError) ErrorName() string

ErrorName returns error name.

func (GetCaptchaReplyValidationError) Field

Field function returns field value.

func (GetCaptchaReplyValidationError) Key

Key function returns key value.

func (GetCaptchaReplyValidationError) Reason

Reason function returns reason value.

type GetCaptchaRequest

type GetCaptchaRequest struct {

	// IP
	LastIp string `protobuf:"bytes,2,opt,name=LastIp,proto3" json:"LastIp,omitempty"`
	// contains filtered or unexported fields
}

GetCaptchaRequest 获取图形验证码

func (*GetCaptchaRequest) Descriptor deprecated

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

Deprecated: Use GetCaptchaRequest.ProtoReflect.Descriptor instead.

func (*GetCaptchaRequest) GetLastIp

func (x *GetCaptchaRequest) GetLastIp() string

func (*GetCaptchaRequest) ProtoMessage

func (*GetCaptchaRequest) ProtoMessage()

func (*GetCaptchaRequest) ProtoReflect

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

func (*GetCaptchaRequest) Reset

func (x *GetCaptchaRequest) Reset()

func (*GetCaptchaRequest) String

func (x *GetCaptchaRequest) String() string

func (*GetCaptchaRequest) Validate

func (m *GetCaptchaRequest) Validate() error

Validate checks the field values on GetCaptchaRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetCaptchaRequest) ValidateAll

func (m *GetCaptchaRequest) ValidateAll() error

ValidateAll checks the field values on GetCaptchaRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetCaptchaRequestMultiError, or nil if none found.

type GetCaptchaRequestMultiError

type GetCaptchaRequestMultiError []error

GetCaptchaRequestMultiError is an error wrapping multiple validation errors returned by GetCaptchaRequest.ValidateAll() if the designated constraints aren't met.

func (GetCaptchaRequestMultiError) AllErrors

func (m GetCaptchaRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetCaptchaRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetCaptchaRequestValidationError

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

GetCaptchaRequestValidationError is the validation error returned by GetCaptchaRequest.Validate if the designated constraints aren't met.

func (GetCaptchaRequestValidationError) Cause

Cause function returns cause value.

func (GetCaptchaRequestValidationError) Error

Error satisfies the builtin error interface

func (GetCaptchaRequestValidationError) ErrorName

ErrorName returns error name.

func (GetCaptchaRequestValidationError) Field

Field function returns field value.

func (GetCaptchaRequestValidationError) Key

Key function returns key value.

func (GetCaptchaRequestValidationError) Reason

Reason function returns reason value.

type UnimplementedCommonServer

type UnimplementedCommonServer struct {
}

UnimplementedCommonServer must be embedded to have forward compatible implementations.

func (UnimplementedCommonServer) GetCaptcha

func (UnimplementedCommonServer) VerifyCaptcha

type UnsafeCommonServer

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

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

type VerifyCaptchaReply

type VerifyCaptchaReply struct {

	// 状态
	Status bool `protobuf:"varint,1,opt,name=Status,proto3" json:"Status,omitempty"`
	// contains filtered or unexported fields
}

验证验证码

func (*VerifyCaptchaReply) Descriptor deprecated

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

Deprecated: Use VerifyCaptchaReply.ProtoReflect.Descriptor instead.

func (*VerifyCaptchaReply) GetStatus

func (x *VerifyCaptchaReply) GetStatus() bool

func (*VerifyCaptchaReply) ProtoMessage

func (*VerifyCaptchaReply) ProtoMessage()

func (*VerifyCaptchaReply) ProtoReflect

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

func (*VerifyCaptchaReply) Reset

func (x *VerifyCaptchaReply) Reset()

func (*VerifyCaptchaReply) String

func (x *VerifyCaptchaReply) String() string

func (*VerifyCaptchaReply) Validate

func (m *VerifyCaptchaReply) Validate() error

Validate checks the field values on VerifyCaptchaReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*VerifyCaptchaReply) ValidateAll

func (m *VerifyCaptchaReply) ValidateAll() error

ValidateAll checks the field values on VerifyCaptchaReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in VerifyCaptchaReplyMultiError, or nil if none found.

type VerifyCaptchaReplyMultiError

type VerifyCaptchaReplyMultiError []error

VerifyCaptchaReplyMultiError is an error wrapping multiple validation errors returned by VerifyCaptchaReply.ValidateAll() if the designated constraints aren't met.

func (VerifyCaptchaReplyMultiError) AllErrors

func (m VerifyCaptchaReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (VerifyCaptchaReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type VerifyCaptchaReplyValidationError

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

VerifyCaptchaReplyValidationError is the validation error returned by VerifyCaptchaReply.Validate if the designated constraints aren't met.

func (VerifyCaptchaReplyValidationError) Cause

Cause function returns cause value.

func (VerifyCaptchaReplyValidationError) Error

Error satisfies the builtin error interface

func (VerifyCaptchaReplyValidationError) ErrorName

ErrorName returns error name.

func (VerifyCaptchaReplyValidationError) Field

Field function returns field value.

func (VerifyCaptchaReplyValidationError) Key

Key function returns key value.

func (VerifyCaptchaReplyValidationError) Reason

Reason function returns reason value.

type VerifyCaptchaRequest

type VerifyCaptchaRequest struct {

	// 验证码ID
	CaptchaId string `protobuf:"bytes,2,opt,name=CaptchaId,proto3" json:"CaptchaId,omitempty"`
	// 回答
	Answer string `protobuf:"bytes,3,opt,name=Answer,proto3" json:"Answer,omitempty"`
	// IP
	LastIp string `protobuf:"bytes,4,opt,name=LastIp,proto3" json:"LastIp,omitempty"`
	// contains filtered or unexported fields
}

验证验证码

func (*VerifyCaptchaRequest) Descriptor deprecated

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

Deprecated: Use VerifyCaptchaRequest.ProtoReflect.Descriptor instead.

func (*VerifyCaptchaRequest) GetAnswer

func (x *VerifyCaptchaRequest) GetAnswer() string

func (*VerifyCaptchaRequest) GetCaptchaId

func (x *VerifyCaptchaRequest) GetCaptchaId() string

func (*VerifyCaptchaRequest) GetLastIp

func (x *VerifyCaptchaRequest) GetLastIp() string

func (*VerifyCaptchaRequest) ProtoMessage

func (*VerifyCaptchaRequest) ProtoMessage()

func (*VerifyCaptchaRequest) ProtoReflect

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

func (*VerifyCaptchaRequest) Reset

func (x *VerifyCaptchaRequest) Reset()

func (*VerifyCaptchaRequest) String

func (x *VerifyCaptchaRequest) String() string

func (*VerifyCaptchaRequest) Validate

func (m *VerifyCaptchaRequest) Validate() error

Validate checks the field values on VerifyCaptchaRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*VerifyCaptchaRequest) ValidateAll

func (m *VerifyCaptchaRequest) ValidateAll() error

ValidateAll checks the field values on VerifyCaptchaRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in VerifyCaptchaRequestMultiError, or nil if none found.

type VerifyCaptchaRequestMultiError

type VerifyCaptchaRequestMultiError []error

VerifyCaptchaRequestMultiError is an error wrapping multiple validation errors returned by VerifyCaptchaRequest.ValidateAll() if the designated constraints aren't met.

func (VerifyCaptchaRequestMultiError) AllErrors

func (m VerifyCaptchaRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (VerifyCaptchaRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type VerifyCaptchaRequestValidationError

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

VerifyCaptchaRequestValidationError is the validation error returned by VerifyCaptchaRequest.Validate if the designated constraints aren't met.

func (VerifyCaptchaRequestValidationError) Cause

Cause function returns cause value.

func (VerifyCaptchaRequestValidationError) Error

Error satisfies the builtin error interface

func (VerifyCaptchaRequestValidationError) ErrorName

ErrorName returns error name.

func (VerifyCaptchaRequestValidationError) Field

Field function returns field value.

func (VerifyCaptchaRequestValidationError) Key

Key function returns key value.

func (VerifyCaptchaRequestValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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