config

package
v0.0.0-...-0916096 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDir

func DefaultDir() (string, error)

DefaultDir returns the default directory for cses-cli configuration files.

func SaveToDefault

func SaveToDefault(c *Configuration) error

SaveToDefault saves c to the default location.

Types

type Configuration

type Configuration struct {
	SessionToken string `yaml:"sessionToken"`
	Username     string `yaml:"username"`
}

Configuration is the configuration file for the CLI.

func Load

func Load(path string) (*Configuration, error)

Load loads the configuration from path.

func LoadFromDefault

func LoadFromDefault() (*Configuration, error)

LoadFromDefault loads the configuration from the default location.

func (*Configuration) Save

func (c *Configuration) Save(path string) error

Save saves the configuration to path.

Jump to

Keyboard shortcuts

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