metadata

package
v0.0.0-...-7e20739 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	Elements []MetadataElement
}

Metadata is a basic map that can be used by any graph object

func (*Metadata) AddElement

func (m *Metadata) AddElement(name string, raw any)

AddElement adds an element to the metadata elements list This can be used in the API or in the json Unmarshall function

func (Metadata) MarshalJSON

func (m Metadata) MarshalJSON() ([]byte, error)

func (*Metadata) UnmarshalJSON

func (m *Metadata) UnmarshalJSON(data []byte) error

type MetadataElement

type MetadataElement struct {
	Name    string
	Value   string
	IsValue bool

	// Handle generic interface
	InterfaceValue any
	IsInterface    bool

	IntValue int32
	IsInt    bool

	BoolValue bool
	IsBool    bool
}

Jump to

Keyboard shortcuts

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