config

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package config provides access to the Database Lab configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server      srv.Config       `yaml:"server"`
	Provision   provision.Config `yaml:"provision"`
	Cloning     cloning.Config   `yaml:"cloning"`
	Platform    platform.Config  `yaml:"platform"`
	Global      Global           `yaml:"global"`
	Retrieval   retConfig.Config `yaml:"retrieval"`
	Observer    observer.Config  `yaml:"observer"`
	PoolManager pool.Config      `yaml:"poolManager"`
}

Config contains a common database-lab configuration.

func LoadConfig

func LoadConfig(name string) (*Config, error)

LoadConfig instances a new Config by configuration filename.

type Database

type Database struct {
	Username string `yaml:"username"`
	DBName   string `yaml:"dbname"`
}

Database contains default configurations of the managed database.

func (*Database) Name

func (d *Database) Name() string

Name returns default Database name.

func (*Database) User

func (d *Database) User() string

User returns default Database username.

type Global

type Global struct {
	InstanceID string
	Engine     string   `yaml:"engine"`
	Debug      bool     `yaml:"debug"`
	Database   Database `yaml:"database"`
}

Global contains global Database Lab configurations.

Jump to

Keyboard shortcuts

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