register

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: BSD-3-Clause-Clear Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEVICE_API = "https://api.foundries.io/ota/devices/"
	OAUTH_API  = "https://app.foundries.io/oauth"
)
View Source
const (
	LMP_OS_STR     = "/etc/os-release"
	OS_FACTORY_TAG = "LMP_FACTORY_TAG"
	OS_FACTORY     = "LMP_FACTORY"
	GIT_COMMIT     = "unknown"

	// Environment Variables
	ENV_DEVICE_FACTORY = "DEVICE_FACTORY"
	ENV_PRODUCTION     = "PRODUCTION"
	ENV_OAUTH_BASE     = "OAUTH_BASE"
	ENV_DEVICE_API     = "DEVICE_API"

	// Files
	AKLITE_LOCK = "/var/lock/aklite.lock"
	SOTA_DIR    = "/var/sota"
	SOTA_PEM    = "/client.pem"
	SOTA_SQL    = "/sql.db"

	SOTA_CLIENT = "aktualizr-lite"
)
View Source
const HARDWARE_ID = "amd64-linux"

Variables

This section is empty.

Functions

func RegisterDevice

func RegisterDevice(opt *RegisterOptions, cb OauthCallback) error

Types

type HttpHeaders

type HttpHeaders map[string]string

type OauthCallback

type OauthCallback interface {
	ShowAuthInfo(deviceUuid, userCode, url string, expiresMinutes int)
	Tick()
}

type RegisterOptions

type RegisterOptions struct {
	Production  bool
	SotaDir     string
	DeviceGroup string
	Factory     string
	PacmanTag   string
	ApiToken    string
	UUID        string

	Name           string
	ApiTokenHeader string
	Force          bool
	HardwareID     string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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