Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type ActivateUserRequest
- func (*ActivateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ActivateUserRequest) GetActivationToken() string
- func (x *ActivateUserRequest) GetUserId() string
- func (*ActivateUserRequest) ProtoMessage()
- func (x *ActivateUserRequest) ProtoReflect() protoreflect.Message
- func (x *ActivateUserRequest) Reset()
- func (x *ActivateUserRequest) String() string
- type ActivateUserResponse
- func (*ActivateUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ActivateUserResponse) GetMessage() string
- func (*ActivateUserResponse) ProtoMessage()
- func (x *ActivateUserResponse) ProtoReflect() protoreflect.Message
- func (x *ActivateUserResponse) Reset()
- func (x *ActivateUserResponse) String() string
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetEmail() string
- func (x *CreateUserRequest) GetFullName() string
- func (x *CreateUserRequest) GetPassword() string
- func (x *CreateUserRequest) GetPasswordConfirm() string
- func (x *CreateUserRequest) GetRoles() []string
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- type CreateUserResponse
- type GetUserRequest
- type GetUserResponse
- type LoginUserRequest
- func (*LoginUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginUserRequest) GetEmail() string
- func (x *LoginUserRequest) GetPassword() string
- func (*LoginUserRequest) ProtoMessage()
- func (x *LoginUserRequest) ProtoReflect() protoreflect.Message
- func (x *LoginUserRequest) Reset()
- func (x *LoginUserRequest) String() string
- type LoginUserResponse
- func (*LoginUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginUserResponse) GetAccessToken() string
- func (*LoginUserResponse) ProtoMessage()
- func (x *LoginUserResponse) ProtoReflect() protoreflect.Message
- func (x *LoginUserResponse) Reset()
- func (x *LoginUserResponse) String() string
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) ActivateUser(context.Context, *ActivateUserRequest) (*ActivateUserResponse, error)
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
- func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
- func (UnimplementedUserServiceServer) LoginUser(context.Context, *LoginUserRequest) (*LoginUserResponse, error)
- func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error)
- type UnsafeUserServiceServer
- type UpdateUserRequest
- func (*UpdateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserRequest) GetAvatar() string
- func (x *UpdateUserRequest) GetConfirmNewPassword() string
- func (x *UpdateUserRequest) GetFullName() string
- func (x *UpdateUserRequest) GetNewPassword() string
- func (x *UpdateUserRequest) GetOldPassword() string
- func (*UpdateUserRequest) ProtoMessage()
- func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateUserRequest) Reset()
- func (x *UpdateUserRequest) String() string
- type UpdateUserResponse
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetActivated() bool
- func (x *User) GetAvatar() string
- func (x *User) GetDateCreated() string
- func (x *User) GetDateUpdated() string
- func (x *User) GetEmail() string
- func (x *User) GetFullName() string
- func (x *User) GetId() string
- func (x *User) GetRoles() []string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserServiceClient
- type UserServiceServer
Constants ¶
const ( UserService_CreateUser_FullMethodName = "/gus.UserService/CreateUser" UserService_LoginUser_FullMethodName = "/gus.UserService/LoginUser" UserService_UpdateUser_FullMethodName = "/gus.UserService/UpdateUser" UserService_ActivateUser_FullMethodName = "/gus.UserService/ActivateUser" UserService_GetUser_FullMethodName = "/gus.UserService/GetUser" )
Variables ¶
var File_rpc_activate_user_proto protoreflect.FileDescriptor
var File_rpc_create_user_proto protoreflect.FileDescriptor
var File_rpc_get_user_proto protoreflect.FileDescriptor
var File_rpc_login_user_proto protoreflect.FileDescriptor
var File_rpc_update_user_proto protoreflect.FileDescriptor
var File_service_user_service_proto protoreflect.FileDescriptor
var File_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gus.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "LoginUser", Handler: _UserService_LoginUser_Handler, }, { MethodName: "UpdateUser", Handler: _UserService_UpdateUser_Handler, }, { MethodName: "ActivateUser", Handler: _UserService_ActivateUser_Handler, }, { MethodName: "GetUser", Handler: _UserService_GetUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "service_user_service.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 ActivateUserRequest ¶
type ActivateUserRequest struct { ActivationToken string `protobuf:"bytes,1,opt,name=activationToken,proto3" json:"activationToken,omitempty"` UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` // contains filtered or unexported fields }
func (*ActivateUserRequest) Descriptor
deprecated
func (*ActivateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use ActivateUserRequest.ProtoReflect.Descriptor instead.
func (*ActivateUserRequest) GetActivationToken ¶
func (x *ActivateUserRequest) GetActivationToken() string
func (*ActivateUserRequest) GetUserId ¶
func (x *ActivateUserRequest) GetUserId() string
func (*ActivateUserRequest) ProtoMessage ¶
func (*ActivateUserRequest) ProtoMessage()
func (*ActivateUserRequest) ProtoReflect ¶
func (x *ActivateUserRequest) ProtoReflect() protoreflect.Message
func (*ActivateUserRequest) Reset ¶
func (x *ActivateUserRequest) Reset()
func (*ActivateUserRequest) String ¶
func (x *ActivateUserRequest) String() string
type ActivateUserResponse ¶
type ActivateUserResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ActivateUserResponse) Descriptor
deprecated
func (*ActivateUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use ActivateUserResponse.ProtoReflect.Descriptor instead.
func (*ActivateUserResponse) GetMessage ¶
func (x *ActivateUserResponse) GetMessage() string
func (*ActivateUserResponse) ProtoMessage ¶
func (*ActivateUserResponse) ProtoMessage()
func (*ActivateUserResponse) ProtoReflect ¶
func (x *ActivateUserResponse) ProtoReflect() protoreflect.Message
func (*ActivateUserResponse) Reset ¶
func (x *ActivateUserResponse) Reset()
func (*ActivateUserResponse) String ¶
func (x *ActivateUserResponse) String() string
type CreateUserRequest ¶
type CreateUserRequest struct { FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Roles []string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` PasswordConfirm string `protobuf:"bytes,5,opt,name=passwordConfirm,proto3" json:"passwordConfirm,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) GetFullName ¶
func (x *CreateUserRequest) GetFullName() string
func (*CreateUserRequest) GetPassword ¶
func (x *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) GetPasswordConfirm ¶
func (x *CreateUserRequest) GetPasswordConfirm() string
func (*CreateUserRequest) GetRoles ¶
func (x *CreateUserRequest) GetRoles() []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
type CreateUserResponse ¶
type CreateUserResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*CreateUserResponse) Descriptor
deprecated
func (*CreateUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.
func (*CreateUserResponse) GetUser ¶
func (x *CreateUserResponse) GetUser() *User
func (*CreateUserResponse) ProtoMessage ¶
func (*CreateUserResponse) ProtoMessage()
func (*CreateUserResponse) ProtoReflect ¶
func (x *CreateUserResponse) ProtoReflect() protoreflect.Message
func (*CreateUserResponse) Reset ¶
func (x *CreateUserResponse) Reset()
func (*CreateUserResponse) String ¶
func (x *CreateUserResponse) String() string
type GetUserRequest ¶
type GetUserRequest struct {
// contains filtered or unexported fields
}
func (*GetUserRequest) Descriptor
deprecated
func (*GetUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) ProtoReflect ¶
func (x *GetUserRequest) ProtoReflect() protoreflect.Message
func (*GetUserRequest) Reset ¶
func (x *GetUserRequest) Reset()
func (*GetUserRequest) String ¶
func (x *GetUserRequest) String() string
type GetUserResponse ¶
type GetUserResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*GetUserResponse) Descriptor
deprecated
func (*GetUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.
func (*GetUserResponse) GetUser ¶
func (x *GetUserResponse) GetUser() *User
func (*GetUserResponse) ProtoMessage ¶
func (*GetUserResponse) ProtoMessage()
func (*GetUserResponse) ProtoReflect ¶
func (x *GetUserResponse) ProtoReflect() protoreflect.Message
func (*GetUserResponse) Reset ¶
func (x *GetUserResponse) Reset()
func (*GetUserResponse) String ¶
func (x *GetUserResponse) String() string
type LoginUserRequest ¶
type LoginUserRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*LoginUserRequest) Descriptor
deprecated
func (*LoginUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginUserRequest.ProtoReflect.Descriptor instead.
func (*LoginUserRequest) GetEmail ¶
func (x *LoginUserRequest) GetEmail() string
func (*LoginUserRequest) GetPassword ¶
func (x *LoginUserRequest) GetPassword() string
func (*LoginUserRequest) ProtoMessage ¶
func (*LoginUserRequest) ProtoMessage()
func (*LoginUserRequest) ProtoReflect ¶
func (x *LoginUserRequest) ProtoReflect() protoreflect.Message
func (*LoginUserRequest) Reset ¶
func (x *LoginUserRequest) Reset()
func (*LoginUserRequest) String ¶
func (x *LoginUserRequest) String() string
type LoginUserResponse ¶
type LoginUserResponse struct { AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` // contains filtered or unexported fields }
func (*LoginUserResponse) Descriptor
deprecated
func (*LoginUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginUserResponse.ProtoReflect.Descriptor instead.
func (*LoginUserResponse) GetAccessToken ¶
func (x *LoginUserResponse) GetAccessToken() string
func (*LoginUserResponse) ProtoMessage ¶
func (*LoginUserResponse) ProtoMessage()
func (*LoginUserResponse) ProtoReflect ¶
func (x *LoginUserResponse) ProtoReflect() protoreflect.Message
func (*LoginUserResponse) Reset ¶
func (x *LoginUserResponse) Reset()
func (*LoginUserResponse) String ¶
func (x *LoginUserResponse) String() string
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) ActivateUser ¶
func (UnimplementedUserServiceServer) ActivateUser(context.Context, *ActivateUserRequest) (*ActivateUserResponse, error)
func (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
func (UnimplementedUserServiceServer) GetUser ¶
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
func (UnimplementedUserServiceServer) LoginUser ¶
func (UnimplementedUserServiceServer) LoginUser(context.Context, *LoginUserRequest) (*LoginUserResponse, error)
func (UnimplementedUserServiceServer) UpdateUser ¶
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error)
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 { FullName string `protobuf:"bytes,1,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"` Avatar string `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"` OldPassword string `protobuf:"bytes,3,opt,name=old_password,json=oldPassword,proto3" json:"old_password,omitempty"` NewPassword string `protobuf:"bytes,4,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` ConfirmNewPassword string `protobuf:"bytes,5,opt,name=confirm_new_password,json=confirmNewPassword,proto3" json:"confirm_new_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) GetConfirmNewPassword ¶
func (x *UpdateUserRequest) GetConfirmNewPassword() string
func (*UpdateUserRequest) GetFullName ¶
func (x *UpdateUserRequest) GetFullName() string
func (*UpdateUserRequest) GetNewPassword ¶
func (x *UpdateUserRequest) GetNewPassword() string
func (*UpdateUserRequest) GetOldPassword ¶
func (x *UpdateUserRequest) GetOldPassword() string
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
type UpdateUserResponse ¶
type UpdateUserResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserResponse) Descriptor
deprecated
func (*UpdateUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserResponse.ProtoReflect.Descriptor instead.
func (*UpdateUserResponse) GetUser ¶
func (x *UpdateUserResponse) GetUser() *User
func (*UpdateUserResponse) ProtoMessage ¶
func (*UpdateUserResponse) ProtoMessage()
func (*UpdateUserResponse) ProtoReflect ¶
func (x *UpdateUserResponse) ProtoReflect() protoreflect.Message
func (*UpdateUserResponse) Reset ¶
func (x *UpdateUserResponse) Reset()
func (*UpdateUserResponse) String ¶
func (x *UpdateUserResponse) String() string
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` FullName string `protobuf:"bytes,2,opt,name=fullName,proto3" json:"fullName,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Roles []string `protobuf:"bytes,4,rep,name=roles,proto3" json:"roles,omitempty"` // PasswordHash is excluded because it's private (json:"-") Activated bool `protobuf:"varint,5,opt,name=activated,proto3" json:"activated,omitempty"` DateCreated string `protobuf:"bytes,7,opt,name=dateCreated,proto3" json:"dateCreated,omitempty"` DateUpdated string `protobuf:"bytes,8,opt,name=dateUpdated,proto3" json:"dateUpdated,omitempty"` Avatar string `protobuf:"bytes,9,opt,name=avatar,proto3" json:"avatar,omitempty"` // contains filtered or unexported fields }
AppUser represents information about an individual user.
func (*User) Descriptor
deprecated
func (*User) GetActivated ¶
func (*User) GetDateCreated ¶
func (*User) GetDateUpdated ¶
func (*User) GetFullName ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserServiceClient ¶
type UserServiceClient interface { CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) LoginUser(ctx context.Context, in *LoginUserRequest, opts ...grpc.CallOption) (*LoginUserResponse, error) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) ActivateUser(ctx context.Context, in *ActivateUserRequest, opts ...grpc.CallOption) (*ActivateUserResponse, error) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, 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.
func NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) LoginUser(context.Context, *LoginUserRequest) (*LoginUserResponse, error) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) ActivateUser(context.Context, *ActivateUserRequest) (*ActivateUserResponse, error) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) }
UserServiceServer is the server API for UserService service. All implementations should embed UnimplementedUserServiceServer for forward compatibility