config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Path

func Path() (string, error)

Path returns the path to the config file.

func Save

func Save(cfg Config) error

Save writes cfg to the config file (chmod 600).

Types

type Config

type Config struct {
	// SessionTimeout is how many minutes to cache the master password after
	// the first successful unlock. 0 disables the session entirely.
	SessionTimeout int `json:"session_timeout"`

	// ClipboardClearAfter is how many seconds to wait before wiping the
	// clipboard after a `psst get`. 0 disables auto-clear.
	ClipboardClearAfter int `json:"clipboard_clear_after"`

	// DefaultSecure makes --secure the implicit default on `psst save`.
	DefaultSecure bool `json:"default_secure"`
}

Config holds all user-configurable settings.

func Load

func Load() (Config, error)

Load reads the config file, returning defaults if it does not exist.

Jump to

Keyboard shortcuts

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