v1

package
v0.0.0-...-4da945e Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UserServiceErrorReason_name = map[int32]string{
		0: "UNKNOWN_ERROR",
		1: "LOGIN_FAILED",
		2: "REGISTER_FAILED",
	}
	UserServiceErrorReason_value = map[string]int32{
		"UNKNOWN_ERROR":   0,
		"LOGIN_FAILED":    1,
		"REGISTER_FAILED": 2,
	}
)

Enum value maps for UserServiceErrorReason.

View Source
var File_v1_user_error_proto protoreflect.FileDescriptor
View Source
var File_v1_user_proto protoreflect.FileDescriptor
View Source
var User_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.service.v1.User",
	HandlerType: (*UserServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateUser",
			Handler:    _User_CreateUser_Handler,
		},
		{
			MethodName: "Save",
			Handler:    _User_Save_Handler,
		},
		{
			MethodName: "GetUser",
			Handler:    _User_GetUser_Handler,
		},
		{
			MethodName: "GetUserByUsername",
			Handler:    _User_GetUserByUsername_Handler,
		},
		{
			MethodName: "ListUser",
			Handler:    _User_ListUser_Handler,
		},
		{
			MethodName: "VerifyPassword",
			Handler:    _User_VerifyPassword_Handler,
		},
		{
			MethodName: "ChangeActive",
			Handler:    _User_ChangeActive_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "v1/user.proto",
}

User_ServiceDesc is the grpc.ServiceDesc for User service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func ErrorLoginFailed

func ErrorLoginFailed(format string, args ...interface{}) *errors.Error

func ErrorRegisterFailed

func ErrorRegisterFailed(format string, args ...interface{}) *errors.Error

func ErrorUnknownError

func ErrorUnknownError(format string, args ...interface{}) *errors.Error

func IsLoginFailed

func IsLoginFailed(err error) bool

func IsRegisterFailed

func IsRegisterFailed(err error) bool

func IsUnknownError

func IsUnknownError(err error) bool

func RegisterUserServer

func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)

Types

type ChangeActiveReply

type ChangeActiveReply struct {
	Ok bool  `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*ChangeActiveReply) Descriptor deprecated

func (*ChangeActiveReply) Descriptor() ([]byte, []int)

Deprecated: Use ChangeActiveReply.ProtoReflect.Descriptor instead.

func (*ChangeActiveReply) GetId

func (x *ChangeActiveReply) GetId() int64

func (*ChangeActiveReply) GetOk

func (x *ChangeActiveReply) GetOk() bool

func (*ChangeActiveReply) ProtoMessage

func (*ChangeActiveReply) ProtoMessage()

func (*ChangeActiveReply) ProtoReflect

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

func (*ChangeActiveReply) Reset

func (x *ChangeActiveReply) Reset()

func (*ChangeActiveReply) String

func (x *ChangeActiveReply) String() string

type ChangeActiveReq

type ChangeActiveReq struct {
	Id       int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	IsActive bool  `protobuf:"varint,2,opt,name=isActive,proto3" json:"isActive,omitempty"`
	// contains filtered or unexported fields
}

func (*ChangeActiveReq) Descriptor deprecated

func (*ChangeActiveReq) Descriptor() ([]byte, []int)

Deprecated: Use ChangeActiveReq.ProtoReflect.Descriptor instead.

func (*ChangeActiveReq) GetId

func (x *ChangeActiveReq) GetId() int64

func (*ChangeActiveReq) GetIsActive

func (x *ChangeActiveReq) GetIsActive() bool

func (*ChangeActiveReq) ProtoMessage

func (*ChangeActiveReq) ProtoMessage()

func (*ChangeActiveReq) ProtoReflect

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

func (*ChangeActiveReq) Reset

func (x *ChangeActiveReq) Reset()

func (*ChangeActiveReq) String

func (x *ChangeActiveReq) String() string

type CreateUserReply

type CreateUserReply struct {
	Id       int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserReply) Descriptor deprecated

func (*CreateUserReply) Descriptor() ([]byte, []int)

Deprecated: Use CreateUserReply.ProtoReflect.Descriptor instead.

func (*CreateUserReply) GetId

func (x *CreateUserReply) GetId() int64

func (*CreateUserReply) GetUsername

func (x *CreateUserReply) GetUsername() string

func (*CreateUserReply) ProtoMessage

func (*CreateUserReply) ProtoMessage()

func (*CreateUserReply) ProtoReflect

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

func (*CreateUserReply) Reset

func (x *CreateUserReply) Reset()

func (*CreateUserReply) String

func (x *CreateUserReply) String() string

func (*CreateUserReply) Validate

func (m *CreateUserReply) Validate() error

Validate checks the field values on CreateUserReply 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 (*CreateUserReply) ValidateAll

func (m *CreateUserReply) ValidateAll() error

ValidateAll checks the field values on CreateUserReply 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 CreateUserReplyMultiError, or nil if none found.

type CreateUserReplyMultiError

type CreateUserReplyMultiError []error

CreateUserReplyMultiError is an error wrapping multiple validation errors returned by CreateUserReply.ValidateAll() if the designated constraints aren't met.

func (CreateUserReplyMultiError) AllErrors

func (m CreateUserReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateUserReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type CreateUserReplyValidationError

type CreateUserReplyValidationError struct {
	// contains filtered or unexported fields
}

CreateUserReplyValidationError is the validation error returned by CreateUserReply.Validate if the designated constraints aren't met.

func (CreateUserReplyValidationError) Cause

Cause function returns cause value.

func (CreateUserReplyValidationError) Error

Error satisfies the builtin error interface

func (CreateUserReplyValidationError) ErrorName

func (e CreateUserReplyValidationError) ErrorName() string

ErrorName returns error name.

func (CreateUserReplyValidationError) Field

Field function returns field value.

func (CreateUserReplyValidationError) Key

Key function returns key value.

func (CreateUserReplyValidationError) Reason

Reason function returns reason value.

type CreateUserReq

type CreateUserReq struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserReq) Descriptor deprecated

func (*CreateUserReq) Descriptor() ([]byte, []int)

Deprecated: Use CreateUserReq.ProtoReflect.Descriptor instead.

func (*CreateUserReq) GetPassword

func (x *CreateUserReq) GetPassword() string

func (*CreateUserReq) GetUsername

func (x *CreateUserReq) GetUsername() string

func (*CreateUserReq) ProtoMessage

func (*CreateUserReq) ProtoMessage()

func (*CreateUserReq) ProtoReflect

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

func (*CreateUserReq) Reset

func (x *CreateUserReq) Reset()

func (*CreateUserReq) String

func (x *CreateUserReq) String() string

func (*CreateUserReq) Validate

func (m *CreateUserReq) Validate() error

Validate checks the field values on CreateUserReq 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 (*CreateUserReq) ValidateAll

func (m *CreateUserReq) ValidateAll() error

ValidateAll checks the field values on CreateUserReq 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 CreateUserReqMultiError, or nil if none found.

type CreateUserReqMultiError

type CreateUserReqMultiError []error

CreateUserReqMultiError is an error wrapping multiple validation errors returned by CreateUserReq.ValidateAll() if the designated constraints aren't met.

func (CreateUserReqMultiError) AllErrors

func (m CreateUserReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateUserReqMultiError) Error

func (m CreateUserReqMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type CreateUserReqValidationError

type CreateUserReqValidationError struct {
	// contains filtered or unexported fields
}

CreateUserReqValidationError is the validation error returned by CreateUserReq.Validate if the designated constraints aren't met.

func (CreateUserReqValidationError) Cause

Cause function returns cause value.

func (CreateUserReqValidationError) Error

Error satisfies the builtin error interface

func (CreateUserReqValidationError) ErrorName

func (e CreateUserReqValidationError) ErrorName() string

ErrorName returns error name.

func (CreateUserReqValidationError) Field

Field function returns field value.

func (CreateUserReqValidationError) Key

Key function returns key value.

func (CreateUserReqValidationError) Reason

Reason function returns reason value.

type GetUserByUsernameReply

type GetUserByUsernameReply struct {
	Id       int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	IsActive bool   `protobuf:"varint,3,opt,name=isActive,proto3" json:"isActive,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserByUsernameReply) Descriptor deprecated

func (*GetUserByUsernameReply) Descriptor() ([]byte, []int)

Deprecated: Use GetUserByUsernameReply.ProtoReflect.Descriptor instead.

func (*GetUserByUsernameReply) GetId

func (x *GetUserByUsernameReply) GetId() int64

func (*GetUserByUsernameReply) GetIsActive

func (x *GetUserByUsernameReply) GetIsActive() bool

func (*GetUserByUsernameReply) GetUsername

func (x *GetUserByUsernameReply) GetUsername() string

func (*GetUserByUsernameReply) ProtoMessage

func (*GetUserByUsernameReply) ProtoMessage()

func (*GetUserByUsernameReply) ProtoReflect

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

func (*GetUserByUsernameReply) Reset

func (x *GetUserByUsernameReply) Reset()

func (*GetUserByUsernameReply) String

func (x *GetUserByUsernameReply) String() string

func (*GetUserByUsernameReply) Validate

func (m *GetUserByUsernameReply) Validate() error

Validate checks the field values on GetUserByUsernameReply 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 (*GetUserByUsernameReply) ValidateAll

func (m *GetUserByUsernameReply) ValidateAll() error

ValidateAll checks the field values on GetUserByUsernameReply 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 GetUserByUsernameReplyMultiError, or nil if none found.

type GetUserByUsernameReplyMultiError

type GetUserByUsernameReplyMultiError []error

GetUserByUsernameReplyMultiError is an error wrapping multiple validation errors returned by GetUserByUsernameReply.ValidateAll() if the designated constraints aren't met.

func (GetUserByUsernameReplyMultiError) AllErrors

func (m GetUserByUsernameReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetUserByUsernameReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetUserByUsernameReplyValidationError

type GetUserByUsernameReplyValidationError struct {
	// contains filtered or unexported fields
}

GetUserByUsernameReplyValidationError is the validation error returned by GetUserByUsernameReply.Validate if the designated constraints aren't met.

func (GetUserByUsernameReplyValidationError) Cause

Cause function returns cause value.

func (GetUserByUsernameReplyValidationError) Error

Error satisfies the builtin error interface

func (GetUserByUsernameReplyValidationError) ErrorName

ErrorName returns error name.

func (GetUserByUsernameReplyValidationError) Field

Field function returns field value.

func (GetUserByUsernameReplyValidationError) Key

Key function returns key value.

func (GetUserByUsernameReplyValidationError) Reason

Reason function returns reason value.

type GetUserByUsernameReq

type GetUserByUsernameReq struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserByUsernameReq) Descriptor deprecated

func (*GetUserByUsernameReq) Descriptor() ([]byte, []int)

Deprecated: Use GetUserByUsernameReq.ProtoReflect.Descriptor instead.

func (*GetUserByUsernameReq) GetUsername

func (x *GetUserByUsernameReq) GetUsername() string

func (*GetUserByUsernameReq) ProtoMessage

func (*GetUserByUsernameReq) ProtoMessage()

func (*GetUserByUsernameReq) ProtoReflect

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

func (*GetUserByUsernameReq) Reset

func (x *GetUserByUsernameReq) Reset()

func (*GetUserByUsernameReq) String

func (x *GetUserByUsernameReq) String() string

func (*GetUserByUsernameReq) Validate

func (m *GetUserByUsernameReq) Validate() error

Validate checks the field values on GetUserByUsernameReq 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 (*GetUserByUsernameReq) ValidateAll

func (m *GetUserByUsernameReq) ValidateAll() error

ValidateAll checks the field values on GetUserByUsernameReq 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 GetUserByUsernameReqMultiError, or nil if none found.

type GetUserByUsernameReqMultiError

type GetUserByUsernameReqMultiError []error

GetUserByUsernameReqMultiError is an error wrapping multiple validation errors returned by GetUserByUsernameReq.ValidateAll() if the designated constraints aren't met.

func (GetUserByUsernameReqMultiError) AllErrors

func (m GetUserByUsernameReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetUserByUsernameReqMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetUserByUsernameReqValidationError

type GetUserByUsernameReqValidationError struct {
	// contains filtered or unexported fields
}

GetUserByUsernameReqValidationError is the validation error returned by GetUserByUsernameReq.Validate if the designated constraints aren't met.

func (GetUserByUsernameReqValidationError) Cause

Cause function returns cause value.

func (GetUserByUsernameReqValidationError) Error

Error satisfies the builtin error interface

func (GetUserByUsernameReqValidationError) ErrorName

ErrorName returns error name.

func (GetUserByUsernameReqValidationError) Field

Field function returns field value.

func (GetUserByUsernameReqValidationError) Key

Key function returns key value.

func (GetUserByUsernameReqValidationError) Reason

Reason function returns reason value.

type GetUserReply

type GetUserReply struct {
	Id       int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	IsActive bool   `protobuf:"varint,3,opt,name=isActive,proto3" json:"isActive,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserReply) Descriptor deprecated

func (*GetUserReply) Descriptor() ([]byte, []int)

Deprecated: Use GetUserReply.ProtoReflect.Descriptor instead.

func (*GetUserReply) GetId

func (x *GetUserReply) GetId() int64

func (*GetUserReply) GetIsActive

func (x *GetUserReply) GetIsActive() bool

func (*GetUserReply) GetUsername

func (x *GetUserReply) GetUsername() string

func (*GetUserReply) ProtoMessage

func (*GetUserReply) ProtoMessage()

func (*GetUserReply) ProtoReflect

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

func (*GetUserReply) Reset

func (x *GetUserReply) Reset()

func (*GetUserReply) String

func (x *GetUserReply) String() string

func (*GetUserReply) Validate

func (m *GetUserReply) Validate() error

Validate checks the field values on GetUserReply 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 (*GetUserReply) ValidateAll

func (m *GetUserReply) ValidateAll() error

ValidateAll checks the field values on GetUserReply 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 GetUserReplyMultiError, or nil if none found.

type GetUserReplyMultiError

type GetUserReplyMultiError []error

GetUserReplyMultiError is an error wrapping multiple validation errors returned by GetUserReply.ValidateAll() if the designated constraints aren't met.

func (GetUserReplyMultiError) AllErrors

func (m GetUserReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetUserReplyMultiError) Error

func (m GetUserReplyMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type GetUserReplyValidationError

type GetUserReplyValidationError struct {
	// contains filtered or unexported fields
}

GetUserReplyValidationError is the validation error returned by GetUserReply.Validate if the designated constraints aren't met.

func (GetUserReplyValidationError) Cause

Cause function returns cause value.

func (GetUserReplyValidationError) Error

Error satisfies the builtin error interface

func (GetUserReplyValidationError) ErrorName

func (e GetUserReplyValidationError) ErrorName() string

ErrorName returns error name.

func (GetUserReplyValidationError) Field

Field function returns field value.

func (GetUserReplyValidationError) Key

Key function returns key value.

func (GetUserReplyValidationError) Reason

Reason function returns reason value.

type GetUserReq

type GetUserReq struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserReq) Descriptor deprecated

func (*GetUserReq) Descriptor() ([]byte, []int)

Deprecated: Use GetUserReq.ProtoReflect.Descriptor instead.

func (*GetUserReq) GetId

func (x *GetUserReq) GetId() int64

func (*GetUserReq) ProtoMessage

func (*GetUserReq) ProtoMessage()

func (*GetUserReq) ProtoReflect

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

func (*GetUserReq) Reset

func (x *GetUserReq) Reset()

func (*GetUserReq) String

func (x *GetUserReq) String() string

func (*GetUserReq) Validate

func (m *GetUserReq) Validate() error

Validate checks the field values on GetUserReq 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 (*GetUserReq) ValidateAll

func (m *GetUserReq) ValidateAll() error

ValidateAll checks the field values on GetUserReq 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 GetUserReqMultiError, or nil if none found.

type GetUserReqMultiError

type GetUserReqMultiError []error

GetUserReqMultiError is an error wrapping multiple validation errors returned by GetUserReq.ValidateAll() if the designated constraints aren't met.

func (GetUserReqMultiError) AllErrors

func (m GetUserReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetUserReqMultiError) Error

func (m GetUserReqMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type GetUserReqValidationError

type GetUserReqValidationError struct {
	// contains filtered or unexported fields
}

GetUserReqValidationError is the validation error returned by GetUserReq.Validate if the designated constraints aren't met.

func (GetUserReqValidationError) Cause

func (e GetUserReqValidationError) Cause() error

Cause function returns cause value.

func (GetUserReqValidationError) Error

Error satisfies the builtin error interface

func (GetUserReqValidationError) ErrorName

func (e GetUserReqValidationError) ErrorName() string

ErrorName returns error name.

func (GetUserReqValidationError) Field

Field function returns field value.

func (GetUserReqValidationError) Key

Key function returns key value.

func (GetUserReqValidationError) Reason

func (e GetUserReqValidationError) Reason() string

Reason function returns reason value.

type ListUserReply

type ListUserReply struct {
	Results []*ListUserReply_User `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	Total   int64                 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUserReply) Descriptor deprecated

func (*ListUserReply) Descriptor() ([]byte, []int)

Deprecated: Use ListUserReply.ProtoReflect.Descriptor instead.

func (*ListUserReply) GetResults

func (x *ListUserReply) GetResults() []*ListUserReply_User

func (*ListUserReply) GetTotal

func (x *ListUserReply) GetTotal() int64

func (*ListUserReply) ProtoMessage

func (*ListUserReply) ProtoMessage()

func (*ListUserReply) ProtoReflect

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

func (*ListUserReply) Reset

func (x *ListUserReply) Reset()

func (*ListUserReply) String

func (x *ListUserReply) String() string

func (*ListUserReply) Validate

func (m *ListUserReply) Validate() error

Validate checks the field values on ListUserReply 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 (*ListUserReply) ValidateAll

func (m *ListUserReply) ValidateAll() error

ValidateAll checks the field values on ListUserReply 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 ListUserReplyMultiError, or nil if none found.

type ListUserReplyMultiError

type ListUserReplyMultiError []error

ListUserReplyMultiError is an error wrapping multiple validation errors returned by ListUserReply.ValidateAll() if the designated constraints aren't met.

func (ListUserReplyMultiError) AllErrors

func (m ListUserReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListUserReplyMultiError) Error

func (m ListUserReplyMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ListUserReplyValidationError

type ListUserReplyValidationError struct {
	// contains filtered or unexported fields
}

ListUserReplyValidationError is the validation error returned by ListUserReply.Validate if the designated constraints aren't met.

func (ListUserReplyValidationError) Cause

Cause function returns cause value.

func (ListUserReplyValidationError) Error

Error satisfies the builtin error interface

func (ListUserReplyValidationError) ErrorName

func (e ListUserReplyValidationError) ErrorName() string

ErrorName returns error name.

func (ListUserReplyValidationError) Field

Field function returns field value.

func (ListUserReplyValidationError) Key

Key function returns key value.

func (ListUserReplyValidationError) Reason

Reason function returns reason value.

type ListUserReply_User

type ListUserReply_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,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUserReply_User) Descriptor deprecated

func (*ListUserReply_User) Descriptor() ([]byte, []int)

Deprecated: Use ListUserReply_User.ProtoReflect.Descriptor instead.

func (*ListUserReply_User) GetId

func (x *ListUserReply_User) GetId() int64

func (*ListUserReply_User) GetUsername

func (x *ListUserReply_User) GetUsername() string

func (*ListUserReply_User) ProtoMessage

func (*ListUserReply_User) ProtoMessage()

func (*ListUserReply_User) ProtoReflect

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

func (*ListUserReply_User) Reset

func (x *ListUserReply_User) Reset()

func (*ListUserReply_User) String

func (x *ListUserReply_User) String() string

func (*ListUserReply_User) Validate

func (m *ListUserReply_User) Validate() error

Validate checks the field values on ListUserReply_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 (*ListUserReply_User) ValidateAll

func (m *ListUserReply_User) ValidateAll() error

ValidateAll checks the field values on ListUserReply_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 ListUserReply_UserMultiError, or nil if none found.

type ListUserReply_UserMultiError

type ListUserReply_UserMultiError []error

ListUserReply_UserMultiError is an error wrapping multiple validation errors returned by ListUserReply_User.ValidateAll() if the designated constraints aren't met.

func (ListUserReply_UserMultiError) AllErrors

func (m ListUserReply_UserMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListUserReply_UserMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ListUserReply_UserValidationError

type ListUserReply_UserValidationError struct {
	// contains filtered or unexported fields
}

ListUserReply_UserValidationError is the validation error returned by ListUserReply_User.Validate if the designated constraints aren't met.

func (ListUserReply_UserValidationError) Cause

Cause function returns cause value.

func (ListUserReply_UserValidationError) Error

Error satisfies the builtin error interface

func (ListUserReply_UserValidationError) ErrorName

ErrorName returns error name.

func (ListUserReply_UserValidationError) Field

Field function returns field value.

func (ListUserReply_UserValidationError) Key

Key function returns key value.

func (ListUserReply_UserValidationError) Reason

Reason function returns reason value.

type ListUserReq

type ListUserReq struct {
	PageIndex int32 `protobuf:"varint,1,opt,name=pageIndex,proto3" json:"pageIndex,omitempty"`
	PageSize  int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUserReq) Descriptor deprecated

func (*ListUserReq) Descriptor() ([]byte, []int)

Deprecated: Use ListUserReq.ProtoReflect.Descriptor instead.

func (*ListUserReq) GetPageIndex

func (x *ListUserReq) GetPageIndex() int32

func (*ListUserReq) GetPageSize

func (x *ListUserReq) GetPageSize() int32

func (*ListUserReq) ProtoMessage

func (*ListUserReq) ProtoMessage()

func (*ListUserReq) ProtoReflect

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

func (*ListUserReq) Reset

func (x *ListUserReq) Reset()

func (*ListUserReq) String

func (x *ListUserReq) String() string

func (*ListUserReq) Validate

func (m *ListUserReq) Validate() error

Validate checks the field values on ListUserReq 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 (*ListUserReq) ValidateAll

func (m *ListUserReq) ValidateAll() error

ValidateAll checks the field values on ListUserReq 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 ListUserReqMultiError, or nil if none found.

type ListUserReqMultiError

type ListUserReqMultiError []error

ListUserReqMultiError is an error wrapping multiple validation errors returned by ListUserReq.ValidateAll() if the designated constraints aren't met.

func (ListUserReqMultiError) AllErrors

func (m ListUserReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListUserReqMultiError) Error

func (m ListUserReqMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ListUserReqValidationError

type ListUserReqValidationError struct {
	// contains filtered or unexported fields
}

ListUserReqValidationError is the validation error returned by ListUserReq.Validate if the designated constraints aren't met.

func (ListUserReqValidationError) Cause

Cause function returns cause value.

func (ListUserReqValidationError) Error

Error satisfies the builtin error interface

func (ListUserReqValidationError) ErrorName

func (e ListUserReqValidationError) ErrorName() string

ErrorName returns error name.

func (ListUserReqValidationError) Field

Field function returns field value.

func (ListUserReqValidationError) Key

Key function returns key value.

func (ListUserReqValidationError) Reason

Reason function returns reason value.

type SaveUserReply

type SaveUserReply struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*SaveUserReply) Descriptor deprecated

func (*SaveUserReply) Descriptor() ([]byte, []int)

Deprecated: Use SaveUserReply.ProtoReflect.Descriptor instead.

func (*SaveUserReply) GetId

func (x *SaveUserReply) GetId() int64

func (*SaveUserReply) ProtoMessage

func (*SaveUserReply) ProtoMessage()

func (*SaveUserReply) ProtoReflect

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

func (*SaveUserReply) Reset

func (x *SaveUserReply) Reset()

func (*SaveUserReply) String

func (x *SaveUserReply) String() string

func (*SaveUserReply) Validate

func (m *SaveUserReply) Validate() error

Validate checks the field values on SaveUserReply 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 (*SaveUserReply) ValidateAll

func (m *SaveUserReply) ValidateAll() error

ValidateAll checks the field values on SaveUserReply 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 SaveUserReplyMultiError, or nil if none found.

type SaveUserReplyMultiError

type SaveUserReplyMultiError []error

SaveUserReplyMultiError is an error wrapping multiple validation errors returned by SaveUserReply.ValidateAll() if the designated constraints aren't met.

func (SaveUserReplyMultiError) AllErrors

func (m SaveUserReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SaveUserReplyMultiError) Error

func (m SaveUserReplyMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type SaveUserReplyValidationError

type SaveUserReplyValidationError struct {
	// contains filtered or unexported fields
}

SaveUserReplyValidationError is the validation error returned by SaveUserReply.Validate if the designated constraints aren't met.

func (SaveUserReplyValidationError) Cause

Cause function returns cause value.

func (SaveUserReplyValidationError) Error

Error satisfies the builtin error interface

func (SaveUserReplyValidationError) ErrorName

func (e SaveUserReplyValidationError) ErrorName() string

ErrorName returns error name.

func (SaveUserReplyValidationError) Field

Field function returns field value.

func (SaveUserReplyValidationError) Key

Key function returns key value.

func (SaveUserReplyValidationError) Reason

Reason function returns reason value.

type SaveUserReq

type SaveUserReq struct {
	Id       int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*SaveUserReq) Descriptor deprecated

func (*SaveUserReq) Descriptor() ([]byte, []int)

Deprecated: Use SaveUserReq.ProtoReflect.Descriptor instead.

func (*SaveUserReq) GetId

func (x *SaveUserReq) GetId() int64

func (*SaveUserReq) GetPassword

func (x *SaveUserReq) GetPassword() string

func (*SaveUserReq) GetUsername

func (x *SaveUserReq) GetUsername() string

func (*SaveUserReq) ProtoMessage

func (*SaveUserReq) ProtoMessage()

func (*SaveUserReq) ProtoReflect

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

func (*SaveUserReq) Reset

func (x *SaveUserReq) Reset()

func (*SaveUserReq) String

func (x *SaveUserReq) String() string

func (*SaveUserReq) Validate

func (m *SaveUserReq) Validate() error

Validate checks the field values on SaveUserReq 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 (*SaveUserReq) ValidateAll

func (m *SaveUserReq) ValidateAll() error

ValidateAll checks the field values on SaveUserReq 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 SaveUserReqMultiError, or nil if none found.

type SaveUserReqMultiError

type SaveUserReqMultiError []error

SaveUserReqMultiError is an error wrapping multiple validation errors returned by SaveUserReq.ValidateAll() if the designated constraints aren't met.

func (SaveUserReqMultiError) AllErrors

func (m SaveUserReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SaveUserReqMultiError) Error

func (m SaveUserReqMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type SaveUserReqValidationError

type SaveUserReqValidationError struct {
	// contains filtered or unexported fields
}

SaveUserReqValidationError is the validation error returned by SaveUserReq.Validate if the designated constraints aren't met.

func (SaveUserReqValidationError) Cause

Cause function returns cause value.

func (SaveUserReqValidationError) Error

Error satisfies the builtin error interface

func (SaveUserReqValidationError) ErrorName

func (e SaveUserReqValidationError) ErrorName() string

ErrorName returns error name.

func (SaveUserReqValidationError) Field

Field function returns field value.

func (SaveUserReqValidationError) Key

Key function returns key value.

func (SaveUserReqValidationError) Reason

Reason function returns reason value.

type UnimplementedUserServer

type UnimplementedUserServer struct {
}

UnimplementedUserServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServer) ChangeActive

func (UnimplementedUserServer) CreateUser

func (UnimplementedUserServer) GetUser

func (UnimplementedUserServer) GetUserByUsername

func (UnimplementedUserServer) ListUser

func (UnimplementedUserServer) Save

func (UnimplementedUserServer) VerifyPassword

type UnsafeUserServer

type UnsafeUserServer interface {
	// contains filtered or unexported methods
}

UnsafeUserServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServer will result in compilation errors.

type UserClient

type UserClient interface {
	CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*CreateUserReply, error)
	Save(ctx context.Context, in *SaveUserReq, opts ...grpc.CallOption) (*SaveUserReply, error)
	GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*GetUserReply, error)
	GetUserByUsername(ctx context.Context, in *GetUserByUsernameReq, opts ...grpc.CallOption) (*GetUserByUsernameReply, error)
	ListUser(ctx context.Context, in *ListUserReq, opts ...grpc.CallOption) (*ListUserReply, error)
	VerifyPassword(ctx context.Context, in *VerifyPasswordReq, opts ...grpc.CallOption) (*VerifyPasswordReply, error)
	ChangeActive(ctx context.Context, in *ChangeActiveReq, opts ...grpc.CallOption) (*ChangeActiveReply, error)
}

UserClient is the client API for User 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 NewUserClient

func NewUserClient(cc grpc.ClientConnInterface) UserClient

type UserServer

type UserServer interface {
	CreateUser(context.Context, *CreateUserReq) (*CreateUserReply, error)
	Save(context.Context, *SaveUserReq) (*SaveUserReply, error)
	GetUser(context.Context, *GetUserReq) (*GetUserReply, error)
	GetUserByUsername(context.Context, *GetUserByUsernameReq) (*GetUserByUsernameReply, error)
	ListUser(context.Context, *ListUserReq) (*ListUserReply, error)
	VerifyPassword(context.Context, *VerifyPasswordReq) (*VerifyPasswordReply, error)
	ChangeActive(context.Context, *ChangeActiveReq) (*ChangeActiveReply, error)
	// contains filtered or unexported methods
}

UserServer is the server API for User service. All implementations must embed UnimplementedUserServer for forward compatibility

type UserServiceErrorReason

type UserServiceErrorReason int32
const (
	UserServiceErrorReason_UNKNOWN_ERROR   UserServiceErrorReason = 0
	UserServiceErrorReason_LOGIN_FAILED    UserServiceErrorReason = 1
	UserServiceErrorReason_REGISTER_FAILED UserServiceErrorReason = 2
)

func (UserServiceErrorReason) Descriptor

func (UserServiceErrorReason) Enum

func (UserServiceErrorReason) EnumDescriptor deprecated

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

Deprecated: Use UserServiceErrorReason.Descriptor instead.

func (UserServiceErrorReason) Number

func (UserServiceErrorReason) String

func (x UserServiceErrorReason) String() string

func (UserServiceErrorReason) Type

type VerifyPasswordReply

type VerifyPasswordReply struct {
	Ok bool  `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*VerifyPasswordReply) Descriptor deprecated

func (*VerifyPasswordReply) Descriptor() ([]byte, []int)

Deprecated: Use VerifyPasswordReply.ProtoReflect.Descriptor instead.

func (*VerifyPasswordReply) GetId

func (x *VerifyPasswordReply) GetId() int64

func (*VerifyPasswordReply) GetOk

func (x *VerifyPasswordReply) GetOk() bool

func (*VerifyPasswordReply) ProtoMessage

func (*VerifyPasswordReply) ProtoMessage()

func (*VerifyPasswordReply) ProtoReflect

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

func (*VerifyPasswordReply) Reset

func (x *VerifyPasswordReply) Reset()

func (*VerifyPasswordReply) String

func (x *VerifyPasswordReply) String() string

func (*VerifyPasswordReply) Validate

func (m *VerifyPasswordReply) Validate() error

Validate checks the field values on VerifyPasswordReply 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 (*VerifyPasswordReply) ValidateAll

func (m *VerifyPasswordReply) ValidateAll() error

ValidateAll checks the field values on VerifyPasswordReply 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 VerifyPasswordReplyMultiError, or nil if none found.

type VerifyPasswordReplyMultiError

type VerifyPasswordReplyMultiError []error

VerifyPasswordReplyMultiError is an error wrapping multiple validation errors returned by VerifyPasswordReply.ValidateAll() if the designated constraints aren't met.

func (VerifyPasswordReplyMultiError) AllErrors

func (m VerifyPasswordReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (VerifyPasswordReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type VerifyPasswordReplyValidationError

type VerifyPasswordReplyValidationError struct {
	// contains filtered or unexported fields
}

VerifyPasswordReplyValidationError is the validation error returned by VerifyPasswordReply.Validate if the designated constraints aren't met.

func (VerifyPasswordReplyValidationError) Cause

Cause function returns cause value.

func (VerifyPasswordReplyValidationError) Error

Error satisfies the builtin error interface

func (VerifyPasswordReplyValidationError) ErrorName

ErrorName returns error name.

func (VerifyPasswordReplyValidationError) Field

Field function returns field value.

func (VerifyPasswordReplyValidationError) Key

Key function returns key value.

func (VerifyPasswordReplyValidationError) Reason

Reason function returns reason value.

type VerifyPasswordReq

type VerifyPasswordReq struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*VerifyPasswordReq) Descriptor deprecated

func (*VerifyPasswordReq) Descriptor() ([]byte, []int)

Deprecated: Use VerifyPasswordReq.ProtoReflect.Descriptor instead.

func (*VerifyPasswordReq) GetPassword

func (x *VerifyPasswordReq) GetPassword() string

func (*VerifyPasswordReq) GetUsername

func (x *VerifyPasswordReq) GetUsername() string

func (*VerifyPasswordReq) ProtoMessage

func (*VerifyPasswordReq) ProtoMessage()

func (*VerifyPasswordReq) ProtoReflect

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

func (*VerifyPasswordReq) Reset

func (x *VerifyPasswordReq) Reset()

func (*VerifyPasswordReq) String

func (x *VerifyPasswordReq) String() string

func (*VerifyPasswordReq) Validate

func (m *VerifyPasswordReq) Validate() error

Validate checks the field values on VerifyPasswordReq 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 (*VerifyPasswordReq) ValidateAll

func (m *VerifyPasswordReq) ValidateAll() error

ValidateAll checks the field values on VerifyPasswordReq 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 VerifyPasswordReqMultiError, or nil if none found.

type VerifyPasswordReqMultiError

type VerifyPasswordReqMultiError []error

VerifyPasswordReqMultiError is an error wrapping multiple validation errors returned by VerifyPasswordReq.ValidateAll() if the designated constraints aren't met.

func (VerifyPasswordReqMultiError) AllErrors

func (m VerifyPasswordReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (VerifyPasswordReqMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type VerifyPasswordReqValidationError

type VerifyPasswordReqValidationError struct {
	// contains filtered or unexported fields
}

VerifyPasswordReqValidationError is the validation error returned by VerifyPasswordReq.Validate if the designated constraints aren't met.

func (VerifyPasswordReqValidationError) Cause

Cause function returns cause value.

func (VerifyPasswordReqValidationError) Error

Error satisfies the builtin error interface

func (VerifyPasswordReqValidationError) ErrorName

ErrorName returns error name.

func (VerifyPasswordReqValidationError) Field

Field function returns field value.

func (VerifyPasswordReqValidationError) Key

Key function returns key value.

func (VerifyPasswordReqValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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