Documentation ¶
Index ¶
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *User) (*UserResponse, error)
- func (UnimplementedUserServiceServer) DeleteUser(context.Context, *UserUUID) (*UserResponse, error)
- func (UnimplementedUserServiceServer) GetUser(context.Context, *UserUUID) (*User, error)
- func (UnimplementedUserServiceServer) GetUsers(*emptypb.Empty, UserService_GetUsersServer) error
- func (UnimplementedUserServiceServer) UpdateUser(context.Context, *User) (*User, error)
- type UnsafeUserServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetEmail() string
- func (x *User) GetId() *UserUUID
- func (x *User) GetPassword() string
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserResponse
- type UserServiceClient
- type UserServiceServer
- type UserService_GetUsersClient
- type UserService_GetUsersServer
- type UserUUID
Constants ¶
This section is empty.
Variables ¶
var File_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "main.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, }, }, Streams: []grpc.StreamDesc{ { StreamName: "getUsers", Handler: _UserService_GetUsers_Handler, ServerStreams: true, }, }, 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 UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) CreateUser(context.Context, *User) (*UserResponse, error)
func (UnimplementedUserServiceServer) DeleteUser ¶
func (UnimplementedUserServiceServer) DeleteUser(context.Context, *UserUUID) (*UserResponse, error)
func (UnimplementedUserServiceServer) GetUsers ¶
func (UnimplementedUserServiceServer) GetUsers(*emptypb.Empty, UserService_GetUsersServer) error
func (UnimplementedUserServiceServer) UpdateUser ¶
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 User ¶
type User struct { Id *UserUUID `protobuf:"bytes,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"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetPassword ¶
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserResponse ¶
type UserResponse struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*UserResponse) Descriptor
deprecated
func (*UserResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.
func (*UserResponse) GetValue ¶
func (x *UserResponse) GetValue() 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 UserServiceClient ¶
type UserServiceClient interface { CreateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*UserResponse, error) GetUser(ctx context.Context, in *UserUUID, opts ...grpc.CallOption) (*User, error) GetUsers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (UserService_GetUsersClient, error) UpdateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error) DeleteUser(ctx context.Context, in *UserUUID, opts ...grpc.CallOption) (*UserResponse, 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, *User) (*UserResponse, error) GetUser(context.Context, *UserUUID) (*User, error) GetUsers(*emptypb.Empty, UserService_GetUsersServer) error UpdateUser(context.Context, *User) (*User, error) DeleteUser(context.Context, *UserUUID) (*UserResponse, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility
type UserService_GetUsersClient ¶
type UserService_GetUsersClient interface { Recv() (*User, error) grpc.ClientStream }
type UserService_GetUsersServer ¶
type UserService_GetUsersServer interface { Send(*User) error grpc.ServerStream }
type UserUUID ¶
type UserUUID struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*UserUUID) Descriptor
deprecated
func (*UserUUID) ProtoMessage ¶
func (*UserUUID) ProtoMessage()
func (*UserUUID) ProtoReflect ¶
func (x *UserUUID) ProtoReflect() protoreflect.Message