collab.go

 1package proto
 2
 3import "github.com/charmbracelet/soft-serve/pkg/access"
 4
 5// CollaboratorType is a collaborator type.
 6type CollaboratorType int
 7
 8const (
 9	// CollaboratorTypeUser is a user collaborator.
10	CollaboratorTypeUser CollaboratorType = iota
11	// CollaboratorTypeTeam is a team collaborator.
12	CollaboratorTypeTeam
13)
14
15// Collaborator is an interface representing a collaborator.
16type Collaborator interface {
17	// ID returns the collaborator's ID.
18	ID() int64
19	// Type returns the collaborator's type.
20	Type() CollaboratorType
21	// RepoID returns the repository ID.
22	RepoID() int64
23	// AccessLevel returns the collaborator's access level for the repository.
24	AccessLevel() access.AccessLevel
25}