Documentation ¶
Index ¶
- Constants
- func RunMigrations(db *sql.DB) error
- type Broker
- type Channel
- type ChannelEntry
- type FileEntry
- type FileUpload
- type Handler
- type LoginReq
- type Message
- type Repo
- func (r *Repo) GetChannel(id string) (string, error)
- func (r *Repo) GetChannelByName(name string) (string, error)
- func (r *Repo) GetChannels() ([]*ChannelEntry, error)
- func (r *Repo) GetMessages(channel string) ([][]byte, error)
- func (r *Repo) NewChannel(name string) (string, error)
- func (r *Repo) NewUser(username, password string) (string, error)
- func (r *Repo) SaveMessage(channel, user string, ts int64, message []byte) (string, error)
- type SSE
- type WS
Constants ¶
View Source
const ( MessageType_System = "system" MessageType_Msg = "msg" )
Variables ¶
This section is empty.
Functions ¶
func RunMigrations ¶
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
func (*Broker) NewChannel ¶
func (b *Broker) NewChannel(w http.ResponseWriter, r *http.Request)
type ChannelEntry ¶
type FileUpload ¶
type FileUpload struct {
// contains filtered or unexported fields
}
func NewFileUpload ¶
func NewFileUpload(broker *Broker) *FileUpload
type Handler ¶
type Handler interface {
Subscribe(w http.ResponseWriter, r *http.Request, b *Broker)
}
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func (*Repo) GetChannels ¶
func (r *Repo) GetChannels() ([]*ChannelEntry, error)
Click to show internal directories.
Click to hide internal directories.