resource

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeString  = "string"
	TypeNumber  = "number"
	TypeObject  = "object"
	TypeArray   = "array"
	TypeBoolean = "boolean"
	TypeNull    = "null"
	TypeUnknown = "unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RuleContains

type RuleContains string

func (RuleContains) Validate

func (rule RuleContains) Validate(t string, data interface{}) error

type RuleEndsNotWith

type RuleEndsNotWith string

func (RuleEndsNotWith) Validate

func (rule RuleEndsNotWith) Validate(t string, data interface{}) error

type RuleEndsWith

type RuleEndsWith string

func (RuleEndsWith) Validate

func (rule RuleEndsWith) Validate(t string, data interface{}) error

type RuleEnums

type RuleEnums []string

func (RuleEnums) Validate

func (rule RuleEnums) Validate(t string, data interface{}) error

type RuleIp

type RuleIp bool

func (RuleIp) Validate

func (rule RuleIp) Validate(t string, data interface{}) error

type RuleIpv4

type RuleIpv4 bool

func (RuleIpv4) Validate

func (rule RuleIpv4) Validate(t string, data interface{}) error

type RuleIpv6

type RuleIpv6 bool

func (RuleIpv6) Validate

func (rule RuleIpv6) Validate(t string, data interface{}) error

type RuleMatch

type RuleMatch string

func (RuleMatch) Validate

func (rule RuleMatch) Validate(t string, data interface{}) error

type RuleMax

type RuleMax int64

func (RuleMax) Validate

func (rule RuleMax) Validate(t string, data interface{}) error

type RuleMaxLength

type RuleMaxLength int

func (RuleMaxLength) Validate

func (rule RuleMaxLength) Validate(t string, data interface{}) error

type RuleMin

type RuleMin int64

func (RuleMin) Validate

func (rule RuleMin) Validate(t string, data interface{}) error

type RuleMinLength

type RuleMinLength int

func (RuleMinLength) Validate

func (rule RuleMinLength) Validate(t string, data interface{}) error

type RuleNotContains

type RuleNotContains string

func (RuleNotContains) Validate

func (rule RuleNotContains) Validate(t string, data interface{}) error

type RuleStartsNotWith

type RuleStartsNotWith string

func (RuleStartsNotWith) Validate

func (rule RuleStartsNotWith) Validate(t string, data interface{}) error

type RuleStartsWith

type RuleStartsWith string

func (RuleStartsWith) Validate

func (rule RuleStartsWith) Validate(t string, data interface{}) error

type RuleUrl

type RuleUrl bool

func (RuleUrl) Validate

func (rule RuleUrl) Validate(t string, data interface{}) error

type Validator

type Validator interface {
	Validate(string, interface{}) error
}

func NewValidator

func NewValidator(name string, value string) (Validator, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL