Documentation ¶
Overview ¶
Package versioned provides an interface for defining versioned migrations -- migrations that move records from one versioned namespace to another withing go datastore
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInitialVersionedMigration ¶
func NewInitialVersionedMigration(datastoreMigration versioning.DatastoreMigration, newVersion versioning.VersionKey) versioning.VersionedMigration
NewInitialVersionedMigration sets up a migration that starts from an unversioned datastore
func NewVersionedMigration ¶
func NewVersionedMigration(datastoreMigration versioning.DatastoreMigration, oldVersion versioning.VersionKey, newVersion versioning.VersionKey) versioning.VersionedMigration
NewVersionedMigration converts a datastore migration to a versioned migration with the given old and new versions
Types ¶
type Builder ¶
type Builder interface { Reversible(down versioning.MigrationFunc) Builder FilterKeys([]string) Builder Only([]string) Builder OldVersion(versioning.VersionKey) Builder Build() (versioning.VersionedMigration, error) }
Builder is just a versioned version of the migration builder
func NewVersionedBuilder ¶
func NewVersionedBuilder(up versioning.MigrationFunc, newVersion versioning.VersionKey) Builder
NewVersionedBuilder returns a new versioned builder for the given migration function
type BuilderList ¶
type BuilderList []Builder
BuilderList is a list of versioned builders that can be built into a single command to a VersionedMigrationList
func (BuilderList) Build ¶
func (vbl BuilderList) Build() (versioning.VersionedMigrationList, error)
Build creates a VersionedMigrationList from a list of VersionedBuilders in a single step