Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrWrongType = errors.New("incorrect type") ErrUnmarshal = errors.New("unable to unmarshal arg value") )
Functions ¶
This section is empty.
Types ¶
type Argument ¶
type Argument struct { Name string FieldName string // Type is the type of this argument. Type reflect.Type // Optional indicates if this argument is optional. Optional bool // Pointer indicates if this argument was a pointer (this is really only // needed for deserialization, and should alway imply optional). Pointer bool Value reflect.Value // contains filtered or unexported fields }
Argument is the type of a marker argument.
func ArgumentFromField ¶
func ArgumentFromField(field *reflect.StructField) (Argument, error)
func (*Argument) InitializeValue ¶
func (a *Argument) InitializeValue()
func (*Argument) SetTypeInfo ¶
ArgumentFromType constructs an Argument by examining the given reflect.Type.
type Definition ¶
func Define ¶
func Define(name string, outputType interface{}) (*Definition, error)
func (*Definition) GetName ¶
func (m *Definition) GetName() string
func (*Definition) InflateObject ¶
func (m *Definition) InflateObject() (interface{}, error)
func (*Definition) LookupArgument ¶
func (m *Definition) LookupArgument(argName string) bool
func (*Definition) SetArgument ¶
func (m *Definition) SetArgument(argName string, value interface{}) error
func (Definition) String ¶
func (m Definition) String() string
type Registry ¶
type Registry struct { Results chan interface{} // contains filtered or unexported fields }
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) Add ¶
func (r *Registry) Add(marker *Definition)
func (*Registry) GetDefinition ¶
func (r *Registry) GetDefinition(name string) parser.Definition
Click to show internal directories.
Click to hide internal directories.