Documentation ¶
Index ¶
- type App
- func (a *App) AdminCreateDynamicConfig(w http.ResponseWriter, r *http.Request)
- func (a *App) AdminCreateRoom(w http.ResponseWriter, r *http.Request)
- func (a *App) AdminDeleteDynamicConfig(w http.ResponseWriter, r *http.Request)
- func (a *App) AdminDeleteRoom(w http.ResponseWriter, r *http.Request)
- func (a *App) AdminDeleteRoomsStatistics(w http.ResponseWriter, r *http.Request)
- func (a *App) AdminGatewaysHandleInfo(w http.ResponseWriter, r *http.Request)
- func (a *App) AdminGetDynamicConfig(w http.ResponseWriter, r *http.Request)
- func (a *App) AdminGetRoom(w http.ResponseWriter, r *http.Request)
- func (a *App) AdminListDynamicConfigs(w http.ResponseWriter, r *http.Request)
- func (a *App) AdminListGateways(w http.ResponseWriter, r *http.Request)
- func (a *App) AdminListRooms(w http.ResponseWriter, r *http.Request)
- func (a *App) AdminSetDynamicConfig(w http.ResponseWriter, r *http.Request)
- func (a *App) AdminUpdateDynamicConfig(w http.ResponseWriter, r *http.Request)
- func (a *App) AdminUpdateRoom(w http.ResponseWriter, r *http.Request)
- func (a *App) HealthCheck(w http.ResponseWriter, r *http.Request)
- func (a *App) Initialize()
- func (a *App) InitializeWithDeps(db common.DBInterface, tokenVerifier middleware.OIDCTokenVerifier)
- func (a *App) Notify(event interface{})
- func (a *App) Run()
- func (a *App) Shutdown()
- func (a *App) V1CreateGroup(w http.ResponseWriter, r *http.Request)
- func (a *App) V1GetComposite(w http.ResponseWriter, r *http.Request)
- func (a *App) V1GetRoom(w http.ResponseWriter, r *http.Request)
- func (a *App) V1GetUser(w http.ResponseWriter, r *http.Request)
- func (a *App) V1HandleEvent(w http.ResponseWriter, r *http.Request)
- func (a *App) V1HandleProtocol(w http.ResponseWriter, r *http.Request)
- func (a *App) V1HandleServiceProtocol(w http.ResponseWriter, r *http.Request)
- func (a *App) V1ListComposites(w http.ResponseWriter, r *http.Request)
- func (a *App) V1ListGroups(w http.ResponseWriter, r *http.Request)
- func (a *App) V1ListRooms(w http.ResponseWriter, r *http.Request)
- func (a *App) V1ListUsers(w http.ResponseWriter, r *http.Request)
- func (a *App) V1UpdateComposite(w http.ResponseWriter, r *http.Request)
- func (a *App) V1UpdateRoom(w http.ResponseWriter, r *http.Request)
- func (a *App) V1UpdateSession(w http.ResponseWriter, r *http.Request)
- func (a *App) V2GetConfig(w http.ResponseWriter, r *http.Request)
- func (a *App) V2GetRoomsStatistics(w http.ResponseWriter, r *http.Request)
- type AppCache
- type DynamicConfigCache
- func (c *DynamicConfigCache) ByKey(key string) (*models.DynamicConfig, bool)
- func (c *DynamicConfigCache) LastModified() time.Time
- func (c *DynamicConfigCache) Reload(db common.DBInterface) error
- func (c *DynamicConfigCache) Set(kv *models.DynamicConfig)
- func (c *DynamicConfigCache) Values() []*models.DynamicConfig
- type DynamicConfigsResponse
- type GatewayCache
- type GatewayDTO
- type GatewayTokenCache
- type GatewaysResponse
- type ListParams
- type ListResponse
- type MQTTListener
- type PahoLogAdapter
- type PeriodicSessionCleaner
- type ProtocolError
- type RoomCache
- type RoomsRequest
- type RoomsResponse
- type ServiceProtocolHandler
- type SessionManager
- type UserCache
- type V1Composite
- type V1CompositeRoom
- type V1ProtocolMessageText
- type V1Room
- type V1RoomInfo
- type V1ServiceProtocolHandler
- type V1ServiceProtocolMessageText
- type V1SessionManager
- func (sm *V1SessionManager) Close()
- func (sm *V1SessionManager) HandleEvent(ctx context.Context, event interface{}) error
- func (sm *V1SessionManager) HandleProtocol(ctx context.Context, msg *janus.TextroomPostMsg) error
- func (sm *V1SessionManager) Start()
- func (sm *V1SessionManager) UpsertSession(ctx context.Context, user *V1User) error
- type V1User
- type V2Config
- type V2Gateway
- type V2RoomStatistics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Router *mux.Router Handler http.Handler DB common.DBInterface // contains filtered or unexported fields }
func (*App) AdminCreateDynamicConfig ¶
func (a *App) AdminCreateDynamicConfig(w http.ResponseWriter, r *http.Request)
func (*App) AdminCreateRoom ¶
func (a *App) AdminCreateRoom(w http.ResponseWriter, r *http.Request)
func (*App) AdminDeleteDynamicConfig ¶
func (a *App) AdminDeleteDynamicConfig(w http.ResponseWriter, r *http.Request)
func (*App) AdminDeleteRoom ¶
func (a *App) AdminDeleteRoom(w http.ResponseWriter, r *http.Request)
func (*App) AdminDeleteRoomsStatistics ¶
func (a *App) AdminDeleteRoomsStatistics(w http.ResponseWriter, r *http.Request)
func (*App) AdminGatewaysHandleInfo ¶
func (a *App) AdminGatewaysHandleInfo(w http.ResponseWriter, r *http.Request)
func (*App) AdminGetDynamicConfig ¶
func (a *App) AdminGetDynamicConfig(w http.ResponseWriter, r *http.Request)
func (*App) AdminGetRoom ¶
func (a *App) AdminGetRoom(w http.ResponseWriter, r *http.Request)
func (*App) AdminListDynamicConfigs ¶
func (a *App) AdminListDynamicConfigs(w http.ResponseWriter, r *http.Request)
func (*App) AdminListGateways ¶
func (a *App) AdminListGateways(w http.ResponseWriter, r *http.Request)
func (*App) AdminListRooms ¶
func (a *App) AdminListRooms(w http.ResponseWriter, r *http.Request)
func (*App) AdminSetDynamicConfig ¶
func (a *App) AdminSetDynamicConfig(w http.ResponseWriter, r *http.Request)
func (*App) AdminUpdateDynamicConfig ¶
func (a *App) AdminUpdateDynamicConfig(w http.ResponseWriter, r *http.Request)
func (*App) AdminUpdateRoom ¶
func (a *App) AdminUpdateRoom(w http.ResponseWriter, r *http.Request)
func (*App) HealthCheck ¶
func (a *App) HealthCheck(w http.ResponseWriter, r *http.Request)
func (*App) Initialize ¶
func (a *App) Initialize()
func (*App) InitializeWithDeps ¶
func (a *App) InitializeWithDeps(db common.DBInterface, tokenVerifier middleware.OIDCTokenVerifier)
func (*App) V1CreateGroup ¶
func (a *App) V1CreateGroup(w http.ResponseWriter, r *http.Request)
func (*App) V1GetComposite ¶
func (a *App) V1GetComposite(w http.ResponseWriter, r *http.Request)
func (*App) V1HandleEvent ¶
func (a *App) V1HandleEvent(w http.ResponseWriter, r *http.Request)
func (*App) V1HandleProtocol ¶
func (a *App) V1HandleProtocol(w http.ResponseWriter, r *http.Request)
func (*App) V1HandleServiceProtocol ¶
func (a *App) V1HandleServiceProtocol(w http.ResponseWriter, r *http.Request)
func (*App) V1ListComposites ¶
func (a *App) V1ListComposites(w http.ResponseWriter, r *http.Request)
func (*App) V1ListGroups ¶
func (a *App) V1ListGroups(w http.ResponseWriter, r *http.Request)
func (*App) V1ListRooms ¶
func (a *App) V1ListRooms(w http.ResponseWriter, r *http.Request)
func (*App) V1ListUsers ¶
func (a *App) V1ListUsers(w http.ResponseWriter, r *http.Request)
func (*App) V1UpdateComposite ¶
func (a *App) V1UpdateComposite(w http.ResponseWriter, r *http.Request)
func (*App) V1UpdateRoom ¶
func (a *App) V1UpdateRoom(w http.ResponseWriter, r *http.Request)
func (*App) V1UpdateSession ¶
func (a *App) V1UpdateSession(w http.ResponseWriter, r *http.Request)
func (*App) V2GetConfig ¶
func (a *App) V2GetConfig(w http.ResponseWriter, r *http.Request)
func (*App) V2GetRoomsStatistics ¶
func (a *App) V2GetRoomsStatistics(w http.ResponseWriter, r *http.Request)
type DynamicConfigCache ¶
type DynamicConfigCache struct {
// contains filtered or unexported fields
}
func (*DynamicConfigCache) ByKey ¶
func (c *DynamicConfigCache) ByKey(key string) (*models.DynamicConfig, bool)
func (*DynamicConfigCache) LastModified ¶
func (c *DynamicConfigCache) LastModified() time.Time
func (*DynamicConfigCache) Reload ¶
func (c *DynamicConfigCache) Reload(db common.DBInterface) error
func (*DynamicConfigCache) Set ¶
func (c *DynamicConfigCache) Set(kv *models.DynamicConfig)
func (*DynamicConfigCache) Values ¶
func (c *DynamicConfigCache) Values() []*models.DynamicConfig
type DynamicConfigsResponse ¶
type DynamicConfigsResponse struct { ListResponse Items []*models.DynamicConfig `json:"data"` }
type GatewayCache ¶
type GatewayCache struct {
// contains filtered or unexported fields
}
func (*GatewayCache) Reload ¶
func (c *GatewayCache) Reload(db common.DBInterface) error
func (*GatewayCache) Set ¶
func (c *GatewayCache) Set(gateway *models.Gateway)
func (*GatewayCache) Values ¶
func (c *GatewayCache) Values() []*models.Gateway
type GatewayDTO ¶
type GatewayDTO struct { ID int64 `json:"id"` Name string `json:"name"` Description null.String `json:"description,omitempty"` URL string `json:"url"` Disabled bool `json:"disabled"` CreatedAt time.Time `json:"created_at"` UpdatedAt null.Time `json:"updated_at,omitempty"` RemovedAt null.Time `json:"removed_at,omitempty"` Type string `json:"type"` }
func NewGatewayDTO ¶
func NewGatewayDTO(g *models.Gateway) *GatewayDTO
type GatewayTokenCache ¶
type GatewayTokenCache struct {
// contains filtered or unexported fields
}
func (*GatewayTokenCache) Reload ¶
func (c *GatewayTokenCache) Reload(db common.DBInterface) error
type GatewaysResponse ¶
type GatewaysResponse struct { ListResponse Gateways []*GatewayDTO `json:"data"` }
type ListParams ¶
type ListParams struct { PageNumber int `json:"page_no"` PageSize int `json:"page_size"` OrderBy string `json:"order_by"` GroupBy string `json:"-"` }
func ParseListParams ¶
func ParseListParams(query url.Values) (*ListParams, error)
type ListResponse ¶
type ListResponse struct {
Total int64 `json:"total"`
}
type MQTTListener ¶
type MQTTListener struct {
// contains filtered or unexported fields
}
func NewMQTTListener ¶
func NewMQTTListener(cache *AppCache, sph ServiceProtocolHandler) *MQTTListener
func (*MQTTListener) Close ¶
func (l *MQTTListener) Close()
func (*MQTTListener) HandleServiceProtocol ¶
func (l *MQTTListener) HandleServiceProtocol(c mqtt.Client, m mqtt.Message)
func (*MQTTListener) Start ¶
func (l *MQTTListener) Start() error
func (*MQTTListener) Subscribe ¶
func (l *MQTTListener) Subscribe(c mqtt.Client)
type PahoLogAdapter ¶
type PahoLogAdapter struct {
// contains filtered or unexported fields
}
func NewPahoLogAdapter ¶
func NewPahoLogAdapter(level zerolog.Level) *PahoLogAdapter
func (*PahoLogAdapter) Printf ¶
func (a *PahoLogAdapter) Printf(format string, v ...interface{})
func (*PahoLogAdapter) Println ¶
func (a *PahoLogAdapter) Println(v ...interface{})
type PeriodicSessionCleaner ¶
type PeriodicSessionCleaner struct {
// contains filtered or unexported fields
}
func NewPeriodicSessionCleaner ¶
func NewPeriodicSessionCleaner(db common.DBInterface) *PeriodicSessionCleaner
func (*PeriodicSessionCleaner) Close ¶
func (psc *PeriodicSessionCleaner) Close()
func (*PeriodicSessionCleaner) Start ¶
func (psc *PeriodicSessionCleaner) Start()
type ProtocolError ¶
type ProtocolError struct {
errs.WithMessage
}
func NewProtocolError ¶
func NewProtocolError(msg string) *ProtocolError
func WrappingProtocolError ¶
func WrappingProtocolError(err error, msg string) *ProtocolError
type RoomsRequest ¶
func ParseRoomsRequest ¶
func ParseRoomsRequest(query url.Values) (*RoomsRequest, error)
type RoomsResponse ¶
type RoomsResponse struct { ListResponse Rooms []*models.Room `json:"data"` }
type ServiceProtocolHandler ¶
func NewV1ServiceProtocolHandler ¶
func NewV1ServiceProtocolHandler(cache *AppCache, rsm *domain.RoomStatisticsManager) ServiceProtocolHandler
type SessionManager ¶
type SessionManager interface { HandleEvent(context.Context, interface{}) error HandleProtocol(context.Context, *janus.TextroomPostMsg) error UpsertSession(context.Context, *V1User) error Start() Close() }
func NewV1SessionManager ¶
func NewV1SessionManager(db common.DBInterface, cache *AppCache) SessionManager
type V1Composite ¶
type V1Composite struct {
VQuad []*V1CompositeRoom `json:"vquad"`
}
type V1CompositeRoom ¶
type V1ProtocolMessageText ¶
type V1RoomInfo ¶
type V1ServiceProtocolHandler ¶
type V1ServiceProtocolHandler struct {
// contains filtered or unexported fields
}
func (*V1ServiceProtocolHandler) HandleMessage ¶
func (h *V1ServiceProtocolHandler) HandleMessage(payload string) error
type V1SessionManager ¶
type V1SessionManager struct {
// contains filtered or unexported fields
}
func (*V1SessionManager) Close ¶
func (sm *V1SessionManager) Close()
func (*V1SessionManager) HandleEvent ¶
func (sm *V1SessionManager) HandleEvent(ctx context.Context, event interface{}) error
func (*V1SessionManager) HandleProtocol ¶
func (sm *V1SessionManager) HandleProtocol(ctx context.Context, msg *janus.TextroomPostMsg) error
func (*V1SessionManager) Start ¶
func (sm *V1SessionManager) Start()
func (*V1SessionManager) UpsertSession ¶
func (sm *V1SessionManager) UpsertSession(ctx context.Context, user *V1User) error
type V1User ¶
type V1User struct { ID string `json:"id"` Display string `json:"display"` Email string `json:"email"` Group string `json:"group"` IP string `json:"ip"` Janus string `json:"janus"` Name string `json:"name"` Role string `json:"role"` System string `json:"system"` Username string `json:"username"` Room int `json:"room"` Timestamp int64 `json:"timestamp"` Session int64 `json:"session"` Handle int64 `json:"handle"` RFID int64 `json:"rfid"` TextroomHandle int64 `json:"textroom_handle"` Camera bool `json:"camera"` Question bool `json:"question"` SelfTest bool `json:"self_test"` SoundTest bool `json:"sound_test"` Extra map[string]interface{} `json:"extra"` }
type V2RoomStatistics ¶
type V2RoomStatistics struct {
OnAir int `json:"on_air"`
}
Click to show internal directories.
Click to hide internal directories.