Documentation ¶
Index ¶
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type UnimplementedUserServiceServer
- type UnsafeUserServiceServer
- type UserData
- func (*UserData) Descriptor() ([]byte, []int)deprecated
- func (x *UserData) GetCreatedAt() *timestamppb.Timestamp
- func (x *UserData) GetId() int64
- func (x *UserData) GetUserName() string
- func (*UserData) ProtoMessage()
- func (x *UserData) ProtoReflect() protoreflect.Message
- func (x *UserData) Reset()
- func (x *UserData) String() string
- type UserList
- type UserServiceClient
- type UserServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_user_service_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gogrpctron.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "ListUsers", Handler: _UserService_ListUsers_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user_service.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 ¶
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 UserData ¶
type UserData 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"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"` // contains filtered or unexported fields }
func (*UserData) Descriptor
deprecated
func (*UserData) GetCreatedAt ¶
func (x *UserData) GetCreatedAt() *timestamppb.Timestamp
func (*UserData) GetUserName ¶
func (*UserData) ProtoMessage ¶
func (*UserData) ProtoMessage()
func (*UserData) ProtoReflect ¶
func (x *UserData) ProtoReflect() protoreflect.Message
type UserList ¶
type UserList struct { Users []*UserData `protobuf:"bytes,1,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 UserServiceClient ¶
type UserServiceClient interface { CreateUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserData, error) ListUsers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserList, 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, *emptypb.Empty) (*UserData, error) ListUsers(context.Context, *emptypb.Empty) (*UserList, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility