chat

package
v4.0.0-alpha3 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RoomType_name = map[int32]string{
		0: "GLOBAL",
		1: "WORKSPACE",
		2: "USER",
		3: "NODE",
	}
	RoomType_value = map[string]int32{
		"GLOBAL":    0,
		"WORKSPACE": 1,
		"USER":      2,
		"NODE":      3,
	}
)

Enum value maps for RoomType.

View Source
var (
	WsMessageType_name = map[int32]string{
		0: "JOIN",
		1: "LEAVE",
		2: "POST",
		3: "ROOM_UPDATE",
		4: "HISTORY",
		5: "DELETE_MSG",
		6: "DELETE_ROOM",
	}
	WsMessageType_value = map[string]int32{
		"JOIN":        0,
		"LEAVE":       1,
		"POST":        2,
		"ROOM_UPDATE": 3,
		"HISTORY":     4,
		"DELETE_MSG":  5,
		"DELETE_ROOM": 6,
	}
)

Enum value maps for WsMessageType.

View Source
var ChatService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "chat.ChatService",
	HandlerType: (*ChatServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PutRoom",
			Handler:    _ChatService_PutRoom_Handler,
		},
		{
			MethodName: "DeleteRoom",
			Handler:    _ChatService_DeleteRoom_Handler,
		},
		{
			MethodName: "PostMessage",
			Handler:    _ChatService_PostMessage_Handler,
		},
		{
			MethodName: "DeleteMessage",
			Handler:    _ChatService_DeleteMessage_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ListRooms",
			Handler:       _ChatService_ListRooms_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "ListMessages",
			Handler:       _ChatService_ListMessages_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "cells-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_cells_chat_proto protoreflect.FileDescriptor

Functions

func DeregisterChatServiceEnhancedServer

func DeregisterChatServiceEnhancedServer(s grpc.ServiceRegistrar, name string)

func RegisterChatServiceEnhancedServer

func RegisterChatServiceEnhancedServer(s grpc.ServiceRegistrar, srv NamedChatServiceServer)

func RegisterChatServiceServer

func RegisterChatServiceServer(s grpc.ServiceRegistrar, srv ChatServiceServer)

Types

type ChatEvent

type ChatEvent struct {
	Message *ChatMessage `protobuf:"bytes,1,opt,name=Message,proto3" json:"Message,omitempty"`
	Room    *ChatRoom    `protobuf:"bytes,2,opt,name=Room,proto3" json:"Room,omitempty"`
	Details string       `protobuf:"bytes,3,opt,name=Details,proto3" json:"Details,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatEvent) Descriptor deprecated

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

Deprecated: Use ChatEvent.ProtoReflect.Descriptor instead.

func (*ChatEvent) GetDetails

func (x *ChatEvent) GetDetails() string

func (*ChatEvent) GetMessage

func (x *ChatEvent) GetMessage() *ChatMessage

func (*ChatEvent) GetRoom

func (x *ChatEvent) GetRoom() *ChatRoom

func (*ChatEvent) ProtoMessage

func (*ChatEvent) ProtoMessage()

func (*ChatEvent) ProtoReflect

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

func (*ChatEvent) Reset

func (x *ChatEvent) Reset()

func (*ChatEvent) String

func (x *ChatEvent) String() string

func (*ChatEvent) Validate

func (this *ChatEvent) Validate() error

type ChatMessage

type ChatMessage struct {
	Uuid      string           `protobuf:"bytes,1,opt,name=Uuid,proto3" json:"Uuid,omitempty"`
	RoomUuid  string           `protobuf:"bytes,2,opt,name=RoomUuid,proto3" json:"RoomUuid,omitempty"`
	Message   string           `protobuf:"bytes,3,opt,name=Message,proto3" json:"Message,omitempty"`
	Author    string           `protobuf:"bytes,4,opt,name=Author,proto3" json:"Author,omitempty"`
	Timestamp int64            `protobuf:"varint,5,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
	Activity  *activity.Object `protobuf:"bytes,6,opt,name=Activity,proto3" json:"Activity,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatMessage) Descriptor deprecated

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

Deprecated: Use ChatMessage.ProtoReflect.Descriptor instead.

func (*ChatMessage) GetActivity

func (x *ChatMessage) GetActivity() *activity.Object

func (*ChatMessage) GetAuthor

func (x *ChatMessage) GetAuthor() string

func (*ChatMessage) GetMessage

func (x *ChatMessage) GetMessage() string

func (*ChatMessage) GetRoomUuid

func (x *ChatMessage) GetRoomUuid() string

func (*ChatMessage) GetTimestamp

func (x *ChatMessage) GetTimestamp() int64

func (*ChatMessage) GetUuid

func (x *ChatMessage) GetUuid() 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

func (*ChatMessage) Validate

func (this *ChatMessage) Validate() error

type ChatRoom

type ChatRoom struct {
	Uuid           string   `protobuf:"bytes,1,opt,name=Uuid,proto3" json:"Uuid,omitempty"`
	Type           RoomType `protobuf:"varint,2,opt,name=Type,proto3,enum=chat.RoomType" json:"Type,omitempty"`
	RoomTypeObject string   `protobuf:"bytes,3,opt,name=RoomTypeObject,proto3" json:"RoomTypeObject,omitempty"`
	RoomLabel      string   `protobuf:"bytes,4,opt,name=RoomLabel,proto3" json:"RoomLabel,omitempty"`
	Users          []string `protobuf:"bytes,5,rep,name=Users,proto3" json:"Users,omitempty"`
	LastUpdated    int32    `protobuf:"varint,6,opt,name=LastUpdated,proto3" json:"LastUpdated,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatRoom) Descriptor deprecated

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

Deprecated: Use ChatRoom.ProtoReflect.Descriptor instead.

func (*ChatRoom) GetLastUpdated

func (x *ChatRoom) GetLastUpdated() int32

func (*ChatRoom) GetRoomLabel

func (x *ChatRoom) GetRoomLabel() string

func (*ChatRoom) GetRoomTypeObject

func (x *ChatRoom) GetRoomTypeObject() string

func (*ChatRoom) GetType

func (x *ChatRoom) GetType() RoomType

func (*ChatRoom) GetUsers

func (x *ChatRoom) GetUsers() []string

func (*ChatRoom) GetUuid

func (x *ChatRoom) GetUuid() string

func (*ChatRoom) MarshalLogObject

func (c *ChatRoom) MarshalLogObject(encoder zapcore.ObjectEncoder) error

MarshalLogObject implements custom marshalling for logs

func (*ChatRoom) ProtoMessage

func (*ChatRoom) ProtoMessage()

func (*ChatRoom) ProtoReflect

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

func (*ChatRoom) Reset

func (x *ChatRoom) Reset()

func (*ChatRoom) String

func (x *ChatRoom) String() string

func (*ChatRoom) Validate

func (this *ChatRoom) Validate() error

func (*ChatRoom) Zap

func (c *ChatRoom) Zap() zapcore.Field

Zap simply returns a zapcore.Field object populated with this ChatRoom under a standard key

type ChatServiceClient

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 ChatServiceEnhancedServer

type ChatServiceEnhancedServer map[string]NamedChatServiceServer

func (ChatServiceEnhancedServer) DeleteMessage

func (ChatServiceEnhancedServer) DeleteRoom

func (ChatServiceEnhancedServer) ListMessages

func (ChatServiceEnhancedServer) ListRooms

func (ChatServiceEnhancedServer) PostMessage

func (ChatServiceEnhancedServer) PutRoom

type ChatServiceServer

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

type ChatService_ListMessagesClient

type ChatService_ListMessagesClient interface {
	Recv() (*ListMessagesResponse, error)
	grpc.ClientStream
}

type ChatService_ListMessagesServer

type ChatService_ListMessagesServer interface {
	Send(*ListMessagesResponse) error
	grpc.ServerStream
}

type ChatService_ListRoomsClient

type ChatService_ListRoomsClient interface {
	Recv() (*ListRoomsResponse, error)
	grpc.ClientStream
}

type ChatService_ListRoomsServer

type ChatService_ListRoomsServer interface {
	Send(*ListRoomsResponse) error
	grpc.ServerStream
}

type DeleteMessageRequest

type DeleteMessageRequest struct {
	Messages []*ChatMessage `protobuf:"bytes,1,rep,name=Messages,proto3" json:"Messages,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteMessageRequest) Descriptor deprecated

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

Deprecated: Use DeleteMessageRequest.ProtoReflect.Descriptor instead.

func (*DeleteMessageRequest) GetMessages

func (x *DeleteMessageRequest) GetMessages() []*ChatMessage

func (*DeleteMessageRequest) ProtoMessage

func (*DeleteMessageRequest) ProtoMessage()

func (*DeleteMessageRequest) ProtoReflect

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

func (*DeleteMessageRequest) Reset

func (x *DeleteMessageRequest) Reset()

func (*DeleteMessageRequest) String

func (x *DeleteMessageRequest) String() string

func (*DeleteMessageRequest) Validate

func (this *DeleteMessageRequest) Validate() error

type DeleteMessageResponse

type DeleteMessageResponse struct {
	Success bool `protobuf:"varint,1,opt,name=Success,proto3" json:"Success,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteMessageResponse) Descriptor deprecated

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

Deprecated: Use DeleteMessageResponse.ProtoReflect.Descriptor instead.

func (*DeleteMessageResponse) GetSuccess

func (x *DeleteMessageResponse) GetSuccess() bool

func (*DeleteMessageResponse) ProtoMessage

func (*DeleteMessageResponse) ProtoMessage()

func (*DeleteMessageResponse) ProtoReflect

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

func (*DeleteMessageResponse) Reset

func (x *DeleteMessageResponse) Reset()

func (*DeleteMessageResponse) String

func (x *DeleteMessageResponse) String() string

func (*DeleteMessageResponse) Validate

func (this *DeleteMessageResponse) Validate() error

type DeleteRoomRequest

type DeleteRoomRequest struct {
	Room *ChatRoom `protobuf:"bytes,1,opt,name=Room,proto3" json:"Room,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRoomRequest) Descriptor deprecated

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

Deprecated: Use DeleteRoomRequest.ProtoReflect.Descriptor instead.

func (*DeleteRoomRequest) GetRoom

func (x *DeleteRoomRequest) GetRoom() *ChatRoom

func (*DeleteRoomRequest) ProtoMessage

func (*DeleteRoomRequest) ProtoMessage()

func (*DeleteRoomRequest) ProtoReflect

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

func (*DeleteRoomRequest) Reset

func (x *DeleteRoomRequest) Reset()

func (*DeleteRoomRequest) String

func (x *DeleteRoomRequest) String() string

func (*DeleteRoomRequest) Validate

func (this *DeleteRoomRequest) Validate() error

type DeleteRoomResponse

type DeleteRoomResponse struct {
	Success bool `protobuf:"varint,1,opt,name=Success,proto3" json:"Success,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRoomResponse) Descriptor deprecated

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

Deprecated: Use DeleteRoomResponse.ProtoReflect.Descriptor instead.

func (*DeleteRoomResponse) GetSuccess

func (x *DeleteRoomResponse) GetSuccess() bool

func (*DeleteRoomResponse) ProtoMessage

func (*DeleteRoomResponse) ProtoMessage()

func (*DeleteRoomResponse) ProtoReflect

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

func (*DeleteRoomResponse) Reset

func (x *DeleteRoomResponse) Reset()

func (*DeleteRoomResponse) String

func (x *DeleteRoomResponse) String() string

func (*DeleteRoomResponse) Validate

func (this *DeleteRoomResponse) Validate() error

type ListMessagesRequest

type ListMessagesRequest struct {
	RoomUuid string `protobuf:"bytes,1,opt,name=RoomUuid,proto3" json:"RoomUuid,omitempty"`
	// List starting at a given message ID
	LastMessage string `protobuf:"bytes,2,opt,name=LastMessage,proto3" json:"LastMessage,omitempty"`
	Offset      int64  `protobuf:"varint,3,opt,name=Offset,proto3" json:"Offset,omitempty"`
	Limit       int64  `protobuf:"varint,4,opt,name=Limit,proto3" json:"Limit,omitempty"`
	// contains filtered or unexported fields
}

func (*ListMessagesRequest) Descriptor deprecated

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

Deprecated: Use ListMessagesRequest.ProtoReflect.Descriptor instead.

func (*ListMessagesRequest) GetLastMessage

func (x *ListMessagesRequest) GetLastMessage() string

func (*ListMessagesRequest) GetLimit

func (x *ListMessagesRequest) GetLimit() int64

func (*ListMessagesRequest) GetOffset

func (x *ListMessagesRequest) GetOffset() int64

func (*ListMessagesRequest) GetRoomUuid

func (x *ListMessagesRequest) GetRoomUuid() string

func (*ListMessagesRequest) ProtoMessage

func (*ListMessagesRequest) ProtoMessage()

func (*ListMessagesRequest) ProtoReflect

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

func (*ListMessagesRequest) Reset

func (x *ListMessagesRequest) Reset()

func (*ListMessagesRequest) String

func (x *ListMessagesRequest) String() string

func (*ListMessagesRequest) Validate

func (this *ListMessagesRequest) Validate() error

type ListMessagesResponse

type ListMessagesResponse struct {
	Message *ChatMessage `protobuf:"bytes,1,opt,name=Message,proto3" json:"Message,omitempty"`
	// contains filtered or unexported fields
}

func (*ListMessagesResponse) Descriptor deprecated

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

Deprecated: Use ListMessagesResponse.ProtoReflect.Descriptor instead.

func (*ListMessagesResponse) GetMessage

func (x *ListMessagesResponse) GetMessage() *ChatMessage

func (*ListMessagesResponse) ProtoMessage

func (*ListMessagesResponse) ProtoMessage()

func (*ListMessagesResponse) ProtoReflect

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

func (*ListMessagesResponse) Reset

func (x *ListMessagesResponse) Reset()

func (*ListMessagesResponse) String

func (x *ListMessagesResponse) String() string

func (*ListMessagesResponse) Validate

func (this *ListMessagesResponse) Validate() error

type ListRoomsRequest

type ListRoomsRequest struct {
	ByType     RoomType `protobuf:"varint,1,opt,name=ByType,proto3,enum=chat.RoomType" json:"ByType,omitempty"`
	TypeObject string   `protobuf:"bytes,2,opt,name=TypeObject,proto3" json:"TypeObject,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRoomsRequest) Descriptor deprecated

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

Deprecated: Use ListRoomsRequest.ProtoReflect.Descriptor instead.

func (*ListRoomsRequest) GetByType

func (x *ListRoomsRequest) GetByType() RoomType

func (*ListRoomsRequest) GetTypeObject

func (x *ListRoomsRequest) GetTypeObject() string

func (*ListRoomsRequest) ProtoMessage

func (*ListRoomsRequest) ProtoMessage()

func (*ListRoomsRequest) ProtoReflect

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

func (*ListRoomsRequest) Reset

func (x *ListRoomsRequest) Reset()

func (*ListRoomsRequest) String

func (x *ListRoomsRequest) String() string

func (*ListRoomsRequest) Validate

func (this *ListRoomsRequest) Validate() error

type ListRoomsResponse

type ListRoomsResponse struct {
	Room *ChatRoom `protobuf:"bytes,1,opt,name=Room,proto3" json:"Room,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRoomsResponse) Descriptor deprecated

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

Deprecated: Use ListRoomsResponse.ProtoReflect.Descriptor instead.

func (*ListRoomsResponse) GetRoom

func (x *ListRoomsResponse) GetRoom() *ChatRoom

func (*ListRoomsResponse) ProtoMessage

func (*ListRoomsResponse) ProtoMessage()

func (*ListRoomsResponse) ProtoReflect

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

func (*ListRoomsResponse) Reset

func (x *ListRoomsResponse) Reset()

func (*ListRoomsResponse) String

func (x *ListRoomsResponse) String() string

func (*ListRoomsResponse) Validate

func (this *ListRoomsResponse) Validate() error

type NamedChatServiceServer

type NamedChatServiceServer interface {
	ChatServiceServer
	Name() string
}

type PostMessageRequest

type PostMessageRequest struct {
	Messages []*ChatMessage `protobuf:"bytes,1,rep,name=Messages,proto3" json:"Messages,omitempty"`
	// contains filtered or unexported fields
}

func (*PostMessageRequest) Descriptor deprecated

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

Deprecated: Use PostMessageRequest.ProtoReflect.Descriptor instead.

func (*PostMessageRequest) GetMessages

func (x *PostMessageRequest) GetMessages() []*ChatMessage

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

func (*PostMessageRequest) Validate

func (this *PostMessageRequest) Validate() error

type PostMessageResponse

type PostMessageResponse struct {
	Success  bool           `protobuf:"varint,1,opt,name=Success,proto3" json:"Success,omitempty"`
	Messages []*ChatMessage `protobuf:"bytes,2,rep,name=Messages,proto3" json:"Messages,omitempty"`
	// contains filtered or unexported fields
}

func (*PostMessageResponse) Descriptor deprecated

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

Deprecated: Use PostMessageResponse.ProtoReflect.Descriptor instead.

func (*PostMessageResponse) GetMessages

func (x *PostMessageResponse) GetMessages() []*ChatMessage

func (*PostMessageResponse) GetSuccess

func (x *PostMessageResponse) GetSuccess() bool

func (*PostMessageResponse) ProtoMessage

func (*PostMessageResponse) ProtoMessage()

func (*PostMessageResponse) ProtoReflect

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

func (*PostMessageResponse) Reset

func (x *PostMessageResponse) Reset()

func (*PostMessageResponse) String

func (x *PostMessageResponse) String() string

func (*PostMessageResponse) Validate

func (this *PostMessageResponse) Validate() error

type PutRoomRequest

type PutRoomRequest struct {
	Room *ChatRoom `protobuf:"bytes,1,opt,name=Room,proto3" json:"Room,omitempty"`
	// contains filtered or unexported fields
}

func (*PutRoomRequest) Descriptor deprecated

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

Deprecated: Use PutRoomRequest.ProtoReflect.Descriptor instead.

func (*PutRoomRequest) GetRoom

func (x *PutRoomRequest) GetRoom() *ChatRoom

func (*PutRoomRequest) ProtoMessage

func (*PutRoomRequest) ProtoMessage()

func (*PutRoomRequest) ProtoReflect

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

func (*PutRoomRequest) Reset

func (x *PutRoomRequest) Reset()

func (*PutRoomRequest) String

func (x *PutRoomRequest) String() string

func (*PutRoomRequest) Validate

func (this *PutRoomRequest) Validate() error

type PutRoomResponse

type PutRoomResponse struct {
	Room *ChatRoom `protobuf:"bytes,1,opt,name=Room,proto3" json:"Room,omitempty"`
	// contains filtered or unexported fields
}

func (*PutRoomResponse) Descriptor deprecated

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

Deprecated: Use PutRoomResponse.ProtoReflect.Descriptor instead.

func (*PutRoomResponse) GetRoom

func (x *PutRoomResponse) GetRoom() *ChatRoom

func (*PutRoomResponse) ProtoMessage

func (*PutRoomResponse) ProtoMessage()

func (*PutRoomResponse) ProtoReflect

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

func (*PutRoomResponse) Reset

func (x *PutRoomResponse) Reset()

func (*PutRoomResponse) String

func (x *PutRoomResponse) String() string

func (*PutRoomResponse) Validate

func (this *PutRoomResponse) Validate() error

type RoomType

type RoomType int32
const (
	RoomType_GLOBAL    RoomType = 0
	RoomType_WORKSPACE RoomType = 1
	RoomType_USER      RoomType = 2
	RoomType_NODE      RoomType = 3
)

func (RoomType) Descriptor

func (RoomType) Descriptor() protoreflect.EnumDescriptor

func (RoomType) Enum

func (x RoomType) Enum() *RoomType

func (RoomType) EnumDescriptor deprecated

func (RoomType) EnumDescriptor() ([]byte, []int)

Deprecated: Use RoomType.Descriptor instead.

func (RoomType) Number

func (x RoomType) Number() protoreflect.EnumNumber

func (RoomType) String

func (x RoomType) String() string

func (RoomType) Type

type UnimplementedChatServiceServer

type UnimplementedChatServiceServer struct {
}

UnimplementedChatServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedChatServiceServer) DeleteMessage

func (UnimplementedChatServiceServer) DeleteRoom

func (UnimplementedChatServiceServer) ListMessages

func (UnimplementedChatServiceServer) ListRooms

func (UnimplementedChatServiceServer) PostMessage

func (UnimplementedChatServiceServer) PutRoom

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.

type WebSocketMessage

type WebSocketMessage struct {
	Type    WsMessageType `protobuf:"varint,1,opt,name=Type,json=@type,proto3,enum=chat.WsMessageType" json:"Type,omitempty"`
	Room    *ChatRoom     `protobuf:"bytes,2,opt,name=Room,proto3" json:"Room,omitempty"`
	Message *ChatMessage  `protobuf:"bytes,3,opt,name=Message,proto3" json:"Message,omitempty"`
	// contains filtered or unexported fields
}

func (*WebSocketMessage) Descriptor deprecated

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

Deprecated: Use WebSocketMessage.ProtoReflect.Descriptor instead.

func (*WebSocketMessage) GetMessage

func (x *WebSocketMessage) GetMessage() *ChatMessage

func (*WebSocketMessage) GetRoom

func (x *WebSocketMessage) GetRoom() *ChatRoom

func (*WebSocketMessage) GetType

func (x *WebSocketMessage) GetType() WsMessageType

func (*WebSocketMessage) ProtoMessage

func (*WebSocketMessage) ProtoMessage()

func (*WebSocketMessage) ProtoReflect

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

func (*WebSocketMessage) Reset

func (x *WebSocketMessage) Reset()

func (*WebSocketMessage) String

func (x *WebSocketMessage) String() string

func (*WebSocketMessage) Validate

func (this *WebSocketMessage) Validate() error

type WsMessageType

type WsMessageType int32
const (
	WsMessageType_JOIN        WsMessageType = 0
	WsMessageType_LEAVE       WsMessageType = 1
	WsMessageType_POST        WsMessageType = 2
	WsMessageType_ROOM_UPDATE WsMessageType = 3
	WsMessageType_HISTORY     WsMessageType = 4
	WsMessageType_DELETE_MSG  WsMessageType = 5
	WsMessageType_DELETE_ROOM WsMessageType = 6
)

func (WsMessageType) Descriptor

func (WsMessageType) Enum

func (x WsMessageType) Enum() *WsMessageType

func (WsMessageType) EnumDescriptor deprecated

func (WsMessageType) EnumDescriptor() ([]byte, []int)

Deprecated: Use WsMessageType.Descriptor instead.

func (WsMessageType) Number

func (WsMessageType) String

func (x WsMessageType) String() string

func (WsMessageType) Type

Jump to

Keyboard shortcuts

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