Documentation ¶
Index ¶
- type AgentLabel
- type AvailablePlugin
- type AvailablePluginList
- type Cause
- type CauseAction
- type CenterSite
- type CoreClient
- type DefaultParameterValue
- type InstallStates
- type InstallStatesData
- type InstallStatesJob
- type InstallationJob
- type InstallationJobStatus
- type InstalledPlugin
- type InstalledPluginList
- type JenkinsCore
- type JenkinsCrumb
- type JenkinsStatus
- type JenkinsStatusClient
- type Job
- type JobBuild
- type JobCategory
- type JobCategoryItem
- type JobClient
- func (q *JobClient) Build(jobName string) (err error)
- func (q *JobClient) BuildWithParams(jobName string, parameters []ParameterDefinition) (err error)
- func (q *JobClient) Create(jobName string, jobType string) (err error)
- func (q *JobClient) Delete(jobName string) (err error)
- func (q *JobClient) GetBuild(jobName string, id int) (job *JobBuild, err error)
- func (q *JobClient) GetHistory(name string) (builds []JobBuild, err error)
- func (q *JobClient) GetJob(name string) (job *Job, err error)
- func (q *JobClient) GetJobTypeCategories() (jobCategories []JobCategory, err error)
- func (q *JobClient) GetPipeline(name string) (pipeline *Pipeline, err error)
- func (q *JobClient) Log(jobName string, history int, start int64) (jobLog JobLog, err error)
- func (q *JobClient) Search(keyword string) (status *SearchResult, err error)
- func (q *JobClient) StopJob(jobName string, num int) (err error)
- func (q *JobClient) UpdatePipeline(name, script string) (err error)
- type JobLog
- type JobQueue
- type ParameterDefinition
- type ParametersDefinitionProperty
- type Pipeline
- type Plugin
- type PluginAPI
- type PluginDependency
- type PluginInfo
- type PluginInfoStats
- type PluginInstallationInfo
- type PluginManager
- func (p *PluginManager) CheckUpdate(handle func(*http.Response))
- func (p *PluginManager) GetAvailablePlugins() (pluginList *AvailablePluginList, err error)
- func (p *PluginManager) GetPlugins() (pluginList *InstalledPluginList, err error)
- func (p *PluginManager) InstallPlugin(names []string) (err error)
- func (p *PluginManager) UninstallPlugin(name string) (err error)
- func (p *PluginManager) Upload(pluginFile string)
- type QueueClient
- type QueueItem
- type SearchResult
- type SearchResultItem
- type SimpleJobBuild
- type Token
- type TokenData
- type UpdateCenter
- type UpdateCenterJob
- type UpdateCenterManager
- type User
- type UserClient
- func (q *UserClient) Create(username string) (user *UserForCreate, err error)
- func (q *UserClient) CreateToken(newTokenName string) (status *Token, err error)
- func (q *UserClient) Delete(username string) (err error)
- func (q *UserClient) EditDesc(description string) (err error)
- func (q *UserClient) Get() (status *User, err error)
- type UserForCreate
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentLabel ¶ added in v0.0.18
type AgentLabel struct {
Name string
}
type AvailablePlugin ¶ added in v0.0.18
type AvailablePluginList ¶ added in v0.0.18
type AvailablePluginList struct { Data []AvailablePlugin Status 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 CoreClient ¶ added in v0.0.18
type CoreClient struct {
JenkinsCore
}
func (*CoreClient) Restart ¶ added in v0.0.18
func (q *CoreClient) Restart() (err error)
Search find a set of jobs by name
type DefaultParameterValue ¶ added in v0.0.18
type DefaultParameterValue struct { Description string Value interface{} }
type InstallStates ¶ added in v0.0.18
type InstallStates struct { Data InstallStatesData Status string }
type InstallStatesData ¶ added in v0.0.18
type InstallStatesData struct { Jobs InstallStatesJob State string }
type InstallStatesJob ¶ added in v0.0.18
type InstallationJob ¶ added in v0.0.18
type InstallationJob struct { UpdateCenterJob Name string Status InstallationJobStatus }
type InstallationJobStatus ¶ added in v0.0.18
type InstalledPlugin ¶ added in v0.0.18
type InstalledPlugin struct { Plugin Enable bool ShortName string LongName string Version string URL string HasUpdate bool Pinned bool RequiredCoreVesion string MinimumJavaVersion string SupportDynamicLoad string BackVersion string }
InstalledPlugin represent the installed plugin from Jenkins
type InstalledPluginList ¶ added in v0.0.18
type InstalledPluginList struct {
Plugins []InstalledPlugin
}
PluginList represent a list of plugins
type JenkinsCore ¶
type JenkinsCore struct { JenkinsCrumb URL string UserName string Token string Proxy string ProxyAuth string Debug bool }
func (*JenkinsCore) AuthHandle ¶
func (j *JenkinsCore) AuthHandle(request *http.Request) (err error)
func (*JenkinsCore) CrumbHandle ¶
func (j *JenkinsCore) CrumbHandle(request *http.Request) error
func (*JenkinsCore) GetClient ¶ added in v0.0.10
func (j *JenkinsCore) GetClient() (client *http.Client)
func (*JenkinsCore) GetCrumb ¶
func (j *JenkinsCore) GetCrumb() (*JenkinsCrumb, error)
func (*JenkinsCore) ProxyHandle ¶ added in v0.0.18
func (j *JenkinsCore) ProxyHandle(request *http.Request)
type JenkinsCrumb ¶
type JenkinsStatus ¶ added in v0.0.18
type JenkinsStatusClient ¶ added in v0.0.18
type JenkinsStatusClient struct {
JenkinsCore
}
func (*JenkinsStatusClient) Get ¶ added in v0.0.18
func (q *JenkinsStatusClient) Get() (status *JenkinsStatus, err error)
type JobBuild ¶ added in v0.0.10
type JobBuild struct { SimpleJobBuild Building bool Description string DisplayName string Duration int64 EstimatedDuration int64 FullDisplayName string ID string KeepLog bool QueueID int Result string Timestamp int64 PreviousBuild SimpleJobBuild NextBuild SimpleJobBuild }
type JobCategory ¶ added in v0.0.18
type JobCategoryItem ¶ added in v0.0.18
type JobClient ¶ added in v0.0.10
type JobClient struct {
JenkinsCore
}
func (*JobClient) BuildWithParams ¶ added in v0.0.18
func (q *JobClient) BuildWithParams(jobName string, parameters []ParameterDefinition) (err error)
func (*JobClient) GetHistory ¶ added in v0.0.10
func (*JobClient) GetJobTypeCategories ¶ added in v0.0.18
func (q *JobClient) GetJobTypeCategories() (jobCategories []JobCategory, err error)
func (*JobClient) GetPipeline ¶ added in v0.0.18
func (*JobClient) Search ¶ added in v0.0.10
func (q *JobClient) Search(keyword string) (status *SearchResult, err error)
Search find a set of jobs by name
func (*JobClient) UpdatePipeline ¶ added in v0.0.18
type ParameterDefinition ¶ added in v0.0.18
type ParameterDefinition struct { Description string Name string `json:"name"` Type string Value string `json:"value"` DefaultParameterValue DefaultParameterValue }
type ParametersDefinitionProperty ¶ added in v0.0.18
type ParametersDefinitionProperty struct {
ParameterDefinitions []ParameterDefinition
}
type PluginAPI ¶ added in v0.0.18
type PluginAPI struct {
// contains filtered or unexported fields
}
func (*PluginAPI) DownloadPlugins ¶ added in v0.0.18
DownloadPlugins will download those plugins from update center
type PluginDependency ¶ added in v0.0.18
type PluginInfo ¶ added in v0.0.18
type PluginInfo struct { BuildDate string `json:"buildDate"` Dependencies []PluginDependency `json:"dependencies"` Excerpt string `json:"excerpt"` FirstRelease string `json:"firstRelease"` Gav string `json:"gav"` Name string `json:"name"` PreviousTimestamp string `json:"previousTimestamp"` PreviousVersion string `json:"previousVersion"` ReleaseTimestamp string `json:"releaseTimestamp"` RequireCore string `json:"RequireCore"` Title string `json:"title"` URL string `json:"url"` Version string `json:"version"` Stats PluginInfoStats }
type PluginInfoStats ¶ added in v0.0.18
type PluginInfoStats struct { CurrentInstalls int Installations []PluginInstallationInfo InstallationsPerVersion []PluginInstallationInfo InstallationsPercentage []PluginInstallationInfo InstallationsPercentagePerVersion []PluginInstallationInfo Trend int }
type PluginInstallationInfo ¶ added in v0.0.18
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) GetAvailablePlugins ¶ added in v0.0.18
func (p *PluginManager) GetAvailablePlugins() (pluginList *AvailablePluginList, err error)
func (*PluginManager) GetPlugins ¶
func (p *PluginManager) GetPlugins() (pluginList *InstalledPluginList, 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
func (*PluginManager) Upload ¶ added in v0.0.18
func (p *PluginManager) Upload(pluginFile string)
Upload will upload a file from local filesystem into Jenkins
type QueueClient ¶
type QueueClient struct {
JenkinsCore
}
func (*QueueClient) Get ¶
func (q *QueueClient) Get() (status *JobQueue, err error)
type SearchResult ¶ added in v0.0.10
type SearchResult struct {
Suggestions []SearchResultItem
}
type SearchResultItem ¶ added in v0.0.10
type SearchResultItem struct {
Name string
}
type SimpleJobBuild ¶ added in v0.0.18
type UpdateCenter ¶
type UpdateCenter struct { Availables []Plugin Jobs []InstallationJob RestartRequiredForCompletion bool Sites []CenterSite }
UpdateCenter represents the update center of Jenkins
type UpdateCenterJob ¶
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)
func (*UpdateCenterManager) Upgrade ¶ added in v0.0.19
func (u *UpdateCenterManager) Upgrade() (err error)
Upgrade the Jenkins core
type UserClient ¶ added in v0.0.18
type UserClient struct {
JenkinsCore
}
func (*UserClient) Create ¶ added in v0.0.18
func (q *UserClient) Create(username string) (user *UserForCreate, err error)
func (*UserClient) CreateToken ¶ added in v0.0.18
func (q *UserClient) CreateToken(newTokenName string) (status *Token, err error)
func (*UserClient) Delete ¶ added in v0.0.18
func (q *UserClient) Delete(username string) (err error)
func (*UserClient) EditDesc ¶ added in v0.0.18
func (q *UserClient) EditDesc(description string) (err error)
func (*UserClient) Get ¶ added in v0.0.18
func (q *UserClient) Get() (status *User, err error)