Documentation ¶
Index ¶
- Constants
- Variables
- type CIDRAddr
- type CIDRFilter
- func (f *CIDRFilter) AddValidator(validator CIDRValidator) *CIDRFilter
- func (f *CIDRFilter) Allow(vals ...string) *CIDRFilter
- func (f *CIDRFilter) IsIPv4() *CIDRFilter
- func (f *CIDRFilter) IsIPv6() *CIDRFilter
- func (f *CIDRFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *CIDRFilter) ToString() *CIDRFilter
- type CIDRSetFilter
- func (f *CIDRSetFilter) AddValidator(validator CIDRSetValidator) *CIDRSetFilter
- func (f *CIDRSetFilter) Allow(vals ...string) *CIDRSetFilter
- func (f *CIDRSetFilter) Delimiter(delimiter string) *CIDRSetFilter
- func (f *CIDRSetFilter) ItemIsIPv4() *CIDRSetFilter
- func (f *CIDRSetFilter) ItemIsIPv6() *CIDRSetFilter
- func (f *CIDRSetFilter) MaxCount(count int) *CIDRSetFilter
- func (f *CIDRSetFilter) MinCount(count int) *CIDRSetFilter
- func (f *CIDRSetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type CIDRSetValidator
- type CIDRValidator
- type DefaultFilter
- type EmailFilter
- func (f *EmailFilter) AddValidator(validator EmailValidator) *EmailFilter
- func (f *EmailFilter) Allow(vals ...string) *EmailFilter
- func (f *EmailFilter) Between(minLength, maxLength int) *EmailFilter
- func (f *EmailFilter) Domain(domain string) *EmailFilter
- func (f *EmailFilter) KeepCase() *EmailFilter
- func (f *EmailFilter) LongerThan(length int) *EmailFilter
- func (f *EmailFilter) MaxLen(length int) *EmailFilter
- func (f *EmailFilter) MinLen(length int) *EmailFilter
- func (f *EmailFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *EmailFilter) ShorterThan(length int) *EmailFilter
- func (f *EmailFilter) ToLower() *EmailFilter
- func (f *EmailFilter) ToUpper() *EmailFilter
- type EmailSetFilter
- func (f *EmailSetFilter) AddValidator(validator EmailSetValidator) *EmailSetFilter
- func (f *EmailSetFilter) Allow(vals ...string) *EmailSetFilter
- func (f *EmailSetFilter) Delimiter(delimiter string) *EmailSetFilter
- func (f *EmailSetFilter) ItemBetween(minLength, maxLength int) *EmailSetFilter
- func (f *EmailSetFilter) ItemDomain(domain string) *EmailSetFilter
- func (f *EmailSetFilter) ItemLongerThan(length int) *EmailSetFilter
- func (f *EmailSetFilter) ItemMaxLen(length int) *EmailSetFilter
- func (f *EmailSetFilter) ItemMinLen(length int) *EmailSetFilter
- func (f *EmailSetFilter) ItemShorterThan(length int) *EmailSetFilter
- func (f *EmailSetFilter) KeepCase() *EmailSetFilter
- func (f *EmailSetFilter) MaxCount(count int) *EmailSetFilter
- func (f *EmailSetFilter) MinCount(count int) *EmailSetFilter
- func (f *EmailSetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *EmailSetFilter) ToLower() *EmailSetFilter
- func (f *EmailSetFilter) ToUpper() *EmailSetFilter
- type EmailSetValidator
- type EmailValidator
- type EmptyToNilFilter
- type Error
- type ErrorType
- type Filter
- type Float32Filter
- func (f *Float32Filter) AddValidator(validator Float32Validator) *Float32Filter
- func (f *Float32Filter) Allow(vals ...string) *Float32Filter
- func (f *Float32Filter) Between(min, max float32) *Float32Filter
- func (f *Float32Filter) DecimalPlace(length int) *Float32Filter
- func (f *Float32Filter) Equal(val float32) *Float32Filter
- func (f *Float32Filter) In(set []float32) *Float32Filter
- func (f *Float32Filter) LargerThan(val float32) *Float32Filter
- func (f *Float32Filter) Max(val float32) *Float32Filter
- func (f *Float32Filter) Min(val float32) *Float32Filter
- func (f *Float32Filter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *Float32Filter) SmallerThan(val float32) *Float32Filter
- type Float32Validator
- type Float64Filter
- func (f *Float64Filter) AddValidator(validator Float64Validator) *Float64Filter
- func (f *Float64Filter) Allow(vals ...string) *Float64Filter
- func (f *Float64Filter) Between(min, max float64) *Float64Filter
- func (f *Float64Filter) DecimalPlace(length int) *Float64Filter
- func (f *Float64Filter) Equal(val float64) *Float64Filter
- func (f *Float64Filter) In(set []float64) *Float64Filter
- func (f *Float64Filter) LargerThan(val float64) *Float64Filter
- func (f *Float64Filter) Max(val float64) *Float64Filter
- func (f *Float64Filter) Min(val float64) *Float64Filter
- func (f *Float64Filter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *Float64Filter) SmallerThan(val float64) *Float64Filter
- type Float64Validator
- type IPFilter
- func (f *IPFilter) AddValidator(validator IPValidator) *IPFilter
- func (f *IPFilter) Allow(vals ...string) *IPFilter
- func (f *IPFilter) IsIPv4() *IPFilter
- func (f *IPFilter) IsIPv6() *IPFilter
- func (f *IPFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *IPFilter) ToString() *IPFilter
- type IPSetFilter
- func (f *IPSetFilter) AddValidator(validator IPSetValidator) *IPSetFilter
- func (f *IPSetFilter) Allow(vals ...string) *IPSetFilter
- func (f *IPSetFilter) Delimiter(delimiter string) *IPSetFilter
- func (f *IPSetFilter) ItemIsIPv4() *IPSetFilter
- func (f *IPSetFilter) ItemIsIPv6() *IPSetFilter
- func (f *IPSetFilter) ItemToString() *IPSetFilter
- func (f *IPSetFilter) MaxCount(count int) *IPSetFilter
- func (f *IPSetFilter) MinCount(count int) *IPSetFilter
- func (f *IPSetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type IPSetValidator
- type IPValidator
- type Int32Filter
- func (f *Int32Filter) AddValidator(validator Int32Validator) *Int32Filter
- func (f *Int32Filter) Allow(vals ...string) *Int32Filter
- func (f *Int32Filter) Base(base int) *Int32Filter
- func (f *Int32Filter) Between(min, max int32) *Int32Filter
- func (f *Int32Filter) Equal(val int32) *Int32Filter
- func (f *Int32Filter) In(set []int32) *Int32Filter
- func (f *Int32Filter) LargerThan(val int32) *Int32Filter
- func (f *Int32Filter) Max(val int32) *Int32Filter
- func (f *Int32Filter) Min(val int32) *Int32Filter
- func (f *Int32Filter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *Int32Filter) SmallerThan(val int32) *Int32Filter
- type Int32RangeFilter
- func (f *Int32RangeFilter) AddValidator(validator Int32RangeValidator) *Int32RangeFilter
- func (f *Int32RangeFilter) Allow(vals ...string) *Int32RangeFilter
- func (f *Int32RangeFilter) LeftBetween(min, max int32) *Int32RangeFilter
- func (f *Int32RangeFilter) LeftDefault(val int32) *Int32RangeFilter
- func (f *Int32RangeFilter) LeftEqual(val int32) *Int32RangeFilter
- func (f *Int32RangeFilter) LeftLargerThan(val int32) *Int32RangeFilter
- func (f *Int32RangeFilter) LeftMax(val int32) *Int32RangeFilter
- func (f *Int32RangeFilter) LeftMin(val int32) *Int32RangeFilter
- func (f *Int32RangeFilter) LeftSmallerThan(val int32) *Int32RangeFilter
- func (f *Int32RangeFilter) MaxDistance(val uint) *Int32RangeFilter
- func (f *Int32RangeFilter) MinDistance(val uint) *Int32RangeFilter
- func (f *Int32RangeFilter) RightBetween(min, max int32) *Int32RangeFilter
- func (f *Int32RangeFilter) RightDefault(val int32) *Int32RangeFilter
- func (f *Int32RangeFilter) RightEqual(val int32) *Int32RangeFilter
- func (f *Int32RangeFilter) RightLargerThan(val int32) *Int32RangeFilter
- func (f *Int32RangeFilter) RightMax(val int32) *Int32RangeFilter
- func (f *Int32RangeFilter) RightMin(val int32) *Int32RangeFilter
- func (f *Int32RangeFilter) RightSmallerThan(val int32) *Int32RangeFilter
- func (f *Int32RangeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type Int32RangeValidator
- type Int32SetFilter
- func (f *Int32SetFilter) AddValidator(validator Int32SetValidator) *Int32SetFilter
- func (f *Int32SetFilter) Allow(vals ...string) *Int32SetFilter
- func (f *Int32SetFilter) Base(base int) *Int32SetFilter
- func (f *Int32SetFilter) Delimiter(delimiter string) *Int32SetFilter
- func (f *Int32SetFilter) ItemBetween(min, max int32) *Int32SetFilter
- func (f *Int32SetFilter) ItemIn(set []int32) *Int32SetFilter
- func (f *Int32SetFilter) ItemLargerThan(val int32) *Int32SetFilter
- func (f *Int32SetFilter) ItemMax(val int32) *Int32SetFilter
- func (f *Int32SetFilter) ItemMin(val int32) *Int32SetFilter
- func (f *Int32SetFilter) ItemSmallerThan(val int32) *Int32SetFilter
- func (f *Int32SetFilter) MaxCount(count int) *Int32SetFilter
- func (f *Int32SetFilter) MinCount(count int) *Int32SetFilter
- func (f *Int32SetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type Int32SetValidator
- type Int32Validator
- type Int64Filter
- func (f *Int64Filter) AddValidator(validator Int64Validator) *Int64Filter
- func (f *Int64Filter) Allow(vals ...string) *Int64Filter
- func (f *Int64Filter) Base(base int) *Int64Filter
- func (f *Int64Filter) Between(min, max int64) *Int64Filter
- func (f *Int64Filter) Equal(val int64) *Int64Filter
- func (f *Int64Filter) In(set []int64) *Int64Filter
- func (f *Int64Filter) LargerThan(val int64) *Int64Filter
- func (f *Int64Filter) Max(val int64) *Int64Filter
- func (f *Int64Filter) Min(val int64) *Int64Filter
- func (f *Int64Filter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *Int64Filter) SmallerThan(val int64) *Int64Filter
- type Int64RangeFilter
- func (f *Int64RangeFilter) AddValidator(validator Int64RangeValidator) *Int64RangeFilter
- func (f *Int64RangeFilter) Allow(vals ...string) *Int64RangeFilter
- func (f *Int64RangeFilter) LeftBetween(min, max int64) *Int64RangeFilter
- func (f *Int64RangeFilter) LeftDefault(val int64) *Int64RangeFilter
- func (f *Int64RangeFilter) LeftEqual(val int64) *Int64RangeFilter
- func (f *Int64RangeFilter) LeftLargerThan(val int64) *Int64RangeFilter
- func (f *Int64RangeFilter) LeftMax(val int64) *Int64RangeFilter
- func (f *Int64RangeFilter) LeftMin(val int64) *Int64RangeFilter
- func (f *Int64RangeFilter) LeftSmallerThan(val int64) *Int64RangeFilter
- func (f *Int64RangeFilter) MaxDistance(val uint64) *Int64RangeFilter
- func (f *Int64RangeFilter) MinDistance(val uint64) *Int64RangeFilter
- func (f *Int64RangeFilter) RightBetween(min, max int64) *Int64RangeFilter
- func (f *Int64RangeFilter) RightDefault(val int64) *Int64RangeFilter
- func (f *Int64RangeFilter) RightEqual(val int64) *Int64RangeFilter
- func (f *Int64RangeFilter) RightLargerThan(val int64) *Int64RangeFilter
- func (f *Int64RangeFilter) RightMax(val int64) *Int64RangeFilter
- func (f *Int64RangeFilter) RightMin(val int64) *Int64RangeFilter
- func (f *Int64RangeFilter) RightSmallerThan(val int64) *Int64RangeFilter
- func (f *Int64RangeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type Int64RangeValidator
- type Int64SetFilter
- func (f *Int64SetFilter) AddValidator(validator Int64SetValidator) *Int64SetFilter
- func (f *Int64SetFilter) Allow(vals ...string) *Int64SetFilter
- func (f *Int64SetFilter) Base(base int) *Int64SetFilter
- func (f *Int64SetFilter) Delimiter(delimiter string) *Int64SetFilter
- func (f *Int64SetFilter) ItemBetween(min, max int64) *Int64SetFilter
- func (f *Int64SetFilter) ItemIn(set []int64) *Int64SetFilter
- func (f *Int64SetFilter) ItemLargerThan(val int64) *Int64SetFilter
- func (f *Int64SetFilter) ItemMax(val int64) *Int64SetFilter
- func (f *Int64SetFilter) ItemMin(val int64) *Int64SetFilter
- func (f *Int64SetFilter) ItemSmallerThan(val int64) *Int64SetFilter
- func (f *Int64SetFilter) MaxCount(count int) *Int64SetFilter
- func (f *Int64SetFilter) MinCount(count int) *Int64SetFilter
- func (f *Int64SetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type Int64SetValidator
- type Int64Validator
- type IntFilter
- func (f *IntFilter) AddValidator(validator IntValidator) *IntFilter
- func (f *IntFilter) Allow(vals ...string) *IntFilter
- func (f *IntFilter) Base(base int) *IntFilter
- func (f *IntFilter) Between(min, max int) *IntFilter
- func (f *IntFilter) Equal(val int) *IntFilter
- func (f *IntFilter) In(set []int) *IntFilter
- func (f *IntFilter) LargerThan(val int) *IntFilter
- func (f *IntFilter) Max(val int) *IntFilter
- func (f *IntFilter) Min(val int) *IntFilter
- func (f *IntFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *IntFilter) SmallerThan(val int) *IntFilter
- type IntRangeFilter
- func (f *IntRangeFilter) AddValidator(validator IntRangeValidator) *IntRangeFilter
- func (f *IntRangeFilter) Allow(vals ...string) *IntRangeFilter
- func (f *IntRangeFilter) LeftBetween(min, max int) *IntRangeFilter
- func (f *IntRangeFilter) LeftDefault(val int) *IntRangeFilter
- func (f *IntRangeFilter) LeftEqual(val int) *IntRangeFilter
- func (f *IntRangeFilter) LeftLargerThan(val int) *IntRangeFilter
- func (f *IntRangeFilter) LeftMax(val int) *IntRangeFilter
- func (f *IntRangeFilter) LeftMin(val int) *IntRangeFilter
- func (f *IntRangeFilter) LeftSmallerThan(val int) *IntRangeFilter
- func (f *IntRangeFilter) MaxDistance(val uint) *IntRangeFilter
- func (f *IntRangeFilter) MinDistance(val uint) *IntRangeFilter
- func (f *IntRangeFilter) RightBetween(min, max int) *IntRangeFilter
- func (f *IntRangeFilter) RightDefault(val int) *IntRangeFilter
- func (f *IntRangeFilter) RightEqual(val int) *IntRangeFilter
- func (f *IntRangeFilter) RightLargerThan(val int) *IntRangeFilter
- func (f *IntRangeFilter) RightMax(val int) *IntRangeFilter
- func (f *IntRangeFilter) RightMin(val int) *IntRangeFilter
- func (f *IntRangeFilter) RightSmallerThan(val int) *IntRangeFilter
- func (f *IntRangeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type IntRangeValidator
- type IntSetFilter
- func (f *IntSetFilter) AddValidator(validator IntSetValidator) *IntSetFilter
- func (f *IntSetFilter) Allow(vals ...string) *IntSetFilter
- func (f *IntSetFilter) Base(base int) *IntSetFilter
- func (f *IntSetFilter) Delimiter(delimiter string) *IntSetFilter
- func (f *IntSetFilter) ItemBetween(min, max int) *IntSetFilter
- func (f *IntSetFilter) ItemIn(set []int) *IntSetFilter
- func (f *IntSetFilter) ItemLargerThan(val int) *IntSetFilter
- func (f *IntSetFilter) ItemMax(val int) *IntSetFilter
- func (f *IntSetFilter) ItemMin(val int) *IntSetFilter
- func (f *IntSetFilter) ItemSmallerThan(val int) *IntSetFilter
- func (f *IntSetFilter) MaxCount(count int) *IntSetFilter
- func (f *IntSetFilter) MinCount(count int) *IntSetFilter
- func (f *IntSetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type IntSetValidator
- type IntValidator
- type JsonFilter
- func (f *JsonFilter) AddValidator(validator JsonValidator) *JsonFilter
- func (f *JsonFilter) Allow(vals ...string) *JsonFilter
- func (f *JsonFilter) Output(outVar interface{}) *JsonFilter
- func (f *JsonFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *JsonFilter) ToString() *JsonFilter
- type JsonValidator
- type RequiredFilter
- type StringFilter
- func (f *StringFilter) AddValidator(validator StringValidator) *StringFilter
- func (f *StringFilter) Allow(vals ...string) *StringFilter
- func (f *StringFilter) Between(minLength, maxLength int) *StringFilter
- func (f *StringFilter) In(set []string) *StringFilter
- func (f *StringFilter) IsAlpha() *StringFilter
- func (f *StringFilter) IsAlphaNumeric() *StringFilter
- func (f *StringFilter) IsDigit() *StringFilter
- func (f *StringFilter) IsNumeric() *StringFilter
- func (f *StringFilter) KeepCase() *StringFilter
- func (f *StringFilter) Length(length int) *StringFilter
- func (f *StringFilter) LongerThan(length int) *StringFilter
- func (f *StringFilter) Match(pattern string) *StringFilter
- func (f *StringFilter) MaxLen(length int) *StringFilter
- func (f *StringFilter) MinLen(length int) *StringFilter
- func (f *StringFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *StringFilter) ShorterThan(length int) *StringFilter
- func (f *StringFilter) ToLower() *StringFilter
- func (f *StringFilter) ToUpper() *StringFilter
- func (f *StringFilter) Trim() *StringFilter
- type StringSetFilter
- func (f *StringSetFilter) AddValidator(validator StringSetValidator) *StringSetFilter
- func (f *StringSetFilter) Allow(vals ...string) *StringSetFilter
- func (f *StringSetFilter) Delimiter(delimiter string) *StringSetFilter
- func (f *StringSetFilter) ItemBetween(minLength, maxLength int) *StringSetFilter
- func (f *StringSetFilter) ItemIn(set []string) *StringSetFilter
- func (f *StringSetFilter) ItemIsAlpha() *StringSetFilter
- func (f *StringSetFilter) ItemIsAlphaNumeric() *StringSetFilter
- func (f *StringSetFilter) ItemIsDigit() *StringSetFilter
- func (f *StringSetFilter) ItemIsNumeric() *StringSetFilter
- func (f *StringSetFilter) ItemLength(length int) *StringSetFilter
- func (f *StringSetFilter) ItemLongerThan(length int) *StringSetFilter
- func (f *StringSetFilter) ItemMatch(pattern string) *StringSetFilter
- func (f *StringSetFilter) ItemMaxLen(length int) *StringSetFilter
- func (f *StringSetFilter) ItemMinLen(length int) *StringSetFilter
- func (f *StringSetFilter) ItemShorterThan(length int) *StringSetFilter
- func (f *StringSetFilter) KeepCase() *StringSetFilter
- func (f *StringSetFilter) MaxCount(count int) *StringSetFilter
- func (f *StringSetFilter) MinCount(count int) *StringSetFilter
- func (f *StringSetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *StringSetFilter) ToLower() *StringSetFilter
- func (f *StringSetFilter) ToUpper() *StringSetFilter
- type StringSetValidator
- type StringValidator
- type TimeFilter
- func (f *TimeFilter) AddValidator(validator TimeValidator) *TimeFilter
- func (f *TimeFilter) After(tm string) *TimeFilter
- func (f *TimeFilter) Allow(vals ...string) *TimeFilter
- func (f *TimeFilter) Before(tm string) *TimeFilter
- func (f *TimeFilter) Between(startTime, endTime string) *TimeFilter
- func (f *TimeFilter) EndTo(tm string) *TimeFilter
- func (f *TimeFilter) Equal(tm string) *TimeFilter
- func (f *TimeFilter) HasTime() *TimeFilter
- func (f *TimeFilter) Layout(layout string) *TimeFilter
- func (f *TimeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *TimeFilter) StartFrom(tm string) *TimeFilter
- type TimeRangeFilter
- func (f *TimeRangeFilter) AddValidator(validator TimeRangeValidator) *TimeRangeFilter
- func (f *TimeRangeFilter) Allow(vals ...string) *TimeRangeFilter
- func (f *TimeRangeFilter) HasTime() *TimeRangeFilter
- func (f *TimeRangeFilter) Layout(layout string) *TimeRangeFilter
- func (f *TimeRangeFilter) LeftAfter(tm string) *TimeRangeFilter
- func (f *TimeRangeFilter) LeftBefore(tm string) *TimeRangeFilter
- func (f *TimeRangeFilter) LeftBetween(startTime, endTime string) *TimeRangeFilter
- func (f *TimeRangeFilter) LeftDefault(tm string) *TimeRangeFilter
- func (f *TimeRangeFilter) LeftEndTo(tm string) *TimeRangeFilter
- func (f *TimeRangeFilter) LeftEqual(tm string) *TimeRangeFilter
- func (f *TimeRangeFilter) LeftStartFrom(tm string) *TimeRangeFilter
- func (f *TimeRangeFilter) MaxDistance(duration string) *TimeRangeFilter
- func (f *TimeRangeFilter) MinDistance(duration string) *TimeRangeFilter
- func (f *TimeRangeFilter) RightAfter(tm string) *TimeRangeFilter
- func (f *TimeRangeFilter) RightBefore(tm string) *TimeRangeFilter
- func (f *TimeRangeFilter) RightBetween(startTime, endTime string) *TimeRangeFilter
- func (f *TimeRangeFilter) RightDefault(tm string) *TimeRangeFilter
- func (f *TimeRangeFilter) RightEndTo(tm string) *TimeRangeFilter
- func (f *TimeRangeFilter) RightEqual(tm string) *TimeRangeFilter
- func (f *TimeRangeFilter) RightStartFrom(tm string) *TimeRangeFilter
- func (f *TimeRangeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type TimeRangeValidator
- type TimeSetFilter
- func (f *TimeSetFilter) AddValidator(validator TimeSetValidator) *TimeSetFilter
- func (f *TimeSetFilter) Allow(vals ...string) *TimeSetFilter
- func (f *TimeSetFilter) Delimiter(delimiter string) *TimeSetFilter
- func (f *TimeSetFilter) HasTime() *TimeSetFilter
- func (f *TimeSetFilter) ItemAfter(tm string) *TimeSetFilter
- func (f *TimeSetFilter) ItemBefore(tm string) *TimeSetFilter
- func (f *TimeSetFilter) ItemBetween(startTime, endTime string) *TimeSetFilter
- func (f *TimeSetFilter) ItemEndTo(tm string) *TimeSetFilter
- func (f *TimeSetFilter) ItemStartFrom(tm string) *TimeSetFilter
- func (f *TimeSetFilter) Layout(layout string) *TimeSetFilter
- func (f *TimeSetFilter) MaxCount(count int) *TimeSetFilter
- func (f *TimeSetFilter) MinCount(count int) *TimeSetFilter
- func (f *TimeSetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type TimeSetValidator
- type TimeValidator
- type TimestampFilter
- func (f *TimestampFilter) AddValidator(validator TimestampValidator) *TimestampFilter
- func (f *TimestampFilter) After(val uint32) *TimestampFilter
- func (f *TimestampFilter) Allow(vals ...string) *TimestampFilter
- func (f *TimestampFilter) Before(val uint32) *TimestampFilter
- func (f *TimestampFilter) Between(start, end uint32) *TimestampFilter
- func (f *TimestampFilter) EndTo(val uint32) *TimestampFilter
- func (f *TimestampFilter) Equal(val uint32) *TimestampFilter
- func (f *TimestampFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *TimestampFilter) StartFrom(val uint32) *TimestampFilter
- type TimestampRangeFilter
- func (f *TimestampRangeFilter) AddValidator(validator TimestampRangeValidator) *TimestampRangeFilter
- func (f *TimestampRangeFilter) Allow(vals ...string) *TimestampRangeFilter
- func (f *TimestampRangeFilter) LeftAfter(val uint32) *TimestampRangeFilter
- func (f *TimestampRangeFilter) LeftBefore(val uint32) *TimestampRangeFilter
- func (f *TimestampRangeFilter) LeftBetween(start, end uint32) *TimestampRangeFilter
- func (f *TimestampRangeFilter) LeftDefault(val uint32) *TimestampRangeFilter
- func (f *TimestampRangeFilter) LeftEndTo(val uint32) *TimestampRangeFilter
- func (f *TimestampRangeFilter) LeftEqual(val uint32) *TimestampRangeFilter
- func (f *TimestampRangeFilter) LeftStartFrom(val uint32) *TimestampRangeFilter
- func (f *TimestampRangeFilter) MaxDistance(val uint32) *TimestampRangeFilter
- func (f *TimestampRangeFilter) MinDistance(val uint32) *TimestampRangeFilter
- func (f *TimestampRangeFilter) RightAfter(val uint32) *TimestampRangeFilter
- func (f *TimestampRangeFilter) RightBefore(val uint32) *TimestampRangeFilter
- func (f *TimestampRangeFilter) RightBetween(start, end uint32) *TimestampRangeFilter
- func (f *TimestampRangeFilter) RightDefault(val uint32) *TimestampRangeFilter
- func (f *TimestampRangeFilter) RightEndTo(val uint32) *TimestampRangeFilter
- func (f *TimestampRangeFilter) RightEqual(val uint32) *TimestampRangeFilter
- func (f *TimestampRangeFilter) RightStartFrom(val uint32) *TimestampRangeFilter
- func (f *TimestampRangeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type TimestampRangeValidator
- type TimestampSetFilter
- func (f *TimestampSetFilter) AddValidator(validator TimestampSetValidator) *TimestampSetFilter
- func (f *TimestampSetFilter) Allow(vals ...string) *TimestampSetFilter
- func (f *TimestampSetFilter) Delimiter(delimiter string) *TimestampSetFilter
- func (f *TimestampSetFilter) ItemAfter(val uint32) *TimestampSetFilter
- func (f *TimestampSetFilter) ItemBefore(val uint32) *TimestampSetFilter
- func (f *TimestampSetFilter) ItemBetween(start, end uint32) *TimestampSetFilter
- func (f *TimestampSetFilter) ItemEndTo(val uint32) *TimestampSetFilter
- func (f *TimestampSetFilter) ItemStartFrom(val uint32) *TimestampSetFilter
- func (f *TimestampSetFilter) MaxCount(count int) *TimestampSetFilter
- func (f *TimestampSetFilter) MinCount(count int) *TimestampSetFilter
- func (f *TimestampSetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type TimestampSetValidator
- type TimestampValidator
- type Uint32Filter
- func (f *Uint32Filter) AddValidator(validator Uint32Validator) *Uint32Filter
- func (f *Uint32Filter) Allow(vals ...string) *Uint32Filter
- func (f *Uint32Filter) Base(base int) *Uint32Filter
- func (f *Uint32Filter) Between(min, max uint32) *Uint32Filter
- func (f *Uint32Filter) Equal(val uint32) *Uint32Filter
- func (f *Uint32Filter) In(set []uint32) *Uint32Filter
- func (f *Uint32Filter) LargerThan(val uint32) *Uint32Filter
- func (f *Uint32Filter) Max(val uint32) *Uint32Filter
- func (f *Uint32Filter) Min(val uint32) *Uint32Filter
- func (f *Uint32Filter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *Uint32Filter) SmallerThan(val uint32) *Uint32Filter
- type Uint32RangeFilter
- func (f *Uint32RangeFilter) AddValidator(validator Uint32RangeValidator) *Uint32RangeFilter
- func (f *Uint32RangeFilter) Allow(vals ...string) *Uint32RangeFilter
- func (f *Uint32RangeFilter) LeftBetween(min, max uint32) *Uint32RangeFilter
- func (f *Uint32RangeFilter) LeftDefault(val uint32) *Uint32RangeFilter
- func (f *Uint32RangeFilter) LeftEqual(val uint32) *Uint32RangeFilter
- func (f *Uint32RangeFilter) LeftLargerThan(val uint32) *Uint32RangeFilter
- func (f *Uint32RangeFilter) LeftMax(val uint32) *Uint32RangeFilter
- func (f *Uint32RangeFilter) LeftMin(val uint32) *Uint32RangeFilter
- func (f *Uint32RangeFilter) LeftSmallerThan(val uint32) *Uint32RangeFilter
- func (f *Uint32RangeFilter) MaxDistance(val uint32) *Uint32RangeFilter
- func (f *Uint32RangeFilter) MinDistance(val uint32) *Uint32RangeFilter
- func (f *Uint32RangeFilter) RightBetween(min, max uint32) *Uint32RangeFilter
- func (f *Uint32RangeFilter) RightDefault(val uint32) *Uint32RangeFilter
- func (f *Uint32RangeFilter) RightEqual(val uint32) *Uint32RangeFilter
- func (f *Uint32RangeFilter) RightLargerThan(val uint32) *Uint32RangeFilter
- func (f *Uint32RangeFilter) RightMax(val uint32) *Uint32RangeFilter
- func (f *Uint32RangeFilter) RightMin(val uint32) *Uint32RangeFilter
- func (f *Uint32RangeFilter) RightSmallerThan(val uint32) *Uint32RangeFilter
- func (f *Uint32RangeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type Uint32RangeValidator
- type Uint32SetFilter
- func (f *Uint32SetFilter) AddValidator(validator Uint32SetValidator) *Uint32SetFilter
- func (f *Uint32SetFilter) Allow(vals ...string) *Uint32SetFilter
- func (f *Uint32SetFilter) Base(base int) *Uint32SetFilter
- func (f *Uint32SetFilter) Delimiter(delimiter string) *Uint32SetFilter
- func (f *Uint32SetFilter) ItemBetween(min, max uint32) *Uint32SetFilter
- func (f *Uint32SetFilter) ItemIn(set []uint32) *Uint32SetFilter
- func (f *Uint32SetFilter) ItemLargerThan(val uint32) *Uint32SetFilter
- func (f *Uint32SetFilter) ItemMax(val uint32) *Uint32SetFilter
- func (f *Uint32SetFilter) ItemMin(val uint32) *Uint32SetFilter
- func (f *Uint32SetFilter) ItemSmallerThan(val uint32) *Uint32SetFilter
- func (f *Uint32SetFilter) MaxCount(count int) *Uint32SetFilter
- func (f *Uint32SetFilter) MinCount(count int) *Uint32SetFilter
- func (f *Uint32SetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type Uint32SetValidator
- type Uint32Validator
- type Uint64Filter
- func (f *Uint64Filter) AddValidator(validator Uint64Validator) *Uint64Filter
- func (f *Uint64Filter) Allow(vals ...string) *Uint64Filter
- func (f *Uint64Filter) Base(base int) *Uint64Filter
- func (f *Uint64Filter) Between(min, max uint64) *Uint64Filter
- func (f *Uint64Filter) Equal(val uint64) *Uint64Filter
- func (f *Uint64Filter) In(set []uint64) *Uint64Filter
- func (f *Uint64Filter) LargerThan(val uint64) *Uint64Filter
- func (f *Uint64Filter) Max(val uint64) *Uint64Filter
- func (f *Uint64Filter) Min(val uint64) *Uint64Filter
- func (f *Uint64Filter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *Uint64Filter) SmallerThan(val uint64) *Uint64Filter
- type Uint64RangeFilter
- func (f *Uint64RangeFilter) AddValidator(validator Uint64RangeValidator) *Uint64RangeFilter
- func (f *Uint64RangeFilter) Allow(vals ...string) *Uint64RangeFilter
- func (f *Uint64RangeFilter) LeftBetween(min, max uint64) *Uint64RangeFilter
- func (f *Uint64RangeFilter) LeftDefault(val uint64) *Uint64RangeFilter
- func (f *Uint64RangeFilter) LeftEqual(val uint64) *Uint64RangeFilter
- func (f *Uint64RangeFilter) LeftLargerThan(val uint64) *Uint64RangeFilter
- func (f *Uint64RangeFilter) LeftMax(val uint64) *Uint64RangeFilter
- func (f *Uint64RangeFilter) LeftMin(val uint64) *Uint64RangeFilter
- func (f *Uint64RangeFilter) LeftSmallerThan(val uint64) *Uint64RangeFilter
- func (f *Uint64RangeFilter) MaxDistance(val uint64) *Uint64RangeFilter
- func (f *Uint64RangeFilter) MinDistance(val uint64) *Uint64RangeFilter
- func (f *Uint64RangeFilter) RightBetween(min, max uint64) *Uint64RangeFilter
- func (f *Uint64RangeFilter) RightDefault(val uint64) *Uint64RangeFilter
- func (f *Uint64RangeFilter) RightEqual(val uint64) *Uint64RangeFilter
- func (f *Uint64RangeFilter) RightLargerThan(val uint64) *Uint64RangeFilter
- func (f *Uint64RangeFilter) RightMax(val uint64) *Uint64RangeFilter
- func (f *Uint64RangeFilter) RightMin(val uint64) *Uint64RangeFilter
- func (f *Uint64RangeFilter) RightSmallerThan(val uint64) *Uint64RangeFilter
- func (f *Uint64RangeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type Uint64RangeValidator
- type Uint64SetFilter
- func (f *Uint64SetFilter) AddValidator(validator Uint64SetValidator) *Uint64SetFilter
- func (f *Uint64SetFilter) Allow(vals ...string) *Uint64SetFilter
- func (f *Uint64SetFilter) Base(base int) *Uint64SetFilter
- func (f *Uint64SetFilter) Delimiter(delimiter string) *Uint64SetFilter
- func (f *Uint64SetFilter) ItemBetween(min, max uint64) *Uint64SetFilter
- func (f *Uint64SetFilter) ItemIn(set []uint64) *Uint64SetFilter
- func (f *Uint64SetFilter) ItemLargerThan(val uint64) *Uint64SetFilter
- func (f *Uint64SetFilter) ItemMax(val uint64) *Uint64SetFilter
- func (f *Uint64SetFilter) ItemMin(val uint64) *Uint64SetFilter
- func (f *Uint64SetFilter) ItemSmallerThan(val uint64) *Uint64SetFilter
- func (f *Uint64SetFilter) MaxCount(count int) *Uint64SetFilter
- func (f *Uint64SetFilter) MinCount(count int) *Uint64SetFilter
- func (f *Uint64SetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type Uint64SetValidator
- type Uint64Validator
- type UintFilter
- func (f *UintFilter) AddValidator(validator UintValidator) *UintFilter
- func (f *UintFilter) Allow(vals ...string) *UintFilter
- func (f *UintFilter) Base(base int) *UintFilter
- func (f *UintFilter) Between(min, max uint) *UintFilter
- func (f *UintFilter) Equal(val uint) *UintFilter
- func (f *UintFilter) In(set []uint) *UintFilter
- func (f *UintFilter) LargerThan(val uint) *UintFilter
- func (f *UintFilter) Max(val uint) *UintFilter
- func (f *UintFilter) Min(val uint) *UintFilter
- func (f *UintFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- func (f *UintFilter) SmallerThan(val uint) *UintFilter
- type UintRangeFilter
- func (f *UintRangeFilter) AddValidator(validator UintRangeValidator) *UintRangeFilter
- func (f *UintRangeFilter) Allow(vals ...string) *UintRangeFilter
- func (f *UintRangeFilter) LeftBetween(min, max uint) *UintRangeFilter
- func (f *UintRangeFilter) LeftDefault(val uint) *UintRangeFilter
- func (f *UintRangeFilter) LeftEqual(val uint) *UintRangeFilter
- func (f *UintRangeFilter) LeftLargerThan(val uint) *UintRangeFilter
- func (f *UintRangeFilter) LeftMax(val uint) *UintRangeFilter
- func (f *UintRangeFilter) LeftMin(val uint) *UintRangeFilter
- func (f *UintRangeFilter) LeftSmallerThan(val uint) *UintRangeFilter
- func (f *UintRangeFilter) MaxDistance(val uint) *UintRangeFilter
- func (f *UintRangeFilter) MinDistance(val uint) *UintRangeFilter
- func (f *UintRangeFilter) RightBetween(min, max uint) *UintRangeFilter
- func (f *UintRangeFilter) RightDefault(val uint) *UintRangeFilter
- func (f *UintRangeFilter) RightEqual(val uint) *UintRangeFilter
- func (f *UintRangeFilter) RightLargerThan(val uint) *UintRangeFilter
- func (f *UintRangeFilter) RightMax(val uint) *UintRangeFilter
- func (f *UintRangeFilter) RightMin(val uint) *UintRangeFilter
- func (f *UintRangeFilter) RightSmallerThan(val uint) *UintRangeFilter
- func (f *UintRangeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type UintRangeValidator
- type UintSetFilter
- func (f *UintSetFilter) AddValidator(validator UintSetValidator) *UintSetFilter
- func (f *UintSetFilter) Allow(vals ...string) *UintSetFilter
- func (f *UintSetFilter) Base(base int) *UintSetFilter
- func (f *UintSetFilter) Delimiter(delimiter string) *UintSetFilter
- func (f *UintSetFilter) ItemBetween(min, max uint) *UintSetFilter
- func (f *UintSetFilter) ItemIn(set []uint) *UintSetFilter
- func (f *UintSetFilter) ItemLargerThan(val uint) *UintSetFilter
- func (f *UintSetFilter) ItemMax(val uint) *UintSetFilter
- func (f *UintSetFilter) ItemMin(val uint) *UintSetFilter
- func (f *UintSetFilter) ItemSmallerThan(val uint) *UintSetFilter
- func (f *UintSetFilter) MaxCount(count int) *UintSetFilter
- func (f *UintSetFilter) MinCount(count int) *UintSetFilter
- func (f *UintSetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
- type UintSetValidator
- type UintValidator
Constants ¶
const ( EMAIL_RAWCASE = iota EMAIL_LOWERCASE EMAIL_UPPERCASE )
const ( ErrorObjectNotExist = iota ErrorObjectDuplicated ErrorNoObjectUpdated ErrorNoObjectDeleted ErrorMissingParam ErrorInvalidParam ErrorQuotaExceed ErrorPermissionDenied ErrorOperationFailed ErrorInternalError )
application error value should keep synchronous with api.Error*
const ( STRING_RAWCASE = iota STRING_LOWERCASE STRING_UPPERCASE )
Variables ¶
var ErrorWordMap = map[string]map[string]string{ "en_us": map[string]string{ "InvalidValidator": "invalid validator", "NotInSet": "not in set", "ItemNotInSet": "item not in set", "NotInt": "not int", "NotInt64": "not int64", "NotUint": "not uint", "NotUint64": "not uint64", "TooSmall": "too small", "TooLarge": "too large", "NotString": "not string", "TooShort": "too short", "TooLong": "too long", "WrongFormat": "wrong format", "NotNumeric": "not numeric", "NotDigit": "not digit", "NotAlpha": "not alpha", "NotAlphaNumeric": "not alphanumeric", "NotEmail": "not email", "NotCIDR": "not cidr", "NotIP": "not ip", "NotIPv4": "not IPv4", "NotIPv6": "not IPv6", "NotJson": "not json", "NotTimestamp": "not timestamp", "NotTime": "not date", "TooEarly": "too early", "TooLate": "too late", "TooNear": "too near", "TooFar": "too far", "WrongRange": "wrong range", "NotIntRange": "not int range", "NotInt64Range": "not int64 range", "NotUintRange": "not uint range", "NotUint64Range": "not uint64 range", "LeftTooSmall": "left of range is too small", "LeftTooLarge": "left of range is too large", "RightTooSmall": "right of range is too small", "RightTooLarge": "right of range is too large", "NotTimestampRange": "not timestamp range", "NotTimeRange": "not date range", "LeftTooEarly": "left of range is too early", "LeftTooLate": "left of range is too late", "RightTooEarly": "right of range is too early", "RightTooLate": "right of range is too late", "TooFew": "too few", "TooMany": "too many", "NotIntSet": "not int set", "NotInt64Set": "not int64 set", "NotUintSet": "not uint set", "NotUint64Set": "not uint64 set", "ItemTooSmall": "item too small", "ItemTooLarge": "item too large", "NotStringSet": "not string set", "ItemTooShort": "item too short", "ItemTooLong": "item too long", "ItemNotNumeric": "item not numeric", "ItemNotDigit": "item not digit", "ItemNotAlpha": "item not alpha", "ItemNotAlphaNumeric": "item not alphanumeric", "ItemWrongFormat": "item wrong format", "NotEmailSet": "not email set", "NotCIDRSet": "not cidr set", "NotIPSet": "not ip set", "ItemNotIPv4": "item not IPv4", "ItemNotIPv6": "item not IPv6", }, "zh_cn": map[string]string{ "InvalidValidator": "验证器非法", "NotInSet": "不在集合中", "ItemNotInSet": "元素不在集合中", "NotInt": "非int型", "NotInt64": "非int64型", "NotUint": "非uint型", "NotUint64": "非uint64型", "TooSmall": "太小", "TooLarge": "太大", "NotString": "非字符串", "TooShort": "太短", "TooLong": "太长", "WrongFormat": "格式错误", "NotNumeric": "不是数值", "NotDigit": "不是纯数字组成", "NotAlpha": "不是纯字母组成", "NotAlphaNumeric": "不是由纯字母和数字组成", "NotEmail": "非邮箱地址", "NotCIDR": "非CIDR地址", "NotIP": "非IP地址", "NotIPv4": "不是IPv4", "NotIPv6": "不是IPv6", "NotJson": "非JSON字符串", "NotTimestamp": "非时间戳", "NotTime": "非日期", "TooEarly": "太早", "TooLate": "太晚", "TooNear": "太近", "TooFar": "太远", "WrongRange": "区间错误", "NotIntRange": "非int区间", "NotInt64Range": "非int64区间", "NotUintRange": "非uint区间", "NotUint64Range": "非uint64区间", "LeftTooSmall": "区间左值太小", "LeftTooLarge": "区间左值太大", "RightTooSmall": "区间右值太小", "RightTooLarge": "区间右值太大", "NotTimestampRange": "非时间戳区间", "NotTimeRange": "非时间区间", "LeftTooEarly": "区间左值太早", "LeftTooLate": "区间左值太晚", "RightTooEarly": "区间右值太早", "RightTooLate": "区间右值太晚", "TooFew": "太少", "TooMany": "太多", "NotIntSet": "非int集合", "NotInt64Set": "非int64集合", "NotUintSet": "非uint集合", "NotUint64Set": "非uint64集合", "ItemTooSmall": "集合中元素值太小", "ItemTooLarge": "集合中元素值太大", "NotStringSet": "非字符串集合", "ItemTooShort": "集合中字符串太短", "ItemTooLong": "集合中字符串太长", "ItemNotNumeric": "集合中字符串不是数值", "ItemNotDigit": "集合中字符串不是纯数字组成", "ItemNotAlpha": "集合中字符串不是纯字母组成", "ItemNotAlphaNumeric": "集合中字符串不是由纯字母和数字组成", "ItemWrongFormat": "集合中字符串格式错误", "NotEmailSet": "非邮箱地址集合", "NotCIDRSet": "非CIDR集合", "NotIPSet": "非IP地址集合", "ItemNotIPv4": "集合中的元素不是IPv4", "ItemNotIPv6": "集合中的元素不是IPv6", }, }
Functions ¶
This section is empty.
Types ¶
type CIDRFilter ¶
type CIDRFilter struct {
// contains filtered or unexported fields
}
func (*CIDRFilter) AddValidator ¶
func (f *CIDRFilter) AddValidator(validator CIDRValidator) *CIDRFilter
AddValidator add a custom validator to filter
func (*CIDRFilter) Allow ¶
func (f *CIDRFilter) Allow(vals ...string) *CIDRFilter
Allow allow value is a string in the specified list
func (*CIDRFilter) IsIPv4 ¶
func (f *CIDRFilter) IsIPv4() *CIDRFilter
IsIPv4 valid whether cidr is ipv4 cidr.
func (*CIDRFilter) IsIPv6 ¶
func (f *CIDRFilter) IsIPv6() *CIDRFilter
IsIPv6 valid whether cidr is ipv6 cidr.
func (*CIDRFilter) Run ¶
func (f *CIDRFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
func (*CIDRFilter) ToString ¶
func (f *CIDRFilter) ToString() *CIDRFilter
ToString return value as string
type CIDRSetFilter ¶
type CIDRSetFilter struct {
// contains filtered or unexported fields
}
func (*CIDRSetFilter) AddValidator ¶
func (f *CIDRSetFilter) AddValidator(validator CIDRSetValidator) *CIDRSetFilter
AddValidator add a custom validator to filter
func (*CIDRSetFilter) Allow ¶
func (f *CIDRSetFilter) Allow(vals ...string) *CIDRSetFilter
Allow allow value is a string in the specified list
func (*CIDRSetFilter) Delimiter ¶
func (f *CIDRSetFilter) Delimiter(delimiter string) *CIDRSetFilter
Delimiter set the delimiter of set string.
func (*CIDRSetFilter) ItemIsIPv4 ¶
func (f *CIDRSetFilter) ItemIsIPv4() *CIDRSetFilter
ItemIsIPv4 valid whether cidr is ipv4 cidr.
func (*CIDRSetFilter) ItemIsIPv6 ¶
func (f *CIDRSetFilter) ItemIsIPv6() *CIDRSetFilter
ItemIsIPv6 valid whether cidr is ipv6 cidr.
func (*CIDRSetFilter) MaxCount ¶
func (f *CIDRSetFilter) MaxCount(count int) *CIDRSetFilter
MaxCount set the max item count of set.
func (*CIDRSetFilter) MinCount ¶
func (f *CIDRSetFilter) MinCount(count int) *CIDRSetFilter
MinCount set the max item count of set.
func (*CIDRSetFilter) Run ¶
func (f *CIDRSetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type CIDRSetValidator ¶
type CIDRValidator ¶
type DefaultFilter ¶
type DefaultFilter struct {
// contains filtered or unexported fields
}
func (*DefaultFilter) Run ¶
func (f *DefaultFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type EmailFilter ¶
type EmailFilter struct {
// contains filtered or unexported fields
}
func (*EmailFilter) AddValidator ¶
func (f *EmailFilter) AddValidator(validator EmailValidator) *EmailFilter
AddValidator add a custom validator to filter
func (*EmailFilter) Allow ¶
func (f *EmailFilter) Allow(vals ...string) *EmailFilter
Allow allow value is a string in the specified list
func (*EmailFilter) Between ¶
func (f *EmailFilter) Between(minLength, maxLength int) *EmailFilter
Between valid whether string's length is in the range.
func (*EmailFilter) Domain ¶
func (f *EmailFilter) Domain(domain string) *EmailFilter
Domain valid whether email is end with specified domain.
func (*EmailFilter) KeepCase ¶
func (f *EmailFilter) KeepCase() *EmailFilter
KeepCase do no case transform before validation.
func (*EmailFilter) LongerThan ¶
func (f *EmailFilter) LongerThan(length int) *EmailFilter
LongerThan valid whether string is longer than the specified length.
func (*EmailFilter) MaxLen ¶
func (f *EmailFilter) MaxLen(length int) *EmailFilter
MaxLen valid whether string is not shorter than the specified length.
func (*EmailFilter) MinLen ¶
func (f *EmailFilter) MinLen(length int) *EmailFilter
MinLen valid whether string is not longer than the specified length.
func (*EmailFilter) Run ¶
func (f *EmailFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
func (*EmailFilter) ShorterThan ¶
func (f *EmailFilter) ShorterThan(length int) *EmailFilter
ShorterThan valid whether string is shorter than the specified length.
func (*EmailFilter) ToLower ¶
func (f *EmailFilter) ToLower() *EmailFilter
ToLower lower case string before validation.
func (*EmailFilter) ToUpper ¶
func (f *EmailFilter) ToUpper() *EmailFilter
ToUpper lower case string before validation.
type EmailSetFilter ¶
type EmailSetFilter struct {
// contains filtered or unexported fields
}
func (*EmailSetFilter) AddValidator ¶
func (f *EmailSetFilter) AddValidator(validator EmailSetValidator) *EmailSetFilter
AddValidator add a custom validator to filter
func (*EmailSetFilter) Allow ¶
func (f *EmailSetFilter) Allow(vals ...string) *EmailSetFilter
Allow allow value is a string in the specified list
func (*EmailSetFilter) Delimiter ¶
func (f *EmailSetFilter) Delimiter(delimiter string) *EmailSetFilter
Delimiter set the delimiter of set string.
func (*EmailSetFilter) ItemBetween ¶
func (f *EmailSetFilter) ItemBetween(minLength, maxLength int) *EmailSetFilter
Between valid whether length of string in set is in the range.
func (*EmailSetFilter) ItemDomain ¶
func (f *EmailSetFilter) ItemDomain(domain string) *EmailSetFilter
ItemDomain valid whether email is end with specified domain.
func (*EmailSetFilter) ItemLongerThan ¶
func (f *EmailSetFilter) ItemLongerThan(length int) *EmailSetFilter
LongerThan valid whether string in set longer than the specified length.
func (*EmailSetFilter) ItemMaxLen ¶
func (f *EmailSetFilter) ItemMaxLen(length int) *EmailSetFilter
MaxLen valid whether string in set not shorter than the specified length.
func (*EmailSetFilter) ItemMinLen ¶
func (f *EmailSetFilter) ItemMinLen(length int) *EmailSetFilter
MinLen valid whether string in set not longer than the specified length.
func (*EmailSetFilter) ItemShorterThan ¶
func (f *EmailSetFilter) ItemShorterThan(length int) *EmailSetFilter
ShorterThan valid whether string in set shorter than the specified length.
func (*EmailSetFilter) KeepCase ¶
func (f *EmailSetFilter) KeepCase() *EmailSetFilter
KeepCase do no case transform before validation.
func (*EmailSetFilter) MaxCount ¶
func (f *EmailSetFilter) MaxCount(count int) *EmailSetFilter
MaxCount set the max item count of set.
func (*EmailSetFilter) MinCount ¶
func (f *EmailSetFilter) MinCount(count int) *EmailSetFilter
MinCount set the max item count of set.
func (*EmailSetFilter) Run ¶
func (f *EmailSetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
func (*EmailSetFilter) ToLower ¶
func (f *EmailSetFilter) ToLower() *EmailSetFilter
ToLower lower case string before validation.
func (*EmailSetFilter) ToUpper ¶
func (f *EmailSetFilter) ToUpper() *EmailSetFilter
ToUpper lower case string before validation.
type EmailSetValidator ¶
type EmailValidator ¶
type EmptyToNilFilter ¶
type EmptyToNilFilter struct { }
func (*EmptyToNilFilter) Run ¶
func (f *EmptyToNilFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type Float32Filter ¶
type Float32Filter struct {
// contains filtered or unexported fields
}
func (*Float32Filter) AddValidator ¶
func (f *Float32Filter) AddValidator(validator Float32Validator) *Float32Filter
AddValidator add a custom validator to filter
func (*Float32Filter) Allow ¶
func (f *Float32Filter) Allow(vals ...string) *Float32Filter
Allow allow value is a string in the specified list
func (*Float32Filter) Between ¶
func (f *Float32Filter) Between(min, max float32) *Float32Filter
Between valid param value should in the specified range.
func (*Float32Filter) DecimalPlace ¶
func (f *Float32Filter) DecimalPlace(length int) *Float32Filter
DecimalPlace valid whether decimal place is equal to the specified length.
func (*Float32Filter) Equal ¶
func (f *Float32Filter) Equal(val float32) *Float32Filter
Equal valid param value should be equal to the specified value.
func (*Float32Filter) In ¶
func (f *Float32Filter) In(set []float32) *Float32Filter
In valid param value should in the specified set.
func (*Float32Filter) LargerThan ¶
func (f *Float32Filter) LargerThan(val float32) *Float32Filter
LargerThan valid param value should be larger than the specified value.
func (*Float32Filter) Max ¶
func (f *Float32Filter) Max(val float32) *Float32Filter
Max valid param value should not be larger than the specified value.
func (*Float32Filter) Min ¶
func (f *Float32Filter) Min(val float32) *Float32Filter
Min valid param value should not be smaller than the specified value.
func (*Float32Filter) Run ¶
func (f *Float32Filter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
func (*Float32Filter) SmallerThan ¶
func (f *Float32Filter) SmallerThan(val float32) *Float32Filter
SmallerThan valid param value should be smaller than the specified value.
type Float32Validator ¶
type Float64Filter ¶
type Float64Filter struct {
// contains filtered or unexported fields
}
func (*Float64Filter) AddValidator ¶
func (f *Float64Filter) AddValidator(validator Float64Validator) *Float64Filter
AddValidator add a custom validator to filter
func (*Float64Filter) Allow ¶
func (f *Float64Filter) Allow(vals ...string) *Float64Filter
Allow allow value is a string in the specified list
func (*Float64Filter) Between ¶
func (f *Float64Filter) Between(min, max float64) *Float64Filter
Between valid param value should in the specified range.
func (*Float64Filter) DecimalPlace ¶
func (f *Float64Filter) DecimalPlace(length int) *Float64Filter
DecimalPlace valid whether decimal place is equal to the specified length.
func (*Float64Filter) Equal ¶
func (f *Float64Filter) Equal(val float64) *Float64Filter
Equal valid param value should be equal to the specified value.
func (*Float64Filter) In ¶
func (f *Float64Filter) In(set []float64) *Float64Filter
In valid param value should in the specified set.
func (*Float64Filter) LargerThan ¶
func (f *Float64Filter) LargerThan(val float64) *Float64Filter
LargerThan valid param value should be larger than the specified value.
func (*Float64Filter) Max ¶
func (f *Float64Filter) Max(val float64) *Float64Filter
Max valid param value should not be larger than the specified value.
func (*Float64Filter) Min ¶
func (f *Float64Filter) Min(val float64) *Float64Filter
Min valid param value should not be smaller than the specified value.
func (*Float64Filter) Run ¶
func (f *Float64Filter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
func (*Float64Filter) SmallerThan ¶
func (f *Float64Filter) SmallerThan(val float64) *Float64Filter
SmallerThan valid param value should be smaller than the specified value.
type Float64Validator ¶
type IPFilter ¶
type IPFilter struct {
// contains filtered or unexported fields
}
func (*IPFilter) AddValidator ¶
func (f *IPFilter) AddValidator(validator IPValidator) *IPFilter
AddValidator add a custom validator to filter
type IPSetFilter ¶
type IPSetFilter struct {
// contains filtered or unexported fields
}
func (*IPSetFilter) AddValidator ¶
func (f *IPSetFilter) AddValidator(validator IPSetValidator) *IPSetFilter
AddValidator add a custom validator to filter
func (*IPSetFilter) Allow ¶
func (f *IPSetFilter) Allow(vals ...string) *IPSetFilter
Allow allow value is a string in the specified list
func (*IPSetFilter) Delimiter ¶
func (f *IPSetFilter) Delimiter(delimiter string) *IPSetFilter
Delimiter set the delimiter of set string.
func (*IPSetFilter) ItemIsIPv4 ¶
func (f *IPSetFilter) ItemIsIPv4() *IPSetFilter
ItemIsIPv4 valid whether ip address in set is ipv4 address.
func (*IPSetFilter) ItemIsIPv6 ¶
func (f *IPSetFilter) ItemIsIPv6() *IPSetFilter
ItemIsIPv6 valid whether ip address in set is ipv6 address.
func (*IPSetFilter) ItemToString ¶
func (f *IPSetFilter) ItemToString() *IPSetFilter
ItemToString return value as string
func (*IPSetFilter) MaxCount ¶
func (f *IPSetFilter) MaxCount(count int) *IPSetFilter
MaxCount set the max item count of set.
func (*IPSetFilter) MinCount ¶
func (f *IPSetFilter) MinCount(count int) *IPSetFilter
MinCount set the max item count of set.
func (*IPSetFilter) Run ¶
func (f *IPSetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type Int32Filter ¶
type Int32Filter struct {
// contains filtered or unexported fields
}
func (*Int32Filter) AddValidator ¶
func (f *Int32Filter) AddValidator(validator Int32Validator) *Int32Filter
AddValidator add a custom validator to filter
func (*Int32Filter) Allow ¶
func (f *Int32Filter) Allow(vals ...string) *Int32Filter
Allow allow value is a string in the specified list
func (*Int32Filter) Base ¶
func (f *Int32Filter) Base(base int) *Int32Filter
Base set the base of int32. Int32Filter interprets a string s in the given base (2 to 36) and returns the corresponding value i. If base == 0, the base is implied by the string's prefix: base 16 for "0x", base 8 for "0", and base 10 otherwise.
func (*Int32Filter) Between ¶
func (f *Int32Filter) Between(min, max int32) *Int32Filter
Between valid param value should in the specified range.
func (*Int32Filter) Equal ¶
func (f *Int32Filter) Equal(val int32) *Int32Filter
Equal valid param value should be equal to the specified value.
func (*Int32Filter) In ¶
func (f *Int32Filter) In(set []int32) *Int32Filter
In valid param value should in the specified set.
func (*Int32Filter) LargerThan ¶
func (f *Int32Filter) LargerThan(val int32) *Int32Filter
LargerThan valid param value should be larger than the specified value.
func (*Int32Filter) Max ¶
func (f *Int32Filter) Max(val int32) *Int32Filter
Max valid param value should not be larger than the specified value.
func (*Int32Filter) Min ¶
func (f *Int32Filter) Min(val int32) *Int32Filter
Min valid param value should not be smaller than the specified value.
func (*Int32Filter) Run ¶
func (f *Int32Filter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
func (*Int32Filter) SmallerThan ¶
func (f *Int32Filter) SmallerThan(val int32) *Int32Filter
SmallerThan valid param value should be smaller than the specified value.
type Int32RangeFilter ¶
type Int32RangeFilter struct {
// contains filtered or unexported fields
}
func (*Int32RangeFilter) AddValidator ¶
func (f *Int32RangeFilter) AddValidator(validator Int32RangeValidator) *Int32RangeFilter
AddValidator add a custom validator to filter
func (*Int32RangeFilter) Allow ¶
func (f *Int32RangeFilter) Allow(vals ...string) *Int32RangeFilter
Allow allow value is a string in the specified list
func (*Int32RangeFilter) LeftBetween ¶
func (f *Int32RangeFilter) LeftBetween(min, max int32) *Int32RangeFilter
LeftBetween valid whether left value of range is in the specified range.
func (*Int32RangeFilter) LeftDefault ¶
func (f *Int32RangeFilter) LeftDefault(val int32) *Int32RangeFilter
LeftDefault set the default left value of range if not specified.
func (*Int32RangeFilter) LeftEqual ¶
func (f *Int32RangeFilter) LeftEqual(val int32) *Int32RangeFilter
LeftEqual valid whether left value of range is equal to the specified value.
func (*Int32RangeFilter) LeftLargerThan ¶
func (f *Int32RangeFilter) LeftLargerThan(val int32) *Int32RangeFilter
LeftLargerThan valid whether left value of range is larger than the specified value.
func (*Int32RangeFilter) LeftMax ¶
func (f *Int32RangeFilter) LeftMax(val int32) *Int32RangeFilter
LeftMax valid whether left value of range is not larger than specified value.
func (*Int32RangeFilter) LeftMin ¶
func (f *Int32RangeFilter) LeftMin(val int32) *Int32RangeFilter
LeftMin valid whether left value of range is not smaller than specified value.
func (*Int32RangeFilter) LeftSmallerThan ¶
func (f *Int32RangeFilter) LeftSmallerThan(val int32) *Int32RangeFilter
LeftSmallerThan valid whether left value of range is smaller than the specified value.
func (*Int32RangeFilter) MaxDistance ¶
func (f *Int32RangeFilter) MaxDistance(val uint) *Int32RangeFilter
MaxDistance valid whether the distance of range not larger than the specified value.
func (*Int32RangeFilter) MinDistance ¶
func (f *Int32RangeFilter) MinDistance(val uint) *Int32RangeFilter
MinDistance valid whether the distance of range not smaller than the specified value.
func (*Int32RangeFilter) RightBetween ¶
func (f *Int32RangeFilter) RightBetween(min, max int32) *Int32RangeFilter
RightBetween valid whether right value of range is in the specified range.
func (*Int32RangeFilter) RightDefault ¶
func (f *Int32RangeFilter) RightDefault(val int32) *Int32RangeFilter
RightDefault set the default right value of range if not specified.
func (*Int32RangeFilter) RightEqual ¶
func (f *Int32RangeFilter) RightEqual(val int32) *Int32RangeFilter
RightEqual valid whether right value of range is equal to the specified value.
func (*Int32RangeFilter) RightLargerThan ¶
func (f *Int32RangeFilter) RightLargerThan(val int32) *Int32RangeFilter
RightLargerThan valid whether right value of range is larger than the specified value.
func (*Int32RangeFilter) RightMax ¶
func (f *Int32RangeFilter) RightMax(val int32) *Int32RangeFilter
RightMax valid whether right value of range is not larger than specified value.
func (*Int32RangeFilter) RightMin ¶
func (f *Int32RangeFilter) RightMin(val int32) *Int32RangeFilter
RightMin valid whether right value of range is not smaller than specified value.
func (*Int32RangeFilter) RightSmallerThan ¶
func (f *Int32RangeFilter) RightSmallerThan(val int32) *Int32RangeFilter
RightSmallerThan valid whether right value of range is smaller than the specified value.
func (*Int32RangeFilter) Run ¶
func (f *Int32RangeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type Int32RangeValidator ¶
type Int32RangeValidator func(paramName string, paramValue *types.Int32Range) *Error
type Int32SetFilter ¶
type Int32SetFilter struct {
// contains filtered or unexported fields
}
func (*Int32SetFilter) AddValidator ¶
func (f *Int32SetFilter) AddValidator(validator Int32SetValidator) *Int32SetFilter
AddValidator add a custom validator to filter
func (*Int32SetFilter) Allow ¶
func (f *Int32SetFilter) Allow(vals ...string) *Int32SetFilter
Allow allow value is a string in the specified list
func (*Int32SetFilter) Base ¶
func (f *Int32SetFilter) Base(base int) *Int32SetFilter
Base set the base of int32. Int32SetFilter interprets a string s in the given base (2 to 36) and returns the corresponding value i. If base == 0, the base is implied by the string's prefix: base 16 for "0x", base 8 for "0", and base 10 otherwise.
func (*Int32SetFilter) Delimiter ¶
func (f *Int32SetFilter) Delimiter(delimiter string) *Int32SetFilter
Delimiter set the delimiter of set string.
func (*Int32SetFilter) ItemBetween ¶
func (f *Int32SetFilter) ItemBetween(min, max int32) *Int32SetFilter
ItemBetween valid whether item value of set is in the specified set.
func (*Int32SetFilter) ItemIn ¶
func (f *Int32SetFilter) ItemIn(set []int32) *Int32SetFilter
ItemIn valid item value of set should in the specified set.
func (*Int32SetFilter) ItemLargerThan ¶
func (f *Int32SetFilter) ItemLargerThan(val int32) *Int32SetFilter
ItemLargerThan valid whether item value of set is larger than the specified value.
func (*Int32SetFilter) ItemMax ¶
func (f *Int32SetFilter) ItemMax(val int32) *Int32SetFilter
ItemMax valid whether item value of set is not larger than specified value.
func (*Int32SetFilter) ItemMin ¶
func (f *Int32SetFilter) ItemMin(val int32) *Int32SetFilter
ItemMin valid whether item value of set is not smaller than specified value.
func (*Int32SetFilter) ItemSmallerThan ¶
func (f *Int32SetFilter) ItemSmallerThan(val int32) *Int32SetFilter
ItemSmallerThan valid whether item value of set is smaller than the specified value.
func (*Int32SetFilter) MaxCount ¶
func (f *Int32SetFilter) MaxCount(count int) *Int32SetFilter
MaxCount set the max item count of set.
func (*Int32SetFilter) MinCount ¶
func (f *Int32SetFilter) MinCount(count int) *Int32SetFilter
MinCount set the max item count of set.
func (*Int32SetFilter) Run ¶
func (f *Int32SetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type Int32SetValidator ¶
type Int32Validator ¶
type Int64Filter ¶
type Int64Filter struct {
// contains filtered or unexported fields
}
func (*Int64Filter) AddValidator ¶
func (f *Int64Filter) AddValidator(validator Int64Validator) *Int64Filter
AddValidator add a custom validator to filter
func (*Int64Filter) Allow ¶
func (f *Int64Filter) Allow(vals ...string) *Int64Filter
Allow allow value is a string in the specified list
func (*Int64Filter) Base ¶
func (f *Int64Filter) Base(base int) *Int64Filter
Base set the base of int64. Int64Filter interprets a string s in the given base (2 to 36) and returns the corresponding value i. If base == 0, the base is implied by the string's prefix: base 16 for "0x", base 8 for "0", and base 10 otherwise.
func (*Int64Filter) Between ¶
func (f *Int64Filter) Between(min, max int64) *Int64Filter
Between valid param value should in the specified range.
func (*Int64Filter) Equal ¶
func (f *Int64Filter) Equal(val int64) *Int64Filter
Equal valid param value should be equal to the specified value.
func (*Int64Filter) In ¶
func (f *Int64Filter) In(set []int64) *Int64Filter
In valid param value should in the specified set.
func (*Int64Filter) LargerThan ¶
func (f *Int64Filter) LargerThan(val int64) *Int64Filter
LargerThan valid param value should be larger than the specified value.
func (*Int64Filter) Max ¶
func (f *Int64Filter) Max(val int64) *Int64Filter
Max valid param value should not be larger than the specified value.
func (*Int64Filter) Min ¶
func (f *Int64Filter) Min(val int64) *Int64Filter
Min valid param value should not be smaller than the specified value.
func (*Int64Filter) Run ¶
func (f *Int64Filter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
func (*Int64Filter) SmallerThan ¶
func (f *Int64Filter) SmallerThan(val int64) *Int64Filter
SmallerThan valid param value should be smaller than the specified value.
type Int64RangeFilter ¶
type Int64RangeFilter struct {
// contains filtered or unexported fields
}
func (*Int64RangeFilter) AddValidator ¶
func (f *Int64RangeFilter) AddValidator(validator Int64RangeValidator) *Int64RangeFilter
AddValidator add a custom validator to filter
func (*Int64RangeFilter) Allow ¶
func (f *Int64RangeFilter) Allow(vals ...string) *Int64RangeFilter
Allow allow value is a string in the specified list
func (*Int64RangeFilter) LeftBetween ¶
func (f *Int64RangeFilter) LeftBetween(min, max int64) *Int64RangeFilter
LeftBetween valid whether left value of range is in the specified range.
func (*Int64RangeFilter) LeftDefault ¶
func (f *Int64RangeFilter) LeftDefault(val int64) *Int64RangeFilter
LeftDefault set the default left value of range if not specified.
func (*Int64RangeFilter) LeftEqual ¶
func (f *Int64RangeFilter) LeftEqual(val int64) *Int64RangeFilter
LeftEqual valid whether left value of range is equal to the specified value.
func (*Int64RangeFilter) LeftLargerThan ¶
func (f *Int64RangeFilter) LeftLargerThan(val int64) *Int64RangeFilter
LeftLargerThan valid whether left value of range is larger than the specified value.
func (*Int64RangeFilter) LeftMax ¶
func (f *Int64RangeFilter) LeftMax(val int64) *Int64RangeFilter
LeftMax valid whether left value of range is not larger than specified value.
func (*Int64RangeFilter) LeftMin ¶
func (f *Int64RangeFilter) LeftMin(val int64) *Int64RangeFilter
LeftMin valid whether left value of range is not smaller than specified value.
func (*Int64RangeFilter) LeftSmallerThan ¶
func (f *Int64RangeFilter) LeftSmallerThan(val int64) *Int64RangeFilter
LeftSmallerThan valid whether left value of range is smaller than the specified value.
func (*Int64RangeFilter) MaxDistance ¶
func (f *Int64RangeFilter) MaxDistance(val uint64) *Int64RangeFilter
MaxDistance valid whether the distance of range not larger than the specified value.
func (*Int64RangeFilter) MinDistance ¶
func (f *Int64RangeFilter) MinDistance(val uint64) *Int64RangeFilter
MinDistance valid whether the distance of range not smaller than the specified value.
func (*Int64RangeFilter) RightBetween ¶
func (f *Int64RangeFilter) RightBetween(min, max int64) *Int64RangeFilter
RightBetween valid whether right value of range is in the specified range.
func (*Int64RangeFilter) RightDefault ¶
func (f *Int64RangeFilter) RightDefault(val int64) *Int64RangeFilter
RightDefault set the default right value of range if not specified.
func (*Int64RangeFilter) RightEqual ¶
func (f *Int64RangeFilter) RightEqual(val int64) *Int64RangeFilter
RightEqual valid whether right value of range is equal to the specified value.
func (*Int64RangeFilter) RightLargerThan ¶
func (f *Int64RangeFilter) RightLargerThan(val int64) *Int64RangeFilter
RightLargerThan valid whether right value of range is larger than the specified value.
func (*Int64RangeFilter) RightMax ¶
func (f *Int64RangeFilter) RightMax(val int64) *Int64RangeFilter
RightMax valid whether right value of range is not larger than specified value.
func (*Int64RangeFilter) RightMin ¶
func (f *Int64RangeFilter) RightMin(val int64) *Int64RangeFilter
RightMin valid whether right value of range is not smaller than specified value.
func (*Int64RangeFilter) RightSmallerThan ¶
func (f *Int64RangeFilter) RightSmallerThan(val int64) *Int64RangeFilter
RightSmallerThan valid whether right value of range is smaller than the specified value.
func (*Int64RangeFilter) Run ¶
func (f *Int64RangeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type Int64RangeValidator ¶
type Int64RangeValidator func(paramName string, paramValue *types.Int64Range) *Error
type Int64SetFilter ¶
type Int64SetFilter struct {
// contains filtered or unexported fields
}
func (*Int64SetFilter) AddValidator ¶
func (f *Int64SetFilter) AddValidator(validator Int64SetValidator) *Int64SetFilter
AddValidator add a custom validator to filter
func (*Int64SetFilter) Allow ¶
func (f *Int64SetFilter) Allow(vals ...string) *Int64SetFilter
Allow allow value is a string in the specified list
func (*Int64SetFilter) Base ¶
func (f *Int64SetFilter) Base(base int) *Int64SetFilter
Base set the base of int64. Int64SetFilter interprets a string s in the given base (2 to 36) and returns the corresponding value i. If base == 0, the base is implied by the string's prefix: base 16 for "0x", base 8 for "0", and base 10 otherwise.
func (*Int64SetFilter) Delimiter ¶
func (f *Int64SetFilter) Delimiter(delimiter string) *Int64SetFilter
Delimiter set the delimiter of set string.
func (*Int64SetFilter) ItemBetween ¶
func (f *Int64SetFilter) ItemBetween(min, max int64) *Int64SetFilter
ItemBetween valid whether item value of set is in the specified set.
func (*Int64SetFilter) ItemIn ¶
func (f *Int64SetFilter) ItemIn(set []int64) *Int64SetFilter
ItemIn valid item value of set should in the specified set.
func (*Int64SetFilter) ItemLargerThan ¶
func (f *Int64SetFilter) ItemLargerThan(val int64) *Int64SetFilter
ItemLargerThan valid whether item value of set is larger than the specified value.
func (*Int64SetFilter) ItemMax ¶
func (f *Int64SetFilter) ItemMax(val int64) *Int64SetFilter
ItemMax valid whether item value of set is not larger than specified value.
func (*Int64SetFilter) ItemMin ¶
func (f *Int64SetFilter) ItemMin(val int64) *Int64SetFilter
ItemMin valid whether item value of set is not smaller than specified value.
func (*Int64SetFilter) ItemSmallerThan ¶
func (f *Int64SetFilter) ItemSmallerThan(val int64) *Int64SetFilter
ItemSmallerThan valid whether item value of set is smaller than the specified value.
func (*Int64SetFilter) MaxCount ¶
func (f *Int64SetFilter) MaxCount(count int) *Int64SetFilter
MaxCount set the max item count of set.
func (*Int64SetFilter) MinCount ¶
func (f *Int64SetFilter) MinCount(count int) *Int64SetFilter
MinCount set the max item count of set.
func (*Int64SetFilter) Run ¶
func (f *Int64SetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type Int64SetValidator ¶
type Int64Validator ¶
type IntFilter ¶
type IntFilter struct {
// contains filtered or unexported fields
}
func (*IntFilter) AddValidator ¶
func (f *IntFilter) AddValidator(validator IntValidator) *IntFilter
AddValidator add a custom validator to filter
func (*IntFilter) Base ¶
Base set the base of int. IntFilter interprets a string s in the given base (2 to 36) and returns the corresponding value i. If base == 0, the base is implied by the string's prefix: base 16 for "0x", base 8 for "0", and base 10 otherwise.
func (*IntFilter) LargerThan ¶
LargerThan valid param value should be larger than the specified value.
func (*IntFilter) SmallerThan ¶
SmallerThan valid param value should be smaller than the specified value.
type IntRangeFilter ¶
type IntRangeFilter struct {
// contains filtered or unexported fields
}
func (*IntRangeFilter) AddValidator ¶
func (f *IntRangeFilter) AddValidator(validator IntRangeValidator) *IntRangeFilter
AddValidator add a custom validator to filter
func (*IntRangeFilter) Allow ¶
func (f *IntRangeFilter) Allow(vals ...string) *IntRangeFilter
Allow allow value is a string in the specified list
func (*IntRangeFilter) LeftBetween ¶
func (f *IntRangeFilter) LeftBetween(min, max int) *IntRangeFilter
LeftBetween valid whether left value of range is in the specified range.
func (*IntRangeFilter) LeftDefault ¶
func (f *IntRangeFilter) LeftDefault(val int) *IntRangeFilter
LeftDefault set the default left value of range if not specified.
func (*IntRangeFilter) LeftEqual ¶
func (f *IntRangeFilter) LeftEqual(val int) *IntRangeFilter
LeftEqual valid whether left value of range is equal to the specified value.
func (*IntRangeFilter) LeftLargerThan ¶
func (f *IntRangeFilter) LeftLargerThan(val int) *IntRangeFilter
LeftLargerThan valid whether left value of range is larger than the specified value.
func (*IntRangeFilter) LeftMax ¶
func (f *IntRangeFilter) LeftMax(val int) *IntRangeFilter
LeftMax valid whether left value of range is not larger than specified value.
func (*IntRangeFilter) LeftMin ¶
func (f *IntRangeFilter) LeftMin(val int) *IntRangeFilter
LeftMin valid whether left value of range is not smaller than specified value.
func (*IntRangeFilter) LeftSmallerThan ¶
func (f *IntRangeFilter) LeftSmallerThan(val int) *IntRangeFilter
LeftSmallerThan valid whether left value of range is smaller than the specified value.
func (*IntRangeFilter) MaxDistance ¶
func (f *IntRangeFilter) MaxDistance(val uint) *IntRangeFilter
MaxDistance valid whether the distance of range not larger than the specified value.
func (*IntRangeFilter) MinDistance ¶
func (f *IntRangeFilter) MinDistance(val uint) *IntRangeFilter
MinDistance valid whether the distance of range not smaller than the specified value.
func (*IntRangeFilter) RightBetween ¶
func (f *IntRangeFilter) RightBetween(min, max int) *IntRangeFilter
RightBetween valid whether right value of range is in the specified range.
func (*IntRangeFilter) RightDefault ¶
func (f *IntRangeFilter) RightDefault(val int) *IntRangeFilter
RightDefault set the default right value of range if not specified.
func (*IntRangeFilter) RightEqual ¶
func (f *IntRangeFilter) RightEqual(val int) *IntRangeFilter
RightEqual valid whether right value of range is equal to the specified value.
func (*IntRangeFilter) RightLargerThan ¶
func (f *IntRangeFilter) RightLargerThan(val int) *IntRangeFilter
RightLargerThan valid whether right value of range is larger than the specified value.
func (*IntRangeFilter) RightMax ¶
func (f *IntRangeFilter) RightMax(val int) *IntRangeFilter
RightMax valid whether right value of range is not larger than specified value.
func (*IntRangeFilter) RightMin ¶
func (f *IntRangeFilter) RightMin(val int) *IntRangeFilter
RightMin valid whether right value of range is not smaller than specified value.
func (*IntRangeFilter) RightSmallerThan ¶
func (f *IntRangeFilter) RightSmallerThan(val int) *IntRangeFilter
RightSmallerThan valid whether right value of range is smaller than the specified value.
func (*IntRangeFilter) Run ¶
func (f *IntRangeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type IntRangeValidator ¶
type IntSetFilter ¶
type IntSetFilter struct {
// contains filtered or unexported fields
}
func (*IntSetFilter) AddValidator ¶
func (f *IntSetFilter) AddValidator(validator IntSetValidator) *IntSetFilter
AddValidator add a custom validator to filter
func (*IntSetFilter) Allow ¶
func (f *IntSetFilter) Allow(vals ...string) *IntSetFilter
Allow allow value is a string in the specified list
func (*IntSetFilter) Base ¶
func (f *IntSetFilter) Base(base int) *IntSetFilter
Base set the base of int. IntSetFilter interprets a string s in the given base (2 to 36) and returns the corresponding value i. If base == 0, the base is implied by the string's prefix: base 16 for "0x", base 8 for "0", and base 10 otherwise.
func (*IntSetFilter) Delimiter ¶
func (f *IntSetFilter) Delimiter(delimiter string) *IntSetFilter
Delimiter set the delimiter of set string.
func (*IntSetFilter) ItemBetween ¶
func (f *IntSetFilter) ItemBetween(min, max int) *IntSetFilter
ItemBetween valid whether item value of set is in the specified set.
func (*IntSetFilter) ItemIn ¶
func (f *IntSetFilter) ItemIn(set []int) *IntSetFilter
ItemIn valid item value of set should in the specified set.
func (*IntSetFilter) ItemLargerThan ¶
func (f *IntSetFilter) ItemLargerThan(val int) *IntSetFilter
ItemLargerThan valid whether item value of set is larger than the specified value.
func (*IntSetFilter) ItemMax ¶
func (f *IntSetFilter) ItemMax(val int) *IntSetFilter
ItemMax valid whether item value of set is not larger than specified value.
func (*IntSetFilter) ItemMin ¶
func (f *IntSetFilter) ItemMin(val int) *IntSetFilter
ItemMin valid whether item value of set is not smaller than specified value.
func (*IntSetFilter) ItemSmallerThan ¶
func (f *IntSetFilter) ItemSmallerThan(val int) *IntSetFilter
ItemSmallerThan valid whether item value of set is smaller than the specified value.
func (*IntSetFilter) MaxCount ¶
func (f *IntSetFilter) MaxCount(count int) *IntSetFilter
MaxCount set the max item count of set.
func (*IntSetFilter) MinCount ¶
func (f *IntSetFilter) MinCount(count int) *IntSetFilter
MinCount set the max item count of set.
func (*IntSetFilter) Run ¶
func (f *IntSetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type IntSetValidator ¶
type IntValidator ¶
type JsonFilter ¶
type JsonFilter struct {
// contains filtered or unexported fields
}
func (*JsonFilter) AddValidator ¶
func (f *JsonFilter) AddValidator(validator JsonValidator) *JsonFilter
AddValidator add a custom validator to filter
func (*JsonFilter) Allow ¶
func (f *JsonFilter) Allow(vals ...string) *JsonFilter
Allow allow value is a string in the specified list
func (*JsonFilter) Output ¶
func (f *JsonFilter) Output(outVar interface{}) *JsonFilter
Output decode json value to specified variable.
func (*JsonFilter) Run ¶
func (f *JsonFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
func (*JsonFilter) ToString ¶
func (f *JsonFilter) ToString() *JsonFilter
ToString return value as string
type JsonValidator ¶
type RequiredFilter ¶
type RequiredFilter struct { }
func (*RequiredFilter) Run ¶
func (f *RequiredFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type StringFilter ¶
type StringFilter struct {
// contains filtered or unexported fields
}
func (*StringFilter) AddValidator ¶
func (f *StringFilter) AddValidator(validator StringValidator) *StringFilter
AddValidator add a custom validator to filter
func (*StringFilter) Allow ¶
func (f *StringFilter) Allow(vals ...string) *StringFilter
Allow allow value is a string in the specified list
func (*StringFilter) Between ¶
func (f *StringFilter) Between(minLength, maxLength int) *StringFilter
Between valid whether string's length is in the range.
func (*StringFilter) In ¶
func (f *StringFilter) In(set []string) *StringFilter
In valid param value should in the specified set.
func (*StringFilter) IsAlpha ¶
func (f *StringFilter) IsAlpha() *StringFilter
IsAlpha valid whether string is consist of alpha letters.
func (*StringFilter) IsAlphaNumeric ¶
func (f *StringFilter) IsAlphaNumeric() *StringFilter
IsAlphaNumeric valid whether string is consist of alpha letters or digit numbers.
func (*StringFilter) IsDigit ¶
func (f *StringFilter) IsDigit() *StringFilter
IsDigit valid whether string is consist of digit numbers.
func (*StringFilter) IsNumeric ¶
func (f *StringFilter) IsNumeric() *StringFilter
IsNumeric valid whether string is numeric.
func (*StringFilter) KeepCase ¶
func (f *StringFilter) KeepCase() *StringFilter
KeepCase do no case transform before validation.
func (*StringFilter) Length ¶
func (f *StringFilter) Length(length int) *StringFilter
Length valid whether string's length is equal with the specified length.
func (*StringFilter) LongerThan ¶
func (f *StringFilter) LongerThan(length int) *StringFilter
LongerThan valid whether string is longer than the specified length.
func (*StringFilter) Match ¶
func (f *StringFilter) Match(pattern string) *StringFilter
Match valid whether string is match the specified regular expression.
func (*StringFilter) MaxLen ¶
func (f *StringFilter) MaxLen(length int) *StringFilter
MaxLen valid whether string is not shorter than the specified length.
func (*StringFilter) MinLen ¶
func (f *StringFilter) MinLen(length int) *StringFilter
MinLen valid whether string is not longer than the specified length.
func (*StringFilter) Run ¶
func (f *StringFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
func (*StringFilter) ShorterThan ¶
func (f *StringFilter) ShorterThan(length int) *StringFilter
ShorterThan valid whether string is shorter than the specified length.
func (*StringFilter) ToLower ¶
func (f *StringFilter) ToLower() *StringFilter
ToLower lower case string before validation.
func (*StringFilter) ToUpper ¶
func (f *StringFilter) ToUpper() *StringFilter
ToUpper lower case string before validation.
func (*StringFilter) Trim ¶
func (f *StringFilter) Trim() *StringFilter
Trim trim empty char like space, \t, \n, \r before validation.
type StringSetFilter ¶
type StringSetFilter struct {
// contains filtered or unexported fields
}
func (*StringSetFilter) AddValidator ¶
func (f *StringSetFilter) AddValidator(validator StringSetValidator) *StringSetFilter
AddValidator add a custom validator to filter
func (*StringSetFilter) Allow ¶
func (f *StringSetFilter) Allow(vals ...string) *StringSetFilter
Allow allow value is a string in the specified list
func (*StringSetFilter) Delimiter ¶
func (f *StringSetFilter) Delimiter(delimiter string) *StringSetFilter
Delimiter set the delimiter of set string.
func (*StringSetFilter) ItemBetween ¶
func (f *StringSetFilter) ItemBetween(minLength, maxLength int) *StringSetFilter
Between valid whether length of string in set is in the range.
func (*StringSetFilter) ItemIn ¶
func (f *StringSetFilter) ItemIn(set []string) *StringSetFilter
In valid param value should in the specified set.
func (*StringSetFilter) ItemIsAlpha ¶
func (f *StringSetFilter) ItemIsAlpha() *StringSetFilter
IsAlpha valid whether string in set is consist of alpha letters.
func (*StringSetFilter) ItemIsAlphaNumeric ¶
func (f *StringSetFilter) ItemIsAlphaNumeric() *StringSetFilter
IsAlphaNumeric valid whether string in set is consist of alpha letters or digit numbers.
func (*StringSetFilter) ItemIsDigit ¶
func (f *StringSetFilter) ItemIsDigit() *StringSetFilter
IsDigit valid whether string in set is consist of digit numbers.
func (*StringSetFilter) ItemIsNumeric ¶
func (f *StringSetFilter) ItemIsNumeric() *StringSetFilter
IsNumeric valid whether string in set is numeric.
func (*StringSetFilter) ItemLength ¶
func (f *StringSetFilter) ItemLength(length int) *StringSetFilter
Length valid whether string's length in set is equal with the specified length.
func (*StringSetFilter) ItemLongerThan ¶
func (f *StringSetFilter) ItemLongerThan(length int) *StringSetFilter
LongerThan valid whether string in set is longer than the specified length.
func (*StringSetFilter) ItemMatch ¶
func (f *StringSetFilter) ItemMatch(pattern string) *StringSetFilter
Match valid whether string in set is match the specified regular expression.
func (*StringSetFilter) ItemMaxLen ¶
func (f *StringSetFilter) ItemMaxLen(length int) *StringSetFilter
MaxLen valid whether string in set is not shorter than the specified length.
func (*StringSetFilter) ItemMinLen ¶
func (f *StringSetFilter) ItemMinLen(length int) *StringSetFilter
MinLen valid whether string in set is not longer than the specified length.
func (*StringSetFilter) ItemShorterThan ¶
func (f *StringSetFilter) ItemShorterThan(length int) *StringSetFilter
ShorterThan valid whether string in set is shorter than the specified length.
func (*StringSetFilter) KeepCase ¶
func (f *StringSetFilter) KeepCase() *StringSetFilter
KeepCase do no case transform before validation.
func (*StringSetFilter) MaxCount ¶
func (f *StringSetFilter) MaxCount(count int) *StringSetFilter
MaxCount set the max item count of set.
func (*StringSetFilter) MinCount ¶
func (f *StringSetFilter) MinCount(count int) *StringSetFilter
MinCount set the max item count of set.
func (*StringSetFilter) Run ¶
func (f *StringSetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
func (*StringSetFilter) ToLower ¶
func (f *StringSetFilter) ToLower() *StringSetFilter
ToLower lower case string before validation.
func (*StringSetFilter) ToUpper ¶
func (f *StringSetFilter) ToUpper() *StringSetFilter
ToUpper lower case string before validation.
type StringSetValidator ¶
type StringValidator ¶
type TimeFilter ¶
type TimeFilter struct {
// contains filtered or unexported fields
}
func (*TimeFilter) AddValidator ¶
func (f *TimeFilter) AddValidator(validator TimeValidator) *TimeFilter
AddValidator add a custom validator to filter
func (*TimeFilter) After ¶
func (f *TimeFilter) After(tm string) *TimeFilter
After valid whether after specified time.
func (*TimeFilter) Allow ¶
func (f *TimeFilter) Allow(vals ...string) *TimeFilter
Allow allow value is a string in the specified list
func (*TimeFilter) Before ¶
func (f *TimeFilter) Before(tm string) *TimeFilter
Before valid whether before specified time.
func (*TimeFilter) Between ¶
func (f *TimeFilter) Between(startTime, endTime string) *TimeFilter
Between valid whether between two times.
func (*TimeFilter) EndTo ¶
func (f *TimeFilter) EndTo(tm string) *TimeFilter
EndTo valid whether end to specified time.
func (*TimeFilter) Equal ¶
func (f *TimeFilter) Equal(tm string) *TimeFilter
Equal valid whether equal to specified time.
func (*TimeFilter) HasTime ¶
func (f *TimeFilter) HasTime() *TimeFilter
HasTime set the layout to include time.
func (*TimeFilter) Layout ¶
func (f *TimeFilter) Layout(layout string) *TimeFilter
Layout set the time layout.
func (*TimeFilter) Run ¶
func (f *TimeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
func (*TimeFilter) StartFrom ¶
func (f *TimeFilter) StartFrom(tm string) *TimeFilter
StartFrom valid whether start from specified time.
type TimeRangeFilter ¶
type TimeRangeFilter struct {
// contains filtered or unexported fields
}
func (*TimeRangeFilter) AddValidator ¶
func (f *TimeRangeFilter) AddValidator(validator TimeRangeValidator) *TimeRangeFilter
AddValidator add a custom validator to filter
func (*TimeRangeFilter) Allow ¶
func (f *TimeRangeFilter) Allow(vals ...string) *TimeRangeFilter
Allow allow value is a string in the specified list
func (*TimeRangeFilter) HasTime ¶
func (f *TimeRangeFilter) HasTime() *TimeRangeFilter
HasTime set the layout to include time.
func (*TimeRangeFilter) Layout ¶
func (f *TimeRangeFilter) Layout(layout string) *TimeRangeFilter
Layout set the time layout.
func (*TimeRangeFilter) LeftAfter ¶
func (f *TimeRangeFilter) LeftAfter(tm string) *TimeRangeFilter
LeftAfter valid whether left value of range is after specified time.
func (*TimeRangeFilter) LeftBefore ¶
func (f *TimeRangeFilter) LeftBefore(tm string) *TimeRangeFilter
LeftBefore valid whether left value of range is before specified time.
func (*TimeRangeFilter) LeftBetween ¶
func (f *TimeRangeFilter) LeftBetween(startTime, endTime string) *TimeRangeFilter
LeftBetween valid whether left value of range is in the specified range.
func (*TimeRangeFilter) LeftDefault ¶
func (f *TimeRangeFilter) LeftDefault(tm string) *TimeRangeFilter
LeftDefault set the default left value of range if not specified.
func (*TimeRangeFilter) LeftEndTo ¶
func (f *TimeRangeFilter) LeftEndTo(tm string) *TimeRangeFilter
LeftEndTo valid whether left value of range is end to specified time.
func (*TimeRangeFilter) LeftEqual ¶
func (f *TimeRangeFilter) LeftEqual(tm string) *TimeRangeFilter
LeftEqual valid whether left value of range is equal to specified time.
func (*TimeRangeFilter) LeftStartFrom ¶
func (f *TimeRangeFilter) LeftStartFrom(tm string) *TimeRangeFilter
LeftStartFrom valid whether left value of range is start from specified time.
func (*TimeRangeFilter) MaxDistance ¶
func (f *TimeRangeFilter) MaxDistance(duration string) *TimeRangeFilter
MaxDistance valid whether the distance of range not larger than the specified value.
func (*TimeRangeFilter) MinDistance ¶
func (f *TimeRangeFilter) MinDistance(duration string) *TimeRangeFilter
MinDistance valid whether the distance of range not smaller than the specified value.
func (*TimeRangeFilter) RightAfter ¶
func (f *TimeRangeFilter) RightAfter(tm string) *TimeRangeFilter
RightAfter valid whether right value of range is after specified time.
func (*TimeRangeFilter) RightBefore ¶
func (f *TimeRangeFilter) RightBefore(tm string) *TimeRangeFilter
RightBefore valid whether right value of range is before specified time.
func (*TimeRangeFilter) RightBetween ¶
func (f *TimeRangeFilter) RightBetween(startTime, endTime string) *TimeRangeFilter
RightBetween valid whether right value of range is in the specified range.
func (*TimeRangeFilter) RightDefault ¶
func (f *TimeRangeFilter) RightDefault(tm string) *TimeRangeFilter
RightDefault set the default right value of range if not specified.
func (*TimeRangeFilter) RightEndTo ¶
func (f *TimeRangeFilter) RightEndTo(tm string) *TimeRangeFilter
RightEndTo valid whether right value of range is end to specified time.
func (*TimeRangeFilter) RightEqual ¶
func (f *TimeRangeFilter) RightEqual(tm string) *TimeRangeFilter
RightEqual valid whether right value of range is equal to specified time.
func (*TimeRangeFilter) RightStartFrom ¶
func (f *TimeRangeFilter) RightStartFrom(tm string) *TimeRangeFilter
RightStartFrom valid whether right value of range is start from specified time.
func (*TimeRangeFilter) Run ¶
func (f *TimeRangeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type TimeRangeValidator ¶
type TimeSetFilter ¶
type TimeSetFilter struct {
// contains filtered or unexported fields
}
func (*TimeSetFilter) AddValidator ¶
func (f *TimeSetFilter) AddValidator(validator TimeSetValidator) *TimeSetFilter
AddValidator add a custom validator to filter
func (*TimeSetFilter) Allow ¶
func (f *TimeSetFilter) Allow(vals ...string) *TimeSetFilter
Allow allow value is a string in the specified list
func (*TimeSetFilter) Delimiter ¶
func (f *TimeSetFilter) Delimiter(delimiter string) *TimeSetFilter
Delimiter set the delimiter in set string.
func (*TimeSetFilter) HasTime ¶
func (f *TimeSetFilter) HasTime() *TimeSetFilter
HasTime set the layout to include time.
func (*TimeSetFilter) ItemAfter ¶
func (f *TimeSetFilter) ItemAfter(tm string) *TimeSetFilter
ItemAfter valid whether left value in set is after specified time.
func (*TimeSetFilter) ItemBefore ¶
func (f *TimeSetFilter) ItemBefore(tm string) *TimeSetFilter
ItemBefore valid whether left value in set is before specified time.
func (*TimeSetFilter) ItemBetween ¶
func (f *TimeSetFilter) ItemBetween(startTime, endTime string) *TimeSetFilter
ItemBetween valid whether left value in set is in the specified range.
func (*TimeSetFilter) ItemEndTo ¶
func (f *TimeSetFilter) ItemEndTo(tm string) *TimeSetFilter
ItemEndTo valid whether left value in set is end to specified time.
func (*TimeSetFilter) ItemStartFrom ¶
func (f *TimeSetFilter) ItemStartFrom(tm string) *TimeSetFilter
ItemStartFrom valid whether left value in set is start from specified time.
func (*TimeSetFilter) Layout ¶
func (f *TimeSetFilter) Layout(layout string) *TimeSetFilter
Layout set the time layout.
func (*TimeSetFilter) MaxCount ¶
func (f *TimeSetFilter) MaxCount(count int) *TimeSetFilter
MaxCount set the max item count of set.
func (*TimeSetFilter) MinCount ¶
func (f *TimeSetFilter) MinCount(count int) *TimeSetFilter
MinCount set the max item count of set.
func (*TimeSetFilter) Run ¶
func (f *TimeSetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type TimeSetValidator ¶
type TimestampFilter ¶
type TimestampFilter struct {
// contains filtered or unexported fields
}
func (*TimestampFilter) AddValidator ¶
func (f *TimestampFilter) AddValidator(validator TimestampValidator) *TimestampFilter
AddValidator add a custom validator to filter
func (*TimestampFilter) After ¶
func (f *TimestampFilter) After(val uint32) *TimestampFilter
After valid whether after specified time.
func (*TimestampFilter) Allow ¶
func (f *TimestampFilter) Allow(vals ...string) *TimestampFilter
Allow allow value is a string in the specified list
func (*TimestampFilter) Before ¶
func (f *TimestampFilter) Before(val uint32) *TimestampFilter
Before valid whether before specified time.
func (*TimestampFilter) Between ¶
func (f *TimestampFilter) Between(start, end uint32) *TimestampFilter
Between valid whether between two times.
func (*TimestampFilter) EndTo ¶
func (f *TimestampFilter) EndTo(val uint32) *TimestampFilter
StartFrom valid whether end to specified time.
func (*TimestampFilter) Equal ¶
func (f *TimestampFilter) Equal(val uint32) *TimestampFilter
Equal valid whether equal to specified time.
func (*TimestampFilter) Run ¶
func (f *TimestampFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
func (*TimestampFilter) StartFrom ¶
func (f *TimestampFilter) StartFrom(val uint32) *TimestampFilter
StartFrom valid whether start from specified time.
type TimestampRangeFilter ¶
type TimestampRangeFilter struct {
// contains filtered or unexported fields
}
func TimestampRange ¶
func TimestampRange() *TimestampRangeFilter
TimestampRange return a timestamp range filter.
func (*TimestampRangeFilter) AddValidator ¶
func (f *TimestampRangeFilter) AddValidator(validator TimestampRangeValidator) *TimestampRangeFilter
AddValidator add a custom validator to filter
func (*TimestampRangeFilter) Allow ¶
func (f *TimestampRangeFilter) Allow(vals ...string) *TimestampRangeFilter
Allow allow value is a string in the specified list
func (*TimestampRangeFilter) LeftAfter ¶
func (f *TimestampRangeFilter) LeftAfter(val uint32) *TimestampRangeFilter
LeftAfter valid whether left value of range is after specified time.
func (*TimestampRangeFilter) LeftBefore ¶
func (f *TimestampRangeFilter) LeftBefore(val uint32) *TimestampRangeFilter
LeftBefore valid whether left value of range is before specified time.
func (*TimestampRangeFilter) LeftBetween ¶
func (f *TimestampRangeFilter) LeftBetween(start, end uint32) *TimestampRangeFilter
LeftBetween valid whether left value of range is in the specified range.
func (*TimestampRangeFilter) LeftDefault ¶
func (f *TimestampRangeFilter) LeftDefault(val uint32) *TimestampRangeFilter
LeftDefault set the default left value of range if not specified.
func (*TimestampRangeFilter) LeftEndTo ¶
func (f *TimestampRangeFilter) LeftEndTo(val uint32) *TimestampRangeFilter
LeftEndTo valid whether left value of range is end to specified time.
func (*TimestampRangeFilter) LeftEqual ¶
func (f *TimestampRangeFilter) LeftEqual(val uint32) *TimestampRangeFilter
LeftEqual valid whether left value of range is equal to specified time.
func (*TimestampRangeFilter) LeftStartFrom ¶
func (f *TimestampRangeFilter) LeftStartFrom(val uint32) *TimestampRangeFilter
LeftStartFrom valid whether left value of range is start from specified time.
func (*TimestampRangeFilter) MaxDistance ¶
func (f *TimestampRangeFilter) MaxDistance(val uint32) *TimestampRangeFilter
MaxDistance valid whether the distance of range not larger than the specified value.
func (*TimestampRangeFilter) MinDistance ¶
func (f *TimestampRangeFilter) MinDistance(val uint32) *TimestampRangeFilter
MinDistance valid whether the distance of range not smaller than the specified value.
func (*TimestampRangeFilter) RightAfter ¶
func (f *TimestampRangeFilter) RightAfter(val uint32) *TimestampRangeFilter
RightAfter valid whether right value of range is after specified time.
func (*TimestampRangeFilter) RightBefore ¶
func (f *TimestampRangeFilter) RightBefore(val uint32) *TimestampRangeFilter
RightBefore valid whether right value of range is before specified time.
func (*TimestampRangeFilter) RightBetween ¶
func (f *TimestampRangeFilter) RightBetween(start, end uint32) *TimestampRangeFilter
RightBetween valid whether right value of range is in the specified range.
func (*TimestampRangeFilter) RightDefault ¶
func (f *TimestampRangeFilter) RightDefault(val uint32) *TimestampRangeFilter
RightDefault set the default right value of range if not specified.
func (*TimestampRangeFilter) RightEndTo ¶
func (f *TimestampRangeFilter) RightEndTo(val uint32) *TimestampRangeFilter
RightEndTo valid whether right value of range is end to specified time.
func (*TimestampRangeFilter) RightEqual ¶
func (f *TimestampRangeFilter) RightEqual(val uint32) *TimestampRangeFilter
RightEqual valid whether right value of range is equal to specified time.
func (*TimestampRangeFilter) RightStartFrom ¶
func (f *TimestampRangeFilter) RightStartFrom(val uint32) *TimestampRangeFilter
RightStartFrom valid whether right value of range is start from specified time.
func (*TimestampRangeFilter) Run ¶
func (f *TimestampRangeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type TimestampRangeValidator ¶
type TimestampRangeValidator func(paramName string, paramValue *types.TimestampRange) *Error
type TimestampSetFilter ¶
type TimestampSetFilter struct {
// contains filtered or unexported fields
}
func TimestampSet ¶
func TimestampSet() *TimestampSetFilter
TimestampSet return a timestamp range filter.
func (*TimestampSetFilter) AddValidator ¶
func (f *TimestampSetFilter) AddValidator(validator TimestampSetValidator) *TimestampSetFilter
AddValidator add a custom validator to filter
func (*TimestampSetFilter) Allow ¶
func (f *TimestampSetFilter) Allow(vals ...string) *TimestampSetFilter
Allow allow value is a string in the specified list
func (*TimestampSetFilter) Delimiter ¶
func (f *TimestampSetFilter) Delimiter(delimiter string) *TimestampSetFilter
Delimiter set the delimiter of set string.
func (*TimestampSetFilter) ItemAfter ¶
func (f *TimestampSetFilter) ItemAfter(val uint32) *TimestampSetFilter
ItemAfter valid whether item value in set is after specified time.
func (*TimestampSetFilter) ItemBefore ¶
func (f *TimestampSetFilter) ItemBefore(val uint32) *TimestampSetFilter
ItemBefore valid whether item value in set is before specified time.
func (*TimestampSetFilter) ItemBetween ¶
func (f *TimestampSetFilter) ItemBetween(start, end uint32) *TimestampSetFilter
ItemBetween valid whether item value in set is in the specified range.
func (*TimestampSetFilter) ItemEndTo ¶
func (f *TimestampSetFilter) ItemEndTo(val uint32) *TimestampSetFilter
ItemEndTo valid whether item value in set is end to specified time.
func (*TimestampSetFilter) ItemStartFrom ¶
func (f *TimestampSetFilter) ItemStartFrom(val uint32) *TimestampSetFilter
ItemStartFrom valid whether item value in set is start from specified time.
func (*TimestampSetFilter) MaxCount ¶
func (f *TimestampSetFilter) MaxCount(count int) *TimestampSetFilter
MaxCount set the max item count of set.
func (*TimestampSetFilter) MinCount ¶
func (f *TimestampSetFilter) MinCount(count int) *TimestampSetFilter
MinCount set the max item count of set.
func (*TimestampSetFilter) Run ¶
func (f *TimestampSetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type TimestampSetValidator ¶
type TimestampValidator ¶
type Uint32Filter ¶
type Uint32Filter struct {
// contains filtered or unexported fields
}
func (*Uint32Filter) AddValidator ¶
func (f *Uint32Filter) AddValidator(validator Uint32Validator) *Uint32Filter
AddValidator add a custom validator to filter
func (*Uint32Filter) Allow ¶
func (f *Uint32Filter) Allow(vals ...string) *Uint32Filter
Allow allow value is a string in the specified list
func (*Uint32Filter) Base ¶
func (f *Uint32Filter) Base(base int) *Uint32Filter
Base set the base of uint. Uint32Filter interprets a string s in the given base (2 to 36) and returns the corresponding value i. If base == 0, the base is implied by the string's prefix: base 16 for "0x", base 8 for "0", and base 10 otherwise.
func (*Uint32Filter) Between ¶
func (f *Uint32Filter) Between(min, max uint32) *Uint32Filter
Between valid param value should in the specified range.
func (*Uint32Filter) Equal ¶
func (f *Uint32Filter) Equal(val uint32) *Uint32Filter
Equal valid param value should be equal to the specified value.
func (*Uint32Filter) In ¶
func (f *Uint32Filter) In(set []uint32) *Uint32Filter
In valid param value should in the specified set.
func (*Uint32Filter) LargerThan ¶
func (f *Uint32Filter) LargerThan(val uint32) *Uint32Filter
LargerThan valid param value should be larger than the specified value.
func (*Uint32Filter) Max ¶
func (f *Uint32Filter) Max(val uint32) *Uint32Filter
Max valid param value should not be larger than the specified value.
func (*Uint32Filter) Min ¶
func (f *Uint32Filter) Min(val uint32) *Uint32Filter
Min valid param value should not be smaller than the specified value.
func (*Uint32Filter) Run ¶
func (f *Uint32Filter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
func (*Uint32Filter) SmallerThan ¶
func (f *Uint32Filter) SmallerThan(val uint32) *Uint32Filter
SmallerThan valid param value should be smaller than the specified value.
type Uint32RangeFilter ¶
type Uint32RangeFilter struct {
// contains filtered or unexported fields
}
func (*Uint32RangeFilter) AddValidator ¶
func (f *Uint32RangeFilter) AddValidator(validator Uint32RangeValidator) *Uint32RangeFilter
AddValidator add a custom validator to filter
func (*Uint32RangeFilter) Allow ¶
func (f *Uint32RangeFilter) Allow(vals ...string) *Uint32RangeFilter
Allow allow value is a string in the specified list
func (*Uint32RangeFilter) LeftBetween ¶
func (f *Uint32RangeFilter) LeftBetween(min, max uint32) *Uint32RangeFilter
LeftBetween valid whether left value of range is in the specified range.
func (*Uint32RangeFilter) LeftDefault ¶
func (f *Uint32RangeFilter) LeftDefault(val uint32) *Uint32RangeFilter
LeftDefault set the default left value of range if not specified.
func (*Uint32RangeFilter) LeftEqual ¶
func (f *Uint32RangeFilter) LeftEqual(val uint32) *Uint32RangeFilter
LeftEqual valid whether left value of range is equal to the specified value.
func (*Uint32RangeFilter) LeftLargerThan ¶
func (f *Uint32RangeFilter) LeftLargerThan(val uint32) *Uint32RangeFilter
LeftLargerThan valid whether left value of range is larger than the specified value.
func (*Uint32RangeFilter) LeftMax ¶
func (f *Uint32RangeFilter) LeftMax(val uint32) *Uint32RangeFilter
LeftMax valid whether left value of range is not larger than specified value.
func (*Uint32RangeFilter) LeftMin ¶
func (f *Uint32RangeFilter) LeftMin(val uint32) *Uint32RangeFilter
LeftMin valid whether left value of range is not smaller than specified value.
func (*Uint32RangeFilter) LeftSmallerThan ¶
func (f *Uint32RangeFilter) LeftSmallerThan(val uint32) *Uint32RangeFilter
LeftSmallerThan valid whether left value of range is smaller than the specified value.
func (*Uint32RangeFilter) MaxDistance ¶
func (f *Uint32RangeFilter) MaxDistance(val uint32) *Uint32RangeFilter
MaxDistance valid whether the distance of range not larger than the specified value.
func (*Uint32RangeFilter) MinDistance ¶
func (f *Uint32RangeFilter) MinDistance(val uint32) *Uint32RangeFilter
MinDistance valid whether the distance of range not smaller than the specified value.
func (*Uint32RangeFilter) RightBetween ¶
func (f *Uint32RangeFilter) RightBetween(min, max uint32) *Uint32RangeFilter
RightBetween valid whether right value of range is in the specified range.
func (*Uint32RangeFilter) RightDefault ¶
func (f *Uint32RangeFilter) RightDefault(val uint32) *Uint32RangeFilter
RightDefault set the default right value of range if not specified.
func (*Uint32RangeFilter) RightEqual ¶
func (f *Uint32RangeFilter) RightEqual(val uint32) *Uint32RangeFilter
RightEqual valid whether right value of range is equal to the specified value.
func (*Uint32RangeFilter) RightLargerThan ¶
func (f *Uint32RangeFilter) RightLargerThan(val uint32) *Uint32RangeFilter
RightLargerThan valid whether right value of range is larger than the specified value.
func (*Uint32RangeFilter) RightMax ¶
func (f *Uint32RangeFilter) RightMax(val uint32) *Uint32RangeFilter
RightMax valid whether right value of range is not larger than specified value.
func (*Uint32RangeFilter) RightMin ¶
func (f *Uint32RangeFilter) RightMin(val uint32) *Uint32RangeFilter
RightMin valid whether right value of range is not smaller than specified value.
func (*Uint32RangeFilter) RightSmallerThan ¶
func (f *Uint32RangeFilter) RightSmallerThan(val uint32) *Uint32RangeFilter
RightSmallerThan valid whether right value of range is smaller than the specified value.
func (*Uint32RangeFilter) Run ¶
func (f *Uint32RangeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type Uint32RangeValidator ¶
type Uint32RangeValidator func(paramName string, paramValue *types.Uint32Range) *Error
type Uint32SetFilter ¶
type Uint32SetFilter struct {
// contains filtered or unexported fields
}
func (*Uint32SetFilter) AddValidator ¶
func (f *Uint32SetFilter) AddValidator(validator Uint32SetValidator) *Uint32SetFilter
AddValidator add a custom validator to filter
func (*Uint32SetFilter) Allow ¶
func (f *Uint32SetFilter) Allow(vals ...string) *Uint32SetFilter
Allow allow value is a string in the specified list
func (*Uint32SetFilter) Base ¶
func (f *Uint32SetFilter) Base(base int) *Uint32SetFilter
Base set the base of uint64. Uint32SetFilter interprets a string s in the given base (2 to 36) and returns the corresponding value i. If base == 0, the base is implied by the string's prefix: base 16 for "0x", base 8 for "0", and base 10 otherwise.
func (*Uint32SetFilter) Delimiter ¶
func (f *Uint32SetFilter) Delimiter(delimiter string) *Uint32SetFilter
Delimiter set the delimiter of set string.
func (*Uint32SetFilter) ItemBetween ¶
func (f *Uint32SetFilter) ItemBetween(min, max uint32) *Uint32SetFilter
ItemBetween valid whether item value of set is in the specified set.
func (*Uint32SetFilter) ItemIn ¶
func (f *Uint32SetFilter) ItemIn(set []uint32) *Uint32SetFilter
ItemIn valid item value of set should in the specified set.
func (*Uint32SetFilter) ItemLargerThan ¶
func (f *Uint32SetFilter) ItemLargerThan(val uint32) *Uint32SetFilter
ItemLargerThan valid whether item value of set is larger than the specified value.
func (*Uint32SetFilter) ItemMax ¶
func (f *Uint32SetFilter) ItemMax(val uint32) *Uint32SetFilter
ItemMax valid whether item value of set is not larger than specified value.
func (*Uint32SetFilter) ItemMin ¶
func (f *Uint32SetFilter) ItemMin(val uint32) *Uint32SetFilter
ItemMin valid whether item value of set is not smaller than specified value.
func (*Uint32SetFilter) ItemSmallerThan ¶
func (f *Uint32SetFilter) ItemSmallerThan(val uint32) *Uint32SetFilter
ItemSmallerThan valid whether item value of set is smaller than the specified value.
func (*Uint32SetFilter) MaxCount ¶
func (f *Uint32SetFilter) MaxCount(count int) *Uint32SetFilter
MaxCount set the max item count of set.
func (*Uint32SetFilter) MinCount ¶
func (f *Uint32SetFilter) MinCount(count int) *Uint32SetFilter
MinCount set the max item count of set.
func (*Uint32SetFilter) Run ¶
func (f *Uint32SetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type Uint32SetValidator ¶
type Uint32Validator ¶
type Uint64Filter ¶
type Uint64Filter struct {
// contains filtered or unexported fields
}
func (*Uint64Filter) AddValidator ¶
func (f *Uint64Filter) AddValidator(validator Uint64Validator) *Uint64Filter
AddValidator add a custom validator to filter
func (*Uint64Filter) Allow ¶
func (f *Uint64Filter) Allow(vals ...string) *Uint64Filter
Allow allow value is a string in the specified list
func (*Uint64Filter) Base ¶
func (f *Uint64Filter) Base(base int) *Uint64Filter
Base set the base of uint64. Uint64Filter interprets a string s in the given base (2 to 36) and returns the corresponding value i. If base == 0, the base is implied by the string's prefix: base 16 for "0x", base 8 for "0", and base 10 otherwise.
func (*Uint64Filter) Between ¶
func (f *Uint64Filter) Between(min, max uint64) *Uint64Filter
Between valid param value should in the specified range.
func (*Uint64Filter) Equal ¶
func (f *Uint64Filter) Equal(val uint64) *Uint64Filter
Equal valid param value should be equal to the specified value.
func (*Uint64Filter) In ¶
func (f *Uint64Filter) In(set []uint64) *Uint64Filter
In valid param value should in the specified set.
func (*Uint64Filter) LargerThan ¶
func (f *Uint64Filter) LargerThan(val uint64) *Uint64Filter
LargerThan valid param value should be larger than the specified value.
func (*Uint64Filter) Max ¶
func (f *Uint64Filter) Max(val uint64) *Uint64Filter
Max valid param value should not be larger than the specified value.
func (*Uint64Filter) Min ¶
func (f *Uint64Filter) Min(val uint64) *Uint64Filter
Min valid param value should not be smaller than the specified value.
func (*Uint64Filter) Run ¶
func (f *Uint64Filter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
func (*Uint64Filter) SmallerThan ¶
func (f *Uint64Filter) SmallerThan(val uint64) *Uint64Filter
SmallerThan valid param value should be smaller than the specified value.
type Uint64RangeFilter ¶
type Uint64RangeFilter struct {
// contains filtered or unexported fields
}
func (*Uint64RangeFilter) AddValidator ¶
func (f *Uint64RangeFilter) AddValidator(validator Uint64RangeValidator) *Uint64RangeFilter
AddValidator add a custom validator to filter
func (*Uint64RangeFilter) Allow ¶
func (f *Uint64RangeFilter) Allow(vals ...string) *Uint64RangeFilter
Allow allow value is a string in the specified list
func (*Uint64RangeFilter) LeftBetween ¶
func (f *Uint64RangeFilter) LeftBetween(min, max uint64) *Uint64RangeFilter
LeftBetween valid whether left value of range is in the specified range.
func (*Uint64RangeFilter) LeftDefault ¶
func (f *Uint64RangeFilter) LeftDefault(val uint64) *Uint64RangeFilter
LeftDefault set the default left value of range if not specified.
func (*Uint64RangeFilter) LeftEqual ¶
func (f *Uint64RangeFilter) LeftEqual(val uint64) *Uint64RangeFilter
LeftEqual valid whether left value of range is equal to the specified value.
func (*Uint64RangeFilter) LeftLargerThan ¶
func (f *Uint64RangeFilter) LeftLargerThan(val uint64) *Uint64RangeFilter
LeftLargerThan valid whether left value of range is larger than the specified value.
func (*Uint64RangeFilter) LeftMax ¶
func (f *Uint64RangeFilter) LeftMax(val uint64) *Uint64RangeFilter
LeftMax valid whether left value of range is not larger than specified value.
func (*Uint64RangeFilter) LeftMin ¶
func (f *Uint64RangeFilter) LeftMin(val uint64) *Uint64RangeFilter
LeftMin valid whether left value of range is not smaller than specified value.
func (*Uint64RangeFilter) LeftSmallerThan ¶
func (f *Uint64RangeFilter) LeftSmallerThan(val uint64) *Uint64RangeFilter
LeftSmallerThan valid whether left value of range is smaller than the specified value.
func (*Uint64RangeFilter) MaxDistance ¶
func (f *Uint64RangeFilter) MaxDistance(val uint64) *Uint64RangeFilter
MaxDistance valid whether the distance of range not larger than the specified value.
func (*Uint64RangeFilter) MinDistance ¶
func (f *Uint64RangeFilter) MinDistance(val uint64) *Uint64RangeFilter
MinDistance valid whether the distance of range not smaller than the specified value.
func (*Uint64RangeFilter) RightBetween ¶
func (f *Uint64RangeFilter) RightBetween(min, max uint64) *Uint64RangeFilter
RightBetween valid whether right value of range is in the specified range.
func (*Uint64RangeFilter) RightDefault ¶
func (f *Uint64RangeFilter) RightDefault(val uint64) *Uint64RangeFilter
RightDefault set the default right value of range if not specified.
func (*Uint64RangeFilter) RightEqual ¶
func (f *Uint64RangeFilter) RightEqual(val uint64) *Uint64RangeFilter
RightEqual valid whether right value of range is equal to the specified value.
func (*Uint64RangeFilter) RightLargerThan ¶
func (f *Uint64RangeFilter) RightLargerThan(val uint64) *Uint64RangeFilter
RightLargerThan valid whether right value of range is larger than the specified value.
func (*Uint64RangeFilter) RightMax ¶
func (f *Uint64RangeFilter) RightMax(val uint64) *Uint64RangeFilter
RightMax valid whether right value of range is not larger than specified value.
func (*Uint64RangeFilter) RightMin ¶
func (f *Uint64RangeFilter) RightMin(val uint64) *Uint64RangeFilter
RightMin valid whether right value of range is not smaller than specified value.
func (*Uint64RangeFilter) RightSmallerThan ¶
func (f *Uint64RangeFilter) RightSmallerThan(val uint64) *Uint64RangeFilter
RightSmallerThan valid whether right value of range is smaller than the specified value.
func (*Uint64RangeFilter) Run ¶
func (f *Uint64RangeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type Uint64RangeValidator ¶
type Uint64RangeValidator func(paramName string, paramValue *types.Uint64Range) *Error
type Uint64SetFilter ¶
type Uint64SetFilter struct {
// contains filtered or unexported fields
}
func (*Uint64SetFilter) AddValidator ¶
func (f *Uint64SetFilter) AddValidator(validator Uint64SetValidator) *Uint64SetFilter
AddValidator add a custom validator to filter
func (*Uint64SetFilter) Allow ¶
func (f *Uint64SetFilter) Allow(vals ...string) *Uint64SetFilter
Allow allow value is a string in the specified list
func (*Uint64SetFilter) Base ¶
func (f *Uint64SetFilter) Base(base int) *Uint64SetFilter
Base set the base of uint64. Uint64SetFilter interprets a string s in the given base (2 to 36) and returns the corresponding value i. If base == 0, the base is implied by the string's prefix: base 16 for "0x", base 8 for "0", and base 10 otherwise.
func (*Uint64SetFilter) Delimiter ¶
func (f *Uint64SetFilter) Delimiter(delimiter string) *Uint64SetFilter
Delimiter set the delimiter of set string.
func (*Uint64SetFilter) ItemBetween ¶
func (f *Uint64SetFilter) ItemBetween(min, max uint64) *Uint64SetFilter
ItemBetween valid whether item value of set is in the specified set.
func (*Uint64SetFilter) ItemIn ¶
func (f *Uint64SetFilter) ItemIn(set []uint64) *Uint64SetFilter
ItemIn valid item value of set should in the specified set.
func (*Uint64SetFilter) ItemLargerThan ¶
func (f *Uint64SetFilter) ItemLargerThan(val uint64) *Uint64SetFilter
ItemLargerThan valid whether item value of set is larger than the specified value.
func (*Uint64SetFilter) ItemMax ¶
func (f *Uint64SetFilter) ItemMax(val uint64) *Uint64SetFilter
ItemMax valid whether item value of set is not larger than specified value.
func (*Uint64SetFilter) ItemMin ¶
func (f *Uint64SetFilter) ItemMin(val uint64) *Uint64SetFilter
ItemMin valid whether item value of set is not smaller than specified value.
func (*Uint64SetFilter) ItemSmallerThan ¶
func (f *Uint64SetFilter) ItemSmallerThan(val uint64) *Uint64SetFilter
ItemSmallerThan valid whether item value of set is smaller than the specified value.
func (*Uint64SetFilter) MaxCount ¶
func (f *Uint64SetFilter) MaxCount(count int) *Uint64SetFilter
MaxCount set the max item count of set.
func (*Uint64SetFilter) MinCount ¶
func (f *Uint64SetFilter) MinCount(count int) *Uint64SetFilter
MinCount set the max item count of set.
func (*Uint64SetFilter) Run ¶
func (f *Uint64SetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type Uint64SetValidator ¶
type Uint64Validator ¶
type UintFilter ¶
type UintFilter struct {
// contains filtered or unexported fields
}
func (*UintFilter) AddValidator ¶
func (f *UintFilter) AddValidator(validator UintValidator) *UintFilter
AddValidator add a custom validator to filter
func (*UintFilter) Allow ¶
func (f *UintFilter) Allow(vals ...string) *UintFilter
Allow allow value is a string in the specified list
func (*UintFilter) Base ¶
func (f *UintFilter) Base(base int) *UintFilter
Base set the base of uint. UintFilter interprets a string s in the given base (2 to 36) and returns the corresponding value i. If base == 0, the base is implied by the string's prefix: base 16 for "0x", base 8 for "0", and base 10 otherwise.
func (*UintFilter) Between ¶
func (f *UintFilter) Between(min, max uint) *UintFilter
Between valid param value should in the specified range.
func (*UintFilter) Equal ¶
func (f *UintFilter) Equal(val uint) *UintFilter
Equal valid param value should be equal to the specified value.
func (*UintFilter) In ¶
func (f *UintFilter) In(set []uint) *UintFilter
In valid param value should in the specified set.
func (*UintFilter) LargerThan ¶
func (f *UintFilter) LargerThan(val uint) *UintFilter
LargerThan valid param value should be larger than the specified value.
func (*UintFilter) Max ¶
func (f *UintFilter) Max(val uint) *UintFilter
Max valid param value should not be larger than the specified value.
func (*UintFilter) Min ¶
func (f *UintFilter) Min(val uint) *UintFilter
Min valid param value should not be smaller than the specified value.
func (*UintFilter) Run ¶
func (f *UintFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
func (*UintFilter) SmallerThan ¶
func (f *UintFilter) SmallerThan(val uint) *UintFilter
SmallerThan valid param value should be smaller than the specified value.
type UintRangeFilter ¶
type UintRangeFilter struct {
// contains filtered or unexported fields
}
func (*UintRangeFilter) AddValidator ¶
func (f *UintRangeFilter) AddValidator(validator UintRangeValidator) *UintRangeFilter
AddValidator add a custom validator to filter
func (*UintRangeFilter) Allow ¶
func (f *UintRangeFilter) Allow(vals ...string) *UintRangeFilter
Allow allow value is a string in the specified list
func (*UintRangeFilter) LeftBetween ¶
func (f *UintRangeFilter) LeftBetween(min, max uint) *UintRangeFilter
LeftBetween valid whether left value of range is in the specified range.
func (*UintRangeFilter) LeftDefault ¶
func (f *UintRangeFilter) LeftDefault(val uint) *UintRangeFilter
LeftDefault set the default left value of range if not specified.
func (*UintRangeFilter) LeftEqual ¶
func (f *UintRangeFilter) LeftEqual(val uint) *UintRangeFilter
LeftEqual valid whether left value of range is equal to the specified value.
func (*UintRangeFilter) LeftLargerThan ¶
func (f *UintRangeFilter) LeftLargerThan(val uint) *UintRangeFilter
LeftLargerThan valid whether left value of range is larger than the specified value.
func (*UintRangeFilter) LeftMax ¶
func (f *UintRangeFilter) LeftMax(val uint) *UintRangeFilter
LeftMax valid whether left value of range is not larger than specified value.
func (*UintRangeFilter) LeftMin ¶
func (f *UintRangeFilter) LeftMin(val uint) *UintRangeFilter
LeftMin valid whether left value of range is not smaller than specified value.
func (*UintRangeFilter) LeftSmallerThan ¶
func (f *UintRangeFilter) LeftSmallerThan(val uint) *UintRangeFilter
LeftSmallerThan valid whether left value of range is smaller than the specified value.
func (*UintRangeFilter) MaxDistance ¶
func (f *UintRangeFilter) MaxDistance(val uint) *UintRangeFilter
MaxDistance valid whether the distance of range not larger than the specified value.
func (*UintRangeFilter) MinDistance ¶
func (f *UintRangeFilter) MinDistance(val uint) *UintRangeFilter
MinDistance valid whether the distance of range not smaller than the specified value.
func (*UintRangeFilter) RightBetween ¶
func (f *UintRangeFilter) RightBetween(min, max uint) *UintRangeFilter
RightBetween valid whether right value of range is in the specified range.
func (*UintRangeFilter) RightDefault ¶
func (f *UintRangeFilter) RightDefault(val uint) *UintRangeFilter
RightDefault set the default right value of range if not specified.
func (*UintRangeFilter) RightEqual ¶
func (f *UintRangeFilter) RightEqual(val uint) *UintRangeFilter
RightEqual valid whether right value of range is equal to the specified value.
func (*UintRangeFilter) RightLargerThan ¶
func (f *UintRangeFilter) RightLargerThan(val uint) *UintRangeFilter
RightLargerThan valid whether right value of range is larger than the specified value.
func (*UintRangeFilter) RightMax ¶
func (f *UintRangeFilter) RightMax(val uint) *UintRangeFilter
RightMax valid whether right value of range is not larger than specified value.
func (*UintRangeFilter) RightMin ¶
func (f *UintRangeFilter) RightMin(val uint) *UintRangeFilter
RightMin valid whether right value of range is not smaller than specified value.
func (*UintRangeFilter) RightSmallerThan ¶
func (f *UintRangeFilter) RightSmallerThan(val uint) *UintRangeFilter
RightSmallerThan valid whether right value of range is smaller than the specified value.
func (*UintRangeFilter) Run ¶
func (f *UintRangeFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type UintRangeValidator ¶
type UintSetFilter ¶
type UintSetFilter struct {
// contains filtered or unexported fields
}
func (*UintSetFilter) AddValidator ¶
func (f *UintSetFilter) AddValidator(validator UintSetValidator) *UintSetFilter
AddValidator add a custom validator to filter
func (*UintSetFilter) Allow ¶
func (f *UintSetFilter) Allow(vals ...string) *UintSetFilter
Allow allow value is a string in the specified list
func (*UintSetFilter) Base ¶
func (f *UintSetFilter) Base(base int) *UintSetFilter
Base set the base of uint. UintSetFilter interprets a string s in the given base (2 to 36) and returns the corresponding value i. If base == 0, the base is implied by the string's prefix: base 16 for "0x", base 8 for "0", and base 10 otherwise.
func (*UintSetFilter) Delimiter ¶
func (f *UintSetFilter) Delimiter(delimiter string) *UintSetFilter
Delimiter set the delimiter of set string.
func (*UintSetFilter) ItemBetween ¶
func (f *UintSetFilter) ItemBetween(min, max uint) *UintSetFilter
ItemBetween valid whether item value of set is in the specified set.
func (*UintSetFilter) ItemIn ¶
func (f *UintSetFilter) ItemIn(set []uint) *UintSetFilter
ItemIn valid item value of set should in the specified set.
func (*UintSetFilter) ItemLargerThan ¶
func (f *UintSetFilter) ItemLargerThan(val uint) *UintSetFilter
ItemLargerThan valid whether item value of set is larger than the specified value.
func (*UintSetFilter) ItemMax ¶
func (f *UintSetFilter) ItemMax(val uint) *UintSetFilter
ItemMax valid whether item value of set is not larger than specified value.
func (*UintSetFilter) ItemMin ¶
func (f *UintSetFilter) ItemMin(val uint) *UintSetFilter
ItemMin valid whether item value of set is not smaller than specified value.
func (*UintSetFilter) ItemSmallerThan ¶
func (f *UintSetFilter) ItemSmallerThan(val uint) *UintSetFilter
ItemSmallerThan valid whether item value of set is smaller than the specified value.
func (*UintSetFilter) MaxCount ¶
func (f *UintSetFilter) MaxCount(count int) *UintSetFilter
MaxCount set the max item count of set.
func (*UintSetFilter) MinCount ¶
func (f *UintSetFilter) MinCount(count int) *UintSetFilter
MinCount set the max item count of set.
func (*UintSetFilter) Run ¶
func (f *UintSetFilter) Run(paramName string, paramValue interface{}) (interface{}, *Error)
Run make the filter running.
type UintSetValidator ¶
type UintValidator ¶
Source Files ¶
- cidr.go
- default.go
- email.go
- empty2nil.go
- error.go
- filter.go
- float32.go
- float64.go
- int.go
- int32.go
- int64.go
- ip.go
- json.go
- range_int.go
- range_int32.go
- range_int64.go
- range_time.go
- range_timestamp.go
- range_uint.go
- range_uint32.go
- range_uint64.go
- required.go
- set_cidr.go
- set_email.go
- set_int.go
- set_int32.go
- set_int64.go
- set_ip.go
- set_string.go
- set_time.go
- set_timestamp.go
- set_uint.go
- set_uint32.go
- set_uint64.go
- string.go
- time.go
- timestamp.go
- uint.go
- uint32.go
- uint64.go