config

package
v0.5.2-beta Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileName = ".privage.conf"
)

Variables

This section is empty.

Functions

func Create

func Create(identityPath, identityType, identityPivSlot, repositoryPath string) error

Create creates a config file.

Types

type Config

type Config struct {

	// The Path of the existing config file.
	// If this is not empty, a config file was found
	Path string

	//
	// Identity
	//
	IdentityPath    string `toml:"identity_path"`
	IdentityType    string `toml:"identity_type"`
	IdentityPivSlot string `toml:"identity_piv_slot"`
	IdentityPivAlgo string `toml:"identity_piv_algo"`

	// the repository for all credential and excripted files
	RepositoryPath string `toml:"secrets_repository_path"`

	// Default fields For credentials
	Email string `toml:"default_email"`
	Login string `toml:"default_login"`
}

A Config contains configuration data found in the .toml config file (if it exists)

func New

func New() (*Config, error)

New creates a config struct.

It tries to find a valid .toml config file. If not found, an empty struct is returned.

Jump to

Keyboard shortcuts

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