Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "1.0.0"
Functions ¶
func ReadAppConfig ¶
ReadAppConfig reads a yaml config file
Types ¶
type Config ¶
type Config struct { Datadog DatadogConfig `yaml:"datadog"` Github githubapp.Config `yaml:"github"` HTTP HTTPConfig `yaml:"http"` Server baseapp.HTTPConfig `yaml:"server"` BestsellerSpecific BestsellerSpecificConfig `yaml:"bestseller_specific"` LogLevel *int `yaml:"log_level,omitempty"` }
Config contains global config
var AppConfig Config
AppConfig contains global app config
type DBConfigSpec ¶
type DBConfigSpec struct { ConnectionName string `yaml:"connection_name"` ConnectionString string `yaml:"connection_string"` DBName string `yaml:"db_name"` Instance string `yaml:"instance"` Password string `yaml:"password"` Username string `yaml:"username"` }
DBConfigSpec contains global db config
var DBConfig DBConfigSpec
DBConfig contains global db app config
type DatadogConfig ¶
type DatadogConfig struct {
APIKey string `yaml:"api_key"`
}
type EnvConfig ¶
type EnvConfig struct { Config string `required:"false"` DBConfig string `required:"false"` LogLevel *int `required:"false"` DDAddress string `required:"false"` Schedule string `required:"false"` WorkerURL string `required:"false"` }
EnvConfig defines the structure of the global configuration parameters
var EnvVars EnvConfig
EnvVars stores the Global Configuration.
type HTTPConfig ¶
type HTTPConfig struct {
Token string `yaml:"token"`
}
type RepoConfig ¶
type RepoConfig struct { TargetBranch string `yaml:"target-branch,omitempty"` Reviewers []string `yaml:"reviewers,omitempty"` Assignees []string `yaml:"assignees,omitempty"` Labels []string `yaml:"labels,omitempty"` Directory string `yaml:"directory,omitempty"` Schedule string `yaml:"schedule,omitempty"` }
RepoConfig contains specific config for each repo
func ReadRepoConfig ¶
func ReadRepoConfig(content []byte) (*RepoConfig, error)
ReadRepoConfig reads a yaml file
func (RepoConfig) IsValid ¶
func (rc RepoConfig) IsValid() error
IsValid checks if Repoconfig is valid
Click to show internal directories.
Click to hide internal directories.