Documentation ¶
Index ¶
- Variables
- func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetEmail() string
- func (x *CreateUserRequest) GetName() string
- func (x *CreateUserRequest) GetPassword() string
- func (x *CreateUserRequest) GetRoles() []string
- func (x *CreateUserRequest) GetUserId() string
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- type DeleteUserRequest
- type UnimplementedUserServer
- func (UnimplementedUserServer) CreateUser(context.Context, *CreateUserRequest) (*emptypb.Empty, error)
- func (UnimplementedUserServer) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
- func (UnimplementedUserServer) GetUserByEmailAndPassword(context.Context, *UserByEmailAndPasswordRequest) (*UserResponse, error)
- func (UnimplementedUserServer) GetUsers(context.Context, *UsersRequest) (*UsersResponse, error)
- func (UnimplementedUserServer) UpdateUser(context.Context, *UpdateUserRequest) (*emptypb.Empty, error)
- type UnsafeUserServer
- type UpdateUserRequest
- func (*UpdateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserRequest) GetEmail() string
- func (x *UpdateUserRequest) GetName() string
- func (x *UpdateUserRequest) GetNewPassword() string
- func (x *UpdateUserRequest) GetOldPassword() string
- func (x *UpdateUserRequest) GetRoles() []string
- func (x *UpdateUserRequest) GetUserId() string
- func (*UpdateUserRequest) ProtoMessage()
- func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateUserRequest) Reset()
- func (x *UpdateUserRequest) String() string
- type UserByEmailAndPasswordRequest
- func (*UserByEmailAndPasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserByEmailAndPasswordRequest) GetEmail() string
- func (x *UserByEmailAndPasswordRequest) GetPassword() string
- func (*UserByEmailAndPasswordRequest) ProtoMessage()
- func (x *UserByEmailAndPasswordRequest) ProtoReflect() protoreflect.Message
- func (x *UserByEmailAndPasswordRequest) Reset()
- func (x *UserByEmailAndPasswordRequest) String() string
- type UserClient
- type UserResponse
- func (*UserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserResponse) GetCreatedAt() *timestamppb.Timestamp
- func (x *UserResponse) GetEmail() string
- func (x *UserResponse) GetName() string
- func (x *UserResponse) GetRoles() []string
- func (x *UserResponse) GetUserId() string
- func (*UserResponse) ProtoMessage()
- func (x *UserResponse) ProtoReflect() protoreflect.Message
- func (x *UserResponse) Reset()
- func (x *UserResponse) String() string
- type UserServer
- type UsersRequest
- func (*UsersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UsersRequest) GetEmails() []string
- func (x *UsersRequest) GetPageIndex() uint64
- func (x *UsersRequest) GetPageSize() uint32
- func (x *UsersRequest) GetUserIds() []string
- func (*UsersRequest) ProtoMessage()
- func (x *UsersRequest) ProtoReflect() protoreflect.Message
- func (x *UsersRequest) Reset()
- func (x *UsersRequest) String() string
- type UsersResponse
- func (*UsersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UsersResponse) GetTotal() uint64
- func (x *UsersResponse) GetUsers() []*UserResponse
- func (*UsersResponse) ProtoMessage()
- func (x *UsersResponse) ProtoReflect() protoreflect.Message
- func (x *UsersResponse) Reset()
- func (x *UsersResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var File_v1_user_proto protoreflect.FileDescriptor
var User_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.v1.User", HandlerType: (*UserServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _User_CreateUser_Handler, }, { MethodName: "UpdateUser", Handler: _User_UpdateUser_Handler, }, { MethodName: "DeleteUser", Handler: _User_DeleteUser_Handler, }, { MethodName: "GetUsers", Handler: _User_GetUsers_Handler, }, { MethodName: "GetUserByEmailAndPassword", Handler: _User_GetUserByEmailAndPassword_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "v1/user.proto", }
User_ServiceDesc is the grpc.ServiceDesc for User service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServer ¶
func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` Roles []string `protobuf:"bytes,5,rep,name=roles,proto3" json:"roles,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) GetName ¶
func (x *CreateUserRequest) GetName() string
func (*CreateUserRequest) GetPassword ¶
func (x *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) GetRoles ¶
func (x *CreateUserRequest) GetRoles() []string
func (*CreateUserRequest) GetUserId ¶
func (x *CreateUserRequest) GetUserId() 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 DeleteUserRequest ¶
type DeleteUserRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*DeleteUserRequest) Descriptor
deprecated
func (*DeleteUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserRequest) GetUserId ¶
func (x *DeleteUserRequest) GetUserId() string
func (*DeleteUserRequest) ProtoMessage ¶
func (*DeleteUserRequest) ProtoMessage()
func (*DeleteUserRequest) ProtoReflect ¶
func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message
func (*DeleteUserRequest) Reset ¶
func (x *DeleteUserRequest) Reset()
func (*DeleteUserRequest) String ¶
func (x *DeleteUserRequest) String() string
type UnimplementedUserServer ¶
type UnimplementedUserServer struct { }
UnimplementedUserServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServer) CreateUser ¶
func (UnimplementedUserServer) CreateUser(context.Context, *CreateUserRequest) (*emptypb.Empty, error)
func (UnimplementedUserServer) DeleteUser ¶
func (UnimplementedUserServer) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
func (UnimplementedUserServer) GetUserByEmailAndPassword ¶
func (UnimplementedUserServer) GetUserByEmailAndPassword(context.Context, *UserByEmailAndPasswordRequest) (*UserResponse, error)
func (UnimplementedUserServer) GetUsers ¶
func (UnimplementedUserServer) GetUsers(context.Context, *UsersRequest) (*UsersResponse, error)
func (UnimplementedUserServer) UpdateUser ¶
func (UnimplementedUserServer) UpdateUser(context.Context, *UpdateUserRequest) (*emptypb.Empty, error)
type UnsafeUserServer ¶
type UnsafeUserServer interface {
// contains filtered or unexported methods
}
UnsafeUserServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServer will result in compilation errors.
type UpdateUserRequest ¶
type UpdateUserRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` OldPassword string `protobuf:"bytes,4,opt,name=old_password,json=oldPassword,proto3" json:"old_password,omitempty"` NewPassword string `protobuf:"bytes,5,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` Roles []string `protobuf:"bytes,6,rep,name=roles,proto3" json:"roles,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserRequest) Descriptor
deprecated
func (*UpdateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) GetEmail ¶
func (x *UpdateUserRequest) GetEmail() string
func (*UpdateUserRequest) GetName ¶
func (x *UpdateUserRequest) GetName() string
func (*UpdateUserRequest) GetNewPassword ¶
func (x *UpdateUserRequest) GetNewPassword() string
func (*UpdateUserRequest) GetOldPassword ¶
func (x *UpdateUserRequest) GetOldPassword() string
func (*UpdateUserRequest) GetRoles ¶
func (x *UpdateUserRequest) GetRoles() []string
func (*UpdateUserRequest) GetUserId ¶
func (x *UpdateUserRequest) GetUserId() 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 UserByEmailAndPasswordRequest ¶
type UserByEmailAndPasswordRequest 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 (*UserByEmailAndPasswordRequest) Descriptor
deprecated
func (*UserByEmailAndPasswordRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserByEmailAndPasswordRequest.ProtoReflect.Descriptor instead.
func (*UserByEmailAndPasswordRequest) GetEmail ¶
func (x *UserByEmailAndPasswordRequest) GetEmail() string
func (*UserByEmailAndPasswordRequest) GetPassword ¶
func (x *UserByEmailAndPasswordRequest) GetPassword() string
func (*UserByEmailAndPasswordRequest) ProtoMessage ¶
func (*UserByEmailAndPasswordRequest) ProtoMessage()
func (*UserByEmailAndPasswordRequest) ProtoReflect ¶
func (x *UserByEmailAndPasswordRequest) ProtoReflect() protoreflect.Message
func (*UserByEmailAndPasswordRequest) Reset ¶
func (x *UserByEmailAndPasswordRequest) Reset()
func (*UserByEmailAndPasswordRequest) String ¶
func (x *UserByEmailAndPasswordRequest) String() string
type UserClient ¶
type UserClient interface { CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) GetUsers(ctx context.Context, in *UsersRequest, opts ...grpc.CallOption) (*UsersResponse, error) GetUserByEmailAndPassword(ctx context.Context, in *UserByEmailAndPasswordRequest, opts ...grpc.CallOption) (*UserResponse, error) }
UserClient is the client API for User 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 NewUserClient ¶
func NewUserClient(cc grpc.ClientConnInterface) UserClient
type UserResponse ¶
type UserResponse struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Roles []string `protobuf:"bytes,4,rep,name=roles,proto3" json:"roles,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // contains filtered or unexported fields }
func (*UserResponse) Descriptor
deprecated
func (*UserResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.
func (*UserResponse) GetCreatedAt ¶
func (x *UserResponse) GetCreatedAt() *timestamppb.Timestamp
func (*UserResponse) GetEmail ¶
func (x *UserResponse) GetEmail() string
func (*UserResponse) GetName ¶
func (x *UserResponse) GetName() string
func (*UserResponse) GetRoles ¶
func (x *UserResponse) GetRoles() []string
func (*UserResponse) GetUserId ¶
func (x *UserResponse) GetUserId() string
func (*UserResponse) ProtoMessage ¶
func (*UserResponse) ProtoMessage()
func (*UserResponse) ProtoReflect ¶
func (x *UserResponse) ProtoReflect() protoreflect.Message
func (*UserResponse) Reset ¶
func (x *UserResponse) Reset()
func (*UserResponse) String ¶
func (x *UserResponse) String() string
type UserServer ¶
type UserServer interface { CreateUser(context.Context, *CreateUserRequest) (*emptypb.Empty, error) UpdateUser(context.Context, *UpdateUserRequest) (*emptypb.Empty, error) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error) GetUsers(context.Context, *UsersRequest) (*UsersResponse, error) GetUserByEmailAndPassword(context.Context, *UserByEmailAndPasswordRequest) (*UserResponse, error) // contains filtered or unexported methods }
UserServer is the server API for User service. All implementations must embed UnimplementedUserServer for forward compatibility
type UsersRequest ¶
type UsersRequest struct { PageIndex uint64 `protobuf:"varint,1,opt,name=page_index,json=pageIndex,proto3" json:"page_index,omitempty"` PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` UserIds []string `protobuf:"bytes,3,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"` Emails []string `protobuf:"bytes,4,rep,name=emails,proto3" json:"emails,omitempty"` // contains filtered or unexported fields }
func (*UsersRequest) Descriptor
deprecated
func (*UsersRequest) Descriptor() ([]byte, []int)
Deprecated: Use UsersRequest.ProtoReflect.Descriptor instead.
func (*UsersRequest) GetEmails ¶
func (x *UsersRequest) GetEmails() []string
func (*UsersRequest) GetPageIndex ¶
func (x *UsersRequest) GetPageIndex() uint64
func (*UsersRequest) GetPageSize ¶
func (x *UsersRequest) GetPageSize() uint32
func (*UsersRequest) GetUserIds ¶
func (x *UsersRequest) GetUserIds() []string
func (*UsersRequest) ProtoMessage ¶
func (*UsersRequest) ProtoMessage()
func (*UsersRequest) ProtoReflect ¶
func (x *UsersRequest) ProtoReflect() protoreflect.Message
func (*UsersRequest) Reset ¶
func (x *UsersRequest) Reset()
func (*UsersRequest) String ¶
func (x *UsersRequest) String() string
type UsersResponse ¶
type UsersResponse struct { Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` Users []*UserResponse `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*UsersResponse) Descriptor
deprecated
func (*UsersResponse) Descriptor() ([]byte, []int)
Deprecated: Use UsersResponse.ProtoReflect.Descriptor instead.
func (*UsersResponse) GetTotal ¶
func (x *UsersResponse) GetTotal() uint64
func (*UsersResponse) GetUsers ¶
func (x *UsersResponse) GetUsers() []*UserResponse
func (*UsersResponse) ProtoMessage ¶
func (*UsersResponse) ProtoMessage()
func (*UsersResponse) ProtoReflect ¶
func (x *UsersResponse) ProtoReflect() protoreflect.Message
func (*UsersResponse) Reset ¶
func (x *UsersResponse) Reset()
func (*UsersResponse) String ¶
func (x *UsersResponse) String() string