hashes

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

func Attach(ctx context.Context, hashes Hashes) context.Context

func Calculate

func Calculate(ctx context.Context) (context.Context, error)
Calculate determines the hashes migrations and attaches them to the context.

*

  • Each file name is hashed along with the hash of the previous file name;
  • This means that if any file is added, removed, or renamed it will break
  • the hash chain and invalidate any database that was created after.
  • The file contents is then hashed with the chained file name hash; This means that if the contents of a file changes, it will invalidate the database only for that migration, but not any subsiquent databases.

* *

Types

type Hashes

type Hashes []string

func FromContext

func FromContext(ctx context.Context) Hashes

Jump to

Keyboard shortcuts

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