subcommands

package
v0.30.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FIO_TOML_NAME        = "z-50-fioctl.toml"
	FIO_COMPOSE_APPS_DIR = "/var/sota/compose-apps"
	FIO_TOML_ONCHANGED   = "/usr/share/fioconfig/handlers/aktualizr-toml-update"
)

Aktualizr puts all config files into a single lexographically sorted map. We have to make sure this file is parsed *after* sota.toml.

Variables

View Source
var (
	Config client.Config
)

Functions

func AddLastWill added in v0.30.0

func AddLastWill(lastWill LastWill)

func AssertWritable added in v0.30.0

func AssertWritable(path string)

func DieNotNil

func DieNotNil(err error, message ...string)

func IsSliceSetEqual added in v0.30.0

func IsSliceSetEqual(first, second []string) bool

func LogConfigs

func LogConfigs(opts *LogConfigsOptions)

func Login

func Login(cmd *cobra.Command) *client.Api

func MarshalIndent added in v0.30.0

func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error)

Copied from canonical.MarshalIndent, but replaced the Marshal call with MarshalCanonical.

func NewGetCommand added in v0.30.0

func NewGetCommand() *cobra.Command

func NewPostCommand added in v0.30.0

func NewPostCommand() *cobra.Command

func PrintConfig

func PrintConfig(cfg *client.DeviceConfig, showAppliedAt, highlightFirstLine bool, indent string)

func ReadConfig

func ReadConfig(configFile string, cfg *client.ConfigCreateRequest)

func RequireFactory

func RequireFactory(cmd *cobra.Command)

func SaveOauthConfig

func SaveOauthConfig(c client.OAuthConfig)

func SetConfig

func SetConfig(opts *SetConfigOptions)

func SetUpdatesConfig

func SetUpdatesConfig(opts *SetUpdatesConfigOptions, reportedTag string, reportedApps []string)

func Tabby added in v0.19.1

func Tabby(indent int, columns ...interface{}) *tabby.Tabby

Types

type LastWill added in v0.30.0

type LastWill = func()

An os.Exit exits immediately, skipping all deferred functions We need a way to execute the finalizing code in some cases.

type LogConfigsOptions

type LogConfigsOptions struct {
	Limit         int
	ShowAppliedAt bool
	ListFunc      func() (*client.DeviceConfigList, error)
	ListContFunc  func(string) (*client.DeviceConfigList, error)
}

type MutuallyExclusiveFlags added in v0.30.0

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

func (*MutuallyExclusiveFlags) Add added in v0.30.0

func (f *MutuallyExclusiveFlags) Add(cmd *cobra.Command, flagName, helpText string)

func (*MutuallyExclusiveFlags) GetFlag added in v0.30.0

func (f *MutuallyExclusiveFlags) GetFlag() (string, error)

type RotateCertOptions added in v0.30.0

type RotateCertOptions struct {
	Reason    string
	EstServer string
	PkeyIds   []string
	CertIds   []string
}

func (RotateCertOptions) AsConfig added in v0.30.0

type SetConfigOptions

type SetConfigOptions struct {
	Reason      string
	FileArgs    []string
	IsRawFile   bool
	SetFunc     func(client.ConfigCreateRequest) error
	EncryptFunc func(string) string
}

type SetUpdatesConfigOptions

type SetUpdatesConfigOptions struct {
	UpdateTag  string
	UpdateApps string
	IsDryRun   bool
	IsForced   bool
	Device     *client.Device
	ListFunc   func() (*client.DeviceConfigList, error)
	SetFunc    func(client.ConfigCreateRequest, bool) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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