Documentation
¶
Index ¶
- Variables
- func RegisterHandler(h Handler)
- type CollectionHandler
- type Handler
- type Plugin
- func (p *Plugin) Description() string
- func (p *Plugin) ExportCollectionsCommand(app core.App) *cobra.Command
- func (p *Plugin) ExportCommand(app core.App) *cobra.Command
- func (p *Plugin) ExportRecordsCommand(app core.App) *cobra.Command
- func (p *Plugin) ImportCollectionsCommand(app core.App) *cobra.Command
- func (p *Plugin) ImportCommand(app core.App) *cobra.Command
- func (p *Plugin) ImportRecordsCommand(app core.App) *cobra.Command
- func (p *Plugin) Init(app core.App) error
- func (p *Plugin) Name() string
- func (p *Plugin) PreValidate(app core.App) error
- func (p *Plugin) Validate() error
- func (p *Plugin) Version() string
- type RecordsHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoCollectionHandler = errors.New("no collection encoding handler was installed") ErrNoRecordsHandler = errors.New("no records encoding handler was installed") )
Functions ¶
func RegisterHandler ¶
func RegisterHandler(h Handler)
Types ¶
type CollectionHandler ¶
type Plugin ¶
type Plugin struct {
// Determines if an automatic database backup should be made prior to an import.
// - flag: auto_backup
// - default: true
AutoBackup bool `json:"auto_backup"`
// Path to directory for collections schema files.
// - flag: collections_dir
// - default: pb_data/../migrations/collections
CollectionsDir string `json:"collections_dir"`
// Encoding to use for collection imports and exports.
// - options: json, yml, toml, or any community plugin options installed
// - flag: --json, --yml, --toml, etc.
// - default: json
CollectionsEncoding *flags.RadioValue `json:"collections_encoding"`
// Optional prefix to prepend the commands to avoid possible name collisions.
// - default: "" (no prefix)
CommandPrefix string `json:"command_prefix"`
// Determines if to include oauth2 config in collections export.
// - flag: TODO
// - default: false
IncludeOauth2 bool `json:"include_oauth2"`
// Path to directory for records data files.
// - flag: records_dir
// - default: pb_data/../migrations/records
RecordsDir string `json:"records_dir"`
// Encoding to use for records imports and exports.
// - options: csv, json, yml, toml, or any community plugin options installed
// - flag: --csv, --json, --yml, --toml, etc.
// - default: csv
RecordsEncoding *flags.RadioValue `json:"records_encoding"`
// Determines if record imports should skip validation.
// - flag: no_validate
// - default: false
NoValidate bool `json:"no_validate"`
// Determines if verified state should be overriden.
// - options: true, false, null (do not override)
// - flag: override_verified
// - default: null
OverrideVerified *flags.OptionalBoolValue `json:"override_verified"`
// Determines if email visibility should be overriden.
// - options: true, false, null (do not override)
// - flag: override_email_visibility
// - default: null
OverrideEmailVisibility *flags.OptionalBoolValue `json:"override_email_visibility"`
// Determines if measures are taken to reduce git diff. Currently, just sets
// updated to the zero datetime.
// - default: false
ReduceGitDiff bool `json:"reduce_git_diff"`
// Determines if to include system collections.
// - flag: system
// - default: false
System bool `json:"system"`
}
func (*Plugin) Description ¶
Description implements xpb.Plugin.
func (*Plugin) ExportCollectionsCommand ¶
func (*Plugin) ExportRecordsCommand ¶
func (*Plugin) ImportCollectionsCommand ¶
func (*Plugin) ImportRecordsCommand ¶
func (*Plugin) PreValidate ¶
PreValidate implements xpb.PreValidator.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.