Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPClientFromContext ¶
func SetupConsoleLogger ¶
func SetupConsoleLogger(c *cli.Context) error
SetupConsoleLogger sets up the console logger.
Types ¶
type Author ¶
type Author struct { Name string `json:"name,omitempty"` Email string `json:"email,omitempty"` Avatar string `json:"avatar,omitempty"` }
Author defines runtime metadata for a commit author.
type Commit ¶
type Commit struct { Sha string `json:"sha,omitempty"` Ref string `json:"ref,omitempty"` Refspec string `json:"refspec,omitempty"` PullRequest string `json:"pull_request,omitempty"` SourceBranch string `json:"source_branch,omitempty"` TargetBranch string `json:"target_branch,omitempty"` Branch string `json:"branch,omitempty"` Tag string `json:"tag,omitempty"` Message string `json:"message,omitempty"` Author Author `json:"author,omitempty"` }
Commit defines runtime metadata for a commit.
type ExecuteFunc ¶
ExecuteFunc defines the function that is executed by the plugin.
type Metadata ¶
type Metadata struct { Repository Repository `json:"repo,omitempty"` Pipeline Pipeline `json:"curr,omitempty"` Curr Commit `json:"commit,omitempty"` Prev Commit `json:"prev,omitempty"` Step Step `json:"step,omitempty"` System System `json:"sys,omitempty"` }
Metadata defines runtime metadata.
func MetadataFromContext ¶
func MetadataFromContext(ctx *cli.Context) Metadata
MetadataFromContext creates a Metadata from the cli.Context.
type Options ¶
type Options struct { // Name of the plugin. Name string // Description of the plugin. Description string // Version of the plugin. Version string // Flags of the plugin. Flags []cli.Flag // Execute function of the plugin. Execute ExecuteFunc }
Options defines the options for the plugin.
type Pipeline ¶
type Pipeline struct { Number int64 `json:"number,omitempty"` Status string `json:"status,omitempty"` Event string `json:"event,omitempty"` Link string `json:"link,omitempty"` DeployTarget string `json:"target,omitempty"` Created time.Time `json:"created,omitempty"` Started time.Time `json:"started,omitempty"` Finished time.Time `json:"finished,omitempty"` Parent int64 `json:"parent,omitempty"` }
Pipeline defines runtime metadata for a pipeline.
type Plugin ¶
type Plugin struct { // Metadata of the current pipeline. Metadata Metadata // contains filtered or unexported fields }
Plugin defines the plugin instance.
func (*Plugin) HTTPClient ¶
HTTPClient returns the http.Client instance.
type Repository ¶
type Repository struct { Name string `json:"name,omitempty"` Owner string `json:"owner,omitempty"` Link string `json:"link,omitempty"` CloneURL string `json:"clone_url,omitempty"` Private bool `json:"private,omitempty"` Branch string `json:"default_branch,omitempty"` }
Repository defines runtime metadata for a repository.
Click to show internal directories.
Click to hide internal directories.