config

package
v0.0.0-...-f7a6a58 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package config provides handling of configuration through a config file

Index

Constants

View Source
const (
	DefaultConfigFileBaseName  = ".kizcool"
	DefaultConfigFileExtension = ".yaml"
	TahomaBaseURL              = "https://tahomalink.com/enduser-mobile-web"
)

Defaults for config file

Variables

This section is empty.

Functions

func BaseURL

func BaseURL() string

BaseURL returns the BaseURL

func Debug

func Debug() bool

Debug returns true if debugging was requested

func File

func File() string

File returns the name and path of the configuration file in use.

func Password

func Password() string

Password returns the password

func Read

func Read(create bool) error

Read reads in config file. It should be called before using other functions in this package. The local directory is searched first, then the user's home directory If no file is found and create is true, a config file with defaults is created.

func SessionID

func SessionID() string

SessionID returns the SessionID

func SetBaseURL

func SetBaseURL(url string)

SetBaseURL sets the BaseURL

func SetPassword

func SetPassword(password string)

SetPassword sets the password

func SetSessionID

func SetSessionID(ID string)

SetSessionID stores the session ID in the configuration file

func SetUsername

func SetUsername(username string)

SetUsername sets the username

func Username

func Username() string

Username returns the username

func UsingConfigFile

func UsingConfigFile() bool

UsingConfigFile is true if a config file is used, false otherwise (e.g. only env variables)

func Write

func Write() error

Write saves the current config to file

Types

This section is empty.

Jump to

Keyboard shortcuts

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