Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetAvatar() string
- func (x *CreateRequest) GetEmail() string
- func (x *CreateRequest) GetGender() v1.Gender
- func (x *CreateRequest) GetNickname() string
- func (x *CreateRequest) GetPassword() string
- func (x *CreateRequest) GetPhone() string
- func (x *CreateRequest) GetStatus() v1.Status
- func (x *CreateRequest) GetUsername() string
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- func (m *CreateRequest) Validate() error
- func (m *CreateRequest) ValidateAll() error
- type CreateRequestMultiError
- type CreateRequestValidationError
- func (e CreateRequestValidationError) Cause() error
- func (e CreateRequestValidationError) Error() string
- func (e CreateRequestValidationError) ErrorName() string
- func (e CreateRequestValidationError) Field() string
- func (e CreateRequestValidationError) Key() bool
- func (e CreateRequestValidationError) Reason() string
- type CreateResponse
- func (*CreateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateResponse) GetInfo() *v1.User
- func (*CreateResponse) ProtoMessage()
- func (x *CreateResponse) ProtoReflect() protoreflect.Message
- func (x *CreateResponse) Reset()
- func (x *CreateResponse) String() string
- func (m *CreateResponse) Validate() error
- func (m *CreateResponse) ValidateAll() error
- type CreateResponseMultiError
- type CreateResponseValidationError
- func (e CreateResponseValidationError) Cause() error
- func (e CreateResponseValidationError) Error() string
- func (e CreateResponseValidationError) ErrorName() string
- func (e CreateResponseValidationError) Field() string
- func (e CreateResponseValidationError) Key() bool
- func (e CreateResponseValidationError) Reason() string
- type DeleteRequest
- func (*DeleteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteRequest) GetId() int64
- func (*DeleteRequest) ProtoMessage()
- func (x *DeleteRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteRequest) Reset()
- func (x *DeleteRequest) String() string
- func (m *DeleteRequest) Validate() error
- func (m *DeleteRequest) ValidateAll() error
- type DeleteRequestMultiError
- type DeleteRequestValidationError
- func (e DeleteRequestValidationError) Cause() error
- func (e DeleteRequestValidationError) Error() string
- func (e DeleteRequestValidationError) ErrorName() string
- func (e DeleteRequestValidationError) Field() string
- func (e DeleteRequestValidationError) Key() bool
- func (e DeleteRequestValidationError) Reason() string
- type DeleteResponse
- func (*DeleteResponse) Descriptor() ([]byte, []int)deprecated
- func (*DeleteResponse) ProtoMessage()
- func (x *DeleteResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteResponse) Reset()
- func (x *DeleteResponse) String() string
- func (m *DeleteResponse) Validate() error
- func (m *DeleteResponse) ValidateAll() error
- type DeleteResponseMultiError
- type DeleteResponseValidationError
- func (e DeleteResponseValidationError) Cause() error
- func (e DeleteResponseValidationError) Error() string
- func (e DeleteResponseValidationError) ErrorName() string
- func (e DeleteResponseValidationError) Field() string
- func (e DeleteResponseValidationError) Key() bool
- func (e DeleteResponseValidationError) Reason() string
- type InfoRequest
- func (*InfoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *InfoRequest) GetId() int64
- func (*InfoRequest) ProtoMessage()
- func (x *InfoRequest) ProtoReflect() protoreflect.Message
- func (x *InfoRequest) Reset()
- func (x *InfoRequest) String() string
- func (m *InfoRequest) Validate() error
- func (m *InfoRequest) ValidateAll() error
- type InfoRequestMultiError
- type InfoRequestValidationError
- func (e InfoRequestValidationError) Cause() error
- func (e InfoRequestValidationError) Error() string
- func (e InfoRequestValidationError) ErrorName() string
- func (e InfoRequestValidationError) Field() string
- func (e InfoRequestValidationError) Key() bool
- func (e InfoRequestValidationError) Reason() string
- type InfoResponse
- func (*InfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *InfoResponse) GetInfo() *v1.User
- func (*InfoResponse) ProtoMessage()
- func (x *InfoResponse) ProtoReflect() protoreflect.Message
- func (x *InfoResponse) Reset()
- func (x *InfoResponse) String() string
- func (m *InfoResponse) Validate() error
- func (m *InfoResponse) ValidateAll() error
- type InfoResponseMultiError
- type InfoResponseValidationError
- func (e InfoResponseValidationError) Cause() error
- func (e InfoResponseValidationError) Error() string
- func (e InfoResponseValidationError) ErrorName() string
- func (e InfoResponseValidationError) Field() string
- func (e InfoResponseValidationError) Key() bool
- func (e InfoResponseValidationError) Reason() string
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRequest) GetEmail() string
- func (x *ListRequest) GetGender() v1.Gender
- func (x *ListRequest) GetLimit() int64
- func (x *ListRequest) GetNickname() string
- func (x *ListRequest) GetPage() int64
- func (x *ListRequest) GetPhone() string
- func (x *ListRequest) GetStatus() v1.Status
- func (x *ListRequest) GetUsername() string
- func (*ListRequest) ProtoMessage()
- func (x *ListRequest) ProtoReflect() protoreflect.Message
- func (x *ListRequest) Reset()
- func (x *ListRequest) String() string
- func (m *ListRequest) Validate() error
- func (m *ListRequest) ValidateAll() error
- type ListRequestMultiError
- type ListRequestValidationError
- func (e ListRequestValidationError) Cause() error
- func (e ListRequestValidationError) Error() string
- func (e ListRequestValidationError) ErrorName() string
- func (e ListRequestValidationError) Field() string
- func (e ListRequestValidationError) Key() bool
- func (e ListRequestValidationError) Reason() string
- type ListResponse
- func (*ListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListResponse) GetList() []*v1.User
- func (x *ListResponse) GetTotal() int64
- func (*ListResponse) ProtoMessage()
- func (x *ListResponse) ProtoReflect() protoreflect.Message
- func (x *ListResponse) Reset()
- func (x *ListResponse) String() string
- func (m *ListResponse) Validate() error
- func (m *ListResponse) ValidateAll() error
- type ListResponseMultiError
- type ListResponseValidationError
- func (e ListResponseValidationError) Cause() error
- func (e ListResponseValidationError) Error() string
- func (e ListResponseValidationError) ErrorName() string
- func (e ListResponseValidationError) Field() string
- func (e ListResponseValidationError) Key() bool
- func (e ListResponseValidationError) Reason() string
- type ServiceClient
- type ServiceServer
- type UnimplementedServiceServer
- func (UnimplementedServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (UnimplementedServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
- func (UnimplementedServiceServer) Info(context.Context, *InfoRequest) (*InfoResponse, error)
- func (UnimplementedServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (UnimplementedServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
- func (UnimplementedServiceServer) UpdateNickname(context.Context, *UpdateNicknameRequest) (*UpdateNicknameResponse, error)
- type UnsafeServiceServer
- type UpdateNicknameRequest
- func (*UpdateNicknameRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateNicknameRequest) GetId() int64
- func (x *UpdateNicknameRequest) GetNickname() string
- func (*UpdateNicknameRequest) ProtoMessage()
- func (x *UpdateNicknameRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateNicknameRequest) Reset()
- func (x *UpdateNicknameRequest) String() string
- func (m *UpdateNicknameRequest) Validate() error
- func (m *UpdateNicknameRequest) ValidateAll() error
- type UpdateNicknameRequestMultiError
- type UpdateNicknameRequestValidationError
- func (e UpdateNicknameRequestValidationError) Cause() error
- func (e UpdateNicknameRequestValidationError) Error() string
- func (e UpdateNicknameRequestValidationError) ErrorName() string
- func (e UpdateNicknameRequestValidationError) Field() string
- func (e UpdateNicknameRequestValidationError) Key() bool
- func (e UpdateNicknameRequestValidationError) Reason() string
- type UpdateNicknameResponse
- func (*UpdateNicknameResponse) Descriptor() ([]byte, []int)deprecated
- func (*UpdateNicknameResponse) ProtoMessage()
- func (x *UpdateNicknameResponse) ProtoReflect() protoreflect.Message
- func (x *UpdateNicknameResponse) Reset()
- func (x *UpdateNicknameResponse) String() string
- func (m *UpdateNicknameResponse) Validate() error
- func (m *UpdateNicknameResponse) ValidateAll() error
- type UpdateNicknameResponseMultiError
- type UpdateNicknameResponseValidationError
- func (e UpdateNicknameResponseValidationError) Cause() error
- func (e UpdateNicknameResponseValidationError) Error() string
- func (e UpdateNicknameResponseValidationError) ErrorName() string
- func (e UpdateNicknameResponseValidationError) Field() string
- func (e UpdateNicknameResponseValidationError) Key() bool
- func (e UpdateNicknameResponseValidationError) Reason() string
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetAvatar() string
- func (x *UpdateRequest) GetEmail() string
- func (x *UpdateRequest) GetGender() v1.Gender
- func (x *UpdateRequest) GetId() int64
- func (x *UpdateRequest) GetNickname() string
- func (x *UpdateRequest) GetPassword() string
- func (x *UpdateRequest) GetPhone() string
- func (x *UpdateRequest) GetStatus() v1.Status
- func (x *UpdateRequest) GetUsername() string
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- func (m *UpdateRequest) Validate() error
- func (m *UpdateRequest) ValidateAll() error
- type UpdateRequestMultiError
- type UpdateRequestValidationError
- func (e UpdateRequestValidationError) Cause() error
- func (e UpdateRequestValidationError) Error() string
- func (e UpdateRequestValidationError) ErrorName() string
- func (e UpdateRequestValidationError) Field() string
- func (e UpdateRequestValidationError) Key() bool
- func (e UpdateRequestValidationError) Reason() string
- type UpdateResponse
- func (*UpdateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateResponse) GetInfo() *v1.User
- func (*UpdateResponse) ProtoMessage()
- func (x *UpdateResponse) ProtoReflect() protoreflect.Message
- func (x *UpdateResponse) Reset()
- func (x *UpdateResponse) String() string
- func (m *UpdateResponse) Validate() error
- func (m *UpdateResponse) ValidateAll() error
- type UpdateResponseMultiError
- type UpdateResponseValidationError
- func (e UpdateResponseValidationError) Cause() error
- func (e UpdateResponseValidationError) Error() string
- func (e UpdateResponseValidationError) ErrorName() string
- func (e UpdateResponseValidationError) Field() string
- func (e UpdateResponseValidationError) Key() bool
- func (e UpdateResponseValidationError) Reason() string
Constants ¶
const ( Service_Create_FullMethodName = "/rpc.v1.Service/Create" Service_Update_FullMethodName = "/rpc.v1.Service/Update" Service_UpdateNickname_FullMethodName = "/rpc.v1.Service/UpdateNickname" Service_Delete_FullMethodName = "/rpc.v1.Service/Delete" Service_Info_FullMethodName = "/rpc.v1.Service/Info" Service_List_FullMethodName = "/rpc.v1.Service/List" )
Variables ¶
var File_rpc_v1_user_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "rpc.v1.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Service_Create_Handler, }, { MethodName: "Update", Handler: _Service_Update_Handler, }, { MethodName: "UpdateNickname", Handler: _Service_UpdateNickname_Handler, }, { MethodName: "Delete", Handler: _Service_Delete_Handler, }, { MethodName: "Info", Handler: _Service_Info_Handler, }, { MethodName: "List", Handler: _Service_List_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "rpc/v1/user.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type CreateRequest ¶
type CreateRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username" form:"username"` // 用户名 Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname" form:"nickname"` // 昵称 Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone" form:"phone"` // 手机号码 Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email" form:"email"` // 邮箱 Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password" form:"password"` // 密码 Gender v1.Gender `protobuf:"varint,6,opt,name=gender,proto3,enum=repo.v1.Gender" json:"gender" form:"gender" gorm:"default:0"` // 性别 Avatar string `protobuf:"bytes,7,opt,name=avatar,proto3" json:"avatar" form:"avatar" gorm:"type:char(60);default:''"` // 头像 Status v1.Status `protobuf:"varint,8,opt,name=status,proto3,enum=repo.v1.Status" json:"status" form:"status" gorm:"default:0"` // 状态 // contains filtered or unexported fields }
Service | 创建用户请求参数
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetAvatar ¶
func (x *CreateRequest) GetAvatar() string
func (*CreateRequest) GetEmail ¶
func (x *CreateRequest) GetEmail() string
func (*CreateRequest) GetGender ¶
func (x *CreateRequest) GetGender() v1.Gender
func (*CreateRequest) GetNickname ¶
func (x *CreateRequest) GetNickname() string
func (*CreateRequest) GetPassword ¶
func (x *CreateRequest) GetPassword() string
func (*CreateRequest) GetPhone ¶
func (x *CreateRequest) GetPhone() string
func (*CreateRequest) GetStatus ¶
func (x *CreateRequest) GetStatus() v1.Status
func (*CreateRequest) GetUsername ¶
func (x *CreateRequest) GetUsername() string
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
func (*CreateRequest) Validate ¶
func (m *CreateRequest) Validate() error
Validate checks the field values on CreateRequest 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 (*CreateRequest) ValidateAll ¶
func (m *CreateRequest) ValidateAll() error
ValidateAll checks the field values on CreateRequest 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 CreateRequestMultiError, or nil if none found.
type CreateRequestMultiError ¶
type CreateRequestMultiError []error
CreateRequestMultiError is an error wrapping multiple validation errors returned by CreateRequest.ValidateAll() if the designated constraints aren't met.
func (CreateRequestMultiError) AllErrors ¶
func (m CreateRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateRequestMultiError) Error ¶
func (m CreateRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateRequestValidationError ¶
type CreateRequestValidationError struct {
// contains filtered or unexported fields
}
CreateRequestValidationError is the validation error returned by CreateRequest.Validate if the designated constraints aren't met.
func (CreateRequestValidationError) Cause ¶
func (e CreateRequestValidationError) Cause() error
Cause function returns cause value.
func (CreateRequestValidationError) Error ¶
func (e CreateRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CreateRequestValidationError) ErrorName ¶
func (e CreateRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CreateRequestValidationError) Field ¶
func (e CreateRequestValidationError) Field() string
Field function returns field value.
func (CreateRequestValidationError) Key ¶
func (e CreateRequestValidationError) Key() bool
Key function returns key value.
func (CreateRequestValidationError) Reason ¶
func (e CreateRequestValidationError) Reason() string
Reason function returns reason value.
type CreateResponse ¶
type CreateResponse struct { Info *v1.User `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` // contains filtered or unexported fields }
Service | 创建用户返回数据
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetInfo ¶
func (x *CreateResponse) GetInfo() *v1.User
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
func (*CreateResponse) Validate ¶
func (m *CreateResponse) Validate() error
Validate checks the field values on CreateResponse 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 (*CreateResponse) ValidateAll ¶
func (m *CreateResponse) ValidateAll() error
ValidateAll checks the field values on CreateResponse 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 CreateResponseMultiError, or nil if none found.
type CreateResponseMultiError ¶
type CreateResponseMultiError []error
CreateResponseMultiError is an error wrapping multiple validation errors returned by CreateResponse.ValidateAll() if the designated constraints aren't met.
func (CreateResponseMultiError) AllErrors ¶
func (m CreateResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateResponseMultiError) Error ¶
func (m CreateResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateResponseValidationError ¶
type CreateResponseValidationError struct {
// contains filtered or unexported fields
}
CreateResponseValidationError is the validation error returned by CreateResponse.Validate if the designated constraints aren't met.
func (CreateResponseValidationError) Cause ¶
func (e CreateResponseValidationError) Cause() error
Cause function returns cause value.
func (CreateResponseValidationError) Error ¶
func (e CreateResponseValidationError) Error() string
Error satisfies the builtin error interface
func (CreateResponseValidationError) ErrorName ¶
func (e CreateResponseValidationError) ErrorName() string
ErrorName returns error name.
func (CreateResponseValidationError) Field ¶
func (e CreateResponseValidationError) Field() string
Field function returns field value.
func (CreateResponseValidationError) Key ¶
func (e CreateResponseValidationError) Key() bool
Key function returns key value.
func (CreateResponseValidationError) Reason ¶
func (e CreateResponseValidationError) Reason() string
Reason function returns reason value.
type DeleteRequest ¶
type DeleteRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
Service | 删除用户请求参数
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetId ¶
func (x *DeleteRequest) GetId() int64
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
func (*DeleteRequest) Validate ¶
func (m *DeleteRequest) Validate() error
Validate checks the field values on DeleteRequest 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 (*DeleteRequest) ValidateAll ¶
func (m *DeleteRequest) ValidateAll() error
ValidateAll checks the field values on DeleteRequest 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 DeleteRequestMultiError, or nil if none found.
type DeleteRequestMultiError ¶
type DeleteRequestMultiError []error
DeleteRequestMultiError is an error wrapping multiple validation errors returned by DeleteRequest.ValidateAll() if the designated constraints aren't met.
func (DeleteRequestMultiError) AllErrors ¶
func (m DeleteRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeleteRequestMultiError) Error ¶
func (m DeleteRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeleteRequestValidationError ¶
type DeleteRequestValidationError struct {
// contains filtered or unexported fields
}
DeleteRequestValidationError is the validation error returned by DeleteRequest.Validate if the designated constraints aren't met.
func (DeleteRequestValidationError) Cause ¶
func (e DeleteRequestValidationError) Cause() error
Cause function returns cause value.
func (DeleteRequestValidationError) Error ¶
func (e DeleteRequestValidationError) Error() string
Error satisfies the builtin error interface
func (DeleteRequestValidationError) ErrorName ¶
func (e DeleteRequestValidationError) ErrorName() string
ErrorName returns error name.
func (DeleteRequestValidationError) Field ¶
func (e DeleteRequestValidationError) Field() string
Field function returns field value.
func (DeleteRequestValidationError) Key ¶
func (e DeleteRequestValidationError) Key() bool
Key function returns key value.
func (DeleteRequestValidationError) Reason ¶
func (e DeleteRequestValidationError) Reason() string
Reason function returns reason value.
type DeleteResponse ¶
type DeleteResponse struct {
// contains filtered or unexported fields
}
Service | 删除用户返回数据
func (*DeleteResponse) Descriptor
deprecated
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) ProtoReflect ¶
func (x *DeleteResponse) ProtoReflect() protoreflect.Message
func (*DeleteResponse) Reset ¶
func (x *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (x *DeleteResponse) String() string
func (*DeleteResponse) Validate ¶
func (m *DeleteResponse) Validate() error
Validate checks the field values on DeleteResponse 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 (*DeleteResponse) ValidateAll ¶
func (m *DeleteResponse) ValidateAll() error
ValidateAll checks the field values on DeleteResponse 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 DeleteResponseMultiError, or nil if none found.
type DeleteResponseMultiError ¶
type DeleteResponseMultiError []error
DeleteResponseMultiError is an error wrapping multiple validation errors returned by DeleteResponse.ValidateAll() if the designated constraints aren't met.
func (DeleteResponseMultiError) AllErrors ¶
func (m DeleteResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeleteResponseMultiError) Error ¶
func (m DeleteResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeleteResponseValidationError ¶
type DeleteResponseValidationError struct {
// contains filtered or unexported fields
}
DeleteResponseValidationError is the validation error returned by DeleteResponse.Validate if the designated constraints aren't met.
func (DeleteResponseValidationError) Cause ¶
func (e DeleteResponseValidationError) Cause() error
Cause function returns cause value.
func (DeleteResponseValidationError) Error ¶
func (e DeleteResponseValidationError) Error() string
Error satisfies the builtin error interface
func (DeleteResponseValidationError) ErrorName ¶
func (e DeleteResponseValidationError) ErrorName() string
ErrorName returns error name.
func (DeleteResponseValidationError) Field ¶
func (e DeleteResponseValidationError) Field() string
Field function returns field value.
func (DeleteResponseValidationError) Key ¶
func (e DeleteResponseValidationError) Key() bool
Key function returns key value.
func (DeleteResponseValidationError) Reason ¶
func (e DeleteResponseValidationError) Reason() string
Reason function returns reason value.
type InfoRequest ¶
type InfoRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
Service | 用户详情请求参数
func (*InfoRequest) Descriptor
deprecated
func (*InfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead.
func (*InfoRequest) GetId ¶
func (x *InfoRequest) GetId() int64
func (*InfoRequest) ProtoMessage ¶
func (*InfoRequest) ProtoMessage()
func (*InfoRequest) ProtoReflect ¶
func (x *InfoRequest) ProtoReflect() protoreflect.Message
func (*InfoRequest) Reset ¶
func (x *InfoRequest) Reset()
func (*InfoRequest) String ¶
func (x *InfoRequest) String() string
func (*InfoRequest) Validate ¶
func (m *InfoRequest) Validate() error
Validate checks the field values on InfoRequest 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 (*InfoRequest) ValidateAll ¶
func (m *InfoRequest) ValidateAll() error
ValidateAll checks the field values on InfoRequest 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 InfoRequestMultiError, or nil if none found.
type InfoRequestMultiError ¶
type InfoRequestMultiError []error
InfoRequestMultiError is an error wrapping multiple validation errors returned by InfoRequest.ValidateAll() if the designated constraints aren't met.
func (InfoRequestMultiError) AllErrors ¶
func (m InfoRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (InfoRequestMultiError) Error ¶
func (m InfoRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type InfoRequestValidationError ¶
type InfoRequestValidationError struct {
// contains filtered or unexported fields
}
InfoRequestValidationError is the validation error returned by InfoRequest.Validate if the designated constraints aren't met.
func (InfoRequestValidationError) Cause ¶
func (e InfoRequestValidationError) Cause() error
Cause function returns cause value.
func (InfoRequestValidationError) Error ¶
func (e InfoRequestValidationError) Error() string
Error satisfies the builtin error interface
func (InfoRequestValidationError) ErrorName ¶
func (e InfoRequestValidationError) ErrorName() string
ErrorName returns error name.
func (InfoRequestValidationError) Field ¶
func (e InfoRequestValidationError) Field() string
Field function returns field value.
func (InfoRequestValidationError) Key ¶
func (e InfoRequestValidationError) Key() bool
Key function returns key value.
func (InfoRequestValidationError) Reason ¶
func (e InfoRequestValidationError) Reason() string
Reason function returns reason value.
type InfoResponse ¶
type InfoResponse struct { Info *v1.User `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` // contains filtered or unexported fields }
Service | 用户详情返回数据
func (*InfoResponse) Descriptor
deprecated
func (*InfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.
func (*InfoResponse) GetInfo ¶
func (x *InfoResponse) GetInfo() *v1.User
func (*InfoResponse) ProtoMessage ¶
func (*InfoResponse) ProtoMessage()
func (*InfoResponse) ProtoReflect ¶
func (x *InfoResponse) ProtoReflect() protoreflect.Message
func (*InfoResponse) Reset ¶
func (x *InfoResponse) Reset()
func (*InfoResponse) String ¶
func (x *InfoResponse) String() string
func (*InfoResponse) Validate ¶
func (m *InfoResponse) Validate() error
Validate checks the field values on InfoResponse 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 (*InfoResponse) ValidateAll ¶
func (m *InfoResponse) ValidateAll() error
ValidateAll checks the field values on InfoResponse 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 InfoResponseMultiError, or nil if none found.
type InfoResponseMultiError ¶
type InfoResponseMultiError []error
InfoResponseMultiError is an error wrapping multiple validation errors returned by InfoResponse.ValidateAll() if the designated constraints aren't met.
func (InfoResponseMultiError) AllErrors ¶
func (m InfoResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (InfoResponseMultiError) Error ¶
func (m InfoResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type InfoResponseValidationError ¶
type InfoResponseValidationError struct {
// contains filtered or unexported fields
}
InfoResponseValidationError is the validation error returned by InfoResponse.Validate if the designated constraints aren't met.
func (InfoResponseValidationError) Cause ¶
func (e InfoResponseValidationError) Cause() error
Cause function returns cause value.
func (InfoResponseValidationError) Error ¶
func (e InfoResponseValidationError) Error() string
Error satisfies the builtin error interface
func (InfoResponseValidationError) ErrorName ¶
func (e InfoResponseValidationError) ErrorName() string
ErrorName returns error name.
func (InfoResponseValidationError) Field ¶
func (e InfoResponseValidationError) Field() string
Field function returns field value.
func (InfoResponseValidationError) Key ¶
func (e InfoResponseValidationError) Key() bool
Key function returns key value.
func (InfoResponseValidationError) Reason ¶
func (e InfoResponseValidationError) Reason() string
Reason function returns reason value.
type ListRequest ¶
type ListRequest struct { Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` // page Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username" form:"username"` // 用户名 Nickname string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname" form:"nickname"` // 昵称 Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone" form:"phone"` // 手机号码 Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email" form:"email"` // 邮箱 Gender v1.Gender `protobuf:"varint,7,opt,name=gender,proto3,enum=repo.v1.Gender" json:"gender" form:"gender" gorm:"default:0"` // 性别 Status v1.Status `protobuf:"varint,8,opt,name=status,proto3,enum=repo.v1.Status" json:"status" form:"status" gorm:"default:0"` // 状态 // contains filtered or unexported fields }
Service | 用户列表请求参数
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetEmail ¶
func (x *ListRequest) GetEmail() string
func (*ListRequest) GetGender ¶
func (x *ListRequest) GetGender() v1.Gender
func (*ListRequest) GetLimit ¶
func (x *ListRequest) GetLimit() int64
func (*ListRequest) GetNickname ¶
func (x *ListRequest) GetNickname() string
func (*ListRequest) GetPage ¶
func (x *ListRequest) GetPage() int64
func (*ListRequest) GetPhone ¶
func (x *ListRequest) GetPhone() string
func (*ListRequest) GetStatus ¶
func (x *ListRequest) GetStatus() v1.Status
func (*ListRequest) GetUsername ¶
func (x *ListRequest) GetUsername() string
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
func (*ListRequest) Validate ¶
func (m *ListRequest) Validate() error
Validate checks the field values on ListRequest 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 (*ListRequest) ValidateAll ¶
func (m *ListRequest) ValidateAll() error
ValidateAll checks the field values on ListRequest 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 ListRequestMultiError, or nil if none found.
type ListRequestMultiError ¶
type ListRequestMultiError []error
ListRequestMultiError is an error wrapping multiple validation errors returned by ListRequest.ValidateAll() if the designated constraints aren't met.
func (ListRequestMultiError) AllErrors ¶
func (m ListRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListRequestMultiError) Error ¶
func (m ListRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListRequestValidationError ¶
type ListRequestValidationError struct {
// contains filtered or unexported fields
}
ListRequestValidationError is the validation error returned by ListRequest.Validate if the designated constraints aren't met.
func (ListRequestValidationError) Cause ¶
func (e ListRequestValidationError) Cause() error
Cause function returns cause value.
func (ListRequestValidationError) Error ¶
func (e ListRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListRequestValidationError) ErrorName ¶
func (e ListRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListRequestValidationError) Field ¶
func (e ListRequestValidationError) Field() string
Field function returns field value.
func (ListRequestValidationError) Key ¶
func (e ListRequestValidationError) Key() bool
Key function returns key value.
func (ListRequestValidationError) Reason ¶
func (e ListRequestValidationError) Reason() string
Reason function returns reason value.
type ListResponse ¶
type ListResponse struct { List []*v1.User `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total"` // contains filtered or unexported fields }
Service | 用户列表返回数据
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetList ¶
func (x *ListResponse) GetList() []*v1.User
func (*ListResponse) GetTotal ¶
func (x *ListResponse) GetTotal() int64
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
func (*ListResponse) Validate ¶
func (m *ListResponse) Validate() error
Validate checks the field values on ListResponse 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 (*ListResponse) ValidateAll ¶
func (m *ListResponse) ValidateAll() error
ValidateAll checks the field values on ListResponse 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 ListResponseMultiError, or nil if none found.
type ListResponseMultiError ¶
type ListResponseMultiError []error
ListResponseMultiError is an error wrapping multiple validation errors returned by ListResponse.ValidateAll() if the designated constraints aren't met.
func (ListResponseMultiError) AllErrors ¶
func (m ListResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListResponseMultiError) Error ¶
func (m ListResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListResponseValidationError ¶
type ListResponseValidationError struct {
// contains filtered or unexported fields
}
ListResponseValidationError is the validation error returned by ListResponse.Validate if the designated constraints aren't met.
func (ListResponseValidationError) Cause ¶
func (e ListResponseValidationError) Cause() error
Cause function returns cause value.
func (ListResponseValidationError) Error ¶
func (e ListResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ListResponseValidationError) ErrorName ¶
func (e ListResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ListResponseValidationError) Field ¶
func (e ListResponseValidationError) Field() string
Field function returns field value.
func (ListResponseValidationError) Key ¶
func (e ListResponseValidationError) Key() bool
Key function returns key value.
func (ListResponseValidationError) Reason ¶
func (e ListResponseValidationError) Reason() string
Reason function returns reason value.
type ServiceClient ¶
type ServiceClient interface { // 创建用户 Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) // 更新用户 Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) // 更新用户昵称 UpdateNickname(ctx context.Context, in *UpdateNicknameRequest, opts ...grpc.CallOption) (*UpdateNicknameResponse, error) // 删除用户 Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) // 用户详情 Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) // 用户列表 List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) }
ServiceClient is the client API for Service 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 NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { // 创建用户 Create(context.Context, *CreateRequest) (*CreateResponse, error) // 更新用户 Update(context.Context, *UpdateRequest) (*UpdateResponse, error) // 更新用户昵称 UpdateNickname(context.Context, *UpdateNicknameRequest) (*UpdateNicknameResponse, error) // 删除用户 Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) // 用户详情 Info(context.Context, *InfoRequest) (*InfoResponse, error) // 用户列表 List(context.Context, *ListRequest) (*ListResponse, error) }
ServiceServer is the server API for Service service. All implementations should embed UnimplementedServiceServer for forward compatibility
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedServiceServer) Create ¶
func (UnimplementedServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedServiceServer) Delete ¶
func (UnimplementedServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
func (UnimplementedServiceServer) Info ¶
func (UnimplementedServiceServer) Info(context.Context, *InfoRequest) (*InfoResponse, error)
func (UnimplementedServiceServer) List ¶
func (UnimplementedServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
func (UnimplementedServiceServer) Update ¶
func (UnimplementedServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
func (UnimplementedServiceServer) UpdateNickname ¶
func (UnimplementedServiceServer) UpdateNickname(context.Context, *UpdateNicknameRequest) (*UpdateNicknameResponse, error)
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.
type UpdateNicknameRequest ¶
type UpdateNicknameRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // id Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname" form:"nickname"` // 昵称 // contains filtered or unexported fields }
Service | 更新用户昵称请求参数
func (*UpdateNicknameRequest) Descriptor
deprecated
func (*UpdateNicknameRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateNicknameRequest.ProtoReflect.Descriptor instead.
func (*UpdateNicknameRequest) GetId ¶
func (x *UpdateNicknameRequest) GetId() int64
func (*UpdateNicknameRequest) GetNickname ¶
func (x *UpdateNicknameRequest) GetNickname() string
func (*UpdateNicknameRequest) ProtoMessage ¶
func (*UpdateNicknameRequest) ProtoMessage()
func (*UpdateNicknameRequest) ProtoReflect ¶
func (x *UpdateNicknameRequest) ProtoReflect() protoreflect.Message
func (*UpdateNicknameRequest) Reset ¶
func (x *UpdateNicknameRequest) Reset()
func (*UpdateNicknameRequest) String ¶
func (x *UpdateNicknameRequest) String() string
func (*UpdateNicknameRequest) Validate ¶
func (m *UpdateNicknameRequest) Validate() error
Validate checks the field values on UpdateNicknameRequest 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 (*UpdateNicknameRequest) ValidateAll ¶
func (m *UpdateNicknameRequest) ValidateAll() error
ValidateAll checks the field values on UpdateNicknameRequest 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 UpdateNicknameRequestMultiError, or nil if none found.
type UpdateNicknameRequestMultiError ¶
type UpdateNicknameRequestMultiError []error
UpdateNicknameRequestMultiError is an error wrapping multiple validation errors returned by UpdateNicknameRequest.ValidateAll() if the designated constraints aren't met.
func (UpdateNicknameRequestMultiError) AllErrors ¶
func (m UpdateNicknameRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateNicknameRequestMultiError) Error ¶
func (m UpdateNicknameRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateNicknameRequestValidationError ¶
type UpdateNicknameRequestValidationError struct {
// contains filtered or unexported fields
}
UpdateNicknameRequestValidationError is the validation error returned by UpdateNicknameRequest.Validate if the designated constraints aren't met.
func (UpdateNicknameRequestValidationError) Cause ¶
func (e UpdateNicknameRequestValidationError) Cause() error
Cause function returns cause value.
func (UpdateNicknameRequestValidationError) Error ¶
func (e UpdateNicknameRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateNicknameRequestValidationError) ErrorName ¶
func (e UpdateNicknameRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateNicknameRequestValidationError) Field ¶
func (e UpdateNicknameRequestValidationError) Field() string
Field function returns field value.
func (UpdateNicknameRequestValidationError) Key ¶
func (e UpdateNicknameRequestValidationError) Key() bool
Key function returns key value.
func (UpdateNicknameRequestValidationError) Reason ¶
func (e UpdateNicknameRequestValidationError) Reason() string
Reason function returns reason value.
type UpdateNicknameResponse ¶
type UpdateNicknameResponse struct {
// contains filtered or unexported fields
}
Service | 更新用户昵称返回数据
func (*UpdateNicknameResponse) Descriptor
deprecated
func (*UpdateNicknameResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateNicknameResponse.ProtoReflect.Descriptor instead.
func (*UpdateNicknameResponse) ProtoMessage ¶
func (*UpdateNicknameResponse) ProtoMessage()
func (*UpdateNicknameResponse) ProtoReflect ¶
func (x *UpdateNicknameResponse) ProtoReflect() protoreflect.Message
func (*UpdateNicknameResponse) Reset ¶
func (x *UpdateNicknameResponse) Reset()
func (*UpdateNicknameResponse) String ¶
func (x *UpdateNicknameResponse) String() string
func (*UpdateNicknameResponse) Validate ¶
func (m *UpdateNicknameResponse) Validate() error
Validate checks the field values on UpdateNicknameResponse 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 (*UpdateNicknameResponse) ValidateAll ¶
func (m *UpdateNicknameResponse) ValidateAll() error
ValidateAll checks the field values on UpdateNicknameResponse 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 UpdateNicknameResponseMultiError, or nil if none found.
type UpdateNicknameResponseMultiError ¶
type UpdateNicknameResponseMultiError []error
UpdateNicknameResponseMultiError is an error wrapping multiple validation errors returned by UpdateNicknameResponse.ValidateAll() if the designated constraints aren't met.
func (UpdateNicknameResponseMultiError) AllErrors ¶
func (m UpdateNicknameResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateNicknameResponseMultiError) Error ¶
func (m UpdateNicknameResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateNicknameResponseValidationError ¶
type UpdateNicknameResponseValidationError struct {
// contains filtered or unexported fields
}
UpdateNicknameResponseValidationError is the validation error returned by UpdateNicknameResponse.Validate if the designated constraints aren't met.
func (UpdateNicknameResponseValidationError) Cause ¶
func (e UpdateNicknameResponseValidationError) Cause() error
Cause function returns cause value.
func (UpdateNicknameResponseValidationError) Error ¶
func (e UpdateNicknameResponseValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateNicknameResponseValidationError) ErrorName ¶
func (e UpdateNicknameResponseValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateNicknameResponseValidationError) Field ¶
func (e UpdateNicknameResponseValidationError) Field() string
Field function returns field value.
func (UpdateNicknameResponseValidationError) Key ¶
func (e UpdateNicknameResponseValidationError) Key() bool
Key function returns key value.
func (UpdateNicknameResponseValidationError) Reason ¶
func (e UpdateNicknameResponseValidationError) Reason() string
Reason function returns reason value.
type UpdateRequest ¶
type UpdateRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // id Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username" form:"username"` // 用户名 Nickname string `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname" form:"nickname"` // 昵称 Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone" form:"phone"` // 手机号码 Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email" form:"email"` // 邮箱 Password string `protobuf:"bytes,6,opt,name=password,proto3" json:"password" form:"password"` // 密码 Gender v1.Gender `protobuf:"varint,7,opt,name=gender,proto3,enum=repo.v1.Gender" json:"gender" form:"gender" gorm:"default:0"` // 性别 Avatar string `protobuf:"bytes,8,opt,name=avatar,proto3" json:"avatar" form:"avatar" gorm:"type:char(60);default:''"` // 头像 Status v1.Status `protobuf:"varint,9,opt,name=status,proto3,enum=repo.v1.Status" json:"status" form:"status" gorm:"default:0"` // 状态 // contains filtered or unexported fields }
Service | 更新用户请求参数
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetAvatar ¶
func (x *UpdateRequest) GetAvatar() string
func (*UpdateRequest) GetEmail ¶
func (x *UpdateRequest) GetEmail() string
func (*UpdateRequest) GetGender ¶
func (x *UpdateRequest) GetGender() v1.Gender
func (*UpdateRequest) GetId ¶
func (x *UpdateRequest) GetId() int64
func (*UpdateRequest) GetNickname ¶
func (x *UpdateRequest) GetNickname() string
func (*UpdateRequest) GetPassword ¶
func (x *UpdateRequest) GetPassword() string
func (*UpdateRequest) GetPhone ¶
func (x *UpdateRequest) GetPhone() string
func (*UpdateRequest) GetStatus ¶
func (x *UpdateRequest) GetStatus() v1.Status
func (*UpdateRequest) GetUsername ¶
func (x *UpdateRequest) GetUsername() string
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (x *UpdateRequest) String() string
func (*UpdateRequest) Validate ¶
func (m *UpdateRequest) Validate() error
Validate checks the field values on UpdateRequest 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 (*UpdateRequest) ValidateAll ¶
func (m *UpdateRequest) ValidateAll() error
ValidateAll checks the field values on UpdateRequest 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 UpdateRequestMultiError, or nil if none found.
type UpdateRequestMultiError ¶
type UpdateRequestMultiError []error
UpdateRequestMultiError is an error wrapping multiple validation errors returned by UpdateRequest.ValidateAll() if the designated constraints aren't met.
func (UpdateRequestMultiError) AllErrors ¶
func (m UpdateRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateRequestMultiError) Error ¶
func (m UpdateRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateRequestValidationError ¶
type UpdateRequestValidationError struct {
// contains filtered or unexported fields
}
UpdateRequestValidationError is the validation error returned by UpdateRequest.Validate if the designated constraints aren't met.
func (UpdateRequestValidationError) Cause ¶
func (e UpdateRequestValidationError) Cause() error
Cause function returns cause value.
func (UpdateRequestValidationError) Error ¶
func (e UpdateRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateRequestValidationError) ErrorName ¶
func (e UpdateRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateRequestValidationError) Field ¶
func (e UpdateRequestValidationError) Field() string
Field function returns field value.
func (UpdateRequestValidationError) Key ¶
func (e UpdateRequestValidationError) Key() bool
Key function returns key value.
func (UpdateRequestValidationError) Reason ¶
func (e UpdateRequestValidationError) Reason() string
Reason function returns reason value.
type UpdateResponse ¶
type UpdateResponse struct { Info *v1.User `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` // contains filtered or unexported fields }
Service | 更新用户返回数据
func (*UpdateResponse) Descriptor
deprecated
func (*UpdateResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.
func (*UpdateResponse) GetInfo ¶
func (x *UpdateResponse) GetInfo() *v1.User
func (*UpdateResponse) ProtoMessage ¶
func (*UpdateResponse) ProtoMessage()
func (*UpdateResponse) ProtoReflect ¶
func (x *UpdateResponse) ProtoReflect() protoreflect.Message
func (*UpdateResponse) Reset ¶
func (x *UpdateResponse) Reset()
func (*UpdateResponse) String ¶
func (x *UpdateResponse) String() string
func (*UpdateResponse) Validate ¶
func (m *UpdateResponse) Validate() error
Validate checks the field values on UpdateResponse 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 (*UpdateResponse) ValidateAll ¶
func (m *UpdateResponse) ValidateAll() error
ValidateAll checks the field values on UpdateResponse 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 UpdateResponseMultiError, or nil if none found.
type UpdateResponseMultiError ¶
type UpdateResponseMultiError []error
UpdateResponseMultiError is an error wrapping multiple validation errors returned by UpdateResponse.ValidateAll() if the designated constraints aren't met.
func (UpdateResponseMultiError) AllErrors ¶
func (m UpdateResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateResponseMultiError) Error ¶
func (m UpdateResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateResponseValidationError ¶
type UpdateResponseValidationError struct {
// contains filtered or unexported fields
}
UpdateResponseValidationError is the validation error returned by UpdateResponse.Validate if the designated constraints aren't met.
func (UpdateResponseValidationError) Cause ¶
func (e UpdateResponseValidationError) Cause() error
Cause function returns cause value.
func (UpdateResponseValidationError) Error ¶
func (e UpdateResponseValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateResponseValidationError) ErrorName ¶
func (e UpdateResponseValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateResponseValidationError) Field ¶
func (e UpdateResponseValidationError) Field() string
Field function returns field value.
func (UpdateResponseValidationError) Key ¶
func (e UpdateResponseValidationError) Key() bool
Key function returns key value.
func (UpdateResponseValidationError) Reason ¶
func (e UpdateResponseValidationError) Reason() string
Reason function returns reason value.