interfaces

package
v0.0.0-...-dc8f43e Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RefManager

type RefManager interface {
	ListRefs() ([]refs.Ref, error)
	GetRef(name string) (*refs.Ref, error)
	GetHEAD() (string, error)
}

RefManager interface for reference operations

type Repository

type Repository interface {
	GetObject(hash string) (object.Object, error)
	GetCommit(hash string) (*object.Commit, error)
	GetTree(hash string) (*object.Tree, error)
	GetBlob(hash string) ([]byte, error)
	GetBlobWithDelta(hash string) (*object.Blob, error)
	GetCurrentBranch() (string, error)
	ListBranches() ([]string, error)
	ListCommits(branch string, limit int) ([]*object.Commit, error)
	GetStore() *storage.Store
	FindFiles(pattern string) ([]string, error)
	GetRefManager() RefManager
	GetStagingArea() StagingArea
	Log(limit int) ([]*object.Commit, error)
}

Repository defines the interface for repository operations This breaks circular dependencies between internal packages

type StagingArea

type StagingArea interface {
	List() ([]string, error)
	IsStaged(path string) bool
	GetFileHash(path string) (string, error)
	Add(path string, content []byte) error
	Clear()
}

StagingArea interface for staging operations

Jump to

Keyboard shortcuts

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