repo.go

 1package store
 2
 3import (
 4	"time"
 5
 6	"github.com/charmbracelet/soft-serve/git"
 7)
 8
 9// Repository is a Git repository interface.
10type Repository interface {
11	// Name returns the repository's name.
12	Name() string
13	// ProjectName returns the repository's project name.
14	ProjectName() string
15	// Description returns the repository's description.
16	Description() string
17	// IsPrivate returns whether the repository is private.
18	IsPrivate() bool
19	// IsMirror returns whether the repository is a mirror.
20	IsMirror() bool
21	// IsHidden returns whether the repository is hidden.
22	IsHidden() bool
23	// UpdatedAt returns the time the repository was last updated.
24	// If the repository has never been updated, it returns the time it was created.
25	UpdatedAt() time.Time
26	// Open returns the underlying git.Repository.
27	Open() (*git.Repository, error)
28}