utils

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptTermsInteractive

func AcceptTermsInteractive() bool

func BoolToInt

func BoolToInt(b bool) int

func CreateJwtSecret

func CreateJwtSecret(dest string) error

func Exit

func Exit(message string, exitCode int) error

func FileExists

func FileExists(path string) bool

func FlagFileExists

func FlagFileExists(ctx *cli.Context, flag string) bool

FlagFileExists check whether a path under given flag exists

func GetLastFile

func GetLastFile(dir string, dependency string) (string, error)

GetLastFile returns name of last file from given directory in alphabetical order. In case of log files last one is also the newest (format increments similar to typical number - YYYY-MM-DD_HH:MM:SS)

func PrepareTimestampedFile

func PrepareTimestampedFile(logDir, logFileName string) (logFile string, err error)

func ReadValidatorPassword

func ReadValidatorPassword(ctx *cli.Context) (f *os.File, err error)

ReadValidatorPassword is responsible for creating a secure way to pass a validator password from lukso CLI to a client of user's choosing

func RegisterInputWithMessage

func RegisterInputWithMessage(message string) (input string)

func TruncateFileFromDir

func TruncateFileFromDir(filePath string) string

TruncateFileFromDir removes file name from its path. Example: /path/to/foo/foo.txt => /path/to/foo

Types

This section is empty.

Jump to

Keyboard shortcuts

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