Documentation ¶
Index ¶
- func New(serviceNumber int) service.Service
- type API
- func (api *API) Close() error
- func (api *API) CreateTrapListener(tl models.TrapListener)
- func (api *API) DeleteTrapListener(id int32)
- func (api *API) GetServicesStatus() []service.ServiceStatus
- func (api *API) Run()
- func (api *API) SetUserActivity(userId int32)
- func (api *API) UpdateTrapListener(tl models.TrapListener)
- type APIResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API struct { service.Tools // AmqpConn is the amqp connection. AmqpConn *amqp.Conn // Postgresql handler. PG *pg.PG // Influx is the influxdb client. Influx *influxdb.Client // Cache is the cache handler. Cache *cache.Cache // Gin web fremework engine. Router *gin.Engine // Auth handler. Auth *auth.Auth // Validator. Validate *validator.Validate // User pw hash cost. UserPWBcryptCost int // Logger is the internal logger. Log *logger.Logger // Counter is the request counter. Counter *counter.Counter // Group is an singleflight group to use across the // http requests. Group singleflight.Group // ServerRTSP is the reverse proxy RTSP server. ServerRTSP *proxyrtsp.Server // ProxyRTSP is the reverse proxy RTSP manager. // ProxyRTSP *proxyrtsp.Proxy // WebSocketManager is the web socket connection manager. WebSocket *websocket.Manager // contains filtered or unexported fields }
func (*API) CreateTrapListener ¶
func (api *API) CreateTrapListener(tl models.TrapListener)
CreateTrapListener assumes that the trap listener is was created on database and run the listener.
func (*API) DeleteTrapListener ¶
DeleteTrapListener assumes that the trap listener is was deleted from database and stops and remove the listener.
func (*API) GetServicesStatus ¶
func (api *API) GetServicesStatus() []service.ServiceStatus
GetServices status returns the current status of the services saved locally.
func (*API) SetUserActivity ¶
func (*API) UpdateTrapListener ¶
func (api *API) UpdateTrapListener(tl models.TrapListener)
UpdateTrapListener assumes that the trap listener is was updated on database and updates the listener.
type APIResponse ¶
Click to show internal directories.
Click to hide internal directories.