types

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map[K comparable, V any] struct {
	MapComparable[Map[K, V]]
	_interface.Assigner
	iterator.MapIndexer[K, V]
	// contains filtered or unexported fields
}

Map is a map of K to V. We don't restrict the type K to MapComparable[Map[K, V]] because K might be type of string, int or multiple primary type.

func (*Map[K, V]) Assign

func (m *Map[K, V]) Assign(e *xml.Element) error

func (*Map[K, V]) Capacity

func (m *Map[K, V]) Capacity() int

func (*Map[K, V]) CountValidatedField

func (m *Map[K, V]) CountValidatedField() int

func (*Map[K, V]) Get

func (m *Map[K, V]) Get(key K) V

func (*Map[K, V]) GetAttributes

func (m *Map[K, V]) GetAttributes() attributes.Attributes

func (*Map[K, V]) GetFromIndex

func (m *Map[K, V]) GetFromIndex(idx int) V

func (*Map[K, V]) GetKeyFromIndex

func (m *Map[K, V]) GetKeyFromIndex(idx int) K

func (*Map[K, V]) GetPath

func (m *Map[K, V]) GetPath() string

func (*Map[K, V]) GetXMLTag

func (m *Map[K, V]) GetXMLTag() []byte

func (*Map[K, V]) IsValidField

func (m *Map[K, V]) IsValidField(_ string) bool

func (*Map[K, V]) Iterator

func (m *Map[K, V]) Iterator() *iterator.MapIterator[K, V]

func (*Map[K, V]) Set

func (m *Map[K, V]) Set(key K, value V)

func (*Map[K, V]) SetAttributes

func (m *Map[K, V]) SetAttributes(_ attributes.Attributes)

func (*Map[K, V]) TransformToXML

func (m *Map[K, V]) TransformToXML(b *saver.Buffer) error

func (*Map[K, V]) ValidateField

func (m *Map[K, V]) ValidateField(_ string)

type MapComparable

type MapComparable[T any] interface {
	Less(key reflect.Value, other T) bool
	Equal(key reflect.Value, other T) bool
	Great(key reflect.Value, other T) bool
}

type Pair

type Pair[K comparable, V any] struct {
	Key   K
	Value V
}

func (*Pair[K, V]) Equal

func (p *Pair[K, V]) Equal(rhs *Pair[K, V]) bool

type Slice

type Slice[T any] struct {
	// contains filtered or unexported fields
}

Slice is a slice of data that is represented by sliceData. The main difference with a normal slice is that it can get and set attributes. Like a normal slice, the slice is a slice of T and you can iterate over it.

func (*Slice[T]) Add

func (s *Slice[T]) Add(value T, attr attributes.Attributes)

func (*Slice[T]) Assign

func (s *Slice[T]) Assign(e *xml.Element) error

func (*Slice[T]) At

func (s *Slice[T]) At(idx int) T

func (*Slice[T]) Capacity

func (s *Slice[T]) Capacity() int

func (*Slice[T]) CountValidatedField

func (s *Slice[T]) CountValidatedField() int

func (*Slice[T]) GetAttributes

func (s *Slice[T]) GetAttributes() attributes.Attributes

func (*Slice[T]) GetPath

func (s *Slice[T]) GetPath() string

func (*Slice[T]) GetXMLTag

func (s *Slice[T]) GetXMLTag() []byte

func (*Slice[T]) IsValidField

func (s *Slice[T]) IsValidField(_ string) bool

func (*Slice[T]) Remove

func (s *Slice[T]) Remove(idx int)

func (*Slice[T]) Reset

func (s *Slice[T]) Reset()

func (*Slice[T]) Set

func (s *Slice[T]) Set(value T, attr attributes.Attributes, idx int)

func (*Slice[T]) SetAttributes

func (s *Slice[T]) SetAttributes(attributes attributes.Attributes)

func (*Slice[T]) String

func (s *Slice[T]) String() string

func (*Slice[T]) TransformToXML

func (s *Slice[T]) TransformToXML(b *saver.Buffer) error

func (*Slice[T]) ValidateField

func (s *Slice[T]) ValidateField(_ string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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