utils

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MPL-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomString added in v0.3.0

func GenerateRandomString(min, max int) (string, error)

GenerateRandomString will create a new random string with alphanumeric characters. The length can also vary by using the min and max parameters. To have a consistent length such as 11, you would pass (11, 12) for the min and max respectively

func ReadPasswordFromStdin added in v0.9.1

func ReadPasswordFromStdin(log logger.Logger, prompt string) (string, error)

readPasswordFromStdin reads a password from stdin and returns the input with trailing newline and/or carriage return removed. It also makes sure that terminal echoing is turned off if stdin is a terminal.

func URLToRepoName added in v0.9.5

func URLToRepoName(url string) string

func ValidateNamespace added in v0.2.3

func ValidateNamespace(ns string) error

func WaitUntil added in v0.0.4

func WaitUntil(out io.Writer, poll, timeout time.Duration, checkDone func() error) error

To continue polling, return an error.

Types

type ConfigStatus added in v0.7.0

type ConfigStatus int
const (
	Missing ConfigStatus = iota
	Partial
	Embedded
	Valid
)

func (ConfigStatus) String added in v0.7.0

func (cs ConfigStatus) String() string

type WalkResult added in v0.7.0

type WalkResult struct {
	Status ConfigStatus
	Path   string
}

func FindCoreConfig added in v0.7.0

func FindCoreConfig(dir string) WalkResult

func (WalkResult) Error added in v0.7.0

func (wr WalkResult) Error() string

Jump to

Keyboard shortcuts

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