client

package
v0.0.0-...-f843a01 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2019 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseVersionSplit

func BaseVersionSplit(targetName string) (string, string)

Takes a target name from a Base image collection like v38-hikey and returns a tuple(version, hardwareId)

func OSTreeAddRemote

func OSTreeAddRemote(label string, url string, ignoreGPG bool) error

func OSTreeUpdate

func OSTreeUpdate(remote string, hash string) error

func Run

func Run(command string, args ...string) (string, error)

func RunFrom

func RunFrom(fromDir string, command string, args ...string) (string, error)

func RunFromStreamed

func RunFromStreamed(fromDir string, command string, args ...string) error

func RunFromStreamedTo

func RunFromStreamedTo(fromDir string, stdOut, stdErr io.Writer, command string, args ...string) error

func RunStreamed

func RunStreamed(command string, args ...string) error

Types

type Device

type Device struct {
	Config            DeviceConfig
	BaseNotary        *NotaryClient
	PersonalityNotary *NotaryClient

	HardwareId   string
	OSTreeStatus *OSTreeStatus
	// contains filtered or unexported fields
}

func DeviceInitialize

func DeviceInitialize(configDir string, config DeviceConfig) (*Device, error)

func NewDevice

func NewDevice(configDir string) (*Device, error)

func (*Device) BaseTarget

func (d *Device) BaseTarget() (*client.TargetWithRole, *OSTreeCustom, error)

func (*Device) BaseTargets

func (d *Device) BaseTargets() ([]*client.TargetWithRole, error)

func (*Device) PersonalityTarget

func (d *Device) PersonalityTarget() (*client.TargetWithRole, *DockerComposeCustom, error)

func (*Device) PersonalityTargets

func (d *Device) PersonalityTargets() ([]*client.TargetWithRole, error)

func (*Device) UpdateBase

func (d *Device) UpdateBase(target *client.TargetWithRole) error

func (*Device) UpdatePersonality

func (d *Device) UpdatePersonality(target *client.TargetWithRole) error

type DeviceConfig

type DeviceConfig struct {
	HardwareId                 string
	BaseNotaryServerUrl        string
	BaseNotaryCAFile           string
	BaseCollectionName         string
	PersonalityNotaryServerUrl string
	PersonalityNotaryCAFile    string
	PersonalityCollectionName  string
}

type DockerComposeCustom

type DockerComposeCustom struct {
	TUFCustom

	TgzUrl       string            `json:"tgz"`
	TgzLeading   bool              `json:"tgzLeadingDir"`
	ComposeFiles []string          `json:"compose-files,omitempty"`
	ComposeEnv   map[string]string `json:"compose-env,omitempty"`
}

type DockerComposeUpdater

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

func NewComposeUpdater

func NewComposeUpdater(notaryUrl, cacheDir, hash string, dcc DockerComposeCustom) (*DockerComposeUpdater, error)

func (*DockerComposeUpdater) Start

func (dcu *DockerComposeUpdater) Start(projectDir string) error

func (*DockerComposeUpdater) Stop

func (dcu *DockerComposeUpdater) Stop(projectDir string) error

type NotaryClient

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

func (NotaryClient) DockerCompose

func (c NotaryClient) DockerCompose(custom *json.RawMessage) (*DockerComposeCustom, error)

func (NotaryClient) OSTree

func (c NotaryClient) OSTree(custom *json.RawMessage) (*OSTreeCustom, error)

func (NotaryClient) Targets

func (c NotaryClient) Targets(image string) ([]*client.TargetWithRole, error)

type OSTreeCustom

type OSTreeCustom struct {
	TUFCustom

	Url string `json:"ostree"`
}

type OSTreeStatus

type OSTreeStatus struct {
	Active  string
	Pending *string
}

func NewOSTreeStatus

func NewOSTreeStatus() (*OSTreeStatus, error)

type TUFCustom

type TUFCustom struct {
	TargetFormat string `json:"targetFormat"`
	Uri          string `json:"uri"`
}

Jump to

Keyboard shortcuts

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