config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: Apache-2.0 Imports: 6 Imported by: 4

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"`
	GRPCPort                int                       `yaml:"grpc_port"`
	ProfileHost             string                    `yaml:"profile_host"`
	ProfilePort             int                       `yaml:"profile_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"`
	S3CloudStorage          *S3CloudStorageConfig     `yaml:"s3_proxy"`
	GoogleCloudStorage      *GoogleCloudStorageConfig `yaml:"gcs_proxy"`
	HTTPBackend             *HTTPBackendConfig        `yaml:"http_proxy"`
	IdleTimeout             time.Duration             `yaml:"idle_timeout"`
	DisableHTTPACValidation bool                      `yaml:"disable_http_ac_validation"`
}

Config provides the configuration

func New

func New(dir string, maxSize int, host string, port int, grpc_port int,
	profile_host string, profile_port int, htpasswdFile string,
	tlsCertFile string, tlsKeyFile string, idleTimeout time.Duration,
	s3 *S3CloudStorageConfig, disable_http_ac_validation 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"`
}

type S3CloudStorageConfig

type S3CloudStorageConfig struct {
	Endpoint        string `yaml:"endpoint"`
	Bucket          string `yaml:"bucket"`
	Prefix          string `yaml:"prefix"`
	AccessKeyID     string `yaml:"access_key_id"`
	SecretAccessKey string `yaml:"secret_access_key"`
	DisableSSL      bool   `yaml:"disable_ssl"`
}

Jump to

Keyboard shortcuts

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