sqlite

package
v0.0.0-...-f448fd0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SetCacheFinished   = `UPDATE cache SET finished = 1, storage_path = ? WHERE repository = ? AND cache_id = ?;`
	SearchCacheExact   = `` /* 163-byte string literal not displayed */
	SearchCachePartial = `` /* 170-byte string literal not displayed */

	InsertPart = `INSERT INTO cache_parts ("repository", "cache_id", "start_byte", "end_byte", "size", "part_data")
VALUES (?, ?, ?, ?, ?, ?);`

	GetAllParts = `` /* 135-byte string literal not displayed */
)
View Source
const InsertNewCache = `` /* 288-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

func NewSQLiteBackend

func NewSQLiteBackend(connectionString string) (*Backend, error)

func (*Backend) AddUploadPart

func (b *Backend) AddUploadPart(repoKey string, id int, part s.CachePart) error

func (*Backend) CreateCache

func (b *Backend) CreateCache(repoKey, key, version string, scopes []s.Scope, backend string) (int, error)

func (*Backend) FinishCache

func (b *Backend) FinishCache(repoKey string, id int, path string) error

func (*Backend) Migrate

func (b *Backend) Migrate() error

func (*Backend) SearchCache

func (b *Backend) SearchCache(repoKey, key, version string, scopes []s.Scope, restoreKeys []string) (s.Cache, error)

func (*Backend) Type

func (b *Backend) Type() string

func (*Backend) ValidateUpload

func (b *Backend) ValidateUpload(repoKey string, id int, size int64) ([]s.CachePart, error)

Jump to

Keyboard shortcuts

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