options

package
v0.3.4-dev Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConnectionBlock = "connection"
	DatabaseBlock   = "database"
	GeneralBlock    = "general"
	TerminalBlock   = "terminal"
)

hcl options block types

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Cache    *bool `hcl:"cache"`
	CacheTTL *int  `hcl:"cache_ttl"`
}

options.Connection

func (*Connection) ConfigMap

func (c *Connection) ConfigMap() map[string]interface{}

func (*Connection) Equals

func (c *Connection) Equals(other *Connection) bool

type Database

type Database struct {
	Port   *int    `hcl:"port"`
	Listen *string `hcl:"listen"`
}

Database

func (*Database) ConfigMap

func (c *Database) ConfigMap() map[string]interface{}

ConfigMap :: create a config map to pass to viper

type General

type General struct {
	LogLevel    *string `hcl:"log_level"`
	UpdateCheck *string `hcl:"update_check"`
}

General

func (General) ConfigMap

func (c General) ConfigMap() map[string]interface{}

ConfigMap :: create a config map to pass to viper

type Options

type Options interface {
	// map of config keys to values - used to populate viper
	ConfigMap() map[string]interface{}
}

type Terminal

type Terminal struct {
	Output    *string `hcl:"output"`
	Separator *string `hcl:"separator"`
	Header    *bool   `hcl:"header"`
	Multi     *bool   `hcl:"multi"`
	Timing    *bool   `hcl:"timing"`
}

Terminal

func (*Terminal) ConfigMap

func (c *Terminal) ConfigMap() map[string]interface{}

ConfigMap :: create a config map to pass to viper

Jump to

Keyboard shortcuts

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