Documentation ¶
Index ¶
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type CreateUserRequest
- type DeleteUserRequest
- type GetAllUserRequest
- func (*GetAllUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAllUserRequest) GetLimit() int32
- func (x *GetAllUserRequest) GetOffset() int32
- func (*GetAllUserRequest) ProtoMessage()
- func (x *GetAllUserRequest) ProtoReflect() protoreflect.Message
- func (x *GetAllUserRequest) Reset()
- func (x *GetAllUserRequest) String() string
- type GetAllUserResponse
- func (*GetAllUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAllUserResponse) GetUsers() []*User
- func (*GetAllUserResponse) ProtoMessage()
- func (x *GetAllUserResponse) ProtoReflect() protoreflect.Message
- func (x *GetAllUserResponse) Reset()
- func (x *GetAllUserResponse) String() string
- type GetUserRequest
- type GetUserResponse
- type UUID
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) GetAllUsers(context.Context, *GetAllUserRequest) (*GetAllUserResponse, error)
- func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
- func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error)
- type UnsafeUserServiceServer
- type UpdateUserRequest
- type UpdateUserResponse
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetId() *UUID
- func (x *User) GetName() string
- func (x *User) GetPhone() string
- func (x *User) GetRole() string
- 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_v1_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "GetUser", Handler: _UserService_GetUser_Handler, }, { MethodName: "UpdateUser", Handler: _UserService_UpdateUser_Handler, }, { MethodName: "DeleteUser", Handler: _UserService_DeleteUser_Handler, }, { MethodName: "GetAllUsers", Handler: _UserService_GetAllUsers_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/v1/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 { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetUser ¶
func (x *CreateUserRequest) GetUser() *User
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 { Id *UUID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteUserRequest) Descriptor
deprecated
func (*DeleteUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserRequest) GetId ¶
func (x *DeleteUserRequest) GetId() *UUID
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 GetAllUserRequest ¶
type GetAllUserRequest struct { Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` // contains filtered or unexported fields }
func (*GetAllUserRequest) Descriptor
deprecated
func (*GetAllUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAllUserRequest.ProtoReflect.Descriptor instead.
func (*GetAllUserRequest) GetLimit ¶
func (x *GetAllUserRequest) GetLimit() int32
func (*GetAllUserRequest) GetOffset ¶
func (x *GetAllUserRequest) GetOffset() int32
func (*GetAllUserRequest) ProtoMessage ¶
func (*GetAllUserRequest) ProtoMessage()
func (*GetAllUserRequest) ProtoReflect ¶
func (x *GetAllUserRequest) ProtoReflect() protoreflect.Message
func (*GetAllUserRequest) Reset ¶
func (x *GetAllUserRequest) Reset()
func (*GetAllUserRequest) String ¶
func (x *GetAllUserRequest) String() string
type GetAllUserResponse ¶
type GetAllUserResponse struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*GetAllUserResponse) Descriptor
deprecated
func (*GetAllUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetAllUserResponse.ProtoReflect.Descriptor instead.
func (*GetAllUserResponse) GetUsers ¶
func (x *GetAllUserResponse) GetUsers() []*User
func (*GetAllUserResponse) ProtoMessage ¶
func (*GetAllUserResponse) ProtoMessage()
func (*GetAllUserResponse) ProtoReflect ¶
func (x *GetAllUserResponse) ProtoReflect() protoreflect.Message
func (*GetAllUserResponse) Reset ¶
func (x *GetAllUserResponse) Reset()
func (*GetAllUserResponse) String ¶
func (x *GetAllUserResponse) String() string
type GetUserRequest ¶
type GetUserRequest struct { Id *UUID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetUserRequest) Descriptor
deprecated
func (*GetUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) GetId ¶
func (x *GetUserRequest) GetId() *UUID
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 UUID ¶
type UUID struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*UUID) Descriptor
deprecated
func (*UUID) ProtoMessage ¶
func (*UUID) ProtoMessage()
func (*UUID) ProtoReflect ¶
func (x *UUID) ProtoReflect() protoreflect.Message
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*emptypb.Empty, error)
func (UnimplementedUserServiceServer) DeleteUser ¶
func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
func (UnimplementedUserServiceServer) GetAllUsers ¶
func (UnimplementedUserServiceServer) GetAllUsers(context.Context, *GetAllUserRequest) (*GetAllUserResponse, error)
func (UnimplementedUserServiceServer) GetUser ¶
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, 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 { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserRequest) Descriptor
deprecated
func (*UpdateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) GetUser ¶
func (x *UpdateUserRequest) GetUser() *User
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 *UUID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"` Role string `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
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) (*emptypb.Empty, error) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) GetAllUsers(ctx context.Context, in *GetAllUserRequest, opts ...grpc.CallOption) (*GetAllUserResponse, 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) (*emptypb.Empty, error) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error) GetAllUsers(context.Context, *GetAllUserRequest) (*GetAllUserResponse, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility