client

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cause

type Cause struct {
	UpstreamUrl      string
	UpstreamProject  string
	UpstreamBuild    int
	ShortDescription string
}

type CauseAction

type CauseAction struct {
	Causes []Cause
}

type CenterSite

type CenterSite struct {
	ConnectionCheckURL string `json:"connectionCheckUrl"`
	HasUpdates         bool
	ID                 string `json:"id"`
	URL                string `json:"url"`
}

CenterSite represents the site of update center

type JenkinsCore

type JenkinsCore struct {
	JenkinsCrumb
	URL      string
	UserName string
	Token    string
}

func (*JenkinsCore) AuthHandle

func (j *JenkinsCore) AuthHandle(request *http.Request)

func (*JenkinsCore) CrumbHandle

func (j *JenkinsCore) CrumbHandle(request *http.Request) error

func (*JenkinsCore) GetCrumb

func (j *JenkinsCore) GetCrumb() (*JenkinsCrumb, error)

type JenkinsCrumb

type JenkinsCrumb struct {
	CrumbRequestField string
	Crumb             string
}

type JobQueue

type JobQueue struct {
	Items []QueueItem
}

type Plugin

type Plugin struct {
	Active             bool
	ShortName          string
	LongName           string
	Version            string
	URL                string
	HasUpdate          bool
	Enable             bool
	Downgradable       bool
	Pinned             bool
	RequiredCoreVesion string
	MinimumJavaVersion string
	SupportDynamicLoad string
	Deleted            bool
	Bundled            bool
	BackVersion        string
}

Plugin represent the plugin from Jenkins

type PluginList

type PluginList struct {
	Plugins []Plugin
}

PluginList represent a list of plugins

type PluginManager

type PluginManager struct {
	JenkinsCore
}

func (*PluginManager) CheckUpdate

func (p *PluginManager) CheckUpdate(handle func(*http.Response))

CheckUpdate fetch the lastest plugins from update center site

func (*PluginManager) GetPlugins

func (p *PluginManager) GetPlugins() (pluginList *PluginList, err error)

func (*PluginManager) InstallPlugin

func (p *PluginManager) InstallPlugin(names []string) (err error)

InstallPlugin install a plugin by name

func (*PluginManager) UninstallPlugin

func (p *PluginManager) UninstallPlugin(name string) (err error)

UninstallPlugin uninstall a plugin by name

type QueueClient

type QueueClient struct {
	JenkinsCore
}

func (*QueueClient) Get

func (q *QueueClient) Get() (status *JobQueue, err error)

type QueueItem

type QueueItem struct {
	Blocked                    bool
	Buildable                  bool
	ID                         int
	Params                     string
	Pending                    bool
	Stuck                      bool
	URL                        string
	Why                        string
	BuildableStartMilliseconds int64
	InQueueSince               int64
	Actions                    []CauseAction
}

type UpdateCenter

type UpdateCenter struct {
	Availables                   []Plugin
	Jobs                         []UpdateCenterJob
	RestartRequiredForCompletion bool
	Sites                        []CenterSite
}

UpdateCenter represents the update center of Jenkins

type UpdateCenterJob

type UpdateCenterJob struct {
	ErrorMessage string
	ID           int `json:"id"`
	Type         string
}

UpdateCenterJob represents the job for updateCenter which execute a task

type UpdateCenterManager

type UpdateCenterManager struct {
	JenkinsCore
}

UpdateCenterManager manages the UpdateCenter

func (*UpdateCenterManager) Status

func (u *UpdateCenterManager) Status() (status *UpdateCenter, err error)

Jump to

Keyboard shortcuts

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