Documentation ¶
Index ¶
- Constants
- Variables
- func AssertIs(a interface{}, args ...interface{}) error
- func AssertNot(a interface{}, args ...interface{}) error
- func CreateTimeLimitCode(data string, minutes int, startInf interface{}) string
- func EncodeHmac(secret, value string, params ...func() hash.Hash) string
- func EncodeMd5(str string) string
- func EncodePassword(rawPwd string, salt string) string
- func FormChanges(base interface{}, modified interface{}, skips ...string) (fields []string)
- func GetRandomString(n int) string
- func InitSphinxPools() error
- func IsMatchHost(uri string) bool
- 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 ParseForm(form interface{}, values url.Values)
- func RegisterFieldCreater(name string, field FieldCreater)
- func RegisterFieldFilter(name string, field FieldFilter)
- func RenderMarkdown(mdStr string) string
- func RenderTemplate(TplNames string, Data map[interface{}]interface{}) string
- func SetFormValues(from interface{}, to interface{}, skips ...string)
- func ThrowFail(t *testing.T, err error, args ...interface{})
- func ThrowFailNow(t *testing.T, err error, args ...interface{})
- func TimesReachedSet(key string, times int, reloadMinutes int)
- func TimesReachedTest(key string, times int) (int, bool)
- func ToInt64(value interface{}) (d int64, err error)
- func ToStr(value interface{}, args ...int) (s string)
- func ValuesCompare(is bool, a interface{}, args ...interface{}) (err error, ok bool)
- func VerifyTimeLimitCode(data string, minutes int, code string) bool
- type FieldCreater
- type FieldFilter
- type FieldSet
- type FormHelper
- type FormLabeler
- type FormLocaler
- type FormPlaceholder
- type FormSets
- type HtmlLazyField
- type SphinxDB
- type SphinxMeta
- 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 ¶
View Source
const TimeLimitCodeLength = 12 + 6 + 40
Variables ¶
View Source
var ErrSphinxDBClosed = fmt.Errorf("SphinxDB already closed and give back to pools")
View Source
var SphinxPools *sphinxPools
Functions ¶
func CreateTimeLimitCode ¶
create a time limit code code format: 12 length date time string + 6 minutes string + 40 sha1 encoded string
func EncodePassword ¶
use pbkdf2 encode password
func FormChanges ¶
compare field values between two struct pointer return changed field names
func InitSphinxPools ¶
func InitSphinxPools() error
func IsMatchHost ¶
func NumberDecode ¶
func NumberEncode ¶
func RegisterFieldCreater ¶
func RegisterFieldCreater(name string, field FieldCreater)
register a custom label/input creater
func RegisterFieldFilter ¶
func RegisterFieldFilter(name string, field FieldFilter)
register a custom label/input creater
func RenderMarkdown ¶
func RenderTemplate ¶
func SetFormValues ¶
func SetFormValues(from interface{}, to interface{}, skips ...string)
set values from one struct to other struct both need ptr struct
func ThrowFailNow ¶
func TimesReachedSet ¶
func ValuesCompare ¶
Types ¶
type FieldCreater ¶
type FieldCreater func(*FieldSet)
type FieldFilter ¶
type FieldFilter func(*FieldSet)
type FormHelper ¶
type FormLabeler ¶
type FormLocaler ¶
type FormPlaceholder ¶
type FormSets ¶
type FormSets struct { FieldList []*FieldSet Fields map[string]*FieldSet Locale FormLocaler // contains filtered or unexported fields }
func NewFormSets ¶
func NewFormSets(form interface{}, errs map[string]*validation.ValidationError, locale FormLocaler) *FormSets
create formSets for generate label/field html code
type HtmlLazyField ¶
func (HtmlLazyField) String ¶
func (f HtmlLazyField) String() string
type SphinxDB ¶
type SphinxDB struct {
// contains filtered or unexported fields
}
func (*SphinxDB) RawValuesFlat ¶
func (*SphinxDB) ShowMeta ¶
func (s *SphinxDB) ShowMeta() (*SphinxMeta, error)
type SphinxMeta ¶
Click to show internal directories.
Click to hide internal directories.