utils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByteArray

type ByteArray struct {
	Buffer []byte
}

func (*ByteArray) AddBack

func (obj *ByteArray) AddBack(value byte, qty int)

func (*ByteArray) AddFront

func (obj *ByteArray) AddFront(value byte, qty int)

func (ByteArray) At

func (obj ByteArray) At(pos int) byte

func (*ByteArray) Init

func (obj *ByteArray) Init(len int) *ByteArray

func (ByteArray) IsEmpty

func (obj ByteArray) IsEmpty(data byte) bool

func (ByteArray) LastIndex

func (obj ByteArray) LastIndex() int

func (ByteArray) Len

func (obj ByteArray) Len() int

func (ByteArray) Part

func (obj ByteArray) Part(init int, end int) ByteArray

func (*ByteArray) PopBack

func (obj *ByteArray) PopBack(qty int)

func (*ByteArray) PopFront

func (obj *ByteArray) PopFront(qty int)

func (*ByteArray) PushBack

func (obj *ByteArray) PushBack(data []byte)

func (*ByteArray) PushBackSingle

func (obj *ByteArray) PushBackSingle(data byte)

func (*ByteArray) PushFront

func (obj *ByteArray) PushFront(data []byte)

func (*ByteArray) PushFrontSingle

func (obj *ByteArray) PushFrontSingle(data byte)

func (*ByteArray) Reverse

func (obj *ByteArray) Reverse()

func (ByteArray) ToHex

func (obj ByteArray) ToHex() string

type DemoTokenInfo

type DemoTokenInfo struct {
	IsOk       bool
	Prefix     string
	CurrencyId string
	Uui        string
	Error      string
}

type File

type File struct {
}

func (File) Check

func (obj File) Check(path string) error

func (File) CreateDir

func (obj File) CreateDir(dirPath string) error

func (File) CreateDirIfNotExists

func (obj File) CreateDirIfNotExists(dirname string) error

func (File) CreateFile

func (obj File) CreateFile(fileName string, force bool) error

func (File) CreateFileIfNotExists

func (obj File) CreateFileIfNotExists(filename string) error

func (File) ExtensionFile

func (obj File) ExtensionFile(name string) string

func (File) FileInfo

func (obj File) FileInfo(path string) (os.FileInfo, error)

func (File) GetDirectories

func (obj File) GetDirectories(path string) ([]os.FileInfo, error)

func (File) GetDirectoriesSorted

func (obj File) GetDirectoriesSorted(path string) ([]os.FileInfo, error)

func (File) GetFiles

func (obj File) GetFiles(path string) ([]os.FileInfo, error)

func (File) GetFilesSorted

func (obj File) GetFilesSorted(path string) ([]os.FileInfo, error)

func (File) ReadFile

func (obj File) ReadFile(path string) []byte

func (File) ReadMarshal

func (obj File) ReadMarshal(path string, data interface{}) error

func (File) RemoveFile

func (obj File) RemoveFile(filePath string) error

func (File) Rename

func (obj File) Rename(oldpath string, newpath string) error

func (File) WriteFile

func (obj File) WriteFile(path string, data []byte) error

func (File) WriteMarshal

func (obj File) WriteMarshal(path string, data interface{}) error

func (File) WriteString

func (obj File) WriteString(path string, data string) error

func (File) WriteStringLn

func (obj File) WriteStringLn(path string, data string) error

type TokenInfo

type TokenInfo struct {
	IsOk       bool
	Prefix     string
	CurrencyId string
	UserId     string
	Error      string
}

type Util

type Util struct {
}

func (Util) JsonScript

func (obj Util) JsonScript(m *interface{}) *string

func (Util) Round

func (obj Util) Round(value float64, decimals int) float64

func (Util) SetValue

func (obj Util) SetValue(dst interface{}, src interface{})

func (Util) Tracev4

func (obj Util) Tracev4() string

type UtilString

type UtilString struct {
	Value string
}

func (UtilString) FormatBool

func (obj UtilString) FormatBool(value bool) string

func (UtilString) FormatFloat

func (obj UtilString) FormatFloat(value float64, precision int) string

func (*UtilString) FromInt

func (obj *UtilString) FromInt(value int64) string

func (UtilString) FromUint

func (obj UtilString) FromUint(value uint64) string

func (*UtilString) HexFormat

func (obj *UtilString) HexFormat(buffer []byte, separator string) string

func (UtilString) Split

func (obj UtilString) Split(value string, sep string) []string

func (UtilString) StartsWith

func (obj UtilString) StartsWith(value string, prefix string) bool

func (UtilString) ToBool

func (obj UtilString) ToBool(ok *bool) bool

func (UtilString) ToFloat

func (obj UtilString) ToFloat(ok *bool) float64

func (UtilString) ToInt32

func (obj UtilString) ToInt32(ok *bool) int32

func (UtilString) ToInt64

func (obj UtilString) ToInt64(ok *bool) int64

func (*UtilString) ToLower

func (obj *UtilString) ToLower() string

func (UtilString) ToUint32

func (obj UtilString) ToUint32(ok *bool) uint32

func (UtilString) ToUint64

func (obj UtilString) ToUint64(ok *bool) uint64

func (*UtilString) ToUpper

func (obj *UtilString) ToUpper() string

type UtilToken

type UtilToken struct {
}

func (UtilToken) Build

func (o UtilToken) Build(prefix string, currencyId string, userId string, separator string) string

func (UtilToken) BuildDemo

func (o UtilToken) BuildDemo(prefix string, currencyId string, separator string) string

func (UtilToken) Parse

func (o UtilToken) Parse(token string, separator string) TokenInfo

func (UtilToken) ParseDemo

func (o UtilToken) ParseDemo(token string, separator string) DemoTokenInfo

type UtilsMap

type UtilsMap struct {
}

func (UtilsMap) ErrorToStruct

func (o UtilsMap) ErrorToStruct(in error, out interface{}) error

func (UtilsMap) GetMapValue

func (o UtilsMap) GetMapValue(in map[string]interface{}, key string) map[string]interface{}

func (UtilsMap) GetStringValue

func (o UtilsMap) GetStringValue(in map[string]interface{}, key string) string

func (UtilsMap) InterfaceToStruct

func (o UtilsMap) InterfaceToStruct(in interface{}, out interface{}) error

func (UtilsMap) MapToArray

func (o UtilsMap) MapToArray(in map[string]interface{}) []interface{}

Jump to

Keyboard shortcuts

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