Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- func (c *Config) DefaultConfigDir() (string, error)
- func (c *Config) DefaultConfigFile() string
- func (c *Config) DefaultConfigPath() (string, error)
- func (c *Config) DefaultLogFile() string
- func (c *Config) DefaultLogPath() (string, error)
- func (c *Config) GetConfigFile() string
- func (c *Config) GetLogFile() string
- func (c *Config) GlobalRequiredFlags(_ *cobra.Command) error
- func (c *Config) RootPersistentFlags(flags *pflag.FlagSet)
- func (c *Config) SetConfigFile(file string)
- func (c *Config) SetLogFile(file string)
- func (c *Config) Validate() error
Constants ¶
View Source
const ( DefaultListenAddress = "0.0.0.0:8080" DefaultTLS = false DefaultDomain = "localhost" DefaultBinary = "bin" )
Variables ¶
View Source
var ( ErrRepositoryRequired = errors.New("repository is required") ErrRepositoryOwnerRequired = errors.New("repository owner is required") ErrHostnameRequired = errors.New("hostname is required") ErrListenAddressRequired = errors.New("listen address is required") ErrDomainRequired = errors.New("domain is required") ErrBinaryRequired = errors.New("binary is required") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { GithubToken string `mapstructure:"github_token"` Repository string `mapstructure:"repository"` RepositoryOwner string `mapstructure:"repository_owner"` Hostname string `mapstructure:"hostname"` ListenAddress string `mapstructure:"listen_address"` TLS bool `mapstructure:"tls"` Domain string `mapstructure:"domain"` Binary string `mapstructure:"binary"` }
Config is dynamically sourced from various files and environment variables.
func (*Config) DefaultConfigDir ¶
func (*Config) DefaultConfigFile ¶
func (*Config) DefaultConfigPath ¶
func (*Config) DefaultLogFile ¶
func (*Config) DefaultLogPath ¶
func (*Config) GetConfigFile ¶
func (*Config) GetLogFile ¶
func (*Config) RootPersistentFlags ¶
func (*Config) SetConfigFile ¶
func (*Config) SetLogFile ¶
Click to show internal directories.
Click to hide internal directories.