1package proto
 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	// ID returns the repository's ID.
12	ID() int64
13	// Name returns the repository's name.
14	Name() string
15	// ProjectName returns the repository's project name.
16	ProjectName() string
17	// Description returns the repository's description.
18	Description() string
19	// IsPrivate returns whether the repository is private.
20	IsPrivate() bool
21	// IsMirror returns whether the repository is a mirror.
22	IsMirror() bool
23	// IsHidden returns whether the repository is hidden.
24	IsHidden() bool
25	// UserID returns the ID of the user who owns the repository.
26	// It returns 0 if the repository is not owned by a user.
27	UserID() int64
28	// UpdatedAt returns the time the repository was last updated.
29	// If the repository has never been updated, it returns the time it was created.
30	UpdatedAt() time.Time
31	// Open returns the underlying git.Repository.
32	Open() (*git.Repository, error)
33}
34
35// RepositoryOptions are options for creating a new repository.
36type RepositoryOptions struct {
37	Private     bool
38	Description string
39	ProjectName string
40	Mirror      bool
41	Hidden      bool
42	LFS         bool
43	LFSEndpoint string
44}