dynamic_objects

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract

func Extract(obj any, paths []string, delimiter string) (any, error)

func Fingerprint

func Fingerprint(obj any, paths []string, delimiter string) (any, string, error)

func GetPropertyByPath

func GetPropertyByPath(obj any, path string, delimiter string) (any, error)

func IsSubset

func IsSubset(subset any, superset any, matchValues bool) bool

func ObjectToString

func ObjectToString(obj any) string

func Pivot

func Pivot(obj any) [][]string

func PivotAndJoinPaths

func PivotAndJoinPaths(obj any, delimiter string) []string

func PivotToMap

func PivotToMap(obj any, delimiter string) map[string]any

func SetPropertyByPath

func SetPropertyByPath(obj map[string]any, path string, delimiter string, newProperty any, createIfMissing bool)

Types

type Field

type Field struct {
	Name           string
	Value          any
	ReflectedValue reflect.Value
	ReflectedType  reflect.Type
	Children       []*Field
}

func GetAllFields

func GetAllFields(obj any) []*Field

func GetFields

func GetFields(obj any) []*Field

type Matcher

type Matcher[O any] interface {
	Match(candidate any, matchValues bool) bool
	Owner() O
}

func NewMatcher

func NewMatcher[O any](fields any, delimiter string, owner O) Matcher[O]

type Stringable

type Stringable interface {
	String() string
}

Jump to

Keyboard shortcuts

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