Documentation ¶
Index ¶
- Constants
- Variables
- func DieNotNil(err error, message ...string)
- func LogConfigs(opts *LogConfigsOptions)
- func Login(cmd *cobra.Command) *client.Api
- 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 Tabby(indent int, columns ...interface{}) *tabby.Tabby
- type LogConfigsOptions
- 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
)
View Source
var GetCommand = &cobra.Command{ Use: "get https://api.foundries.io/ota.... [header=val..]", Short: "Do an authenticated HTTP GET", Hidden: true, PersistentPreRun: func(cmd *cobra.Command, args []string) { api = Login(cmd) }, Run: doGet, Args: cobra.MinimumNArgs(1), }
Functions ¶
func LogConfigs ¶
func LogConfigs(opts *LogConfigsOptions)
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)
Types ¶
type LogConfigsOptions ¶
type LogConfigsOptions struct { Limit int ShowAppliedAt bool ListFunc func() (*client.DeviceConfigList, error) ListContFunc func(string) (*client.DeviceConfigList, error) }
type SetConfigOptions ¶
type SetUpdatesConfigOptions ¶
Click to show internal directories.
Click to hide internal directories.