ui

package
v0.0.0-...-5584581 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Zerotime bool
)

Functions

func LogLevelStrings

func LogLevelStrings() []string

LogLevelStrings returns a slice of all String values of the enum

func ProgressBar

func ProgressBar(title string, max int64) *progressBar

func SetLogFile

func SetLogFile(path string, i LogLevel) error

func SetLoglevel

func SetLoglevel(i LogLevel)

Types

type LogLevel

type LogLevel int
const (
	LevelTrace LogLevel = iota
	LevelDebug
	LevelInfo
	LevelWarn
	LevelError
	LevelFatal
	LevelPanic
)

func GetLoglevel

func GetLoglevel() LogLevel

func LogLevelString

func LogLevelString(s string) (LogLevel, error)

LogLevelString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func LogLevelValues

func LogLevelValues() []LogLevel

LogLevelValues returns all values of the enum

func (LogLevel) IsALogLevel

func (i LogLevel) IsALogLevel() bool

IsALogLevel returns "true" if the value is listed in the enum definition. "false" otherwise

func (LogLevel) String

func (i LogLevel) String() string

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func Debug

func Debug() Logger

func Error

func Error() Logger

func Fatal

func Fatal() Logger

func Info

func Info() Logger

func Trace

func Trace() Logger

func Warn

func Warn() Logger

func (Logger) Err

func (t Logger) Err(e error) Logger

func (Logger) Msg

func (t Logger) Msg(msg string) Logger

func (Logger) Msgf

func (t Logger) Msgf(format string, args ...any)

type ProgressReport

type ProgressReport struct {
	StartTime      time.Time
	Title          string
	ItemType       string
	Current, Total int64
	Percent        float32
	ID             uuid.UUID
	Done           bool
}

func GetProgressReport

func GetProgressReport() []ProgressReport

Jump to

Keyboard shortcuts

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