zed21

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxColumns     = 100_000
	MaxEnumSymbols = 100_000
	MaxUnionTypes  = 100_000
)
View Source
const (
	IDUint8    = 0
	IDUint16   = 1
	IDUint32   = 2
	IDUint64   = 3
	IDInt8     = 4
	IDInt16    = 5
	IDInt32    = 6
	IDInt64    = 7
	IDDuration = 8
	IDTime     = 9
	IDFloat16  = 10
	IDFloat32  = 11
	IDFloat64  = 12
	IDDecimal  = 13
	IDBool     = 14
	IDBytes    = 15
	IDString   = 16
	IDBstring  = 17
	IDIP       = 18
	IDNet      = 19
	IDType     = 20
	IDError    = 21
	IDNull     = 22

	IDTypeDef = 23 // 0x17

	IDTypeName   = 24 // 0x18
	IDTypeRecord = 25 // 0x19
	IDTypeArray  = 26 // 0x20
	IDTypeSet    = 27 // 0x21
	IDTypeUnion  = 28 // 0x22
	IDTypeEnum   = 29 // 0x23
	IDTypeMap    = 30 // 0x24
)
View Source
const (
	CtrlValueEscape   = 0xf5
	TypeDefRecord     = 0xf6
	TypeDefArray      = 0xf7
	TypeDefSet        = 0xf8
	TypeDefUnion      = 0xf9
	TypeDefEnum       = 0xfa
	TypeDefMap        = 0xfb
	TypeDefNamed      = 0xfc
	CtrlCompressed    = 0xfd
	CtrlAppMessage    = 0xfe
	CtrlEOS           = 0xff
	AppEncodingZNG    = 0
	AppEncodingJSON   = 1
	AppEncodingZSON   = 2
	AppEncodingString = 3
	AppEncodingBinary = 4
)

Variables

View Source
var (
	ErrNotArray      = errors.New("cannot index a non-array")
	ErrIndex         = errors.New("array index out of bounds")
	ErrUnionSelector = errors.New("union selector out of bounds")
	ErrEnumIndex     = errors.New("enum index out of bounds")
)
View Source
var (
	TypeUint8    = &TypeOfUint8{}
	TypeUint16   = &TypeOfUint16{}
	TypeUint32   = &TypeOfUint32{}
	TypeUint64   = &TypeOfUint64{}
	TypeInt8     = &TypeOfInt8{}
	TypeInt16    = &TypeOfInt16{}
	TypeInt32    = &TypeOfInt32{}
	TypeInt64    = &TypeOfInt64{}
	TypeDuration = &TypeOfDuration{}
	TypeTime     = &TypeOfTime{}
	// XXX add TypeFloat16
	TypeFloat32 = &TypeOfFloat32{}
	TypeFloat64 = &TypeOfFloat64{}
	// XXX add TypeDecimal
	TypeBool    = &TypeOfBool{}
	TypeBytes   = &TypeOfBytes{}
	TypeString  = &TypeOfString{}
	TypeBstring = &TypeOfBstring{}
	TypeIP      = &TypeOfIP{}
	TypeNet     = &TypeOfNet{}
	TypeType    = &TypeOfType{}
	TypeError   = &TypeOfError{}
	TypeNull    = &TypeOfNull{}
)
View Source
var (
	NullUint8    = &Value{Type: TypeUint8}
	NullUint16   = &Value{Type: TypeUint16}
	NullUint32   = &Value{Type: TypeUint32}
	NullUint64   = &Value{Type: TypeUint64}
	NullInt8     = &Value{Type: TypeInt8}
	NullInt16    = &Value{Type: TypeInt16}
	NullInt32    = &Value{Type: TypeInt32}
	NullInt64    = &Value{Type: TypeInt64}
	NullDuration = &Value{Type: TypeDuration}
	NullTime     = &Value{Type: TypeTime}
	NullFloat32  = &Value{Type: TypeFloat32}
	NullFloat64  = &Value{Type: TypeFloat64}
	NullBool     = &Value{Type: TypeBool}
	NullBytes    = &Value{Type: TypeBytes}
	NullString   = &Value{Type: TypeString}
	NullIP       = &Value{Type: TypeIP}
	NullNet      = &Value{Type: TypeNet}
	NullType     = &Value{Type: TypeType}
	Null         = &Value{Type: TypeNull}
)
View Source
var ErrMissing = errors.New("missing")

ErrMissing is a Go error that implies a missing value in the runtime logic whereas Missing is a Zed error value that represents a missing value embedded in the dataflow computation.

View Source
var ErrTypeSyntax = errors.New("syntax error parsing type string")
View Source
var False = &Value{TypeBool, []byte{0}}
View Source
var Missing = &Value{TypeError, zcode.Bytes("missing")}

Missing is value that represents an error condition arising from a referenced entity not present, e.g., a reference to a non-existent record field, a map lookup for a key not present, an array index that is out of range, etc. The Missing error can be propagated through functions and expressions and each operator has clearly defined semantics with respect to the Missing value. For example, "true AND MISSING" is MISSING.

View Source
var Quiet = &Value{TypeError, zcode.Bytes("quiet")}
View Source
var True = &Value{TypeBool, []byte{1}}

Functions

func AppendBool

func AppendBool(zb zcode.Bytes, b bool) zcode.Bytes

func AppendDuration

func AppendDuration(bytes zcode.Bytes, d nano.Duration) zcode.Bytes

func AppendFloat32

func AppendFloat32(zb zcode.Bytes, f float32) zcode.Bytes

func AppendFloat64

func AppendFloat64(zb zcode.Bytes, d float64) zcode.Bytes

func AppendIP

func AppendIP(zb zcode.Bytes, a net.IP) zcode.Bytes

func AppendInt

func AppendInt(bytes zcode.Bytes, i int64) zcode.Bytes

func AppendNet

func AppendNet(zb zcode.Bytes, subnet *net.IPNet) zcode.Bytes

func AppendTime

func AppendTime(bytes zcode.Bytes, t nano.Ts) zcode.Bytes

func AppendUint

func AppendUint(bytes zcode.Bytes, i uint64) zcode.Bytes

func ContainedType

func ContainedType(typ Type) (Type, []Column)

ContainedType returns the inner type for set and array types in the first return value and the columns of its of type for record types in the second return value. ContainedType returns nil for both return values if the type is not a set, array, or record.

func DecodeBool

func DecodeBool(zv zcode.Bytes) (bool, error)

func DecodeBytes

func DecodeBytes(zv zcode.Bytes) ([]byte, error)

func DecodeDuration

func DecodeDuration(zv zcode.Bytes) (nano.Duration, error)

func DecodeError

func DecodeError(zv zcode.Bytes) (error, error)

func DecodeFloat

func DecodeFloat(zb zcode.Bytes) (float64, error)

func DecodeFloat32

func DecodeFloat32(zb zcode.Bytes) (float32, error)

func DecodeFloat64

func DecodeFloat64(zv zcode.Bytes) (float64, error)

func DecodeIP

func DecodeIP(zv zcode.Bytes) (net.IP, error)

func DecodeInt

func DecodeInt(zv zcode.Bytes) (int64, error)

func DecodeNet

func DecodeNet(zv zcode.Bytes) (*net.IPNet, error)

func DecodeString

func DecodeString(zv zcode.Bytes) (string, error)

func DecodeTime

func DecodeTime(zv zcode.Bytes) (nano.Ts, error)

func DecodeUint

func DecodeUint(zv zcode.Bytes) (uint64, error)

func EncodeBool

func EncodeBool(b bool) zcode.Bytes

func EncodeBytes

func EncodeBytes(b []byte) zcode.Bytes

func EncodeDuration

func EncodeDuration(d nano.Duration) zcode.Bytes

func EncodeError

func EncodeError(err error) zcode.Bytes

func EncodeFloat32

func EncodeFloat32(d float32) zcode.Bytes

func EncodeFloat64

func EncodeFloat64(d float64) zcode.Bytes

func EncodeIP

func EncodeIP(a net.IP) zcode.Bytes

func EncodeInt

func EncodeInt(i int64) zcode.Bytes

func EncodeNet

func EncodeNet(subnet *net.IPNet) zcode.Bytes

func EncodeString

func EncodeString(s string) zcode.Bytes

func EncodeTime

func EncodeTime(t nano.Ts) zcode.Bytes

func EncodeTypeValue

func EncodeTypeValue(t Type) zcode.Bytes

func EncodeUint

func EncodeUint(i uint64) zcode.Bytes

func IDChar

func IDChar(c rune) bool

func IsContainerType

func IsContainerType(typ Type) bool

func IsIdentifier

func IsIdentifier(s string) bool

func IsPrimitiveType

func IsPrimitiveType(typ Type) bool

func IsRecordType

func IsRecordType(typ Type) bool

func IsTrue

func IsTrue(zv zcode.Bytes) bool

func IsTypeName

func IsTypeName(s string) bool

IsTypeName returns true iff s is a valid zson typedef name (exclusive of integer names for locally-scoped typedefs).

func IsUnionType

func IsUnionType(typ Type) bool

func TypeChar

func TypeChar(c rune) bool

func TypeID

func TypeID(typ Type) int

Types

type Allocator

type Allocator interface {
	NewValue(Type, zcode.Bytes) *Value
	CopyValue(Value) *Value
}

type Column

type Column struct {
	Name string
	Type Type
}

Column defines the field name and type of a column in a record type.

func NewColumn

func NewColumn(name string, typ Type) Column

type CompressionFormat

type CompressionFormat int
const CompressionFormatLZ4 CompressionFormat = 0x00

type Context

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

A Context implements the "type context" in the Zed model. For a given set of related Values, each Value has a type from a shared Context. The Context manages the transitive closure of Types so that each unique type corresponds to exactly one Type pointer allowing type equivlance to be determined by pointer comparison. (Type pointers from distinct Contexts obviously do not have this property.) A Context also provides an efficient means to translate type values (represented as serialized ZNG) to Types. This provides an efficient means to translate Type pointers from one context to another.

func NewContext

func NewContext() *Context

func (*Context) Lookup

func (c *Context) Lookup(id int) *TypeRecord

func (*Context) LookupByValue

func (c *Context) LookupByValue(tv zcode.Bytes) (Type, error)

LookupByValue returns the Type indicated by a binary-serialized type value. This provides a means to translate a type-context-independent serialized encoding for an arbitrary type into the reciever Context.

func (*Context) LookupType

func (c *Context) LookupType(id int) (Type, error)

func (*Context) LookupTypeArray

func (c *Context) LookupTypeArray(inner Type) *TypeArray

func (*Context) LookupTypeDef

func (c *Context) LookupTypeDef(name string) *TypeNamed

func (*Context) LookupTypeEnum

func (c *Context) LookupTypeEnum(symbols []string) *TypeEnum

func (*Context) LookupTypeMap

func (c *Context) LookupTypeMap(keyType, valType Type) *TypeMap

func (*Context) LookupTypeNamed

func (c *Context) LookupTypeNamed(name string, target Type) (*TypeNamed, error)

func (*Context) LookupTypeRecord

func (c *Context) LookupTypeRecord(columns []Column) (*TypeRecord, error)

LookupTypeRecord returns a TypeRecord within this context that binds with the indicated columns. Subsequent calls with the same columns will return the same record pointer. If the type doesn't exist, it's created, stored, and returned. The closure of types within the columns must all be from this type context. If you want to use columns from a different type context, use TranslateTypeRecord.

func (*Context) LookupTypeSet

func (c *Context) LookupTypeSet(inner Type) *TypeSet

func (*Context) LookupTypeUnion

func (c *Context) LookupTypeUnion(types []Type) *TypeUnion

func (*Context) LookupTypeValue

func (c *Context) LookupTypeValue(typ Type) *Value

func (*Context) MustLookupTypeRecord

func (c *Context) MustLookupTypeRecord(columns []Column) *TypeRecord

func (*Context) Reset

func (c *Context) Reset()

func (*Context) TranslateType

func (c *Context) TranslateType(ext Type) (Type, error)

TranslateType takes a type from another context and creates and returns that type in this context.

func (*Context) TranslateTypeRecord

func (t *Context) TranslateTypeRecord(ext *TypeRecord) (*TypeRecord, error)

type Type

type Type interface {
	// ID returns a unique (per Context) identifier that
	// represents this type.  For a named type, this identifier
	// represents the underlying type and not the named type itself.
	// Callers that care about the underlying type of a Value for
	// example should prefer to use this instead of using the go
	// .(type) operator on a Type instance.
	ID() int
}

A Type is an interface presented by a zeek type. Types can be used to infer type compatibility and create new values of the underlying type.

func InnerType

func InnerType(typ Type) Type

InnerType returns the element type for the underlying set or array type or nil if the underlying type is not a set or array.

func LookupPrimitive

func LookupPrimitive(name string) Type

func LookupPrimitiveByID

func LookupPrimitiveByID(id int) Type

func TypeUnder

func TypeUnder(typ Type) Type

type TypeArray

type TypeArray struct {
	Type Type
	// contains filtered or unexported fields
}

func NewTypeArray

func NewTypeArray(id int, typ Type) *TypeArray

func (*TypeArray) ID

func (t *TypeArray) ID() int

type TypeEnum

type TypeEnum struct {
	Symbols []string
	// contains filtered or unexported fields
}

func NewTypeEnum

func NewTypeEnum(id int, symbols []string) *TypeEnum

func (*TypeEnum) ID

func (t *TypeEnum) ID() int

func (*TypeEnum) Lookup

func (t *TypeEnum) Lookup(symbol string) int

func (*TypeEnum) Symbol

func (t *TypeEnum) Symbol(index int) (string, error)

type TypeMap

type TypeMap struct {
	KeyType Type
	ValType Type
	// contains filtered or unexported fields
}

func NewTypeMap

func NewTypeMap(id int, keyType, valType Type) *TypeMap

func (*TypeMap) ID

func (t *TypeMap) ID() int

type TypeNamed

type TypeNamed struct {
	Name string
	Type Type
	// contains filtered or unexported fields
}

func NewTypeNamed

func NewTypeNamed(id int, name string, typ Type) *TypeNamed

func (*TypeNamed) ID

func (t *TypeNamed) ID() int

func (*TypeNamed) NamedID

func (t *TypeNamed) NamedID() int

type TypeOfBool

type TypeOfBool struct{}

func (*TypeOfBool) Format

func (t *TypeOfBool) Format(zv zcode.Bytes) string

func (*TypeOfBool) ID

func (t *TypeOfBool) ID() int

func (*TypeOfBool) Marshal

func (t *TypeOfBool) Marshal(zv zcode.Bytes) (interface{}, error)

func (*TypeOfBool) String

func (t *TypeOfBool) String() string

type TypeOfBstring

type TypeOfBstring struct{}

func (*TypeOfBstring) ID

func (t *TypeOfBstring) ID() int

type TypeOfBytes

type TypeOfBytes struct{}

func (*TypeOfBytes) Format

func (t *TypeOfBytes) Format(zv zcode.Bytes) string

func (*TypeOfBytes) ID

func (t *TypeOfBytes) ID() int

func (*TypeOfBytes) Marshal

func (t *TypeOfBytes) Marshal(zv zcode.Bytes) (interface{}, error)

func (*TypeOfBytes) String

func (t *TypeOfBytes) String() string

type TypeOfDuration

type TypeOfDuration struct{}

func (*TypeOfDuration) Format

func (t *TypeOfDuration) Format(zv zcode.Bytes) string

func (*TypeOfDuration) ID

func (t *TypeOfDuration) ID() int

func (*TypeOfDuration) Marshal

func (t *TypeOfDuration) Marshal(zv zcode.Bytes) (interface{}, error)

func (*TypeOfDuration) String

func (t *TypeOfDuration) String() string

type TypeOfError

type TypeOfError struct{}

func (*TypeOfError) ID

func (t *TypeOfError) ID() int

type TypeOfFloat32

type TypeOfFloat32 struct{}

func (*TypeOfFloat32) Format

func (t *TypeOfFloat32) Format(zb zcode.Bytes) string

func (*TypeOfFloat32) ID

func (t *TypeOfFloat32) ID() int

func (*TypeOfFloat32) Marshal

func (t *TypeOfFloat32) Marshal(zb zcode.Bytes) (interface{}, error)

func (*TypeOfFloat32) String

func (t *TypeOfFloat32) String() string

type TypeOfFloat64

type TypeOfFloat64 struct{}

func (*TypeOfFloat64) Format

func (t *TypeOfFloat64) Format(zv zcode.Bytes) string

func (*TypeOfFloat64) ID

func (t *TypeOfFloat64) ID() int

func (*TypeOfFloat64) Marshal

func (t *TypeOfFloat64) Marshal(zv zcode.Bytes) (interface{}, error)

func (*TypeOfFloat64) String

func (t *TypeOfFloat64) String() string

type TypeOfIP

type TypeOfIP struct{}

func (*TypeOfIP) Format

func (t *TypeOfIP) Format(zv zcode.Bytes) string

func (*TypeOfIP) ID

func (t *TypeOfIP) ID() int

func (*TypeOfIP) Marshal

func (t *TypeOfIP) Marshal(zv zcode.Bytes) (interface{}, error)

func (*TypeOfIP) String

func (t *TypeOfIP) String() string

type TypeOfInt16

type TypeOfInt16 struct{}

func (*TypeOfInt16) Format

func (t *TypeOfInt16) Format(zv zcode.Bytes) string

func (*TypeOfInt16) ID

func (t *TypeOfInt16) ID() int

func (*TypeOfInt16) Marshal

func (t *TypeOfInt16) Marshal(zv zcode.Bytes) (interface{}, error)

func (*TypeOfInt16) String

func (t *TypeOfInt16) String() string

type TypeOfInt32

type TypeOfInt32 struct{}

func (*TypeOfInt32) Format

func (t *TypeOfInt32) Format(zv zcode.Bytes) string

func (*TypeOfInt32) ID

func (t *TypeOfInt32) ID() int

func (*TypeOfInt32) Marshal

func (t *TypeOfInt32) Marshal(zv zcode.Bytes) (interface{}, error)

func (*TypeOfInt32) String

func (t *TypeOfInt32) String() string

type TypeOfInt64

type TypeOfInt64 struct{}

func (*TypeOfInt64) Format

func (t *TypeOfInt64) Format(zv zcode.Bytes) string

func (*TypeOfInt64) ID

func (t *TypeOfInt64) ID() int

func (*TypeOfInt64) Marshal

func (t *TypeOfInt64) Marshal(zv zcode.Bytes) (interface{}, error)

func (*TypeOfInt64) String

func (t *TypeOfInt64) String() string

type TypeOfInt8

type TypeOfInt8 struct{}

func (*TypeOfInt8) Format

func (t *TypeOfInt8) Format(zv zcode.Bytes) string

func (*TypeOfInt8) ID

func (t *TypeOfInt8) ID() int

func (*TypeOfInt8) Marshal

func (t *TypeOfInt8) Marshal(zv zcode.Bytes) (interface{}, error)

func (*TypeOfInt8) String

func (t *TypeOfInt8) String() string

type TypeOfNet

type TypeOfNet struct{}

func (*TypeOfNet) Format

func (t *TypeOfNet) Format(zv zcode.Bytes) string

func (*TypeOfNet) ID

func (t *TypeOfNet) ID() int

func (*TypeOfNet) Marshal

func (t *TypeOfNet) Marshal(zv zcode.Bytes) (interface{}, error)

func (*TypeOfNet) String

func (t *TypeOfNet) String() string

type TypeOfNull

type TypeOfNull struct{}

func (*TypeOfNull) Format

func (t *TypeOfNull) Format(zv zcode.Bytes) string

func (*TypeOfNull) ID

func (t *TypeOfNull) ID() int

func (*TypeOfNull) Marshal

func (t *TypeOfNull) Marshal(zv zcode.Bytes) (interface{}, error)

func (*TypeOfNull) String

func (t *TypeOfNull) String() string

type TypeOfString

type TypeOfString struct{}

func (*TypeOfString) ID

func (t *TypeOfString) ID() int

type TypeOfTime

type TypeOfTime struct{}

func (*TypeOfTime) Format

func (t *TypeOfTime) Format(zv zcode.Bytes) string

func (*TypeOfTime) ID

func (t *TypeOfTime) ID() int

func (*TypeOfTime) Marshal

func (t *TypeOfTime) Marshal(zv zcode.Bytes) (interface{}, error)

func (*TypeOfTime) String

func (t *TypeOfTime) String() string

type TypeOfType

type TypeOfType struct{}

func (*TypeOfType) ID

func (t *TypeOfType) ID() int

type TypeOfUint16

type TypeOfUint16 struct{}

func (*TypeOfUint16) Format

func (t *TypeOfUint16) Format(zv zcode.Bytes) string

func (*TypeOfUint16) ID

func (t *TypeOfUint16) ID() int

func (*TypeOfUint16) Marshal

func (t *TypeOfUint16) Marshal(zv zcode.Bytes) (interface{}, error)

func (*TypeOfUint16) String

func (t *TypeOfUint16) String() string

type TypeOfUint32

type TypeOfUint32 struct{}

func (*TypeOfUint32) Format

func (t *TypeOfUint32) Format(zv zcode.Bytes) string

func (*TypeOfUint32) ID

func (t *TypeOfUint32) ID() int

func (*TypeOfUint32) Marshal

func (t *TypeOfUint32) Marshal(zv zcode.Bytes) (interface{}, error)

func (*TypeOfUint32) String

func (t *TypeOfUint32) String() string

type TypeOfUint64

type TypeOfUint64 struct{}

func (*TypeOfUint64) Format

func (t *TypeOfUint64) Format(zv zcode.Bytes) string

func (*TypeOfUint64) ID

func (t *TypeOfUint64) ID() int

func (*TypeOfUint64) Marshal

func (t *TypeOfUint64) Marshal(zv zcode.Bytes) (interface{}, error)

func (*TypeOfUint64) String

func (t *TypeOfUint64) String() string

type TypeOfUint8

type TypeOfUint8 struct{}

func (*TypeOfUint8) Format

func (t *TypeOfUint8) Format(zv zcode.Bytes) string

func (*TypeOfUint8) ID

func (t *TypeOfUint8) ID() int

func (*TypeOfUint8) Marshal

func (t *TypeOfUint8) Marshal(zv zcode.Bytes) (interface{}, error)

func (*TypeOfUint8) String

func (t *TypeOfUint8) String() string

type TypeRecord

type TypeRecord struct {
	Columns []Column
	LUT     map[string]int
	// contains filtered or unexported fields
}

func NewTypeRecord

func NewTypeRecord(id int, columns []Column) *TypeRecord

func TypeRecordOf

func TypeRecordOf(typ Type) *TypeRecord

func (*TypeRecord) ID

func (t *TypeRecord) ID() int

type TypeSet

type TypeSet struct {
	Type Type
	// contains filtered or unexported fields
}

func NewTypeSet

func NewTypeSet(id int, typ Type) *TypeSet

func (*TypeSet) ID

func (t *TypeSet) ID() int

type TypeUnion

type TypeUnion struct {
	Types []Type
	// contains filtered or unexported fields
}

func NewTypeUnion

func NewTypeUnion(id int, types []Type) *TypeUnion

func (*TypeUnion) ID

func (t *TypeUnion) ID() int

func (*TypeUnion) Type

func (t *TypeUnion) Type(selector int) (Type, error)

Type returns the type corresponding to selector.

type Value

type Value struct {
	Type  Type
	Bytes zcode.Bytes
}

func NewBool

func NewBool(b bool) *Value

func NewBstring

func NewBstring(s string) *Value

func NewBytes

func NewBytes(b []byte) *Value

func NewDuration

func NewDuration(d nano.Duration) *Value

func NewError

func NewError(err error) *Value

func NewErrorf

func NewErrorf(format string, args ...interface{}) *Value

func NewFloat32

func NewFloat32(f float32) *Value

func NewFloat64

func NewFloat64(f float64) *Value

func NewIP

func NewIP(a net.IP) *Value

func NewNet

func NewNet(s *net.IPNet) *Value

func NewString

func NewString(s string) *Value

func NewTime

func NewTime(ts nano.Ts) *Value

func NewTypeValue

func NewTypeValue(t Type) *Value

func NewUint64

func NewUint64(v uint64) *Value

func NewValue

func NewValue(zt Type, zb zcode.Bytes) *Value

func Not

func Not(zb zcode.Bytes) *Value

Not returns the inverse Value of the Boolean-typed bytes value of zb.

func (*Value) Copy

func (v *Value) Copy() *Value

Copy returns a copy of v that does not share v.Bytes. The copy's Bytes field is nil if and only if v.Bytes is nil.

func (*Value) CopyFrom

func (v *Value) CopyFrom(from *Value)

CopyFrom copies from into v, reusing v.Bytes if possible and setting v.Bytes to nil if and only if from.Bytes is nil.

func (*Value) Equal

func (v *Value) Equal(p Value) bool

func (*Value) IsContainer

func (v *Value) IsContainer() bool

func (*Value) IsNull

func (v *Value) IsNull() bool

IsNull returns true if and only if v is a null value of any type.

func (*Value) Iter

func (v *Value) Iter() zcode.Iter

Jump to

Keyboard shortcuts

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