Documentation
¶
Index ¶
- type ConfigValueImpl
- func (c *ConfigValueImpl) DeepCopy() iface.ConfigValue
- func (c *ConfigValueImpl) EqualsTo(other iface.ConfigValue) bool
- func (c *ConfigValueImpl) GetItem(itemType iface.ItemType) (iface.ConfigValueItem, error)
- func (c *ConfigValueImpl) GetItemOrDefault(itemType iface.ItemType, defaultItem iface.ConfigValueItem) iface.ConfigValueItem
- func (c *ConfigValueImpl) MarshalJSON() ([]byte, error)
- func (c *ConfigValueImpl) SetItem(itemType iface.ItemType, item iface.ConfigValueItem) *ConfigValueImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigValueImpl ¶
type ConfigValueImpl struct {
// contains filtered or unexported fields
}
ConfigValueImpl is a struct that represents a collection of configuration values
func NewConfigValueImpl ¶
func NewConfigValueImpl(items map[iface.ItemType]iface.ConfigValueItem) *ConfigValueImpl
NewConfigValueImpl returns a new instance of ConfigValueImpl with the given items as input.
func (*ConfigValueImpl) DeepCopy ¶
func (c *ConfigValueImpl) DeepCopy() iface.ConfigValue
DeepCopy creates a deep copy of the ConfigValueImpl struct implementing the ConfigValue interface.
func (*ConfigValueImpl) EqualsTo ¶
func (c *ConfigValueImpl) EqualsTo(other iface.ConfigValue) bool
EqualsTo checks whether the current ConfigValue is equal to the other ConfigValue.
func (*ConfigValueImpl) GetItem ¶
func (c *ConfigValueImpl) GetItem(itemType iface.ItemType) (iface.ConfigValueItem, error)
GetItem returns the item of the given type; if not found, returns iface.ErrItemNotFound
func (*ConfigValueImpl) GetItemOrDefault ¶
func (c *ConfigValueImpl) GetItemOrDefault(itemType iface.ItemType, defaultItem iface.ConfigValueItem) iface.ConfigValueItem
GetItemOrDefault returns the item of a given type, or the default item if not found.
func (*ConfigValueImpl) MarshalJSON ¶
func (c *ConfigValueImpl) MarshalJSON() ([]byte, error)
MarshalJSON to implement the json.Marshaler interface.
func (*ConfigValueImpl) SetItem ¶
func (c *ConfigValueImpl) SetItem(itemType iface.ItemType, item iface.ConfigValueItem) *ConfigValueImpl
SetItem sets the value of a configuration item for a ConfigValueImpl instance.