Documentation
¶
Index ¶
- func CtxWithApi(ctx context.Context, api *Api) context.Context
- func ParseLastLink(linkHeader string) (string, bool)
- func ParseNextLink(linkHeader string) (string, bool)
- type Api
- func (a *Api) Configs() ConfigsApi
- func (a Api) Delete(resource string, opts ...HttpOption) error
- func (a *Api) Devices() DeviceApi
- func (a Api) Get(resource string, result any, opts ...HttpOption) error
- func (a Api) GetStream(resource string, opts ...HttpOption) (io.ReadCloser, error)
- func (a Api) GetWithHeaders(resource string, result any, opts ...HttpOption) (http.Header, error)
- func (a Api) Post(resource string, body any, opts ...HttpOption) ([]byte, error)
- func (a Api) Put(resource string, body any, opts ...HttpOption) ([]byte, error)
- func (a *Api) Updates() UpdatesApi
- type AppliedConfigs
- type ConfigFile
- type ConfigFileSet
- type ConfigsApi
- type CreateUpdateOptions
- type Device
- type DeviceApi
- func (d DeviceApi) Delete(uuid string) error
- func (d DeviceApi) DeleteDenied(uuid string) error
- func (d DeviceApi) Get(uuid string) (*Device, error)
- func (d DeviceApi) ListDenied() ([]string, error)
- func (d DeviceApi) ListPage(page int, limit int, sortBy string) ([]DeviceListItem, bool, int, error)
- func (d *DeviceApi) Test(uuid, testId string) (*TargetTest, error)
- func (d *DeviceApi) TestArtifact(uuid, testId, artifact string) (io.ReadCloser, error)
- func (d *DeviceApi) Tests(uuid string) ([]TargetTest, error)
- func (d DeviceApi) UpdateEvents(uuid, updateId string) ([]DeviceUpdateEvent, error)
- func (d DeviceApi) Updates(uuid string) ([]string, error)
- type DeviceConfigsApi
- type DeviceListItem
- type DeviceUpdateEvent
- type HttpOption
- type Rollout
- type SpecificConfigsApi
- type TargetTest
- type Update
- type UpdatesApi
- func (u UpdatesApi) CreateRollout(tag, updateName, rollout string, data Rollout) error
- func (u UpdatesApi) CreateUpdate(tag, updateName string, opts CreateUpdateOptions, body io.Reader) error
- func (u UpdatesApi) Get(tag, updateName string) ([]string, error)
- func (u UpdatesApi) GetRollout(tag, updateName, rollout string) (Rollout, error)
- func (u UpdatesApi) List() (map[string][]Update, error)
- func (u UpdatesApi) Tail(tag, updateName string) (io.ReadCloser, error)
- func (u UpdatesApi) TailRollout(tag, updateName, rollout string) (io.ReadCloser, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseLastLink ¶
func ParseNextLink ¶
Types ¶
type Api ¶
func (*Api) Configs ¶
func (a *Api) Configs() ConfigsApi
func (Api) GetStream ¶
func (a Api) GetStream(resource string, opts ...HttpOption) (io.ReadCloser, error)
func (Api) GetWithHeaders ¶
func (*Api) Updates ¶
func (a *Api) Updates() UpdatesApi
type AppliedConfigs ¶
type AppliedConfigs = storage.AppliedConfigs
type ConfigFile ¶
type ConfigFile = models.ConfigFile
type ConfigFileSet ¶
type ConfigFileSet = models.ConfigFileSet
type ConfigsApi ¶
type ConfigsApi struct {
// contains filtered or unexported fields
}
func (ConfigsApi) Device ¶
func (a ConfigsApi) Device(uuid string) DeviceConfigsApi
func (ConfigsApi) Factory ¶
func (a ConfigsApi) Factory() SpecificConfigsApi
func (ConfigsApi) Group ¶
func (a ConfigsApi) Group(name string) SpecificConfigsApi
func (ConfigsApi) ListGroups ¶
func (a ConfigsApi) ListGroups() (names []string, err error)
func (ConfigsApi) Upload ¶
func (a ConfigsApi) Upload(r io.Reader, opts ...HttpOption) (err error)
type CreateUpdateOptions ¶
type CreateUpdateOptions struct {
Version int // Override the target version (AppVersion)
Name string // Override the target name
OstreeHash string // Override the ostree hash
Apps map[string]string // Override docker compose apps (name -> sha256)
}
CreateUpdateOptions captures the optional TUF target overrides that can be supplied when creating an update.
type DeviceApi ¶
type DeviceApi struct {
// contains filtered or unexported fields
}
func (DeviceApi) DeleteDenied ¶
DeleteDenied removes a device from the denied list so it can access the backend again.
func (DeviceApi) ListDenied ¶
ListDenied returns all UUIDs on the denied list.
func (DeviceApi) ListPage ¶
func (d DeviceApi) ListPage(page int, limit int, sortBy string) ([]DeviceListItem, bool, int, error)
ListPage fetches a single page of devices. It returns the devices, whether more pages are available, and the total number of pages.
func (*DeviceApi) TestArtifact ¶
func (d *DeviceApi) TestArtifact(uuid, testId, artifact string) (io.ReadCloser, error)
func (DeviceApi) UpdateEvents ¶
func (d DeviceApi) UpdateEvents(uuid, updateId string) ([]DeviceUpdateEvent, error)
type DeviceConfigsApi ¶
type DeviceConfigsApi struct{ SpecificConfigsApi }
func (DeviceConfigsApi) GetApplied ¶
func (a DeviceConfigsApi) GetApplied() (res AppliedConfigs, err error)
type DeviceListItem ¶
type DeviceListItem = models.DeviceListItem
type DeviceUpdateEvent ¶
type DeviceUpdateEvent = models.DeviceUpdateEvent
type HttpOption ¶
type HttpOption func(opts *httpOptions)
func HttpHeader ¶
func HttpHeader(name, value string) HttpOption
type SpecificConfigsApi ¶
type SpecificConfigsApi struct {
// contains filtered or unexported fields
}
func (SpecificConfigsApi) Get ¶
func (a SpecificConfigsApi) Get() (res ConfigFileSet, err error)
func (SpecificConfigsApi) GetHistory ¶
func (a SpecificConfigsApi) GetHistory(limit int, showFiles bool) (res []ConfigFileSet, err error)
func (SpecificConfigsApi) Put ¶
func (a SpecificConfigsApi) Put(configs ConfigFileSet) (err error)
type TargetTest ¶
type TargetTest = storage.TargetTest
type UpdatesApi ¶
type UpdatesApi struct {
// contains filtered or unexported fields
}
func (UpdatesApi) CreateRollout ¶
func (u UpdatesApi) CreateRollout(tag, updateName, rollout string, data Rollout) error
func (UpdatesApi) CreateUpdate ¶
func (u UpdatesApi) CreateUpdate(tag, updateName string, opts CreateUpdateOptions, body io.Reader) error
func (UpdatesApi) GetRollout ¶
func (u UpdatesApi) GetRollout(tag, updateName, rollout string) (Rollout, error)
func (UpdatesApi) Tail ¶
func (u UpdatesApi) Tail(tag, updateName string) (io.ReadCloser, error)
func (UpdatesApi) TailRollout ¶
func (u UpdatesApi) TailRollout(tag, updateName, rollout string) (io.ReadCloser, error)
Click to show internal directories.
Click to hide internal directories.