Documentation ¶
Index ¶
- Constants
- type ColorConverter
- type GhRemote
- func (r *GhRemote) DeleteLabels(repository *domain.GitRepository, labels domain.LabelSet) error
- func (r *GhRemote) EnsureLabels(repository *domain.GitRepository, labels domain.LabelSet) error
- func (r *GhRemote) EnsurePullRequest(repository *domain.GitRepository, pr *domain.PullRequest) error
- func (r *GhRemote) FetchLabels(repository *domain.GitRepository) (domain.LabelSet, error)
- func (r *GhRemote) FindPullRequest(repository *domain.GitRepository) (*domain.PullRequest, error)
- func (r *GhRemote) HasSupportFor(url *domain.GitURL) bool
- type GitHubInstrumentation
- type LabelConverter
- type LabelSetConverter
- type PrConverter
Constants ¶
const ProviderKey githosting.RemoteProvider = "github"
ProviderKey is the identifier for the GitHub githosting.RemoteProvider.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColorConverter ¶
type ColorConverter struct{}
func (ColorConverter) ConvertFromEntity ¶
func (ColorConverter) ConvertFromEntity(color domain.Color) string
func (ColorConverter) ConvertToEntity ¶
func (ColorConverter) ConvertToEntity(color string) domain.Color
type GhRemote ¶
type GhRemote struct {
// contains filtered or unexported fields
}
GhRemote contains the methods and data to interact with the GitHub API.
func NewRemote ¶
func NewRemote(instrumentation *GitHubInstrumentation) *GhRemote
NewRemote returns a new GitHub provider instance.
func (*GhRemote) DeleteLabels ¶
DeleteLabels implements githosting.Remote.
func (*GhRemote) EnsureLabels ¶
EnsureLabels implements githosting.Remote.
func (*GhRemote) EnsurePullRequest ¶
func (r *GhRemote) EnsurePullRequest(repository *domain.GitRepository, pr *domain.PullRequest) error
func (*GhRemote) FetchLabels ¶
FetchLabels implements githosting.Remote.
func (*GhRemote) FindPullRequest ¶
func (r *GhRemote) FindPullRequest(repository *domain.GitRepository) (*domain.PullRequest, error)
type GitHubInstrumentation ¶
type GitHubInstrumentation struct {
// contains filtered or unexported fields
}
GitHubInstrumentation is responsible for logging interactions with GitHub API.
func NewGitHubInstrumentation ¶
func NewGitHubInstrumentation(factory logging.LoggerFactory) *GitHubInstrumentation
NewGitHubInstrumentation returns a new instance.
type LabelConverter ¶
type LabelConverter struct{}
LabelConverter converts domain.Label to github.Label and vice-versa
func (LabelConverter) ConvertFromEntity ¶
func (LabelConverter) ConvertFromEntity(label domain.Label) *github.Label
ConvertFromEntity converts the given object to another. Returns a nil if labels is empty or nil.
func (LabelConverter) ConvertToEntity ¶
func (LabelConverter) ConvertToEntity(label *github.Label) domain.Label
ConvertToEntity converts the given object to another. Returns a non-nil empty list if labels is empty or nil.
type LabelSetConverter ¶
type LabelSetConverter struct{}
LabelSetConverter converts domain.Label to github.Label and vice-versa
func (LabelSetConverter) ConvertFromEntity ¶
func (LabelSetConverter) ConvertFromEntity(labels domain.LabelSet) []*github.Label
ConvertFromEntity converts the given object to another. Returns a non-nil empty list if labels is empty or nil.
func (LabelSetConverter) ConvertToEntity ¶
func (LabelSetConverter) ConvertToEntity(labels []*github.Label) domain.LabelSet
ConvertToEntity converts the given object to another. Returns a non-nil empty list if labels is empty or nil.
type PrConverter ¶
type PrConverter struct{}
func (PrConverter) ConvertFromEntity ¶
func (c PrConverter) ConvertFromEntity(entity *domain.PullRequest) *github.PullRequest
ConvertFromEntity converts the given object to another. Returns a non-nil empty list if labels is empty or nil.
func (PrConverter) ConvertToEntity ¶
func (c PrConverter) ConvertToEntity(pr *github.PullRequest) *domain.PullRequest
ConvertToEntity converts the given object to another.