Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterNoticeServiceServer(s grpc.ServiceRegistrar, srv NoticeServiceServer)
- type NoticeServiceClient
- type NoticeServiceServer
- type SendMessageReq
- func (*SendMessageReq) Descriptor() ([]byte, []int)deprecated
- func (x *SendMessageReq) GetText() string
- func (x *SendMessageReq) GetUserID() int64
- func (*SendMessageReq) ProtoMessage()
- func (x *SendMessageReq) ProtoReflect() protoreflect.Message
- func (x *SendMessageReq) Reset()
- func (x *SendMessageReq) String() string
- type UnimplementedNoticeServiceServer
- type UnsafeNoticeServiceServer
Constants ¶
const (
ServiceName = "notice"
)
Variables ¶
var File_notice_notice_proto protoreflect.FileDescriptor
var NoticeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "NoticeService", HandlerType: (*NoticeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendMessage", Handler: _NoticeService_SendMessage_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "notice/notice.proto", }
NoticeService_ServiceDesc is the grpc.ServiceDesc for NoticeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNoticeServiceServer ¶
func RegisterNoticeServiceServer(s grpc.ServiceRegistrar, srv NoticeServiceServer)
Types ¶
type NoticeServiceClient ¶
type NoticeServiceClient interface {
SendMessage(ctx context.Context, in *SendMessageReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
NoticeServiceClient is the client API for NoticeService 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 NewNoticeServiceClient ¶
func NewNoticeServiceClient(cc grpc.ClientConnInterface) NoticeServiceClient
type NoticeServiceServer ¶
type NoticeServiceServer interface { SendMessage(context.Context, *SendMessageReq) (*emptypb.Empty, error) // contains filtered or unexported methods }
NoticeServiceServer is the server API for NoticeService service. All implementations must embed UnimplementedNoticeServiceServer for forward compatibility
type SendMessageReq ¶
type SendMessageReq struct { UserID int64 `protobuf:"varint,1,opt,name=UserID,proto3" json:"UserID,omitempty"` Text string `protobuf:"bytes,2,opt,name=Text,proto3" json:"Text,omitempty"` // contains filtered or unexported fields }
func (*SendMessageReq) Descriptor
deprecated
func (*SendMessageReq) Descriptor() ([]byte, []int)
Deprecated: Use SendMessageReq.ProtoReflect.Descriptor instead.
func (*SendMessageReq) GetText ¶
func (x *SendMessageReq) GetText() string
func (*SendMessageReq) GetUserID ¶
func (x *SendMessageReq) GetUserID() int64
func (*SendMessageReq) ProtoMessage ¶
func (*SendMessageReq) ProtoMessage()
func (*SendMessageReq) ProtoReflect ¶
func (x *SendMessageReq) ProtoReflect() protoreflect.Message
func (*SendMessageReq) Reset ¶
func (x *SendMessageReq) Reset()
func (*SendMessageReq) String ¶
func (x *SendMessageReq) String() string
type UnimplementedNoticeServiceServer ¶
type UnimplementedNoticeServiceServer struct { }
UnimplementedNoticeServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedNoticeServiceServer) SendMessage ¶
func (UnimplementedNoticeServiceServer) SendMessage(context.Context, *SendMessageReq) (*emptypb.Empty, error)
type UnsafeNoticeServiceServer ¶
type UnsafeNoticeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeNoticeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NoticeServiceServer will result in compilation errors.