Documentation
¶
Overview ¶
Package migrate implements the migration of data from one type of Keeper to another.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoStores = errors.New("no stores found in source keeper") ErrDupKeys = errors.New( "duplicate keys found in destination stores, enable skipping or clobbering of existing data to continue migration", ) )
Functions ¶
This section is empty.
Types ¶
type ErrDuplicateKeys ¶
func NewDuplicateKeysErr ¶
func NewDuplicateKeysErr(duplicates map[string][][]byte) *ErrDuplicateKeys
func (ErrDuplicateKeys) Error ¶
func (e ErrDuplicateKeys) Error() string
func (ErrDuplicateKeys) Unwrap ¶
func (e ErrDuplicateKeys) Unwrap() error
type Migrator ¶
type Migrator struct { From database.Keeper To database.Keeper // contains filtered or unexported fields }
func (*Migrator) CheckDupes ¶
func (*Migrator) WithClobber ¶
WithClobber sets the clobber flag on the Migrator, allowing it to overwrite existing data in the destination Keeper.
func (*Migrator) WithSkipExisting ¶
WithSkipExisting sets the skipExisting flag on the Migrator, allowing it to skip existing data in the destination Keeper.
Click to show internal directories.
Click to hide internal directories.