Documentation ¶
Overview ¶
Package views provides read-only accessors for commonly used value types.
Index ¶
- type IPPrefixSlice
- func (v IPPrefixSlice) AppendTo(dst []netaddr.IPPrefix) []netaddr.IPPrefix
- func (v IPPrefixSlice) AsSlice() []netaddr.IPPrefix
- func (v IPPrefixSlice) At(i int) netaddr.IPPrefix
- func (v IPPrefixSlice) ContainsFunc(f func(netaddr.IPPrefix) bool) bool
- func (v IPPrefixSlice) ContainsIP(ip netaddr.IP) bool
- func (v IPPrefixSlice) IsNil() bool
- func (v IPPrefixSlice) Len() int
- func (v IPPrefixSlice) MarshalJSON() ([]byte, error)
- func (v *IPPrefixSlice) UnmarshalJSON(b []byte) error
- type StringSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPPrefixSlice ¶
type IPPrefixSlice struct {
// contains filtered or unexported fields
}
IPPrefixSlice is a read-only accessor for a slice of netaddr.IPPrefix.
func IPPrefixSliceOf ¶
func IPPrefixSliceOf(x []netaddr.IPPrefix) IPPrefixSlice
IPPrefixSliceOf returns a IPPrefixSlice for the provided slice.
func (IPPrefixSlice) AppendTo ¶
func (v IPPrefixSlice) AppendTo(dst []netaddr.IPPrefix) []netaddr.IPPrefix
Append appends the underlying slice values to dst.
func (IPPrefixSlice) AsSlice ¶
func (v IPPrefixSlice) AsSlice() []netaddr.IPPrefix
AsSlice returns a copy of underlying slice.
func (IPPrefixSlice) At ¶
func (v IPPrefixSlice) At(i int) netaddr.IPPrefix
At returns the IPPrefix at index `i` of the slice.
func (IPPrefixSlice) ContainsFunc ¶
func (v IPPrefixSlice) ContainsFunc(f func(netaddr.IPPrefix) bool) bool
PrefixesContainsFunc reports whether f is true for any IPPrefix in the slice.
func (IPPrefixSlice) ContainsIP ¶
func (v IPPrefixSlice) ContainsIP(ip netaddr.IP) bool
PrefixesContainsIP reports whether any IPPrefix contains IP.
func (IPPrefixSlice) IsNil ¶
func (v IPPrefixSlice) IsNil() bool
IsNil reports whether the underlying slice is nil.
func (IPPrefixSlice) MarshalJSON ¶
func (v IPPrefixSlice) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*IPPrefixSlice) UnmarshalJSON ¶
func (v *IPPrefixSlice) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type StringSlice ¶
type StringSlice struct {
// contains filtered or unexported fields
}
StringSlice is a read-only accessor for a slice of strings.
func StringSliceOf ¶
func StringSliceOf(x []string) StringSlice
StringSliceOf returns a StringSlice for the provided slice.
func (StringSlice) AppendTo ¶
func (v StringSlice) AppendTo(dst []string) []string
AppendTo appends the underlying slice values to dst.
func (StringSlice) AsSlice ¶
func (v StringSlice) AsSlice() []string
AsSlice returns a copy of underlying slice.
func (StringSlice) At ¶
func (v StringSlice) At(i int) string
At returns the string at index `i` of the slice.
func (StringSlice) IsNil ¶
func (v StringSlice) IsNil() bool
IsNil reports whether the underlying slice is nil.
func (StringSlice) MarshalJSON ¶
func (v StringSlice) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*StringSlice) UnmarshalJSON ¶
func (v *StringSlice) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.