config

package
v0.0.0-...-bcece2d Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PersistenceModeMemory   = "memory"
	PersistenceModeDatabase = "database"
)
View Source
const (
	LogModeProduction  = "production"
	LogModeDevelopment = "development"
)

Variables

This section is empty.

Functions

func Get

func Get() *globalConfig

Types

type AWSConfig

type AWSConfig struct {
	AccessKey string `help:"AWS access key"`
	SecretKey string `help:"AWS secret key"`
}

type DBConfig

type DBConfig struct {
	Host             string            `help:"Database hostname" default:"localhost"`
	Port             int               `help:"Database connection port" default:"5432"`
	User             string            `help:"Database user" default:"postgres"`
	Password         string            `help:"Database password" default:"password"`
	Driver           string            `help:"Database driver to be used" enum:"postgres" default:"postgres"`
	Name             string            `help:"Database name" default:"objekt"`
	AdditionalConfig map[string]string `help:"Additional database connection string query params"`
}

func (*DBConfig) ConnectionURL

func (d *DBConfig) ConnectionURL() (string, error)

type HttpConfig

type HttpConfig struct {
	Hostname     string `help:"Hostname of the Objekt server" default:"localhost" short:"H"`
	Port         int    `help:"Port of the Objekt server" default:"8080" short:"p"`
	PprofEnabled bool   `help:"Expose pprof standard endpoints" default:"false"`
}

func (*HttpConfig) ListenerURL

func (h *HttpConfig) ListenerURL() string

type LocalConfig

type LocalConfig struct {
	StorageDir string `help:"location of directory that stores local buckets" type:"existingdir" default:"."`
}

type LogConfig

type LogConfig struct {
	Level zerolog.Level `help:"Log level" enum:"debug,error,fatal,info,panic,warn" default:"info"`
	Mode  string        `help:"Log Mode" enum:"development,production" default:"development"`
	File  string        `help:"Log file to use in production mode" type:"path" default:"objekt.log"`
}

type OCIConfig

type OCIConfig struct {
	Tenancy     string  `help:"OCI tenancy ocid"`
	Compartment string  `help:"OCI compartment ocid"`
	Namespace   string  `help:"OCI namespace name"`
	User        string  `help:"OCI user ocid"`
	Region      string  `help:"OCI region to use by default"`
	Fingerprint string  `help:"OCI private key fingerprint"`
	Key         string  `help:"OCI api private key value as string"`
	Passphrase  *string `help:"OCI api private key passphrase" optional:""`
}

Jump to

Keyboard shortcuts

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