pb

package
v0.0.0-...-16e1b16 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChatService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.ChatService",
	HandlerType: (*ChatServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ChatStream",
			Handler:       _ChatService_ChatStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "proto/chat.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_proto_chat_proto protoreflect.FileDescriptor

Functions

func RegisterChatServiceServer

func RegisterChatServiceServer(s grpc.ServiceRegistrar, srv ChatServiceServer)

Types

type ChatRequest

type ChatRequest struct {
	ChatId      *string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3,oneof" json:"chat_id,omitempty"`
	UserId      string  `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	UserMessage string  `protobuf:"bytes,3,opt,name=user_message,json=userMessage,proto3" json:"user_message,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatRequest) Descriptor deprecated

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

Deprecated: Use ChatRequest.ProtoReflect.Descriptor instead.

func (*ChatRequest) GetChatId

func (x *ChatRequest) GetChatId() string

func (*ChatRequest) GetUserId

func (x *ChatRequest) GetUserId() string

func (*ChatRequest) GetUserMessage

func (x *ChatRequest) GetUserMessage() string

func (*ChatRequest) ProtoMessage

func (*ChatRequest) ProtoMessage()

func (*ChatRequest) ProtoReflect

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

func (*ChatRequest) Reset

func (x *ChatRequest) Reset()

func (*ChatRequest) String

func (x *ChatRequest) String() string

type ChatResponse

type ChatResponse struct {
	ChatId  string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
	UserId  string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatResponse) Descriptor deprecated

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

Deprecated: Use ChatResponse.ProtoReflect.Descriptor instead.

func (*ChatResponse) GetChatId

func (x *ChatResponse) GetChatId() string

func (*ChatResponse) GetContent

func (x *ChatResponse) GetContent() string

func (*ChatResponse) GetUserId

func (x *ChatResponse) GetUserId() string

func (*ChatResponse) ProtoMessage

func (*ChatResponse) ProtoMessage()

func (*ChatResponse) ProtoReflect

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

func (*ChatResponse) Reset

func (x *ChatResponse) Reset()

func (*ChatResponse) String

func (x *ChatResponse) String() string

type ChatServiceClient

type ChatServiceClient interface {
	ChatStream(ctx context.Context, in *ChatRequest, opts ...grpc.CallOption) (ChatService_ChatStreamClient, 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.

type ChatServiceServer

type ChatServiceServer interface {
	ChatStream(*ChatRequest, ChatService_ChatStreamServer) error
	// contains filtered or unexported methods
}

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

type ChatService_ChatStreamClient

type ChatService_ChatStreamClient interface {
	Recv() (*ChatResponse, error)
	grpc.ClientStream
}

type ChatService_ChatStreamServer

type ChatService_ChatStreamServer interface {
	Send(*ChatResponse) error
	grpc.ServerStream
}

type UnimplementedChatServiceServer

type UnimplementedChatServiceServer struct {
}

UnimplementedChatServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedChatServiceServer) ChatStream

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