Versions in this module Expand all Collapse all v0 v0.4.2 Aug 30, 2022 Changes in this version + func EachType(col *Collector, pkg *loader.Package, cb TypeCallback) error + func RegisterAll(reg *Registry, defs ...*Definition) error + type Argument struct + ItemType *Argument + Optional bool + Pointer bool + Type ArgumentType + func ArgumentFromType(rawType reflect.Type) (Argument, error) + func (a *Argument) Parse(scanner *sc.Scanner, raw string, out reflect.Value) + func (a Argument) String() string + func (a Argument) TypeString() string + type ArgumentType int + const AnyType + const BoolType + const IntType + const InvalidType + const MapType + const RawType + const SliceType + const StringType + type Collector struct + func (c *Collector) MarkersInPackage(pkg *loader.Package) (map[ast.Node]MarkerValues, error) + type Definition struct + FieldNames map[string]string + Fields map[string]Argument + Name string + Output reflect.Type + Strict bool + Target TargetType + func MakeAnyTypeDefinition(name string, target TargetType, output interface{}) (*Definition, error) + func MakeDefinition(name string, target TargetType, output interface{}) (*Definition, error) + func Must(def *Definition, err error) *Definition + func (d *Definition) AnonymousField() bool + func (d *Definition) Empty() bool + func (d *Definition) Parse(rawMarker string) (interface{}, error) + type DefinitionHelp struct + Category string + DeprecatedInFavorOf *string + FieldHelp map[string]DetailedHelp + func DeprecatedHelp(inFavorOf, category, summary string) *DefinitionHelp + func SimpleHelp(category, summary string) *DefinitionHelp + func (d *DefinitionHelp) FieldsHelp(def *Definition) map[string]DetailedHelp + type DetailedHelp struct + Details string + Summary string + type FieldInfo struct + Doc string + Markers MarkerValues + Name string + RawField *ast.Field + Tag reflect.StructTag + type MarkerValues map[string][]interface + func (v MarkerValues) Get(name string) interface{} + func PackageMarkers(col *Collector, pkg *loader.Package) (MarkerValues, error) + type RawArguments []byte + type Registry struct + func (r *Registry) AddHelp(def *Definition, help *DefinitionHelp) + func (r *Registry) AllDefinitions() []*Definition + func (r *Registry) Define(name string, target TargetType, obj interface{}) error + func (r *Registry) HelpFor(def *Definition) *DefinitionHelp + func (r *Registry) Lookup(name string, target TargetType) *Definition + func (r *Registry) Register(def *Definition) error + type ScannerError struct + Msg string + Pos sc.Position + func (e *ScannerError) Error() string + type TargetType int + const DescribesField + const DescribesPackage + const DescribesType + func (t TargetType) String() string + type TypeCallback func(info *TypeInfo) + type TypeInfo struct + Doc string + Fields []FieldInfo + Markers MarkerValues + Name string + RawDecl *ast.GenDecl + RawFile *ast.File + RawSpec *ast.TypeSpec