config

package
v0.0.0-...-dace297 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultPath

func GetDefaultPath() string

GetDefaultPath returns the best place to save / look-for a config file. Using this function for both saving and reading the config file (with the same OS) guarantees that a file will be found

func SetConfig

func SetConfig(url, tk, path string) error

SetConfig writes a configuration file to the given path

Types

type Config

type Config struct {
	HostURL string `json:"host_url"`
	AuthTK  string `json:"auth_token"`
}

Config is the iprepd cli configuration

func GetConfig

func GetConfig(path string) (*Config, error)

GetConfig returns the configuration at a given path

Jump to

Keyboard shortcuts

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