Documentation ¶
Index ¶
- Variables
- type LabelStore
- func (s *LabelStore) EnsureLabelsForRepository(repository *domain.GitRepository, labels domain.LabelSet) error
- func (s *LabelStore) FetchLabelsForRepository(repository *domain.GitRepository) (domain.LabelSet, error)
- func (s *LabelStore) RemoveLabelsFromRepository(repository *domain.GitRepository, labels domain.LabelSet) error
- type ProviderMap
- type PullRequestStore
- type Remote
- type RemoteProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrProviderNotSupported = errors.New("no remote provider found")
Functions ¶
This section is empty.
Types ¶
type LabelStore ¶
type LabelStore struct {
// contains filtered or unexported fields
}
func NewLabelStore ¶
func NewLabelStore(providers ProviderMap) *LabelStore
func (*LabelStore) EnsureLabelsForRepository ¶
func (s *LabelStore) EnsureLabelsForRepository(repository *domain.GitRepository, labels domain.LabelSet) error
func (*LabelStore) FetchLabelsForRepository ¶
func (s *LabelStore) FetchLabelsForRepository(repository *domain.GitRepository) (domain.LabelSet, error)
func (*LabelStore) RemoveLabelsFromRepository ¶
func (s *LabelStore) RemoveLabelsFromRepository(repository *domain.GitRepository, labels domain.LabelSet) error
type ProviderMap ¶
type ProviderMap map[RemoteProvider]Remote
type PullRequestStore ¶
type PullRequestStore struct {
// contains filtered or unexported fields
}
func NewPullRequestStore ¶
func NewPullRequestStore(providers ProviderMap) *PullRequestStore
func (*PullRequestStore) EnsurePullRequest ¶
func (p *PullRequestStore) EnsurePullRequest(repository *domain.GitRepository) error
func (*PullRequestStore) FindMatchingPullRequest ¶
func (p *PullRequestStore) FindMatchingPullRequest(repository *domain.GitRepository) (*domain.PullRequest, error)
type Remote ¶
type Remote interface { // FetchLabels returns the domain.LabelSet found for the given repository. // An empty set without error is returned if none found. FetchLabels(repository *domain.GitRepository) (domain.LabelSet, error) DeleteLabels(repository *domain.GitRepository, labels domain.LabelSet) error EnsureLabels(repository *domain.GitRepository, labels domain.LabelSet) error // FindPullRequest returns a remote-specific domain.PullRequest or nil if none matching the branches exist remotely. FindPullRequest(repository *domain.GitRepository) (*domain.PullRequest, error) // EnsurePullRequest creates or updates the given domain.PullRequest. // The same rules as domain.PullRequestStore:EnsurePullRequest applies. EnsurePullRequest(repository *domain.GitRepository, pr *domain.PullRequest) error // HasSupportFor returns true if the remote implementation supports interacting with the remote API for the given repository URL. HasSupportFor(url *domain.GitURL) bool }
type RemoteProvider ¶
type RemoteProvider string
Click to show internal directories.
Click to hide internal directories.