internal

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MigrationContext

type MigrationContext struct {
	Logger *zap.Logger
	Name   string
}

MigrationContext holds all the settings we want to share with migration scripts.

NOTE: this is important to declare this in a separate package, and avoid cyclic import dependencies.

func FromContext

func FromContext(ctx context.Context) (MigrationContext, error)

FromContext retrieves the app context from the context.

func (MigrationContext) ToContext

func (m MigrationContext) ToContext(parentCtx context.Context) context.Context

ToContext pushes the app context into a child context.

Jump to

Keyboard shortcuts

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