Documentation ¶
Index ¶
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type Ban
- func (*Ban) Descriptor() ([]byte, []int)deprecated
- func (x *Ban) GetBanAt() int64
- func (x *Ban) GetReason() string
- func (x *Ban) GetUnbanAt() int64
- func (*Ban) ProtoMessage()
- func (x *Ban) ProtoReflect() protoreflect.Message
- func (x *Ban) Reset()
- func (x *Ban) String() string
- func (m *Ban) Validate() error
- func (m *Ban) ValidateAll() error
- type BanMultiError
- type BanReq
- func (*BanReq) Descriptor() ([]byte, []int)deprecated
- func (x *BanReq) GetAdminId() int64
- func (x *BanReq) GetBan() *Ban
- func (x *BanReq) GetUserId() int64
- func (*BanReq) ProtoMessage()
- func (x *BanReq) ProtoReflect() protoreflect.Message
- func (x *BanReq) Reset()
- func (x *BanReq) String() string
- func (m *BanReq) Validate() error
- func (m *BanReq) ValidateAll() error
- type BanReqMultiError
- type BanReqValidationError
- type BanResp
- func (*BanResp) Descriptor() ([]byte, []int)deprecated
- func (x *BanResp) GetUser() *User
- func (*BanResp) ProtoMessage()
- func (x *BanResp) ProtoReflect() protoreflect.Message
- func (x *BanResp) Reset()
- func (x *BanResp) String() string
- func (m *BanResp) Validate() error
- func (m *BanResp) ValidateAll() error
- type BanRespMultiError
- type BanRespValidationError
- type BanValidationError
- type GetInfoReq
- func (*GetInfoReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetInfoReq) GetId() int64
- func (*GetInfoReq) ProtoMessage()
- func (x *GetInfoReq) ProtoReflect() protoreflect.Message
- func (x *GetInfoReq) Reset()
- func (x *GetInfoReq) String() string
- func (m *GetInfoReq) Validate() error
- func (m *GetInfoReq) ValidateAll() error
- type GetInfoReqMultiError
- type GetInfoReqValidationError
- type GetInfoResp
- func (*GetInfoResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetInfoResp) GetUser() *User
- func (*GetInfoResp) ProtoMessage()
- func (x *GetInfoResp) ProtoReflect() protoreflect.Message
- func (x *GetInfoResp) Reset()
- func (x *GetInfoResp) String() string
- func (m *GetInfoResp) Validate() error
- func (m *GetInfoResp) ValidateAll() error
- type GetInfoRespMultiError
- type GetInfoRespValidationError
- func (e GetInfoRespValidationError) Cause() error
- func (e GetInfoRespValidationError) Error() string
- func (e GetInfoRespValidationError) ErrorName() string
- func (e GetInfoRespValidationError) Field() string
- func (e GetInfoRespValidationError) Key() bool
- func (e GetInfoRespValidationError) Reason() string
- type LoginReq
- func (*LoginReq) Descriptor() ([]byte, []int)deprecated
- func (x *LoginReq) GetEmail() string
- func (x *LoginReq) GetPassword() 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
- func (*LoginResp) Descriptor() ([]byte, []int)deprecated
- func (x *LoginResp) GetToken() string
- func (x *LoginResp) GetUser() *User
- func (*LoginResp) ProtoMessage()
- func (x *LoginResp) ProtoReflect() protoreflect.Message
- func (x *LoginResp) Reset()
- func (x *LoginResp) String() string
- func (m *LoginResp) Validate() error
- func (m *LoginResp) ValidateAll() error
- type LoginRespMultiError
- type LoginRespValidationError
- type ModifyInfoReq
- func (*ModifyInfoReq) Descriptor() ([]byte, []int)deprecated
- func (x *ModifyInfoReq) GetDescription() string
- func (x *ModifyInfoReq) GetId() int64
- func (x *ModifyInfoReq) GetPhoto() []byte
- func (x *ModifyInfoReq) GetPhotoType() string
- func (*ModifyInfoReq) ProtoMessage()
- func (x *ModifyInfoReq) ProtoReflect() protoreflect.Message
- func (x *ModifyInfoReq) Reset()
- func (x *ModifyInfoReq) String() string
- func (m *ModifyInfoReq) Validate() error
- func (m *ModifyInfoReq) ValidateAll() error
- type ModifyInfoReqMultiError
- type ModifyInfoReqValidationError
- func (e ModifyInfoReqValidationError) Cause() error
- func (e ModifyInfoReqValidationError) Error() string
- func (e ModifyInfoReqValidationError) ErrorName() string
- func (e ModifyInfoReqValidationError) Field() string
- func (e ModifyInfoReqValidationError) Key() bool
- func (e ModifyInfoReqValidationError) Reason() string
- type ModifyInfoResp
- func (*ModifyInfoResp) Descriptor() ([]byte, []int)deprecated
- func (x *ModifyInfoResp) GetUser() *User
- func (*ModifyInfoResp) ProtoMessage()
- func (x *ModifyInfoResp) ProtoReflect() protoreflect.Message
- func (x *ModifyInfoResp) Reset()
- func (x *ModifyInfoResp) String() string
- func (m *ModifyInfoResp) Validate() error
- func (m *ModifyInfoResp) ValidateAll() error
- type ModifyInfoRespMultiError
- type ModifyInfoRespValidationError
- func (e ModifyInfoRespValidationError) Cause() error
- func (e ModifyInfoRespValidationError) Error() string
- func (e ModifyInfoRespValidationError) ErrorName() string
- func (e ModifyInfoRespValidationError) Field() string
- func (e ModifyInfoRespValidationError) Key() bool
- func (e ModifyInfoRespValidationError) Reason() string
- type RegisterReq
- func (*RegisterReq) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterReq) GetEmail() string
- func (x *RegisterReq) GetName() 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 RegisterResp
- func (*RegisterResp) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterResp) GetToken() string
- func (x *RegisterResp) GetUser() *User
- 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 UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) Ban(context.Context, *BanReq) (*BanResp, error)
- func (UnimplementedUserServiceServer) GetInfo(context.Context, *GetInfoReq) (*GetInfoResp, error)
- func (UnimplementedUserServiceServer) Login(context.Context, *LoginReq) (*LoginResp, error)
- func (UnimplementedUserServiceServer) ModifyInfo(context.Context, *ModifyInfoReq) (*ModifyInfoResp, error)
- func (UnimplementedUserServiceServer) Register(context.Context, *RegisterReq) (*RegisterResp, error)
- type UnsafeUserServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetBan() *Ban
- func (x *User) GetDescription() string
- func (x *User) GetEmail() string
- func (x *User) GetId() int64
- func (x *User) GetName() string
- func (x *User) GetPhotoUrl() string
- func (x *User) GetRoles() []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 UserServiceClient
- type UserServiceServer
- type UserValidationError
Constants ¶
This section is empty.
Variables ¶
var File_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _UserService_Login_Handler, }, { MethodName: "Register", Handler: _UserService_Register_Handler, }, { MethodName: "GetInfo", Handler: _UserService_GetInfo_Handler, }, { MethodName: "Ban", Handler: _UserService_Ban_Handler, }, { MethodName: "ModifyInfo", Handler: _UserService_ModifyInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type Ban ¶
type Ban struct { Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason" form:"reason" binding:"required"` // @gotags: json:"reason" form:"reason" binding:"required" BanAt int64 `protobuf:"varint,2,opt,name=ban_at,json=banAt,proto3" json:"ban_at" form:"ban_at" binding:"required"` // @gotags: json:"ban_at" form:"ban_at" binding:"required" UnbanAt int64 `protobuf:"varint,3,opt,name=unban_at,json=unbanAt,proto3" json:"unban_at" form:"unban_at" binding:"required"` // @gotags: json:"unban_at" form:"unban_at" binding:"required" // contains filtered or unexported fields }
func (*Ban) Descriptor
deprecated
func (*Ban) GetUnbanAt ¶
func (*Ban) ProtoMessage ¶
func (*Ban) ProtoMessage()
func (*Ban) ProtoReflect ¶
func (x *Ban) ProtoReflect() protoreflect.Message
func (*Ban) Validate ¶
Validate checks the field values on Ban 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 (*Ban) ValidateAll ¶
ValidateAll checks the field values on Ban 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 BanMultiError, or nil if none found.
type BanMultiError ¶
type BanMultiError []error
BanMultiError is an error wrapping multiple validation errors returned by Ban.ValidateAll() if the designated constraints aren't met.
func (BanMultiError) AllErrors ¶
func (m BanMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (BanMultiError) Error ¶
func (m BanMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type BanReq ¶
type BanReq struct { AdminId int64 `protobuf:"varint,1,opt,name=admin_id,json=adminId,proto3" json:"admin_id,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id" form:"user_id" binding:"required"` // @gotags: json:"user_id" form:"user_id" binding:"required" Ban *Ban `protobuf:"bytes,3,opt,name=ban,proto3" json:"ban,omitempty"` // contains filtered or unexported fields }
func (*BanReq) Descriptor
deprecated
func (*BanReq) GetAdminId ¶
func (*BanReq) ProtoMessage ¶
func (*BanReq) ProtoMessage()
func (*BanReq) ProtoReflect ¶
func (x *BanReq) ProtoReflect() protoreflect.Message
func (*BanReq) Validate ¶
Validate checks the field values on BanReq 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 (*BanReq) ValidateAll ¶
ValidateAll checks the field values on BanReq 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 BanReqMultiError, or nil if none found.
type BanReqMultiError ¶
type BanReqMultiError []error
BanReqMultiError is an error wrapping multiple validation errors returned by BanReq.ValidateAll() if the designated constraints aren't met.
func (BanReqMultiError) AllErrors ¶
func (m BanReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (BanReqMultiError) Error ¶
func (m BanReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type BanReqValidationError ¶
type BanReqValidationError struct {
// contains filtered or unexported fields
}
BanReqValidationError is the validation error returned by BanReq.Validate if the designated constraints aren't met.
func (BanReqValidationError) Cause ¶
func (e BanReqValidationError) Cause() error
Cause function returns cause value.
func (BanReqValidationError) Error ¶
func (e BanReqValidationError) Error() string
Error satisfies the builtin error interface
func (BanReqValidationError) ErrorName ¶
func (e BanReqValidationError) ErrorName() string
ErrorName returns error name.
func (BanReqValidationError) Field ¶
func (e BanReqValidationError) Field() string
Field function returns field value.
func (BanReqValidationError) Key ¶
func (e BanReqValidationError) Key() bool
Key function returns key value.
func (BanReqValidationError) Reason ¶
func (e BanReqValidationError) Reason() string
Reason function returns reason value.
type BanResp ¶
type BanResp struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*BanResp) Descriptor
deprecated
func (*BanResp) ProtoMessage ¶
func (*BanResp) ProtoMessage()
func (*BanResp) ProtoReflect ¶
func (x *BanResp) ProtoReflect() protoreflect.Message
func (*BanResp) Validate ¶
Validate checks the field values on BanResp 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 (*BanResp) ValidateAll ¶
ValidateAll checks the field values on BanResp 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 BanRespMultiError, or nil if none found.
type BanRespMultiError ¶
type BanRespMultiError []error
BanRespMultiError is an error wrapping multiple validation errors returned by BanResp.ValidateAll() if the designated constraints aren't met.
func (BanRespMultiError) AllErrors ¶
func (m BanRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (BanRespMultiError) Error ¶
func (m BanRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type BanRespValidationError ¶
type BanRespValidationError struct {
// contains filtered or unexported fields
}
BanRespValidationError is the validation error returned by BanResp.Validate if the designated constraints aren't met.
func (BanRespValidationError) Cause ¶
func (e BanRespValidationError) Cause() error
Cause function returns cause value.
func (BanRespValidationError) Error ¶
func (e BanRespValidationError) Error() string
Error satisfies the builtin error interface
func (BanRespValidationError) ErrorName ¶
func (e BanRespValidationError) ErrorName() string
ErrorName returns error name.
func (BanRespValidationError) Field ¶
func (e BanRespValidationError) Field() string
Field function returns field value.
func (BanRespValidationError) Key ¶
func (e BanRespValidationError) Key() bool
Key function returns key value.
func (BanRespValidationError) Reason ¶
func (e BanRespValidationError) Reason() string
Reason function returns reason value.
type BanValidationError ¶
type BanValidationError struct {
// contains filtered or unexported fields
}
BanValidationError is the validation error returned by Ban.Validate if the designated constraints aren't met.
func (BanValidationError) Cause ¶
func (e BanValidationError) Cause() error
Cause function returns cause value.
func (BanValidationError) Error ¶
func (e BanValidationError) Error() string
Error satisfies the builtin error interface
func (BanValidationError) ErrorName ¶
func (e BanValidationError) ErrorName() string
ErrorName returns error name.
func (BanValidationError) Field ¶
func (e BanValidationError) Field() string
Field function returns field value.
func (BanValidationError) Key ¶
func (e BanValidationError) Key() bool
Key function returns key value.
func (BanValidationError) Reason ¶
func (e BanValidationError) Reason() string
Reason function returns reason value.
type GetInfoReq ¶
type GetInfoReq struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetInfoReq) Descriptor
deprecated
func (*GetInfoReq) Descriptor() ([]byte, []int)
Deprecated: Use GetInfoReq.ProtoReflect.Descriptor instead.
func (*GetInfoReq) GetId ¶
func (x *GetInfoReq) GetId() int64
func (*GetInfoReq) ProtoMessage ¶
func (*GetInfoReq) ProtoMessage()
func (*GetInfoReq) ProtoReflect ¶
func (x *GetInfoReq) ProtoReflect() protoreflect.Message
func (*GetInfoReq) Reset ¶
func (x *GetInfoReq) Reset()
func (*GetInfoReq) String ¶
func (x *GetInfoReq) String() string
func (*GetInfoReq) Validate ¶
func (m *GetInfoReq) Validate() error
Validate checks the field values on GetInfoReq 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 (*GetInfoReq) ValidateAll ¶
func (m *GetInfoReq) ValidateAll() error
ValidateAll checks the field values on GetInfoReq 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 GetInfoReqMultiError, or nil if none found.
type GetInfoReqMultiError ¶
type GetInfoReqMultiError []error
GetInfoReqMultiError is an error wrapping multiple validation errors returned by GetInfoReq.ValidateAll() if the designated constraints aren't met.
func (GetInfoReqMultiError) AllErrors ¶
func (m GetInfoReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetInfoReqMultiError) Error ¶
func (m GetInfoReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetInfoReqValidationError ¶
type GetInfoReqValidationError struct {
// contains filtered or unexported fields
}
GetInfoReqValidationError is the validation error returned by GetInfoReq.Validate if the designated constraints aren't met.
func (GetInfoReqValidationError) Cause ¶
func (e GetInfoReqValidationError) Cause() error
Cause function returns cause value.
func (GetInfoReqValidationError) Error ¶
func (e GetInfoReqValidationError) Error() string
Error satisfies the builtin error interface
func (GetInfoReqValidationError) ErrorName ¶
func (e GetInfoReqValidationError) ErrorName() string
ErrorName returns error name.
func (GetInfoReqValidationError) Field ¶
func (e GetInfoReqValidationError) Field() string
Field function returns field value.
func (GetInfoReqValidationError) Key ¶
func (e GetInfoReqValidationError) Key() bool
Key function returns key value.
func (GetInfoReqValidationError) Reason ¶
func (e GetInfoReqValidationError) Reason() string
Reason function returns reason value.
type GetInfoResp ¶
type GetInfoResp struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*GetInfoResp) Descriptor
deprecated
func (*GetInfoResp) Descriptor() ([]byte, []int)
Deprecated: Use GetInfoResp.ProtoReflect.Descriptor instead.
func (*GetInfoResp) GetUser ¶
func (x *GetInfoResp) GetUser() *User
func (*GetInfoResp) ProtoMessage ¶
func (*GetInfoResp) ProtoMessage()
func (*GetInfoResp) ProtoReflect ¶
func (x *GetInfoResp) ProtoReflect() protoreflect.Message
func (*GetInfoResp) Reset ¶
func (x *GetInfoResp) Reset()
func (*GetInfoResp) String ¶
func (x *GetInfoResp) String() string
func (*GetInfoResp) Validate ¶
func (m *GetInfoResp) Validate() error
Validate checks the field values on GetInfoResp 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 (*GetInfoResp) ValidateAll ¶
func (m *GetInfoResp) ValidateAll() error
ValidateAll checks the field values on GetInfoResp 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 GetInfoRespMultiError, or nil if none found.
type GetInfoRespMultiError ¶
type GetInfoRespMultiError []error
GetInfoRespMultiError is an error wrapping multiple validation errors returned by GetInfoResp.ValidateAll() if the designated constraints aren't met.
func (GetInfoRespMultiError) AllErrors ¶
func (m GetInfoRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetInfoRespMultiError) Error ¶
func (m GetInfoRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetInfoRespValidationError ¶
type GetInfoRespValidationError struct {
// contains filtered or unexported fields
}
GetInfoRespValidationError is the validation error returned by GetInfoResp.Validate if the designated constraints aren't met.
func (GetInfoRespValidationError) Cause ¶
func (e GetInfoRespValidationError) Cause() error
Cause function returns cause value.
func (GetInfoRespValidationError) Error ¶
func (e GetInfoRespValidationError) Error() string
Error satisfies the builtin error interface
func (GetInfoRespValidationError) ErrorName ¶
func (e GetInfoRespValidationError) ErrorName() string
ErrorName returns error name.
func (GetInfoRespValidationError) Field ¶
func (e GetInfoRespValidationError) Field() string
Field function returns field value.
func (GetInfoRespValidationError) Key ¶
func (e GetInfoRespValidationError) Key() bool
Key function returns key value.
func (GetInfoRespValidationError) Reason ¶
func (e GetInfoRespValidationError) Reason() string
Reason function returns reason value.
type LoginReq ¶
type LoginReq struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email" form:"email" binding:"required"` // @gotags: json:"email" form:"email" binding:"required" Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password" form:"password" binding:"required"` // @gotags: json:"password" form:"password" binding:"required" // contains filtered or unexported fields }
func (*LoginReq) Descriptor
deprecated
func (*LoginReq) GetPassword ¶
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 { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` // 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 ModifyInfoReq ¶
type ModifyInfoReq struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description" form:"description"` // @gotags: json:"description" form:"description" Photo []byte `protobuf:"bytes,3,opt,name=photo,proto3" json:"photo,omitempty"` PhotoType string `protobuf:"bytes,4,opt,name=photo_type,json=photoType,proto3" json:"photo_type,omitempty"` // contains filtered or unexported fields }
func (*ModifyInfoReq) Descriptor
deprecated
func (*ModifyInfoReq) Descriptor() ([]byte, []int)
Deprecated: Use ModifyInfoReq.ProtoReflect.Descriptor instead.
func (*ModifyInfoReq) GetDescription ¶
func (x *ModifyInfoReq) GetDescription() string
func (*ModifyInfoReq) GetId ¶
func (x *ModifyInfoReq) GetId() int64
func (*ModifyInfoReq) GetPhoto ¶
func (x *ModifyInfoReq) GetPhoto() []byte
func (*ModifyInfoReq) GetPhotoType ¶
func (x *ModifyInfoReq) GetPhotoType() string
func (*ModifyInfoReq) ProtoMessage ¶
func (*ModifyInfoReq) ProtoMessage()
func (*ModifyInfoReq) ProtoReflect ¶
func (x *ModifyInfoReq) ProtoReflect() protoreflect.Message
func (*ModifyInfoReq) Reset ¶
func (x *ModifyInfoReq) Reset()
func (*ModifyInfoReq) String ¶
func (x *ModifyInfoReq) String() string
func (*ModifyInfoReq) Validate ¶
func (m *ModifyInfoReq) Validate() error
Validate checks the field values on ModifyInfoReq 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 (*ModifyInfoReq) ValidateAll ¶
func (m *ModifyInfoReq) ValidateAll() error
ValidateAll checks the field values on ModifyInfoReq 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 ModifyInfoReqMultiError, or nil if none found.
type ModifyInfoReqMultiError ¶
type ModifyInfoReqMultiError []error
ModifyInfoReqMultiError is an error wrapping multiple validation errors returned by ModifyInfoReq.ValidateAll() if the designated constraints aren't met.
func (ModifyInfoReqMultiError) AllErrors ¶
func (m ModifyInfoReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ModifyInfoReqMultiError) Error ¶
func (m ModifyInfoReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ModifyInfoReqValidationError ¶
type ModifyInfoReqValidationError struct {
// contains filtered or unexported fields
}
ModifyInfoReqValidationError is the validation error returned by ModifyInfoReq.Validate if the designated constraints aren't met.
func (ModifyInfoReqValidationError) Cause ¶
func (e ModifyInfoReqValidationError) Cause() error
Cause function returns cause value.
func (ModifyInfoReqValidationError) Error ¶
func (e ModifyInfoReqValidationError) Error() string
Error satisfies the builtin error interface
func (ModifyInfoReqValidationError) ErrorName ¶
func (e ModifyInfoReqValidationError) ErrorName() string
ErrorName returns error name.
func (ModifyInfoReqValidationError) Field ¶
func (e ModifyInfoReqValidationError) Field() string
Field function returns field value.
func (ModifyInfoReqValidationError) Key ¶
func (e ModifyInfoReqValidationError) Key() bool
Key function returns key value.
func (ModifyInfoReqValidationError) Reason ¶
func (e ModifyInfoReqValidationError) Reason() string
Reason function returns reason value.
type ModifyInfoResp ¶
type ModifyInfoResp struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*ModifyInfoResp) Descriptor
deprecated
func (*ModifyInfoResp) Descriptor() ([]byte, []int)
Deprecated: Use ModifyInfoResp.ProtoReflect.Descriptor instead.
func (*ModifyInfoResp) GetUser ¶
func (x *ModifyInfoResp) GetUser() *User
func (*ModifyInfoResp) ProtoMessage ¶
func (*ModifyInfoResp) ProtoMessage()
func (*ModifyInfoResp) ProtoReflect ¶
func (x *ModifyInfoResp) ProtoReflect() protoreflect.Message
func (*ModifyInfoResp) Reset ¶
func (x *ModifyInfoResp) Reset()
func (*ModifyInfoResp) String ¶
func (x *ModifyInfoResp) String() string
func (*ModifyInfoResp) Validate ¶
func (m *ModifyInfoResp) Validate() error
Validate checks the field values on ModifyInfoResp 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 (*ModifyInfoResp) ValidateAll ¶
func (m *ModifyInfoResp) ValidateAll() error
ValidateAll checks the field values on ModifyInfoResp 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 ModifyInfoRespMultiError, or nil if none found.
type ModifyInfoRespMultiError ¶
type ModifyInfoRespMultiError []error
ModifyInfoRespMultiError is an error wrapping multiple validation errors returned by ModifyInfoResp.ValidateAll() if the designated constraints aren't met.
func (ModifyInfoRespMultiError) AllErrors ¶
func (m ModifyInfoRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ModifyInfoRespMultiError) Error ¶
func (m ModifyInfoRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ModifyInfoRespValidationError ¶
type ModifyInfoRespValidationError struct {
// contains filtered or unexported fields
}
ModifyInfoRespValidationError is the validation error returned by ModifyInfoResp.Validate if the designated constraints aren't met.
func (ModifyInfoRespValidationError) Cause ¶
func (e ModifyInfoRespValidationError) Cause() error
Cause function returns cause value.
func (ModifyInfoRespValidationError) Error ¶
func (e ModifyInfoRespValidationError) Error() string
Error satisfies the builtin error interface
func (ModifyInfoRespValidationError) ErrorName ¶
func (e ModifyInfoRespValidationError) ErrorName() string
ErrorName returns error name.
func (ModifyInfoRespValidationError) Field ¶
func (e ModifyInfoRespValidationError) Field() string
Field function returns field value.
func (ModifyInfoRespValidationError) Key ¶
func (e ModifyInfoRespValidationError) Key() bool
Key function returns key value.
func (ModifyInfoRespValidationError) Reason ¶
func (e ModifyInfoRespValidationError) Reason() string
Reason function returns reason value.
type RegisterReq ¶
type RegisterReq struct { // @gotags: json:"name" form:"name" binding:"required" Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" form:"name" binding:"required"` // @gotags: json:"email" form:"email" binding:"required" Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email" form:"email" binding:"required"` // @gotags: json:"password" form:"password" binding:"required" Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password" form:"password" binding:"required"` // contains filtered or unexported fields }
func (*RegisterReq) Descriptor
deprecated
func (*RegisterReq) Descriptor() ([]byte, []int)
Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.
func (*RegisterReq) GetEmail ¶
func (x *RegisterReq) GetEmail() string
func (*RegisterReq) GetName ¶
func (x *RegisterReq) GetName() 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 RegisterResp ¶
type RegisterResp struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*RegisterResp) Descriptor
deprecated
func (*RegisterResp) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResp.ProtoReflect.Descriptor instead.
func (*RegisterResp) GetToken ¶
func (x *RegisterResp) GetToken() string
func (*RegisterResp) GetUser ¶
func (x *RegisterResp) GetUser() *User
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 UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) GetInfo ¶
func (UnimplementedUserServiceServer) GetInfo(context.Context, *GetInfoReq) (*GetInfoResp, error)
func (UnimplementedUserServiceServer) ModifyInfo ¶
func (UnimplementedUserServiceServer) ModifyInfo(context.Context, *ModifyInfoReq) (*ModifyInfoResp, error)
func (UnimplementedUserServiceServer) Register ¶
func (UnimplementedUserServiceServer) Register(context.Context, *RegisterReq) (*RegisterResp, error)
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` PhotoUrl string `protobuf:"bytes,4,opt,name=photo_url,json=photoUrl,proto3" json:"photo_url,omitempty"` Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` Ban *Ban `protobuf:"bytes,6,opt,name=ban,proto3" json:"ban,omitempty"` Roles []string `protobuf:"bytes,7,rep,name=roles,proto3" json:"roles,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetDescription ¶
func (*User) GetPhotoUrl ¶
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 UserServiceClient ¶
type UserServiceClient interface { Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error) Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterResp, error) GetInfo(ctx context.Context, in *GetInfoReq, opts ...grpc.CallOption) (*GetInfoResp, error) Ban(ctx context.Context, in *BanReq, opts ...grpc.CallOption) (*BanResp, error) ModifyInfo(ctx context.Context, in *ModifyInfoReq, opts ...grpc.CallOption) (*ModifyInfoResp, error) }
UserServiceClient is the client API for UserService 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 NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { Login(context.Context, *LoginReq) (*LoginResp, error) Register(context.Context, *RegisterReq) (*RegisterResp, error) GetInfo(context.Context, *GetInfoReq) (*GetInfoResp, error) Ban(context.Context, *BanReq) (*BanResp, error) ModifyInfo(context.Context, *ModifyInfoReq) (*ModifyInfoResp, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility
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.