Documentation ¶
Overview ¶
Package types declares data types for Rego values and helper functions to operate on these types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var A = NewAny()
A represents the superset of all types.
var B = NewBoolean()
B represents an instance of the boolean type.
var N = NewNumber()
N represents an instance of the number type.
var S = NewString()
S represents an instance of the string type.
Functions ¶
Types ¶
type Any ¶
type Any []Type
Any represents a dynamic type.
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
Array represents the array type.
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object represents the object type.
func (*Object) Keys ¶
func (t *Object) Keys() []interface{}
Keys returns the keys of the object's static elements.
type Property ¶
type Property struct { Key interface{} Value Type }
Property represents a static object property.
func NewProperty ¶
NewProperty returns a new Property object.
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set represents the set type.
type Type ¶
type Type interface {
String() string
}
Type represents a type of a term in the language.
func Keys ¶
Keys returns the type of keys that can be enumerated for a. For arrays, the keys are always number types, for objects the keys are always string types, and for sets the keys are always the type of the set element.