platform

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package platform defines known platforms

Package platform handles stdin processing

Index

Constants

This section is empty.

Variables

View Source
var Systems = SystemTypes{
	MacOSSystem:        "macos",
	LinuxWaylandSystem: "linux-wayland",
	LinuxXSystem:       "linux-x",
	WindowsLinuxSystem: "wsl",
}

Systems are the known platforms for lockbox

Functions

func ConfirmYesNoPrompt

func ConfirmYesNoPrompt(prompt string) (bool, error)

ConfirmYesNoPrompt will ask a yes/no question.

func GetUserInputPassword

func GetUserInputPassword(interactive bool) ([]byte, error)

GetUserInputPassword will read the user's input from stdin via multiple means.

func IsInputFromPipe

func IsInputFromPipe() bool

IsInputFromPipe will indicate if connected to stdin pipe.

func PathExists

func PathExists(file string) bool

PathExists indicates whether a path exists (true) or not (false)

func ReadInteractivePassword

func ReadInteractivePassword() (string, error)

ReadInteractivePassword will prompt for a single password for unlocking

func Stdin

func Stdin(one bool) (string, error)

Stdin will get one (or more) lines of stdin as a string.

Types

type System added in v1.4.0

type System string

System represents the platform lockbox is running on.

func NewSystem added in v1.4.0

func NewSystem(candidate string) (System, error)

NewSystem gets a new system platform.

type SystemTypes added in v1.4.0

type SystemTypes struct {
	MacOSSystem        System
	LinuxWaylandSystem System
	LinuxXSystem       System
	WindowsLinuxSystem System
}

SystemTypes defines systems lockbox is known to run on or can run on

func (SystemTypes) List added in v1.4.0

func (p SystemTypes) List() []string

List will list the platform types on the struct

Directories

Path Synopsis
Package clip handles platform-specific operations around clipboards.
Package clip handles platform-specific operations around clipboards.

Jump to

Keyboard shortcuts

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