config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

package config manages config data for the gopher.farm cli

Index

Constants

This section is empty.

Variables

View Source
var (
	// HomeDir holds the users home directory. Automatically detected if not set
	HomeDir string

	// ConfigDir hols the users config directory. Automatically set to $HOME/.config/gopherfarm/ if not set. Automatically created if it does not exist yet.
	ConfigDir string
)

Functions

func WriteCreds

func WriteCreds(c *Creds) error

WriteCreds writes the credentials to a config file on disk

Types

type Creds

type Creds struct {
	Key *ed25519.PrivateKey
}

Creds holds the gopher.farm credentials

func ReadCreds

func ReadCreds() (*Creds, error)

ReadCreds reads the credentials from the config file on disk

func (*Creds) PrivateKey

func (c *Creds) PrivateKey() *ed25519.PrivateKey

PrivateKey gets the private key credential from Creds

Jump to

Keyboard shortcuts

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