xh

package
v0.0.0-...-ac9ea8b Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Letters = []byte("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")

Functions

func Cookify

func Cookify(val string) string

func CookifyS

func CookifyS(vals ...string) string

func DecryptString

func DecryptString(key []byte, ciphertext string) (string, error)

func DropDir

func DropDir(dir, subdir string) (string, error)

func DropDirComplete

func DropDirComplete(nname string)

func DropDirPrep

func DropDirPrep(dir, subdir string) (string, error)

func EncryptString

func EncryptString(key []byte, text string) (string, error)

func Exec

func Exec(exe string, args []string) (bytes.Buffer, bytes.Buffer, error)

func Fortune

func Fortune() string

func GenRandId

func GenRandId(length int) (string, error)

func GetDirDU

func GetDirDU(dir string) (uint64, error)

func GetIPPort

func GetIPPort(str string) (string, int32)

"ip:port" or ":port" expected

func GetLines

func GetLines(data []byte) []string

func MakeEndpoint

func MakeEndpoint(addr string) string

func MakeIPPort

func MakeIPPort(ip string, port int32) string

func ReadYamlConfig

func ReadYamlConfig(path string, c interface{}) error

func SafeEnv

func SafeEnv(env_name string, defaul_value string) string

func Sha256sum

func Sha256sum(s []byte) string

func WriteYamlConfig

func WriteYamlConfig(path string, c interface{}) error

Types

type Bitmask

type Bitmask uint32

func (*Bitmask) Fill

func (b *Bitmask) Fill()

func (*Bitmask) Set

func (b *Bitmask) Set(bit uint)

func (*Bitmask) Test

func (b *Bitmask) Test(bit uint) bool

type StringsValues

type StringsValues map[string]bool

func MakeStringValues

func MakeStringValues(vals ...string) StringsValues

func ParseStringValues

func ParseStringValues(vals_sep string) StringsValues

func (StringsValues) Have

func (sv StringsValues) Have(v string) bool

func (StringsValues) String

func (sv StringsValues) String() string

type XCreds

type XCreds struct {
	User string
	Pass string
	Host string
	Port string
	Domn string
}

func ParseXCreds

func ParseXCreds(url string) *XCreds

func (*XCreds) Addr

func (xc *XCreds) Addr() string

func (*XCreds) AddrP

func (xc *XCreds) AddrP(port string) string

func (*XCreds) Resolve

func (xc *XCreds) Resolve()

func (*XCreds) URL

func (xc *XCreds) URL() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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