Documentation ¶
Index ¶
- Variables
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetEmails() []string
- func (x *User) GetFirstName() string
- func (x *User) GetLastName() string
- func (x *User) GetName() string
- func (x *User) GetUserId() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- func (m *User) Validate() error
- func (m *User) ValidateAll() error
- type UserMultiError
- type UserValidationError
Constants ¶
This section is empty.
Variables ¶
var File_prodvana_users_users_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // user info, all optional Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` FirstName string `protobuf:"bytes,3,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,4,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` Emails []string `protobuf:"bytes,5,rep,name=emails,proto3" json:"emails,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetFirstName ¶
func (*User) GetLastName ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
func (*User) Validate ¶
Validate checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*User) ValidateAll ¶
ValidateAll checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserMultiError, or nil if none found.
type UserMultiError ¶
type UserMultiError []error
UserMultiError is an error wrapping multiple validation errors returned by User.ValidateAll() if the designated constraints aren't met.
func (UserMultiError) AllErrors ¶
func (m UserMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserMultiError) Error ¶
func (m UserMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserValidationError ¶
type UserValidationError struct {
// contains filtered or unexported fields
}
UserValidationError is the validation error returned by User.Validate if the designated constraints aren't met.
func (UserValidationError) Cause ¶
func (e UserValidationError) Cause() error
Cause function returns cause value.
func (UserValidationError) Error ¶
func (e UserValidationError) Error() string
Error satisfies the builtin error interface
func (UserValidationError) ErrorName ¶
func (e UserValidationError) ErrorName() string
ErrorName returns error name.
func (UserValidationError) Field ¶
func (e UserValidationError) Field() string
Field function returns field value.
func (UserValidationError) Key ¶
func (e UserValidationError) Key() bool
Key function returns key value.
func (UserValidationError) Reason ¶
func (e UserValidationError) Reason() string
Reason function returns reason value.