zdict

package
v0.0.0-...-9e2b535 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: BSD-3-Clause Imports: 13 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AssertFunc func(success bool, parts ...any)

Functions

This section is empty.

Types

type Dict

type Dict map[string]any

func FromShallowMap

func FromShallowMap(m map[string]any) Dict

func FromString

func FromString(str, assigner, separator string) Dict

func FromStruct

func FromStruct(structure any, lowerFirst bool) Dict

func FromURLValues

func FromURLValues(values url.Values) Dict

func (Dict) AsShallowMap

func (d Dict) AsShallowMap() map[string]any

func (Dict) AsString

func (d Dict) AsString(assigner, separator string) string

func (Dict) AsURLParameters

func (d Dict) AsURLParameters() string

func (Dict) Copy

func (d Dict) Copy() Dict

func (Dict) Dump

func (d Dict) Dump()

func (Dict) GetItems

func (d Dict) GetItems() Items

func (Dict) Join

func (d Dict) Join(equal, sep string) string

func (Dict) Keys

func (d Dict) Keys() []string

func (*Dict) MergeIn

func (d *Dict) MergeIn(in Dict)

func (Dict) RemoveAll

func (d Dict) RemoveAll()

func (*Dict) Scan

func (d *Dict) Scan(val any) error

func (Dict) SortedKeys

func (d Dict) SortedKeys() []string

func (Dict) ToStruct

func (d Dict) ToStruct(structPtr any)

func (Dict) ToURLValues

func (d Dict) ToURLValues() url.Values

func (Dict) URL

func (d Dict) URL(prefix string) string

func (Dict) Value

func (d Dict) Value() (driver.Value, error)

func (Dict) Values

func (d Dict) Values() []any

func (Dict) WriteTabulated

func (d Dict) WriteTabulated(w io.Writer)

type Item

type Item struct {
	Name  string
	Value any
}

func (Item) Equal

func (item Item) Equal(to Item) bool

func (Item) GetName

func (item Item) GetName() string

type ItemGetter

type ItemGetter interface {
	GetItem() Item
}

type Items

type Items []Item

func ItemsFromRowGetterSlice

func ItemsFromRowGetterSlice(slice any) *Items

func (*Items) Add

func (d *Items) Add(name string, value any)

func (*Items) AddAtStart

func (d *Items) AddAtStart(name string, value any)

func (Items) Count

func (d Items) Count() int

func (*Items) Empty

func (i *Items) Empty()

func (Items) Equal

func (items Items) Equal(to Items) bool

func (Items) FindName

func (d Items) FindName(name string) *Item

func (Items) FindValue

func (d Items) FindValue(v any) *Item

func (Items) GetItem

func (d Items) GetItem(i int) (id, name string, value any)

GetItem get's an item at index i. Used to be compliant with NamedValues interface

func (*Items) RemoveAll

func (d *Items) RemoveAll()

type ItemsGetter

type ItemsGetter interface {
	GetItems() Items
}

Jump to

Keyboard shortcuts

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