config

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

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

func NewConfigFromEnv() (*Config, error)

func NewConfigFromFile

func NewConfigFromFile(filePath string) (*Config, error)

func (*Config) IsConfigValid

func (c *Config) IsConfigValid() bool

func (*Config) IsLocalConfigValid

func (c *Config) IsLocalConfigValid() bool

func (*Config) IsS3ConfigValid

func (c *Config) IsS3ConfigValid() bool

func (*Config) String

func (c *Config) String() string

func (*Config) Usage

func (c *Config) Usage()

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL