client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	Result    string `json:"result,omitempty"`
	Number    int    `json:"number,omitempty"`
	Timestamp int64  `json:"timestamp,omitempty"`
}

Build describes a build from the Jenkins API.

type Client

type Client struct {
	Baseurl  string `json:"base_url"`
	Username string `json:"username"`
	Token    string `json:"token"`
}

Client contains the information for connecting to a jenkins instance

func New

func New(uri, username, token string) *Client

New provides a jenkins client

func (*Client) GetJobs

func (c *Client) GetJobs(jenkinsView string) ([]Job, error)

GetJobs gets the jobs for a given Jenkins view.

type Job

type Job struct {
	Name        string `json:"name,omitempty"`
	DisplayName string `json:"fullDisplayName,omitempty"`
	LastBuild   Build  `json:"lastBuild,omitempty"`
}

Job describes a job object from the Jenkins API.

type View

type View struct {
	Name string `json:"name,omitempty"`
	Jobs []Job  `json:"jobs,omitempty"`
}

View describes what a view looks like

type ViewsResponse

type ViewsResponse struct {
	Views []View `json:"views,omitempty"`
}

ViewsResponse describes a response for Views.

Jump to

Keyboard shortcuts

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