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"` Context bool `ini:"context,omitempty"` }
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 arigatorc file
func NewPreferences ¶
func NewPreferences(useDefaults bool) (*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 ¶
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.