config

package
v9.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: MIT Imports: 13 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 {
	RootDir        string
	LogFile        string             `yaml:"log_file"`
	LogFormat      string             `yaml:"log_format"`
	Migration      MigrationConfig    `yaml:"migration"`
	GitlabUrl      string             `yaml:"gitlab_url"`
	GitlabTracing  string             `yaml:"gitlab_tracing"`
	SecretFilePath string             `yaml:"secret_file"`
	Secret         string             `yaml:"secret"`
	HttpSettings   HttpSettingsConfig `yaml:"http_settings"`
	HttpClient     *HttpClient
}

func New

func New() (*Config, error)

func NewFromDir

func NewFromDir(dir string) (*Config, error)

func (*Config) FeatureEnabled

func (c *Config) FeatureEnabled(featureName string) bool

func (*Config) GetHttpClient

func (c *Config) GetHttpClient() *HttpClient

type HttpClient

type HttpClient struct {
	HttpClient *http.Client
	Host       string
}

type HttpSettingsConfig

type HttpSettingsConfig struct {
	User               string `yaml:"user"`
	Password           string `yaml:"password"`
	ReadTimeoutSeconds uint64 `yaml:"read_timeout"`
	CaFile             string `yaml:"ca_file"`
	CaPath             string `yaml:"ca_path"`
	SelfSignedCert     bool   `yaml:"self_signed_cert"`
}

type MigrationConfig

type MigrationConfig struct {
	Enabled  bool     `yaml:"enabled"`
	Features []string `yaml:"features"`
}

Jump to

Keyboard shortcuts

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