Documentation ¶
Index ¶
- func NewCmdSet(spec string, cmds []CommandSpec, globalFlagValues any) *subcmd.CommandSetYAML
- func TemplateFuncs(authFiles map[string]string) template.FuncMap
- type CommandSpec
- type CrawlFlags
- type CrawlIndexFlags
- type IndexFlags
- type T
- func (c *T) Crawl(ctx context.Context, values interface{}, args []string) error
- func (c *T) CrawlAll(ctx context.Context, values interface{}, _ []string) error
- func (c *T) CrawlIndex(ctx context.Context, values interface{}, args []string) error
- func (c *T) CrawlIndexAll(ctx context.Context, values interface{}, _ []string) error
- func (c *T) Index(ctx context.Context, values interface{}, args []string) error
- func (c *T) IndexAll(ctx context.Context, values interface{}, _ []string) error
- func (c *T) IndexingStats(ctx context.Context, values interface{}, args []string) error
- func (c *T) NewRunner(datasource string, flags any) *cmdexec.Runner
- func (c *T) NewRunnerOpts(datasource string, flags any) []cmdexec.Option
- func (c *T) RunCommands(ctx context.Context, datasource string, flags any, ...) error
- func (c *T) ShowAll(_ context.Context, _ interface{}, _ []string) error
- func (c *T) Spec() (string, []CommandSpec)
- func (c *T) TestCache(ctx context.Context, values interface{}, args []string) error
- func (c *T) TestCacheAll(ctx context.Context, values interface{}, _ []string) error
- type TemplateVars
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdSet ¶
func NewCmdSet(spec string, cmds []CommandSpec, globalFlagValues any) *subcmd.CommandSetYAML
Types ¶
type CommandSpec ¶
CommandSpec represents a simple top-level command that can be added to a subcmd.CommandSetYAML.
type CrawlFlags ¶
type CrawlFlags struct {
ProcessDownloads bool `subcmd:"process-downloads,true,'process downloaded files'"`
}
type CrawlIndexFlags ¶
type CrawlIndexFlags struct { CrawlFlags IndexFlags }
type IndexFlags ¶
type IndexFlags struct {
IndexingDryRun bool `subcmd:"indexing-dry-run,false,'dry run only'"`
}
type T ¶
type T struct { Datasources []string CrawlCommands map[string][]string ProcessCommands map[string][]string IndexCommands map[string][]string IndexStatsCommands map[string][]string TestCacheCommands map[string][]string AuthFiles map[string]string GlobalExecOpts []cmdexec.Option DatasourceConfigFile string }
func (*T) CrawlIndex ¶
func (*T) CrawlIndexAll ¶
func (*T) IndexingStats ¶
func (*T) RunCommands ¶
func (c *T) RunCommands(ctx context.Context, datasource string, flags any, cmdsets ...map[string][]string) error
RunCommands runs the supplied commands for the specified datasource. Flags represents the flags made available as template variables.
func (*T) Spec ¶
func (c *T) Spec() (string, []CommandSpec)
type TemplateVars ¶
TemplateVars represents the variables that can be accessed from templates.
Click to show internal directories.
Click to hide internal directories.