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 Filter
- type FirewallRule
- type FirewallRuleFields
- type FirewallRuleUpdate
- type Info
- type MqttACLQuery
- type MqttAuthQuery
- type MqttClientEvent
- type MqttEvent
- type OperatorParams
- type PropertyParams
- type Session
- type Stats
- type Tenant
- 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" validate:"required,hostname_rfc1123"`
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 Filter ¶ added in v0.3.0
type Filter struct {
Type string `json:"type,omitempty"`
Params interface{} `json:"params,omitempty"`
}
func (*Filter) UnmarshalJSON ¶ added in v0.3.2
type FirewallRule ¶ added in v0.3.3
type FirewallRule struct {
ID string `json:"id" bson:"_id"`
TenantID string `json:"tenant_id" bson:"tenant_id"`
FirewallRuleFields `bson:",inline"`
}
type FirewallRuleFields ¶ added in v0.3.3
type FirewallRuleFields struct {
Priority int `json:"priority"`
Action string `json:"action" validate:"required,oneof=allow deny"`
Active bool `json:"active"`
SourceIP string `json:"source_ip" bson:"source_ip" validate:"required,regexp"`
Username string `json:"username" validate:"required,regexp"`
Hostname string `json:"hostname" validate:"required,regexp"`
}
func (*FirewallRuleFields) Validate ¶ added in v0.3.3
func (f *FirewallRuleFields) Validate() error
type FirewallRuleUpdate ¶ added in v0.3.3
type FirewallRuleUpdate struct {
FirewallRuleFields `bson:",inline"`
}
type MqttACLQuery ¶
type MqttAuthQuery ¶
type MqttClientEvent ¶
type MqttEvent ¶
type MqttEvent struct {
Action string `json:"action"`
MqttClientEvent
}
type OperatorParams ¶ added in v0.3.2
type OperatorParams struct {
Name string `json:"name"`
}
type PropertyParams ¶ added in v0.3.2
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.