Documentation ¶
Index ¶
- Constants
- func Bytes(s uint64) string
- func ComputeHmac256() string
- func ErrorParse(valid validation.Validation) string
- func GenUrl(s string) (url string)
- func GenUuid() (string, error)
- func GetFileSize(name string) (int64, error)
- func GetFullPath(name string) string
- func GetLinkPath(name string) string
- func IBytes(s uint64) string
- func ParseBytes(s string) (uint64, error)
- func Pwdhash(str string) string
- func RandInt(min int, max int) int
- func RandStr(strSize int, randType string) string
- func RandomString(l int) string
- func StringsToJson(str string) string
- func Strtomd5(s string) string
- type Cache
- func (c *Cache) Clear(key interface{}) (*Cache, error)
- func (c *Cache) ClearAll() (*Cache, error)
- func (c *Cache) ClearGroup(group string) (*Cache, error)
- func (c *Cache) Delete(key string) *Cache
- func (c *Cache) Get(key string) interface{}
- func (c *Cache) GetKey(key interface{}) string
- func (c *Cache) IsExist(key string) bool
- func (c *Cache) Put(group, key string, val interface{}) (*Cache, error)
- type Request
- type Result
Constants ¶
View Source
const ( Byte = 1 << (iota * 10) KiByte MiByte GiByte TiByte PiByte EiByte )
IEC Sizes. kibis of bits
View Source
const ( IByte = 1 KByte = IByte * 1000 MByte = KByte * 1000 GByte = MByte * 1000 TByte = GByte * 1000 PByte = TByte * 1000 EByte = PByte * 1000 )
SI Sizes.
Variables ¶
This section is empty.
Functions ¶
func Bytes ¶
Bytes produces a human readable representation of an SI size.
See also: ParseBytes.
Bytes(82854982) -> 83MB
func ComputeHmac256 ¶ added in v0.0.7
func ComputeHmac256() string
func ErrorParse ¶
func ErrorParse(valid validation.Validation) string
func GetFileSize ¶
func GetFullPath ¶
func GetLinkPath ¶
func IBytes ¶
IBytes produces a human readable representation of an IEC size.
See also: ParseBytes.
IBytes(82854982) -> 79MiB
func ParseBytes ¶
ParseBytes parses a string representation of bytes into the number of bytes it represents.
See Also: Bytes, IBytes.
ParseBytes("42MB") -> 42000000, nil ParseBytes("42mib") -> 44040192, nil
func RandomString ¶
func StringsToJson ¶
Types ¶
type Cache ¶
Click to show internal directories.
Click to hide internal directories.