Documentation
¶
Index ¶
- func EncodeHmac(secret, value string, params ...func() hash.Hash) string
- func EncodeMd5(str string) string
- func EncodePassword(rawPwd string, salt string) string
- func GetRandomString(n int) string
- func NumberDecode(token string, alphabet []byte) string
- func NumberEncode(number string, alphabet []byte) string
- func PBKDF2(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte
- func ToInt64(value interface{}) (d int64, err error)
- func ToStr(value interface{}, args ...int) (s string)
- type Paginator
- func (p *Paginator) HasNext() bool
- func (p *Paginator) HasPages() bool
- func (p *Paginator) HasPrev() bool
- func (p *Paginator) IsActive(page int) bool
- func (p *Paginator) Nums() int64
- func (p *Paginator) Offset() int
- func (p *Paginator) Page() int
- func (p *Paginator) PageLink(page int) string
- func (p *Paginator) PageLinkFirst() (link string)
- func (p *Paginator) PageLinkLast() (link string)
- func (p *Paginator) PageLinkNext() (link string)
- func (p *Paginator) PageLinkPrev() (link string)
- func (p *Paginator) PageNums() int
- func (p *Paginator) Pages() []int
- func (p *Paginator) SetNums(nums interface{})
- type StrTo
- func (f StrTo) Bool() (bool, error)
- func (f *StrTo) Clear()
- func (f StrTo) Exist() bool
- func (f StrTo) Float32() (float32, error)
- func (f StrTo) Float64() (float64, error)
- func (f StrTo) Int() (int, error)
- func (f StrTo) Int16() (int16, error)
- func (f StrTo) Int32() (int32, error)
- func (f StrTo) Int64() (int64, error)
- func (f StrTo) Int8() (int8, error)
- func (f *StrTo) Set(v string)
- func (f StrTo) String() string
- func (f StrTo) Uint() (uint, error)
- func (f StrTo) Uint16() (uint16, error)
- func (f StrTo) Uint32() (uint32, error)
- func (f StrTo) Uint64() (uint64, error)
- func (f StrTo) Uint8() (uint8, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodePassword ¶
use pbkdf2 encode password
func NumberDecode ¶
func NumberEncode ¶
Types ¶
type Paginator ¶
type Paginator struct { Request *http.Request PerPageNums int MaxPages int // contains filtered or unexported fields }
func (*Paginator) PageLinkFirst ¶
func (*Paginator) PageLinkLast ¶
func (*Paginator) PageLinkNext ¶
func (*Paginator) PageLinkPrev ¶
Click to show internal directories.
Click to hide internal directories.