configvalue

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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