helpers

package
v0.0.6-dev Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareHash

func CompareHash(hashed string, content []byte) bool

CompareHash - compare hash string with []byte

func FileExists

func FileExists(path string) bool

FileExists - check file exist or not

func FindCommand

func FindCommand(in string) (string, bool)

FindCommand - find commant in TUI user input

func GenHash

func GenHash(content []byte) string

GenHash - generate hashsum of []byte

func GenSecretKey

func GenSecretKey(n int) ([]byte, error)

GenSecretKey - generates a random cryptographic sequence of bytes

n - size of slice []byte{}

func GetExpirationFromToken

func GetExpirationFromToken(token string) (*time.Time, error)

GetExpirationFromToken - get expiration time from jwt token value

func GetNameFromToken

func GetNameFromToken(token string) (string, error)

GetNameFromToken - get vault name from jwt token value

func IsFlagPassed

func IsFlagPassed(name string) bool

IsFlagPassed - checking the using of the flag

func OnlyOne

func OnlyOne(in []models.Version) []models.Version

OnlyOne - remove duplicate versions

func ReadSecret

func ReadSecret(msg string) (string, error)

ReadSecret - read secret from stdin in security mode

func RestoreTermState

func RestoreTermState()

RestoreTermState - restore terminal state on exit

func SaveTermState

func SaveTermState()

SaveTermState - save terminal state on start

Types

This section is empty.

Jump to

Keyboard shortcuts

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