Documentation ¶
Index ¶
Constants ¶
View Source
const ( EventPush = "push" EventPull = "pull_request" EventTag = "tag" EventDeploy = "deployment" )
Event types corresponding to scm hooks.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 Build ¶
type Build struct { Number int `json:"number,omitempty"` Created int64 `json:"created,omitempty"` Started int64 `json:"started,omitempty"` Finished int64 `json:"finished,omitempty"` Timeout int64 `json:"timeout,omitempty"` Status string `json:"status,omitempty"` Event string `json:"event,omitempty"` Link string `json:"link,omitempty"` Target string `json:"target,omitempty"` Trusted bool `json:"trusted,omitempty"` Commit Commit `json:"commit,omitempty"` Parent int `json:"parent,omitempty"` }
Build defines runtime metadata for a build.
type Commit ¶
type Commit struct { Sha string `json:"sha,omitempty"` Ref string `json:"ref,omitempty"` Refspec string `json:"refspec,omitempty"` Branch string `json:"branch,omitempty"` Message string `json:"message,omitempty"` Author Author `json:"author,omitempty"` }
Commit defines runtime metadata for a commit.
type Job ¶
type Job struct { Number int `json:"number,omitempty"` Matrix map[string]string `json:"matrix,omitempty"` }
Job defines runtime metadata for a job.
type Metadata ¶
type Metadata struct { ID string `json:"id,omitempty"` Repo Repo `json:"repo,omitempty"` Curr Build `json:"curr,omitempty"` Prev Build `json:"prev,omitempty"` Job Job `json:"job,omitempty"` Sys System `json:"sys,omitempty"` }
Metadata defines runtime m.
func (*Metadata) EnvironDrone ¶
EnvironDrone returns metadata as a map of DRONE_ environment variables. TODO: This is here for backward compatibility and will eventually be removed.
type Repo ¶
type Repo struct { Name string `json:"name,omitempty"` Link string `json:"link,omitempty"` Remote string `json:"remote,omitempty"` Private bool `json:"private,omitempty"` Secrets []Secret `json:"secrets,omitempty"` Branch string `json:"default_branch,omitempty"` }
Repo defines runtime metadata for a repository.
Click to show internal directories.
Click to hide internal directories.