Documentation
¶
Index ¶
- Variables
- func ErrorLoginFailed(format string, args ...interface{}) *errors.Error
- func ErrorUnknownError(format string, args ...interface{}) *errors.Error
- func IsLoginFailed(err error) bool
- func IsUnknownError(err error) bool
- func RegisterShopInterfaceHTTPServer(s *http.Server, srv ShopInterfaceHTTPServer)
- func RegisterShopInterfaceServer(s grpc.ServiceRegistrar, srv ShopInterfaceServer)
- type RegisterReply
- func (*RegisterReply) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterReply) GetId() int64
- func (x *RegisterReply) GetMobile() string
- func (*RegisterReply) ProtoMessage()
- func (x *RegisterReply) ProtoReflect() protoreflect.Message
- func (x *RegisterReply) Reset()
- func (x *RegisterReply) String() string
- func (m *RegisterReply) Validate() error
- func (m *RegisterReply) ValidateAll() error
- type RegisterReplyMultiError
- type RegisterReplyValidationError
- func (e RegisterReplyValidationError) Cause() error
- func (e RegisterReplyValidationError) Error() string
- func (e RegisterReplyValidationError) ErrorName() string
- func (e RegisterReplyValidationError) Field() string
- func (e RegisterReplyValidationError) Key() bool
- func (e RegisterReplyValidationError) Reason() string
- type RegisterReq
- func (*RegisterReq) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterReq) GetCode() string
- func (x *RegisterReq) GetMobile() string
- func (x *RegisterReq) GetPassword() string
- func (*RegisterReq) ProtoMessage()
- func (x *RegisterReq) ProtoReflect() protoreflect.Message
- func (x *RegisterReq) Reset()
- func (x *RegisterReq) String() string
- func (m *RegisterReq) Validate() error
- func (m *RegisterReq) ValidateAll() error
- type RegisterReqMultiError
- type RegisterReqValidationError
- func (e RegisterReqValidationError) Cause() error
- func (e RegisterReqValidationError) Error() string
- func (e RegisterReqValidationError) ErrorName() string
- func (e RegisterReqValidationError) Field() string
- func (e RegisterReqValidationError) Key() bool
- func (e RegisterReqValidationError) Reason() string
- type ShopInterfaceClient
- type ShopInterfaceErrorReason
- func (ShopInterfaceErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ShopInterfaceErrorReason) Enum() *ShopInterfaceErrorReason
- func (ShopInterfaceErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ShopInterfaceErrorReason) Number() protoreflect.EnumNumber
- func (x ShopInterfaceErrorReason) String() string
- func (ShopInterfaceErrorReason) Type() protoreflect.EnumType
- type ShopInterfaceHTTPClient
- type ShopInterfaceHTTPClientImpl
- type ShopInterfaceHTTPServer
- type ShopInterfaceServer
- type UnimplementedShopInterfaceServer
- type UnsafeShopInterfaceServer
Constants ¶
This section is empty.
Variables ¶
var ( ShopInterfaceErrorReason_name = map[int32]string{ 0: "UNKNOWN_ERROR", 1: "LOGIN_FAILED", } ShopInterfaceErrorReason_value = map[string]int32{ "UNKNOWN_ERROR": 0, "LOGIN_FAILED": 1, } )
Enum value maps for ShopInterfaceErrorReason.
var File_api_shop_interface_v1_shop_interface_error_proto protoreflect.FileDescriptor
var File_api_shop_interface_v1_shop_interface_proto protoreflect.FileDescriptor
var ShopInterface_ServiceDesc = grpc.ServiceDesc{ ServiceName: "shop.interface.v1.ShopInterface", HandlerType: (*ShopInterfaceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _ShopInterface_Register_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/shop/interface/v1/shop_interface.proto", }
ShopInterface_ServiceDesc is the grpc.ServiceDesc for ShopInterface service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func ErrorLoginFailed ¶
func ErrorUnknownError ¶
func IsLoginFailed ¶
func IsUnknownError ¶
func RegisterShopInterfaceHTTPServer ¶
func RegisterShopInterfaceHTTPServer(s *http.Server, srv ShopInterfaceHTTPServer)
func RegisterShopInterfaceServer ¶
func RegisterShopInterfaceServer(s grpc.ServiceRegistrar, srv ShopInterfaceServer)
Types ¶
type RegisterReply ¶
type RegisterReply struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Mobile string `protobuf:"bytes,2,opt,name=mobile,proto3" json:"mobile,omitempty"` // contains filtered or unexported fields }
func (*RegisterReply) Descriptor
deprecated
func (*RegisterReply) Descriptor() ([]byte, []int)
Deprecated: Use RegisterReply.ProtoReflect.Descriptor instead.
func (*RegisterReply) GetId ¶
func (x *RegisterReply) GetId() int64
func (*RegisterReply) GetMobile ¶
func (x *RegisterReply) GetMobile() string
func (*RegisterReply) ProtoMessage ¶
func (*RegisterReply) ProtoMessage()
func (*RegisterReply) ProtoReflect ¶
func (x *RegisterReply) ProtoReflect() protoreflect.Message
func (*RegisterReply) Reset ¶
func (x *RegisterReply) Reset()
func (*RegisterReply) String ¶
func (x *RegisterReply) String() string
func (*RegisterReply) Validate ¶
func (m *RegisterReply) Validate() error
Validate checks the field values on RegisterReply 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 (*RegisterReply) ValidateAll ¶
func (m *RegisterReply) ValidateAll() error
ValidateAll checks the field values on RegisterReply 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 RegisterReplyMultiError, or nil if none found.
type RegisterReplyMultiError ¶
type RegisterReplyMultiError []error
RegisterReplyMultiError is an error wrapping multiple validation errors returned by RegisterReply.ValidateAll() if the designated constraints aren't met.
func (RegisterReplyMultiError) AllErrors ¶
func (m RegisterReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RegisterReplyMultiError) Error ¶
func (m RegisterReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RegisterReplyValidationError ¶
type RegisterReplyValidationError struct {
// contains filtered or unexported fields
}
RegisterReplyValidationError is the validation error returned by RegisterReply.Validate if the designated constraints aren't met.
func (RegisterReplyValidationError) Cause ¶
func (e RegisterReplyValidationError) Cause() error
Cause function returns cause value.
func (RegisterReplyValidationError) Error ¶
func (e RegisterReplyValidationError) Error() string
Error satisfies the builtin error interface
func (RegisterReplyValidationError) ErrorName ¶
func (e RegisterReplyValidationError) ErrorName() string
ErrorName returns error name.
func (RegisterReplyValidationError) Field ¶
func (e RegisterReplyValidationError) Field() string
Field function returns field value.
func (RegisterReplyValidationError) Key ¶
func (e RegisterReplyValidationError) Key() bool
Key function returns key value.
func (RegisterReplyValidationError) Reason ¶
func (e RegisterReplyValidationError) Reason() string
Reason function returns reason value.
type RegisterReq ¶
type RegisterReq struct { Mobile string `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*RegisterReq) Descriptor
deprecated
func (*RegisterReq) Descriptor() ([]byte, []int)
Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.
func (*RegisterReq) GetCode ¶
func (x *RegisterReq) GetCode() string
func (*RegisterReq) GetMobile ¶
func (x *RegisterReq) GetMobile() string
func (*RegisterReq) GetPassword ¶
func (x *RegisterReq) GetPassword() string
func (*RegisterReq) ProtoMessage ¶
func (*RegisterReq) ProtoMessage()
func (*RegisterReq) ProtoReflect ¶
func (x *RegisterReq) ProtoReflect() protoreflect.Message
func (*RegisterReq) Reset ¶
func (x *RegisterReq) Reset()
func (*RegisterReq) String ¶
func (x *RegisterReq) String() string
func (*RegisterReq) Validate ¶
func (m *RegisterReq) Validate() error
Validate checks the field values on RegisterReq 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 (*RegisterReq) ValidateAll ¶
func (m *RegisterReq) ValidateAll() error
ValidateAll checks the field values on RegisterReq 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 RegisterReqMultiError, or nil if none found.
type RegisterReqMultiError ¶
type RegisterReqMultiError []error
RegisterReqMultiError is an error wrapping multiple validation errors returned by RegisterReq.ValidateAll() if the designated constraints aren't met.
func (RegisterReqMultiError) AllErrors ¶
func (m RegisterReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RegisterReqMultiError) Error ¶
func (m RegisterReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RegisterReqValidationError ¶
type RegisterReqValidationError struct {
// contains filtered or unexported fields
}
RegisterReqValidationError is the validation error returned by RegisterReq.Validate if the designated constraints aren't met.
func (RegisterReqValidationError) Cause ¶
func (e RegisterReqValidationError) Cause() error
Cause function returns cause value.
func (RegisterReqValidationError) Error ¶
func (e RegisterReqValidationError) Error() string
Error satisfies the builtin error interface
func (RegisterReqValidationError) ErrorName ¶
func (e RegisterReqValidationError) ErrorName() string
ErrorName returns error name.
func (RegisterReqValidationError) Field ¶
func (e RegisterReqValidationError) Field() string
Field function returns field value.
func (RegisterReqValidationError) Key ¶
func (e RegisterReqValidationError) Key() bool
Key function returns key value.
func (RegisterReqValidationError) Reason ¶
func (e RegisterReqValidationError) Reason() string
Reason function returns reason value.
type ShopInterfaceClient ¶
type ShopInterfaceClient interface {
Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterReply, error)
}
ShopInterfaceClient is the client API for ShopInterface 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 NewShopInterfaceClient ¶
func NewShopInterfaceClient(cc grpc.ClientConnInterface) ShopInterfaceClient
type ShopInterfaceErrorReason ¶
type ShopInterfaceErrorReason int32
const ( ShopInterfaceErrorReason_UNKNOWN_ERROR ShopInterfaceErrorReason = 0 ShopInterfaceErrorReason_LOGIN_FAILED ShopInterfaceErrorReason = 1 )
func (ShopInterfaceErrorReason) Descriptor ¶
func (ShopInterfaceErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ShopInterfaceErrorReason) Enum ¶
func (x ShopInterfaceErrorReason) Enum() *ShopInterfaceErrorReason
func (ShopInterfaceErrorReason) EnumDescriptor
deprecated
func (ShopInterfaceErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ShopInterfaceErrorReason.Descriptor instead.
func (ShopInterfaceErrorReason) Number ¶
func (x ShopInterfaceErrorReason) Number() protoreflect.EnumNumber
func (ShopInterfaceErrorReason) String ¶
func (x ShopInterfaceErrorReason) String() string
func (ShopInterfaceErrorReason) Type ¶
func (ShopInterfaceErrorReason) Type() protoreflect.EnumType
type ShopInterfaceHTTPClient ¶
type ShopInterfaceHTTPClient interface {
Register(ctx context.Context, req *RegisterReq, opts ...http.CallOption) (rsp *RegisterReply, err error)
}
func NewShopInterfaceHTTPClient ¶
func NewShopInterfaceHTTPClient(client *http.Client) ShopInterfaceHTTPClient
type ShopInterfaceHTTPClientImpl ¶
type ShopInterfaceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*ShopInterfaceHTTPClientImpl) Register ¶
func (c *ShopInterfaceHTTPClientImpl) Register(ctx context.Context, in *RegisterReq, opts ...http.CallOption) (*RegisterReply, error)
type ShopInterfaceHTTPServer ¶
type ShopInterfaceHTTPServer interface {
Register(context.Context, *RegisterReq) (*RegisterReply, error)
}
type ShopInterfaceServer ¶
type ShopInterfaceServer interface { Register(context.Context, *RegisterReq) (*RegisterReply, error) // contains filtered or unexported methods }
ShopInterfaceServer is the server API for ShopInterface service. All implementations must embed UnimplementedShopInterfaceServer for forward compatibility
type UnimplementedShopInterfaceServer ¶
type UnimplementedShopInterfaceServer struct { }
UnimplementedShopInterfaceServer must be embedded to have forward compatible implementations.
func (UnimplementedShopInterfaceServer) Register ¶
func (UnimplementedShopInterfaceServer) Register(context.Context, *RegisterReq) (*RegisterReply, error)
type UnsafeShopInterfaceServer ¶
type UnsafeShopInterfaceServer interface {
// contains filtered or unexported methods
}
UnsafeShopInterfaceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ShopInterfaceServer will result in compilation errors.