chatpb

package
v0.0.0-...-3ed44f6 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_protos_chatpb_chat_service_proto protoreflect.FileDescriptor

Functions

func RegisterChatServiceServer

func RegisterChatServiceServer(s *grpc.Server, srv ChatServiceServer)

Types

type ChatServiceClient

type ChatServiceClient interface {
	PostMessage(ctx context.Context, in *PostMessageRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
	UpdateMessage(ctx context.Context, in *UpdateMessageRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
	// only server stream is supported in grpc web
	// (https://github.com/grpc/grpc-web#wire-format-mode)
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (ChatService_SubscribeClient, error)
}

ChatServiceClient is the client API for ChatService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type ChatServiceServer

type ChatServiceServer interface {
	PostMessage(context.Context, *PostMessageRequest) (*EmptyResponse, error)
	UpdateMessage(context.Context, *UpdateMessageRequest) (*EmptyResponse, error)
	// only server stream is supported in grpc web
	// (https://github.com/grpc/grpc-web#wire-format-mode)
	Subscribe(*SubscribeRequest, ChatService_SubscribeServer) error
}

ChatServiceServer is the server API for ChatService service.

type ChatService_SubscribeClient

type ChatService_SubscribeClient interface {
	Recv() (*SubscribeResponse, error)
	grpc.ClientStream
}

type ChatService_SubscribeServer

type ChatService_SubscribeServer interface {
	Send(*SubscribeResponse) error
	grpc.ServerStream
}

type EmptyResponse

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

func (*EmptyResponse) Descriptor deprecated

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

Deprecated: Use EmptyResponse.ProtoReflect.Descriptor instead.

func (*EmptyResponse) ProtoMessage

func (*EmptyResponse) ProtoMessage()

func (*EmptyResponse) ProtoReflect

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

func (*EmptyResponse) Reset

func (x *EmptyResponse) Reset()

func (*EmptyResponse) String

func (x *EmptyResponse) String() string

type Message

type Message struct {
	MessageId   string               `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	UserId      string               `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	WorkspaceId string               `protobuf:"bytes,3,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"`
	ChannelId   string               `protobuf:"bytes,4,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	Message     string               `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
	Timestamp   *timestamp.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetChannelId

func (x *Message) GetChannelId() string

func (*Message) GetMessage

func (x *Message) GetMessage() string

func (*Message) GetMessageId

func (x *Message) GetMessageId() string

func (*Message) GetTimestamp

func (x *Message) GetTimestamp() *timestamp.Timestamp

func (*Message) GetUserId

func (x *Message) GetUserId() string

func (*Message) GetWorkspaceId

func (x *Message) GetWorkspaceId() 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

type PostMessageRequest

type PostMessageRequest struct {
	Token   string   `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Message *Message `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*PostMessageRequest) Descriptor deprecated

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

Deprecated: Use PostMessageRequest.ProtoReflect.Descriptor instead.

func (*PostMessageRequest) GetMessage

func (x *PostMessageRequest) GetMessage() *Message

func (*PostMessageRequest) GetToken

func (x *PostMessageRequest) GetToken() string

func (*PostMessageRequest) ProtoMessage

func (*PostMessageRequest) ProtoMessage()

func (*PostMessageRequest) ProtoReflect

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

func (*PostMessageRequest) Reset

func (x *PostMessageRequest) Reset()

func (*PostMessageRequest) String

func (x *PostMessageRequest) String() string

type SubscribeRequest

type SubscribeRequest struct {
	Token       string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	WorkspaceId string `protobuf:"bytes,2,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeRequest) Descriptor deprecated

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

Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRequest) GetToken

func (x *SubscribeRequest) GetToken() string

func (*SubscribeRequest) GetWorkspaceId

func (x *SubscribeRequest) GetWorkspaceId() string

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 *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeResponse) Descriptor deprecated

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

Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.

func (*SubscribeResponse) GetMessage

func (x *SubscribeResponse) GetMessage() *Message

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 UnimplementedChatServiceServer

type UnimplementedChatServiceServer struct {
}

UnimplementedChatServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedChatServiceServer) PostMessage

func (*UnimplementedChatServiceServer) Subscribe

func (*UnimplementedChatServiceServer) UpdateMessage

type UpdateMessageRequest

type UpdateMessageRequest struct {

	// message_id is the primary key
	NewMessage *Message `protobuf:"bytes,1,opt,name=new_message,json=newMessage,proto3" json:"new_message,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateMessageRequest) Descriptor deprecated

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

Deprecated: Use UpdateMessageRequest.ProtoReflect.Descriptor instead.

func (*UpdateMessageRequest) GetNewMessage

func (x *UpdateMessageRequest) GetNewMessage() *Message

func (*UpdateMessageRequest) ProtoMessage

func (*UpdateMessageRequest) ProtoMessage()

func (*UpdateMessageRequest) ProtoReflect

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

func (*UpdateMessageRequest) Reset

func (x *UpdateMessageRequest) Reset()

func (*UpdateMessageRequest) String

func (x *UpdateMessageRequest) String() string

Jump to

Keyboard shortcuts

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