twit

package
v0.0.0-...-c02468d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Twit.ProtoReflect.Descriptor instead.

func (*Twit) GetDate

func (x *Twit) GetDate() *timestamppb.Timestamp

func (*Twit) GetId

func (x *Twit) GetId() *TwitUUID

func (*Twit) GetText

func (x *Twit) GetText() string

func (*Twit) GetUser

func (x *Twit) GetUser() string

func (*Twit) ProtoMessage

func (*Twit) ProtoMessage()

func (*Twit) ProtoReflect

func (x *Twit) ProtoReflect() protoreflect.Message

func (*Twit) Reset

func (x *Twit) Reset()

func (*Twit) String

func (x *Twit) String() string

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use TwitUUID.ProtoReflect.Descriptor instead.

func (*TwitUUID) GetValue

func (x *TwitUUID) GetValue() string

func (*TwitUUID) ProtoMessage

func (*TwitUUID) ProtoMessage()

func (*TwitUUID) ProtoReflect

func (x *TwitUUID) ProtoReflect() protoreflect.Message

func (*TwitUUID) Reset

func (x *TwitUUID) Reset()

func (*TwitUUID) String

func (x *TwitUUID) String() string

type UnimplementedTwitServiceServer

type UnimplementedTwitServiceServer struct {
}

UnimplementedTwitServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedTwitServiceServer) DeleteTwit

func (UnimplementedTwitServiceServer) GetTwit

func (UnimplementedTwitServiceServer) GetTwits

func (UnimplementedTwitServiceServer) WriteTwit

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL