Documentation
¶
Overview ¶
Package projects will manage project registration and lookup behavior.
Index ¶
- type AddInput
- type AddResult
- type AmbiguousProjectIdentifierError
- type CapturePullRequestSnapshotFunc
- type CapturePullRequestSnapshotInput
- type DetectRepoFunc
- type GetBranchProtectionFunc
- type GetRepositorySettingsFunc
- type ListOpenPullRequestsFunc
- type ListOpenPullRequestsInput
- type ListWorktreesFunc
- type ProjectIDCollisionError
- type ProjectNotFoundError
- type ProjectValidationError
- type PullRequestSummary
- type Service
- func (s *Service) AddProject(ctx context.Context, input AddInput) (AddResult, error)
- func (s *Service) Get(ctx context.Context, id string) (*storage.ProjectRecord, error)
- func (s *Service) List(ctx context.Context) ([]storage.ProjectRecord, error)
- func (s *Service) RemoveProject(ctx context.Context, identifier string) (storage.ProjectRecord, error)
- func (s *Service) SyncConfigured(ctx context.Context, cfg config.Config, now time.Time) error
- type SnapshotMode
- type WorktreeListEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmbiguousProjectIdentifierError ¶
type AmbiguousProjectIdentifierError struct{ Identifier string }
func (AmbiguousProjectIdentifierError) Error ¶
func (e AmbiguousProjectIdentifierError) Error() string
type CapturePullRequestSnapshotFunc ¶
type CapturePullRequestSnapshotFunc func(context.Context, CapturePullRequestSnapshotInput) (storage.PullRequestSnapshotRecord, error)
type GetBranchProtectionFunc ¶ added in v0.8.0
type GetBranchProtectionFunc func(context.Context, githubinfra.BranchProtectionInput) (githubinfra.BranchProtection, error)
type GetRepositorySettingsFunc ¶ added in v0.8.0
type GetRepositorySettingsFunc func(context.Context, githubinfra.RepositorySettingsInput) (githubinfra.RepositorySettings, error)
type ListOpenPullRequestsFunc ¶
type ListOpenPullRequestsFunc func(context.Context, ListOpenPullRequestsInput) ([]PullRequestSummary, error)
type ListWorktreesFunc ¶
type ListWorktreesFunc func(context.Context, string) ([]WorktreeListEntry, error)
type ProjectIDCollisionError ¶
type ProjectIDCollisionError struct{ ProjectID string }
func (ProjectIDCollisionError) Error ¶
func (e ProjectIDCollisionError) Error() string
type ProjectNotFoundError ¶
type ProjectNotFoundError struct{ Identifier string }
func (ProjectNotFoundError) Error ¶
func (e ProjectNotFoundError) Error() string
type ProjectValidationError ¶
type ProjectValidationError struct{ Message string }
func (ProjectValidationError) Error ¶
func (e ProjectValidationError) Error() string
type PullRequestSummary ¶
type Service ¶
type Service struct {
DB *sql.DB
Repos *storage.Repositories
Logger bootstrap.Logger
Config config.Config
Now func() time.Time
DetectRepo DetectRepoFunc
GetRepositorySettings GetRepositorySettingsFunc
GetBranchProtection GetBranchProtectionFunc
ListWorktrees ListWorktreesFunc
ListOpenPullRequests ListOpenPullRequestsFunc
CapturePullRequestSnapshot CapturePullRequestSnapshotFunc
AsyncSnapshotQueueEnabled func() bool
}
func (*Service) AddProject ¶
func (*Service) RemoveProject ¶
type SnapshotMode ¶
type SnapshotMode string
const ( SnapshotModeAsync SnapshotMode = "async" SnapshotModeFull SnapshotMode = "full" SnapshotModeOff SnapshotMode = "off" )
Click to show internal directories.
Click to hide internal directories.