Documentation ¶
Index ¶
- Constants
- Variables
- func CreateRequest(METHOD string, URL string) *http.Request
- func DoAddContext(configfile_location string, context_name string, token string, url string, ...)
- func DoRemoveContext(configfile_location string, context_name string)
- func DoUpdateContext(configfile_location string, context_name string, new_context_name string, ...)
- func DoUpdateCurrentContext(configfile_location string, new_context_name string)
- func DoUpdateManualContext(configfile_location string, context_name string)
- func ErrorLog(err error)
- func GetAllAvailablePlugins(regex_filter string) (res [][]string)
- func GetAllUpdateablePlugins(regex_filter string) (res [][]string)
- func GetBaseURL(configfile_location string) string
- func GetEndpoint(Kwargs map[string]interface{}) string
- func GetFileBytes(fileName string) []byte
- func GetName(configfile_location string) string
- func GetToken(configfile_location string) string
- func GetUserName(configfile_location string) string
- func HandleRequest(METHOD string, Kwargs map[string]interface{}) ([]byte, error)
- func InitLoggers(traceHandle io.Writer, infoHandle io.Writer, warningHandle io.Writer, ...)
- func ListBuilds(job_name string) (res [][]string)
- func ListJobs() (res [][]string)
- func ListPlugins(regex_filter string) (res [][]string)
- func PrepareUrl(url string) string
- func Table(jobs [][]string, header []string)
- func YAML(obj interface{})
- type AssignedLabels
- type AvailableNameSorter
- type Availables
- type BuildL
- type BuildListResponse
- type BuildResponse
- type Computer
- type Config
- func AddContext(config Config, context_name string, token string, url string, username string) Config
- func GetAndShowConfig(configfile_location string) (config Config)
- func GetConfig(configfile_location string) Config
- func ManualUpdateContext(config Config, context_name string) Config
- func RemoveContext(config Config, context_name string) Config
- func UpdateContext(config Config, context_name string, new_context_name string, token string, ...) Config
- func UpdateCurrentContext(config Config, new_context string) Config
- type Context
- func GetAndShowContext(configfile_location string, context_name string) Context
- func GetAndShowContexts(configfile_location string) (contexts []Context)
- func GetAndShowCurrentContext(configfile_location string) (context Context)
- func GetClient() Context
- func GetCurrentContext(configfile_location string) (context Context)
- func PerformCreateContext(context_name string, token string, url string, username string) Context
- func PerformManualUpdateContext(context Context) Context
- func PerformUpdateContext(context Context, context_name string, token string, url string, ...) Context
- type CredentialResponse
- type Executors
- type HudsonNodeMonitorsClockMonitor
- type HudsonNodeMonitorsDiskSpaceMonitor
- type HudsonNodeMonitorsResponseTimeMonitor
- type HudsonNodeMonitorsSwapSpaceMonitor
- type HudsonNodeMonitorsTemporarySpaceMonitor
- type Installed
- type JobL
- type JobListResponse
- type JobRawResponse
- type JobResponse
- type Kwargs
- type LoadStatistics
- type MonitorData
- type NodesResponse
- type Plugin
- type PluginsResponse
- type Property
- type ShortNameSorter
- type UpdateCenterResponse
- type UpdateNameSorter
- type Updates
- type User
Constants ¶
const (
ConfigFile = ".jenkins.yaml"
)
Variables ¶
var ( HeadersBuilds = []string{"ID", "Number", "Time", "Result", "URL", "E_Duration", "Duration", "Description"} HeadersBuild = []string{"ID", "Number", "Timestamp", "Result", "URL", "EstimatedDuration", "Duration", "Description", "FullDisplayName", "Building", "DisplayName", "Executor", "KeepLog", "QueueID"} )
var ( HeadersPlugins = []string{"active", "enabled", "shortName", "version", "url"} HeadersPlugin = []string{"active", "backupVersion", "bundled", "deleted", "detached", "downgradable", "enabled", "hasUpdate", "longName", "minimumJavaVersion", "pinned", "requiredCoreVersion", "shortName", "supportsDynamicLoad", "url", "version"} )
var (
HeadersAvailablePlugins = []string{"name", "current-version", "new-version", "compatible", "release-timestamp"}
)
Functions ¶
func DoAddContext ¶ added in v1.3.11
func DoAddContext(configfile_location string, context_name string, token string, url string, username string)
////////////////////////////////////////////////////////////////////////////////////////////////////////////// Updaters //////////////////////////////////////////////////////////////////////////////////////////////////////////////
func DoRemoveContext ¶ added in v1.3.11
func DoUpdateContext ¶ added in v1.3.11
func DoUpdateCurrentContext ¶ added in v1.3.11
func DoUpdateManualContext ¶ added in v1.3.11
func GetAllAvailablePlugins ¶ added in v1.3.11
func GetAllUpdateablePlugins ¶ added in v1.3.11
func GetBaseURL ¶
func GetEndpoint ¶
func GetFileBytes ¶ added in v1.3.11
func GetUserName ¶ added in v1.3.11
func HandleRequest ¶
func InitLoggers ¶ added in v1.3.11
func ListBuilds ¶
func ListPlugins ¶ added in v1.3.11
func PrepareUrl ¶
Types ¶
type AssignedLabels ¶ added in v1.3.6
type AssignedLabels struct {
Name string `yaml:"name"`
}
type AvailableNameSorter ¶ added in v1.3.11
type AvailableNameSorter []Availables
func (AvailableNameSorter) Len ¶ added in v1.3.11
func (a AvailableNameSorter) Len() int
func (AvailableNameSorter) Less ¶ added in v1.3.11
func (a AvailableNameSorter) Less(i, j int) bool
func (AvailableNameSorter) Swap ¶ added in v1.3.11
func (a AvailableNameSorter) Swap(i, j int)
type Availables ¶ added in v1.3.11
type Availables struct { Name string `yaml:"name"` SourceID string `yaml:"sourceId"` URL string `yaml:"url"` Version string `yaml:"version"` Categories []interface{} `yaml:"categories"` Compatible bool `yaml:"compatible"` CompatibleSinceVersion interface{} `yaml:"compatibleSinceVersion"` CompatibleWithInstalledVersion bool `yaml:"compatibleWithInstalledVersion"` Excerpt string `yaml:"excerpt"` Installed interface{} `yaml:"installed"` MinimumJavaVersion string `yaml:"minimumJavaVersion"` NeededDependencies []interface{} `yaml:"neededDependencies"` ReleaseTimestamp int64 `yaml:"releaseTimestamp"` RequiredCore string `yaml:"requiredCore"` Title string `yaml:"title"` Wiki string `yaml:"wiki"` }
func FilterRegexNames ¶ added in v1.3.11
func FilterRegexNames(availables []Availables, re *regexp.Regexp) (res []Availables)
type BuildListResponse ¶
type BuildListResponse struct {
Builds []BuildL `yaml:"builds"`
}
type BuildResponse ¶
type BuildResponse struct { ID string `yaml:"id"` Number int `yaml:"number"` Timestamp int64 `yaml:"timestamp"` Result string `yaml:"result"` URL string `yaml:"url"` EstimatedDuration int `yaml:"estimatedDuration"` Duration int `yaml:"duration"` Description interface{} `yaml:"description"` FullDisplayName string `yaml:"fullDisplayName"` Building bool `yaml:"building"` DisplayName string `yaml:"displayName"` Executor interface{} `yaml:"executor"` KeepLog bool `yaml:"keepLog"` QueueID int `yaml:"queueId"` }
func GetBuild ¶
func GetBuild(job_name string, build_name string) (obj BuildResponse)
type Computer ¶ added in v1.3.6
type Computer struct { Class string `yaml:"_class"` Actions []interface{} `yaml:"actions"` AssignedLabels []AssignedLabels `yaml:"assignedLabels"` Description string `yaml:"description"` DisplayName string `yaml:"displayName"` Executors []Executors `yaml:"executors"` Icon string `yaml:"icon"` IconClassName string `yaml:"iconClassName"` Idle bool `yaml:"idle"` JnlpAgent bool `yaml:"jnlpAgent"` LaunchSupported bool `yaml:"launchSupported"` LoadStatistics LoadStatistics `yaml:"loadStatistics"` ManualLaunchAllowed bool `yaml:"manualLaunchAllowed"` MonitorData MonitorData `yaml:"monitorData"` NumExecutors int `yaml:"numExecutors"` Offline bool `yaml:"offline"` OfflineCause interface{} `yaml:"offlineCause"` OfflineCauseReason string `yaml:"offlineCauseReason"` OneOffExecutors []interface{} `yaml:"oneOffExecutors"` TemporarilyOffline bool `yaml:"temporarilyOffline"` }
type Config ¶ added in v1.3.11
type Config struct { CurrentContext string `yaml:"current_context"` Contexts []Context `yaml:"contexts"` }
func AddContext ¶ added in v1.3.11
func AddContext(config Config, context_name string, token string, url string, username string) Config
////////////////////////////////////////////////////////////////////////////////////////////////////////////// Config Handling //////////////////////////////////////////////////////////////////////////////////////////////////////////////
func GetAndShowConfig ¶ added in v1.3.11
////////////////////////////////////////////////////////////////////////////////////////////////////////////// Show-ers //////////////////////////////////////////////////////////////////////////////////////////////////////////////
func GetConfig ¶ added in v1.3.11
////////////////////////////////////////////////////////////////////////////////////////////////////////////// Getters //////////////////////////////////////////////////////////////////////////////////////////////////////////////
func ManualUpdateContext ¶ added in v1.3.11
func RemoveContext ¶ added in v1.3.11
func UpdateContext ¶ added in v1.3.11
func UpdateCurrentContext ¶ added in v1.3.11
func (Config) GetCurrent ¶ added in v1.3.11
type Context ¶ added in v1.3.11
type Context struct { Name string `yaml:"name"` URL string `yaml:"url"` Username string `yaml:"username"` Token string `yaml:"token"` }
func GetAndShowContext ¶ added in v1.3.11
func GetAndShowContexts ¶ added in v1.3.11
func GetAndShowCurrentContext ¶ added in v1.3.11
func GetCurrentContext ¶ added in v1.3.11
func PerformCreateContext ¶ added in v1.3.11
func PerformManualUpdateContext ¶ added in v1.3.11
type CredentialResponse ¶ added in v1.3.11
type CredentialResponse struct { Credentials []interface{} `yaml:"credentials"` Description string `yaml:"description"` DisplayName string `yaml:"displayName"` FullDisplayName string `yaml:"fullDisplayName"` FullName string `yaml:"fullName"` Global bool `yaml:"global"` URLName string `yaml:"urlName"` }
func ListCredentials ¶ added in v1.3.11
func ListCredentials() (obj CredentialResponse)
type HudsonNodeMonitorsClockMonitor ¶ added in v1.3.6
type HudsonNodeMonitorsDiskSpaceMonitor ¶ added in v1.3.6
type HudsonNodeMonitorsResponseTimeMonitor ¶ added in v1.3.6
type HudsonNodeMonitorsSwapSpaceMonitor ¶ added in v1.3.6
type HudsonNodeMonitorsTemporarySpaceMonitor ¶ added in v1.3.6
type Installed ¶ added in v1.3.11
type Installed struct { Active bool `yaml:"active"` BackupVersion interface{} `yaml:"backupVersion"` Bundled bool `yaml:"bundled"` Deleted bool `yaml:"deleted"` Detached bool `yaml:"detached"` Downgradable bool `yaml:"downgradable"` Enabled bool `yaml:"enabled"` HasUpdate bool `yaml:"hasUpdate"` LongName string `yaml:"longName"` MinimumJavaVersion string `yaml:"minimumJavaVersion"` Pinned bool `yaml:"pinned"` RequiredCoreVersion string `yaml:"requiredCoreVersion"` ShortName string `yaml:"shortName"` SupportsDynamicLoad string `yaml:"supportsDynamicLoad"` URL string `yaml:"url"` Version string `yaml:"version"` }
type JobListResponse ¶
type JobListResponse struct {
Jobs []JobL `yaml:"jobs"`
}
type JobRawResponse ¶
type JobRawResponse struct { Class string `yaml:"_class"` Description string `yaml:"description"` FullName string `yaml:"fullName"` Name string `yaml:"name"` URL string `yaml:"url"` Buildable bool `yaml:"buildable"` Builds []struct { Class string `yaml:"_class"` Number int `yaml:"number"` URL string `yaml:"url"` } `yaml:"builds"` Color string `yaml:"color"` HealthReport []struct { Description string `yaml:"description"` Score int `yaml:"score"` } `yaml:"healthReport"` InQueue bool `yaml:"inQueue"` NextBuildNumber int `yaml:"nextBuildNumber"` ConcurrentBuild bool `yaml:"concurrentBuild"` ResumeBlocked bool `yaml:"resumeBlocked"` }
type JobResponse ¶
type JobResponse struct { FullName string `yaml:"fullName"` Name string `yaml:"name"` Description string `yaml:"description"` URL string `yaml:"url"` Buildable bool `yaml:"buildable"` Color string `yaml:"color"` Builds int `yaml:"builds"` LastHealthReport struct { Description string `yaml:"description"` Score int `yaml:"score"` } `yaml:"healthReport"` InQueue bool `yaml:"inQueue"` NextBuildNumber int `yaml:"nextBuildNumber"` ConcurrentBuild bool `yaml:"concurrentBuild"` ResumeBlocked bool `yaml:"resumeBlocked"` }
func GetJob ¶
func GetJob(job_name string) (out_obj JobResponse)
type LoadStatistics ¶ added in v1.3.6
type LoadStatistics struct {
Class string `yaml:"_class"`
}
type MonitorData ¶ added in v1.3.6
type MonitorData struct { HudsonNodeMonitorsSwapSpaceMonitor HudsonNodeMonitorsSwapSpaceMonitor `yaml:"hudson.node_monitors.SwapSpaceMonitor"` HudsonNodeMonitorsTemporarySpaceMonitor HudsonNodeMonitorsTemporarySpaceMonitor `yaml:"hudson.node_monitors.TemporarySpaceMonitor"` HudsonNodeMonitorsDiskSpaceMonitor HudsonNodeMonitorsDiskSpaceMonitor `yaml:"hudson.node_monitors.DiskSpaceMonitor"` HudsonNodeMonitorsArchitectureMonitor string `yaml:"hudson.node_monitors.ArchitectureMonitor"` HudsonNodeMonitorsResponseTimeMonitor HudsonNodeMonitorsResponseTimeMonitor `yaml:"hudson.node_monitors.ResponseTimeMonitor"` HudsonNodeMonitorsClockMonitor HudsonNodeMonitorsClockMonitor `yaml:"hudson.node_monitors.ClockMonitor"` }
type NodesResponse ¶ added in v1.3.6
type NodesResponse struct { BusyExecutors int `yaml:"busyExecutors"` Computer []Computer `yaml:"computer"` DisplayName string `yaml:"displayName"` TotalExecutors int `yaml:"totalExecutors"` }
func ListNodes ¶ added in v1.3.6
func ListNodes() (obj NodesResponse)
type Plugin ¶ added in v1.3.11
type Plugin struct { Active bool `yaml:"active"` BackupVersion interface{} `yaml:"backupVersion"` Bundled bool `yaml:"bundled"` Deleted bool `yaml:"deleted"` Detached bool `yaml:"detached"` Downgradable bool `yaml:"downgradable"` Enabled bool `yaml:"enabled"` HasUpdate bool `yaml:"hasUpdate"` LongName string `yaml:"longName"` MinimumJavaVersion string `yaml:"minimumJavaVersion"` Pinned bool `yaml:"pinned"` RequiredCoreVersion string `yaml:"requiredCoreVersion"` ShortName string `yaml:"shortName"` SupportsDynamicLoad string `yaml:"supportsDynamicLoad"` URL string `yaml:"url"` Version string `yaml:"version"` }
func FilterPlugin ¶ added in v1.3.11
func FilterRegexPluginNames ¶ added in v1.3.11
type PluginsResponse ¶ added in v1.3.11
type PluginsResponse struct {
Plugins []Plugin `yaml:"plugins"`
}
func GetAllPlugins ¶ added in v1.3.11
func GetAllPlugins(regex_filter string) (obj PluginsResponse)
type ShortNameSorter ¶ added in v1.3.11
type ShortNameSorter []Plugin
func (ShortNameSorter) Len ¶ added in v1.3.11
func (s ShortNameSorter) Len() int
func (ShortNameSorter) Less ¶ added in v1.3.11
func (s ShortNameSorter) Less(i, j int) bool
func (ShortNameSorter) Swap ¶ added in v1.3.11
func (s ShortNameSorter) Swap(i, j int)
type UpdateCenterResponse ¶ added in v1.3.11
type UpdateCenterResponse struct { Class string `yaml:"_class"` Availables []Availables `yaml:"availables"` ConnectionCheckURL string `yaml:"connectionCheckUrl"` DataTimestamp int64 `yaml:"dataTimestamp"` HasUpdates bool `yaml:"hasUpdates"` ID string `yaml:"id"` Updates []Updates `yaml:"updates"` URL string `yaml:"url"` }
func GetAllUpdateCenter ¶ added in v1.3.11
func GetAllUpdateCenter() (obj UpdateCenterResponse)
type UpdateNameSorter ¶ added in v1.3.11
type UpdateNameSorter []Updates
func (UpdateNameSorter) Len ¶ added in v1.3.11
func (u UpdateNameSorter) Len() int
func (UpdateNameSorter) Less ¶ added in v1.3.11
func (u UpdateNameSorter) Less(i, j int) bool
func (UpdateNameSorter) Swap ¶ added in v1.3.11
func (u UpdateNameSorter) Swap(i, j int)
type Updates ¶ added in v1.3.11
type Updates struct { Name string `yaml:"name"` SourceID string `yaml:"sourceId"` URL string `yaml:"url"` Version string `yaml:"version"` Categories []string `yaml:"categories"` Compatible bool `yaml:"compatible"` CompatibleSinceVersion interface{} `yaml:"compatibleSinceVersion"` CompatibleWithInstalledVersion bool `yaml:"compatibleWithInstalledVersion"` Excerpt string `yaml:"excerpt"` Installed Installed `yaml:"installed"` MinimumJavaVersion string `yaml:"minimumJavaVersion"` NeededDependencies []interface{} `yaml:"neededDependencies"` ReleaseTimestamp int64 `yaml:"releaseTimestamp"` RequiredCore string `yaml:"requiredCore"` Title string `yaml:"title"` Wiki string `yaml:"wiki"` }