config

package
v0.1.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig() (err error)

LoadConfig ...

Types

type Cache

type Cache struct {
	ClosedTTL  int `mapstructure:"JAMIE_SERVICE_CACHE_CLOSED_TTL"`
	CurrentTTL int `mapstructure:"JAMIE_SERVICE_CACHE_CURRENT_TTL"`
}

Cache ...

type Config

type Config struct {
	LoaderSource string `mapstructure:"JAMIE_SERVICE_LOADER_SOURCE"`

	LoadURL          string `mapstructure:"JAMIE_SERVICE_LOAD_URL"`
	LoaderHeaders    http.Header
	LoaderHeadersStr string `mapstructure:"JAMIE_SERVICE_LOADER_HEADERS"`

	Port             string `mapstructure:"PORT"`
	DisableSSLVerify bool   `mapstructure:"JAMIE_DISABLE_SSL_VERIFY"`

	ExternalHost string `mapstructure:"EXTERNAL_HOST"`

	AuthAPIKey string `mapstructure:"JAMIE_SERVICE_API_KEY"`

	Cache *Cache

	FileSystem *FileSystemLoader

	S3 *S3Loader

	// FeatWS Ruller Client
	FeatWSRullerURL    string `mapstructure:"JAMIE_SERVICE_FEATWS_RULLER_URL"`
	FeatWSRullerAPIKey string `mapstructure:"JAMIE_SERVICE_FEATWS_RULLER_API_KEY"`
}

Config ...

func GetConfig

func GetConfig() *Config

GetConfig ...

type FileSystemLoader

type FileSystemLoader struct {
	Path string `mapstructure:"JAMIE_SERVICE_LOADER_FILE_SYSTEM_PATH"`
}

FileSystemLoader ...

type S3Loader

type S3Loader struct {
	Endpoint  string `mapstructure:"JAMIE_SERVICE_LOADER_S3_ENDPOINT"`
	Bucket    string `mapstructure:"JAMIE_SERVICE_LOADER_S3_BUCKET"`
	AccessKey string `mapstructure:"JAMIE_SERVICE_LOADER_S3_ACCESS_KEY"`
	SecretKey string `mapstructure:"JAMIE_SERVICE_LOADER_S3_SECRET_KEY"`
	Secure    bool   `mapstructure:"JAMIE_SERVICE_LOADER_S3_SSL"`
}

S3Loader ...

Jump to

Keyboard shortcuts

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