protocol

package
v0.0.0-...-2921379 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2021 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHandlers

type EventHandlers struct {
	CreatePolicy func(p db.Policy) error
	UpdatePolicy func(p db.Policy) error
	DeletePolicy func(p db.Policy) error
}

type Policy

type Policy struct {
	Restrictions *PolicyRestrictions `json:"restrictions"`
	WiFi         *PolicyWiFi         `json:"wifi"`
}

type PolicyRestrictions

type PolicyRestrictions struct {
	DisableCamera    bool `json:"disable_camera"`
	DisableBluetooth bool `json:"disable_bluetooth"`
}

type PolicyWiFi

type PolicyWiFi struct {
	SSID       string `json:"ssid"`
	Passphrase string `json:"passphrase"`
}

type Protocol

type Protocol interface {
	ID() string
	Init(srv *mattrax.Server) error
	Mount(r *mux.Router) error
	MountAPI(r *mux.Router, rUnauthenticated *mux.Router) error
	Events() EventHandlers
	Status() (interface{}, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL