conf

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package conf handles the configuration of the applications. Yaml files are mapped with the struct

Index

Constants

View Source
const PROJECTNAME string = "binary-patch"

PROJECTNAME TODO: should be replaced in your application

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DebugEnabled     bool                  `yaml:"debug_enabled,omitempty"`
	Oauth2Enabled    bool                  `yaml:"oauth2_enabled,omitempty"`
	ProfilingEnabled bool                  `yaml:"profiling_enabled,omitempty"`
	Port             int                   `yaml:"port,omitempty"`
	MonitorPort      int                   `yaml:"monitor_port,omitempty"`
	LogFlushInterval time.Duration         `yaml:"log_flush_interval,omitempty"`
	TLSCertfilePath  string                `yaml:"tls_certfile_path,omitempty"`
	TLSKeyfilePath   string                `yaml:"tls_keyfile_path,omitempty"`
	AuthURL          string                `yaml:"auth_url,omitempty"`
	TokenURL         string                `yaml:"token_url,omitempty"`
	AuthorizedTeams  []zalando.AccessTuple `yaml:"authorized_teams,omitempty"`
	AuthorizedUsers  []zalando.AccessTuple `yaml:"authorized_users,omitempty"`
}

Config is the configuration struct. The config file config.yaml will unmarshaled to this struct.

func New

func New() (*Config, error)

New returns the loaded configuration or panic

Jump to

Keyboard shortcuts

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