Documentation ¶
Index ¶
- func GetEnv(key, fallback string) string
- type AppConfig
- type BaseConfig
- type Config
- func (c *Config) APIToken() string
- func (c *Config) APIURL() *url.URL
- func (c *Config) SetAPIToken(token string)
- func (c *Config) SetAPITokenFromFile(tokenFile string) error
- func (c *Config) SetAPIURL(u string) error
- func (c *Config) SetJiraUser(u string)
- func (c *Config) SetProjects(projects []string)
- func (c *Config) TargetURLs() []string
- func (c *Config) User() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseConfig ¶
type BaseConfig struct {
// contains filtered or unexported fields
}
func InitBaseConfig ¶
func InitBaseConfig() BaseConfig
func (BaseConfig) ApplicationName ¶
func (c BaseConfig) ApplicationName() string
func (BaseConfig) ListenPort ¶
func (c BaseConfig) ListenPort() string
func (BaseConfig) LogLevel ¶
func (c BaseConfig) LogLevel() string
func (BaseConfig) MetricsPath ¶
func (c BaseConfig) MetricsPath() string
type Config ¶
type Config struct { *BaseConfig // contains filtered or unexported fields }
Config struct holds all of the runtime confgiguration for the application
func Init ¶
func Init() Config
Init populates the Config struct based on environmental runtime configuration
func (*Config) SetAPIToken ¶
SetAPIToken accepts a string oauth2 token for usage in http.request
func (*Config) SetAPITokenFromFile ¶
SetAPITokenFromFile accepts a file containing an oauth2 token for usage in http.request
func (*Config) SetAPIURL ¶
Sets the base API URL returning an error if the supplied string is not a valid URL
func (*Config) SetJiraUser ¶
Sets the base API URL returning an error if the supplied string is not a valid URL
func (*Config) SetProjects ¶
Overrides the entire list of projects
func (*Config) TargetURLs ¶
Returns a list of all object URLs to scrape
Click to show internal directories.
Click to hide internal directories.