config

package
v0.0.0-...-1adbf8b Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	Get(string, any) any
	Set(string, any)
	List() []string
	Load() error
	Save() error
}

Config holds persistent configuration.

func FromFile

func FromFile(path string) Config

FromFile creates a new Config with environment lookup capabilities. Note that Load() must be called before using it.

type SessionConfig

type SessionConfig struct {
	CfgFile  *string
	Address  *string
	Database *string
	Username *string
	Password *string
	Format   *string
}

SessionConfig holds config, which should be forgotten upon exit.

func NewSessionConfig

func NewSessionConfig() *SessionConfig

NewSessionConfig initializes a new SessionConfig with default values.

Jump to

Keyboard shortcuts

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