config

package
v0.0.0-...-39d5f47 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: Apache-2.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 {
	Host               string                    `yaml:"host"`
	Port               int                       `yaml:"port"`
	Dir                string                    `yaml:"dir"`
	MaxSize            int                       `yaml:"max_size"`
	HtpasswdFile       string                    `yaml:"htpasswd_file"`
	TLSCertFile        string                    `yaml:"tls_cert_file"`
	TLSKeyFile         string                    `yaml:"tls_key_file"`
	GoogleCloudStorage *GoogleCloudStorageConfig `yaml:"gcs_proxy"`
	HTTPBackend        *HTTPBackendConfig        `yaml:"http_proxy"`
	ReadOnly           bool                      `yaml:"read_only"`
}

Config provides the configuration

func New

func New(dir string, maxSize int, host string, port int, htpasswdFile string,
	tlsCertFile string, tlsKeyFile string, readOnly bool) (*Config, error)

New ...

func NewFromYamlFile

func NewFromYamlFile(path string) (*Config, error)

NewFromYamlFile ...

type GoogleCloudStorageConfig

type GoogleCloudStorageConfig struct {
	Bucket                string `yaml:"bucket"`
	UseDefaultCredentials bool   `yaml:"use_default_credentials"`
	JSONCredentialsFile   string `yaml:"json_credentials_file"`
}

type HTTPBackendConfig

type HTTPBackendConfig struct {
	BaseURL string `yaml:"url"`
}

Jump to

Keyboard shortcuts

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