package
0.0.3
Repository: https://github.com/iasthc/atlas.git
Documentation: pkg.go.dev

# Functions

ArchiveDir returns a tar archive of the given directory.
FilesLastIndex returns the index of the last file satisfying f(i), or -1 if none do.
LogIntro gathers some meta information from the migration files and stored revisions to log some general information prior to actual execution.
LogNoPendingFiles starts a new LogExecution and LogDone to indicate that there are no pending files to be executed.
NewExecutor creates a new Executor with default values.
NewHashFile computes and returns a HashFile from the given directory's files.
NewLocalDir returns a new the Dir used by a Planner to work on the given local path.
NewLocalFile returns a new local file.
NewPlanner creates a new Planner.
NewTemplateFormatter creates a new Formatter working with the given templates.
OpenMemDir opens an in-memory directory and registers it in the process namespace with the given name.
PlanFormat sets the Formatter of a Planner.
PlanWithChecksum allows setting if the hash-sum functionality for the migration directory is enabled or not.
PlanWithDiffOptions allows setting custom diff options.
PlanWithIndent allows generating SQL statements with indentation.
PlanWithSchemaQualifier allows setting a custom schema to prefix tables and other resources.
Realm returns a StateReader for the static Realm object.
RealmConn returns a StateReader for a Driver connected to a database.
ReplayToVersion configures the last version to apply when replaying the migration directory.
Schema returns a StateReader for the static Schema object.
SchemaConn returns a StateReader for a Driver connected to a schema.
Stmts provides a generic implementation for extracting SQL statements from the given file contents.
UnarchiveDir extracts the tar archive into the given directory.
Validate checks if the migration dir is in sync with its sum file.
WithAllowDirty defines if we can start working on a non-clean database in the first migration execution.
WithBaselineVersion allows setting the baseline version of the database on the first migration.
WithFromVersion allows passing a file version as a starting point for calculating pending migration scripts.
WithLogger sets the Logger of an Executor.
WithOperatorVersion sets the operator version to save on the revisions when executing migration files.
WriteSumFile writes the given HashFile to the Dir.

# Constants

HashFileName of the migration directory integrity sum file.
RevisionTypeBaseline represents a baseline revision.
RevisionTypeExecute represents a migration that was executed.
RevisionTypeResolved represents a migration that was resolved.
RevisionTypeUnknown represents an unknown revision type.

# Variables

DefaultFormatter is a default implementation for Formatter.
DisableChecksum calls PlanWithChecksum(false).
ErrChecksumFormat is returned from Validate if the sum files format is invalid.
ErrChecksumMismatch is returned from Validate if the hash sums don't match.
ErrChecksumNotFound is returned from Validate if the hash file does not exist.
ErrCleanCheckerUnsupported is returned if there is no CleanChecker given.
ErrNoPendingFiles is returned if there are no pending migration files to execute on the managed database.
ErrNoPlan is returned by Plan when there is no change between the two states.
ErrRevisionNotExist is returned if the requested revision is not found in the storage.
ErrSnapshotUnsupported is returned if there is no Snapshoter given.
WithFormatter calls PlanFormat.

# Structs

No description provided by the author
No description provided by the author
HistoryChangedError is returned if between two execution attempts already applied statements of a file have changed.
LocalDir implements Dir for a local migration directory with default Atlas formatting.
LocalFile is used by LocalDir to implement the Scanner interface.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MissingMigrationError is returned if a revision is partially applied but the matching migration file is not found in the migration directory.
No description provided by the author
NopRevisionReadWriter is a RevisionReadWriter that does nothing.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Stmt represents a scanned statement text along with its position in the file and associated comments group.
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
HashFile represents the integrity sum file of the migration dir.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TemplateFormatter implements Formatter by using templates.