value

package
v0.12.0-a.3 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package value defines the recursive value representation stored in plans and state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kind

type Kind string
const (
	KindAbsent  Kind = "absent"
	KindNull    Kind = "null"
	KindBoolean Kind = "boolean"
	KindString  Kind = "string"
	KindInteger Kind = "integer"
	KindNumber  Kind = "number"
	KindList    Kind = "list"
	KindMap     Kind = "map"
	KindObject  Kind = "object"
	KindPending Kind = "pending"
)

type Value

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

func Absent

func Absent() Value

func Boolean

func Boolean(v bool) Value

func Decode

func Decode(data []byte) (Value, error)

func Integer

func Integer(v int64) Value

func List

func List(items []Value) (Value, error)

func Map

func Map(entries map[string]Value) (Value, error)

func Null

func Null() Value

func Number

func Number(v float64) (Value, error)

func Object

func Object(fields map[string]Value) (Value, error)

func Pending

func Pending(refs []string) (Value, error)

func String

func String(v string) Value

func (Value) Boolean

func (v Value) Boolean() (bool, bool)

func (Value) HasPending

func (v Value) HasPending() bool

func (Value) Integer

func (v Value) Integer() (int64, bool)

func (Value) Items

func (v Value) Items() ([]Value, bool)

func (Value) Kind

func (v Value) Kind() Kind

func (Value) MapEntries

func (v Value) MapEntries() (map[string]Value, bool)

func (Value) MarshalJSON

func (v Value) MarshalJSON() ([]byte, error)

func (Value) Number

func (v Value) Number() (float64, bool)

func (Value) ObjectFields

func (v Value) ObjectFields() (map[string]Value, bool)

func (Value) PendingRefs

func (v Value) PendingRefs() ([]string, bool)

func (Value) String

func (v Value) String() (string, bool)

func (*Value) UnmarshalJSON

func (v *Value) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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