Documentation
¶
Index ¶
Constants ¶
View Source
const ( AuthTokenKey = "token" AuthTokenValue = "authorized" )
View Source
const (
VERSION = "0.1.0"
)
Variables ¶
View Source
var ( ErrInvalidClientMessage = errors.New("invalid client message") ErrInvalidApiMessage = errors.New("invalid API message") ErrInvalidControlMessage = errors.New("invalid control message") ErrInvalidAdminMessage = errors.New("invalid admin message") ErrInvalidToken = errors.New("invalid token") ErrMethodNotFound = errors.New("method not found") ErrPermissionDenied = errors.New("permission denied") ErrProjectNotFound = errors.New("project not found") ErrNamespaceNotFound = errors.New("namespace not found") ErrInternalServerError = errors.New("internal server error") ErrLimitExceeded = errors.New("limit exceeded") ErrNotAvailable = errors.New("not available") ErrConnectionExpired = errors.New("connection expired") )
Functions ¶
Types ¶
type ChannelOptions ¶
type ChannelOptions struct {
// Watch determines if message published into channel will be sent into admin channel
Watch bool `json:"watch"`
// Publish determines if client can publish messages into channel directly
Publish bool `json:"publish"`
// Anonymous determines is anonymous access (with empty user ID) allowed or not
Anonymous bool `json:"anonymous"`
// Presence turns on(off) presence information for channels
Presence bool `json:"presence"`
// HistorySize determines max amount of history messages for channel, 0 means no history for channel
HistorySize int64 `mapstructure:"history_size" json:"history_size"`
// HistoryLifetime determines time in seconds until expiration for history messages
HistoryLifetime int64 `mapstructure:"history_lifetime" json:"history_lifetime"`
// JoinLeave turns on(off) join/leave messages for channels
JoinLeave bool `mapstructure:"join_leave" json:"join_leave"`
}
ChannelOptions represent channel specific configuration for namespace or project in a whole
Source Files
¶
Click to show internal directories.
Click to hide internal directories.