Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSimpleType ¶
func IsSimpleType(val interface{}) bool
func SetAttributeTypeConverter ¶
func SetAttributeTypeConverter(converter TypeConverter)
Types ¶
type Attribute ¶
type Attribute struct {
// contains filtered or unexported fields
}
Attribute is a simple structure used to define a data Attribute/property
func NewAttribute ¶
TODO this should probably go away
func (*Attribute) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON
type ComplexObject ¶
type ComplexObject struct { Metadata string `json:"metadata"` Value interface{} `json:"value"` }
ComplexObject is the value that is used when using a "COMPLEX_OBJECT" type DEPRECATED
type Scope ¶
type Scope interface { // GetValue gets the specified value GetValue(name string) (value interface{}, exists bool) // SetValue sets the specified value SetValue(name string, value interface{}) error }
Scope is a set of attributes that are accessible
func NewSimpleScope ¶
NewSimpleScope creates a new SimpleScope
type SimpleScope ¶
type SimpleScope struct {
// contains filtered or unexported fields
}
SimpleScope is a basic implementation of a scope
func (*SimpleScope) GetValue ¶
func (s *SimpleScope) GetValue(name string) (value interface{}, exists bool)
func (*SimpleScope) SetValue ¶
func (s *SimpleScope) SetValue(name string, value interface{}) error
type StringsMap ¶
func NewFixedStringsMap ¶
func NewFixedStringsMap(params map[string]string) StringsMap
type StructValue ¶
type Type ¶
type Type int
Type denotes a data type
const ( TypeUnknown Type = iota // interface{} TypeAny // interface{} // simple types TypeString // string TypeInt // int TypeInt32 // int32 TypeInt64 // int64 TypeFloat32 // float32 TypeFloat64 // float64 TypeBool // bool TypeObject // map[string]interface{} TypeBytes // []byte // compound types TypeParams // map[string]string TypeArray // []interface{} TypeMap // map[interface{}]interface{} //DEPRECATED TypeComplexObject )
func ToTypeEnum ¶
ToTypeEnum get the data type that corresponds to the specified name
func ToTypeFromGoRep ¶
type TypeConverter ¶
type TypedValue ¶
type TypedValue interface { Type() Type Value() interface{} }
func NewTypedValue ¶
func NewTypedValue(dataType Type, value interface{}) TypedValue
func NewTypedValueFromAttr ¶
func NewTypedValueFromAttr(attr *Attribute) TypedValue
func NewTypedValueWithConversion ¶
func NewTypedValueWithConversion(dataType Type, value interface{}) (TypedValue, error)
func ToTypedValue ¶
func ToTypedValue(value interface{}) TypedValue
Click to show internal directories.
Click to hide internal directories.