v1

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChatService_Dispatch_FullMethodName = "/api.chat.v1.ChatService/Dispatch"
)

Variables

View Source
var ChatService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.chat.v1.ChatService",
	HandlerType: (*ChatServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Dispatch",
			Handler:       _ChatService_Dispatch_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "api/chat/v1/service.proto",
}

ChatService_ServiceDesc is the grpc.ServiceDesc for ChatService 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_api_chat_v1_messages_proto protoreflect.FileDescriptor
View Source
var File_api_chat_v1_service_proto protoreflect.FileDescriptor

Functions

func RegisterChatServiceServer

func RegisterChatServiceServer(s grpc.ServiceRegistrar, srv ChatServiceServer)

Types

type ChatServiceClient

type ChatServiceClient interface {
	// Dispatch is used for real-time message exchange.
	Dispatch(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[DispatchRequest, DispatchResponse], error)
}

ChatServiceClient is the client API for ChatService 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.

ChatService provides real-time communication capabilities.

type ChatServiceServer

type ChatServiceServer interface {
	// Dispatch is used for real-time message exchange.
	Dispatch(grpc.BidiStreamingServer[DispatchRequest, DispatchResponse]) error
	// contains filtered or unexported methods
}

ChatServiceServer is the server API for ChatService service. All implementations must embed UnimplementedChatServiceServer for forward compatibility.

ChatService provides real-time communication capabilities.

type ChatService_DispatchClient

type ChatService_DispatchClient = grpc.BidiStreamingClient[DispatchRequest, DispatchResponse]

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

type ChatService_DispatchServer

type ChatService_DispatchServer = grpc.BidiStreamingServer[DispatchRequest, DispatchResponse]

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

type DispatchRequest

type DispatchRequest struct {

	// The message being dispatched by the client.
	Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

DispatchRequest is the envelope for sending a message to the stream.

func (*DispatchRequest) Descriptor deprecated

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

Deprecated: Use DispatchRequest.ProtoReflect.Descriptor instead.

func (*DispatchRequest) GetMessage

func (x *DispatchRequest) GetMessage() *Message

func (*DispatchRequest) ProtoMessage

func (*DispatchRequest) ProtoMessage()

func (*DispatchRequest) ProtoReflect

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

func (*DispatchRequest) Reset

func (x *DispatchRequest) Reset()

func (*DispatchRequest) String

func (x *DispatchRequest) String() string

func (*DispatchRequest) Verbose

func (x *DispatchRequest) Verbose() string

type DispatchResponse

type DispatchResponse struct {

	// The content of the envelope.
	//
	// Types that are valid to be assigned to Payload:
	//
	//	*DispatchResponse_Message
	//	*DispatchResponse_Status
	Payload isDispatchResponse_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

DispatchResponse is the envelope for receiving data from the stream.

func (*DispatchResponse) Descriptor deprecated

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

Deprecated: Use DispatchResponse.ProtoReflect.Descriptor instead.

func (*DispatchResponse) GetMessage

func (x *DispatchResponse) GetMessage() *Message

func (*DispatchResponse) GetPayload

func (x *DispatchResponse) GetPayload() isDispatchResponse_Payload

func (*DispatchResponse) GetStatus

func (x *DispatchResponse) GetStatus() *status.Status

func (*DispatchResponse) ProtoMessage

func (*DispatchResponse) ProtoMessage()

func (*DispatchResponse) ProtoReflect

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

func (*DispatchResponse) Reset

func (x *DispatchResponse) Reset()

func (*DispatchResponse) String

func (x *DispatchResponse) String() string

func (*DispatchResponse) Verbose

func (x *DispatchResponse) Verbose() string

type DispatchResponse_Message

type DispatchResponse_Message struct {
	// The message being dispatched to the client.
	Message *Message `protobuf:"bytes,1,opt,name=message,proto3,oneof"`
}

type DispatchResponse_Status

type DispatchResponse_Status struct {
	// Detailed error status if the dispatch failed.
	Status *status.Status `protobuf:"bytes,2,opt,name=status,proto3,oneof"`
}
type Header struct {

	// Unique string used to track a message's lifecycle chatting.
	CorrelationId string `protobuf:"bytes,1,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"`
	// contains filtered or unexported fields
}

Header contains metadata for request tracking and observability.

func (*Header) Descriptor deprecated

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

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetCorrelationId

func (x *Header) GetCorrelationId() string

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) ProtoReflect

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

func (*Header) Reset

func (x *Header) Reset()

func (*Header) String

func (x *Header) String() string

func (*Header) Verbose

func (x *Header) Verbose() string

type Message

type Message struct {

	// Metadata for the message.
	Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// The actual text content of the message.
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

Message represents the core data unit exchanged in a chat session.

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetHeader

func (x *Message) GetHeader() *Header

func (*Message) GetText

func (x *Message) GetText() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

func (*Message) Verbose

func (x *Message) Verbose() string

type UnimplementedChatServiceServer

type UnimplementedChatServiceServer struct{}

UnimplementedChatServiceServer 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 (UnimplementedChatServiceServer) Dispatch

type UnsafeChatServiceServer

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

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

Jump to

Keyboard shortcuts

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