common

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: OSL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Accent      = "#DDB6F2"
	AccentDark  = "#A689B5"
	AccentLight = "#E5C8F5"
	Secondary   = "#F28FAD"
	Text        = "#F8F8F0"
	Danger      = "#FA827B"
)
View Source
const TTL = 30

Variables

View Source
var (
	// PathAsunder is the directory where asunder stores its data.
	PathAsunder = filepath.Join(xdg.DataHome, "asunder")

	// PathDB is the database where encrypted entries are stored.
	PathDB = filepath.Join(PathAsunder, "asunder.db")

	// PathData is where the hashed secret is stored.
	PathData = filepath.Join(PathAsunder, "data.json")
)
View Source
var (
	Styles   = list.NewDefaultItemStyles()
	Delegate = list.NewDefaultDelegate()

	DimmedAccentColor = lg.AdaptiveColor{Light: AccentLight, Dark: AccentDark}
	AccentColor       = lg.Color(Accent)
	SecondaryColor    = lg.Color(Secondary)
	TextColor         = lg.Color(Text)
	DangerColor       = lg.Color(Danger)

	AppStyle = lg.NewStyle().Margin(1, 2)

	DangerForeground     = lg.NewStyle().Foreground(DangerColor)
	DangerForegroundBold = lg.NewStyle().Bold(true).Foreground(DangerColor)
	AccentForegroundBold = lg.NewStyle().Bold(true).Foreground(AccentColor)
)
View Source
var InvalidCode = DangerForeground.Render("TOTP secret is invalid")

Functions

func Check

func Check(err error)

func CheckSurvey

func CheckSurvey(err error)

func FileExists

func FileExists(path string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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