Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetInfo() *User
- 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() *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 Gender
- type ID
- type IDMultiError
- type IDNickname
- func (*IDNickname) Descriptor() ([]byte, []int)deprecated
- func (x *IDNickname) GetId() int64
- func (x *IDNickname) GetNickname() string
- func (*IDNickname) ProtoMessage()
- func (x *IDNickname) ProtoReflect() protoreflect.Message
- func (x *IDNickname) Reset()
- func (x *IDNickname) String() string
- func (m *IDNickname) Validate() error
- func (m *IDNickname) ValidateAll() error
- type IDNicknameMultiError
- type IDNicknameValidationError
- type IDValidationError
- type ServiceClient
- type ServiceServer
- type Status
- type UnimplementedServiceServer
- type UnsafeServiceServer
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetInfo() *User
- 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() *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
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAvatar() string
- func (x *User) GetCreatedAt() int64
- func (x *User) GetEmail() string
- func (x *User) GetGender() Gender
- func (x *User) GetId() int64
- func (x *User) GetNickname() string
- func (x *User) GetPassword() string
- func (x *User) GetPhone() string
- func (x *User) GetSalt() string
- func (x *User) GetStatus() Status
- func (x *User) GetUpdatedAt() int64
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- func (m *User) Validate() error
- func (m *User) ValidateAll() error
- type UserList
- func (*UserList) Descriptor() ([]byte, []int)deprecated
- func (x *UserList) GetList() []*User
- func (x *UserList) GetTotal() int64
- func (*UserList) ProtoMessage()
- func (x *UserList) ProtoReflect() protoreflect.Message
- func (x *UserList) Reset()
- func (x *UserList) String() string
- func (m *UserList) Validate() error
- func (m *UserList) ValidateAll() error
- type UserListMultiError
- type UserListValidationError
- type UserMultiError
- type UserValidationError
Constants ¶
const ( Service_Create_FullMethodName = "/repo.v1.Service/Create" Service_Update_FullMethodName = "/repo.v1.Service/Update" )
Variables ¶
var ( Gender_name = map[int32]string{ 0: "GENDER_UNSPECIFIED", 1: "GENDER_WOMAN", 2: "GENDER_MAN", 3: "GENDER_SECRET", } Gender_value = map[string]int32{ "GENDER_UNSPECIFIED": 0, "GENDER_WOMAN": 1, "GENDER_MAN": 2, "GENDER_SECRET": 3, } )
Enum value maps for Gender.
var ( Status_name = map[int32]string{ 0: "STATUS_UNSPECIFIED", 1: "STATUS_NORMAL", 2: "STATUS_LOCKED", -1: "STATUS_DELETE", } Status_value = map[string]int32{ "STATUS_UNSPECIFIED": 0, "STATUS_NORMAL": 1, "STATUS_LOCKED": 2, "STATUS_DELETE": -1, } )
Enum value maps for Status.
var File_repo_v1_user_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "repo.v1.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Service_Create_Handler, }, { MethodName: "Update", Handler: _Service_Update_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "repo/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 { Info *User `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetInfo ¶
func (x *CreateRequest) GetInfo() *User
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 *User `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` // contains filtered or unexported fields }
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetInfo ¶
func (x *CreateResponse) GetInfo() *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 Gender ¶
type Gender int32
func (Gender) Descriptor ¶
func (Gender) Descriptor() protoreflect.EnumDescriptor
func (Gender) EnumDescriptor
deprecated
func (Gender) Number ¶
func (x Gender) Number() protoreflect.EnumNumber
func (Gender) Type ¶
func (Gender) Type() protoreflect.EnumType
type ID ¶
type ID struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // id // contains filtered or unexported fields }
ID
func (*ID) Descriptor
deprecated
func (*ID) ProtoMessage ¶
func (*ID) ProtoMessage()
func (*ID) ProtoReflect ¶
func (x *ID) ProtoReflect() protoreflect.Message
func (*ID) Validate ¶
Validate checks the field values on ID 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 (*ID) ValidateAll ¶
ValidateAll checks the field values on ID 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 IDMultiError, or nil if none found.
type IDMultiError ¶
type IDMultiError []error
IDMultiError is an error wrapping multiple validation errors returned by ID.ValidateAll() if the designated constraints aren't met.
func (IDMultiError) AllErrors ¶
func (m IDMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (IDMultiError) Error ¶
func (m IDMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type IDNickname ¶
type IDNickname 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,omitempty"` // 昵称 // contains filtered or unexported fields }
IDNickname
func (*IDNickname) Descriptor
deprecated
func (*IDNickname) Descriptor() ([]byte, []int)
Deprecated: Use IDNickname.ProtoReflect.Descriptor instead.
func (*IDNickname) GetId ¶
func (x *IDNickname) GetId() int64
func (*IDNickname) GetNickname ¶
func (x *IDNickname) GetNickname() string
func (*IDNickname) ProtoMessage ¶
func (*IDNickname) ProtoMessage()
func (*IDNickname) ProtoReflect ¶
func (x *IDNickname) ProtoReflect() protoreflect.Message
func (*IDNickname) Reset ¶
func (x *IDNickname) Reset()
func (*IDNickname) String ¶
func (x *IDNickname) String() string
func (*IDNickname) Validate ¶
func (m *IDNickname) Validate() error
Validate checks the field values on IDNickname 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 (*IDNickname) ValidateAll ¶
func (m *IDNickname) ValidateAll() error
ValidateAll checks the field values on IDNickname 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 IDNicknameMultiError, or nil if none found.
type IDNicknameMultiError ¶
type IDNicknameMultiError []error
IDNicknameMultiError is an error wrapping multiple validation errors returned by IDNickname.ValidateAll() if the designated constraints aren't met.
func (IDNicknameMultiError) AllErrors ¶
func (m IDNicknameMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (IDNicknameMultiError) Error ¶
func (m IDNicknameMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type IDNicknameValidationError ¶
type IDNicknameValidationError struct {
// contains filtered or unexported fields
}
IDNicknameValidationError is the validation error returned by IDNickname.Validate if the designated constraints aren't met.
func (IDNicknameValidationError) Cause ¶
func (e IDNicknameValidationError) Cause() error
Cause function returns cause value.
func (IDNicknameValidationError) Error ¶
func (e IDNicknameValidationError) Error() string
Error satisfies the builtin error interface
func (IDNicknameValidationError) ErrorName ¶
func (e IDNicknameValidationError) ErrorName() string
ErrorName returns error name.
func (IDNicknameValidationError) Field ¶
func (e IDNicknameValidationError) Field() string
Field function returns field value.
func (IDNicknameValidationError) Key ¶
func (e IDNicknameValidationError) Key() bool
Key function returns key value.
func (IDNicknameValidationError) Reason ¶
func (e IDNicknameValidationError) Reason() string
Reason function returns reason value.
type IDValidationError ¶
type IDValidationError struct {
// contains filtered or unexported fields
}
IDValidationError is the validation error returned by ID.Validate if the designated constraints aren't met.
func (IDValidationError) Cause ¶
func (e IDValidationError) Cause() error
Cause function returns cause value.
func (IDValidationError) Error ¶
func (e IDValidationError) Error() string
Error satisfies the builtin error interface
func (IDValidationError) ErrorName ¶
func (e IDValidationError) ErrorName() string
ErrorName returns error name.
func (IDValidationError) Field ¶
func (e IDValidationError) Field() string
Field function returns field value.
func (IDValidationError) Key ¶
func (e IDValidationError) Key() bool
Key function returns key value.
func (IDValidationError) Reason ¶
func (e IDValidationError) 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) }
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) }
ServiceServer is the server API for Service service. All implementations should embed UnimplementedServiceServer for forward compatibility
type Status ¶
type Status int32
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
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) Update ¶
func (UnimplementedServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, 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 UpdateRequest ¶
type UpdateRequest struct { Info *User `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` // contains filtered or unexported fields }
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetInfo ¶
func (x *UpdateRequest) GetInfo() *User
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 *User `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` // contains filtered or unexported fields }
func (*UpdateResponse) Descriptor
deprecated
func (*UpdateResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.
func (*UpdateResponse) GetInfo ¶
func (x *UpdateResponse) GetInfo() *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.
type User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username" gorm:"type:char(60);default:''"` // 用户名 Nickname string `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname" gorm:"type:char(60);default:''"` // 昵称 Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone" gorm:"type:char(60);default:''"` // 手机号码 Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email" gorm:"type:char(60);default:''"` // 邮箱 Gender Gender `protobuf:"varint,6,opt,name=gender,proto3,enum=repo.v1.Gender" json:"gender" gorm:"default:0"` // 性别 Password string `protobuf:"bytes,7,opt,name=password,proto3" json:"password" gorm:"type:text"` // 密码 Avatar string `protobuf:"bytes,8,opt,name=avatar,proto3" json:"avatar" gorm:"type:char(60);default:''"` // 头像 Salt string `protobuf:"bytes,9,opt,name=salt,proto3" json:"salt" gorm:"type:char(60);default:''"` // salt Status Status `protobuf:"varint,10,opt,name=status,proto3,enum=repo.v1.Status" json:"status" gorm:"default:0"` // 状态 CreatedAt int64 `protobuf:"varint,11,opt,name=created_at,json=createdAt,proto3" json:"created_at" gorm:"default:0"` // 注册时间 UpdatedAt int64 `protobuf:"varint,12,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at" gorm:"default:0"` // 更新时间 // contains filtered or unexported fields }
User 信息
func (*User) Descriptor
deprecated
func (*User) GetCreatedAt ¶
func (*User) GetNickname ¶
func (*User) GetPassword ¶
func (*User) GetUpdatedAt ¶
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
func (*User) Validate ¶
Validate checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*User) ValidateAll ¶
ValidateAll checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserMultiError, or nil if none found.
type UserList ¶
type UserList struct { List []*User `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` // 列表 Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // 总数 // contains filtered or unexported fields }
UserList
func (*UserList) Descriptor
deprecated
func (*UserList) ProtoMessage ¶
func (*UserList) ProtoMessage()
func (*UserList) ProtoReflect ¶
func (x *UserList) ProtoReflect() protoreflect.Message
func (*UserList) Validate ¶
Validate checks the field values on UserList 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 (*UserList) ValidateAll ¶
ValidateAll checks the field values on UserList 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 UserListMultiError, or nil if none found.
type UserListMultiError ¶
type UserListMultiError []error
UserListMultiError is an error wrapping multiple validation errors returned by UserList.ValidateAll() if the designated constraints aren't met.
func (UserListMultiError) AllErrors ¶
func (m UserListMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserListMultiError) Error ¶
func (m UserListMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserListValidationError ¶
type UserListValidationError struct {
// contains filtered or unexported fields
}
UserListValidationError is the validation error returned by UserList.Validate if the designated constraints aren't met.
func (UserListValidationError) Cause ¶
func (e UserListValidationError) Cause() error
Cause function returns cause value.
func (UserListValidationError) Error ¶
func (e UserListValidationError) Error() string
Error satisfies the builtin error interface
func (UserListValidationError) ErrorName ¶
func (e UserListValidationError) ErrorName() string
ErrorName returns error name.
func (UserListValidationError) Field ¶
func (e UserListValidationError) Field() string
Field function returns field value.
func (UserListValidationError) Key ¶
func (e UserListValidationError) Key() bool
Key function returns key value.
func (UserListValidationError) Reason ¶
func (e UserListValidationError) Reason() string
Reason function returns reason value.
type UserMultiError ¶
type UserMultiError []error
UserMultiError is an error wrapping multiple validation errors returned by User.ValidateAll() if the designated constraints aren't met.
func (UserMultiError) AllErrors ¶
func (m UserMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserMultiError) Error ¶
func (m UserMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserValidationError ¶
type UserValidationError struct {
// contains filtered or unexported fields
}
UserValidationError is the validation error returned by User.Validate if the designated constraints aren't met.
func (UserValidationError) Cause ¶
func (e UserValidationError) Cause() error
Cause function returns cause value.
func (UserValidationError) Error ¶
func (e UserValidationError) Error() string
Error satisfies the builtin error interface
func (UserValidationError) ErrorName ¶
func (e UserValidationError) ErrorName() string
ErrorName returns error name.
func (UserValidationError) Field ¶
func (e UserValidationError) Field() string
Field function returns field value.
func (UserValidationError) Key ¶
func (e UserValidationError) Key() bool
Key function returns key value.
func (UserValidationError) Reason ¶
func (e UserValidationError) Reason() string
Reason function returns reason value.