v1

package
v0.0.0-...-b2a1d49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Service_Create_FullMethodName = "/repo.v1.Service/Create"
	Service_Update_FullMethodName = "/repo.v1.Service/Update"
)

Variables

View Source
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.

View Source
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.

View Source
var File_repo_v1_user_proto protoreflect.FileDescriptor
View Source
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

Cause function returns cause value.

func (CreateRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateRequestValidationError) ErrorName

func (e CreateRequestValidationError) ErrorName() string

ErrorName returns error name.

func (CreateRequestValidationError) Field

Field function returns field value.

func (CreateRequestValidationError) Key

Key function returns key value.

func (CreateRequestValidationError) Reason

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

Cause function returns cause value.

func (CreateResponseValidationError) Error

Error satisfies the builtin error interface

func (CreateResponseValidationError) ErrorName

func (e CreateResponseValidationError) ErrorName() string

ErrorName returns error name.

func (CreateResponseValidationError) Field

Field function returns field value.

func (CreateResponseValidationError) Key

Key function returns key value.

func (CreateResponseValidationError) Reason

Reason function returns reason value.

type Gender

type Gender int32
const (
	Gender_GENDER_UNSPECIFIED Gender = 0
	Gender_GENDER_WOMAN       Gender = 1 // 女性
	Gender_GENDER_MAN         Gender = 2 // 男性
	Gender_GENDER_SECRET      Gender = 3 // 保密
)

func (Gender) Descriptor

func (Gender) Descriptor() protoreflect.EnumDescriptor

func (Gender) Enum

func (x Gender) Enum() *Gender

func (Gender) EnumDescriptor deprecated

func (Gender) EnumDescriptor() ([]byte, []int)

Deprecated: Use Gender.Descriptor instead.

func (Gender) Number

func (x Gender) Number() protoreflect.EnumNumber

func (Gender) String

func (x Gender) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use ID.ProtoReflect.Descriptor instead.

func (*ID) GetId

func (x *ID) GetId() int64

func (*ID) ProtoMessage

func (*ID) ProtoMessage()

func (*ID) ProtoReflect

func (x *ID) ProtoReflect() protoreflect.Message

func (*ID) Reset

func (x *ID) Reset()

func (*ID) String

func (x *ID) String() string

func (*ID) Validate

func (m *ID) Validate() error

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

func (m *ID) ValidateAll() error

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

Error satisfies the builtin error interface

func (IDNicknameValidationError) ErrorName

func (e IDNicknameValidationError) ErrorName() string

ErrorName returns error name.

func (IDNicknameValidationError) Field

Field function returns field value.

func (IDNicknameValidationError) Key

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
const (
	Status_STATUS_UNSPECIFIED Status = 0
	Status_STATUS_NORMAL      Status = 1  // 正常
	Status_STATUS_LOCKED      Status = 2  // 锁定
	Status_STATUS_DELETE      Status = -1 // 删除
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

func (Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

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) Update

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

Cause function returns cause value.

func (UpdateRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateRequestValidationError) ErrorName

func (e UpdateRequestValidationError) ErrorName() string

ErrorName returns error name.

func (UpdateRequestValidationError) Field

Field function returns field value.

func (UpdateRequestValidationError) Key

Key function returns key value.

func (UpdateRequestValidationError) Reason

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

Cause function returns cause value.

func (UpdateResponseValidationError) Error

Error satisfies the builtin error interface

func (UpdateResponseValidationError) ErrorName

func (e UpdateResponseValidationError) ErrorName() string

ErrorName returns error name.

func (UpdateResponseValidationError) Field

Field function returns field value.

func (UpdateResponseValidationError) Key

Key function returns key value.

func (UpdateResponseValidationError) Reason

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) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAvatar

func (x *User) GetAvatar() string

func (*User) GetCreatedAt

func (x *User) GetCreatedAt() int64

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetGender

func (x *User) GetGender() Gender

func (*User) GetId

func (x *User) GetId() int64

func (*User) GetNickname

func (x *User) GetNickname() string

func (*User) GetPassword

func (x *User) GetPassword() string

func (*User) GetPhone

func (x *User) GetPhone() string

func (*User) GetSalt

func (x *User) GetSalt() string

func (*User) GetStatus

func (x *User) GetStatus() Status

func (*User) GetUpdatedAt

func (x *User) GetUpdatedAt() int64

func (*User) GetUsername

func (x *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

func (*User) Validate

func (m *User) Validate() error

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

func (m *User) ValidateAll() error

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) Descriptor() ([]byte, []int)

Deprecated: Use UserList.ProtoReflect.Descriptor instead.

func (*UserList) GetList

func (x *UserList) GetList() []*User

func (*UserList) GetTotal

func (x *UserList) GetTotal() int64

func (*UserList) ProtoMessage

func (*UserList) ProtoMessage()

func (*UserList) ProtoReflect

func (x *UserList) ProtoReflect() protoreflect.Message

func (*UserList) Reset

func (x *UserList) Reset()

func (*UserList) String

func (x *UserList) String() string

func (*UserList) Validate

func (m *UserList) Validate() error

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

func (m *UserList) ValidateAll() error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL