Documentation ¶
Index ¶
- Constants
- func IsRequestURI(uri string) bool
- type Method
- type PasswordChecker
- type Rule
- type TokenExpirationTimeChecker
- type Validator
- func (v *Validator) AddRule(name string, rule *Rule)
- func (v *Validator) AddRules(in map[string](*Rule))
- func (v *Validator) AddSub(name string, s *Validator)
- func (v *Validator) AddSubs(in map[string](*Validator))
- func (v *Validator) GetRule(name string) *Rule
- func (v *Validator) GetRules() map[string](*Rule)
- func (v *Validator) GetSub(name string) *Validator
- func (v *Validator) GetSubs() map[string](*Validator)
- func (v *Validator) Init(f func(*Validator)) *Validator
- func (v *Validator) Validate(s interface{}) error
Constants ¶
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PasswordChecker ¶
type PasswordChecker struct { }
func (*PasswordChecker) MatchString ¶
func (p *PasswordChecker) MatchString(s string) bool
func (*PasswordChecker) String ¶
func (p *PasswordChecker) String() string
type Rule ¶
type TokenExpirationTimeChecker ¶ added in v1.4.4
type TokenExpirationTimeChecker struct { }
TokenExpirationTimeChecker validates Account.TokenExpirationTime should >= 15m and <=24h
func (*TokenExpirationTimeChecker) MatchString ¶ added in v1.4.4
func (p *TokenExpirationTimeChecker) MatchString(s string) bool
MatchString ensures TokenExpirationTime is a valid time.Duration and in legal range.
func (*TokenExpirationTimeChecker) String ¶ added in v1.4.4
func (p *TokenExpirationTimeChecker) String() string
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func NewValidator() *Validator
Click to show internal directories.
Click to hide internal directories.