Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidatePublicKey ¶
ValidatePublicKey checks the publickey path for valid file
Types ¶
type Core ¶
type Core struct { PublicKeyFile string `ini:"public_key_file,omitempty"` CABundleFile string `ini:"ca_bundle_file,omitempty"` RegistryURI string `ini:"registry_uri,omitempty"` ManifestURI string `ini:"manifest_uri,omitempty"` GatekeeperAddress string `ini:"gatekeeper_address"` Context bool `ini:"context"` AutoConfirm bool `ini:"auto_confirm"` EnableProgress bool `ini:"progress"` EnableHints bool `ini:"hints"` Vim bool `ini:"vim"` EnableCheckUpdates bool `ini:"check_updates"` EnableColors bool `ini:"colors"` }
Core contains core option values
type Defaults ¶
type Defaults struct { Organization string `ini:"org,omitempty"` Project string `ini:"project,omitempty"` Environment string `ini:"environment,omitempty"` Service string `ini:"service,omitempty"` }
Defaults contains default values for use in command argument flags
type Preferences ¶
Preferences represents the configuration as user has in their torusrc file
func NewPreferences ¶
func NewPreferences() (*Preferences, error)
NewPreferences returns a new instance of preferences struct
func (Preferences) CountFields ¶
func (prefs Preferences) CountFields(fieldName string) int
CountFields returns the number of defined fields on sub-field struct
func (Preferences) SetValue ¶
func (prefs Preferences) SetValue(key string, value string) (Preferences, error)
SetValue for ini key on preferences struct
type PublicKey ¶
type PublicKey struct {
PublicKey base64.Value `json:"public_key"`
}
PublicKey is en ed25519 public key.
func LoadPublicKey ¶
func LoadPublicKey(prefs *Preferences) (*PublicKey, error)
LoadPublicKey reads the publickey file from disk and parses the json
Click to show internal directories.
Click to hide internal directories.