Versions in this module Expand all Collapse all v0 v0.2.53 Oct 28, 2026 v0.2.52 Oct 28, 2026 Changes in this version + const ZeroOID + var ErrNotFound = errors.New("gitstore: not found") + func Register(name string, c Constructor) + type Actor struct + Credential string + Principal string + Source string + Stack string + type Config struct + DBPath string + type Constructor func(Config) (*Store, error) + type ErrRefMoved struct + Current string + Name string + func (e *ErrRefMoved) Error() string + type Object struct + Inline []byte + OID string + SHA256 string + Size int64 + Type string + type Quotas struct + MaxObjectBytes int64 + MaxObjects int64 + MaxPackBytes int64 + MaxRepoBytes int64 + type Ref struct + Credential string + Name string + OID string + UpdatedAt time.Time + UpdatedBy string + type RefLogEntry struct + At time.Time + Credential string + ID string + Name string + New string + Old string + Principal string + Source string + Stack string + type RefUpdate struct + Name string + New string + Old string + type Repo struct + CreatedAt time.Time + CreatedBy string + Head string + ID string + Name string + PolicyPush string + Principal string + Quotas Quotas + Tenant string + type Store struct + func NewStore(db *sql.DB, d registry.Dialect) *Store + func Open(name string, cfg Config) (*Store, error) + func OpenSQLiteFile(path string) (*Store, error) + func (s *Store) Close() error + func (s *Store) CompareAndSetRefs(ctx context.Context, repoID string, updates []RefUpdate, by Actor) error + func (s *Store) CreateRepo(ctx context.Context, r Repo) (Repo, bool, error) + func (s *Store) DB() *sql.DB + func (s *Store) EnsureSchema(ctx context.Context) error + func (s *Store) GetObject(ctx context.Context, repoID, oid string) (Object, bool, error) + func (s *Store) GetRef(ctx context.Context, repoID, name string) (Ref, bool, error) + func (s *Store) GetRepo(ctx context.Context, tenant, name string) (Repo, bool, error) + func (s *Store) GetRepoByID(ctx context.Context, id string) (Repo, bool, error) + func (s *Store) ListObjects(ctx context.Context, repoID, typ string) ([]Object, error) + func (s *Store) ListRefs(ctx context.Context, repoID string) ([]Ref, error) + func (s *Store) ListRepos(ctx context.Context, tenant string) ([]Repo, error) + func (s *Store) ObjectStats(ctx context.Context, repoID string) (count, bytes int64, err error) + func (s *Store) PutObjects(ctx context.Context, repoID string, objs []Object) error + func (s *Store) RefLog(ctx context.Context, repoID string, limit int) ([]RefLogEntry, error) + func (s *Store) RemoveRepo(ctx context.Context, id string) error + func (s *Store) SetClock(now func() time.Time)