history

package
v0.0.0-...-e0c2b11 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MigrationHistory

type MigrationHistory interface {
	InitializeHistory(ctx context.Context) error
	DropHistory(ctx context.Context) error
	SaveHistory(ctx context.Context, migrationData interface{}) error
	DeleteHistory(ctx context.Context, migrationData interface{}) error
	GetHistory(ctx context.Context, migrationName string) (interface{}, error)
	GetLatestHistory(ctx context.Context) (interface{}, error)
}

type MigrationRecord

type MigrationRecord struct {
	DB *mongo.Database

	CollectionName string
}

func (*MigrationRecord) DeleteHistory

func (mh *MigrationRecord) DeleteHistory(ctx context.Context, migrationData interface{}) error

func (*MigrationRecord) DropHistory

func (mh *MigrationRecord) DropHistory(ctx context.Context) error

func (*MigrationRecord) GetAllHistories

func (mh *MigrationRecord) GetAllHistories(ctx context.Context) (*[]history_data.MigrationRecordData, error)

func (*MigrationRecord) GetHistory

func (mh *MigrationRecord) GetHistory(ctx context.Context, migrationName string) (interface{}, error)

func (*MigrationRecord) GetLatestHistory

func (mh *MigrationRecord) GetLatestHistory(ctx context.Context) (interface{}, error)

func (*MigrationRecord) InitializeHistory

func (mh *MigrationRecord) InitializeHistory(ctx context.Context) error

func (*MigrationRecord) SaveHistory

func (mh *MigrationRecord) SaveHistory(ctx context.Context, migrationData interface{}) error

Jump to

Keyboard shortcuts

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