ipSet

package
v1.1.68-test Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IpAddress

type IpAddress struct {
	Name    LocationLink   `json:"name" validate:"required"`
	Ip      Ipv4NoCidr     `json:"ip" validate:"required"`
	Id      string         `json:"id" validate:"required"`
	State   IpAddressState `json:"state,omitzero" validate:"required"`
	Created string         `json:"created" validate:"date,required"`
}

type IpAddressState

type IpAddressState string
const (
	IpAddressStateBound   IpAddressState = "bound"
	IpAddressStateUnbound IpAddressState = "unbound"
)

func (IpAddressState) EnumValues

func (IpAddressState) EnumValues() []string

EnumValues makes IpAddressState resolve to Joi.string().valid('bound','unbound') via the reflection Valuer registry (demonstrates the EnumValues() path; the sibling IpSetLocation.RetentionPolicy uses the `valid=` tag path instead).

type IpSet

type IpSet struct {
	Id           string       `json:"id,omitzero" validate:"uuid,readOnly"`
	Name         base.Name    `json:"name,omitzero"`
	Kind         base.Kind    `json:"kind,omitzero"`
	Version      *float64     `json:"version,omitzero" validate:"positive,integer,readOnly"`
	Description  string       `json:"description,omitzero" validate:"trim,max=250,allow="`
	Tags         IpSetTags    `json:"tags,omitzero" validate:"default={}"`
	Created      string       `json:"created,omitzero" validate:"date,readOnly"`
	LastModified string       `json:"lastModified,omitzero" validate:"date,readOnly"`
	Links        base.Links   `json:"links,omitzero" validate:"readOnly"`
	Spec         IpSetSpec    `json:"spec" validate:"required"`
	Status       *IpSetStatus `json:"status,omitzero"`
}

func (IpSet) ValidationRule

func (IpSet) ValidationRule() *validate.Rule

ValidationRule reflects IpSet (Base.keys({spec: required, status})).

type IpSetLocation

type IpSetLocation struct {
	Name            LocationLink                 `json:"name" validate:"required"`
	RetentionPolicy IpSetLocationRetentionPolicy `json:"retentionPolicy,omitzero" validate:"valid=keep|free,required"`
}

type IpSetLocationRetentionPolicy

type IpSetLocationRetentionPolicy string
const (
	IpSetLocationRetentionPolicyKeep IpSetLocationRetentionPolicy = "keep"
	IpSetLocationRetentionPolicyFree IpSetLocationRetentionPolicy = "free"
)

type IpSetSpec

type IpSetSpec struct {
	Link      WorkloadOrGvcLink `json:"link,omitzero" validate:"optional"`
	Locations []IpSetLocation   `json:"locations,omitzero"`
}

type IpSetStatus

type IpSetStatus struct {
	IpAddresses []IpAddress `json:"ipAddresses,omitzero"`
	Error       string      `json:"error,omitzero" validate:"optional"`
	Warning     string      `json:"warning,omitzero" validate:"optional"`
}

type IpSetTags

type IpSetTags = base.Tags

IpSetTags is an alias for base.Tags so the reflection base-type registry (keyed on base.Tags) resolves it to the shared TagsRule.

type Ipv4NoCidr

type Ipv4NoCidr string

Ipv4NoCidr ports `Joi.string().ip({ version: 'ipv4', cidr: 'forbidden' })`: a plain IPv4 dotted-quad with no CIDR suffix. The error message contains "ip address" to match Joi (ipSet.test.ts asserts `.toContain('ip address')`). Replaces the `custom=ipv4NoCidr` tag on IpAddress.Ip.

func (Ipv4NoCidr) ValidationRule

func (Ipv4NoCidr) ValidationRule() *validate.Rule

ValidationRule ports ipSet.ts:7 `ip({version:'ipv4', cidr:'forbidden'})`. It used to be a net.ParseIP + dot-count heuristic, which accepted the IPv4-mapped IPv6 literal ::ffff:1.2.3.4 and rejected the leading-zero octets Joi's RFC-3986 grammar allows.

type LocationLink string

LocationLink ports `LocalLink.custom(toKind('location'))`: a local link that must resolve to a resource of kind `location`. Replaces the `localLink=location` tag on IpAddress.Name and IpSetLocation.Name.

func (LocationLink) ValidationRule

func (LocationLink) ValidationRule() *validate.Rule
type WorkloadOrGvcLink string

WorkloadOrGvcLink ports `LocalLink.custom(toKind('!workload', 'gvc'))`: the spec.link target, which must point to a workload (via `!workload`) or a gvc. Replaces the `localLink=!workload|gvc` tag on IpSetSpec.Link.

func (WorkloadOrGvcLink) ValidationRule

func (WorkloadOrGvcLink) ValidationRule() *validate.Rule

Jump to

Keyboard shortcuts

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