gitvol

package
v0.0.0-...-1ef88f4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Overview

Package gitvol implements a Volume in terms of Git

Index

Constants

View Source
const (
	BlobPrefix = "b"
	RootPath   = "root"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Volume

type Volume struct {
	cells.BytesCellBase
	// contains filtered or unexported fields
}

func New

func New(storer storage.Storer, remoteURL string, branch string) *Volume

func NewTestVolume

func NewTestVolume(t testing.TB) *Volume

func (*Volume) CAS

func (v *Volume) CAS(ctx context.Context, actual *[]byte, prev, next []byte) (bool, error)

func (*Volume) Delete

func (v *Volume) Delete(ctx context.Context, id cadata.ID) error

func (*Volume) Exists

func (v *Volume) Exists(ctx context.Context, id cadata.ID) (bool, error)

func (*Volume) Get

func (v *Volume) Get(ctx context.Context, id cadata.ID, buf []byte) (int, error)

func (*Volume) Hash

func (v *Volume) Hash(data []byte) cadata.ID

func (*Volume) List

func (v *Volume) List(ctx context.Context, span cadata.Span, buf []cadata.ID) (int, error)

func (*Volume) Load

func (v *Volume) Load(ctx context.Context, dst *[]byte) error

func (*Volume) MaxSize

func (v *Volume) MaxSize() int

func (*Volume) Post

func (v *Volume) Post(ctx context.Context, data []byte) (cadata.ID, error)

func (*Volume) Reset

func (v *Volume) Reset(ctx context.Context) error

Reset resets the volume to an empty state, creating a the branch and commit if necessary.

Jump to

Keyboard shortcuts

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