database

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package database is a database interface for export importing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExportImportDB

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

func New

func New(db *database.DB) *ExportImportDB

func (*ExportImportDB) ActiveConfigs

func (db *ExportImportDB) ActiveConfigs(ctx context.Context) ([]*model.ExportImport, error)

func (*ExportImportDB) AddConfig

func (db *ExportImportDB) AddConfig(ctx context.Context, ei *model.ExportImport) error

func (*ExportImportDB) AddImportFilePublicKey

func (db *ExportImportDB) AddImportFilePublicKey(ctx context.Context, ifpk *model.ImportFilePublicKey) error

func (*ExportImportDB) AllowedKeys

func (*ExportImportDB) CompleteImportFile

func (db *ExportImportDB) CompleteImportFile(ctx context.Context, ef *model.ImportFile, status string) error

func (*ExportImportDB) CreateFiles

func (db *ExportImportDB) CreateFiles(ctx context.Context, ei *model.ExportImport, filenames []string) (int, error)

func (*ExportImportDB) ExpireImportFilePublicKey

func (db *ExportImportDB) ExpireImportFilePublicKey(ctx context.Context, ifpk *model.ImportFilePublicKey) error

func (*ExportImportDB) GetConfig added in v0.12.1

func (db *ExportImportDB) GetConfig(ctx context.Context, id int64) (*model.ExportImport, error)

GetConfig gets the configuration for the given id.

func (*ExportImportDB) GetOpenImportFiles

func (db *ExportImportDB) GetOpenImportFiles(ctx context.Context, lockDuration time.Duration, ei *model.ExportImport) ([]*model.ImportFile, error)

func (*ExportImportDB) LeaseImportFile

func (db *ExportImportDB) LeaseImportFile(ctx context.Context, lockDuration time.Duration, ef *model.ImportFile) error

func (*ExportImportDB) ListConfigs added in v0.12.1

func (db *ExportImportDB) ListConfigs(ctx context.Context) ([]*model.ExportImport, error)

func (*ExportImportDB) UpdateConfig added in v0.12.1

func (db *ExportImportDB) UpdateConfig(ctx context.Context, c *model.ExportImport) error

UpdateConfig updates an existing ExportImporter.

Jump to

Keyboard shortcuts

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