Documentation ¶
Index ¶
- type Properties
- func (pp *Properties) Add(key string, value any)
- func (pp Properties) AsMap() map[string]any
- func (pp Properties) Equal(target Properties) bool
- func (pp Properties) Get(key string) (any, bool)
- func (pp Properties) Has(key string) bool
- func (pp Properties) MarshalJSON() ([]byte, error)
- func (pp Properties) MarshalYAML() (any, error)
- func (pp *Properties) Set(key string, value any)
- func (pp *Properties) UnmarshalJSON(data []byte) error
- func (pp *Properties) UnmarshalYAML(node *yaml.Node) error
- type Property
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Properties ¶
type Properties []Property
Properties list.
func (Properties) AsMap ¶
func (pp Properties) AsMap() map[string]any
AsMap output. It will merge properties with the same key into a slice.
func (Properties) Equal ¶
func (pp Properties) Equal(target Properties) bool
func (Properties) Get ¶
func (pp Properties) Get(key string) (any, bool)
Get property by its key insensitively.
func (Properties) MarshalJSON ¶
func (pp Properties) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler interface to marshall a sorted list of properties into an object.
func (Properties) MarshalYAML ¶
func (pp Properties) MarshalYAML() (any, error)
MarshalYAML implements yaml.Marshaler interface to marshall a sorted list of properties into an object.
func (*Properties) Set ¶
func (pp *Properties) Set(key string, value any)
Set property. If it exists (case-insensitive) it will override it, otherwise it will just add it.
func (*Properties) UnmarshalJSON ¶
func (pp *Properties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler interface to unmarshal an object into a sorted list of properties.
func (*Properties) UnmarshalYAML ¶
func (pp *Properties) UnmarshalYAML(node *yaml.Node) error
UnmarshalYAML implements yaml.Unmarshaler interface to unmarshal an object into a sorted list of properties.