configvalue

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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