graph

package
v0.0.0-...-07041ec Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HttpClient = http.Client{Timeout: time.Duration(1) * time.Second}

TODO: Remove global variable

Functions

func ApplyDefault

func ApplyDefault(node *Node) error

func LoadExternalResource

func LoadExternalResource(n *Node) error

func MarshalJSON

func MarshalJSON(n *Node) ([]byte, error)

Types

type Lookup

type Lookup struct {
	// contains filtered or unexported fields
}

func (Lookup) Empty

func (l Lookup) Empty() bool

func (Lookup) First

func (l Lookup) First() *Node

func (Lookup) Get

func (l Lookup) Get(index int) *Node

func (Lookup) List

func (l Lookup) List() []*Node

type Node

type Node struct {
	// contains filtered or unexported fields
}

func FromFile

func FromFile(path string) (*Node, []byte, error)

func FromJSONSource

func FromJSONSource(fileBytes []byte) (*Node, []byte, error)

func FromYAMLSource

func FromYAMLSource(source []byte) (*Node, []byte, error)

func NewNode

func NewNode() *Node

func UnmarshalJSON

func UnmarshalJSON(data []byte) (*Node, error)

func (*Node) Clear

func (n *Node) Clear() *Node

func (*Node) Edge

func (n *Node) Edge(name string) *Node

func (*Node) Edges

func (n *Node) Edges() map[string]*Node

func (*Node) GetFloat

func (n *Node) GetFloat() float32

func (*Node) GetInt

func (n *Node) GetInt() int

func (*Node) GetString

func (n *Node) GetString() string

func (*Node) HasValue

func (n *Node) HasValue() bool

func (*Node) Index

func (n *Node) Index(i int) (string, *Node)

func (*Node) IsList

func (n *Node) IsList() bool

func (*Node) List

func (n *Node) List(list bool)

func (*Node) Lookup

func (n *Node) Lookup(path string) Lookup

func (*Node) MarshalJSON

func (n *Node) MarshalJSON() ([]byte, error)

func (*Node) Parent

func (n *Node) Parent() *Node

func (*Node) SetBool

func (n *Node) SetBool(value bool) *Node

func (*Node) SetFloat

func (n *Node) SetFloat(value float32) *Node

func (*Node) SetInt

func (n *Node) SetInt(value int) *Node

func (*Node) SetString

func (n *Node) SetString(value string) *Node

func (*Node) UnmarshalJSON

func (n *Node) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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