builder

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 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 Null

func Null() *null

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 *config.StaticGeneratedFieldConfig) *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

type Jsonable

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

Jump to

Keyboard shortcuts

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