Documentation
¶
Index ¶
- type Actions
- type Artifacts
- type AssignedLabels
- type Author
- type Branch
- type Build
- type BuildItem
- func (b *BuildItem) Delete() error
- func (b *BuildItem) GetDescription() (string, error)
- func (b *BuildItem) GetJob() (*JobItem, error)
- func (b *BuildItem) GetResult() (string, error)
- func (b *BuildItem) IsBuilding() (bool, error)
- func (b *BuildItem) Kill() error
- func (b *BuildItem) LoopLog(f func(line string) error) error
- func (b *BuildItem) LoopProgressiveLog(kind string, f func(line string) error) error
- func (b *BuildItem) SetDescription(description string) error
- func (b *BuildItem) Stop() error
- func (b *BuildItem) Term() error
- type BuildsByBranchName
- type Causes
- type ChangeSet
- type ChangeSets
- type Client
- func (c *Client) BindAPIJson(params ReqParams, v interface{}) error
- func (c *Client) BuildJob(fullName string, params ReqParams) (*OneQueueItem, error)
- func (c *Client) CancelQuiteDown() error
- func (c *Client) CreateJob(fullName, xml string) error
- func (c *Client) DeleteJob(fullName string) error
- func (c *Client) Do(method, url string, v ...interface{}) (*req.Resp, error)
- func (c *Client) Exit() error
- func (c *Client) ExportJCasC(name string) error
- func (c *Client) GetCrumb() (*Crumb, error)
- func (c *Client) GetJob(fullName string) (*JobItem, error)
- func (c *Client) GetVersion() (string, error)
- func (c *Client) ListJobs(depth int) ([]*JobItem, error)
- func (c *Client) Name2URL(fullName string) string
- func (c *Client) QuiteDown() error
- func (c *Client) ReloadJCasC() error
- func (c *Client) Request(method, entry string, v ...interface{}) (*req.Resp, error)
- func (c *Client) Restart() error
- func (c *Client) RunScript(script string) (string, error)
- func (c *Client) SafeExit() error
- func (c *Client) SafeRestart() error
- func (c *Client) SetBasicAuth(username, password string)
- func (c *Client) SetContentType(ctype string)
- func (c *Client) String() string
- func (c *Client) URL2Name(url string) (string, error)
- func (c *Client) ValidateJenkinsfile(content string) (string, error)
- func (c *Client) WithContext(ctx context.Context) *Client
- type Computer
- type ComputerSet
- type Credential
- type CredentialService
- func (cs *CredentialService) Create(xml string) error
- func (cs *CredentialService) Delete(name string) error
- func (cs *CredentialService) Get(name string) (*Credential, error)
- func (cs *CredentialService) GetConfigure(name string) (string, error)
- func (cs *CredentialService) List() ([]*Credential, error)
- func (cs *CredentialService) SetConfigure(name, xml string) error
- type Credentials
- type Crumb
- type Culprits
- type CurrentExecutable
- type DefaultParameterValue
- type Executable
- type Executor
- type HealthReport
- type HudsonNodeMonitorsClockMonitor
- type HudsonNodeMonitorsDiskSpaceMonitor
- type HudsonNodeMonitorsResponseTimeMonitor
- type HudsonNodeMonitorsSwapSpaceMonitor
- type HudsonNodeMonitorsTemporarySpaceMonitor
- type Item
- type Items
- type Job
- type JobItem
- func (j *JobItem) Build(param ReqParams) (*OneQueueItem, error)
- func (j *JobItem) Copy(src, dest string) error
- func (j *JobItem) Create(name, xml string) error
- func (j *JobItem) Delete() error
- func (j *JobItem) Disable() error
- func (j *JobItem) Enable() error
- func (j *JobItem) Get(name string) (*JobItem, error)
- func (j *JobItem) GetBuild(number int) (*BuildItem, error)
- func (j *JobItem) GetBuildByName(name string) (*BuildItem, error)
- func (j *JobItem) GetConfigure() (string, error)
- func (j *JobItem) GetDescription() (string, error)
- func (j *JobItem) GetFirstBuild() (*BuildItem, error)
- func (j *JobItem) GetLastBuild() (*BuildItem, error)
- func (j *JobItem) GetLastCompleteBuild() (*BuildItem, error)
- func (j *JobItem) GetLastFailedBuild() (*BuildItem, error)
- func (j *JobItem) GetLastStableBuild() (*BuildItem, error)
- func (j *JobItem) GetLastSuccessfulBuild() (*BuildItem, error)
- func (j *JobItem) GetLastUnstableBuild() (*BuildItem, error)
- func (j *JobItem) GetLastUnsucessfulBuild() (*BuildItem, error)
- func (j *JobItem) GetMultibranchPipelineScanLog() (string, error)
- func (j *JobItem) GetParameters() ([]*ParameterDefinition, error)
- func (j *JobItem) GetParent() (*JobItem, error)
- func (j *JobItem) IsBuildable() (bool, error)
- func (j *JobItem) List(depth int) ([]*JobItem, error)
- func (j *JobItem) ListBuilds() ([]*BuildItem, error)
- func (j *JobItem) Move(path string) error
- func (j *JobItem) Rename(name string) error
- func (j *JobItem) SCMPolling() error
- func (j *JobItem) SetConfigure(xml string) error
- func (j *JobItem) SetDescription(description string) error
- func (j *JobItem) SetNextBuildNumber(number int) error
- type LastBuiltRevision
- type Marked
- type MonitorData
- type NodeService
- func (ns *NodeService) Delete(name string) error
- func (ns *NodeService) Disable(name, msg string) error
- func (ns *NodeService) Enable(name string) error
- func (ns *NodeService) Get(name string) (*Computer, error)
- func (ns *NodeService) GetBuilds() ([]*BuildItem, error)
- func (ns *NodeService) List() ([]*Computer, error)
- type Nodes
- type OneOffExecutor
- type OneQueueItem
- type ParameterDefinition
- type Parameters
- type Paths
- type Plugin
- type PreviousBuild
- type PrimaryView
- type Property
- type Queue
- type QueueItem
- type QueueService
- type RefsRemotesOriginDev
- type RefsRemotesOriginDevFramework
- type RefsRemotesOriginDevHush
- type RefsRemotesOriginMPlayer
- type ReqParams
- type Revision
- type Task
- type View
- type ViewService
- func (v *ViewService) AddJobToView(name, jobName string) error
- func (v *ViewService) Create(name, xml string) error
- func (v *ViewService) Delete(name string) error
- func (v *ViewService) Get(name string) (*View, error)
- func (v *ViewService) GetConfigure(name string) (string, error)
- func (v *ViewService) GetJobFromView(name, jobName string) (*JobItem, error)
- func (v *ViewService) List() ([]*View, error)
- func (v *ViewService) ListJobInView(name string) ([]*JobItem, error)
- func (v *ViewService) RemoveJobFromView(name, jobName string) error
- func (v *ViewService) SetConfigure(name, xml string) error
- func (v *ViewService) SetDescription(name, description string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actions ¶
type Actions struct { Class string `json:"_class,omitempty"` Parameters []Parameters `json:"parameters,omitempty"` Causes []Causes `json:"causes,omitempty"` BlockedDurationMillis int `json:"blockedDurationMillis,omitempty"` BlockedTimeMillis int `json:"blockedTimeMillis,omitempty"` BuildableDurationMillis int `json:"buildableDurationMillis,omitempty"` BuildableTimeMillis int `json:"buildableTimeMillis,omitempty"` BuildingDurationMillis int `json:"buildingDurationMillis,omitempty"` ExecutingTimeMillis int `json:"executingTimeMillis,omitempty"` ExecutorUtilization float64 `json:"executorUtilization,omitempty"` SubTaskCount int `json:"subTaskCount,omitempty"` WaitingDurationMillis int `json:"waitingDurationMillis,omitempty"` WaitingTimeMillis int `json:"waitingTimeMillis,omitempty"` BuildsByBranchName BuildsByBranchName `json:"buildsByBranchName,omitempty"` LastBuiltRevision LastBuiltRevision `json:"lastBuiltRevision,omitempty"` RemoteUrls []string `json:"remoteUrls,omitempty"` ScmName string `json:"scmName,omitempty"` }
type AssignedLabels ¶
type AssignedLabels struct { Actions []Actions `json:"actions"` BusyExecutors int `json:"busyExecutors"` Clouds []interface{} `json:"clouds"` Description interface{} `json:"description"` IdleExecutors int `json:"idleExecutors"` Name string `json:"name"` Nodes []Nodes `json:"nodes"` Offline bool `json:"offline"` TiedJobs []interface{} `json:"tiedJobs"` TotalExecutors int `json:"totalExecutors"` PropertiesList []interface{} `json:"propertiesList"` }
type Build ¶
type Build struct { Class string `json:"_class"` Actions []Actions `json:"actions"` Artifacts []Artifacts `json:"artifacts"` Building bool `json:"building"` Description interface{} `json:"description"` DisplayName string `json:"displayName"` Duration int `json:"duration"` EstimatedDuration int `json:"estimatedDuration"` Executor interface{} `json:"executor"` FullDisplayName string `json:"fullDisplayName"` ID string `json:"id"` KeepLog bool `json:"keepLog"` Number int `json:"number"` QueueID int `json:"queueId"` Result string `json:"result"` Timestamp int64 `json:"timestamp"` URL string `json:"url"` ChangeSets []ChangeSets `json:"changeSets"` Culprits []Culprits `json:"culprits"` NextBuild *Build `json:"nextBuild"` PreviousBuild *Build `json:"previousBuild"` }
type BuildItem ¶ added in v0.0.4
func NewBuildItem ¶ added in v0.0.4
func (*BuildItem) GetDescription ¶ added in v0.0.4
func (*BuildItem) IsBuilding ¶ added in v0.0.4
func (*BuildItem) LoopProgressiveLog ¶ added in v0.0.4
func (*BuildItem) SetDescription ¶ added in v0.0.4
type BuildsByBranchName ¶
type BuildsByBranchName struct { RefsRemotesOriginDevFramework RefsRemotesOriginDevFramework `json:"refs/remotes/origin/dev_framework"` RefsRemotesOriginDevHush RefsRemotesOriginDevHush `json:"refs/remotes/origin/dev_hush"` }
type ChangeSet ¶
type ChangeSet struct { Class string `json:"_class"` Items []interface{} `json:"items"` Kind interface{} `json:"kind"` }
type ChangeSets ¶
type Client ¶ added in v0.0.4
type Client struct { URL string Header http.Header Crumb *Crumb Req *req.Req Credentials *CredentialService Nodes *NodeService Queue *QueueService Views *ViewService // contains filtered or unexported fields }
func NewClient ¶ added in v0.0.4
Init Jenkins client and create job to build
package main import ( "log" "time" "github.com/joelee2012/go-jenkins/jenkins" ) func main() { client, err := jenkins.NewClient("http://localhost:8080/", "admin", "1234") if err != nil { log.Fatalln(err) } xml := `<?xml version='1.1' encoding='UTF-8'?> <flow-definition plugin="workflow-job"> <definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps"> <script>#!groovy pipeline { agent any stages { stage('build'){ steps{ sh 'echo $JENKINS_VERSION' } } } }</script> <sandbox>true</sandbox> </definition> <disabled>false</disabled> </flow-definition>` // create jenkins job if err := client.CreateJob("pipeline", xml); err != nil { log.Fatalln(err) } qitem, err := client.BuildJob("pipeline", nil) if err != nil { log.Fatalln(err) } var build *Build for { time.Sleep(1 * time.Second) build, err = qitem.GetBuild() if err != nil { log.Fatalln(err) } if build != nil { break } } // tail the build log to end build.LoopProgressiveLog("text", func(line string) error { log.Println(line) time.Sleep(1 * time.Second) return nil }) }
func (*Client) BindAPIJson ¶ added in v0.0.4
Bind jenkins JSON data to interface,
// bind json data to map data := make(map[string]string) client.BindAPIJson(jenkins.ReqParams{"tree":"description"}, &data) fmt.Println(data["description"])
func (*Client) BuildJob ¶ added in v0.0.4
func (c *Client) BuildJob(fullName string, params ReqParams) (*OneQueueItem, error)
Trigger job to build:
// without parameters client.BuildJob("your job", nil) client.BuildJob("your job", jenkins.ReqParams{}) // with parameters client.BuildJob("your job", jenkins.ReqParams{"ARG1": "ARG1_VALUE"})
func (*Client) CancelQuiteDown ¶ added in v0.0.4
func (*Client) CreateJob ¶ added in v0.0.4
Create job with given xml config:
xml := `<?xml version='1.1' encoding='UTF-8'?> <flow-definition plugin="workflow-job"> <definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps"> <script>#!groovy pipeline { agent any stages { stage('build'){ steps{ echo "test message" } } } } </script> <sandbox>true</sandbox> </definition> <disabled>false</disabled> </flow-definition>` // create jenkins job if err := client.CreateJob("path/to/name", xml); err != nil { log.Fatalln(err) }
func (*Client) ExportJCasC ¶ added in v0.0.4
func (*Client) GetJob ¶ added in v0.0.4
Get job with fullname:
job, err := client.GetJob("path/to/job") if err != nil { return err } fmt.Println(job)
func (*Client) GetVersion ¶ added in v0.0.4
Get jenkins version number
func (*Client) Name2URL ¶ added in v0.0.4
Covert fullname to url, eg:
path/to/name -> http://jenkins/job/path/job/to/job/name
func (*Client) ReloadJCasC ¶ added in v0.0.4
func (*Client) Request ¶ added in v0.0.4
Send request to jenkins,
// send request to get JSON data of jenkins client.Request("GET", "api/json")
func (*Client) SafeRestart ¶ added in v0.0.4
func (*Client) SetBasicAuth ¶ added in v0.0.4
func (*Client) SetContentType ¶ added in v0.0.4
Set content type for request, default is 'application/json'
func (*Client) URL2Name ¶ added in v0.0.4
Covert url to full name, eg:
http://jenkins/job/path/job/to/job/name -> path/to/name
func (*Client) ValidateJenkinsfile ¶ added in v0.0.4
type Computer ¶
type Computer struct { Class string `json:"_class"` Actions []Actions `json:"actions"` AssignedLabels []AssignedLabels `json:"assignedLabels"` Description string `json:"description"` DisplayName string `json:"displayName"` Executors []*Executor `json:"executors"` Icon string `json:"icon"` IconClassName string `json:"iconClassName"` Idle bool `json:"idle"` JnlpAgent bool `json:"jnlpAgent"` LaunchSupported bool `json:"launchSupported"` ManualLaunchAllowed bool `json:"manualLaunchAllowed"` MonitorData MonitorData `json:"monitorData"` NumExecutors int `json:"numExecutors"` Offline bool `json:"offline"` OfflineCause interface{} `json:"offlineCause"` OfflineCauseReason string `json:"offlineCauseReason"` OneOffExecutors []*Executor `json:"oneOffExecutors"` TemporarilyOffline bool `json:"temporarilyOffline"` AbsoluteRemotePath interface{} `json:"absoluteRemotePath,omitempty"` }
type ComputerSet ¶
type Credential ¶
type Credential struct { Description string `json:"description"` DisplayName string `json:"displayName"` FullName string `json:"fullName"` ID string `json:"id"` TypeName string `json:"typeName"` }
func (Credential) String ¶ added in v0.0.4
func (c Credential) String() string
type CredentialService ¶ added in v0.0.4
type CredentialService struct {
*Item
}
func NewCredentialService ¶ added in v0.0.4
func NewCredentialService(v interface{}) *CredentialService
func (*CredentialService) Create ¶ added in v0.0.4
func (cs *CredentialService) Create(xml string) error
func (*CredentialService) Delete ¶ added in v0.0.4
func (cs *CredentialService) Delete(name string) error
func (*CredentialService) Get ¶ added in v0.0.4
func (cs *CredentialService) Get(name string) (*Credential, error)
func (*CredentialService) GetConfigure ¶ added in v0.0.4
func (cs *CredentialService) GetConfigure(name string) (string, error)
func (*CredentialService) List ¶ added in v0.0.4
func (cs *CredentialService) List() ([]*Credential, error)
func (*CredentialService) SetConfigure ¶ added in v0.0.4
func (cs *CredentialService) SetConfigure(name, xml string) error
type Credentials ¶
type Credentials struct { Class string `json:"_class"` Credentials []*Credential `json:"credentials"` Description string `json:"description"` DisplayName string `json:"displayName"` FullDisplayName string `json:"fullDisplayName"` FullName string `json:"fullName"` Global bool `json:"global"` URLName string `json:"urlName"` }
type CurrentExecutable ¶
type CurrentExecutable struct { Class string `json:"_class"` Actions []Actions `json:"actions"` Artifacts []interface{} `json:"artifacts"` Building bool `json:"building"` Description interface{} `json:"description"` DisplayName string `json:"displayName"` Duration int `json:"duration"` EstimatedDuration int `json:"estimatedDuration"` FullDisplayName string `json:"fullDisplayName"` ID string `json:"id"` KeepLog bool `json:"keepLog"` Number int `json:"number"` QueueID int `json:"queueId"` Result interface{} `json:"result"` Timestamp int64 `json:"timestamp"` URL string `json:"url"` ChangeSets []interface{} `json:"changeSets"` Culprits []interface{} `json:"culprits"` NextBuild interface{} `json:"nextBuild"` PreviousBuild PreviousBuild `json:"previousBuild"` }
type DefaultParameterValue ¶
type Executable ¶
type Executor ¶ added in v0.0.4
type Executor struct { Idle bool `json:"idle"` LikelyStuck bool `json:"likelyStuck"` Number int `json:"number"` Progress int `json:"progress"` CurrentExecutable *CurrentExecutable `json:"currentExecutable,omitempty"` }
type HealthReport ¶
type Items ¶
type Items struct { Class string `json:"_class"` AffectedPaths []string `json:"affectedPaths"` CommitID string `json:"commitId"` Timestamp int64 `json:"timestamp"` Author Author `json:"author"` AuthorEmail string `json:"authorEmail"` Comment string `json:"comment"` Date string `json:"date"` ID string `json:"id"` Msg string `json:"msg"` Paths []Paths `json:"paths"` }
type Job ¶
type Job struct { Class string `json:"_class"` Actions []Actions `json:"actions"` Description string `json:"description"` DisplayName string `json:"displayName"` DisplayNameOrNull interface{} `json:"displayNameOrNull"` FullDisplayName string `json:"fullDisplayName"` FullName string `json:"fullName"` Name string `json:"name"` URL string `json:"url"` Buildable bool `json:"buildable"` Builds []*Build `json:"builds"` Color string `json:"color"` FirstBuild *Build `json:"firstBuild"` HealthReport []HealthReport `json:"healthReport"` InQueue bool `json:"inQueue"` KeepDependencies bool `json:"keepDependencies"` LastBuild *Build `json:"lastBuild"` LastCompletedBuild *Build `json:"lastCompletedBuild"` LastFailedBuild *Build `json:"lastFailedBuild"` LastStableBuild *Build `json:"lastStableBuild"` LastSuccessfulBuild *Build `json:"lastSuccessfulBuild"` LastUnstableBuild *Build `json:"lastUnstableBuild"` LastUnsuccessfulBuild *Build `json:"lastUnsuccessfulBuild"` NextBuildNumber int `json:"nextBuildNumber"` Property []*Property `json:"property"` QueueItem interface{} `json:"queueItem"` ConcurrentBuild bool `json:"concurrentBuild"` ResumeBlocked bool `json:"resumeBlocked"` Jobs []*Job `json:"jobs"` PrimaryView *PrimaryView `json:"primaryView"` Views []*View `json:"views"` }
type JobItem ¶ added in v0.0.4
type JobItem struct { *Item Credentials *CredentialService Views *ViewService Name string FullName string FullDisplayName string }
func NewJobItem ¶ added in v0.0.4
func (*JobItem) Build ¶ added in v0.0.4
func (j *JobItem) Build(param ReqParams) (*OneQueueItem, error)
func (*JobItem) GetBuildByName ¶ added in v0.0.4
func (*JobItem) GetConfigure ¶ added in v0.0.4
func (*JobItem) GetDescription ¶ added in v0.0.4
func (*JobItem) GetFirstBuild ¶ added in v0.0.4
func (*JobItem) GetLastBuild ¶ added in v0.0.4
func (*JobItem) GetLastCompleteBuild ¶ added in v0.0.4
func (*JobItem) GetLastFailedBuild ¶ added in v0.0.4
func (*JobItem) GetLastStableBuild ¶ added in v0.0.4
func (*JobItem) GetLastSuccessfulBuild ¶ added in v0.0.4
func (*JobItem) GetLastUnstableBuild ¶ added in v0.0.4
func (*JobItem) GetLastUnsucessfulBuild ¶ added in v0.0.4
func (*JobItem) GetMultibranchPipelineScanLog ¶ added in v0.0.4
func (*JobItem) GetParameters ¶ added in v0.0.4
func (j *JobItem) GetParameters() ([]*ParameterDefinition, error)
func (*JobItem) IsBuildable ¶ added in v0.0.4
func (*JobItem) ListBuilds ¶ added in v0.0.4
func (*JobItem) SCMPolling ¶ added in v0.0.4
func (*JobItem) SetConfigure ¶ added in v0.0.4
func (*JobItem) SetDescription ¶ added in v0.0.4
func (*JobItem) SetNextBuildNumber ¶ added in v0.0.4
type LastBuiltRevision ¶
type MonitorData ¶
type MonitorData struct { HudsonNodeMonitorsSwapSpaceMonitor HudsonNodeMonitorsSwapSpaceMonitor `json:"hudson.node_monitors.SwapSpaceMonitor"` HudsonNodeMonitorsTemporarySpaceMonitor HudsonNodeMonitorsTemporarySpaceMonitor `json:"hudson.node_monitors.TemporarySpaceMonitor"` HudsonNodeMonitorsDiskSpaceMonitor HudsonNodeMonitorsDiskSpaceMonitor `json:"hudson.node_monitors.DiskSpaceMonitor"` HudsonNodeMonitorsArchitectureMonitor string `json:"hudson.node_monitors.ArchitectureMonitor"` HudsonNodeMonitorsResponseTimeMonitor HudsonNodeMonitorsResponseTimeMonitor `json:"hudson.node_monitors.ResponseTimeMonitor"` HudsonNodeMonitorsClockMonitor HudsonNodeMonitorsClockMonitor `json:"hudson.node_monitors.ClockMonitor"` }
type NodeService ¶ added in v0.0.4
type NodeService struct {
*Item
}
func NewNodeService ¶ added in v0.0.4
func NewNodeService(client *Client) *NodeService
func (*NodeService) Delete ¶ added in v0.0.4
func (ns *NodeService) Delete(name string) error
func (*NodeService) Disable ¶ added in v0.0.4
func (ns *NodeService) Disable(name, msg string) error
func (*NodeService) Enable ¶ added in v0.0.4
func (ns *NodeService) Enable(name string) error
func (*NodeService) Get ¶ added in v0.0.4
func (ns *NodeService) Get(name string) (*Computer, error)
func (*NodeService) GetBuilds ¶ added in v0.0.4
func (ns *NodeService) GetBuilds() ([]*BuildItem, error)
func (*NodeService) List ¶ added in v0.0.4
func (ns *NodeService) List() ([]*Computer, error)
type Nodes ¶
type Nodes struct { Class string `json:"_class"` AssignedLabels []AssignedLabels `json:"assignedLabels"` Mode string `json:"mode"` NodeDescription string `json:"nodeDescription"` NodeName string `json:"nodeName"` NumExecutors int `json:"numExecutors"` Description interface{} `json:"description"` Jobs []interface{} `json:"jobs"` PrimaryView PrimaryView `json:"primaryView"` QuietingDown bool `json:"quietingDown"` SlaveAgentPort int `json:"slaveAgentPort"` URL string `json:"url"` UseCrumbs bool `json:"useCrumbs"` UseSecurity bool `json:"useSecurity"` Views []*View `json:"views"` }
type OneOffExecutor ¶
type OneOffExecutor struct { CurrentExecutable CurrentExecutable `json:"currentExecutable"` Idle bool `json:"idle"` LikelyStuck bool `json:"likelyStuck"` Number int `json:"number"` Progress int `json:"progress"` }
type OneQueueItem ¶ added in v0.0.4
func NewQueueItem ¶
func NewQueueItem(url string, client *Client) *OneQueueItem
func (*OneQueueItem) GetBuild ¶ added in v0.0.4
func (q *OneQueueItem) GetBuild() (*BuildItem, error)
func (*OneQueueItem) GetJob ¶ added in v0.0.4
func (q *OneQueueItem) GetJob() (*JobItem, error)
type ParameterDefinition ¶ added in v0.0.4
type Parameters ¶
type PreviousBuild ¶
type PrimaryView ¶
type Property ¶
type Property struct { Class string `json:"_class"` ParameterDefinitions []*ParameterDefinition `json:"parameterDefinitions,omitempty"` }
type QueueItem ¶
type QueueItem struct { Class string `json:"_class"` Actions []Actions `json:"actions"` Blocked bool `json:"blocked"` Buildable bool `json:"buildable"` ID int `json:"id"` InQueueSince int64 `json:"inQueueSince"` Params string `json:"params"` Stuck bool `json:"stuck"` Task Task `json:"task"` URL string `json:"url"` Why interface{} `json:"why"` Cancelled bool `json:"cancelled"` Executable Executable `json:"executable"` }
type QueueService ¶ added in v0.0.4
type QueueService struct {
*Item
}
func NewQueueService ¶ added in v0.0.4
func NewQueueService(c *Client) *QueueService
func (*QueueService) Cancel ¶ added in v0.0.4
func (q *QueueService) Cancel(id int) error
func (*QueueService) Get ¶ added in v0.0.4
func (q *QueueService) Get(id int) (*OneQueueItem, error)
func (*QueueService) List ¶ added in v0.0.4
func (q *QueueService) List() ([]*OneQueueItem, error)
type RefsRemotesOriginDev ¶
type View ¶ added in v0.0.4
type ViewService ¶ added in v0.0.4
type ViewService struct {
*Item
}
func NewViewService ¶ added in v0.0.4
func NewViewService(v interface{}) *ViewService
func (*ViewService) AddJobToView ¶ added in v0.0.4
func (v *ViewService) AddJobToView(name, jobName string) error
func (*ViewService) Create ¶ added in v0.0.4
func (v *ViewService) Create(name, xml string) error
func (*ViewService) Delete ¶ added in v0.0.4
func (v *ViewService) Delete(name string) error
func (*ViewService) GetConfigure ¶ added in v0.0.4
func (v *ViewService) GetConfigure(name string) (string, error)
func (*ViewService) GetJobFromView ¶ added in v0.0.4
func (v *ViewService) GetJobFromView(name, jobName string) (*JobItem, error)
func (*ViewService) List ¶ added in v0.0.4
func (v *ViewService) List() ([]*View, error)
func (*ViewService) ListJobInView ¶ added in v0.0.4
func (v *ViewService) ListJobInView(name string) ([]*JobItem, error)
func (*ViewService) RemoveJobFromView ¶ added in v0.0.4
func (v *ViewService) RemoveJobFromView(name, jobName string) error
func (*ViewService) SetConfigure ¶ added in v0.0.4
func (v *ViewService) SetConfigure(name, xml string) error
func (*ViewService) SetDescription ¶ added in v0.0.4
func (v *ViewService) SetDescription(name, description string) error
Click to show internal directories.
Click to hide internal directories.