Documentation
¶
Index ¶
- Constants
- Variables
- func AddLastWill(lastWill LastWill)
- func AssertWritable(path string)
- func DieNotNil(err error, message ...string)
- func FindWritableDirInPath(helperPath string) string
- func IsSliceSetEqual[T comparable](first, second []T) bool
- func IsWritable(dir string) bool
- func LogConfigs(opts *LogConfigsOptions)
- func Login(cmd *cobra.Command) *client.Api
- func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error)
- func NewGetCommand() *cobra.Command
- func NewPostCommand() *cobra.Command
- func PrintConfig(cfg *client.DeviceConfig, showAppliedAt, highlightFirstLine bool, ...)
- func ReadConfig(configFile string, cfg *client.ConfigCreateRequest)
- func RequireFactory(cmd *cobra.Command)
- func SaveOauthConfig(c client.OAuthConfig)
- func SetConfig(opts *SetConfigOptions)
- func SetUpdatesConfig(opts *SetUpdatesConfigOptions, reportedTag string, reportedApps []string)
- func ShowPages(showPage int, next *string)
- func SliceRemove[T comparable](in []T, item T) (out []T)
- func Tabby(indent int, columns ...interface{}) *tabby.Tabby
- type LastWill
- type LogConfigsOptions
- type MutuallyExclusiveFlags
- type RotateCertOptions
- type SetConfigOptions
- type SetUpdatesConfigOptions
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 FindWritableDirInPath ¶ added in v0.34.1
Find an entry in the PATH we can write to. For example, on MacOS git is installed under /usr/bin but even root can't write to that because of filesystem protection logic they have.
func IsSliceSetEqual ¶ added in v0.30.0
func IsSliceSetEqual[T comparable](first, second []T) bool
func IsWritable ¶ added in v0.34.1
func LogConfigs ¶
func LogConfigs(opts *LogConfigsOptions)
func MarshalIndent ¶ added in v0.30.0
Copied from canonical.MarshalIndent, but replaced the Marshal call with MarshalCanonical.
func NewGetCommand ¶ added in v0.30.0
func NewPostCommand ¶ added in v0.30.0
func PrintConfig ¶
func PrintConfig(cfg *client.DeviceConfig, showAppliedAt, highlightFirstLine bool, indent string)
func ReadConfig ¶
func ReadConfig(configFile string, cfg *client.ConfigCreateRequest)
func RequireFactory ¶
func SaveOauthConfig ¶
func SaveOauthConfig(c client.OAuthConfig)
func SetConfig ¶
func SetConfig(opts *SetConfigOptions)
func SetUpdatesConfig ¶
func SetUpdatesConfig(opts *SetUpdatesConfigOptions, reportedTag string, reportedApps []string)
func SliceRemove ¶ added in v0.34.1
func SliceRemove[T comparable](in []T, item T) (out []T)
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 { UserLookup map[string]client.FactoryUser Limit int ShowAppliedAt bool ListFunc func() (*client.DeviceConfigList, error) ListContFunc func(string) (*client.DeviceConfigList, error) }
func (*LogConfigsOptions) GetUsersLookupById ¶ added in v0.34.1
func (opts *LogConfigsOptions) GetUsersLookupById(api *client.Api, factory string)
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
func (RotateCertOptions) AsConfig ¶ added in v0.30.0
func (o RotateCertOptions) AsConfig() client.ConfigCreateRequest
type SetConfigOptions ¶
type SetUpdatesConfigOptions ¶
Click to show internal directories.
Click to hide internal directories.