Documentation ¶
Index ¶
Constants ¶
View Source
const ( APIErrorDeviceNotFound = 1 APIErrorBodyParsing = 2 APIErrorDatabase = 3 APIErrorInvalidValue = 4 APIErrorExpiredToken = 6 TokenName = "EiPAccessToken" TokenExpirationTime = 86400 // in seconds: 1day FilterTypeAll = "all" FilterTypeSensor = "sensor" FilterTypeLed = "led" FilterTypeBlind = "blind" FilterTypeHvac = "hvac" FilterTypeWago = "wago" FilterTypeNano = "nanosense" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API struct { EventsToBackend chan map[string]interface{} // contains filtered or unexported fields }
type APIFunctions ¶
type APIFunctions struct {
Functions []string `json:"functions"`
}
type Claims ¶
type Claims struct {
jwt.StandardClaims
}
type Credentials ¶
type Credentials struct {
UserKey string `json:"userKey"`
}
type GlobalHistory ¶
type GlobalHistory struct {
Leds []LedHist `json:"leds"`
}
type InternalAPI ¶
type InternalAPI struct { EventsToBackend chan map[string]interface{} // contains filtered or unexported fields }
func InitInternalAPI ¶
func InitInternalAPI(db database.Database, conf pkg.ServiceConfig) *InternalAPI
InitInternalAPI start API connection
type UserAuthorization ¶
type UserAuthorization struct { Priviledges []string `json:"priviledges"` AccessGroup []int `json:"accessGroups"` }
UserAuthorization
Click to show internal directories.
Click to hide internal directories.