atlas

package
v0.4.21 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMigrationLogger

func NewMigrationLogger(logger2 *zap.Logger) migrate.Logger

Types

type EmbedDir

type EmbedDir struct {
	fs.FS
}

func NewEmbedDir

func NewEmbedDir(fsys fs.FS) EmbedDir

func (EmbedDir) Checksum

func (e EmbedDir) Checksum() (migrate.HashFile, error)

func (EmbedDir) Files

func (e EmbedDir) Files() ([]migrate.File, error)

func (EmbedDir) WriteFile

func (e EmbedDir) WriteFile(_ string, _ []byte) error

type Revision

type Revision struct {
	Version         pgtype.Text          `db:"version"`          // Version of the migration.
	Description     pgtype.Text          `db:"description"`      // Description of this migration.
	Type            pgtype.Int8          `db:"type"`             // Type of the migration.
	Applied         pgtype.Int8          `db:"applied"`          // Applied amount of statements in the migration.
	Total           pgtype.Int8          `db:"total"`            // Total amount of statements in the migration.
	ExecutedAt      pgtype.Timestamptz   `db:"executed_at"`      // ExecutedAt is the starting point of execution.
	ExecutionTime   pgtype.Int8          `db:"execution_time"`   // ExecutionTime of the migration.
	Error           pgtype.Text          `db:"error"`            // Error of the migration, if any occurred.
	ErrorStmt       pgtype.Text          `db:"error_stmt"`       // ErrorStmt is the statement that raised Error.
	Hash            pgtype.Text          `db:"hash"`             // Hash of migration file.
	PartialHashes   pgtype.Array[string] `db:"partial_hashes"`   // PartialHashes is the hashes of applied statements.
	OperatorVersion pgtype.Text          `db:"operator_version"` // OperatorVersion that executed this migration.
}

func (*Revision) ToRevision

func (r *Revision) ToRevision() *migrate.Revision

type RevisionReaderWriter

type RevisionReaderWriter struct {
	// contains filtered or unexported fields
}

func NewRevisionReaderWriter

func NewRevisionReaderWriter(exec sqlexec.Executor) (*RevisionReaderWriter, error)

func (*RevisionReaderWriter) DeleteRevision

func (r *RevisionReaderWriter) DeleteRevision(ctx context.Context, version string) error

func (*RevisionReaderWriter) Ident

func (*RevisionReaderWriter) ReadRevision

func (r *RevisionReaderWriter) ReadRevision(ctx context.Context, version string) (*migrate.Revision, error)

func (*RevisionReaderWriter) ReadRevisions

func (r *RevisionReaderWriter) ReadRevisions(ctx context.Context) ([]*migrate.Revision, error)

func (*RevisionReaderWriter) WriteRevision

func (r *RevisionReaderWriter) WriteRevision(ctx context.Context, revision *migrate.Revision) error

Jump to

Keyboard shortcuts

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