Documentation ¶
Index ¶
- Variables
- type Parser
- type Pass
- func (p *Pass) AddAnonymousBind(file *pkginfo.File, res resource.Resource)
- func (p *Pass) AddBind(file *pkginfo.File, boundName option.Option[*ast.Ident], res resource.Resource)
- func (p *Pass) AddImplicitBind(res resource.Resource)
- func (p *Pass) AddNamedBind(file *pkginfo.File, boundName *ast.Ident, res resource.Resource)
- func (p *Pass) AddPathBind(file *pkginfo.File, boundName option.Option[*ast.Ident], path resource.Path)
- func (p *Pass) Binds() []resource.Bind
- func (p *Pass) RegisterResource(resource resource.Resource)
- func (p *Pass) Resources() []resource.Resource
- type Registry
Constants ¶
This section is empty.
Variables ¶
View Source
var RunAlways = []paths.Pkg{"*"}
RunAlways is a value for InterestingImports to indicate to always run the parser.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct { Name string // InterestingImports are the imports paths that the parser is interested in. // If a package imports any one of them, the Run method is invoked. InterestingImports []paths.Pkg // InterestingSubdirs are the subdirectories of a package that a parser is interested in. // If a package has any one of these subdirectories, the Run method is invoked. // Its purpose is to support our current way of defining databases via a "migrations" dir. InterestingSubdirs []string Run func(*Pass) }
type Pass ¶
type Pass struct { *parsectx.Context SchemaParser *schema.Parser Pkg *pkginfo.Package // contains filtered or unexported fields }
func (*Pass) AddAnonymousBind ¶ added in v1.19.0
func (*Pass) AddImplicitBind ¶
func (*Pass) AddNamedBind ¶ added in v1.19.0
func (*Pass) AddPathBind ¶
func (*Pass) RegisterResource ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
Click to show internal directories.
Click to hide internal directories.