Back to godoc.org

Package chat

v1.6.1
Latest Go to latest

The latest major version is .

Published: Jul 9, 2019 | License: AGPL-3.0 | Module: github.com/EngineerIG/cells

Overview

Package chat is a generated protocol buffer package.

It is generated from these files:

chat.proto

It has these top-level messages:

ChatRoom
ChatMessage
PutRoomRequest
PutRoomResponse
PostMessageRequest
PostMessageResponse
DeleteMessageRequest
DeleteMessageResponse
ListMessagesRequest
ListMessagesResponse
ListRoomsRequest
ListRoomsResponse
DeleteRoomRequest
DeleteRoomResponse
ChatEvent
WebSocketMessage

Package chat is a generated protocol buffer package.

It is generated from these files:

chat.proto

It has these top-level messages:

ChatRoom
ChatMessage
PutRoomRequest
PutRoomResponse
PostMessageRequest
PostMessageResponse
DeleteMessageRequest
DeleteMessageResponse
ListMessagesRequest
ListMessagesResponse
ListRoomsRequest
ListRoomsResponse
DeleteRoomRequest
DeleteRoomResponse
ChatEvent
WebSocketMessage

Index

Variables

var RoomType_name = map[int32]string{
	0: "GLOBAL",
	1: "WORKSPACE",
	2: "USER",
	3: "NODE",
}
var RoomType_value = map[string]int32{
	"GLOBAL":    0,
	"WORKSPACE": 1,
	"USER":      2,
	"NODE":      3,
}
var WsMessageType_name = map[int32]string{
	0: "JOIN",
	1: "LEAVE",
	2: "POST",
	3: "ROOM_UPDATE",
	4: "HISTORY",
	5: "DELETE_MSG",
	6: "DELETE_ROOM",
}
var WsMessageType_value = map[string]int32{
	"JOIN":        0,
	"LEAVE":       1,
	"POST":        2,
	"ROOM_UPDATE": 3,
	"HISTORY":     4,
	"DELETE_MSG":  5,
	"DELETE_ROOM": 6,
}

func RegisterChatServiceHandler

func RegisterChatServiceHandler(s server.Server, hdlr ChatServiceHandler, opts ...server.HandlerOption)

type ChatEvent

type ChatEvent struct {
	Message *ChatMessage `protobuf:"bytes,1,opt,name=Message" json:"Message,omitempty"`
	Room    *ChatRoom    `protobuf:"bytes,2,opt,name=Room" json:"Room,omitempty"`
	Details string       `protobuf:"bytes,3,opt,name=Details" json:"Details,omitempty"`
}

func (*ChatEvent) Descriptor

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

func (*ChatEvent) GetDetails

func (m *ChatEvent) GetDetails() string

func (*ChatEvent) GetMessage

func (m *ChatEvent) GetMessage() *ChatMessage

func (*ChatEvent) GetRoom

func (m *ChatEvent) GetRoom() *ChatRoom

func (*ChatEvent) ProtoMessage

func (*ChatEvent) ProtoMessage()

func (*ChatEvent) Reset

func (m *ChatEvent) Reset()

func (*ChatEvent) String

func (m *ChatEvent) String() string

type ChatMessage

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

func (*ChatMessage) Descriptor

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

func (*ChatMessage) GetActivity

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

func (*ChatMessage) GetAuthor

func (m *ChatMessage) GetAuthor() string

func (*ChatMessage) GetMessage

func (m *ChatMessage) GetMessage() string

func (*ChatMessage) GetRoomUuid

func (m *ChatMessage) GetRoomUuid() string

func (*ChatMessage) GetTimestamp

func (m *ChatMessage) GetTimestamp() int64

func (*ChatMessage) GetUuid

func (m *ChatMessage) GetUuid() string

func (*ChatMessage) ProtoMessage

func (*ChatMessage) ProtoMessage()

func (*ChatMessage) Reset

func (m *ChatMessage) Reset()

func (*ChatMessage) String

func (m *ChatMessage) String() string

type ChatRoom

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

func (*ChatRoom) Descriptor

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

func (*ChatRoom) GetLastUpdated

func (m *ChatRoom) GetLastUpdated() int32

func (*ChatRoom) GetRoomLabel

func (m *ChatRoom) GetRoomLabel() string

func (*ChatRoom) GetRoomTypeObject

func (m *ChatRoom) GetRoomTypeObject() string

func (*ChatRoom) GetType

func (m *ChatRoom) GetType() RoomType

func (*ChatRoom) GetUsers

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

func (*ChatRoom) GetUuid

func (m *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) Reset

func (m *ChatRoom) Reset()

func (*ChatRoom) String

func (m *ChatRoom) String() string

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 ChatService

type ChatService struct {
	ChatServiceHandler
}

func (*ChatService) DeleteMessage

func (h *ChatService) DeleteMessage(ctx context.Context, in *DeleteMessageRequest, out *DeleteMessageResponse) error

func (*ChatService) DeleteRoom

func (h *ChatService) DeleteRoom(ctx context.Context, in *DeleteRoomRequest, out *DeleteRoomResponse) error

func (*ChatService) ListMessages

func (h *ChatService) ListMessages(ctx context.Context, stream server.Streamer) error

func (*ChatService) ListRooms

func (h *ChatService) ListRooms(ctx context.Context, stream server.Streamer) error

func (*ChatService) PostMessage

func (h *ChatService) PostMessage(ctx context.Context, in *PostMessageRequest, out *PostMessageResponse) error

func (*ChatService) PutRoom

func (h *ChatService) PutRoom(ctx context.Context, in *PutRoomRequest, out *PutRoomResponse) error

type ChatService_ListMessagesClient

type ChatService_ListMessagesClient interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Recv() (*ListMessagesResponse, error)
}

type ChatService_ListMessagesStream

type ChatService_ListMessagesStream interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*ListMessagesResponse) error
}

type ChatService_ListRoomsClient

type ChatService_ListRoomsClient interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Recv() (*ListRoomsResponse, error)
}

type ChatService_ListRoomsStream

type ChatService_ListRoomsStream interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*ListRoomsResponse) error
}

type DeleteMessageRequest

type DeleteMessageRequest struct {
	Messages []*ChatMessage `protobuf:"bytes,1,rep,name=Messages" json:"Messages,omitempty"`
}

func (*DeleteMessageRequest) Descriptor

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

func (*DeleteMessageRequest) GetMessages

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

func (*DeleteMessageRequest) ProtoMessage

func (*DeleteMessageRequest) ProtoMessage()

func (*DeleteMessageRequest) Reset

func (m *DeleteMessageRequest) Reset()

func (*DeleteMessageRequest) String

func (m *DeleteMessageRequest) String() string

type DeleteMessageResponse

type DeleteMessageResponse struct {
	Success bool `protobuf:"varint,1,opt,name=Success" json:"Success,omitempty"`
}

func (*DeleteMessageResponse) Descriptor

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

func (*DeleteMessageResponse) GetSuccess

func (m *DeleteMessageResponse) GetSuccess() bool

func (*DeleteMessageResponse) ProtoMessage

func (*DeleteMessageResponse) ProtoMessage()

func (*DeleteMessageResponse) Reset

func (m *DeleteMessageResponse) Reset()

func (*DeleteMessageResponse) String

func (m *DeleteMessageResponse) String() string

type DeleteRoomRequest

type DeleteRoomRequest struct {
	Room *ChatRoom `protobuf:"bytes,1,opt,name=Room" json:"Room,omitempty"`
}

func (*DeleteRoomRequest) Descriptor

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

func (*DeleteRoomRequest) GetRoom

func (m *DeleteRoomRequest) GetRoom() *ChatRoom

func (*DeleteRoomRequest) ProtoMessage

func (*DeleteRoomRequest) ProtoMessage()

func (*DeleteRoomRequest) Reset

func (m *DeleteRoomRequest) Reset()

func (*DeleteRoomRequest) String

func (m *DeleteRoomRequest) String() string

type DeleteRoomResponse

type DeleteRoomResponse struct {
	Success bool `protobuf:"varint,1,opt,name=Success" json:"Success,omitempty"`
}

func (*DeleteRoomResponse) Descriptor

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

func (*DeleteRoomResponse) GetSuccess

func (m *DeleteRoomResponse) GetSuccess() bool

func (*DeleteRoomResponse) ProtoMessage

func (*DeleteRoomResponse) ProtoMessage()

func (*DeleteRoomResponse) Reset

func (m *DeleteRoomResponse) Reset()

func (*DeleteRoomResponse) String

func (m *DeleteRoomResponse) String() string

type ListMessagesRequest

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

func (*ListMessagesRequest) Descriptor

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

func (*ListMessagesRequest) GetLastMessage

func (m *ListMessagesRequest) GetLastMessage() string

func (*ListMessagesRequest) GetLimit

func (m *ListMessagesRequest) GetLimit() int64

func (*ListMessagesRequest) GetOffset

func (m *ListMessagesRequest) GetOffset() int64

func (*ListMessagesRequest) GetRoomUuid

func (m *ListMessagesRequest) GetRoomUuid() string

func (*ListMessagesRequest) ProtoMessage

func (*ListMessagesRequest) ProtoMessage()

func (*ListMessagesRequest) Reset

func (m *ListMessagesRequest) Reset()

func (*ListMessagesRequest) String

func (m *ListMessagesRequest) String() string

type ListMessagesResponse

type ListMessagesResponse struct {
	Message *ChatMessage `protobuf:"bytes,1,opt,name=Message" json:"Message,omitempty"`
}

func (*ListMessagesResponse) Descriptor

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

func (*ListMessagesResponse) GetMessage

func (m *ListMessagesResponse) GetMessage() *ChatMessage

func (*ListMessagesResponse) ProtoMessage

func (*ListMessagesResponse) ProtoMessage()

func (*ListMessagesResponse) Reset

func (m *ListMessagesResponse) Reset()

func (*ListMessagesResponse) String

func (m *ListMessagesResponse) String() string

type ListRoomsRequest

type ListRoomsRequest struct {
	ByType     RoomType `protobuf:"varint,1,opt,name=ByType,enum=chat.RoomType" json:"ByType,omitempty"`
	TypeObject string   `protobuf:"bytes,2,opt,name=TypeObject" json:"TypeObject,omitempty"`
}

func (*ListRoomsRequest) Descriptor

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

func (*ListRoomsRequest) GetByType

func (m *ListRoomsRequest) GetByType() RoomType

func (*ListRoomsRequest) GetTypeObject

func (m *ListRoomsRequest) GetTypeObject() string

func (*ListRoomsRequest) ProtoMessage

func (*ListRoomsRequest) ProtoMessage()

func (*ListRoomsRequest) Reset

func (m *ListRoomsRequest) Reset()

func (*ListRoomsRequest) String

func (m *ListRoomsRequest) String() string

type ListRoomsResponse

type ListRoomsResponse struct {
	Room *ChatRoom `protobuf:"bytes,1,opt,name=Room" json:"Room,omitempty"`
}

func (*ListRoomsResponse) Descriptor

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

func (*ListRoomsResponse) GetRoom

func (m *ListRoomsResponse) GetRoom() *ChatRoom

func (*ListRoomsResponse) ProtoMessage

func (*ListRoomsResponse) ProtoMessage()

func (*ListRoomsResponse) Reset

func (m *ListRoomsResponse) Reset()

func (*ListRoomsResponse) String

func (m *ListRoomsResponse) String() string

type PostMessageRequest

type PostMessageRequest struct {
	Messages []*ChatMessage `protobuf:"bytes,1,rep,name=Messages" json:"Messages,omitempty"`
}

func (*PostMessageRequest) Descriptor

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

func (*PostMessageRequest) GetMessages

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

func (*PostMessageRequest) ProtoMessage

func (*PostMessageRequest) ProtoMessage()

func (*PostMessageRequest) Reset

func (m *PostMessageRequest) Reset()

func (*PostMessageRequest) String

func (m *PostMessageRequest) String() string

type PostMessageResponse

type PostMessageResponse struct {
	Success  bool           `protobuf:"varint,1,opt,name=Success" json:"Success,omitempty"`
	Messages []*ChatMessage `protobuf:"bytes,2,rep,name=Messages" json:"Messages,omitempty"`
}

func (*PostMessageResponse) Descriptor

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

func (*PostMessageResponse) GetMessages

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

func (*PostMessageResponse) GetSuccess

func (m *PostMessageResponse) GetSuccess() bool

func (*PostMessageResponse) ProtoMessage

func (*PostMessageResponse) ProtoMessage()

func (*PostMessageResponse) Reset

func (m *PostMessageResponse) Reset()

func (*PostMessageResponse) String

func (m *PostMessageResponse) String() string

type PutRoomRequest

type PutRoomRequest struct {
	Room *ChatRoom `protobuf:"bytes,1,opt,name=Room" json:"Room,omitempty"`
}

func (*PutRoomRequest) Descriptor

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

func (*PutRoomRequest) GetRoom

func (m *PutRoomRequest) GetRoom() *ChatRoom

func (*PutRoomRequest) ProtoMessage

func (*PutRoomRequest) ProtoMessage()

func (*PutRoomRequest) Reset

func (m *PutRoomRequest) Reset()

func (*PutRoomRequest) String

func (m *PutRoomRequest) String() string

type PutRoomResponse

type PutRoomResponse struct {
	Room *ChatRoom `protobuf:"bytes,1,opt,name=Room" json:"Room,omitempty"`
}

func (*PutRoomResponse) Descriptor

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

func (*PutRoomResponse) GetRoom

func (m *PutRoomResponse) GetRoom() *ChatRoom

func (*PutRoomResponse) ProtoMessage

func (*PutRoomResponse) ProtoMessage()

func (*PutRoomResponse) Reset

func (m *PutRoomResponse) Reset()

func (*PutRoomResponse) String

func (m *PutRoomResponse) String() string

type RoomType

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

func (RoomType) EnumDescriptor

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

func (RoomType) String

func (x RoomType) String() string

type WebSocketMessage

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

func (*WebSocketMessage) Descriptor

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

func (*WebSocketMessage) GetMessage

func (m *WebSocketMessage) GetMessage() *ChatMessage

func (*WebSocketMessage) GetRoom

func (m *WebSocketMessage) GetRoom() *ChatRoom

func (*WebSocketMessage) GetType

func (m *WebSocketMessage) GetType() WsMessageType

func (*WebSocketMessage) ProtoMessage

func (*WebSocketMessage) ProtoMessage()

func (*WebSocketMessage) Reset

func (m *WebSocketMessage) Reset()

func (*WebSocketMessage) String

func (m *WebSocketMessage) String() string

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) EnumDescriptor

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

func (WsMessageType) String

func (x WsMessageType) String() string

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier