Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GithubConfig ¶
GithubConfig hold the Github configuration
type GitlabConfig ¶
GitlabConfig hold the Gitlab configuration
type Platform ¶
type Platform interface { CheckAllStatusSucceeded(string, string, string, []string) (bool, error) CreateFile(string, string, string, string, string, string) error UpdateFile(string, string, string, string, string, string) error CreateIssue(string, string, *Issue) error CreateRelease(string, string, *Release) (*Release, error) CreateRepository(string, string, string) error CreateStatus(string, string, *Status) error DeleteRepository(string, string) error GetStatus(string, string, string, string) (*Status, error) ListDraftReleases(string, string) ([]*Release, error) ListIssuesByAuthor(string, string, interface{}) ([]*Issue, error) ListReleases(string, string) ([]*Release, error) ListStatuses(string, string, string) ([]*Status, error) PublishRelease(string, string, *Release) (bool, error) ReadFile(string, string, string) (io.Reader, error) UpdateIssue(string, string, *Issue) error UpdateRelease(string, string, *Release) error }
Platform interface Github and Gitlab
func NewGithub ¶
func NewGithub(config *GithubConfig) (platform Platform, err error)
NewGithub returns an instance of platform
func NewGitlab ¶
func NewGitlab(config *GitlabConfig) (platform Platform, err error)
NewGitlab returns an instance of platform
type Release ¶
type Release struct { // CommitSha attached to the release CommitSha string // ID of the release, Github use an int, Gitlab use a string ID interface{} // Name of the release Name string // Platform, either github or gitlab Platform string // Tag associated to the release Tag string // ReleaseNote attached to the release ReleaseNote string // Draft represent the state of the release. For Gitlab it translates to a // future release Draft bool }
Release represent a release regarding the platform
type Status ¶
type Status struct { // CommitSha CommitSha string // Name of the status Name string // State is only used by Github checks, must be one of action_required, // cancelled, failure, neutral, success, skipped, stale, timed_out State string // Status the commit status: // For Github must be one of: queued, in_progress or completed // For Gitlab must be one of: pending, running, success, failed or cancelled Status string }
Status contains commit status informations
Click to show internal directories.
Click to hide internal directories.