proto

package
v0.0.0-...-778c6ac Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Chat_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "chat.Chat",
	HandlerType: (*ChatServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SendReceiveMessage",
			Handler:       _Chat_SendReceiveMessage_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "chat.proto",
}

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

Functions

func RegisterChatServer

func RegisterChatServer(s grpc.ServiceRegistrar, srv ChatServer)

Types

type ChatClient

type ChatClient interface {
	SendReceiveMessage(ctx context.Context, opts ...grpc.CallOption) (Chat_SendReceiveMessageClient, error)
}

ChatClient is the client API for Chat 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 NewChatClient

func NewChatClient(cc grpc.ClientConnInterface) ChatClient

type ChatMessage

type ChatMessage struct {
	Id         string               `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	FromUserId string               `protobuf:"bytes,2,opt,name=from_user_id,json=fromUserId,proto3" json:"from_user_id,omitempty"`
	ToUserId   string               `protobuf:"bytes,3,opt,name=to_user_id,json=toUserId,proto3" json:"to_user_id,omitempty"`
	ChatId     string               `protobuf:"bytes,4,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
	Message    string               `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
	CreatedAt  *timestamp.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatMessage) Descriptor deprecated

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

Deprecated: Use ChatMessage.ProtoReflect.Descriptor instead.

func (*ChatMessage) GetChatId

func (x *ChatMessage) GetChatId() string

func (*ChatMessage) GetCreatedAt

func (x *ChatMessage) GetCreatedAt() *timestamp.Timestamp

func (*ChatMessage) GetFromUserId

func (x *ChatMessage) GetFromUserId() string

func (*ChatMessage) GetId

func (x *ChatMessage) GetId() string

func (*ChatMessage) GetMessage

func (x *ChatMessage) GetMessage() string

func (*ChatMessage) GetToUserId

func (x *ChatMessage) GetToUserId() string

func (*ChatMessage) ProtoMessage

func (*ChatMessage) ProtoMessage()

func (*ChatMessage) ProtoReflect

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

func (*ChatMessage) Reset

func (x *ChatMessage) Reset()

func (*ChatMessage) String

func (x *ChatMessage) String() string

type ChatServer

type ChatServer interface {
	SendReceiveMessage(Chat_SendReceiveMessageServer) error
	// contains filtered or unexported methods
}

ChatServer is the server API for Chat service. All implementations must embed UnimplementedChatServer for forward compatibility

type Chat_SendReceiveMessageClient

type Chat_SendReceiveMessageClient interface {
	Send(*ChatMessage) error
	Recv() (*ChatMessage, error)
	grpc.ClientStream
}

type Chat_SendReceiveMessageServer

type Chat_SendReceiveMessageServer interface {
	Send(*ChatMessage) error
	Recv() (*ChatMessage, error)
	grpc.ServerStream
}

type UnimplementedChatServer

type UnimplementedChatServer struct {
}

UnimplementedChatServer must be embedded to have forward compatible implementations.

func (UnimplementedChatServer) SendReceiveMessage

type UnsafeChatServer

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

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

Jump to

Keyboard shortcuts

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