chapdb

package
v0.0.0-...-9b2d47e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(db *sql.DB) error

func Open

func Open(driver string, file string, migrate bool) (*sql.DB, error)

Types

type SQLiteDB

type SQLiteDB sql.DB

func (*SQLiteDB) Close

func (db *SQLiteDB) Close() error

func (*SQLiteDB) CountUploaders

func (db *SQLiteDB) CountUploaders(ctx context.Context) (int, error)

number of uploaders

func (*SQLiteDB) CreateUpload

func (db *SQLiteDB) CreateUpload(ctx context.Context, upID string, up *uploader.Upload) error

func (*SQLiteDB) CreateUploader

func (db *SQLiteDB) CreateUploader(ctx context.Context, upper *uploader.PersistentUploader) error

func (*SQLiteDB) DeleteObject

func (db *SQLiteDB) DeleteObject(ctx context.Context, storeID, objectID string) (err error)

func (*SQLiteDB) DeleteUploader

func (db *SQLiteDB) DeleteUploader(ctx context.Context, id string) error

Delete the uploader and all its uploads

func (*SQLiteDB) GetObjectManifest

func (db *SQLiteDB) GetObjectManifest(ctx context.Context, storeID, objID string) (*chaparral.ObjectManifest, error)

func (*SQLiteDB) GetUploader

func (db *SQLiteDB) GetUploader(ctx context.Context, id string) (*uploader.PersistentUploader, error)

GetUploader with all it's uploads

func (*SQLiteDB) GetUploaderIDs

func (db *SQLiteDB) GetUploaderIDs(ctx context.Context) ([]string, error)

list of all uploaderIDs

func (*SQLiteDB) SetObjectManifest

func (sqdb *SQLiteDB) SetObjectManifest(ctx context.Context, obj *chaparral.ObjectManifest) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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