Documentation ¶
Index ¶
- Variables
- func RegisterNotificatorServer(s *grpc.Server, srv NotificatorServer)
- type NotificatorClient
- type NotificatorServer
- type SendReply
- type SendReply_ReplyType
- func (SendReply_ReplyType) Descriptor() protoreflect.EnumDescriptor
- func (x SendReply_ReplyType) Enum() *SendReply_ReplyType
- func (SendReply_ReplyType) EnumDescriptor() ([]byte, []int)deprecated
- func (x SendReply_ReplyType) Number() protoreflect.EnumNumber
- func (x SendReply_ReplyType) String() string
- func (SendReply_ReplyType) Type() protoreflect.EnumType
- type SendRequest
- type UnimplementedNotificatorServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SendReply_ReplyType_name = map[int32]string{ 0: "Success", 1: "Fail", } SendReply_ReplyType_value = map[string]int32{ "Success": 0, "Fail": 1, } )
Enum value maps for SendReply_ReplyType.
View Source
var File_notificator_proto protoreflect.FileDescriptor
Functions ¶
func RegisterNotificatorServer ¶
func RegisterNotificatorServer(s *grpc.Server, srv NotificatorServer)
Types ¶
type NotificatorClient ¶
type NotificatorClient interface {
Send(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*SendReply, error)
}
NotificatorClient is the client API for Notificator service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewNotificatorClient ¶
func NewNotificatorClient(cc grpc.ClientConnInterface) NotificatorClient
type NotificatorServer ¶
type NotificatorServer interface {
Send(context.Context, *SendRequest) (*SendReply, error)
}
NotificatorServer is the server API for Notificator service.
type SendReply ¶
type SendReply struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Status SendReply_ReplyType `protobuf:"varint,2,opt,name=status,proto3,enum=pb.SendReply_ReplyType" json:"status,omitempty"` // contains filtered or unexported fields }
func (*SendReply) Descriptor
deprecated
func (*SendReply) GetStatus ¶
func (x *SendReply) GetStatus() SendReply_ReplyType
func (*SendReply) ProtoMessage ¶
func (*SendReply) ProtoMessage()
func (*SendReply) ProtoReflect ¶
func (x *SendReply) ProtoReflect() protoreflect.Message
type SendReply_ReplyType ¶
type SendReply_ReplyType int32
const ( SendReply_Success SendReply_ReplyType = 0 SendReply_Fail SendReply_ReplyType = 1 )
func (SendReply_ReplyType) Descriptor ¶
func (SendReply_ReplyType) Descriptor() protoreflect.EnumDescriptor
func (SendReply_ReplyType) Enum ¶
func (x SendReply_ReplyType) Enum() *SendReply_ReplyType
func (SendReply_ReplyType) EnumDescriptor
deprecated
func (SendReply_ReplyType) EnumDescriptor() ([]byte, []int)
Deprecated: Use SendReply_ReplyType.Descriptor instead.
func (SendReply_ReplyType) Number ¶
func (x SendReply_ReplyType) Number() protoreflect.EnumNumber
func (SendReply_ReplyType) String ¶
func (x SendReply_ReplyType) String() string
func (SendReply_ReplyType) Type ¶
func (SendReply_ReplyType) Type() protoreflect.EnumType
type SendRequest ¶
type SendRequest struct { To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"` Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*SendRequest) Descriptor
deprecated
func (*SendRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendRequest.ProtoReflect.Descriptor instead.
func (*SendRequest) GetBody ¶
func (x *SendRequest) GetBody() string
func (*SendRequest) GetTo ¶
func (x *SendRequest) GetTo() string
func (*SendRequest) ProtoMessage ¶
func (*SendRequest) ProtoMessage()
func (*SendRequest) ProtoReflect ¶
func (x *SendRequest) ProtoReflect() protoreflect.Message
func (*SendRequest) Reset ¶
func (x *SendRequest) Reset()
func (*SendRequest) String ¶
func (x *SendRequest) String() string
type UnimplementedNotificatorServer ¶
type UnimplementedNotificatorServer struct { }
UnimplementedNotificatorServer can be embedded to have forward compatible implementations.
func (*UnimplementedNotificatorServer) Send ¶
func (*UnimplementedNotificatorServer) Send(context.Context, *SendRequest) (*SendReply, error)
Click to show internal directories.
Click to hide internal directories.