Documentation ¶
Index ¶
- Variables
- func AdaptSessionColor(prePrompt, sId string) string
- func ByteCountBinary(b int64) string
- func ChmodR(path string, filePerm, dirPerm os.FileMode) error
- func CopyFile(src string, dst string) error
- func DeflateBuf(data []byte) []byte
- func ExtractTarGz(gzipPath string, dest string) error
- func ForceRemoveAll(rootPath string)
- func GetParam[T any](param interface{}) (T, error)
- func InstallArtifact(aliasGzFilePath string, installPath, artifactPath string) error
- func Keys[M ~map[K]V, K comparable, V any](m M) []K
- func MustGetParam[T any](param interface{}) T
- func NewSessionColor(prePrompt, sId string) string
- func PackArgs(data []string) ([]string, error)
- func PackBinary(data string) string
- func PackInt(i uint32) (string, error)
- func PackIntString(s string) (string, error)
- func PackShort(i uint16) (string, error)
- func PackShortString(s string) (string, error)
- func PackString(s string) string
- func PackWideString(s string) string
- func ReadFileFromTarGz(tarGzFile string, tarPath string) ([]byte, error)
- func ResolvePath(in string) string
- type BOFArgsBuffer
- type IoMBOFArgsBuffer
- func (b *IoMBOFArgsBuffer) AddData(d []byte) error
- func (b *IoMBOFArgsBuffer) AddInt(d uint32) error
- func (b *IoMBOFArgsBuffer) AddShort(d uint16) error
- func (b *IoMBOFArgsBuffer) AddString(d string) error
- func (b *IoMBOFArgsBuffer) AddWString(d string) error
- func (b *IoMBOFArgsBuffer) GetArgs() []string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Debug logs.Level = 10 Warn logs.Level = 20 Info logs.Level = 30 Error logs.Level = 40 Important logs.Level = 50 GroupStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#8BE9FD")) NameStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FF79C6")) DefaultLogStyle = map[logs.Level]string{ Debug: termenv.String(tui.Rocket+"[+]").Bold().Background(tui.Blue).String() + " %s ", Warn: termenv.String(tui.Zap+"[warn]").Bold().Background(tui.Yellow).String() + " %s ", Important: termenv.String(tui.Fire+"[*]").Bold().Background(tui.Purple).String() + " %s ", Info: termenv.String(tui.HotSpring+"[i]").Bold().Background(tui.Green).String() + " %s ", Error: termenv.String(tui.Monster+"[-]").Bold().Background(tui.Red).String() + " %s ", } )
View Source
var (
ErrFuncHasNotEnoughParams = errors.New("func has not enough params")
)
Functions ¶
func AdaptSessionColor ¶ added in v0.0.2
func ByteCountBinary ¶
ByteCountBinary - Pretty print byte size
func DeflateBuf ¶
DeflateBuf - Deflate a buffer using BestCompression (9)
func ExtractTarGz ¶ added in v0.0.2
ExtractTarGz extracts a .tar.gz file to the specified destination directory
func ForceRemoveAll ¶ added in v0.0.2
func ForceRemoveAll(rootPath string)
func InstallArtifact ¶ added in v0.0.2
func Keys ¶
func Keys[M ~map[K]V, K comparable, V any](m M) []K
From the x/exp source code - gets a slice of keys for a map
func MustGetParam ¶ added in v0.0.2
func MustGetParam[T any](param interface{}) T
func NewSessionColor ¶ added in v0.0.2
func PackBinary ¶ added in v0.0.2
func PackIntString ¶ added in v0.0.2
func PackShortString ¶ added in v0.0.2
func PackString ¶ added in v0.0.2
func PackWideString ¶ added in v0.0.2
func ReadFileFromTarGz ¶
ReadFileFromTarGz - Read a file from a tar.gz file in-memory
func ResolvePath ¶
ResolvePath - Resolve a path from an assumed root path
Types ¶
type BOFArgsBuffer ¶
func (*BOFArgsBuffer) AddData ¶
func (b *BOFArgsBuffer) AddData(d []byte) error
func (*BOFArgsBuffer) AddInt ¶
func (b *BOFArgsBuffer) AddInt(d uint32) error
func (*BOFArgsBuffer) AddShort ¶
func (b *BOFArgsBuffer) AddShort(d uint16) error
func (*BOFArgsBuffer) AddString ¶
func (b *BOFArgsBuffer) AddString(d string) error
func (*BOFArgsBuffer) AddWString ¶
func (b *BOFArgsBuffer) AddWString(d string) error
func (*BOFArgsBuffer) GetBuffer ¶
func (b *BOFArgsBuffer) GetBuffer() ([]byte, error)
type IoMBOFArgsBuffer ¶ added in v0.0.2
type IoMBOFArgsBuffer struct {
Args []string
}
func (*IoMBOFArgsBuffer) AddData ¶ added in v0.0.2
func (b *IoMBOFArgsBuffer) AddData(d []byte) error
func (*IoMBOFArgsBuffer) AddInt ¶ added in v0.0.2
func (b *IoMBOFArgsBuffer) AddInt(d uint32) error
func (*IoMBOFArgsBuffer) AddShort ¶ added in v0.0.2
func (b *IoMBOFArgsBuffer) AddShort(d uint16) error
func (*IoMBOFArgsBuffer) AddString ¶ added in v0.0.2
func (b *IoMBOFArgsBuffer) AddString(d string) error
func (*IoMBOFArgsBuffer) AddWString ¶ added in v0.0.2
func (b *IoMBOFArgsBuffer) AddWString(d string) error
func (*IoMBOFArgsBuffer) GetArgs ¶ added in v0.0.2
func (b *IoMBOFArgsBuffer) GetArgs() []string
Click to show internal directories.
Click to hide internal directories.