Documentation ¶
Index ¶
- Variables
- func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
- type Empty
- type Reply
- type Request
- type UidT
- type UnimplementedUserServer
- func (UnimplementedUserServer) CreateUser(context.Context, *UserT) (*UidT, error)
- func (UnimplementedUserServer) DeleteUser(context.Context, *UidT) (*Empty, error)
- func (UnimplementedUserServer) Ping(context.Context, *Request) (*Reply, error)
- func (UnimplementedUserServer) ReadUser(context.Context, *UidT) (*UserT, error)
- func (UnimplementedUserServer) UpdateUser(context.Context, *UserT) (*Empty, error)
- type UnsafeUserServer
- type UserClient
- type UserServer
- type UserT
Constants ¶
This section is empty.
Variables ¶
View Source
var File_api_proto protoreflect.FileDescriptor
Functions ¶
func RegisterUserServer ¶
func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
Types ¶
type Empty ¶ added in v1.3.0
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
added in
v1.3.0
func (*Empty) ProtoMessage ¶ added in v1.3.0
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶ added in v1.11.0
func (x *Empty) ProtoReflect() protoreflect.Message
type Reply ¶
type Reply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Count int64 `protobuf:"zigzag64,2,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*Reply) Descriptor
deprecated
func (*Reply) GetMessage ¶
func (*Reply) ProtoMessage ¶
func (*Reply) ProtoMessage()
func (*Reply) ProtoReflect ¶ added in v1.11.0
func (x *Reply) ProtoReflect() protoreflect.Message
type Request ¶
type Request struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) GetMessage ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶ added in v1.11.0
func (x *Request) ProtoReflect() protoreflect.Message
type UidT ¶ added in v1.3.0
type UidT struct { Uid int64 `protobuf:"zigzag64,1,opt,name=uid,proto3" json:"uid,omitempty"` // contains filtered or unexported fields }
func (*UidT) Descriptor
deprecated
added in
v1.3.0
func (*UidT) ProtoMessage ¶ added in v1.3.0
func (*UidT) ProtoMessage()
func (*UidT) ProtoReflect ¶ added in v1.11.0
func (x *UidT) ProtoReflect() protoreflect.Message
type UnimplementedUserServer ¶
type UnimplementedUserServer struct { }
UnimplementedUserServer should be embedded to have forward compatible implementations.
func (UnimplementedUserServer) CreateUser ¶ added in v1.3.0
func (UnimplementedUserServer) DeleteUser ¶ added in v1.3.0
func (UnimplementedUserServer) UpdateUser ¶ added in v1.3.0
type UnsafeUserServer ¶ added in v1.11.0
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 UserClient ¶
type UserClient interface { Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error) CreateUser(ctx context.Context, in *UserT, opts ...grpc.CallOption) (*UidT, error) ReadUser(ctx context.Context, in *UidT, opts ...grpc.CallOption) (*UserT, error) UpdateUser(ctx context.Context, in *UserT, opts ...grpc.CallOption) (*Empty, error) DeleteUser(ctx context.Context, in *UidT, opts ...grpc.CallOption) (*Empty, 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 UserServer ¶
type UserServer interface { Ping(context.Context, *Request) (*Reply, error) CreateUser(context.Context, *UserT) (*UidT, error) ReadUser(context.Context, *UidT) (*UserT, error) UpdateUser(context.Context, *UserT) (*Empty, error) DeleteUser(context.Context, *UidT) (*Empty, error) }
UserServer is the server API for User service. All implementations should embed UnimplementedUserServer for forward compatibility
type UserT ¶ added in v1.3.0
type UserT struct { Uid int64 `protobuf:"zigzag64,1,opt,name=uid,proto3" json:"uid,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Sex int64 `protobuf:"zigzag64,3,opt,name=sex,proto3" json:"sex,omitempty"` // contains filtered or unexported fields }
func (*UserT) Descriptor
deprecated
added in
v1.3.0
func (*UserT) ProtoMessage ¶ added in v1.3.0
func (*UserT) ProtoMessage()
func (*UserT) ProtoReflect ¶ added in v1.11.0
func (x *UserT) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.