Documentation ¶
Index ¶
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetEmail() string
- func (x *CreateUserRequest) GetPassword() string
- func (x *CreateUserRequest) GetUsername() string
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- type DeleteUserByIdRequest
- func (*DeleteUserByIdRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteUserByIdRequest) GetId() string
- func (*DeleteUserByIdRequest) ProtoMessage()
- func (x *DeleteUserByIdRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteUserByIdRequest) Reset()
- func (x *DeleteUserByIdRequest) String() string
- type DeleteUserByIdResponse
- func (*DeleteUserByIdResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteUserByIdResponse) GetMessage() string
- func (*DeleteUserByIdResponse) ProtoMessage()
- func (x *DeleteUserByIdResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteUserByIdResponse) Reset()
- func (x *DeleteUserByIdResponse) String() string
- type GetAllUsersRequest
- type GetAllUsersResponse
- func (*GetAllUsersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAllUsersResponse) GetUsers() []*User
- func (*GetAllUsersResponse) ProtoMessage()
- func (x *GetAllUsersResponse) ProtoReflect() protoreflect.Message
- func (x *GetAllUsersResponse) Reset()
- func (x *GetAllUsersResponse) String() string
- type GetUserByEmailRequest
- func (*GetUserByEmailRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserByEmailRequest) GetEmail() string
- func (*GetUserByEmailRequest) ProtoMessage()
- func (x *GetUserByEmailRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserByEmailRequest) Reset()
- func (x *GetUserByEmailRequest) String() string
- type GetUserByIdRequest
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*User, error)
- func (UnimplementedUserServiceServer) DeleteUserById(context.Context, *DeleteUserByIdRequest) (*DeleteUserByIdResponse, error)
- func (UnimplementedUserServiceServer) GetAllUsers(context.Context, *GetAllUsersRequest) (*GetAllUsersResponse, error)
- func (UnimplementedUserServiceServer) GetUserByEmail(context.Context, *GetUserByEmailRequest) (*User, error)
- func (UnimplementedUserServiceServer) GetUserById(context.Context, *GetUserByIdRequest) (*User, error)
- func (UnimplementedUserServiceServer) UpdateUserById(context.Context, *UpdateUserByIdRequest) (*User, error)
- type UnsafeUserServiceServer
- type UpdateUserByIdRequest
- func (*UpdateUserByIdRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserByIdRequest) GetEmail() string
- func (x *UpdateUserByIdRequest) GetId() string
- func (x *UpdateUserByIdRequest) GetIsBanned() bool
- func (x *UpdateUserByIdRequest) GetPassword() string
- func (x *UpdateUserByIdRequest) GetRoles() []string
- func (x *UpdateUserByIdRequest) GetUsername() string
- func (x *UpdateUserByIdRequest) GetXp() int32
- func (*UpdateUserByIdRequest) ProtoMessage()
- func (x *UpdateUserByIdRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateUserByIdRequest) Reset()
- func (x *UpdateUserByIdRequest) String() string
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCreatedAt() *timestamp.Timestamp
- func (x *User) GetEmail() string
- func (x *User) GetId() string
- func (x *User) GetIsBanned() bool
- func (x *User) GetRoles() []string
- func (x *User) GetUpdatedAt() *timestamp.Timestamp
- func (x *User) GetUsername() string
- func (x *User) GetXp() int32
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserServiceClient
- type UserServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "GetAllUsers", Handler: _UserService_GetAllUsers_Handler, }, { MethodName: "GetUserById", Handler: _UserService_GetUserById_Handler, }, { MethodName: "GetUserByEmail", Handler: _UserService_GetUserByEmail_Handler, }, { MethodName: "UpdateUserById", Handler: _UserService_UpdateUserById_Handler, }, { MethodName: "DeleteUserById", Handler: _UserService_DeleteUserById_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetEmail ¶
func (x *CreateUserRequest) GetEmail() string
func (*CreateUserRequest) GetPassword ¶
func (x *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) GetUsername ¶
func (x *CreateUserRequest) GetUsername() 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 DeleteUserByIdRequest ¶
type DeleteUserByIdRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteUserByIdRequest) Descriptor
deprecated
func (*DeleteUserByIdRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserByIdRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserByIdRequest) GetId ¶
func (x *DeleteUserByIdRequest) GetId() string
func (*DeleteUserByIdRequest) ProtoMessage ¶
func (*DeleteUserByIdRequest) ProtoMessage()
func (*DeleteUserByIdRequest) ProtoReflect ¶
func (x *DeleteUserByIdRequest) ProtoReflect() protoreflect.Message
func (*DeleteUserByIdRequest) Reset ¶
func (x *DeleteUserByIdRequest) Reset()
func (*DeleteUserByIdRequest) String ¶
func (x *DeleteUserByIdRequest) String() string
type DeleteUserByIdResponse ¶
type DeleteUserByIdResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*DeleteUserByIdResponse) Descriptor
deprecated
func (*DeleteUserByIdResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserByIdResponse.ProtoReflect.Descriptor instead.
func (*DeleteUserByIdResponse) GetMessage ¶
func (x *DeleteUserByIdResponse) GetMessage() string
func (*DeleteUserByIdResponse) ProtoMessage ¶
func (*DeleteUserByIdResponse) ProtoMessage()
func (*DeleteUserByIdResponse) ProtoReflect ¶
func (x *DeleteUserByIdResponse) ProtoReflect() protoreflect.Message
func (*DeleteUserByIdResponse) Reset ¶
func (x *DeleteUserByIdResponse) Reset()
func (*DeleteUserByIdResponse) String ¶
func (x *DeleteUserByIdResponse) String() string
type GetAllUsersRequest ¶
type GetAllUsersRequest struct {
// contains filtered or unexported fields
}
func (*GetAllUsersRequest) Descriptor
deprecated
func (*GetAllUsersRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAllUsersRequest.ProtoReflect.Descriptor instead.
func (*GetAllUsersRequest) ProtoMessage ¶
func (*GetAllUsersRequest) ProtoMessage()
func (*GetAllUsersRequest) ProtoReflect ¶
func (x *GetAllUsersRequest) ProtoReflect() protoreflect.Message
func (*GetAllUsersRequest) Reset ¶
func (x *GetAllUsersRequest) Reset()
func (*GetAllUsersRequest) String ¶
func (x *GetAllUsersRequest) String() string
type GetAllUsersResponse ¶
type GetAllUsersResponse struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*GetAllUsersResponse) Descriptor
deprecated
func (*GetAllUsersResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetAllUsersResponse.ProtoReflect.Descriptor instead.
func (*GetAllUsersResponse) GetUsers ¶
func (x *GetAllUsersResponse) GetUsers() []*User
func (*GetAllUsersResponse) ProtoMessage ¶
func (*GetAllUsersResponse) ProtoMessage()
func (*GetAllUsersResponse) ProtoReflect ¶
func (x *GetAllUsersResponse) ProtoReflect() protoreflect.Message
func (*GetAllUsersResponse) Reset ¶
func (x *GetAllUsersResponse) Reset()
func (*GetAllUsersResponse) String ¶
func (x *GetAllUsersResponse) String() string
type GetUserByEmailRequest ¶
type GetUserByEmailRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*GetUserByEmailRequest) Descriptor
deprecated
func (*GetUserByEmailRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserByEmailRequest.ProtoReflect.Descriptor instead.
func (*GetUserByEmailRequest) GetEmail ¶
func (x *GetUserByEmailRequest) GetEmail() string
func (*GetUserByEmailRequest) ProtoMessage ¶
func (*GetUserByEmailRequest) ProtoMessage()
func (*GetUserByEmailRequest) ProtoReflect ¶
func (x *GetUserByEmailRequest) ProtoReflect() protoreflect.Message
func (*GetUserByEmailRequest) Reset ¶
func (x *GetUserByEmailRequest) Reset()
func (*GetUserByEmailRequest) String ¶
func (x *GetUserByEmailRequest) String() string
type GetUserByIdRequest ¶
type GetUserByIdRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetUserByIdRequest) Descriptor
deprecated
func (*GetUserByIdRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserByIdRequest.ProtoReflect.Descriptor instead.
func (*GetUserByIdRequest) GetId ¶
func (x *GetUserByIdRequest) GetId() string
func (*GetUserByIdRequest) ProtoMessage ¶
func (*GetUserByIdRequest) ProtoMessage()
func (*GetUserByIdRequest) ProtoReflect ¶
func (x *GetUserByIdRequest) ProtoReflect() protoreflect.Message
func (*GetUserByIdRequest) Reset ¶
func (x *GetUserByIdRequest) Reset()
func (*GetUserByIdRequest) String ¶
func (x *GetUserByIdRequest) String() string
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*User, error)
func (UnimplementedUserServiceServer) DeleteUserById ¶
func (UnimplementedUserServiceServer) DeleteUserById(context.Context, *DeleteUserByIdRequest) (*DeleteUserByIdResponse, error)
func (UnimplementedUserServiceServer) GetAllUsers ¶
func (UnimplementedUserServiceServer) GetAllUsers(context.Context, *GetAllUsersRequest) (*GetAllUsersResponse, error)
func (UnimplementedUserServiceServer) GetUserByEmail ¶
func (UnimplementedUserServiceServer) GetUserByEmail(context.Context, *GetUserByEmailRequest) (*User, error)
func (UnimplementedUserServiceServer) GetUserById ¶
func (UnimplementedUserServiceServer) GetUserById(context.Context, *GetUserByIdRequest) (*User, error)
func (UnimplementedUserServiceServer) UpdateUserById ¶
func (UnimplementedUserServiceServer) UpdateUserById(context.Context, *UpdateUserByIdRequest) (*User, 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 UpdateUserByIdRequest ¶
type UpdateUserByIdRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` Roles []string `protobuf:"bytes,5,rep,name=roles,proto3" json:"roles,omitempty"` Xp int32 `protobuf:"varint,6,opt,name=xp,proto3" json:"xp,omitempty"` IsBanned bool `protobuf:"varint,7,opt,name=is_banned,json=isBanned,proto3" json:"is_banned,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserByIdRequest) Descriptor
deprecated
func (*UpdateUserByIdRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserByIdRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserByIdRequest) GetEmail ¶
func (x *UpdateUserByIdRequest) GetEmail() string
func (*UpdateUserByIdRequest) GetId ¶
func (x *UpdateUserByIdRequest) GetId() string
func (*UpdateUserByIdRequest) GetIsBanned ¶
func (x *UpdateUserByIdRequest) GetIsBanned() bool
func (*UpdateUserByIdRequest) GetPassword ¶
func (x *UpdateUserByIdRequest) GetPassword() string
func (*UpdateUserByIdRequest) GetRoles ¶
func (x *UpdateUserByIdRequest) GetRoles() []string
func (*UpdateUserByIdRequest) GetUsername ¶
func (x *UpdateUserByIdRequest) GetUsername() string
func (*UpdateUserByIdRequest) GetXp ¶
func (x *UpdateUserByIdRequest) GetXp() int32
func (*UpdateUserByIdRequest) ProtoMessage ¶
func (*UpdateUserByIdRequest) ProtoMessage()
func (*UpdateUserByIdRequest) ProtoReflect ¶
func (x *UpdateUserByIdRequest) ProtoReflect() protoreflect.Message
func (*UpdateUserByIdRequest) Reset ¶
func (x *UpdateUserByIdRequest) Reset()
func (*UpdateUserByIdRequest) String ¶
func (x *UpdateUserByIdRequest) String() string
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,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"` Xp int32 `protobuf:"varint,5,opt,name=xp,proto3" json:"xp,omitempty"` IsBanned bool `protobuf:"varint,6,opt,name=is_banned,json=isBanned,proto3" json:"is_banned,omitempty"` CreatedAt *timestamp.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamp.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCreatedAt ¶
func (*User) GetIsBanned ¶
func (*User) GetUpdatedAt ¶
func (*User) GetUsername ¶
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) (*User, error) GetAllUsers(ctx context.Context, in *GetAllUsersRequest, opts ...grpc.CallOption) (*GetAllUsersResponse, error) GetUserById(ctx context.Context, in *GetUserByIdRequest, opts ...grpc.CallOption) (*User, error) GetUserByEmail(ctx context.Context, in *GetUserByEmailRequest, opts ...grpc.CallOption) (*User, error) UpdateUserById(ctx context.Context, in *UpdateUserByIdRequest, opts ...grpc.CallOption) (*User, error) DeleteUserById(ctx context.Context, in *DeleteUserByIdRequest, opts ...grpc.CallOption) (*DeleteUserByIdResponse, 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) (*User, error) GetAllUsers(context.Context, *GetAllUsersRequest) (*GetAllUsersResponse, error) GetUserById(context.Context, *GetUserByIdRequest) (*User, error) GetUserByEmail(context.Context, *GetUserByEmailRequest) (*User, error) UpdateUserById(context.Context, *UpdateUserByIdRequest) (*User, error) DeleteUserById(context.Context, *DeleteUserByIdRequest) (*DeleteUserByIdResponse, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility