Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { App struct { ID string `yaml:"id"` Name string `yaml:"name"` Remote string `yaml:"remote"` } `yaml:"app"` CSR string `yaml:"request.csr"` PublicKey string `yaml:"client.crt"` PrivateKey string `yaml:"client.key"` ServerCert string `yaml:"server.crt"` }
Config holds the config for the app
func New ¶
func New() Config
New reads or creates a new config. If a config file is in place it will always return the files contents
func (*Config) CertExists ¶
CertExists certificate exists and can be used
func (*Config) GenerateKeysAndCertificate ¶
func (cfg *Config) GenerateKeysAndCertificate(subject string) *certificate.CACertificate
GenerateKeysAndCertificate generates keys and certificates
func (*Config) UpdateAppID ¶
UpdateAppID updates the app config with the App ID received from remote and calls saveConfig().
func (*Config) UpdateRemote ¶
UpdateRemote updates the app config with the metadata url received from the connect application respsonse and calls saveConfig().
func (*Config) UpdateServerCert ¶
UpdateServerCert updates the app config with the certificate received from remote and calls saveConfig().
Click to show internal directories.
Click to hide internal directories.