api

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: 32 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigHistoryLimit = storage.ConfigHistoryLimit

Variables

View Source
var (
	CtxGetLog  = context.CtxGetLog
	CtxWithLog = context.CtxWithLog
)
View Source
var EchoError = server.EchoError

Functions

func CtxGetUser

func CtxGetUser(ctx Context) *users.User

func RegisterHandlers

func RegisterHandlers(e *echo.Echo, ca *DeviceCa, storage *storage.Storage, a auth.Provider)

Types

type AppliedConfigs

type AppliedConfigs = storage.AppliedConfigs

type AppsStatesResp

type AppsStatesResp struct {
	AppsStates []storage.AppsStates `json:"apps_states"`
}

type ConfigFile

type ConfigFile = storage.ConfigFile

type ConfigFileSet

type ConfigFileSet = storage.ConfigFileSet

type Context

type Context = context.Context

func CtxWithUser

func CtxWithUser(ctx Context, user *users.User) Context

type Device

type Device = storage.Device

type DeviceCa added in v0.9.3

type DeviceCa struct {
	CaCert   *x509.Certificate
	CaKey    crypto.Signer
	RootCert string
	DgUrl    string
}

func LoadDeviceCa added in v0.9.3

func LoadDeviceCa(fs *storage.FsHandle, gatewayAddr string) (*DeviceCa, error)

func (DeviceCa) SignCsr added in v0.9.3

func (ca DeviceCa) SignCsr(csr *x509.CertificateRequest) ([]byte, error)

type DeviceCreateRequest added in v0.9.3

type DeviceCreateRequest struct {
	Uuid          string   `json:"uuid"`
	Name          string   `json:"name"` // todo validate pattern and length
	Group         string   `json:"group"`
	HardwareId    string   `json:"hardware-id"`
	Csr           string   `json:"csr"`
	SotaConfigDir string   `json:"sota-config-dir"`
	Overrides     SotaToml `json:"overrides"`
}

type DeviceCreateResponse added in v0.9.3

type DeviceCreateResponse struct {
	RootCrt   string `json:"root.crt"`
	ClientPem string `json:"client.pem"`
	SotaToml  string `json:"sota.toml"`
}

type DeviceListItem

type DeviceListItem = storage.DeviceListItem

type DeviceListOpts

type DeviceListOpts = storage.DeviceListOpts

type DeviceUpdateEvent

type DeviceUpdateEvent = storage.DeviceUpdateEvent

type LabelsPutReq

type LabelsPutReq map[string]*string

type LabelsReq

type LabelsReq struct {
	Upserts map[string]string
	Deletes []string
}

type Rollout

type Rollout = storage.Rollout

type SotaToml added in v0.9.3

type SotaToml map[string]map[string]string

type TargetTest

type TargetTest = storage.TargetTest

type Update

type Update = storage.Update

type UpdateSummary added in v0.9.4

type UpdateSummary = storage.UpdateSummary

type UpdateTufResp

type UpdateTufResp map[string]map[string]any

Jump to

Keyboard shortcuts

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