Documentation
¶
Index ¶
- func HasInt(s string) bool
- func IsIPRange(ip string) bool
- func IsIPv4Address(ip string) bool
- func IsIPv4AddressWithMask(data string) bool
- func IsIPv6Address(ip string) bool
- func IsIPv6AddressWithMask(data string) bool
- func IsInt(s string) bool
- type Ipv4Validator
- type Ipv6Validator
- type Result
- type ValidateChain
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsIPv4Address ¶
func IsIPv4AddressWithMask ¶
} else if validator.IsIPv4AddressWithMask(s) || validator.IsIPv6AddressWithMask(s) {
func IsIPv6Address ¶
func IsIPv6AddressWithMask ¶
Types ¶
type Ipv4Validator ¶
type Ipv4Validator struct{}
func (Ipv4Validator) Validate ¶
func (v Ipv4Validator) Validate(data map[string]interface{}) Result
type Ipv6Validator ¶
type Ipv6Validator struct{}
func (Ipv6Validator) Validate ¶
func (v Ipv6Validator) Validate(data map[string]interface{}) Result
type Result ¶
func NewValidateResult ¶
type ValidateChain ¶
type ValidateChain struct {
Chain []Validator
// contains filtered or unexported fields
}
func NewValidateChain ¶
func NewValidateChain() *ValidateChain
func (*ValidateChain) Add ¶
func (vc *ValidateChain) Add(validator Validator)
func (*ValidateChain) StopOnError ¶
func (vc *ValidateChain) StopOnError() *ValidateChain
func (*ValidateChain) Validate ¶
func (vc *ValidateChain) Validate(data map[string]interface{}) Result
Click to show internal directories.
Click to hide internal directories.