Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd struct { Verbose bool `help:"Print extra debugging information." short:"v"` JSON JSONCmd `cmd:"" help:"Commands for working with Sciveyor-format JSON files."` Sync SyncCmd `cmd:"" help:"Synchronize the MongoDB collection to Solr."` }
Functions ¶
Types ¶
type Globals ¶
type Globals struct {
Verbose bool
}
Globals describes the global command-line parameters that are valid for all sub-commands.
type JSONCmd ¶
type JSONCmd struct {
Import JSONImportCmd `cmd:"" help:"Import JSON files to the MongoDB server."`
Validate JSONValidateCmd `cmd:"" help:"Validate a collection of JSON files against the Sciveyor schema."`
}
JSONCmd encapsulates the subcommands for working with JSON files.
type JSONImportCmd ¶
type JSONImportCmd struct {
config.MongoConfig
BatchSize int `help:"Number of files to send to MongoDB at one time." default:"100"`
Files []string `arg:"" help:"Files or glob patterns to be imported."`
}
JSONImportCmd encapsulates the task of importing JSON files into MongoDB.
func (*JSONImportCmd) Run ¶
func (i *JSONImportCmd) Run(globals *Globals) error
Run will perform the file import.
type JSONValidateCmd ¶
type JSONValidateCmd struct {
Strict bool `` /* 154-byte string literal not displayed */
Unique bool `` /* 151-byte string literal not displayed */
Files []string `arg:"" help:"Files or glob patterns to be validated."`
}
JSONValidateCmd encapsulates the file-validation task.
func (*JSONValidateCmd) Run ¶
func (v *JSONValidateCmd) Run(globals *Globals) error
Run will perform the file validation.
type MongoCmd ¶
type MongoCmd struct {
Validate MongoValidateCmd `cmd:"" help:"Validate the contents of the MongoDB server against the Sciveyor schema."`
}
MongoCmd encapsulates the subcommands for working with Mongo servers.
type MongoValidateCmd ¶
type MongoValidateCmd struct {
Strict bool `` /* 154-byte string literal not displayed */
config.MongoConfig
}
MongoValidateCmd encapsulates the MongoDB validation task.
func (*MongoValidateCmd) Run ¶
func (v *MongoValidateCmd) Run(globals *Globals) error
Run will perform the MongoDB validation.
type SyncCmd ¶
type SyncCmd struct {
config.SolrConfig
SolrBatchSize int `help:"Commit to Solr every N documents." default:"10"`
config.MongoConfig
Force bool `help:"Force-sync all documents from Mongo to Solr (delete and re-create)."`
}
SyncCmd encapsulates the MongoDB to Solr sync.
Click to show internal directories.
Click to hide internal directories.