chatterpb

package
v0.0.0-...-63cd2eb Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

View Source
const (
	Chatter_Login_FullMethodName     = "/chatter.Chatter/Login"
	Chatter_Echoer_FullMethodName    = "/chatter.Chatter/Echoer"
	Chatter_Listener_FullMethodName  = "/chatter.Chatter/Listener"
	Chatter_Summary_FullMethodName   = "/chatter.Chatter/Summary"
	Chatter_Subscribe_FullMethodName = "/chatter.Chatter/Subscribe"
	Chatter_History_FullMethodName   = "/chatter.Chatter/History"
)

Variables

View Source
var Chatter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "chatter.Chatter",
	HandlerType: (*ChatterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _Chatter_Login_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Echoer",
			Handler:       _Chatter_Echoer_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "Listener",
			Handler:       _Chatter_Listener_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "Summary",
			Handler:       _Chatter_Summary_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "Subscribe",
			Handler:       _Chatter_Subscribe_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "History",
			Handler:       _Chatter_History_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "goagen_streaming_chatter.proto",
}

Chatter_ServiceDesc is the grpc.ServiceDesc for Chatter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_goagen_streaming_chatter_proto protoreflect.FileDescriptor

Functions

func RegisterChatterServer

func RegisterChatterServer(s grpc.ServiceRegistrar, srv ChatterServer)

Types

type ChatSummary

type ChatSummary struct {

	// Message sent to the server
	Message_ string `protobuf:"bytes,1,opt,name=message_,json=message,proto3" json:"message_,omitempty"`
	// Length of the message sent
	Length *int32 `protobuf:"zigzag32,2,opt,name=length,proto3,oneof" json:"length,omitempty"`
	// Time at which the message was sent
	SentAt string `protobuf:"bytes,3,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatSummary) Descriptor deprecated

func (*ChatSummary) Descriptor() ([]byte, []int)

Deprecated: Use ChatSummary.ProtoReflect.Descriptor instead.

func (*ChatSummary) GetLength

func (x *ChatSummary) GetLength() int32

func (*ChatSummary) GetMessage_

func (x *ChatSummary) GetMessage_() string

func (*ChatSummary) GetSentAt

func (x *ChatSummary) GetSentAt() string

func (*ChatSummary) ProtoMessage

func (*ChatSummary) ProtoMessage()

func (*ChatSummary) ProtoReflect

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

func (*ChatSummary) Reset

func (x *ChatSummary) Reset()

func (*ChatSummary) String

func (x *ChatSummary) String() string

type ChatSummaryCollection

type ChatSummaryCollection struct {
	Field []*ChatSummary `protobuf:"bytes,1,rep,name=field,proto3" json:"field,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatSummaryCollection) Descriptor deprecated

func (*ChatSummaryCollection) Descriptor() ([]byte, []int)

Deprecated: Use ChatSummaryCollection.ProtoReflect.Descriptor instead.

func (*ChatSummaryCollection) GetField

func (x *ChatSummaryCollection) GetField() []*ChatSummary

func (*ChatSummaryCollection) ProtoMessage

func (*ChatSummaryCollection) ProtoMessage()

func (*ChatSummaryCollection) ProtoReflect

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

func (*ChatSummaryCollection) Reset

func (x *ChatSummaryCollection) Reset()

func (*ChatSummaryCollection) String

func (x *ChatSummaryCollection) String() string

type ChatterClient

type ChatterClient interface {
	// Creates a valid JWT token for auth to chat.
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	// Echoes the message sent by the client.
	Echoer(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[EchoerStreamingRequest, EchoerResponse], error)
	// Listens to the messages sent by the client.
	Listener(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[ListenerStreamingRequest, ListenerResponse], error)
	// Summarizes the chat messages sent by the client.
	Summary(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[SummaryStreamingRequest, ChatSummaryCollection], error)
	// Subscribe to events sent when new chat messages are added.
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SubscribeResponse], error)
	// Returns the chat messages sent to the server.
	History(ctx context.Context, in *HistoryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[HistoryResponse], error)
}

ChatterClient is the client API for Chatter 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.

The chatter service implements a simple client and server chat.

func NewChatterClient

func NewChatterClient(cc grpc.ClientConnInterface) ChatterClient

type ChatterServer

type ChatterServer interface {
	// Creates a valid JWT token for auth to chat.
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	// Echoes the message sent by the client.
	Echoer(grpc.BidiStreamingServer[EchoerStreamingRequest, EchoerResponse]) error
	// Listens to the messages sent by the client.
	Listener(grpc.ClientStreamingServer[ListenerStreamingRequest, ListenerResponse]) error
	// Summarizes the chat messages sent by the client.
	Summary(grpc.ClientStreamingServer[SummaryStreamingRequest, ChatSummaryCollection]) error
	// Subscribe to events sent when new chat messages are added.
	Subscribe(*SubscribeRequest, grpc.ServerStreamingServer[SubscribeResponse]) error
	// Returns the chat messages sent to the server.
	History(*HistoryRequest, grpc.ServerStreamingServer[HistoryResponse]) error
	// contains filtered or unexported methods
}

ChatterServer is the server API for Chatter service. All implementations must embed UnimplementedChatterServer for forward compatibility.

The chatter service implements a simple client and server chat.

type Chatter_EchoerClient

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Chatter_EchoerServer

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Chatter_HistoryClient

type Chatter_HistoryClient = grpc.ServerStreamingClient[HistoryResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Chatter_HistoryServer

type Chatter_HistoryServer = grpc.ServerStreamingServer[HistoryResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Chatter_ListenerClient

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Chatter_ListenerServer

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Chatter_SubscribeClient

type Chatter_SubscribeClient = grpc.ServerStreamingClient[SubscribeResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Chatter_SubscribeServer

type Chatter_SubscribeServer = grpc.ServerStreamingServer[SubscribeResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Chatter_SummaryClient

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Chatter_SummaryServer

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type EchoerResponse

type EchoerResponse struct {
	Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
	// contains filtered or unexported fields
}

func (*EchoerResponse) Descriptor deprecated

func (*EchoerResponse) Descriptor() ([]byte, []int)

Deprecated: Use EchoerResponse.ProtoReflect.Descriptor instead.

func (*EchoerResponse) GetField

func (x *EchoerResponse) GetField() string

func (*EchoerResponse) ProtoMessage

func (*EchoerResponse) ProtoMessage()

func (*EchoerResponse) ProtoReflect

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

func (*EchoerResponse) Reset

func (x *EchoerResponse) Reset()

func (*EchoerResponse) String

func (x *EchoerResponse) String() string

type EchoerStreamingRequest

type EchoerStreamingRequest struct {
	Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
	// contains filtered or unexported fields
}

func (*EchoerStreamingRequest) Descriptor deprecated

func (*EchoerStreamingRequest) Descriptor() ([]byte, []int)

Deprecated: Use EchoerStreamingRequest.ProtoReflect.Descriptor instead.

func (*EchoerStreamingRequest) GetField

func (x *EchoerStreamingRequest) GetField() string

func (*EchoerStreamingRequest) ProtoMessage

func (*EchoerStreamingRequest) ProtoMessage()

func (*EchoerStreamingRequest) ProtoReflect

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

func (*EchoerStreamingRequest) Reset

func (x *EchoerStreamingRequest) Reset()

func (*EchoerStreamingRequest) String

func (x *EchoerStreamingRequest) String() string

type HistoryRequest

type HistoryRequest struct {
	// contains filtered or unexported fields
}

func (*HistoryRequest) Descriptor deprecated

func (*HistoryRequest) Descriptor() ([]byte, []int)

Deprecated: Use HistoryRequest.ProtoReflect.Descriptor instead.

func (*HistoryRequest) ProtoMessage

func (*HistoryRequest) ProtoMessage()

func (*HistoryRequest) ProtoReflect

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

func (*HistoryRequest) Reset

func (x *HistoryRequest) Reset()

func (*HistoryRequest) String

func (x *HistoryRequest) String() string

type HistoryResponse

type HistoryResponse struct {

	// Message sent to the server
	Message_ string `protobuf:"bytes,1,opt,name=message_,json=message,proto3" json:"message_,omitempty"`
	// Length of the message sent
	Length *int32 `protobuf:"zigzag32,2,opt,name=length,proto3,oneof" json:"length,omitempty"`
	// Time at which the message was sent
	SentAt string `protobuf:"bytes,3,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
	// contains filtered or unexported fields
}

func (*HistoryResponse) Descriptor deprecated

func (*HistoryResponse) Descriptor() ([]byte, []int)

Deprecated: Use HistoryResponse.ProtoReflect.Descriptor instead.

func (*HistoryResponse) GetLength

func (x *HistoryResponse) GetLength() int32

func (*HistoryResponse) GetMessage_

func (x *HistoryResponse) GetMessage_() string

func (*HistoryResponse) GetSentAt

func (x *HistoryResponse) GetSentAt() string

func (*HistoryResponse) ProtoMessage

func (*HistoryResponse) ProtoMessage()

func (*HistoryResponse) ProtoReflect

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

func (*HistoryResponse) Reset

func (x *HistoryResponse) Reset()

func (*HistoryResponse) String

func (x *HistoryResponse) String() string

type ListenerResponse

type ListenerResponse struct {
	// contains filtered or unexported fields
}

func (*ListenerResponse) Descriptor deprecated

func (*ListenerResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListenerResponse.ProtoReflect.Descriptor instead.

func (*ListenerResponse) ProtoMessage

func (*ListenerResponse) ProtoMessage()

func (*ListenerResponse) ProtoReflect

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

func (*ListenerResponse) Reset

func (x *ListenerResponse) Reset()

func (*ListenerResponse) String

func (x *ListenerResponse) String() string

type ListenerStreamingRequest

type ListenerStreamingRequest struct {
	Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
	// contains filtered or unexported fields
}

func (*ListenerStreamingRequest) Descriptor deprecated

func (*ListenerStreamingRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListenerStreamingRequest.ProtoReflect.Descriptor instead.

func (*ListenerStreamingRequest) GetField

func (x *ListenerStreamingRequest) GetField() string

func (*ListenerStreamingRequest) ProtoMessage

func (*ListenerStreamingRequest) ProtoMessage()

func (*ListenerStreamingRequest) ProtoReflect

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

func (*ListenerStreamingRequest) Reset

func (x *ListenerStreamingRequest) Reset()

func (*ListenerStreamingRequest) String

func (x *ListenerStreamingRequest) String() string

type LoginRequest

type LoginRequest struct {
	// contains filtered or unexported fields
}

func (*LoginRequest) Descriptor deprecated

func (*LoginRequest) Descriptor() ([]byte, []int)

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type LoginResponse

type LoginResponse struct {
	Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginResponse) Descriptor deprecated

func (*LoginResponse) Descriptor() ([]byte, []int)

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetField

func (x *LoginResponse) GetField() string

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect

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

func (*LoginResponse) Reset

func (x *LoginResponse) Reset()

func (*LoginResponse) String

func (x *LoginResponse) String() string

type SubscribeRequest

type SubscribeRequest struct {
	// contains filtered or unexported fields
}

func (*SubscribeRequest) Descriptor deprecated

func (*SubscribeRequest) Descriptor() ([]byte, []int)

Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) ProtoReflect

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

func (*SubscribeRequest) Reset

func (x *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (x *SubscribeRequest) String() string

type SubscribeResponse

type SubscribeResponse struct {

	// Message sent to the server
	Message_ string `protobuf:"bytes,1,opt,name=message_,json=message,proto3" json:"message_,omitempty"`
	Action   string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
	// Time at which the message was added
	AddedAt string `protobuf:"bytes,3,opt,name=added_at,json=addedAt,proto3" json:"added_at,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeResponse) Descriptor deprecated

func (*SubscribeResponse) Descriptor() ([]byte, []int)

Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.

func (*SubscribeResponse) GetAction

func (x *SubscribeResponse) GetAction() string

func (*SubscribeResponse) GetAddedAt

func (x *SubscribeResponse) GetAddedAt() string

func (*SubscribeResponse) GetMessage_

func (x *SubscribeResponse) GetMessage_() string

func (*SubscribeResponse) ProtoMessage

func (*SubscribeResponse) ProtoMessage()

func (*SubscribeResponse) ProtoReflect

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

func (*SubscribeResponse) Reset

func (x *SubscribeResponse) Reset()

func (*SubscribeResponse) String

func (x *SubscribeResponse) String() string

type SummaryStreamingRequest

type SummaryStreamingRequest struct {
	Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
	// contains filtered or unexported fields
}

func (*SummaryStreamingRequest) Descriptor deprecated

func (*SummaryStreamingRequest) Descriptor() ([]byte, []int)

Deprecated: Use SummaryStreamingRequest.ProtoReflect.Descriptor instead.

func (*SummaryStreamingRequest) GetField

func (x *SummaryStreamingRequest) GetField() string

func (*SummaryStreamingRequest) ProtoMessage

func (*SummaryStreamingRequest) ProtoMessage()

func (*SummaryStreamingRequest) ProtoReflect

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

func (*SummaryStreamingRequest) Reset

func (x *SummaryStreamingRequest) Reset()

func (*SummaryStreamingRequest) String

func (x *SummaryStreamingRequest) String() string

type UnimplementedChatterServer

type UnimplementedChatterServer struct{}

UnimplementedChatterServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedChatterServer) Login

type UnsafeChatterServer

type UnsafeChatterServer interface {
	// contains filtered or unexported methods
}

UnsafeChatterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ChatterServer will result in compilation errors.

Jump to

Keyboard shortcuts

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