builder

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmptyString = `""`
)

Variables

View Source
var (
	EMPTY = PureString("")

	NullValue = null()
)

Functions

func Array

func Array(items []Interfacable) *arrayField

func Bool

func Bool(value bool) *boolField

func Number added in v1.0.0

func Number(value float64) *number

func Object

func Object(values map[string]Interfacable) *objectField

func PureString

func PureString(value string) *pureStringField

func Static

func Static(cfg *StaticCfg) *static

func String

func String(value string, trim ...bool) *stringField

Types

type Interfacable added in v1.0.0

type Interfacable interface {
	Jsonable

	ToInterface() interface{}
}

func ToJsonable added in v1.0.0

func ToJsonable(raw json.RawMessage) Interfacable

func ToJsonableFromString added in v1.0.3

func ToJsonableFromString(str string) Interfacable

type Jsonable

type Jsonable interface {
	ToJson() string
	IsEmpty() bool
	Raw() json.RawMessage
}

type StaticCfg added in v1.0.6

type StaticCfg struct {
	Type  config.FieldType `yaml:"type" json:"type"`
	Value string           `json:"value" yaml:"value"`
}

Jump to

Keyboard shortcuts

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