config

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientAuth

func GetClientAuth() (string, string, error)

GetClientAuth -- Get the default client authentication information

func GetClientUserAuth

func GetClientUserAuth(username string) (string, string, error)

GetClientUserAuth -- get the authentication credentials for a specific client user

func GetConfigPath

func GetConfigPath(filename string) string

GetConfigPath -- Return the full path of a file in our config directory (usually ~/.config/ondevice/) Can be overridden using setConfigPath() (for testing only) or SetFilePath()

func GetDeviceAuth

func GetDeviceAuth() (string, string, error)

GetDeviceAuth -- Get the device authentication

func GetDeviceID

func GetDeviceID() string

GetDeviceID -- Returns the devId if available (otherwise returns an empty string)

func GetDeviceKey

func GetDeviceKey() string

GetDeviceKey -- Returns the device's key (or an empty string if not defined)

func GetInt added in v0.6.0

func GetInt(section string, key string, defaultValue int) int

GetInt -- Returns the specified integer config value (or defaultValue if not found or on error)

func GetValue

func GetValue(section string, key string) (string, error)

GetValue -- Get a configuration value (as string)

func GetVersion

func GetVersion() string

GetVersion -- Returns the app version

func SetAuth

func SetAuth(scope, user, auth string) error

SetAuth -- Set client/user authentication details

func SetFilePath

func SetFilePath(filename string, path string)

SetFilePath -- Override a config file's path (e.g. to satisfy standard OS paths)

func SetValue

func SetValue(section string, key string, value string) error

SetValue -- create/update a config value

Types

This section is empty.

Jump to

Keyboard shortcuts

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