Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_users_proto protoreflect.FileDescriptor
var UsersService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.users.v1.UsersService", HandlerType: (*UsersServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "List", Handler: _UsersService_List_Handler, }, { MethodName: "Get", Handler: _UsersService_Get_Handler, }, { MethodName: "Delete", Handler: _UsersService_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "users.proto", }
UsersService_ServiceDesc is the grpc.ServiceDesc for UsersService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUsersServiceServer ¶
func RegisterUsersServiceServer(s grpc.ServiceRegistrar, srv UsersServiceServer)
Types ¶
type GetByIDRequest ¶
type GetByIDRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetByIDRequest) Descriptor
deprecated
func (*GetByIDRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetByIDRequest.ProtoReflect.Descriptor instead.
func (*GetByIDRequest) GetId ¶
func (x *GetByIDRequest) GetId() int64
func (*GetByIDRequest) ProtoMessage ¶
func (*GetByIDRequest) ProtoMessage()
func (*GetByIDRequest) ProtoReflect ¶
func (x *GetByIDRequest) ProtoReflect() protoreflect.Message
func (*GetByIDRequest) Reset ¶
func (x *GetByIDRequest) Reset()
func (*GetByIDRequest) String ¶
func (x *GetByIDRequest) String() string
type UnimplementedUsersServiceServer ¶
type UnimplementedUsersServiceServer struct { }
UnimplementedUsersServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUsersServiceServer) Delete ¶
func (UnimplementedUsersServiceServer) Delete(context.Context, *GetByIDRequest) (*emptypb.Empty, error)
func (UnimplementedUsersServiceServer) Get ¶
func (UnimplementedUsersServiceServer) Get(context.Context, *GetByIDRequest) (*User, error)
type UnsafeUsersServiceServer ¶
type UnsafeUsersServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUsersServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UsersServiceServer will result in compilation errors.
type User ¶
type User struct { Id int64 `protobuf:"varint,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"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserList ¶
type UserList struct { Users []*User `protobuf:"bytes,8,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*UserList) Descriptor
deprecated
func (*UserList) ProtoMessage ¶
func (*UserList) ProtoMessage()
func (*UserList) ProtoReflect ¶
func (x *UserList) ProtoReflect() protoreflect.Message
type UsersServiceClient ¶
type UsersServiceClient interface { List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserList, error) Get(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*User, error) Delete(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
UsersServiceClient is the client API for UsersService 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 NewUsersServiceClient ¶
func NewUsersServiceClient(cc grpc.ClientConnInterface) UsersServiceClient
type UsersServiceServer ¶
type UsersServiceServer interface { List(context.Context, *emptypb.Empty) (*UserList, error) Get(context.Context, *GetByIDRequest) (*User, error) Delete(context.Context, *GetByIDRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
UsersServiceServer is the server API for UsersService service. All implementations must embed UnimplementedUsersServiceServer for forward compatibility