Documentation
¶
Overview ¶
Package datastore provides CLI commands for datastore management operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CatalogLoaderFunc ¶
type CatalogLoaderFunc func(ctx context.Context, envKey string, cfg *config.Config, dom domain.Domain) (fdatastore.CatalogStore, error)
CatalogLoaderFunc loads the catalog store for a given environment.
type CatalogMergerFunc ¶
type CatalogMergerFunc func(ctx context.Context, envDir domain.EnvDir, name, timestamp string, catalog fdatastore.CatalogStore) error
CatalogMergerFunc merges migration datastore to catalog.
type CatalogSyncerFunc ¶
type CatalogSyncerFunc func(ctx context.Context, envDir domain.EnvDir, catalog fdatastore.CatalogStore) error
CatalogSyncerFunc syncs the entire local datastore to catalog.
type Config ¶
type Config struct {
// Logger is the logger to use for command output. Required.
Logger logger.Logger
// Domain is the domain context for the commands. Required.
Domain domain.Domain
// Deps holds optional dependencies that can be overridden.
// If fields are nil, production defaults are used.
Deps Deps
}
Config holds the configuration for datastore commands.
type ConfigLoaderFunc ¶
type ConfigLoaderFunc func(dom domain.Domain, envKey string, lggr logger.Logger) (*config.Config, error)
ConfigLoaderFunc loads the configuration for a given domain and environment.
type Deps ¶
type Deps struct {
// ConfigLoader loads the configuration for a domain and environment.
// Default: config.Load
ConfigLoader ConfigLoaderFunc
// CatalogLoader loads the catalog store.
// Default: cldcatalog.LoadCatalog
CatalogLoader CatalogLoaderFunc
// FileMerger merges changeset datastore to local files.
// Default: envDir.MergeChangesetDataStore
FileMerger FileMergerFunc
// CatalogMerger merges changeset datastore to catalog.
// Default: envDir.MergeChangesetDataStoreCatalog
CatalogMerger CatalogMergerFunc
// CatalogSyncer syncs the entire local datastore to catalog.
// Default: envDir.SyncDataStoreToCatalog
CatalogSyncer CatalogSyncerFunc
}
Deps holds the injectable dependencies for datastore commands. All fields are optional; nil values will use production defaults.
Click to show internal directories.
Click to hide internal directories.