backendapi

package
v0.0.0-...-d97ad09 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: AGPL-3.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToString

func BytesToString(data [32]byte) string

/////////// /////////// generic helper functions

func Debug_dumpDeviceList

func Debug_dumpDeviceList(list []Device, index ...int)

/////////// /////////// debug functions

func FindDeviceByKey

func FindDeviceByKey(list []Device, dev Device) int

func FindDeviceByMac

func FindDeviceByMac(list []Device, dev Device) int

func SetupBackend

func SetupBackend()

Types

type Device

type Device struct {
	Name        string    `json:"name"`         // name a device identified itself with
	Key         string    `json:"key"`          // key the device will use to authenticate itself with backend-api
	Mac         string    `json:"mac"`          // MAC address of any interface provided by the device
	LastCheckin time.Time `json:"last_checkin"` // time when the device last checked in
	OS          string    `json:"os"`           // operating system running on the device
}

Device is for maintaining devices currently being handled by this backend process

type ReturnCode

type ReturnCode struct {
	Code       int    `json:"code"`
	CodeString string `json:"code_string"`
	Comment    string `json:"comment"`
}

ReturnCode is for responses to devices

Jump to

Keyboard shortcuts

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