items

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: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Int64Max is the maximum value of int64; exported for test cases
	Int64Max = 9223372036854775807

	// Int64MaxStr the maximum value of a signed 64-bit integer as a string constant.
	Int64MaxStr = "9223372036854775807"
)

Variables

View Source
var NewItemBool = util.JsonInitializer(func() iface.ConfigValueItem {
	return itemBoolFalse.DeepCopy()
})

NewItemBool decodes json bytes into a newly allocated ItemBool object

View Source
var NewItemInt64 = util.JsonInitializer(func() iface.ConfigValueItem {
	return ItemInt64Iface(0)
})

NewItemInt64 decodes json bytes into a newly allocated ItemInt64 object

View Source
var NewItemPair = util.JsonInitializer(func() iface.ConfigValueItem {
	return &ItemPair{}
})

NewItemPair decodes json bytes into a new ItemPair object

View Source
var NewItemString = util.JsonInitializer(func() iface.ConfigValueItem {
	return ItemStringIface("")
})

NewItemString decodes json bytes into a newly allocated ItemString object

Functions

func CopyDefaultItemInt64

func CopyDefaultItemInt64() iface.ConfigValueItem

CopyDefaultItemInt64 returns a copy of the default configuration value item.

func CopyDefaultItemPair

func CopyDefaultItemPair() iface.ConfigValueItem

func CopyDefaultItemString

func CopyDefaultItemString() iface.ConfigValueItem

CopyDefaultItemString returns a copy of the default configuration value item.

func CopyItemBoolFalse

func CopyItemBoolFalse() iface.ConfigValueItem

func CopyItemBoolTrue

func CopyItemBoolTrue() iface.ConfigValueItem

func ItemInt64Iface

func ItemInt64Iface(v int64) iface.ConfigValueItem

ItemInt64Iface returns a ConfigValueItem with an int64 value.

func ItemStringIface

func ItemStringIface(v string) iface.ConfigValueItem

ItemStringIface returns a ConfigValueItem with a string value.

Types

type ItemBool

type ItemBool bool

ItemBool is an alias of bool implementing iface.ConfigValueItem

func (*ItemBool) DeepCopy

func (i *ItemBool) DeepCopy() iface.ConfigValueItem

DeepCopy creates a new copy of ItemBool implementing the ConfigValueItem interface.

func (*ItemBool) EqualsTo

func (i *ItemBool) EqualsTo(item iface.ConfigValueItem) bool

EqualsTo determines if the ItemBool is equal to the given ConfigValueItem.

func (*ItemBool) Value

func (i *ItemBool) Value() bool

Value returns the underlying bool value

type ItemInt64

type ItemInt64 int64

ItemInt64 is an alias of int64 implementing iface.ConfigValueItem

func (*ItemInt64) DeepCopy

func (i *ItemInt64) DeepCopy() iface.ConfigValueItem

DeepCopy creates a new copy of ItemInt64 implementing the ConfigValueItem interface.

func (*ItemInt64) EqualsTo

func (i *ItemInt64) EqualsTo(item iface.ConfigValueItem) bool

EqualsTo determines if the ItemInt64 is equal to the given ConfigValueItem.

func (*ItemInt64) Value

func (i *ItemInt64) Value() int64

Value returns the int64 value of the ItemInt64.

type ItemPair

type ItemPair struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

ItemPair is a struct that represents a key-value pair

func (*ItemPair) DeepCopy

func (i *ItemPair) DeepCopy() iface.ConfigValueItem

DeepCopy creates a deep copy of the ItemPair struct to eliminate any references to the original data.

func (*ItemPair) EqualsTo

func (i *ItemPair) EqualsTo(item iface.ConfigValueItem) bool

EqualsTo checks if the current ItemPair is equal to the given ConfigValueItem.

type ItemString

type ItemString string

ItemString is an alias of string implementing iface.ConfigValueItem

func (*ItemString) DeepCopy

func (i *ItemString) DeepCopy() iface.ConfigValueItem

DeepCopy creates a new copy of ItemString implementing the ConfigValueItem interface.

func (*ItemString) EqualsTo

func (i *ItemString) EqualsTo(item iface.ConfigValueItem) bool

EqualsTo determines if the ItemString is equal to the given ConfigValueItem.

func (*ItemString) Value

func (i *ItemString) Value() string

Value returns the underlying string value

Jump to

Keyboard shortcuts

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