api

package
v0.0.0-...-0b82c43 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2016 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildData

type BuildData struct {
	Number       int          `json:"number"`
	Status       string       `json:"status"`
	Created      int64        `json:"created"`
	Finished     int64        `json:"finished"`
	Event        string       `json:"event"`
	Author       string       `json:"author"`
	Commit       string       `json:"commit"`
	CurrentStage int          `json:"current_stage"`
	Stages       []*StageData `json:"stages"`
}

type Config

type Config struct {
	Host   string
	Token  string
	Secret string
}

func GetConfigFromFile

func GetConfigFromFile(file string) (*Config, error)

func (*Config) CreateBuild

func (c *Config) CreateBuild(client *http.Client, owner, repo string) error

func (*Config) CreatePipeline

func (c *Config) CreatePipeline(client *http.Client, pipeline *PipelineData) error

func (*Config) DeleteBuild

func (c *Config) DeleteBuild(client *http.Client, pipelineName string, buildNumber string) error

func (*Config) DeletePipeline

func (c *Config) DeletePipeline(client *http.Client, pipelineName string) error

func (*Config) GetBuild

func (c *Config) GetBuild(client *http.Client, owner, repo string, buildNumber int) (*BuildData, error)

func (*Config) GetBuilds

func (c *Config) GetBuilds(client *http.Client, owner, repo string) ([]*BuildData, error)

func (*Config) GetPipeline

func (c *Config) GetPipeline(client *http.Client, pipelineName string) (*PipelineData, error)

func (*Config) GetPipelines

func (c *Config) GetPipelines(client *http.Client, pipelineName string) ([]*PipelineData, error)

func (*Config) GetRepos

func (c *Config) GetRepos(client *http.Client) ([]*RepoData, error)

func (*Config) GetStages

func (c *Config) GetStages(client *http.Client, owner, repo string, buildNumber int) ([]*StageData, error)

func (*Config) ResumeBuild

func (c *Config) ResumeBuild(client *http.Client, owner, repo string, buildNumber int) error

type Error

type Error struct {
	Code    int    `json:"Code"`
	Message string `json:"Message"`
}

type PipelineData

type PipelineData struct {
	ID          string     `json:"id"`
	Owner       string     `json:"owner"`
	Repo        string     `json:"repo"`
	Events      []string   `json:"events"`
	Login       string     `json:"login"`
	LatestBuild *BuildData `json:"latest_build"`
}

type RepoData

type RepoData struct {
	Owner string `json:"owner"`
	Name  string `json:"name"`
}

type StageData

type StageData struct {
	Index     int    `json:"index"`
	Name      string `json:"name"`
	Type      string `json:"type"`
	Status    string `json:"status"`
	Started   int64  `json:"start-time"`
	Finished  int64  `json:"end-time"`
	JobName   string `json:"job_name"`
	Namespace string `json:"namespace"`
	PodName   string `json:"pod_name"`
}

Jump to

Keyboard shortcuts

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