Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Converter ¶
type Converter struct {
Name string
Config ConverterConfig
Methods MethodMapping
Scope *types.Scope
}
Converter defines a converter that was marked with converterMarker.
func ParseDocs ¶
func ParseDocs(config ParseDocsConfig) ([]Converter, error)
ParseDocs parses the docs for the given pattern.
type ConverterConfig ¶
type ConverterConfig struct {
Name string
ExtendMethods []string
Flags builder.ConversionFlags
}
ConverterConfig contains settings that can be set via comments.
type FieldMapping ¶
type Method ¶
type Method struct {
Flags builder.ConversionFlags
AutoMap []string
Fields map[string]*FieldMapping
}
Method contains settings that can be set via comments.
func (*Method) Field ¶
func (m *Method) Field(targetName string) *FieldMapping
type MethodMapping ¶
MethodMapping a mapping between method name and method.
type ParseDocsConfig ¶
type ParseDocsConfig struct {
// PackagePattern is a golang package pattern to scan, required.
PackagePattern []string
// WorkingDir is a directory to invoke the tool on. If omitted, current directory is used.
WorkingDir string
}
ParseDocsConfig provides input to the ParseDocs method below.
Click to show internal directories.
Click to hide internal directories.