Documentation ¶
Index ¶
- Constants
- type ActiveSession
- type AuthClaims
- type ConnectedDevice
- type Device
- type DeviceAuth
- type DeviceAuthClaims
- type DeviceAuthRequest
- type DeviceAuthResponse
- type DeviceIdentity
- type DeviceInfo
- type Endpoints
- type Info
- type MqttACLQuery
- type MqttAuthQuery
- type MqttClientEvent
- type MqttEvent
- type Session
- type Stats
- type UID
- type User
- type UserAuthClaims
- type UserAuthRequest
- type UserAuthResponse
Constants ¶
View Source
const ( MqttClientConnectedEventType = "client_connected" MqttClientDisconnectedEventType = "client_disconnected" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveSession ¶
type AuthClaims ¶ added in v0.2.0
type AuthClaims struct {
Claims string `json:"claims"`
}
type ConnectedDevice ¶
type Device ¶
type Device struct { UID string `json:"uid"` Name string `json:"name" bson:"name,omitempty"` Identity *DeviceIdentity `json:"identity"` Info *DeviceInfo `json:"info"` PublicKey string `json:"public_key" bson:"public_key"` TenantID string `json:"tenant_id" bson:"tenant_id"` LastSeen time.Time `json:"last_seen" bson:"last_seen"` Online bool `json:"online" bson:",omitempty"` Namespace string `json:"namespace" bson:",omitempty"` }
type DeviceAuth ¶
type DeviceAuth struct { Identity *DeviceIdentity `json:"identity"` PublicKey string `json:"public_key"` TenantID string `json:"tenant_id"` }
type DeviceAuthClaims ¶
type DeviceAuthClaims struct { UID string `json:"uid"` AuthClaims `json:",squash"` jwt.StandardClaims `json:",squash"` }
type DeviceAuthRequest ¶
type DeviceAuthRequest struct { Info *DeviceInfo `json:"info"` Sessions []string `json:"sessions,omitempty"` *DeviceAuth }
type DeviceAuthResponse ¶
type DeviceIdentity ¶ added in v0.2.1
type DeviceIdentity struct {
MAC string `json:"mac"`
}
type DeviceInfo ¶ added in v0.2.1
type MqttACLQuery ¶
type MqttAuthQuery ¶
type MqttClientEvent ¶
type MqttEvent ¶
type MqttEvent struct { Action string `json:"action"` MqttClientEvent }
type Session ¶
type Session struct { UID string `json:"uid"` DeviceUID UID `json:"device_uid,omitempty" bson:"device_uid"` Device *Device `json:"device" bson:",omitempty"` TenantID string `json:"tenant_id" bson:"tenant_id"` Username string `json:"username"` IPAddress string `json:"ip_address" bson:"ip_address"` StartedAt time.Time `json:"started_at" bson:"started_at"` LastSeen time.Time `json:"last_seen" bson:"last_seen"` Active bool `json:"active" bson:",omitempty"` Authenticated bool `json:"authenticated" bson:"authenticated"` }
type UserAuthClaims ¶
type UserAuthClaims struct { Name string `json:"name"` Admin bool `json:"admin"` Tenant string `json:"tenant"` AuthClaims `json:",squash"` jwt.StandardClaims `json:",squash"` }
type UserAuthRequest ¶
type UserAuthResponse ¶
Click to show internal directories.
Click to hide internal directories.