base

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTTL = 6 * time.Hour
	EnvTTL     = "PASSMNGR_TTL"
	EnvPath    = "PASSMNGR_DB_PATH"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	TTL  time.Duration
	Path string
	// contains filtered or unexported fields
}

func (*Base) ClearLine

func (b *Base) ClearLine(fd *os.File)

func (*Base) InputFetcher

func (b *Base) InputFetcher(prompt string) func() ([]byte, error)

func (*Base) InputFetcherWithConfirm

func (b *Base) InputFetcherWithConfirm(prompt, confirmation string) func() ([]byte, error)

func (*Base) IsTerm

func (b *Base) IsTerm(f *os.File) bool

IsTerm returns true is stdin is a terminal

func (*Base) SetFlags

func (b *Base) SetFlags(f *flag.FlagSet)

func (*Base) ShowValue

func (b *Base) ShowValue(ctx context.Context, fd *os.File, timeout time.Duration, value []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳