frontend

package
v0.8.96 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

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) Environ

func (m *Metadata) Environ() map[string]string

Environ returns the metadata as a map of environment variables.

func (*Metadata) EnvironDrone

func (m *Metadata) EnvironDrone() map[string]string

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.

type Secret

type Secret struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
	Mount string `json:"mount,omitempty"`
	Mask  bool   `json:"mask,omitempty"`
}

Secret defines a runtime secret

type System

type System struct {
	Name    string `json:"name,omitempty"`
	Host    string `json:"host,omitempty"`
	Link    string `json:"link,omitempty"`
	Arch    string `json:"arch,omitempty"`
	Version string `json:"version,omitempty"`
}

System defines runtime metadata for a ci/cd system.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL