Versions in this module Expand all Collapse all v0 v0.0.2 Apr 14, 2023 Changes in this version + func MapBool(data Map, keys ...string) bool + func MapFloat(data Map, keys ...string) float64 + func MapInt(data Map, keys ...string) int64 + func MapString(data Map, keys ...string) string v0.0.1 Mar 23, 2023 Changes in this version + const DefaultAlphabet + const NoDuration + const Version + var ErrUnavailable = errors.New("unavailable") + var GlobalExecutor = NewExecutor() + var HandlePanic = func(recovered interface{}, funcName string) + func AllinStrings(ss []string, ins []string) bool + func AnyToString(val Any) string + func DeepMapping(src Map, dests ...Map) Map + func ExampleExecutor_Go() + func ExampleExecutor_Go_panic() + func ExampleExecutor_StopAndWaitForever() + func Extension(name string) string + func HMACSign(data string, key string) (string, error) + func HMACVerify(data, sign string, key string) error + func InStrings(s string, ins []string) bool + func Ip2Num(ip string) int64 + func MD5(str string) string + func MD5File(file string) string + func MD5FileBase64(file string) string + func Md5(str string) string + func Md5File(file string) string + func MergeString(args ...string) string + func NameWithoutExt(p string) string + func Num2Ip(ipInt int64) string + func ParseDuration(s string) (time.Duration, error) + func ParseDurationConfig(config Map, field string) time.Duration + func ParseSize(s string) int64 + func ParseTOML(s string) (Map, error) + func SHA1(str string) string + func SHA1File(file string) string + func SHA1FileBase64(file string) string + func SHA256(str string) string + func SHA256File(file string) string + func SHA256FileBase64(file string) string + func Sha1(str string) string + func Sha1BaseFile(file string) string + func Sha1File(file string) string + func Sha256(str string) string + func Sha256BaseFile(file string) string + func Sha256File(file string) string + func Split(s string) []string + func UUID() string + type Executor struct + HandlePanic func(recovered interface{}, funcName string) + func NewExecutor() *Executor + func (executor *Executor) Go(handler func(ctx context.Context)) + func (executor *Executor) Stop() + func (executor *Executor) StopAndWait(ctx context.Context) + func (executor *Executor) StopAndWaitForever() + type FastID struct + func NewFastID(timeBits, nodeBits, stepBits uint, timeStart int64) *FastID + func NewFastIDWithNode(timeBits, nodeBits, stepBits uint, timeStart, nodeId int64) *FastID + func (c *FastID) GetSequence(id int64) int64 + func (c *FastID) GetTime(id int64) int64 + func (c *FastID) NextID() int64 + type HashID struct + func New() (*HashID, error) + func NewWithData(data *HashIDData) (*HashID, error) + func (h *HashID) Decode(hash string) []int + func (h *HashID) DecodeHex(hash string) (string, error) + func (h *HashID) DecodeInt64(hash string) []int64 + func (h *HashID) DecodeInt64WithError(hash string) ([]int64, error) + func (h *HashID) DecodeWithError(hash string) ([]int, error) + func (h *HashID) Encode(numbers []int) (string, error) + func (h *HashID) EncodeHex(hex string) (string, error) + func (h *HashID) EncodeInt64(numbers []int64) (string, error) + type HashIDData struct + Alphabet string + MinLength int + Salt string + func NewData() *HashIDData + type HashRing struct + func NewHashRing(weights map[string]int, spotsArgs ...int) *HashRing + func (h *HashRing) Append(nodeKey string, weight int) + func (h *HashRing) Locate(s string) string + func (h *HashRing) Remove(nodeKey string) + func (h *HashRing) Update(nodeKey string, weight int) + type Runner struct + func NewRunner() *Runner + func (s *Runner) End() + func (s *Runner) Run(f func()) + func (s *Runner) Stop() chan error + func (s *Runner) Wait() + type TOMLBuffer struct + func (buf *TOMLBuffer) Close() error + func (buf *TOMLBuffer) Read(p []byte) (n int, err error) + func (buf *TOMLBuffer) Seek(offset int64, whence int) (int64, error) + type TOMLBuilder struct + func NewTOMLBuilder() *TOMLBuilder + func (this *TOMLBuilder) Append(key string, vals ...string) + func (this *TOMLBuilder) Build() string + func (this *TOMLBuilder) Files() map[string][]TOMLFile + func (this *TOMLBuilder) Forms() map[string][]string + func (this *TOMLBuilder) Store(key, name, mime string, buf io.ReadSeekCloser) + type TOMLFile struct + Buffer io.ReadSeekCloser + MIME string + Name string