postgres

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 = TRUE, storage_path = $1 WHERE repository = $2 AND cache_id = $3;`
	SearchCacheExact   = `` /* 170-byte string literal not displayed */
	SearchCachePartial = `` /* 175-byte string literal not displayed */

	InsertPart  = `` /* 129-byte string literal not displayed */
	GetAllParts = `` /* 136-byte string literal not displayed */
)
View Source
const InsertNewCache = `` /* 148-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 NewPostgresBackend

func NewPostgresBackend(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