git

package
v0.1.23-oss Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdlerReader

func AdlerReader(r io.ReaderAt, size uint64) *adlerReader

func NewGit

func NewGit(f casfuse.FS, s Store)

func NewObjectsDir

func NewObjectsDir(parent fs.FsDir) *objectsDir

func ProjectCreate

func ProjectCreate(gitDir, projRoot fs.FsDir, headHash hash.Hash) error

func ReadFullAt

func ReadFullAt(r io.ReaderAt, buf []byte, off int64) (n int, err error)

Types

type GitType

type GitType int
const (
	GitTypeObject GitType = iota
	GitTypeBlob
	GitTypeTree
	GitTypeCommit
)

type Info

type Info struct {
	GitType  GitType
	FilePath string
	FileInfo os.FileInfo
}

type MultiSectionReader

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

func NewMultiSectionReader

func NewMultiSectionReader(readers ...ReaderAtSize) *MultiSectionReader

func (*MultiSectionReader) ReadAt

func (m *MultiSectionReader) ReadAt(buf []byte, off int64) (n int, err error)

func (*MultiSectionReader) Size

func (m *MultiSectionReader) Size() int64

type NoCompressReader

type NoCompressReader struct {
	*MultiSectionReader
}

func NewNoCompressReader

func NewNoCompressReader(r io.ReaderAt, size uint64) *NoCompressReader

type ReaderAtSize

type ReaderAtSize interface {
	io.ReaderAt
	Size() int64
}

type Store

type Store interface {
	Hasher() hash.Hasher
	GetPath(hash.Hash) (*Info, error)
	WriteBlob(ctx context.Context, hash hash.Hash, reader io.Reader) error
	WriteObject(ctx context.Context, hash hash.Hash, reader io.Reader) error
}

func GetGit

func GetGit(f casfuse.FS) Store

Jump to

Keyboard shortcuts

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