postgres

package
v0.0.0-...-6d21404 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	*url.URL
	*sqlx.DB
}

func New

func New(ur1 *url.URL) (*Repository, error)

func (*Repository) Break

func (r *Repository) Break(ctx context.Context, cid uuid.UUID) (blocks []uuid.UUID, err error)

func (*Repository) Delete

func (r *Repository) Delete(ctx context.Context, path string) (blocks []uuid.UUID, err error)

func (*Repository) Get

func (r *Repository) Get(ctx context.Context, name string) (
	mime string,
	date time.Time,
	size int64,
	blocks []uuid.UUID,
	sizes []int64,
	err error)
func (r *Repository) Link(ctx context.Context, cid uuid.UUID, bid1 uuid.UUID, bid2 uuid.UUID) (err error)

func (*Repository) Lookup

func (r *Repository) Lookup(ctx context.Context, hash []byte, size int64) (blocks []uuid.UUID, err error)

func (*Repository) Put

func (r *Repository) Put(ctx context.Context, path string) (fid uuid.UUID, err error)

func (*Repository) Shutdown

func (r *Repository) Shutdown()

func (*Repository) Update

func (r *Repository) Update(ctx context.Context, fid uuid.UUID, blocks []uuid.UUID, hashes [][]byte, sizes []int64) (chains []uuid.UUID, err error)

Jump to

Keyboard shortcuts

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