config

package
v0.9.1-beta Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 6 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.

func FindPath

func FindPath() (string, error)

Search paths for a conf file First in home second in current

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(path string) (*Config, error)

validate and build

Jump to

Keyboard shortcuts

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