Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
ID int64
Created time.Time
Modified time.Time
OrganizationID string
DeviceID string
ActionID string
Action string
Status string
Message string
}
Action is the log of an action request
type DataStore ¶
type DataStore interface {
DeviceList(orgID string) ([]Device, error)
DeviceGet(id string) (Device, error)
DevicePing(id string, refresh time.Time) error
DeviceCreate(Device) (int64, error)
DeviceSnapList(id int64) ([]DeviceSnap, error)
DeviceSnapDelete(id int64) error
DeviceSnapUpsert(ds DeviceSnap) error
ActionCreate(act Action) (int64, error)
ActionUpdate(actionID, status, message string) error
ActionListForDevice(orgID, deviceID string) ([]Action, error)
DeviceVersionGet(deviceID int64) (DeviceVersion, error)
DeviceVersionUpsert(dv DeviceVersion) error
DeviceVersionDelete(id int64) error
GroupCreate(orgID, name string) (int64, error)
GroupList(orgID string) ([]Group, error)
GroupGet(orgID, name string) (Group, error)
GroupLinkDevice(orgID, name, deviceID string) error
GroupUnlinkDevice(orgID, name, deviceID string) error
GroupGetDevices(orgID, name string) ([]Device, error)
GroupGetExcludedDevices(orgID, name string) ([]Device, error)
}
DataStore is the interfaces for the data repository
type Device ¶
type Device struct {
ID int64
Created time.Time
LastRefresh time.Time
OrganisationID string
DeviceID string
Brand string
Model string
SerialNumber string
DeviceKey string
StoreID string
Active bool
}
Device the repository definition of a device
type DeviceSnap ¶
type DeviceSnap struct {
ID int
Created time.Time
Modified time.Time
DeviceID int64
Name string
InstalledSize int64
InstalledDate time.Time
Status string
Channel string
Confinement string
Version string
Revision int
Devmode bool
Config string
}
DeviceSnap holds the details of snap on a device
type DeviceVersion ¶
type DeviceVersion struct {
ID int64
DeviceID int64
Version string
Series string
OSID string
OSVersionID string
OnClassic bool
KernelVersion string
}
DeviceVersion holds the details of the OS details on the device
Click to show internal directories.
Click to hide internal directories.