Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
GitlabGroupID int `yaml:"gitlabGroupID" env:"GITLABGROUPID" env-default:"0"`
GitlabProjectID int `yaml:"gitlabProjectID" env:"GITLABPROJECTID" env-default:"0"`
GitlabToken string `env:"GITLAB_TOKEN" env-required`
GitlabURI string `env:"GITLAB_URI" env-default:"https://gitlab.com"`
LocalPath string `yaml:"localpath" env:"LOCALPATH" env-default:""`
TmpDir string `yaml:"tmpdir" env:"TMPDIR" env-default:"/tmp"`
Hooks hooks.Hooks `yaml:"hooks"`
S3cfg S3Config `yaml:"s3cfg"`
}
func NewConfigFromEnv ¶
NewConfigFromEnv returns a new Config struct from the environment variables
func NewConfigFromFile ¶
NewConfigFromFile returns a new Config struct from the given file
func (*Config) IsConfigValid ¶
IsConfigValid returns true if the config is valid
func (*Config) IsLocalConfigValid ¶
IsLocalConfigValid returns true if the local config is valid
func (*Config) IsS3ConfigValid ¶
IsS3ConfigValid returns true if the S3 config is valid
type S3Config ¶
type S3Config struct {
Endpoint string `yaml:"endpoint" env:"S3ENDPOINT" env-default:""`
BucketName string `yaml:"bucketName" env:"S3BUCKETNAME" env-default:""`
BucketPath string `yaml:"bucketPath" env:"S3BUCKETPATH" env-default:""`
Region string `yaml:"region" env:"S3REGION" env-default:""`
AccessKey string `env:"AWS_ACCESS_KEY_ID"`
SecretKey string `env:"AWS_SECRET_ACCESS_KEY"`
}
Click to show internal directories.
Click to hide internal directories.