Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterUserServerHTTPServer(s *http.Server, srv UserServerHTTPServer)
- func RegisterUserServerServer(s grpc.ServiceRegistrar, srv UserServerServer)
- type ChangePasswordRequest
- func (*ChangePasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChangePasswordRequest) GetCurrentPassword() string
- func (x *ChangePasswordRequest) GetNewPassword() string
- func (x *ChangePasswordRequest) GetUsername() string
- func (*ChangePasswordRequest) ProtoMessage()
- func (x *ChangePasswordRequest) ProtoReflect() protoreflect.Message
- func (x *ChangePasswordRequest) Reset()
- func (x *ChangePasswordRequest) String() string
- func (m *ChangePasswordRequest) Validate() error
- func (m *ChangePasswordRequest) ValidateAll() error
- type ChangePasswordRequestMultiError
- type ChangePasswordRequestValidationError
- func (e ChangePasswordRequestValidationError) Cause() error
- func (e ChangePasswordRequestValidationError) Error() string
- func (e ChangePasswordRequestValidationError) ErrorName() string
- func (e ChangePasswordRequestValidationError) Field() string
- func (e ChangePasswordRequestValidationError) Key() bool
- func (e ChangePasswordRequestValidationError) Reason() string
- type EmptyReply
- type EmptyReplyMultiError
- type EmptyReplyValidationError
- type EmptyRequest
- func (*EmptyRequest) Descriptor() ([]byte, []int)deprecated
- func (*EmptyRequest) ProtoMessage()
- func (x *EmptyRequest) ProtoReflect() protoreflect.Message
- func (x *EmptyRequest) Reset()
- func (x *EmptyRequest) String() string
- func (m *EmptyRequest) Validate() error
- func (m *EmptyRequest) ValidateAll() error
- type EmptyRequestMultiError
- type EmptyRequestValidationError
- func (e EmptyRequestValidationError) Cause() error
- func (e EmptyRequestValidationError) Error() string
- func (e EmptyRequestValidationError) ErrorName() string
- func (e EmptyRequestValidationError) Field() string
- func (e EmptyRequestValidationError) Key() bool
- func (e EmptyRequestValidationError) Reason() string
- type GetCurrentUserReply
- func (*GetCurrentUserReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetCurrentUserReply) GetEmail() string
- func (x *GetCurrentUserReply) GetNotificationNumber() int64
- func (x *GetCurrentUserReply) GetPhoneNumber() string
- func (x *GetCurrentUserReply) GetUsername() string
- func (*GetCurrentUserReply) ProtoMessage()
- func (x *GetCurrentUserReply) ProtoReflect() protoreflect.Message
- func (x *GetCurrentUserReply) Reset()
- func (x *GetCurrentUserReply) String() string
- func (m *GetCurrentUserReply) Validate() error
- func (m *GetCurrentUserReply) ValidateAll() error
- type GetCurrentUserReplyMultiError
- type GetCurrentUserReplyValidationError
- func (e GetCurrentUserReplyValidationError) Cause() error
- func (e GetCurrentUserReplyValidationError) Error() string
- func (e GetCurrentUserReplyValidationError) ErrorName() string
- func (e GetCurrentUserReplyValidationError) Field() string
- func (e GetCurrentUserReplyValidationError) Key() bool
- func (e GetCurrentUserReplyValidationError) Reason() string
- type GetUserByUsernameRequest
- func (*GetUserByUsernameRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserByUsernameRequest) GetUsername() string
- func (*GetUserByUsernameRequest) ProtoMessage()
- func (x *GetUserByUsernameRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserByUsernameRequest) Reset()
- func (x *GetUserByUsernameRequest) String() string
- func (m *GetUserByUsernameRequest) Validate() error
- func (m *GetUserByUsernameRequest) ValidateAll() error
- type GetUserByUsernameRequestMultiError
- type GetUserByUsernameRequestValidationError
- func (e GetUserByUsernameRequestValidationError) Cause() error
- func (e GetUserByUsernameRequestValidationError) Error() string
- func (e GetUserByUsernameRequestValidationError) ErrorName() string
- func (e GetUserByUsernameRequestValidationError) Field() string
- func (e GetUserByUsernameRequestValidationError) Key() bool
- func (e GetUserByUsernameRequestValidationError) Reason() string
- type LoginReply
- func (*LoginReply) Descriptor() ([]byte, []int)deprecated
- func (x *LoginReply) GetJwtToken() string
- func (*LoginReply) ProtoMessage()
- func (x *LoginReply) ProtoReflect() protoreflect.Message
- func (x *LoginReply) Reset()
- func (x *LoginReply) String() string
- func (m *LoginReply) Validate() error
- func (m *LoginReply) ValidateAll() error
- type LoginReplyMultiError
- type LoginReplyValidationError
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetPassword() string
- func (x *LoginRequest) GetUsername() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- func (m *LoginRequest) Validate() error
- func (m *LoginRequest) ValidateAll() error
- type LoginRequestMultiError
- type LoginRequestValidationError
- func (e LoginRequestValidationError) Cause() error
- func (e LoginRequestValidationError) Error() string
- func (e LoginRequestValidationError) ErrorName() string
- func (e LoginRequestValidationError) Field() string
- func (e LoginRequestValidationError) Key() bool
- func (e LoginRequestValidationError) Reason() string
- type SignUpRequest
- func (*SignUpRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignUpRequest) GetEmail() string
- func (x *SignUpRequest) GetExtraInfo() *structpb.Struct
- func (x *SignUpRequest) GetPassword() string
- func (x *SignUpRequest) GetPhoneNumber() string
- func (x *SignUpRequest) GetUsername() string
- func (*SignUpRequest) ProtoMessage()
- func (x *SignUpRequest) ProtoReflect() protoreflect.Message
- func (x *SignUpRequest) Reset()
- func (x *SignUpRequest) String() string
- func (m *SignUpRequest) Validate() error
- func (m *SignUpRequest) ValidateAll() error
- type SignUpRequestMultiError
- type SignUpRequestValidationError
- func (e SignUpRequestValidationError) Cause() error
- func (e SignUpRequestValidationError) Error() string
- func (e SignUpRequestValidationError) ErrorName() string
- func (e SignUpRequestValidationError) Field() string
- func (e SignUpRequestValidationError) Key() bool
- func (e SignUpRequestValidationError) Reason() string
- type UnimplementedUserServerServer
- func (UnimplementedUserServerServer) ChangePassword(context.Context, *ChangePasswordRequest) (*EmptyReply, error)
- func (UnimplementedUserServerServer) GetCurrentUser(context.Context, *EmptyRequest) (*GetCurrentUserReply, error)
- func (UnimplementedUserServerServer) GetUserByUsername(context.Context, *GetUserByUsernameRequest) (*User, error)
- func (UnimplementedUserServerServer) Login(context.Context, *LoginRequest) (*LoginReply, error)
- func (UnimplementedUserServerServer) Logout(context.Context, *EmptyRequest) (*EmptyReply, error)
- func (UnimplementedUserServerServer) SignUp(context.Context, *SignUpRequest) (*EmptyReply, error)
- type UnsafeUserServerServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetEmail() string
- func (x *User) GetExtraInfo() *structpb.Struct
- func (x *User) GetId() int64
- func (x *User) GetPassword() string
- func (x *User) GetPhoneNumber() string
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- func (m *User) Validate() error
- func (m *User) ValidateAll() error
- type UserMultiError
- type UserServerClient
- type UserServerHTTPClient
- type UserServerHTTPClientImpl
- func (c *UserServerHTTPClientImpl) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...http.CallOption) (*EmptyReply, error)
- func (c *UserServerHTTPClientImpl) GetCurrentUser(ctx context.Context, in *EmptyRequest, opts ...http.CallOption) (*GetCurrentUserReply, error)
- func (c *UserServerHTTPClientImpl) GetUserByUsername(ctx context.Context, in *GetUserByUsernameRequest, opts ...http.CallOption) (*User, error)
- func (c *UserServerHTTPClientImpl) Login(ctx context.Context, in *LoginRequest, opts ...http.CallOption) (*LoginReply, error)
- func (c *UserServerHTTPClientImpl) Logout(ctx context.Context, in *EmptyRequest, opts ...http.CallOption) (*EmptyReply, error)
- func (c *UserServerHTTPClientImpl) SignUp(ctx context.Context, in *SignUpRequest, opts ...http.CallOption) (*EmptyReply, error)
- type UserServerHTTPServer
- type UserServerServer
- type UserValidationError
Constants ¶
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" )
const OperationUserServerChangePassword = "/api.user.v1.UserServer/ChangePassword"
const OperationUserServerGetCurrentUser = "/api.user.v1.UserServer/GetCurrentUser"
const OperationUserServerGetUserByUsername = "/api.user.v1.UserServer/GetUserByUsername"
const OperationUserServerLogin = "/api.user.v1.UserServer/Login"
const OperationUserServerLogout = "/api.user.v1.UserServer/Logout"
const OperationUserServerSignUp = "/api.user.v1.UserServer/SignUp"
Variables ¶
var File_user_v1_user_proto protoreflect.FileDescriptor
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 ¶
func (m ChangePasswordRequestMultiError) Error() string
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 ¶
func (e ChangePasswordRequestValidationError) Cause() error
Cause function returns cause value.
func (ChangePasswordRequestValidationError) Error ¶
func (e ChangePasswordRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ChangePasswordRequestValidationError) ErrorName ¶
func (e ChangePasswordRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ChangePasswordRequestValidationError) Field ¶
func (e ChangePasswordRequestValidationError) Field() string
Field function returns field value.
func (ChangePasswordRequestValidationError) Key ¶
func (e ChangePasswordRequestValidationError) Key() bool
Key function returns key value.
func (ChangePasswordRequestValidationError) Reason ¶
func (e ChangePasswordRequestValidationError) Reason() string
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 ¶
func (e EmptyReplyValidationError) Error() string
Error satisfies the builtin error interface
func (EmptyReplyValidationError) ErrorName ¶
func (e EmptyReplyValidationError) ErrorName() string
ErrorName returns error name.
func (EmptyReplyValidationError) Field ¶
func (e EmptyReplyValidationError) Field() string
Field function returns field value.
func (EmptyReplyValidationError) Key ¶
func (e EmptyReplyValidationError) Key() bool
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 ¶
func (e EmptyRequestValidationError) Cause() error
Cause function returns cause value.
func (EmptyRequestValidationError) Error ¶
func (e EmptyRequestValidationError) Error() string
Error satisfies the builtin error interface
func (EmptyRequestValidationError) ErrorName ¶
func (e EmptyRequestValidationError) ErrorName() string
ErrorName returns error name.
func (EmptyRequestValidationError) Field ¶
func (e EmptyRequestValidationError) Field() string
Field function returns field value.
func (EmptyRequestValidationError) Key ¶
func (e EmptyRequestValidationError) Key() bool
Key function returns key value.
func (EmptyRequestValidationError) Reason ¶
func (e EmptyRequestValidationError) Reason() string
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 ¶
func (m GetCurrentUserReplyMultiError) Error() string
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 ¶
func (e GetCurrentUserReplyValidationError) Cause() error
Cause function returns cause value.
func (GetCurrentUserReplyValidationError) Error ¶
func (e GetCurrentUserReplyValidationError) Error() string
Error satisfies the builtin error interface
func (GetCurrentUserReplyValidationError) ErrorName ¶
func (e GetCurrentUserReplyValidationError) ErrorName() string
ErrorName returns error name.
func (GetCurrentUserReplyValidationError) Field ¶
func (e GetCurrentUserReplyValidationError) Field() string
Field function returns field value.
func (GetCurrentUserReplyValidationError) Key ¶
func (e GetCurrentUserReplyValidationError) Key() bool
Key function returns key value.
func (GetCurrentUserReplyValidationError) Reason ¶
func (e GetCurrentUserReplyValidationError) Reason() string
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 ¶
func (m GetUserByUsernameRequestMultiError) Error() string
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 ¶
func (e GetUserByUsernameRequestValidationError) Cause() error
Cause function returns cause value.
func (GetUserByUsernameRequestValidationError) Error ¶
func (e GetUserByUsernameRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetUserByUsernameRequestValidationError) ErrorName ¶
func (e GetUserByUsernameRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetUserByUsernameRequestValidationError) Field ¶
func (e GetUserByUsernameRequestValidationError) Field() string
Field function returns field value.
func (GetUserByUsernameRequestValidationError) Key ¶
func (e GetUserByUsernameRequestValidationError) Key() bool
Key function returns key value.
func (GetUserByUsernameRequestValidationError) Reason ¶
func (e GetUserByUsernameRequestValidationError) Reason() string
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 ¶
func (e LoginReplyValidationError) Error() string
Error satisfies the builtin error interface
func (LoginReplyValidationError) ErrorName ¶
func (e LoginReplyValidationError) ErrorName() string
ErrorName returns error name.
func (LoginReplyValidationError) Field ¶
func (e LoginReplyValidationError) Field() string
Field function returns field value.
func (LoginReplyValidationError) Key ¶
func (e LoginReplyValidationError) Key() bool
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 ¶
func (e LoginRequestValidationError) Cause() error
Cause function returns cause value.
func (LoginRequestValidationError) Error ¶
func (e LoginRequestValidationError) Error() string
Error satisfies the builtin error interface
func (LoginRequestValidationError) ErrorName ¶
func (e LoginRequestValidationError) ErrorName() string
ErrorName returns error name.
func (LoginRequestValidationError) Field ¶
func (e LoginRequestValidationError) Field() string
Field function returns field value.
func (LoginRequestValidationError) Key ¶
func (e LoginRequestValidationError) Key() bool
Key function returns key value.
func (LoginRequestValidationError) Reason ¶
func (e LoginRequestValidationError) Reason() string
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 ¶
func (e SignUpRequestValidationError) Cause() error
Cause function returns cause value.
func (SignUpRequestValidationError) Error ¶
func (e SignUpRequestValidationError) Error() string
Error satisfies the builtin error interface
func (SignUpRequestValidationError) ErrorName ¶
func (e SignUpRequestValidationError) ErrorName() string
ErrorName returns error name.
func (SignUpRequestValidationError) Field ¶
func (e SignUpRequestValidationError) Field() string
Field function returns field value.
func (SignUpRequestValidationError) Key ¶
func (e SignUpRequestValidationError) Key() bool
Key function returns key value.
func (SignUpRequestValidationError) Reason ¶
func (e SignUpRequestValidationError) Reason() string
Reason function returns reason value.
type UnimplementedUserServerServer ¶
type UnimplementedUserServerServer struct { }
UnimplementedUserServerServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServerServer) ChangePassword ¶
func (UnimplementedUserServerServer) ChangePassword(context.Context, *ChangePasswordRequest) (*EmptyReply, error)
func (UnimplementedUserServerServer) GetCurrentUser ¶
func (UnimplementedUserServerServer) GetCurrentUser(context.Context, *EmptyRequest) (*GetCurrentUserReply, error)
func (UnimplementedUserServerServer) GetUserByUsername ¶
func (UnimplementedUserServerServer) GetUserByUsername(context.Context, *GetUserByUsernameRequest) (*User, error)
func (UnimplementedUserServerServer) Login ¶
func (UnimplementedUserServerServer) Login(context.Context, *LoginRequest) (*LoginReply, error)
func (UnimplementedUserServerServer) Logout ¶
func (UnimplementedUserServerServer) Logout(context.Context, *EmptyRequest) (*EmptyReply, error)
func (UnimplementedUserServerServer) SignUp ¶
func (UnimplementedUserServerServer) SignUp(context.Context, *SignUpRequest) (*EmptyReply, error)
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) GetExtraInfo ¶
func (*User) GetPassword ¶
func (*User) GetPhoneNumber ¶
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
func (*User) Validate ¶
Validate checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*User) ValidateAll ¶
ValidateAll checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserMultiError, or nil if none found.
type UserMultiError ¶
type UserMultiError []error
UserMultiError is an error wrapping multiple validation errors returned by User.ValidateAll() if the designated constraints aren't met.
func (UserMultiError) AllErrors ¶
func (m UserMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserMultiError) Error ¶
func (m UserMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type 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 (c *UserServerHTTPClientImpl) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...http.CallOption) (*EmptyReply, error)
func (*UserServerHTTPClientImpl) GetCurrentUser ¶
func (c *UserServerHTTPClientImpl) GetCurrentUser(ctx context.Context, in *EmptyRequest, opts ...http.CallOption) (*GetCurrentUserReply, error)
func (*UserServerHTTPClientImpl) GetUserByUsername ¶
func (c *UserServerHTTPClientImpl) GetUserByUsername(ctx context.Context, in *GetUserByUsernameRequest, opts ...http.CallOption) (*User, error)
func (*UserServerHTTPClientImpl) Login ¶
func (c *UserServerHTTPClientImpl) Login(ctx context.Context, in *LoginRequest, opts ...http.CallOption) (*LoginReply, error)
func (*UserServerHTTPClientImpl) Logout ¶
func (c *UserServerHTTPClientImpl) Logout(ctx context.Context, in *EmptyRequest, opts ...http.CallOption) (*EmptyReply, error)
func (*UserServerHTTPClientImpl) SignUp ¶
func (c *UserServerHTTPClientImpl) SignUp(ctx context.Context, in *SignUpRequest, opts ...http.CallOption) (*EmptyReply, error)
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.