Documentation
¶
Overview ¶
Package awgparam implements the scalar-or-range values used by the pinned AmneziaWG configuration contract.
Index ¶
- type U16Range
- func (r U16Range) High() uint16
- func (r U16Range) IsZero() bool
- func (r U16Range) Low() uint16
- func (r U16Range) MarshalJSON() ([]byte, error)
- func (r U16Range) Overlaps(other U16Range) bool
- func (r *U16Range) Scan(src any) error
- func (r U16Range) String() string
- func (r *U16Range) UnmarshalJSON(data []byte) error
- func (r U16Range) Value() (driver.Value, error)
- type U32Range
- func (r U32Range) High() uint32
- func (r U32Range) IsZero() bool
- func (r U32Range) Low() uint32
- func (r U32Range) MarshalJSON() ([]byte, error)
- func (r U32Range) Overlaps(other U32Range) bool
- func (r *U32Range) Scan(src any) error
- func (r U32Range) String() string
- func (r *U32Range) UnmarshalJSON(data []byte) error
- func (r U32Range) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type U16Range ¶
type U16Range struct {
// contains filtered or unexported fields
}
U16Range is an inclusive scalar-or-range value with uint16 endpoints. Its zero value is the scalar zero. The type is comparable so it can be used directly in reconciliation and drift comparisons.
func NewU16Range ¶
NewU16Range constructs an inclusive uint16 range.
func ParseU16Range ¶
ParseU16Range parses the canonical N or N-M syntax without accepting signs, whitespace, alternate bases, or endpoints outside uint16.
func (U16Range) MarshalJSON ¶
MarshalJSON encodes a scalar as a JSON number and a true range as a string.
func (*U16Range) Scan ¶
Scan implements sql.Scanner. It accepts legacy SQLite integers and the canonical text representation. NULL and empty text map to the zero value.
func (*U16Range) UnmarshalJSON ¶
UnmarshalJSON accepts a JSON integer or a quoted canonical scalar/range.
type U32Range ¶
type U32Range struct {
// contains filtered or unexported fields
}
U32Range is an inclusive scalar-or-range value with uint32 endpoints. Its zero value is the scalar zero. The type is comparable so it can be used directly in reconciliation and drift comparisons.
func NewU32Range ¶
NewU32Range constructs an inclusive uint32 range.
func ParseU32Range ¶
ParseU32Range parses the canonical N or N-M syntax without accepting signs, whitespace, alternate bases, or endpoints outside uint32.
func (U32Range) MarshalJSON ¶
MarshalJSON encodes a scalar as a JSON number and a true range as a string.
func (*U32Range) Scan ¶
Scan implements sql.Scanner. It accepts legacy SQLite integers and the canonical text representation. NULL and empty text map to the zero value.
func (*U32Range) UnmarshalJSON ¶
UnmarshalJSON accepts a JSON integer or a quoted canonical scalar/range.