Documentation
¶
Overview ¶
Package migrations runs versioned schema migrations against the relay package's embedded bbolt key-value store, tracking the applied version in a dedicated bucket.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Bucket to store migration version MIGRATIONS_BUCKET = []byte("_migrations") // Key to store the current version VERSION_KEY = []byte("version") )
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(db *bolt.DB, opts ...ManagerOption) *Manager
func (*Manager) GetCurrentVersion ¶
type ManagerOption ¶ added in v0.2.2
type ManagerOption func(*Manager)
ManagerOption mutates a Manager at construction time.
func WithLogger ¶ added in v0.2.2
func WithLogger(logger zerolog.Logger) ManagerOption
WithLogger configures the logger used for migration progress logging. Defaults to zerolog.Nop() (silent).
type ResetVerificationCacheMigration ¶
type ResetVerificationCacheMigration struct {
MetricsBucket []byte
}
func (*ResetVerificationCacheMigration) Description ¶
func (m *ResetVerificationCacheMigration) Description() string
func (*ResetVerificationCacheMigration) Down ¶
func (m *ResetVerificationCacheMigration) Down(tx *bolt.Tx) error
func (*ResetVerificationCacheMigration) Up ¶
func (m *ResetVerificationCacheMigration) Up(tx *bolt.Tx) error
func (*ResetVerificationCacheMigration) Version ¶
func (m *ResetVerificationCacheMigration) Version() uint64
Click to show internal directories.
Click to hide internal directories.