values

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPRange

type IPRange struct {
	Type   IPRangeType
	CIDR   *net.IPNet
	IPFrom net.IP
	IPTo   net.IP
}

func (*IPRange) Contains

func (this *IPRange) Contains(netIP net.IP) bool

type IPRangeList

type IPRangeList struct {
	Ranges []*IPRange
}

func NewIPRangeList

func NewIPRangeList() *IPRangeList

func ParseIPRangeList

func ParseIPRangeList(value string) *IPRangeList

func (*IPRangeList) Contains

func (this *IPRangeList) Contains(ip string) bool

type IPRangeType

type IPRangeType = string
const (
	IPRangeTypeCIDR    IPRangeType = "cidr"     // CIDR
	IPRangeTypeSingeIP IPRangeType = "singleIP" // 单个IP
	IPRangeTypeRange   IPRangeType = "range"    // IP范围,IP1-IP2
)

type NumberList

type NumberList struct {
	ValueMap map[float64]zero.Zero
}

func NewNumberList

func NewNumberList() *NumberList

func ParseNumberList

func ParseNumberList(v string) *NumberList

func (*NumberList) Contains

func (this *NumberList) Contains(f float64) bool

type StringList

type StringList struct {
	ValueMap        map[string]zero.Zero
	CaseInsensitive bool
}

func NewStringList

func NewStringList(caseInsensitive bool) *StringList

func ParseStringList

func ParseStringList(v string, caseInsensitive bool) *StringList

func (*StringList) Contains

func (this *StringList) Contains(f string) bool

Jump to

Keyboard shortcuts

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