Documentation
¶
Index ¶
- Constants
- Variables
- func BrowserTrySpawn(url string) error
- func GetCacheDir(appName string) (string, error)
- func GetConf(rd io.Reader, thirdParty string) (map[string]map[string]string, error)
- func GetConfigDir(appName string) (string, error)
- func GetDataDir(appName string) (string, error)
- func GetPassphrase(prefix string) ([]byte, error)
- func GetPassphraseConfirm(prefix string, minEntropyBits float64, retry int) ([]byte, error)
- func GetPassphraseFromCommand(cmd string) (string, error)
- func GetVersion() string
- func LoadConfig(configDir string) (*config.Config, error)
- func LoadINI(rd io.Reader) (map[string]map[string]string, error)
- func LoadJSON(rd io.Reader) (map[string]map[string]string, error)
- func LoadOldConfigIfExists(configFile string) (*config.Config, error)
- func LoadPolicyConfigFile(filename string) (*policiesConfig, error)
- func LoadYAML(rd io.Reader) (map[string]map[string]string, error)
- func ParseSnapshotID(id string) (string, string)
- func ParseTimeFlag(input string) (time.Time, error)
- func SanitizeText(input string) string
- func SaveConfig(configDir string, cfg *config.Config) error
- func ValidateEmail(email string) (string, error)
- type OldConfig
- type OptsFlag
- type ReleaseUpdateSummary
- type TimeFlag
Constants ¶
View Source
const CONFIG_VERSION = "v1.0.0"
Variables ¶
View Source
var VERSION = func() string { version := "v1.0.6" if strings.HasSuffix(version, "-devel") { if info, ok := debug.ReadBuildInfo(); ok { for _, setting := range info.Settings { if setting.Key == "vcs.revision" { version += "." + setting.Value } } } } return version }()
Functions ¶
func BrowserTrySpawn ¶
func GetCacheDir ¶
func GetConfigDir ¶
func GetDataDir ¶
func GetPassphrase ¶
func GetPassphraseConfirm ¶
func GetVersion ¶
func GetVersion() string
func LoadPolicyConfigFile ¶
func ParseSnapshotID ¶
ParseSnapshotID parses a string in the form snapshotID[:pattern] and returns the two strings.
func SanitizeText ¶
func ValidateEmail ¶
Types ¶
type OldConfig ¶
type OldConfig struct {
DefaultRepository string `yaml:"default-repo"`
Repositories map[string]config.RepositoryConfig `yaml:"repositories"`
Remotes map[string]config.SourceConfig `yaml:"remotes"`
}
type OptsFlag ¶
type OptsFlag struct {
// contains filtered or unexported fields
}
func NewOptsFlag ¶
type ReleaseUpdateSummary ¶
type ReleaseUpdateSummary struct {
FoundCount int
Latest string
SecurityFix bool
ReliabilityFix bool
}
func CheckUpdate ¶
func CheckUpdate(cachedir string) (update ReleaseUpdateSummary, err error)
type TimeFlag ¶
type TimeFlag struct {
// contains filtered or unexported fields
}
TimeFlag implements flag.Value interface
func NewTimeFlag ¶
Click to show internal directories.
Click to hide internal directories.