Documentation ¶
Overview ¶
Code generated by protoc-gen-auth. DO NOT EDIT! source: code.proto
Package captcha is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Code generated by protoc-gen-auth. DO NOT EDIT! source: include.proto
Code generated by protoc-gen-auth. DO NOT EDIT! source: inner_code.proto
Package captcha is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterCodeHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CodeClient) error
- func RegisterCodeHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCodeHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CodeServer) error
- func RegisterCodeScopeServer(component string, auth service.Authenticator, impl service.Implementor, ...) error
- func RegisterCodeServer(s *grpc.Server, srv CodeServer)
- func RegisterInnerCodeHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterInnerCodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InnerCodeClient) error
- func RegisterInnerCodeHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterInnerCodeHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InnerCodeServer) error
- func RegisterInnerCodeScopeServer(component string, auth service.Authenticator, impl service.Implementor, ...) error
- func RegisterInnerCodeServer(s *grpc.Server, srv InnerCodeServer)
- type Category
- type Channel
- type CodeClient
- type CodeRequest
- func (*CodeRequest) Descriptor() ([]byte, []int)
- func (m *CodeRequest) GetCategory() Category
- func (m *CodeRequest) GetChannel() Channel
- func (m *CodeRequest) GetTarget() string
- func (*CodeRequest) ProtoMessage()
- func (m *CodeRequest) Reset()
- func (m *CodeRequest) String() string
- func (m *CodeRequest) Validate() error
- func (m *CodeRequest) XXX_DiscardUnknown()
- func (m *CodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CodeRequest) XXX_Merge(src proto.Message)
- func (m *CodeRequest) XXX_Size() int
- func (m *CodeRequest) XXX_Unmarshal(b []byte) error
- type CodeRequestValidationError
- func (e CodeRequestValidationError) Cause() error
- func (e CodeRequestValidationError) Error() string
- func (e CodeRequestValidationError) ErrorName() string
- func (e CodeRequestValidationError) Field() string
- func (e CodeRequestValidationError) Key() bool
- func (e CodeRequestValidationError) Reason() string
- type CodeServer
- type InnerCodeClient
- type InnerCodeServer
- type Region
- func (*Region) Descriptor() ([]byte, []int)
- func (m *Region) GetAbbr() string
- func (m *Region) GetCode() string
- func (m *Region) GetLocal() string
- func (m *Region) GetName() string
- func (*Region) ProtoMessage()
- func (m *Region) Reset()
- func (m *Region) String() string
- func (m *Region) Validate() error
- func (m *Region) XXX_DiscardUnknown()
- func (m *Region) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Region) XXX_Merge(src proto.Message)
- func (m *Region) XXX_Size() int
- func (m *Region) XXX_Unmarshal(b []byte) error
- type RegionValidationError
- type Regions
- func (*Regions) Descriptor() ([]byte, []int)
- func (m *Regions) GetRegions() []*Region
- func (*Regions) ProtoMessage()
- func (m *Regions) Reset()
- func (m *Regions) String() string
- func (m *Regions) Validate() error
- func (m *Regions) XXX_DiscardUnknown()
- func (m *Regions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Regions) XXX_Merge(src proto.Message)
- func (m *Regions) XXX_Size() int
- func (m *Regions) XXX_Unmarshal(b []byte) error
- type RegionsValidationError
- type UnimplementedCodeServer
- type UnimplementedInnerCodeServer
- type VerifyRequest
- func (*VerifyRequest) Descriptor() ([]byte, []int)
- func (m *VerifyRequest) GetCategory() Category
- func (m *VerifyRequest) GetTarget() string
- func (m *VerifyRequest) GetValue() string
- func (*VerifyRequest) ProtoMessage()
- func (m *VerifyRequest) Reset()
- func (m *VerifyRequest) String() string
- func (m *VerifyRequest) Validate() error
- func (m *VerifyRequest) XXX_DiscardUnknown()
- func (m *VerifyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VerifyRequest) XXX_Merge(src proto.Message)
- func (m *VerifyRequest) XXX_Size() int
- func (m *VerifyRequest) XXX_Unmarshal(b []byte) error
- type VerifyRequestValidationError
- func (e VerifyRequestValidationError) Cause() error
- func (e VerifyRequestValidationError) Error() string
- func (e VerifyRequestValidationError) ErrorName() string
- func (e VerifyRequestValidationError) Field() string
- func (e VerifyRequestValidationError) Key() bool
- func (e VerifyRequestValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var Category_name = map[int32]string{
0: "CATEGORY_UNSPECIFIED",
1: "CATEGORY_REGISTER",
2: "CATEGORY_LOGIN",
3: "CATEGORY_RESET_PWD",
4: "CATEGORY_BIND",
5: "CATEGORY_UNBIND",
}
var Category_value = map[string]int32{
"CATEGORY_UNSPECIFIED": 0,
"CATEGORY_REGISTER": 1,
"CATEGORY_LOGIN": 2,
"CATEGORY_RESET_PWD": 3,
"CATEGORY_BIND": 4,
"CATEGORY_UNBIND": 5,
}
var Channel_name = map[int32]string{
0: "CHANNEL_UNSPECIFIED",
1: "CHANNEL_EMAIL",
2: "CHANNEL_SMS",
3: "CHANNEL_PHONE",
4: "CHANNEL_OTP",
}
var Channel_value = map[string]int32{
"CHANNEL_UNSPECIFIED": 0,
"CHANNEL_EMAIL": 1,
"CHANNEL_SMS": 2,
"CHANNEL_PHONE": 3,
"CHANNEL_OTP": 4,
}
Functions ¶
func RegisterCodeHandler ¶
RegisterCodeHandler registers the http handlers for service Code to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCodeHandlerClient ¶
RegisterCodeHandlerClient registers the http handlers for service Code to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CodeClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CodeClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CodeClient" to call the correct interceptors.
func RegisterCodeHandlerFromEndpoint ¶
func RegisterCodeHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCodeHandlerFromEndpoint is same as RegisterCodeHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCodeHandlerServer ¶
RegisterCodeHandlerServer registers the http handlers for service Code to "mux". UnaryRPC :call CodeServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterCodeScopeServer ¶
func RegisterCodeScopeServer(component string, auth service.Authenticator, impl service.Implementor, srv CodeServer) error
Register scoped server.
func RegisterCodeServer ¶
func RegisterCodeServer(s *grpc.Server, srv CodeServer)
func RegisterInnerCodeHandler ¶
func RegisterInnerCodeHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterInnerCodeHandler registers the http handlers for service InnerCode to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterInnerCodeHandlerClient ¶
func RegisterInnerCodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InnerCodeClient) error
RegisterInnerCodeHandlerClient registers the http handlers for service InnerCode to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InnerCodeClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InnerCodeClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "InnerCodeClient" to call the correct interceptors.
func RegisterInnerCodeHandlerFromEndpoint ¶
func RegisterInnerCodeHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterInnerCodeHandlerFromEndpoint is same as RegisterInnerCodeHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterInnerCodeHandlerServer ¶
func RegisterInnerCodeHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InnerCodeServer) error
RegisterInnerCodeHandlerServer registers the http handlers for service InnerCode to "mux". UnaryRPC :call InnerCodeServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterInnerCodeScopeServer ¶
func RegisterInnerCodeScopeServer(component string, auth service.Authenticator, impl service.Implementor, srv InnerCodeServer) error
Register scoped server.
func RegisterInnerCodeServer ¶
func RegisterInnerCodeServer(s *grpc.Server, srv InnerCodeServer)
Types ¶
type Category ¶
type Category int32
Captcha code category enums.
func (Category) EnumDescriptor ¶
func (*Category) UnmarshalJSON ¶
type Channel ¶
type Channel int32
Captcha code channel enums.
func (Channel) EnumDescriptor ¶
func (*Channel) UnmarshalJSON ¶
type CodeClient ¶
type CodeClient interface { // Get regions. GetRegions(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Regions, error) // Launch verification code process. Apply(ctx context.Context, in *CodeRequest, opts ...grpc.CallOption) (*empty.Empty, error) }
CodeClient is the client API for Code service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCodeClient ¶
func NewCodeClient(cc *grpc.ClientConn) CodeClient
type CodeRequest ¶
type CodeRequest struct { Channel *Channel `protobuf:"varint,1,req,name=channel,enum=appootb.captcha.Channel" json:"channel,omitempty"` Category *Category `protobuf:"varint,2,req,name=category,enum=appootb.captcha.Category" json:"category,omitempty"` Target *string `protobuf:"bytes,3,req,name=target" json:"target,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Captcha code request.
func (*CodeRequest) Descriptor ¶
func (*CodeRequest) Descriptor() ([]byte, []int)
func (*CodeRequest) GetCategory ¶
func (m *CodeRequest) GetCategory() Category
func (*CodeRequest) GetChannel ¶
func (m *CodeRequest) GetChannel() Channel
func (*CodeRequest) GetTarget ¶
func (m *CodeRequest) GetTarget() string
func (*CodeRequest) ProtoMessage ¶
func (*CodeRequest) ProtoMessage()
func (*CodeRequest) Reset ¶
func (m *CodeRequest) Reset()
func (*CodeRequest) String ¶
func (m *CodeRequest) String() string
func (*CodeRequest) Validate ¶
func (m *CodeRequest) Validate() error
Validate checks the field values on CodeRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*CodeRequest) XXX_DiscardUnknown ¶
func (m *CodeRequest) XXX_DiscardUnknown()
func (*CodeRequest) XXX_Marshal ¶
func (m *CodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CodeRequest) XXX_Merge ¶
func (m *CodeRequest) XXX_Merge(src proto.Message)
func (*CodeRequest) XXX_Size ¶
func (m *CodeRequest) XXX_Size() int
func (*CodeRequest) XXX_Unmarshal ¶
func (m *CodeRequest) XXX_Unmarshal(b []byte) error
type CodeRequestValidationError ¶
type CodeRequestValidationError struct {
// contains filtered or unexported fields
}
CodeRequestValidationError is the validation error returned by CodeRequest.Validate if the designated constraints aren't met.
func (CodeRequestValidationError) Cause ¶
func (e CodeRequestValidationError) Cause() error
Cause function returns cause value.
func (CodeRequestValidationError) Error ¶
func (e CodeRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CodeRequestValidationError) ErrorName ¶
func (e CodeRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CodeRequestValidationError) Field ¶
func (e CodeRequestValidationError) Field() string
Field function returns field value.
func (CodeRequestValidationError) Key ¶
func (e CodeRequestValidationError) Key() bool
Key function returns key value.
func (CodeRequestValidationError) Reason ¶
func (e CodeRequestValidationError) Reason() string
Reason function returns reason value.
type CodeServer ¶
type CodeServer interface { // Get regions. GetRegions(context.Context, *empty.Empty) (*Regions, error) // Launch verification code process. Apply(context.Context, *CodeRequest) (*empty.Empty, error) }
CodeServer is the server API for Code service.
type InnerCodeClient ¶
type InnerCodeClient interface { // Check the verification code. Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*empty.Empty, error) }
InnerCodeClient is the client API for InnerCode service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewInnerCodeClient ¶
func NewInnerCodeClient(cc *grpc.ClientConn) InnerCodeClient
type InnerCodeServer ¶
type InnerCodeServer interface { // Check the verification code. Verify(context.Context, *VerifyRequest) (*empty.Empty, error) }
InnerCodeServer is the server API for InnerCode service.
type Region ¶
type Region struct { Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` Local *string `protobuf:"bytes,2,req,name=local" json:"local,omitempty"` Abbr *string `protobuf:"bytes,3,req,name=abbr" json:"abbr,omitempty"` Code *string `protobuf:"bytes,4,req,name=code" json:"code,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Region.
func (*Region) Descriptor ¶
func (*Region) ProtoMessage ¶
func (*Region) ProtoMessage()
func (*Region) Validate ¶
Validate checks the field values on Region with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*Region) XXX_DiscardUnknown ¶
func (m *Region) XXX_DiscardUnknown()
func (*Region) XXX_Marshal ¶
func (*Region) XXX_Unmarshal ¶
type RegionValidationError ¶
type RegionValidationError struct {
// contains filtered or unexported fields
}
RegionValidationError is the validation error returned by Region.Validate if the designated constraints aren't met.
func (RegionValidationError) Cause ¶
func (e RegionValidationError) Cause() error
Cause function returns cause value.
func (RegionValidationError) Error ¶
func (e RegionValidationError) Error() string
Error satisfies the builtin error interface
func (RegionValidationError) ErrorName ¶
func (e RegionValidationError) ErrorName() string
ErrorName returns error name.
func (RegionValidationError) Field ¶
func (e RegionValidationError) Field() string
Field function returns field value.
func (RegionValidationError) Key ¶
func (e RegionValidationError) Key() bool
Key function returns key value.
func (RegionValidationError) Reason ¶
func (e RegionValidationError) Reason() string
Reason function returns reason value.
type Regions ¶
type Regions struct { Regions []*Region `protobuf:"bytes,1,rep,name=regions" json:"regions,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Regions.
func (*Regions) Descriptor ¶
func (*Regions) GetRegions ¶
func (*Regions) ProtoMessage ¶
func (*Regions) ProtoMessage()
func (*Regions) Validate ¶
Validate checks the field values on Regions with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*Regions) XXX_DiscardUnknown ¶
func (m *Regions) XXX_DiscardUnknown()
func (*Regions) XXX_Marshal ¶
func (*Regions) XXX_Unmarshal ¶
type RegionsValidationError ¶
type RegionsValidationError struct {
// contains filtered or unexported fields
}
RegionsValidationError is the validation error returned by Regions.Validate if the designated constraints aren't met.
func (RegionsValidationError) Cause ¶
func (e RegionsValidationError) Cause() error
Cause function returns cause value.
func (RegionsValidationError) Error ¶
func (e RegionsValidationError) Error() string
Error satisfies the builtin error interface
func (RegionsValidationError) ErrorName ¶
func (e RegionsValidationError) ErrorName() string
ErrorName returns error name.
func (RegionsValidationError) Field ¶
func (e RegionsValidationError) Field() string
Field function returns field value.
func (RegionsValidationError) Key ¶
func (e RegionsValidationError) Key() bool
Key function returns key value.
func (RegionsValidationError) Reason ¶
func (e RegionsValidationError) Reason() string
Reason function returns reason value.
type UnimplementedCodeServer ¶
type UnimplementedCodeServer struct { }
UnimplementedCodeServer can be embedded to have forward compatible implementations.
func (*UnimplementedCodeServer) Apply ¶
func (*UnimplementedCodeServer) Apply(ctx context.Context, req *CodeRequest) (*empty.Empty, error)
func (*UnimplementedCodeServer) GetRegions ¶
type UnimplementedInnerCodeServer ¶
type UnimplementedInnerCodeServer struct { }
UnimplementedInnerCodeServer can be embedded to have forward compatible implementations.
func (*UnimplementedInnerCodeServer) Verify ¶
func (*UnimplementedInnerCodeServer) Verify(ctx context.Context, req *VerifyRequest) (*empty.Empty, error)
type VerifyRequest ¶
type VerifyRequest struct { Category *Category `protobuf:"varint,1,req,name=category,enum=appootb.captcha.Category" json:"category,omitempty"` Target *string `protobuf:"bytes,2,req,name=target" json:"target,omitempty"` Value *string `protobuf:"bytes,3,req,name=value" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Captcha code verify request.
func (*VerifyRequest) Descriptor ¶
func (*VerifyRequest) Descriptor() ([]byte, []int)
func (*VerifyRequest) GetCategory ¶
func (m *VerifyRequest) GetCategory() Category
func (*VerifyRequest) GetTarget ¶
func (m *VerifyRequest) GetTarget() string
func (*VerifyRequest) GetValue ¶
func (m *VerifyRequest) GetValue() string
func (*VerifyRequest) ProtoMessage ¶
func (*VerifyRequest) ProtoMessage()
func (*VerifyRequest) Reset ¶
func (m *VerifyRequest) Reset()
func (*VerifyRequest) String ¶
func (m *VerifyRequest) String() string
func (*VerifyRequest) Validate ¶
func (m *VerifyRequest) Validate() error
Validate checks the field values on VerifyRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*VerifyRequest) XXX_DiscardUnknown ¶
func (m *VerifyRequest) XXX_DiscardUnknown()
func (*VerifyRequest) XXX_Marshal ¶
func (m *VerifyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VerifyRequest) XXX_Merge ¶
func (m *VerifyRequest) XXX_Merge(src proto.Message)
func (*VerifyRequest) XXX_Size ¶
func (m *VerifyRequest) XXX_Size() int
func (*VerifyRequest) XXX_Unmarshal ¶
func (m *VerifyRequest) XXX_Unmarshal(b []byte) error
type VerifyRequestValidationError ¶
type VerifyRequestValidationError struct {
// contains filtered or unexported fields
}
VerifyRequestValidationError is the validation error returned by VerifyRequest.Validate if the designated constraints aren't met.
func (VerifyRequestValidationError) Cause ¶
func (e VerifyRequestValidationError) Cause() error
Cause function returns cause value.
func (VerifyRequestValidationError) Error ¶
func (e VerifyRequestValidationError) Error() string
Error satisfies the builtin error interface
func (VerifyRequestValidationError) ErrorName ¶
func (e VerifyRequestValidationError) ErrorName() string
ErrorName returns error name.
func (VerifyRequestValidationError) Field ¶
func (e VerifyRequestValidationError) Field() string
Field function returns field value.
func (VerifyRequestValidationError) Key ¶
func (e VerifyRequestValidationError) Key() bool
Key function returns key value.
func (VerifyRequestValidationError) Reason ¶
func (e VerifyRequestValidationError) Reason() string
Reason function returns reason value.