Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterShopInterfaceHTTPServer(s *http.Server, srv ShopInterfaceHTTPServer)
- func RegisterShopInterfaceServer(s grpc.ServiceRegistrar, srv ShopInterfaceServer)
- type GetUserInfoReq
- func (*GetUserInfoReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserInfoReq) GetId() int64
- func (*GetUserInfoReq) ProtoMessage()
- func (x *GetUserInfoReq) ProtoReflect() protoreflect.Message
- func (x *GetUserInfoReq) Reset()
- func (x *GetUserInfoReq) String() string
- func (m *GetUserInfoReq) Validate() error
- func (m *GetUserInfoReq) ValidateAll() error
- type GetUserInfoReqMultiError
- type GetUserInfoReqValidationError
- func (e GetUserInfoReqValidationError) Cause() error
- func (e GetUserInfoReqValidationError) Error() string
- func (e GetUserInfoReqValidationError) ErrorName() string
- func (e GetUserInfoReqValidationError) Field() string
- func (e GetUserInfoReqValidationError) Key() bool
- func (e GetUserInfoReqValidationError) Reason() string
- type GetUserInfoResp
- func (*GetUserInfoResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserInfoResp) GetUser() *User
- func (*GetUserInfoResp) ProtoMessage()
- func (x *GetUserInfoResp) ProtoReflect() protoreflect.Message
- func (x *GetUserInfoResp) Reset()
- func (x *GetUserInfoResp) String() string
- func (m *GetUserInfoResp) Validate() error
- func (m *GetUserInfoResp) ValidateAll() error
- type GetUserInfoRespMultiError
- type GetUserInfoRespValidationError
- func (e GetUserInfoRespValidationError) Cause() error
- func (e GetUserInfoRespValidationError) Error() string
- func (e GetUserInfoRespValidationError) ErrorName() string
- func (e GetUserInfoRespValidationError) Field() string
- func (e GetUserInfoRespValidationError) Key() bool
- func (e GetUserInfoRespValidationError) Reason() string
- type LoginReq
- func (*LoginReq) Descriptor() ([]byte, []int)deprecated
- func (x *LoginReq) GetCode() string
- func (x *LoginReq) GetEmail() string
- func (x *LoginReq) GetPassword() string
- func (x *LoginReq) GetPhone() string
- func (x *LoginReq) GetType() string
- func (x *LoginReq) GetUsername() string
- func (*LoginReq) ProtoMessage()
- func (x *LoginReq) ProtoReflect() protoreflect.Message
- func (x *LoginReq) Reset()
- func (x *LoginReq) String() string
- func (m *LoginReq) Validate() error
- func (m *LoginReq) ValidateAll() error
- type LoginReqMultiError
- type LoginReqValidationError
- type LoginResp
- type LoginRespMultiError
- type LoginRespValidationError
- type RegisterReq
- func (*RegisterReq) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterReq) GetCode() string
- func (x *RegisterReq) GetEmail() string
- func (x *RegisterReq) GetPassword() string
- func (x *RegisterReq) GetPhone() string
- func (x *RegisterReq) GetUsername() 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 RegisterResp
- func (*RegisterResp) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterResp) GetAvatar() string
- func (x *RegisterResp) GetGender() string
- func (x *RegisterResp) GetId() int64
- func (x *RegisterResp) GetNickname() string
- func (x *RegisterResp) GetUsername() string
- func (*RegisterResp) ProtoMessage()
- func (x *RegisterResp) ProtoReflect() protoreflect.Message
- func (x *RegisterResp) Reset()
- func (x *RegisterResp) String() string
- func (m *RegisterResp) Validate() error
- func (m *RegisterResp) ValidateAll() error
- type RegisterRespMultiError
- type RegisterRespValidationError
- func (e RegisterRespValidationError) Cause() error
- func (e RegisterRespValidationError) Error() string
- func (e RegisterRespValidationError) ErrorName() string
- func (e RegisterRespValidationError) Field() string
- func (e RegisterRespValidationError) Key() bool
- func (e RegisterRespValidationError) Reason() string
- type ShopInterfaceClient
- type ShopInterfaceHTTPClient
- type ShopInterfaceHTTPClientImpl
- func (c *ShopInterfaceHTTPClientImpl) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...http.CallOption) (*GetUserInfoResp, error)
- func (c *ShopInterfaceHTTPClientImpl) Login(ctx context.Context, in *LoginReq, opts ...http.CallOption) (*LoginResp, error)
- func (c *ShopInterfaceHTTPClientImpl) Register(ctx context.Context, in *RegisterReq, opts ...http.CallOption) (*RegisterResp, error)
- type ShopInterfaceHTTPServer
- type ShopInterfaceServer
- type UnimplementedShopInterfaceServer
- func (UnimplementedShopInterfaceServer) GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error)
- func (UnimplementedShopInterfaceServer) Login(context.Context, *LoginReq) (*LoginResp, error)
- func (UnimplementedShopInterfaceServer) Register(context.Context, *RegisterReq) (*RegisterResp, error)
- type UnsafeShopInterfaceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAvatar() string
- func (x *User) GetEmail() string
- func (x *User) GetId() int64
- func (x *User) GetNickname() string
- func (x *User) GetPhone() string
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- func (m *User) Validate() error
- func (m *User) ValidateAll() error
- type UserMultiError
- type UserValidationError
Constants ¶
const OperationShopInterfaceGetUserInfo = "/api.sms.interface.v1.ShopInterface/GetUserInfo"
const OperationShopInterfaceLogin = "/api.sms.interface.v1.ShopInterface/Login"
const OperationShopInterfaceRegister = "/api.sms.interface.v1.ShopInterface/Register"
Variables ¶
var File_shop_interface_v1_shop_interface_proto protoreflect.FileDescriptor
var ShopInterface_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.sms.interface.v1.ShopInterface", HandlerType: (*ShopInterfaceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _ShopInterface_Register_Handler, }, { MethodName: "Login", Handler: _ShopInterface_Login_Handler, }, { MethodName: "GetUserInfo", Handler: _ShopInterface_GetUserInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "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 RegisterShopInterfaceHTTPServer ¶
func RegisterShopInterfaceHTTPServer(s *http.Server, srv ShopInterfaceHTTPServer)
func RegisterShopInterfaceServer ¶
func RegisterShopInterfaceServer(s grpc.ServiceRegistrar, srv ShopInterfaceServer)
Types ¶
type GetUserInfoReq ¶
type GetUserInfoReq struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetUserInfoReq) Descriptor
deprecated
func (*GetUserInfoReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUserInfoReq.ProtoReflect.Descriptor instead.
func (*GetUserInfoReq) GetId ¶
func (x *GetUserInfoReq) GetId() int64
func (*GetUserInfoReq) ProtoMessage ¶
func (*GetUserInfoReq) ProtoMessage()
func (*GetUserInfoReq) ProtoReflect ¶
func (x *GetUserInfoReq) ProtoReflect() protoreflect.Message
func (*GetUserInfoReq) Reset ¶
func (x *GetUserInfoReq) Reset()
func (*GetUserInfoReq) String ¶
func (x *GetUserInfoReq) String() string
func (*GetUserInfoReq) Validate ¶
func (m *GetUserInfoReq) Validate() error
Validate checks the field values on GetUserInfoReq 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 (*GetUserInfoReq) ValidateAll ¶
func (m *GetUserInfoReq) ValidateAll() error
ValidateAll checks the field values on GetUserInfoReq 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 GetUserInfoReqMultiError, or nil if none found.
type GetUserInfoReqMultiError ¶
type GetUserInfoReqMultiError []error
GetUserInfoReqMultiError is an error wrapping multiple validation errors returned by GetUserInfoReq.ValidateAll() if the designated constraints aren't met.
func (GetUserInfoReqMultiError) AllErrors ¶
func (m GetUserInfoReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetUserInfoReqMultiError) Error ¶
func (m GetUserInfoReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetUserInfoReqValidationError ¶
type GetUserInfoReqValidationError struct {
// contains filtered or unexported fields
}
GetUserInfoReqValidationError is the validation error returned by GetUserInfoReq.Validate if the designated constraints aren't met.
func (GetUserInfoReqValidationError) Cause ¶
func (e GetUserInfoReqValidationError) Cause() error
Cause function returns cause value.
func (GetUserInfoReqValidationError) Error ¶
func (e GetUserInfoReqValidationError) Error() string
Error satisfies the builtin error interface
func (GetUserInfoReqValidationError) ErrorName ¶
func (e GetUserInfoReqValidationError) ErrorName() string
ErrorName returns error name.
func (GetUserInfoReqValidationError) Field ¶
func (e GetUserInfoReqValidationError) Field() string
Field function returns field value.
func (GetUserInfoReqValidationError) Key ¶
func (e GetUserInfoReqValidationError) Key() bool
Key function returns key value.
func (GetUserInfoReqValidationError) Reason ¶
func (e GetUserInfoReqValidationError) Reason() string
Reason function returns reason value.
type GetUserInfoResp ¶
type GetUserInfoResp struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*GetUserInfoResp) Descriptor
deprecated
func (*GetUserInfoResp) Descriptor() ([]byte, []int)
Deprecated: Use GetUserInfoResp.ProtoReflect.Descriptor instead.
func (*GetUserInfoResp) GetUser ¶
func (x *GetUserInfoResp) GetUser() *User
func (*GetUserInfoResp) ProtoMessage ¶
func (*GetUserInfoResp) ProtoMessage()
func (*GetUserInfoResp) ProtoReflect ¶
func (x *GetUserInfoResp) ProtoReflect() protoreflect.Message
func (*GetUserInfoResp) Reset ¶
func (x *GetUserInfoResp) Reset()
func (*GetUserInfoResp) String ¶
func (x *GetUserInfoResp) String() string
func (*GetUserInfoResp) Validate ¶
func (m *GetUserInfoResp) Validate() error
Validate checks the field values on GetUserInfoResp 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 (*GetUserInfoResp) ValidateAll ¶
func (m *GetUserInfoResp) ValidateAll() error
ValidateAll checks the field values on GetUserInfoResp 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 GetUserInfoRespMultiError, or nil if none found.
type GetUserInfoRespMultiError ¶
type GetUserInfoRespMultiError []error
GetUserInfoRespMultiError is an error wrapping multiple validation errors returned by GetUserInfoResp.ValidateAll() if the designated constraints aren't met.
func (GetUserInfoRespMultiError) AllErrors ¶
func (m GetUserInfoRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetUserInfoRespMultiError) Error ¶
func (m GetUserInfoRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetUserInfoRespValidationError ¶
type GetUserInfoRespValidationError struct {
// contains filtered or unexported fields
}
GetUserInfoRespValidationError is the validation error returned by GetUserInfoResp.Validate if the designated constraints aren't met.
func (GetUserInfoRespValidationError) Cause ¶
func (e GetUserInfoRespValidationError) Cause() error
Cause function returns cause value.
func (GetUserInfoRespValidationError) Error ¶
func (e GetUserInfoRespValidationError) Error() string
Error satisfies the builtin error interface
func (GetUserInfoRespValidationError) ErrorName ¶
func (e GetUserInfoRespValidationError) ErrorName() string
ErrorName returns error name.
func (GetUserInfoRespValidationError) Field ¶
func (e GetUserInfoRespValidationError) Field() string
Field function returns field value.
func (GetUserInfoRespValidationError) Key ¶
func (e GetUserInfoRespValidationError) Key() bool
Key function returns key value.
func (GetUserInfoRespValidationError) Reason ¶
func (e GetUserInfoRespValidationError) Reason() string
Reason function returns reason value.
type LoginReq ¶
type LoginReq struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` Code string `protobuf:"bytes,5,opt,name=code,proto3" json:"code,omitempty"` Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
func (*LoginReq) Descriptor
deprecated
func (*LoginReq) GetPassword ¶
func (*LoginReq) GetUsername ¶
func (*LoginReq) ProtoMessage ¶
func (*LoginReq) ProtoMessage()
func (*LoginReq) ProtoReflect ¶
func (x *LoginReq) ProtoReflect() protoreflect.Message
func (*LoginReq) Validate ¶
Validate checks the field values on LoginReq 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 (*LoginReq) ValidateAll ¶
ValidateAll checks the field values on LoginReq 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 LoginReqMultiError, or nil if none found.
type LoginReqMultiError ¶
type LoginReqMultiError []error
LoginReqMultiError is an error wrapping multiple validation errors returned by LoginReq.ValidateAll() if the designated constraints aren't met.
func (LoginReqMultiError) AllErrors ¶
func (m LoginReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LoginReqMultiError) Error ¶
func (m LoginReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LoginReqValidationError ¶
type LoginReqValidationError struct {
// contains filtered or unexported fields
}
LoginReqValidationError is the validation error returned by LoginReq.Validate if the designated constraints aren't met.
func (LoginReqValidationError) Cause ¶
func (e LoginReqValidationError) Cause() error
Cause function returns cause value.
func (LoginReqValidationError) Error ¶
func (e LoginReqValidationError) Error() string
Error satisfies the builtin error interface
func (LoginReqValidationError) ErrorName ¶
func (e LoginReqValidationError) ErrorName() string
ErrorName returns error name.
func (LoginReqValidationError) Field ¶
func (e LoginReqValidationError) Field() string
Field function returns field value.
func (LoginReqValidationError) Key ¶
func (e LoginReqValidationError) Key() bool
Key function returns key value.
func (LoginReqValidationError) Reason ¶
func (e LoginReqValidationError) Reason() string
Reason function returns reason value.
type LoginResp ¶
type LoginResp struct {
// contains filtered or unexported fields
}
func (*LoginResp) Descriptor
deprecated
func (*LoginResp) ProtoMessage ¶
func (*LoginResp) ProtoMessage()
func (*LoginResp) ProtoReflect ¶
func (x *LoginResp) ProtoReflect() protoreflect.Message
func (*LoginResp) Validate ¶
Validate checks the field values on LoginResp 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 (*LoginResp) ValidateAll ¶
ValidateAll checks the field values on LoginResp 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 LoginRespMultiError, or nil if none found.
type LoginRespMultiError ¶
type LoginRespMultiError []error
LoginRespMultiError is an error wrapping multiple validation errors returned by LoginResp.ValidateAll() if the designated constraints aren't met.
func (LoginRespMultiError) AllErrors ¶
func (m LoginRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LoginRespMultiError) Error ¶
func (m LoginRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LoginRespValidationError ¶
type LoginRespValidationError struct {
// contains filtered or unexported fields
}
LoginRespValidationError is the validation error returned by LoginResp.Validate if the designated constraints aren't met.
func (LoginRespValidationError) Cause ¶
func (e LoginRespValidationError) Cause() error
Cause function returns cause value.
func (LoginRespValidationError) Error ¶
func (e LoginRespValidationError) Error() string
Error satisfies the builtin error interface
func (LoginRespValidationError) ErrorName ¶
func (e LoginRespValidationError) ErrorName() string
ErrorName returns error name.
func (LoginRespValidationError) Field ¶
func (e LoginRespValidationError) Field() string
Field function returns field value.
func (LoginRespValidationError) Key ¶
func (e LoginRespValidationError) Key() bool
Key function returns key value.
func (LoginRespValidationError) Reason ¶
func (e LoginRespValidationError) Reason() string
Reason function returns reason value.
type RegisterReq ¶
type RegisterReq struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` Code string `protobuf:"bytes,5,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) GetEmail ¶
func (x *RegisterReq) GetEmail() string
func (*RegisterReq) GetPassword ¶
func (x *RegisterReq) GetPassword() string
func (*RegisterReq) GetPhone ¶
func (x *RegisterReq) GetPhone() string
func (*RegisterReq) GetUsername ¶
func (x *RegisterReq) GetUsername() 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 RegisterResp ¶
type RegisterResp struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Nickname string `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname,omitempty"` Avatar string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"` Gender string `protobuf:"bytes,5,opt,name=gender,proto3" json:"gender,omitempty"` // contains filtered or unexported fields }
func (*RegisterResp) Descriptor
deprecated
func (*RegisterResp) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResp.ProtoReflect.Descriptor instead.
func (*RegisterResp) GetAvatar ¶
func (x *RegisterResp) GetAvatar() string
func (*RegisterResp) GetGender ¶
func (x *RegisterResp) GetGender() string
func (*RegisterResp) GetId ¶
func (x *RegisterResp) GetId() int64
func (*RegisterResp) GetNickname ¶
func (x *RegisterResp) GetNickname() string
func (*RegisterResp) GetUsername ¶
func (x *RegisterResp) GetUsername() string
func (*RegisterResp) ProtoMessage ¶
func (*RegisterResp) ProtoMessage()
func (*RegisterResp) ProtoReflect ¶
func (x *RegisterResp) ProtoReflect() protoreflect.Message
func (*RegisterResp) Reset ¶
func (x *RegisterResp) Reset()
func (*RegisterResp) String ¶
func (x *RegisterResp) String() string
func (*RegisterResp) Validate ¶
func (m *RegisterResp) Validate() error
Validate checks the field values on RegisterResp 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 (*RegisterResp) ValidateAll ¶
func (m *RegisterResp) ValidateAll() error
ValidateAll checks the field values on RegisterResp 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 RegisterRespMultiError, or nil if none found.
type RegisterRespMultiError ¶
type RegisterRespMultiError []error
RegisterRespMultiError is an error wrapping multiple validation errors returned by RegisterResp.ValidateAll() if the designated constraints aren't met.
func (RegisterRespMultiError) AllErrors ¶
func (m RegisterRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RegisterRespMultiError) Error ¶
func (m RegisterRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RegisterRespValidationError ¶
type RegisterRespValidationError struct {
// contains filtered or unexported fields
}
RegisterRespValidationError is the validation error returned by RegisterResp.Validate if the designated constraints aren't met.
func (RegisterRespValidationError) Cause ¶
func (e RegisterRespValidationError) Cause() error
Cause function returns cause value.
func (RegisterRespValidationError) Error ¶
func (e RegisterRespValidationError) Error() string
Error satisfies the builtin error interface
func (RegisterRespValidationError) ErrorName ¶
func (e RegisterRespValidationError) ErrorName() string
ErrorName returns error name.
func (RegisterRespValidationError) Field ¶
func (e RegisterRespValidationError) Field() string
Field function returns field value.
func (RegisterRespValidationError) Key ¶
func (e RegisterRespValidationError) Key() bool
Key function returns key value.
func (RegisterRespValidationError) Reason ¶
func (e RegisterRespValidationError) Reason() string
Reason function returns reason value.
type ShopInterfaceClient ¶
type ShopInterfaceClient interface { Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterResp, error) Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error) // rpc QuickLogin(LoginReq) returns (LoginResp) { // option (google.api.http) = { // post : "/api/quickLogin" // body : "*" // }; // } GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, 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 ShopInterfaceHTTPClient ¶
type ShopInterfaceHTTPClient interface { GetUserInfo(ctx context.Context, req *GetUserInfoReq, opts ...http.CallOption) (rsp *GetUserInfoResp, err error) Login(ctx context.Context, req *LoginReq, opts ...http.CallOption) (rsp *LoginResp, err error) Register(ctx context.Context, req *RegisterReq, opts ...http.CallOption) (rsp *RegisterResp, err error) }
func NewShopInterfaceHTTPClient ¶
func NewShopInterfaceHTTPClient(client *http.Client) ShopInterfaceHTTPClient
type ShopInterfaceHTTPClientImpl ¶
type ShopInterfaceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*ShopInterfaceHTTPClientImpl) GetUserInfo ¶
func (c *ShopInterfaceHTTPClientImpl) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...http.CallOption) (*GetUserInfoResp, error)
func (*ShopInterfaceHTTPClientImpl) Login ¶
func (c *ShopInterfaceHTTPClientImpl) Login(ctx context.Context, in *LoginReq, opts ...http.CallOption) (*LoginResp, error)
func (*ShopInterfaceHTTPClientImpl) Register ¶
func (c *ShopInterfaceHTTPClientImpl) Register(ctx context.Context, in *RegisterReq, opts ...http.CallOption) (*RegisterResp, error)
type ShopInterfaceHTTPServer ¶
type ShopInterfaceHTTPServer interface { // GetUserInfo rpc QuickLogin(LoginReq) returns (LoginResp) { // option (google.api.http) = { // post : "/api/quickLogin" // body : "*" // }; // } GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error) Login(context.Context, *LoginReq) (*LoginResp, error) Register(context.Context, *RegisterReq) (*RegisterResp, error) }
type ShopInterfaceServer ¶
type ShopInterfaceServer interface { Register(context.Context, *RegisterReq) (*RegisterResp, error) Login(context.Context, *LoginReq) (*LoginResp, error) // rpc QuickLogin(LoginReq) returns (LoginResp) { // option (google.api.http) = { // post : "/api/quickLogin" // body : "*" // }; // } GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, 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) GetUserInfo ¶
func (UnimplementedShopInterfaceServer) GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error)
func (UnimplementedShopInterfaceServer) Register ¶
func (UnimplementedShopInterfaceServer) Register(context.Context, *RegisterReq) (*RegisterResp, 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.
type User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` Nickname string `protobuf:"bytes,5,opt,name=nickname,proto3" json:"nickname,omitempty"` Avatar string `protobuf:"bytes,6,opt,name=avatar,proto3" json:"avatar,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetNickname ¶
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
func (*User) Validate ¶
Validate checks the field values on User 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 (*User) ValidateAll ¶
ValidateAll checks the field values on User 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 UserMultiError, or nil if none found.
type UserMultiError ¶
type UserMultiError []error
UserMultiError is an error wrapping multiple validation errors returned by User.ValidateAll() if the designated constraints aren't met.
func (UserMultiError) AllErrors ¶
func (m UserMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserMultiError) Error ¶
func (m UserMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserValidationError ¶
type UserValidationError struct {
// contains filtered or unexported fields
}
UserValidationError is the validation error returned by User.Validate if the designated constraints aren't met.
func (UserValidationError) Cause ¶
func (e UserValidationError) Cause() error
Cause function returns cause value.
func (UserValidationError) Error ¶
func (e UserValidationError) Error() string
Error satisfies the builtin error interface
func (UserValidationError) ErrorName ¶
func (e UserValidationError) ErrorName() string
ErrorName returns error name.
func (UserValidationError) Field ¶
func (e UserValidationError) Field() string
Field function returns field value.
func (UserValidationError) Key ¶
func (e UserValidationError) Key() bool
Key function returns key value.
func (UserValidationError) Reason ¶
func (e UserValidationError) Reason() string
Reason function returns reason value.