Documentation ¶
Index ¶
- Variables
- func RegisterTwitServiceServer(s grpc.ServiceRegistrar, srv TwitServiceServer)
- type ResponseTwit
- type Twit
- func (*Twit) Descriptor() ([]byte, []int)deprecated
- func (x *Twit) GetDate() *timestamppb.Timestamp
- func (x *Twit) GetId() *TwitUUID
- func (x *Twit) GetText() string
- func (x *Twit) GetUser() string
- func (*Twit) ProtoMessage()
- func (x *Twit) ProtoReflect() protoreflect.Message
- func (x *Twit) Reset()
- func (x *Twit) String() string
- type TwitServiceClient
- type TwitServiceServer
- type TwitService_GetTwitsClient
- type TwitService_GetTwitsServer
- type TwitUUID
- type UnimplementedTwitServiceServer
- func (UnimplementedTwitServiceServer) DeleteTwit(context.Context, *TwitUUID) (*ResponseTwit, error)
- func (UnimplementedTwitServiceServer) GetTwit(context.Context, *TwitUUID) (*Twit, error)
- func (UnimplementedTwitServiceServer) GetTwits(*emptypb.Empty, TwitService_GetTwitsServer) error
- func (UnimplementedTwitServiceServer) WriteTwit(context.Context, *Twit) (*ResponseTwit, error)
- type UnsafeTwitServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_twit_proto protoreflect.FileDescriptor
var TwitService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "main.TwitService", HandlerType: (*TwitServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "writeTwit", Handler: _TwitService_WriteTwit_Handler, }, { MethodName: "getTwit", Handler: _TwitService_GetTwit_Handler, }, { MethodName: "deleteTwit", Handler: _TwitService_DeleteTwit_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "getTwits", Handler: _TwitService_GetTwits_Handler, ServerStreams: true, }, }, Metadata: "twit.proto", }
TwitService_ServiceDesc is the grpc.ServiceDesc for TwitService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTwitServiceServer ¶
func RegisterTwitServiceServer(s grpc.ServiceRegistrar, srv TwitServiceServer)
Types ¶
type ResponseTwit ¶
type ResponseTwit struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*ResponseTwit) Descriptor
deprecated
func (*ResponseTwit) Descriptor() ([]byte, []int)
Deprecated: Use ResponseTwit.ProtoReflect.Descriptor instead.
func (*ResponseTwit) GetValue ¶
func (x *ResponseTwit) GetValue() string
func (*ResponseTwit) ProtoMessage ¶
func (*ResponseTwit) ProtoMessage()
func (*ResponseTwit) ProtoReflect ¶
func (x *ResponseTwit) ProtoReflect() protoreflect.Message
func (*ResponseTwit) Reset ¶
func (x *ResponseTwit) Reset()
func (*ResponseTwit) String ¶
func (x *ResponseTwit) String() string
type Twit ¶
type Twit struct { Id *TwitUUID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Date *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=date,proto3" json:"date,omitempty"` Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"` User string `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*Twit) Descriptor
deprecated
func (*Twit) GetDate ¶
func (x *Twit) GetDate() *timestamppb.Timestamp
func (*Twit) ProtoMessage ¶
func (*Twit) ProtoMessage()
func (*Twit) ProtoReflect ¶
func (x *Twit) ProtoReflect() protoreflect.Message
type TwitServiceClient ¶
type TwitServiceClient interface { GetTwits(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (TwitService_GetTwitsClient, error) WriteTwit(ctx context.Context, in *Twit, opts ...grpc.CallOption) (*ResponseTwit, error) GetTwit(ctx context.Context, in *TwitUUID, opts ...grpc.CallOption) (*Twit, error) DeleteTwit(ctx context.Context, in *TwitUUID, opts ...grpc.CallOption) (*ResponseTwit, error) }
TwitServiceClient is the client API for TwitService 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 NewTwitServiceClient ¶
func NewTwitServiceClient(cc grpc.ClientConnInterface) TwitServiceClient
type TwitServiceServer ¶
type TwitServiceServer interface { GetTwits(*emptypb.Empty, TwitService_GetTwitsServer) error WriteTwit(context.Context, *Twit) (*ResponseTwit, error) GetTwit(context.Context, *TwitUUID) (*Twit, error) DeleteTwit(context.Context, *TwitUUID) (*ResponseTwit, error) // contains filtered or unexported methods }
TwitServiceServer is the server API for TwitService service. All implementations must embed UnimplementedTwitServiceServer for forward compatibility
type TwitService_GetTwitsClient ¶
type TwitService_GetTwitsClient interface { Recv() (*Twit, error) grpc.ClientStream }
type TwitService_GetTwitsServer ¶
type TwitService_GetTwitsServer interface { Send(*Twit) error grpc.ServerStream }
type TwitUUID ¶
type TwitUUID struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*TwitUUID) Descriptor
deprecated
func (*TwitUUID) ProtoMessage ¶
func (*TwitUUID) ProtoMessage()
func (*TwitUUID) ProtoReflect ¶
func (x *TwitUUID) ProtoReflect() protoreflect.Message
type UnimplementedTwitServiceServer ¶
type UnimplementedTwitServiceServer struct { }
UnimplementedTwitServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTwitServiceServer) DeleteTwit ¶
func (UnimplementedTwitServiceServer) DeleteTwit(context.Context, *TwitUUID) (*ResponseTwit, error)
func (UnimplementedTwitServiceServer) GetTwits ¶
func (UnimplementedTwitServiceServer) GetTwits(*emptypb.Empty, TwitService_GetTwitsServer) error
func (UnimplementedTwitServiceServer) WriteTwit ¶
func (UnimplementedTwitServiceServer) WriteTwit(context.Context, *Twit) (*ResponseTwit, error)
type UnsafeTwitServiceServer ¶
type UnsafeTwitServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTwitServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TwitServiceServer will result in compilation errors.