ref: f04cb2e9aff390d952c9b38dafd6f57aa0371aac
dir: /refstore/refstore.go/
package refstore
import (
"errors"
"codeberg.org/lindenii/furgit/ref"
)
// ErrReferenceNotFound indicates that a reference does not exist in a backend.
// TODO: interface error? just like object not found in objectstore
var ErrReferenceNotFound = errors.New("refstore: reference not found")
// Store reads Git references.
type Store interface {
// Resolve resolves a reference name to either a symbolic or detached ref.
// If the reference does not exist, implementations should return
// ErrReferenceNotFound.
Resolve(name string) (ref.Ref, error)
// ResolveFully resolves a reference name to a detached object ID.
//
// Implementations may use backend-local lookup semantics for symbolic hops.
// Callers that need cross-backend symbolic resolution (for example in a
// chain of stores) should prefer repeatedly calling Resolve.
ResolveFully(name string) (ref.Detached, error)
// List returns references matching pattern.
//
// The exact pattern language is backend-defined.
List(pattern string) ([]ref.Ref, error)
// Close releases resources associated with the store.
Close() error
}