v1

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LoginStatus_name = map[int32]string{
		0: "LOGIN",
		1: "ALREADY_LOGIN",
		2: "LOGOUT",
	}
	LoginStatus_value = map[string]int32{
		"LOGIN":         0,
		"ALREADY_LOGIN": 1,
		"LOGOUT":        2,
	}
)

Enum value maps for LoginStatus.

View Source
var (
	LoginType_name = map[int32]string{
		0: "LOGIN_TYPE_TRY",
		1: "LOGIN_TYPE_FORCE",
	}
	LoginType_value = map[string]int32{
		"LOGIN_TYPE_TRY":   0,
		"LOGIN_TYPE_FORCE": 1,
	}
)

Enum value maps for LoginType.

View Source
var File_user_v1_user_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.user.v1.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUser",
			Handler:    _UserService_GetUser_Handler,
		},
		{
			MethodName: "QueryUser",
			Handler:    _UserService_QueryUser_Handler,
		},
		{
			MethodName: "CreateUser",
			Handler:    _UserService_CreateUser_Handler,
		},
		{
			MethodName: "UpdateUser",
			Handler:    _UserService_UpdateUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user/v1/user.proto",
}

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

Functions

func RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type CreateUserRequest

type CreateUserRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Types that are assignable to Field:
	//	*CreateUserRequest_Email
	//	*CreateUserRequest_Phone
	Field    isCreateUserRequest_Field `protobuf_oneof:"field"`
	Password string                    `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserRequest) Descriptor deprecated

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

Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.

func (*CreateUserRequest) GetEmail

func (x *CreateUserRequest) GetEmail() string

func (*CreateUserRequest) GetField added in v0.0.7

func (m *CreateUserRequest) GetField() isCreateUserRequest_Field

func (*CreateUserRequest) GetName

func (x *CreateUserRequest) GetName() string

func (*CreateUserRequest) GetPassword

func (x *CreateUserRequest) GetPassword() string

func (*CreateUserRequest) GetPhone

func (x *CreateUserRequest) GetPhone() string

func (*CreateUserRequest) ProtoMessage

func (*CreateUserRequest) ProtoMessage()

func (*CreateUserRequest) ProtoReflect

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

func (*CreateUserRequest) Reset

func (x *CreateUserRequest) Reset()

func (*CreateUserRequest) String

func (x *CreateUserRequest) String() string

func (*CreateUserRequest) Validate

func (m *CreateUserRequest) Validate() error

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

func (m *CreateUserRequest) ValidateAll() error

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

type CreateUserRequestMultiError

type CreateUserRequestMultiError []error

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

func (CreateUserRequestMultiError) AllErrors

func (m CreateUserRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateUserRequestMultiError) Error

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

type CreateUserRequestValidationError

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

CreateUserRequestValidationError is the validation error returned by CreateUserRequest.Validate if the designated constraints aren't met.

func (CreateUserRequestValidationError) Cause

Cause function returns cause value.

func (CreateUserRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateUserRequestValidationError) ErrorName

ErrorName returns error name.

func (CreateUserRequestValidationError) Field

Field function returns field value.

func (CreateUserRequestValidationError) Key

Key function returns key value.

func (CreateUserRequestValidationError) Reason

Reason function returns reason value.

type CreateUserRequest_Email

type CreateUserRequest_Email struct {
	Email string `protobuf:"bytes,2,opt,name=email,proto3,oneof"`
}

type CreateUserRequest_Phone

type CreateUserRequest_Phone struct {
	Phone string `protobuf:"bytes,3,opt,name=phone,proto3,oneof"`
}

type GetUserInfoRequest

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

func (*GetUserInfoRequest) Descriptor deprecated

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

Deprecated: Use GetUserInfoRequest.ProtoReflect.Descriptor instead.

func (*GetUserInfoRequest) GetUid

func (x *GetUserInfoRequest) GetUid() int64

func (*GetUserInfoRequest) ProtoMessage

func (*GetUserInfoRequest) ProtoMessage()

func (*GetUserInfoRequest) ProtoReflect

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

func (*GetUserInfoRequest) Reset

func (x *GetUserInfoRequest) Reset()

func (*GetUserInfoRequest) String

func (x *GetUserInfoRequest) String() string

func (*GetUserInfoRequest) Validate

func (m *GetUserInfoRequest) Validate() error

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

func (m *GetUserInfoRequest) ValidateAll() error

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

type GetUserInfoRequestMultiError

type GetUserInfoRequestMultiError []error

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

func (GetUserInfoRequestMultiError) AllErrors

func (m GetUserInfoRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetUserInfoRequestMultiError) Error

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

type GetUserInfoRequestValidationError

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

GetUserInfoRequestValidationError is the validation error returned by GetUserInfoRequest.Validate if the designated constraints aren't met.

func (GetUserInfoRequestValidationError) Cause

Cause function returns cause value.

func (GetUserInfoRequestValidationError) Error

Error satisfies the builtin error interface

func (GetUserInfoRequestValidationError) ErrorName

ErrorName returns error name.

func (GetUserInfoRequestValidationError) Field

Field function returns field value.

func (GetUserInfoRequestValidationError) Key

Key function returns key value.

func (GetUserInfoRequestValidationError) Reason

Reason function returns reason value.

type LoginStatus

type LoginStatus int32
const (
	LoginStatus_LOGIN         LoginStatus = 0
	LoginStatus_ALREADY_LOGIN LoginStatus = 1
	LoginStatus_LOGOUT        LoginStatus = 2
)

func (LoginStatus) Descriptor

func (LoginStatus) Enum

func (x LoginStatus) Enum() *LoginStatus

func (LoginStatus) EnumDescriptor deprecated

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

Deprecated: Use LoginStatus.Descriptor instead.

func (LoginStatus) Number

func (x LoginStatus) Number() protoreflect.EnumNumber

func (LoginStatus) String

func (x LoginStatus) String() string

func (LoginStatus) Type

type LoginType

type LoginType int32
const (
	LoginType_LOGIN_TYPE_TRY   LoginType = 0
	LoginType_LOGIN_TYPE_FORCE LoginType = 1
)

func (LoginType) Descriptor

func (LoginType) Descriptor() protoreflect.EnumDescriptor

func (LoginType) Enum

func (x LoginType) Enum() *LoginType

func (LoginType) EnumDescriptor deprecated

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

Deprecated: Use LoginType.Descriptor instead.

func (LoginType) Number

func (x LoginType) Number() protoreflect.EnumNumber

func (LoginType) String

func (x LoginType) String() string

func (LoginType) Type

type QueryUserRequest

type QueryUserRequest struct {

	// Types that are assignable to Field:
	//	*QueryUserRequest_Email
	//	*QueryUserRequest_Phone
	Field isQueryUserRequest_Field `protobuf_oneof:"field"`
	// contains filtered or unexported fields
}

func (*QueryUserRequest) Descriptor deprecated

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

Deprecated: Use QueryUserRequest.ProtoReflect.Descriptor instead.

func (*QueryUserRequest) GetEmail

func (x *QueryUserRequest) GetEmail() string

func (*QueryUserRequest) GetField added in v0.0.7

func (m *QueryUserRequest) GetField() isQueryUserRequest_Field

func (*QueryUserRequest) GetPhone

func (x *QueryUserRequest) GetPhone() string

func (*QueryUserRequest) ProtoMessage

func (*QueryUserRequest) ProtoMessage()

func (*QueryUserRequest) ProtoReflect

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

func (*QueryUserRequest) Reset

func (x *QueryUserRequest) Reset()

func (*QueryUserRequest) String

func (x *QueryUserRequest) String() string

func (*QueryUserRequest) Validate

func (m *QueryUserRequest) Validate() error

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

func (m *QueryUserRequest) ValidateAll() error

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

type QueryUserRequestMultiError

type QueryUserRequestMultiError []error

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

func (QueryUserRequestMultiError) AllErrors

func (m QueryUserRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (QueryUserRequestMultiError) Error

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

type QueryUserRequestValidationError

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

QueryUserRequestValidationError is the validation error returned by QueryUserRequest.Validate if the designated constraints aren't met.

func (QueryUserRequestValidationError) Cause

Cause function returns cause value.

func (QueryUserRequestValidationError) Error

Error satisfies the builtin error interface

func (QueryUserRequestValidationError) ErrorName

ErrorName returns error name.

func (QueryUserRequestValidationError) Field

Field function returns field value.

func (QueryUserRequestValidationError) Key

Key function returns key value.

func (QueryUserRequestValidationError) Reason

Reason function returns reason value.

type QueryUserRequest_Email

type QueryUserRequest_Email struct {
	Email string `protobuf:"bytes,1,opt,name=email,proto3,oneof"`
}

type QueryUserRequest_Phone

type QueryUserRequest_Phone struct {
	Phone string `protobuf:"bytes,2,opt,name=phone,proto3,oneof"`
}

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) CreateUser

func (UnimplementedUserServiceServer) GetUser

func (UnimplementedUserServiceServer) QueryUser

func (UnimplementedUserServiceServer) UpdateUser

type UnsafeUserServiceServer

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

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

type UpdateUserRequest

type UpdateUserRequest struct {
	Uid      int64  `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Email    string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Phone    string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"`
	Avatar   string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"`
	Password string `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateUserRequest) Descriptor deprecated

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

Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.

func (*UpdateUserRequest) GetAvatar

func (x *UpdateUserRequest) GetAvatar() string

func (*UpdateUserRequest) GetEmail

func (x *UpdateUserRequest) GetEmail() string

func (*UpdateUserRequest) GetName

func (x *UpdateUserRequest) GetName() string

func (*UpdateUserRequest) GetPassword added in v0.0.7

func (x *UpdateUserRequest) GetPassword() string

func (*UpdateUserRequest) GetPhone

func (x *UpdateUserRequest) GetPhone() string

func (*UpdateUserRequest) GetUid

func (x *UpdateUserRequest) GetUid() int64

func (*UpdateUserRequest) ProtoMessage

func (*UpdateUserRequest) ProtoMessage()

func (*UpdateUserRequest) ProtoReflect

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

func (*UpdateUserRequest) Reset

func (x *UpdateUserRequest) Reset()

func (*UpdateUserRequest) String

func (x *UpdateUserRequest) String() string

func (*UpdateUserRequest) Validate

func (m *UpdateUserRequest) Validate() error

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

func (m *UpdateUserRequest) ValidateAll() error

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

type UpdateUserRequestMultiError

type UpdateUserRequestMultiError []error

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

func (UpdateUserRequestMultiError) AllErrors

func (m UpdateUserRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UpdateUserRequestMultiError) Error

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

type UpdateUserRequestValidationError

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

UpdateUserRequestValidationError is the validation error returned by UpdateUserRequest.Validate if the designated constraints aren't met.

func (UpdateUserRequestValidationError) Cause

Cause function returns cause value.

func (UpdateUserRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateUserRequestValidationError) ErrorName

ErrorName returns error name.

func (UpdateUserRequestValidationError) Field

Field function returns field value.

func (UpdateUserRequestValidationError) Key

Key function returns key value.

func (UpdateUserRequestValidationError) Reason

Reason function returns reason value.

type User

type User struct {
	Uid    int64   `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Name   string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Email  *string `protobuf:"bytes,3,opt,name=email,proto3,oneof" json:"email,omitempty"`
	Phone  *string `protobuf:"bytes,4,opt,name=phone,proto3,oneof" json:"phone,omitempty"`
	Avatar string  `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"`
	// push_server_ip only valid when user already login.
	PushServerIp *string `protobuf:"bytes,6,opt,name=push_server_ip,json=pushServerIp,proto3,oneof" json:"push_server_ip,omitempty"`
	Password     string  `protobuf:"bytes,7,opt,name=password,proto3" json:"password,omitempty"`
	// 0: first time login, need connect to push server
	// 1: already login, no need connect to push server
	LoginStatus LoginStatus `protobuf:"varint,8,opt,name=login_status,json=loginStatus,proto3,enum=api.user.v1.LoginStatus" json:"login_status,omitempty"`
	CreatedAt   int64       `protobuf:"varint,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt   int64       `protobuf:"varint,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

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 added in v0.0.7

func (x *User) GetCreatedAt() int64

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetLoginStatus

func (x *User) GetLoginStatus() LoginStatus

func (*User) GetName

func (x *User) GetName() string

func (*User) GetPassword added in v0.0.7

func (x *User) GetPassword() string

func (*User) GetPhone

func (x *User) GetPhone() string

func (*User) GetPushServerIp added in v0.0.7

func (x *User) GetPushServerIp() string

func (*User) GetUid

func (x *User) GetUid() int64

func (*User) GetUpdatedAt added in v0.0.7

func (x *User) GetUpdatedAt() int64

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 {
	Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*UserList) Descriptor deprecated

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

Deprecated: Use UserList.ProtoReflect.Descriptor instead.

func (*UserList) GetUsers

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

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 UserLoginRequest

type UserLoginRequest struct {

	// Types that are assignable to Field:
	//	*UserLoginRequest_Email
	//	*UserLoginRequest_Phone
	Field    isUserLoginRequest_Field `protobuf_oneof:"field"`
	Password string                   `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	// 0: try login , do nothing if already login
	// 1: force login , logout if already login
	LoginType LoginType `protobuf:"varint,4,opt,name=login_type,json=loginType,proto3,enum=api.user.v1.LoginType" json:"login_type,omitempty"`
	// contains filtered or unexported fields
}

func (*UserLoginRequest) Descriptor deprecated

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

Deprecated: Use UserLoginRequest.ProtoReflect.Descriptor instead.

func (*UserLoginRequest) GetEmail

func (x *UserLoginRequest) GetEmail() string

func (*UserLoginRequest) GetField added in v0.0.7

func (m *UserLoginRequest) GetField() isUserLoginRequest_Field

func (*UserLoginRequest) GetLoginType

func (x *UserLoginRequest) GetLoginType() LoginType

func (*UserLoginRequest) GetPassword

func (x *UserLoginRequest) GetPassword() string

func (*UserLoginRequest) GetPhone

func (x *UserLoginRequest) GetPhone() string

func (*UserLoginRequest) ProtoMessage

func (*UserLoginRequest) ProtoMessage()

func (*UserLoginRequest) ProtoReflect

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

func (*UserLoginRequest) Reset

func (x *UserLoginRequest) Reset()

func (*UserLoginRequest) String

func (x *UserLoginRequest) String() string

func (*UserLoginRequest) Validate

func (m *UserLoginRequest) Validate() error

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

func (m *UserLoginRequest) ValidateAll() error

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

type UserLoginRequestMultiError

type UserLoginRequestMultiError []error

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

func (UserLoginRequestMultiError) AllErrors

func (m UserLoginRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserLoginRequestMultiError) Error

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

type UserLoginRequestValidationError

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

UserLoginRequestValidationError is the validation error returned by UserLoginRequest.Validate if the designated constraints aren't met.

func (UserLoginRequestValidationError) Cause

Cause function returns cause value.

func (UserLoginRequestValidationError) Error

Error satisfies the builtin error interface

func (UserLoginRequestValidationError) ErrorName

ErrorName returns error name.

func (UserLoginRequestValidationError) Field

Field function returns field value.

func (UserLoginRequestValidationError) Key

Key function returns key value.

func (UserLoginRequestValidationError) Reason

Reason function returns reason value.

type UserLoginRequest_Email

type UserLoginRequest_Email struct {
	Email string `protobuf:"bytes,1,opt,name=email,proto3,oneof"`
}

type UserLoginRequest_Phone

type UserLoginRequest_Phone struct {
	Phone string `protobuf:"bytes,2,opt,name=phone,proto3,oneof"`
}

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 UserResponse added in v0.0.7

type UserResponse struct {
	Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	User  *User         `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*UserResponse) Descriptor deprecated added in v0.0.7

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

Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.

func (*UserResponse) GetError added in v0.0.9

func (x *UserResponse) GetError() *errors.Error

func (*UserResponse) GetUser added in v0.0.7

func (x *UserResponse) GetUser() *User

func (*UserResponse) ProtoMessage added in v0.0.7

func (*UserResponse) ProtoMessage()

func (*UserResponse) ProtoReflect added in v0.0.7

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

func (*UserResponse) Reset added in v0.0.7

func (x *UserResponse) Reset()

func (*UserResponse) String added in v0.0.7

func (x *UserResponse) String() string

func (*UserResponse) Validate added in v0.0.7

func (m *UserResponse) Validate() error

Validate checks the field values on UserResponse 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 (*UserResponse) ValidateAll added in v0.0.7

func (m *UserResponse) ValidateAll() error

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

type UserResponseMultiError added in v0.0.7

type UserResponseMultiError []error

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

func (UserResponseMultiError) AllErrors added in v0.0.7

func (m UserResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserResponseMultiError) Error added in v0.0.7

func (m UserResponseMultiError) Error() string

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

type UserResponseValidationError added in v0.0.7

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

UserResponseValidationError is the validation error returned by UserResponse.Validate if the designated constraints aren't met.

func (UserResponseValidationError) Cause added in v0.0.7

Cause function returns cause value.

func (UserResponseValidationError) Error added in v0.0.7

Error satisfies the builtin error interface

func (UserResponseValidationError) ErrorName added in v0.0.7

func (e UserResponseValidationError) ErrorName() string

ErrorName returns error name.

func (UserResponseValidationError) Field added in v0.0.7

Field function returns field value.

func (UserResponseValidationError) Key added in v0.0.7

Key function returns key value.

func (UserResponseValidationError) Reason added in v0.0.7

Reason function returns reason value.

type UserServiceClient

type UserServiceClient interface {
	// GetUser get user info by uid, called when uid is known.
	GetUser(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*UserResponse, error)
	// QueryUser query user info by email or phone, called when uid is unknown.
	QueryUser(ctx context.Context, in *QueryUserRequest, opts ...grpc.CallOption) (*UserResponse, error)
	// CreateUser create user.
	CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*UserResponse, error)
	// UpdateUser update user info.
	UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UserResponse, error)
}

UserServiceClient is the client API for UserService 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.

type UserServiceServer

type UserServiceServer interface {
	// GetUser get user info by uid, called when uid is known.
	GetUser(context.Context, *GetUserInfoRequest) (*UserResponse, error)
	// QueryUser query user info by email or phone, called when uid is unknown.
	QueryUser(context.Context, *QueryUserRequest) (*UserResponse, error)
	// CreateUser create user.
	CreateUser(context.Context, *CreateUserRequest) (*UserResponse, error)
	// UpdateUser update user info.
	UpdateUser(context.Context, *UpdateUserRequest) (*UserResponse, error)
	// contains filtered or unexported methods
}

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility

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