values

package
v0.0.0-...-e95280a Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	Create() Builder
	WithResource(res resources.Resource) Builder
	WithID(id *uuid.UUID) Builder
	WithString(stringVal string) Builder
	WithInt(intVal int) Builder
	WithFloat32(float32Val float32) Builder
	WithFloat64(float64Val float64) Builder
	WithData(data []byte) Builder
	Now() (Value, error)
}

Builder represents the value builder

func NewBuilder

func NewBuilder() Builder

NewBuilder creates a new builder instance

type Value

type Value interface {
	Resource() resources.Resource
	Content() ValueContent
}

Value represents an element's value

type ValueContent

type ValueContent interface {
	IsID() bool
	ID() *uuid.UUID
	IsString() bool
	String() *string
	IsInt() bool
	Int() *int
	IsFloat32() bool
	Float32() *float32
	IsFloat64() bool
	Float64() *float64
	IsData() bool
	Data() []byte
}

ValueContent represents the content of a value

Jump to

Keyboard shortcuts

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