Versions in this module Expand all Collapse all v0 v0.0.2 Nov 19, 2023 v0.0.1 Nov 10, 2023 Changes in this version + func EachType(col Collector, pkg *loader.Package, cb TypeCallback) 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) + type ArgumentType int + const AnyType + const BoolType + const IntType + const InvalidType + const MapType + const NumberType + const RawType + const SliceType + const StringType + type Collector interface + MarkersInPackage func(pkg *loader.Package) (map[ast.Node]MarkerValues, error) + Print func() + func NewCollector(ctx context.Context) Collector + 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 (r *Definition) AnonymousField() bool + func (r *Definition) Empty() bool + func (r *Definition) Parse(rawMarker string) (interface{}, error) + type DefinitionHelp struct + Category string + DeprecatedInFavorOf *string + FieldHelp map[string]DetailedHelp + func SimpleHelp(category, summary string) *DefinitionHelp + 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][]any + func PackageMarkers(col Collector, pkg *loader.Package) (MarkerValues, error) + func (v MarkerValues) Get(name string) any + type RawArguments []byte + type Registry interface + AddHelp func(def *Definition, help *DefinitionHelp) + Lookup func(name string, target TargetType) *Definition + Print func() + Register func(def *Definition) error + func NewRegistry(ctx context.Context) Registry + type ScannerError struct + Msg string + Pos sc.Position + func (e *ScannerError) Error() string + type TargetType int + const DescribesField + const DescribesPackage + const DescribesType + 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