gateway

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: BSD-3-Clause-Clear Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TLS certs
	CertsCasPemFile = storage.CertsCasPemFile
	CertsTlsKeyFile = storage.CertsTlsKeyFile
	CertsTlsPemFile = storage.CertsTlsPemFile

	// Per device files/dirs
	ConfigAppliedFile = storage.ConfigAppliedFile
	AktomlFile        = storage.AktomlFile
	HwInfoFile        = storage.HwInfoFile
	NetInfoFile       = storage.NetInfoFile

	EventsPrefix = storage.EventsPrefix
	StatesPrefix = storage.StatesPrefix

	// Per update files/dirs
	TufRootFile      = storage.TufRootFile
	TufTimestampFile = storage.TufTimestampFile
	TufSnapshotFile  = storage.TufSnapshotFile
	TufTargetsFile   = storage.TufTargetsFile

	// Per config class files/dirs
	ConfigSotaOverride = storage.ConfigSotaOverride
)

Variables

View Source
var (
	NewDb = storage.NewDb
	NewFs = storage.NewFs

	TestIdRegex        = storage.TestIdRegex
	ValidCorrelationId = storage.ValidCorrelationId
)

Functions

This section is empty.

Types

type AppliedConfigs

type AppliedConfigs = storage.AppliedConfigs

type AppsStates

type AppsStates = storage.AppsStates

type ConfigFile

type ConfigFile = storage.ConfigFile

type DbHandle

type DbHandle = storage.DbHandle

Convenience aliases for importing modules

type Device

type Device struct {
	Uuid       string `json:"uuid"`
	Apps       string `json:"docker_apps"`
	Deleted    bool   `json:"-"`
	GroupName  string `json:"group_name"`
	LastSeen   int64  `json:"last_seen"`
	OstreeHash string `json:"ostree_hash"`
	PubKey     string `json:"pubkey"`
	TargetName string `json:"target_name"`
	Tag        string `json:"tag"`
	UpdateName string `json:"update_name"`
	// contains filtered or unexported fields
}

func (*Device) CheckIn

func (d *Device) CheckIn(targetName, tag, ostreeHash string, apps string) error

func (Device) GetAppsFilePath

func (d Device) GetAppsFilePath(file string) string

func (Device) GetConfigs

func (d Device) GetConfigs() (configs [3]*storage.ConfigFileSet, timestamp int64, err error)

func (Device) GetOstreeFilePath

func (d Device) GetOstreeFilePath(file string) string

func (Device) GetTufMeta

func (d Device) GetTufMeta(tag, file string) (string, error)

func (Device) ProcessEvents

func (d Device) ProcessEvents(events []storage.DeviceUpdateEvent) error

func (*Device) PutFile

func (d *Device) PutFile(name string, content string) error

func (Device) SaveAppliedConfigs

func (d Device) SaveAppliedConfigs(cfg AppliedConfigs) error

func (Device) SaveAppsStates

func (d Device) SaveAppsStates(content string) error

func (*Device) TestComplete

func (d *Device) TestComplete(testId, status, details string, results []storage.TargetTestResult) error

func (*Device) TestCreate

func (d *Device) TestCreate(targetName string, testName, testId string) error

func (*Device) TestStoreArtifact

func (d *Device) TestStoreArtifact(testId, path string, body io.Reader) error

type DeviceUpdateEvent

type DeviceUpdateEvent = storage.DeviceUpdateEvent

type FsHandle

type FsHandle = storage.FsHandle

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(db *storage.DbHandle, fs *storage.FsHandle) (*Storage, error)

func (Storage) DeviceCreate

func (s Storage) DeviceCreate(uuid, pubkey string) (*Device, error)

func (Storage) DeviceGet

func (s Storage) DeviceGet(uuid string) (*Device, error)

Jump to

Keyboard shortcuts

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