Documentation
¶
Index ¶
- type ChatServer
- type Connection
- type Message
- type Room
- type RoomHub
- type Server
- type Store
- func (s *Store) CreateRoom(ctx context.Context, userID string, name string) (*Room, error)
- func (s *Store) GetRoomHub(ctx context.Context, roomID string) (*RoomHub, error)
- func (s *Store) LoadMessages(ctx context.Context, roomID string) (messages []*Message, lastNumber int, err error)
- func (s *Store) SaveMessage(ctx context.Context, message *Message) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatServer ¶
type ChatServer struct { // UnimplementedChatServiceServer must be embedded to have forwarded compatible implementations. chat.UnimplementedChatServiceServer // contains filtered or unexported fields }
func NewChatServer ¶
func NewChatServer(store *Store, cfg *config.Config) *ChatServer
func (*ChatServer) Connect ¶
func (s *ChatServer) Connect(stream chat.ChatService_ConnectServer) error
func (*ChatServer) CreateRoom ¶
func (s *ChatServer) CreateRoom(ctx context.Context, request *chat.CreateRoomRequest) (*chat.CreateRoomResponse, error)
type Connection ¶
type RoomHub ¶
type RoomHub struct {
// contains filtered or unexported fields
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func (*Store) CreateRoom ¶
func (*Store) GetRoomHub ¶
func (*Store) LoadMessages ¶
Click to show internal directories.
Click to hide internal directories.