v1

package
v0.0.1-beta Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserServer_SignUp_FullMethodName            = "/api.user.v1.UserServer/SignUp"
	UserServer_Login_FullMethodName             = "/api.user.v1.UserServer/Login"
	UserServer_Logout_FullMethodName            = "/api.user.v1.UserServer/Logout"
	UserServer_GetCurrentUser_FullMethodName    = "/api.user.v1.UserServer/GetCurrentUser"
	UserServer_ChangePassword_FullMethodName    = "/api.user.v1.UserServer/ChangePassword"
	UserServer_GetUserByUsername_FullMethodName = "/api.user.v1.UserServer/GetUserByUsername"
)
View Source
const OperationUserServerChangePassword = "/api.user.v1.UserServer/ChangePassword"
View Source
const OperationUserServerGetCurrentUser = "/api.user.v1.UserServer/GetCurrentUser"
View Source
const OperationUserServerGetUserByUsername = "/api.user.v1.UserServer/GetUserByUsername"
View Source
const OperationUserServerLogin = "/api.user.v1.UserServer/Login"
View Source
const OperationUserServerLogout = "/api.user.v1.UserServer/Logout"
View Source
const OperationUserServerSignUp = "/api.user.v1.UserServer/SignUp"

Variables

View Source
var File_user_v1_user_proto protoreflect.FileDescriptor
View Source
var UserServer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.user.v1.UserServer",
	HandlerType: (*UserServerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SignUp",
			Handler:    _UserServer_SignUp_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _UserServer_Login_Handler,
		},
		{
			MethodName: "Logout",
			Handler:    _UserServer_Logout_Handler,
		},
		{
			MethodName: "GetCurrentUser",
			Handler:    _UserServer_GetCurrentUser_Handler,
		},
		{
			MethodName: "ChangePassword",
			Handler:    _UserServer_ChangePassword_Handler,
		},
		{
			MethodName: "GetUserByUsername",
			Handler:    _UserServer_GetUserByUsername_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user/v1/user.proto",
}

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

Functions

func RegisterUserServerHTTPServer

func RegisterUserServerHTTPServer(s *http.Server, srv UserServerHTTPServer)

func RegisterUserServerServer

func RegisterUserServerServer(s grpc.ServiceRegistrar, srv UserServerServer)

Types

type ChangePasswordRequest

type ChangePasswordRequest struct {
	Username        string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	CurrentPassword string `protobuf:"bytes,2,opt,name=currentPassword,proto3" json:"currentPassword,omitempty"`
	NewPassword     string `protobuf:"bytes,3,opt,name=newPassword,proto3" json:"newPassword,omitempty"`
	// contains filtered or unexported fields
}

func (*ChangePasswordRequest) Descriptor deprecated

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

Deprecated: Use ChangePasswordRequest.ProtoReflect.Descriptor instead.

func (*ChangePasswordRequest) GetCurrentPassword

func (x *ChangePasswordRequest) GetCurrentPassword() string

func (*ChangePasswordRequest) GetNewPassword

func (x *ChangePasswordRequest) GetNewPassword() string

func (*ChangePasswordRequest) GetUsername

func (x *ChangePasswordRequest) GetUsername() string

func (*ChangePasswordRequest) ProtoMessage

func (*ChangePasswordRequest) ProtoMessage()

func (*ChangePasswordRequest) ProtoReflect

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

func (*ChangePasswordRequest) Reset

func (x *ChangePasswordRequest) Reset()

func (*ChangePasswordRequest) String

func (x *ChangePasswordRequest) String() string

func (*ChangePasswordRequest) Validate

func (m *ChangePasswordRequest) Validate() error

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

func (m *ChangePasswordRequest) ValidateAll() error

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

type ChangePasswordRequestMultiError

type ChangePasswordRequestMultiError []error

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

func (ChangePasswordRequestMultiError) AllErrors

func (m ChangePasswordRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ChangePasswordRequestMultiError) Error

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

type ChangePasswordRequestValidationError

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

ChangePasswordRequestValidationError is the validation error returned by ChangePasswordRequest.Validate if the designated constraints aren't met.

func (ChangePasswordRequestValidationError) Cause

Cause function returns cause value.

func (ChangePasswordRequestValidationError) Error

Error satisfies the builtin error interface

func (ChangePasswordRequestValidationError) ErrorName

ErrorName returns error name.

func (ChangePasswordRequestValidationError) Field

Field function returns field value.

func (ChangePasswordRequestValidationError) Key

Key function returns key value.

func (ChangePasswordRequestValidationError) Reason

Reason function returns reason value.

type EmptyReply

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

func (*EmptyReply) Descriptor deprecated

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

Deprecated: Use EmptyReply.ProtoReflect.Descriptor instead.

func (*EmptyReply) ProtoMessage

func (*EmptyReply) ProtoMessage()

func (*EmptyReply) ProtoReflect

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

func (*EmptyReply) Reset

func (x *EmptyReply) Reset()

func (*EmptyReply) String

func (x *EmptyReply) String() string

func (*EmptyReply) Validate

func (m *EmptyReply) Validate() error

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

func (m *EmptyReply) ValidateAll() error

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

type EmptyReplyMultiError

type EmptyReplyMultiError []error

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

func (EmptyReplyMultiError) AllErrors

func (m EmptyReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (EmptyReplyMultiError) Error

func (m EmptyReplyMultiError) Error() string

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

type EmptyReplyValidationError

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

EmptyReplyValidationError is the validation error returned by EmptyReply.Validate if the designated constraints aren't met.

func (EmptyReplyValidationError) Cause

func (e EmptyReplyValidationError) Cause() error

Cause function returns cause value.

func (EmptyReplyValidationError) Error

Error satisfies the builtin error interface

func (EmptyReplyValidationError) ErrorName

func (e EmptyReplyValidationError) ErrorName() string

ErrorName returns error name.

func (EmptyReplyValidationError) Field

Field function returns field value.

func (EmptyReplyValidationError) Key

Key function returns key value.

func (EmptyReplyValidationError) Reason

func (e EmptyReplyValidationError) Reason() string

Reason function returns reason value.

type EmptyRequest

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

func (*EmptyRequest) Descriptor deprecated

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

Deprecated: Use EmptyRequest.ProtoReflect.Descriptor instead.

func (*EmptyRequest) ProtoMessage

func (*EmptyRequest) ProtoMessage()

func (*EmptyRequest) ProtoReflect

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

func (*EmptyRequest) Reset

func (x *EmptyRequest) Reset()

func (*EmptyRequest) String

func (x *EmptyRequest) String() string

func (*EmptyRequest) Validate

func (m *EmptyRequest) Validate() error

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

func (m *EmptyRequest) ValidateAll() error

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

type EmptyRequestMultiError

type EmptyRequestMultiError []error

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

func (EmptyRequestMultiError) AllErrors

func (m EmptyRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (EmptyRequestMultiError) Error

func (m EmptyRequestMultiError) Error() string

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

type EmptyRequestValidationError

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

EmptyRequestValidationError is the validation error returned by EmptyRequest.Validate if the designated constraints aren't met.

func (EmptyRequestValidationError) Cause

Cause function returns cause value.

func (EmptyRequestValidationError) Error

Error satisfies the builtin error interface

func (EmptyRequestValidationError) ErrorName

func (e EmptyRequestValidationError) ErrorName() string

ErrorName returns error name.

func (EmptyRequestValidationError) Field

Field function returns field value.

func (EmptyRequestValidationError) Key

Key function returns key value.

func (EmptyRequestValidationError) Reason

Reason function returns reason value.

type GetCurrentUserReply

type GetCurrentUserReply struct {
	Username           string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Email              string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	PhoneNumber        string `protobuf:"bytes,3,opt,name=phoneNumber,proto3" json:"phoneNumber,omitempty"`
	NotificationNumber int64  `protobuf:"varint,4,opt,name=notificationNumber,proto3" json:"notificationNumber,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCurrentUserReply) Descriptor deprecated

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

Deprecated: Use GetCurrentUserReply.ProtoReflect.Descriptor instead.

func (*GetCurrentUserReply) GetEmail

func (x *GetCurrentUserReply) GetEmail() string

func (*GetCurrentUserReply) GetNotificationNumber

func (x *GetCurrentUserReply) GetNotificationNumber() int64

func (*GetCurrentUserReply) GetPhoneNumber

func (x *GetCurrentUserReply) GetPhoneNumber() string

func (*GetCurrentUserReply) GetUsername

func (x *GetCurrentUserReply) GetUsername() string

func (*GetCurrentUserReply) ProtoMessage

func (*GetCurrentUserReply) ProtoMessage()

func (*GetCurrentUserReply) ProtoReflect

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

func (*GetCurrentUserReply) Reset

func (x *GetCurrentUserReply) Reset()

func (*GetCurrentUserReply) String

func (x *GetCurrentUserReply) String() string

func (*GetCurrentUserReply) Validate

func (m *GetCurrentUserReply) Validate() error

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

func (m *GetCurrentUserReply) ValidateAll() error

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

type GetCurrentUserReplyMultiError

type GetCurrentUserReplyMultiError []error

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

func (GetCurrentUserReplyMultiError) AllErrors

func (m GetCurrentUserReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetCurrentUserReplyMultiError) Error

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

type GetCurrentUserReplyValidationError

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

GetCurrentUserReplyValidationError is the validation error returned by GetCurrentUserReply.Validate if the designated constraints aren't met.

func (GetCurrentUserReplyValidationError) Cause

Cause function returns cause value.

func (GetCurrentUserReplyValidationError) Error

Error satisfies the builtin error interface

func (GetCurrentUserReplyValidationError) ErrorName

ErrorName returns error name.

func (GetCurrentUserReplyValidationError) Field

Field function returns field value.

func (GetCurrentUserReplyValidationError) Key

Key function returns key value.

func (GetCurrentUserReplyValidationError) Reason

Reason function returns reason value.

type GetUserByUsernameRequest

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

func (*GetUserByUsernameRequest) Descriptor deprecated

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

Deprecated: Use GetUserByUsernameRequest.ProtoReflect.Descriptor instead.

func (*GetUserByUsernameRequest) GetUsername

func (x *GetUserByUsernameRequest) GetUsername() string

func (*GetUserByUsernameRequest) ProtoMessage

func (*GetUserByUsernameRequest) ProtoMessage()

func (*GetUserByUsernameRequest) ProtoReflect

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

func (*GetUserByUsernameRequest) Reset

func (x *GetUserByUsernameRequest) Reset()

func (*GetUserByUsernameRequest) String

func (x *GetUserByUsernameRequest) String() string

func (*GetUserByUsernameRequest) Validate

func (m *GetUserByUsernameRequest) Validate() error

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

func (m *GetUserByUsernameRequest) ValidateAll() error

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

type GetUserByUsernameRequestMultiError

type GetUserByUsernameRequestMultiError []error

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

func (GetUserByUsernameRequestMultiError) AllErrors

func (m GetUserByUsernameRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetUserByUsernameRequestMultiError) Error

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

type GetUserByUsernameRequestValidationError

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

GetUserByUsernameRequestValidationError is the validation error returned by GetUserByUsernameRequest.Validate if the designated constraints aren't met.

func (GetUserByUsernameRequestValidationError) Cause

Cause function returns cause value.

func (GetUserByUsernameRequestValidationError) Error

Error satisfies the builtin error interface

func (GetUserByUsernameRequestValidationError) ErrorName

ErrorName returns error name.

func (GetUserByUsernameRequestValidationError) Field

Field function returns field value.

func (GetUserByUsernameRequestValidationError) Key

Key function returns key value.

func (GetUserByUsernameRequestValidationError) Reason

Reason function returns reason value.

type LoginReply

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

func (*LoginReply) Descriptor deprecated

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

Deprecated: Use LoginReply.ProtoReflect.Descriptor instead.

func (*LoginReply) GetJwtToken

func (x *LoginReply) GetJwtToken() string

func (*LoginReply) ProtoMessage

func (*LoginReply) ProtoMessage()

func (*LoginReply) ProtoReflect

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

func (*LoginReply) Reset

func (x *LoginReply) Reset()

func (*LoginReply) String

func (x *LoginReply) String() string

func (*LoginReply) Validate

func (m *LoginReply) Validate() error

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

func (m *LoginReply) ValidateAll() error

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

type LoginReplyMultiError

type LoginReplyMultiError []error

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

func (LoginReplyMultiError) AllErrors

func (m LoginReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LoginReplyMultiError) Error

func (m LoginReplyMultiError) Error() string

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

type LoginReplyValidationError

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

LoginReplyValidationError is the validation error returned by LoginReply.Validate if the designated constraints aren't met.

func (LoginReplyValidationError) Cause

func (e LoginReplyValidationError) Cause() error

Cause function returns cause value.

func (LoginReplyValidationError) Error

Error satisfies the builtin error interface

func (LoginReplyValidationError) ErrorName

func (e LoginReplyValidationError) ErrorName() string

ErrorName returns error name.

func (LoginReplyValidationError) Field

Field function returns field value.

func (LoginReplyValidationError) Key

Key function returns key value.

func (LoginReplyValidationError) Reason

func (e LoginReplyValidationError) Reason() string

Reason function returns reason value.

type LoginRequest

type LoginRequest 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 (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) GetUsername

func (x *LoginRequest) GetUsername() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

func (*LoginRequest) Validate

func (m *LoginRequest) Validate() error

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

func (m *LoginRequest) ValidateAll() error

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

type LoginRequestMultiError

type LoginRequestMultiError []error

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

func (LoginRequestMultiError) AllErrors

func (m LoginRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LoginRequestMultiError) Error

func (m LoginRequestMultiError) Error() string

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

type LoginRequestValidationError

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

LoginRequestValidationError is the validation error returned by LoginRequest.Validate if the designated constraints aren't met.

func (LoginRequestValidationError) Cause

Cause function returns cause value.

func (LoginRequestValidationError) Error

Error satisfies the builtin error interface

func (LoginRequestValidationError) ErrorName

func (e LoginRequestValidationError) ErrorName() string

ErrorName returns error name.

func (LoginRequestValidationError) Field

Field function returns field value.

func (LoginRequestValidationError) Key

Key function returns key value.

func (LoginRequestValidationError) Reason

Reason function returns reason value.

type SignUpRequest

type SignUpRequest 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"`
	Email       string           `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	PhoneNumber string           `protobuf:"bytes,4,opt,name=phoneNumber,proto3" json:"phoneNumber,omitempty"`
	ExtraInfo   *structpb.Struct `protobuf:"bytes,5,opt,name=extraInfo,proto3" json:"extraInfo,omitempty"`
	// contains filtered or unexported fields
}

func (*SignUpRequest) Descriptor deprecated

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

Deprecated: Use SignUpRequest.ProtoReflect.Descriptor instead.

func (*SignUpRequest) GetEmail

func (x *SignUpRequest) GetEmail() string

func (*SignUpRequest) GetExtraInfo

func (x *SignUpRequest) GetExtraInfo() *structpb.Struct

func (*SignUpRequest) GetPassword

func (x *SignUpRequest) GetPassword() string

func (*SignUpRequest) GetPhoneNumber

func (x *SignUpRequest) GetPhoneNumber() string

func (*SignUpRequest) GetUsername

func (x *SignUpRequest) GetUsername() string

func (*SignUpRequest) ProtoMessage

func (*SignUpRequest) ProtoMessage()

func (*SignUpRequest) ProtoReflect

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

func (*SignUpRequest) Reset

func (x *SignUpRequest) Reset()

func (*SignUpRequest) String

func (x *SignUpRequest) String() string

func (*SignUpRequest) Validate

func (m *SignUpRequest) Validate() error

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

func (m *SignUpRequest) ValidateAll() error

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

type SignUpRequestMultiError

type SignUpRequestMultiError []error

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

func (SignUpRequestMultiError) AllErrors

func (m SignUpRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SignUpRequestMultiError) Error

func (m SignUpRequestMultiError) Error() string

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

type SignUpRequestValidationError

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

SignUpRequestValidationError is the validation error returned by SignUpRequest.Validate if the designated constraints aren't met.

func (SignUpRequestValidationError) Cause

Cause function returns cause value.

func (SignUpRequestValidationError) Error

Error satisfies the builtin error interface

func (SignUpRequestValidationError) ErrorName

func (e SignUpRequestValidationError) ErrorName() string

ErrorName returns error name.

func (SignUpRequestValidationError) Field

Field function returns field value.

func (SignUpRequestValidationError) Key

Key function returns key value.

func (SignUpRequestValidationError) Reason

Reason function returns reason value.

type UnimplementedUserServerServer

type UnimplementedUserServerServer struct {
}

UnimplementedUserServerServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServerServer) ChangePassword

func (UnimplementedUserServerServer) GetCurrentUser

func (UnimplementedUserServerServer) GetUserByUsername

func (UnimplementedUserServerServer) Login

func (UnimplementedUserServerServer) Logout

func (UnimplementedUserServerServer) SignUp

type UnsafeUserServerServer

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

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

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,omitempty"`
	Password    string           `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	Email       string           `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	PhoneNumber string           `protobuf:"bytes,5,opt,name=phoneNumber,proto3" json:"phoneNumber,omitempty"`
	ExtraInfo   *structpb.Struct `protobuf:"bytes,6,opt,name=extraInfo,proto3" json:"extraInfo,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetExtraInfo

func (x *User) GetExtraInfo() *structpb.Struct

func (*User) GetId

func (x *User) GetId() int64

func (*User) GetPassword

func (x *User) GetPassword() string

func (*User) GetPhoneNumber

func (x *User) GetPhoneNumber() string

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 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 UserServerClient

type UserServerClient interface {
	// user sign up
	SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*EmptyReply, error)
	// user login
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error)
	// logout
	Logout(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*EmptyReply, error)
	// get current user
	GetCurrentUser(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*GetCurrentUserReply, error)
	ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*EmptyReply, error)
	GetUserByUsername(ctx context.Context, in *GetUserByUsernameRequest, opts ...grpc.CallOption) (*User, error)
}

UserServerClient is the client API for UserServer 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 NewUserServerClient

func NewUserServerClient(cc grpc.ClientConnInterface) UserServerClient

type UserServerHTTPClient

type UserServerHTTPClient interface {
	ChangePassword(ctx context.Context, req *ChangePasswordRequest, opts ...http.CallOption) (rsp *EmptyReply, err error)
	GetCurrentUser(ctx context.Context, req *EmptyRequest, opts ...http.CallOption) (rsp *GetCurrentUserReply, err error)
	GetUserByUsername(ctx context.Context, req *GetUserByUsernameRequest, opts ...http.CallOption) (rsp *User, err error)
	Login(ctx context.Context, req *LoginRequest, opts ...http.CallOption) (rsp *LoginReply, err error)
	Logout(ctx context.Context, req *EmptyRequest, opts ...http.CallOption) (rsp *EmptyReply, err error)
	SignUp(ctx context.Context, req *SignUpRequest, opts ...http.CallOption) (rsp *EmptyReply, err error)
}

func NewUserServerHTTPClient

func NewUserServerHTTPClient(client *http.Client) UserServerHTTPClient

type UserServerHTTPClientImpl

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

func (*UserServerHTTPClientImpl) ChangePassword

func (*UserServerHTTPClientImpl) GetCurrentUser

func (*UserServerHTTPClientImpl) GetUserByUsername

func (c *UserServerHTTPClientImpl) GetUserByUsername(ctx context.Context, in *GetUserByUsernameRequest, opts ...http.CallOption) (*User, error)

func (*UserServerHTTPClientImpl) Login

func (*UserServerHTTPClientImpl) Logout

func (*UserServerHTTPClientImpl) SignUp

type UserServerHTTPServer

type UserServerHTTPServer interface {
	ChangePassword(context.Context, *ChangePasswordRequest) (*EmptyReply, error)
	// GetCurrentUser get current user
	GetCurrentUser(context.Context, *EmptyRequest) (*GetCurrentUserReply, error)
	GetUserByUsername(context.Context, *GetUserByUsernameRequest) (*User, error)
	// Login user login
	Login(context.Context, *LoginRequest) (*LoginReply, error)
	// Logout logout
	Logout(context.Context, *EmptyRequest) (*EmptyReply, error)
	// SignUp user sign up
	SignUp(context.Context, *SignUpRequest) (*EmptyReply, error)
}

type UserServerServer

type UserServerServer interface {
	// user sign up
	SignUp(context.Context, *SignUpRequest) (*EmptyReply, error)
	// user login
	Login(context.Context, *LoginRequest) (*LoginReply, error)
	// logout
	Logout(context.Context, *EmptyRequest) (*EmptyReply, error)
	// get current user
	GetCurrentUser(context.Context, *EmptyRequest) (*GetCurrentUserReply, error)
	ChangePassword(context.Context, *ChangePasswordRequest) (*EmptyReply, error)
	GetUserByUsername(context.Context, *GetUserByUsernameRequest) (*User, error)
	// contains filtered or unexported methods
}

UserServerServer is the server API for UserServer service. All implementations must embed UnimplementedUserServerServer 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