data

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

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToMapInterface

func ToMapInterface(obj interface{}) (map[string]interface{}, error)

Types

type GenericMap

type GenericMap struct {
	// +optional
	Data map[string]any `json:"-"`
}

func Mapify

func Mapify(data any) (GenericMap, error)

func NewGenericMap

func NewGenericMap(data map[string]any) *GenericMap

func (GenericMap) DeepCopy

func (in GenericMap) DeepCopy() GenericMap

func (*GenericMap) DeepCopyInto

func (in *GenericMap) DeepCopyInto(out *GenericMap)

func (*GenericMap) GetData

func (g *GenericMap) GetData() map[string]any

GetData returns the underlying map[string]any and nil if the GenericMap is nil.

func (*GenericMap) MarshalJSON

func (g *GenericMap) MarshalJSON() ([]byte, error)

MarshalJSON may get called on pointers or values, so implement MarshalJSON on value.

func (*GenericMap) Merge

func (g *GenericMap) Merge(from *GenericMap) *GenericMap

Merge merges the given map into this map, returning a new map, leaving the original unchanged.

func (GenericMap) OpenAPIDefinition

func (GenericMap) OpenAPIDefinition() common.OpenAPIDefinition

func (*GenericMap) UnmarshalJSON

func (g *GenericMap) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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