apiserver

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackendRestHost       = "BACKEND_REST_HOST"
	BackendRestDisableTLS = "BACKEND_REST_DISABLE_TLS" // nolint:gosec
	BackendRestPort       = "BACKEND_REST_PORT"
	HealthCheckAddress    = "HEALTH_CHECK_ADDRESS"

	DBNameEnvVar     = "DB_NAME"
	DBUserEnvVar     = "DB_USER"
	DBPasswordEnvVar = "DB_PASS"
	DBHostEnvVar     = "DB_HOST"
	DBPortEnvVar     = "DB_PORT_NUMBER"
	DatabaseDriver   = "DATABASE_DRIVER"
	EnableDBInfoLogs = "ENABLE_DB_INFO_LOGS"

	LocalDBPath = "LOCAL_DB_PATH"

	FakeDataEnvVar      = "FAKE_DATA"
	DisableOrchestrator = "DISABLE_ORCHESTRATOR"

	LogLevel = "LOG_LEVEL"
)

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, config *Config)

Types

type Config

type Config struct {
	BackendRestHost    string `json:"backend-rest-host,omitempty"`
	BackendRestPort    int    `json:"backend-rest-port,omitempty"`
	HealthCheckAddress string `json:"health-check-address,omitempty"`

	DisableOrchestrator bool `json:"disable_orchestrator"`

	// database config
	DatabaseDriver   string `json:"database-driver,omitempty"`
	DBName           string `json:"db-name,omitempty"`
	DBUser           string `json:"db-user,omitempty"`
	DBPassword       string `json:"-"`
	DBHost           string `json:"db-host,omitempty"`
	DBPort           string `json:"db-port,omitempty"`
	EnableDBInfoLogs bool   `json:"enable-db-info-logs"`
	EnableFakeData   bool   `json:"enable-fake-data"`

	LocalDBPath string    `json:"local-db-path,omitempty"`
	LogLevel    log.Level `json:"log-level,omitempty"`
}

func LoadConfig

func LoadConfig() (*Config, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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