noteutil

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() string

ConfigDir returns the config directory

func ConfigFlagsProcess

func ConfigFlagsProcess() (err error)

ConfigFlagsProcess processes the registered config flags

func ConfigFlagsRegister

func ConfigFlagsRegister()

ConfigFlagsRegister registers the config-related flags

func ConfigRead

func ConfigRead() error

ConfigRead reads the current info from config file

func ConfigReset

func ConfigReset()

ConfigReset updates the file with the default info

func ConfigShow

func ConfigShow() error

ConfigShow displays all current config parameters

func ConfigWrite

func ConfigWrite() error

ConfigWrite updates the file with the current config info

func FlagParse

func FlagParse() (err error)

FlagParse is a wrapper around flag.Parse that handles our config flags

Types

type ConfigSettings

type ConfigSettings struct {
	When       string `json:"when,omitempty"`
	Hub        string `json:"hub,omitempty"`
	App        string `json:"app,omitempty"`
	Device     string `json:"device,omitempty"`
	Product    string `json:"product,omitempty"`
	Root       string `json:"root,omitempty"`
	Cert       string `json:"cert,omitempty"`
	Key        string `json:"key,omitempty"`
	Secure     bool   `json:"secure,omitempty"`
	Interface  string `json:"interface,omitempty"`
	Port       string `json:"port,omitempty"`
	PortConfig int    `json:"port_config,omitempty"`
}

ConfigSettings defines the config file that maintains the command processor's state

var Config ConfigSettings

Config are the master config settings

var ConfigFlags ConfigSettings

Jump to

Keyboard shortcuts

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