Documentation ¶
Index ¶
- func GetAttributeBoolValue(obj interface{}, fieldName string) (bool, error)
- func GetAttributeFloat32Value(obj interface{}, fieldName string) (float32, error)
- func GetAttributeFloat64Value(obj interface{}, fieldName string) (float64, error)
- func GetAttributeInt16Value(obj interface{}, fieldName string) (int16, error)
- func GetAttributeInt32Value(obj interface{}, fieldName string) (int32, error)
- func GetAttributeInt64Value(obj interface{}, fieldName string) (int64, error)
- func GetAttributeInt8Value(obj interface{}, fieldName string) (int8, error)
- func GetAttributeIntValue(obj interface{}, fieldName string) (int, error)
- func GetAttributeInterface(obj interface{}, fieldName string) (interface{}, error)
- func GetAttributeList(obj interface{}) ([]string, error)
- func GetAttributeStringValue(obj interface{}, fieldName string) (string, error)
- func GetAttributeTimeValue(obj interface{}, fieldName string) (time.Time, error)
- func GetAttributeType(obj interface{}, fieldName string) (reflect.Type, error)
- func GetAttributeUInt16Value(obj interface{}, fieldName string) (uint16, error)
- func GetAttributeUInt32Value(obj interface{}, fieldName string) (uint32, error)
- func GetAttributeUInt64Value(obj interface{}, fieldName string) (uint64, error)
- func GetAttributeUInt8Value(obj interface{}, fieldName string) (uint8, error)
- func GetAttributeUIntValue(obj interface{}, fieldName string) (uint, error)
- func GetAttributeValue(obj interface{}, fieldName string) (reflect.Value, error)
- func GetBaseKind(val reflect.Value) reflect.Kind
- func GetFunctionList(obj interface{}) ([]string, error)
- func GetFunctionParameterTypes(obj interface{}, methodName string) ([]reflect.Type, error)
- func GetFunctionReturnTypes(obj interface{}, methodName string) ([]reflect.Type, error)
- func InvokeFunction(obj interface{}, methodName string, param []interface{}) ([]interface{}, error)
- func IsAttributeArray(obj interface{}, fieldName string) (bool, error)
- func IsAttributeMap(obj interface{}, fieldName string) (bool, error)
- func IsAttributeNilOrZero(obj interface{}, fieldName string) (bool, error)
- func IsStruct(obj interface{}) bool
- func IsValidField(obj interface{}, fieldName string) bool
- func SetAttributeBoolValue(obj interface{}, fieldName string, newValue bool) error
- func SetAttributeFloat32Value(obj interface{}, fieldName string, newValue float32) error
- func SetAttributeFloat64Value(obj interface{}, fieldName string, newValue float64) error
- func SetAttributeInt16Value(obj interface{}, fieldName string, newValue int16) error
- func SetAttributeInt32Value(obj interface{}, fieldName string, newValue int32) error
- func SetAttributeInt64Value(obj interface{}, fieldName string, newValue int64) error
- func SetAttributeInt8Value(obj interface{}, fieldName string, newValue int8) error
- func SetAttributeIntValue(obj interface{}, fieldName string, newValue int) error
- func SetAttributeInterface(obj interface{}, fieldName string, value interface{}) error
- func SetAttributeStringValue(obj interface{}, fieldName string, newValue string) error
- func SetAttributeTimeValue(obj interface{}, fieldName string, newValue time.Time) error
- func SetAttributeUInt16Value(obj interface{}, fieldName string, newValue uint16) error
- func SetAttributeUInt32Value(obj interface{}, fieldName string, newValue uint32) error
- func SetAttributeUInt64Value(obj interface{}, fieldName string, newValue uint64) error
- func SetAttributeUInt8Value(obj interface{}, fieldName string, newValue uint8) error
- func SetAttributeUIntValue(obj interface{}, fieldName string, newValue uint) error
- func SetAttributeValue(obj interface{}, fieldName string, value reflect.Value) error
- func ValueAdd(a, b reflect.Value) (reflect.Value, error)
- func ValueDiv(a, b reflect.Value) (reflect.Value, error)
- func ValueMul(a, b reflect.Value) (reflect.Value, error)
- func ValueSub(a, b reflect.Value) (reflect.Value, error)
- func ValueToInterface(v reflect.Value) interface{}
- type BytesResource
- type FileResource
- type ReaderResource
- type Resource
- type URLResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAttributeBoolValue ¶
GetAttributeBoolValue will try to obtain member variable's bool value
func GetAttributeFloat32Value ¶
GetAttributeFloat32Value will try to obtain member variable's float32 value
func GetAttributeFloat64Value ¶
GetAttributeFloat64Value will try to obtain member variable's float64 value
func GetAttributeInt16Value ¶
GetAttributeInt16Value will try to obtain member variable's int16 value
func GetAttributeInt32Value ¶
GetAttributeInt32Value will try to obtain member variable's int32 value
func GetAttributeInt64Value ¶
GetAttributeInt64Value will try to obtain member variable's int64 value
func GetAttributeInt8Value ¶
GetAttributeInt8Value will try to obtain member variable's int8 value
func GetAttributeIntValue ¶
GetAttributeIntValue will try to obtain member variable's int value
func GetAttributeInterface ¶
GetAttributeInterface will retrieve a members variable value as usable interface.
func GetAttributeList ¶
GetAttributeList will populate list of struct's public member variable.
func GetAttributeStringValue ¶
GetAttributeStringValue will try to obtain member variable's string value
func GetAttributeTimeValue ¶
GetAttributeTimeValue will try to obtain member variable's time.Time value
func GetAttributeType ¶
GetAttributeType will return the type of a specific member variable
func GetAttributeUInt16Value ¶
GetAttributeUInt16Value will try to obtain member variable's uint16 value
func GetAttributeUInt32Value ¶
GetAttributeUInt32Value will try to obtain member variable's uint32 value
func GetAttributeUInt64Value ¶
GetAttributeUInt64Value will try to obtain member variable's uint64 value
func GetAttributeUInt8Value ¶
GetAttributeUInt8Value will try to obtain member variable's uint8 value
func GetAttributeUIntValue ¶
GetAttributeUIntValue will try to obtain member variable's uint value
func GetAttributeValue ¶
GetAttributeValue will retrieve a members variable value.
func GetBaseKind ¶
GetBaseKind will try to obtain base obtainable kind of a value, so we know what method to call val.Int(), val.Uint(), etc.
func GetFunctionList ¶
GetFunctionList get list of functions in a struct instance
func GetFunctionParameterTypes ¶
GetFunctionParameterTypes get list of parameter types of specific function in a struct instance
func GetFunctionReturnTypes ¶
GetFunctionReturnTypes get list of return types of specific function in a struct instance
func InvokeFunction ¶
InvokeFunction invokes a specific function in a struct instance, using parameters array
func IsAttributeArray ¶
IsAttributeArray validate if a member variable is an array or a slice.
func IsAttributeMap ¶
IsAttributeMap validate if a member variable is a map.
func IsAttributeNilOrZero ¶
IsAttributeNilOrZero validate if a member variable is nil or zero.
func IsStruct ¶
func IsStruct(obj interface{}) bool
IsStruct validates if an instance is struct or pointer to struct
func IsValidField ¶
IsValidField validates if an instance struct have a field with such name
func SetAttributeBoolValue ¶
SetAttributeBoolValue will try to set member variable's bool value
func SetAttributeFloat32Value ¶
SetAttributeFloat32Value will try to set member variable's float32 value
func SetAttributeFloat64Value ¶
SetAttributeFloat64Value will try to set member variable's float64 value
func SetAttributeInt16Value ¶
SetAttributeInt16Value will try to set member variable's int16 value
func SetAttributeInt32Value ¶
SetAttributeInt32Value will try to set member variable's int32 value
func SetAttributeInt64Value ¶
SetAttributeInt64Value will try to set member variable's int64 value
func SetAttributeInt8Value ¶
SetAttributeInt8Value will try to set member variable's int8 value
func SetAttributeIntValue ¶
SetAttributeIntValue will try to set member variable's int value
func SetAttributeInterface ¶
SetAttributeInterface will try to set a member variable value with a value from an interface
func SetAttributeStringValue ¶
SetAttributeStringValue will try to set member variable's string value
func SetAttributeTimeValue ¶
SetAttributeTimeValue will try to set member variable's time.Time value
func SetAttributeUInt16Value ¶
SetAttributeUInt16Value will try to set member variable's uint16 value
func SetAttributeUInt32Value ¶
SetAttributeUInt32Value will try to set member variable's uint32 value
func SetAttributeUInt64Value ¶
SetAttributeUInt64Value will try to set member variable's uint64 value
func SetAttributeUInt8Value ¶
SetAttributeUInt8Value will try to set member variable's uint8 value
func SetAttributeUIntValue ¶
SetAttributeUIntValue will try to set member variable's uint value
func SetAttributeValue ¶
SetAttributeValue will try to set a member variable value with a new one.
func ValueAdd ¶
ValueAdd will try to do a mathematical addition between two values. It will return another value as the result and an error if between the two values are not compatible for Addition
func ValueDiv ¶
ValueDiv will try to do a mathematical division between two values. It will return another value as the result and an error if between the two values are not compatible for division
func ValueMul ¶
ValueMul will try to do a mathematical multiplication between two values. It will return another value as the result and an error if between the two values are not compatible for multiplication
func ValueSub ¶
ValueSub will try to do a mathematical substraction between two values. It will return another value as the result and an error if between the two values are not compatible for substraction
func ValueToInterface ¶
ValueToInterface will try to obtain an interface to a speciffic value. it will detect the value's kind.
Types ¶
type BytesResource ¶
type BytesResource struct {
Bytes []byte
}
BytesResource is a struct that will hold the byte array data
func (*BytesResource) Load ¶
func (res *BytesResource) Load() ([]byte, error)
Load will load the resource into byte array.
func (*BytesResource) String ¶
func (res *BytesResource) String() string
String will state the resource byte array.
type FileResource ¶
FileResource is a struct that will hold the file path and readed data bytes.
func (*FileResource) Load ¶
func (res *FileResource) Load() ([]byte, error)
Load will load the resource into byte array.
func (*FileResource) String ¶
func (res *FileResource) String() string
String will state the resource file path.
type ReaderResource ¶
ReaderResource is a struct that will hold the reader instance.
func (*ReaderResource) Load ¶
func (res *ReaderResource) Load() ([]byte, error)
Load will load the resource into byte array.
func (*ReaderResource) String ¶
func (res *ReaderResource) String() string
String will state the resource source.
type Resource ¶
Resource should be implemented by any resource model so it can be loaded and parsed by the grool parser.
func NewBytesResource ¶
NewBytesResource will create a new Resource using a byte array.
func NewFileResource ¶
NewFileResource will create a new Resource using a file located in path.
func NewReaderResource ¶
NewReaderResource will create a new Resource using a common reader.
func NewURLResource ¶
NewURLResource will create a new Resource using a resource as located in the url
type URLResource ¶
URLResource is a struct that will hold the byte array data and URL source
func (*URLResource) Load ¶
func (res *URLResource) Load() ([]byte, error)
Load will load the resource into byte array.
func (*URLResource) String ¶
func (res *URLResource) String() string
String will state the resource url.