migrate

package
v0.33.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDirectorySchemaVersionHigher  = cerr.NewAsertoError("E20054", codes.FailedPrecondition, http.StatusExpectationFailed, "directory schema version is higher than supported by engine")
	ErrDirectorySchemaUpdateRequired = cerr.NewAsertoError("E20055", codes.FailedPrecondition, http.StatusExpectationFailed, "directory schema update required")
	ErrUnknown                       = cerr.NewAsertoError("E99999", codes.Unknown, http.StatusInternalServerError, "unexpected error occurred")
)

Functions

func CheckSchemaVersion added in v0.30.0

func CheckSchemaVersion(config *bdb.Config, logger *zerolog.Logger, reqVersion *semver.Version) (bool, error)

CheckSchemaVersion, validate schema version of the database file equal: returns true, nil lower: returns false, nil higher returns false, error errors: returns false, error.

func Migrate added in v0.30.0

func Migrate(config *bdb.Config, logger *zerolog.Logger, reqVersion *semver.Version) error

Types

type Migration

type Migration func(*zerolog.Logger, *bolt.DB, *bolt.DB) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL