Documentation ¶
Index ¶
- type AclListContents
- type AclPolicies
- type CPU
- type ClientConfig
- type ConfigProperty
- type Contents
- type Event
- type Events
- type ExecStep
- type Execution
- type ExecutionAbort
- type ExecutionDateTime
- type ExecutionId
- type ExecutionOutput
- type ExecutionOutputEntries
- type ExecutionOutputEntry
- type ExecutionState
- type ExecutionStep
- type Executions
- type ExecutionsDeleted
- type FailedExecutionDelete
- type ImportParams
- type JVM
- type Job
- type JobContext
- type JobDetails
- type JobDispatch
- type JobImportResult
- type JobImportResultJob
- type JobList
- type JobNotification
- type JobNotifications
- type JobOption
- type JobOptions
- type JobPlugin
- type JobPluginConfiguration
- type JobPluginConfigurationEntry
- type JobPlugins
- type JobRefStep
- type JobSequence
- type Jobs
- type LogStorage
- type Memory
- type Metrics
- type NewProject
- type Node
- type NodeState
- type NodeStep
- type NodeWithSteps
- type Nodes
- type OS
- type Option
- type Options
- type PluginStep
- type Project
- type Projects
- type Resource
- type ResourceMeta
- type Resources
- type RunOptions
- type Rundeck
- type RundeckClient
- func (c *RundeckClient) AbortExecution(id string) (ExecutionAbort, error)
- func (c *RundeckClient) CreateSystemAclPolicy(name string, contents []byte) error
- func (c *RundeckClient) CreateToken(u string) (token string, e error)
- func (rc *RundeckClient) Delete(path string, options interface{}) error
- func (c *RundeckClient) DeleteAllExecutionsForProject(project string, max int64) (ExecutionsDeleted, error)
- func (c *RundeckClient) DeleteExecution(id string) error
- func (c *RundeckClient) DeleteExecutions(ids []string) (ExecutionsDeleted, error)
- func (c *RundeckClient) DeleteJob(id string) error
- func (c *RundeckClient) DeleteProject(p string) error
- func (c *RundeckClient) DeleteToken(token string) error
- func (c *RundeckClient) DisableExecution(id string) error
- func (c *RundeckClient) EnableExecution(id string) error
- func (c *RundeckClient) ExportJob(id string, format string) (s string, e error)
- func (c *RundeckClient) FindJobByName(name string, project string) (*JobDetails, error)
- func (rc *RundeckClient) Get(i *[]byte, path string, options interface{}) error
- func (c *RundeckClient) GetExecution(executionId string) (exec Execution, err error)
- func (c *RundeckClient) GetExecutionOutput(executionId string) (ExecutionOutput, error)
- func (c *RundeckClient) GetExecutionState(executionId string) (ExecutionState, error)
- func (c *RundeckClient) GetHistory(project string) (Events, error)
- func (c *RundeckClient) GetJob(id string) (JobList, error)
- func (c *RundeckClient) GetLogstorage() (data LogStorage, err error)
- func (c *RundeckClient) GetRequiredOpts(j string) (map[string]string, error)
- func (c *RundeckClient) GetSystemAclPolicies() (data AclPolicies, err error)
- func (c *RundeckClient) GetToken(tokenId string) (data Token, err error)
- func (c *RundeckClient) GetTokens() (data Tokens, err error)
- func (c *RundeckClient) GetUserTokens(user string) (data Tokens, err error)
- func (c *RundeckClient) ImportJob(j ImportParams) (string, error)
- func (c *RundeckClient) ListJobs(projectId string) (Jobs, error)
- func (c *RundeckClient) ListNodes(projectId string) (Nodes, error)
- func (c *RundeckClient) ListProjectExecutions(projectId string, options map[string]string) (Executions, error)
- func (c *RundeckClient) ListProjects() (data Projects, err error)
- func (c *RundeckClient) ListRunningExecutions(projectId string) (executions Executions, err error)
- func (c *RundeckClient) MakeProject(p NewProject) error
- func (rc *RundeckClient) Post(i *[]byte, path string, data []byte, options interface{}) error
- func (rc *RundeckClient) Put(i *[]byte, path string, data []byte, options interface{}) error
- func (c *RundeckClient) RunAdhoc(projectId string, exec string, node_filter string) (ExecutionId, error)
- func (c *RundeckClient) RunJob(id string, options RunOptions) (Executions, error)
- type RundeckError
- type RundeckResult
- type Scheduler
- type ScriptStep
- type SequenceStep
- type Stats
- type SystemInfo
- type TS
- type ThreadDump
- type Threads
- type Token
- type Tokens
- type Uptime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AclListContents ¶
type AclPolicies ¶
type ClientConfig ¶
type ConfigProperty ¶
type Event ¶
type Event struct { XMLName xml.Name `xml:"event"` StartTime string `xml:"starttime,attr"` EndTime string `xml:"endtime,attr"` Title string `xml:"title"` Status string `xml:"status"` Summary string `xml:"summary"` NodeSummary struct { XMLName xml.Name Succeeded int64 `xml:"succeeded,attr"` Failed int64 `xml:"failed,attr"` Total int64 `xml:"total,attr"` } `xml:"node-summary"` User string `xml:"user"` Project string `xml:"project"` DateStarted string `xml:"date-started"` DateEnded string `xml:"date-ended"` AbortedBy string `xml:"abortedby,omitempty"` Job *struct { XMLName xml.Name ID string `xml:"id,attr"` } `xml:"job,omitempty"` Execution struct { XMLName xml.Name ID int64 `xml:"id,attr"` } `xml:"execution,omitempty"` }
type Execution ¶
type Execution struct { XMLName xml.Name `xml:"execution"` ID string `xml:"id,attr"` HRef string `xml:"href,attr"` Status string `xml:"status,attr"` Project string `xml:"project,attr"` User string `xml:"user"` DateEnded string `xml:"date-ended,omitempty"` UnixTimeEnded int64 `xml:"date-ended,unixtime,attr,omitempty"` DateStarted string `xml:"date-started,omitempty"` UnixTimeStarted int64 `xml:"date-started,unixtime,attr,omitempty"` Job *Job `xml:"job"` Description string `xml:"description,omitempty"` SuccessfulNodes Nodes `xml:"successfulNodes,omitempty"` FailedNodes Nodes `xml:"failedNodes,omitempty"` }
type ExecutionAbort ¶
type ExecutionDateTime ¶
type ExecutionDateTime struct {
UnixTime int64 `xml:"unixtime,attr"`
}
type ExecutionId ¶
type ExecutionId struct {
ID string `xml:"id,attr"`
}
type ExecutionOutput ¶
type ExecutionOutput struct { XMLName xml.Name `xml:"output"` ID int64 `xml:"id"` Offset int64 `xml:"offset"` Completed bool `xml:"completed"` ExecCompleted bool `xml:"execCompleted"` HasFailedNodes bool `xml:"hasFailedNodes"` ExecState string `xml:"execState"` LastModified ExecutionDateTime `xml:"lastModified"` ExecDuration int64 `xml:"execDuration"` TotalSize int64 `xml:"totalSize"` Entries ExecutionOutputEntries `xml:"entries"` }
type ExecutionOutputEntries ¶
type ExecutionOutputEntries struct {
Entry []ExecutionOutputEntry `xml:"entry"`
}
type ExecutionOutputEntry ¶
type ExecutionOutputEntry struct { XMLName xml.Name Time string `xml:"time,attr"` AbsoluteTime string `xml:"absolute_time,attr"` Log string `xml:"log,attr"` Level string `xml:"level,attr"` User string `xml:"user,attr"` Command string `xml:"command,attr"` Stepctx string `xml:"stepctx,attr"` Node string `xml:"node,attr"` }
type ExecutionState ¶
type ExecutionState struct { XMLName xml.Name `xml:"result"` Success bool `xml:"success,attr"` ApiVersion int64 `xml:"apiversion,attr"` StartTime string `xml:"executionState>startTime"` StepCount int64 `xml:"executionState>stepCount"` AllNodes []Node `xml:"executionState>allNodes>nodes>node,omitempty"` TargetNodes []Node `xml:"executionState>targetNodes>nodes>node,omitempty"` ExecutionID int64 `xml:"executionState>executionId"` Completed bool `xml:"executionState>completed"` UpdateTime string `xml:"executionState>updateTime,omitempty"` Steps []ExecutionStep `xml:"executionState>steps>step,omitempty"` Nodes []NodeWithSteps `xml:"executionState>nodes>node"` }
type ExecutionStep ¶
type ExecutionStep struct { XMLName xml.Name `xml:"step"` StepCtx int64 `xml:"stepctx,attr"` ID int64 `xml:"id,attr"` StartTime string `xml:"startTime"` UpdateTime string `xml:"updateTime"` EndTime string `xml:"endTime"` ExecutionState string `xml:"executionState"` NodeStep bool `xml:"nodeStep"` NodeStates []NodeState `xml:"nodeStates>nodeState"` }
type Executions ¶
type ExecutionsDeleted ¶
type ExecutionsDeleted struct { XMLName xml.Name `xml:"deleteExecutions"` RequestCount int64 `xml:"requestCount,attr"` AllSuccessful bool `xml:"allSuccessful,attr"` Successful struct { XMLName xml.Name `xml:"successful"` Count int64 `xml:"count,attr"` } `xml:"successful"` Failed struct { XMLName xml.Name `xml:"failed"` Count int64 `xml:"count,attr"` Failures []FailedExecutionDelete `xml:"execution,omitempty"` } `xml:"failed"` }
type FailedExecutionDelete ¶
type ImportParams ¶
type Job ¶
type Job struct { XMLName xml.Name `xml:"job"` ID string `xml:"id,attr"` Name string `xml:"name"` Group string `xml:"group"` Project string `xml:"project"` Description string `xml:"description,omitempty"` // These two come from Execution output AverageDuration int64 `xml:"averageDuration,attr,omitempty"` Options Options `xml:"options,omitempty"` // These four come from Import output (depending on success,error,skipped) Index int `xml:"index,attr,omitempty"` Href string `xml:"href,attr,omitempty"` Error string `xml:"error,omitempty"` Url string `xml:"url,omitempty"` }
type JobContext ¶
type JobDetails ¶
type JobDetails struct { ID string `xml:"id"` Name string `xml:"name"` LogLevel string `xml:"loglevel"` Description string `xml:"description,omitempty"` UUID string `xml:"uuid"` Group string `xml:"group"` Context JobContext `xml:"context"` Notification JobNotification `xml:"notification"` MultipleExections bool `xml:"multipleExecutions"` Dispatch JobDispatch `xml:"dispatch"` NodeFilters struct { Filter []string `xml:"filter"` } `xml:"nodefilters"` Sequence JobSequence `xml:"sequence"` }
type JobDispatch ¶
type JobImportResult ¶
type JobImportResult struct { XMLName xml.Name `xml:"result"` Success bool `xml:"success,attr,omitempty"` Error bool `xml:"error,attr,omitempty"` APIVersion int64 `xml:"apiversion,attr"` Succeeded struct { XMLName xml.Name `xml:"succeeded"` Count int64 `xml:"count,attr"` Jobs []JobImportResultJob `xml:"job,omitempty"` } `xml:"succeeded,omitempty"` Failed struct { XMLName xml.Name `xml:"failed"` Count int64 `xml:"count,attr"` Jobs []JobImportResultJob `xml:"job,omitempty"` } `xml:"failed,omitempty"` Skipped struct { XMLName xml.Name `xml:"skipped"` Count int64 `xml:"count,attr"` Jobs []JobImportResultJob `xml:"job,omitempty"` } `xml:"skipped,omitempty"` }
type JobImportResultJob ¶
type JobImportResultJob struct { XMLName xml.Name `xml:"job"` ID string `xml:"id,omitempty"` Name string `xml:"name"` Group string `xml:"group"` Project string `xml:"project"` Index int `xml:"index,attr,omitempty"` Href string `xml:"href,attr,omitempty"` Error string `xml:"error,omitempty"` Url string `xml:"url,omitempty"` }
type JobList ¶
type JobList struct { XMLName xml.Name `xml:"joblist"` Job JobDetails `xml:"job"` }
type JobNotification ¶
type JobNotification struct { XMLName xml.Name `xml:"notification"` OnStart JobPlugins `xml:"onstart,omitempty"` OnSuccess JobPlugins `xml:"onsuccess,omitempty"` OnFailure JobPlugins `xml:"onfailure,omitempty"` }
type JobNotifications ¶
type JobNotifications struct {
Notifications []JobNotification `xml:"notification,omitempty"`
}
type JobOption ¶
type JobOption struct { XMLName xml.Name `xml:"option"` Name string `xml:"name,attr"` Required bool `xml:"required,attr,omitempty"` Secure bool `xml:"secure,attr,omitempty"` ValueExposed bool `xml:"valueExposed,attr,omitempty"` DefaultValue string `xml:"value,attr,omitempty"` Description string `xml:"description,omitempty"` }
type JobOptions ¶
type JobPlugin ¶
type JobPlugin struct { XMLName xml.Name `xml:"plugin"` PluginType string `xml:"type,attr"` Configuration JobPluginConfiguration `xml:"configuration,omitempty"` }
type JobPluginConfiguration ¶
type JobPluginConfiguration struct { XMLName xml.Name `xml:"configuration"` Entries []JobPluginConfigurationEntry `xml:"entry,omitempty"` }
type JobPlugins ¶
type JobPlugins struct {
Plugins []JobPlugin `xml:"plugin,omitempty"`
}
type JobRefStep ¶
type JobSequence ¶
type JobSequence struct { XMLName xml.Name KeepGoing bool `xml:"keepgoing,attr"` Strategy string `xml:"strategy,attr"` Steps []SequenceStep `xml:"command"` }
type LogStorage ¶
type LogStorage struct { XMLName xml.Name `xml:"logStorage"` Enabled bool `xml:"enabled,attr"` PluginName string `xml:"enabled,attr"` SucceededCount int64 `xml:"succeededCount"` FailedCount int64 `xml:"failedCount"` QueuedCount int64 `xml:"queuedCount"` TotalCount int64 `xml:"TotalCount"` IncompleteCount int64 `xml:"incompleteCount"` MissingCount int64 `xml:"missingCount"` }
type NewProject ¶
type NewProject struct { XMLName xml.Name `xml:"project"` Name string `xml:"name"` Description string `xml:"description"` Config []ConfigProperty `xml:"config,omitempty"` }
type Node ¶
type Node struct { XMLName xml.Name `xml:"node"` Name string `xml:"name,attr"` Description string `xml:"description,attr,omitempty"` Tags string `xml:"tags,attr,omitempty"` Hostname string `xml:"hostname,attr,omitempty"` OsArch string `xml:"osArch,attr,omitempty"` OsFamily string `xml:"osFamily,attr,omitempty"` OsName string `xml:"osName,attr,omitempty"` OsVersion string `xml:"osVersion,attr,omitempty"` Username string `xml:"username,attr,omitempty"` }
TODO: Convert to a Basic Node that just has "name,attr"
type NodeWithSteps ¶
type PluginStep ¶
type ResourceMeta ¶
type ResourceMeta struct { XMLName xml.Name `xml:"resource-meta"` ContentType string `xml:"Rundeck-content-type"` Size int64 `xml:"Rundeck-content-size"` CreationTime string `xml:"Rundeck-content-creation-time"` ModifyTime string `xml:"Rundeck-content-modify-time"` AuthCreatedUsername string `xml:"Rundeck-auth-created-username"` KeyType string `xml:"Rundeck-key-type"` }
type RunOptions ¶
type RundeckClient ¶
type RundeckClient struct { Client *napping.Session HTTPClient *http.Client Config *ClientConfig Transport *http.Transport }
func NewClient ¶
func NewClient(config *ClientConfig) (c RundeckClient)
func NewClientFromEnv ¶
func NewClientFromEnv() (c RundeckClient)
func (*RundeckClient) AbortExecution ¶
func (c *RundeckClient) AbortExecution(id string) (ExecutionAbort, error)
func (*RundeckClient) CreateSystemAclPolicy ¶
func (c *RundeckClient) CreateSystemAclPolicy(name string, contents []byte) error
func (*RundeckClient) CreateToken ¶
func (c *RundeckClient) CreateToken(u string) (token string, e error)
func (*RundeckClient) Delete ¶
func (rc *RundeckClient) Delete(path string, options interface{}) error
func (*RundeckClient) DeleteAllExecutionsForProject ¶
func (c *RundeckClient) DeleteAllExecutionsForProject(project string, max int64) (ExecutionsDeleted, error)
func (*RundeckClient) DeleteExecution ¶
func (c *RundeckClient) DeleteExecution(id string) error
func (*RundeckClient) DeleteExecutions ¶
func (c *RundeckClient) DeleteExecutions(ids []string) (ExecutionsDeleted, error)
func (*RundeckClient) DeleteJob ¶
func (c *RundeckClient) DeleteJob(id string) error
func (*RundeckClient) DeleteProject ¶
func (c *RundeckClient) DeleteProject(p string) error
func (*RundeckClient) DeleteToken ¶
func (c *RundeckClient) DeleteToken(token string) error
func (*RundeckClient) DisableExecution ¶
func (c *RundeckClient) DisableExecution(id string) error
func (*RundeckClient) EnableExecution ¶
func (c *RundeckClient) EnableExecution(id string) error
func (*RundeckClient) ExportJob ¶
func (c *RundeckClient) ExportJob(id string, format string) (s string, e error)
func (*RundeckClient) FindJobByName ¶
func (c *RundeckClient) FindJobByName(name string, project string) (*JobDetails, error)
func (*RundeckClient) Get ¶
func (rc *RundeckClient) Get(i *[]byte, path string, options interface{}) error
func (*RundeckClient) GetExecution ¶
func (c *RundeckClient) GetExecution(executionId string) (exec Execution, err error)
func (*RundeckClient) GetExecutionOutput ¶
func (c *RundeckClient) GetExecutionOutput(executionId string) (ExecutionOutput, error)
func (*RundeckClient) GetExecutionState ¶
func (c *RundeckClient) GetExecutionState(executionId string) (ExecutionState, error)
func (*RundeckClient) GetHistory ¶
func (c *RundeckClient) GetHistory(project string) (Events, error)
func (*RundeckClient) GetLogstorage ¶
func (c *RundeckClient) GetLogstorage() (data LogStorage, err error)
func (*RundeckClient) GetRequiredOpts ¶
func (c *RundeckClient) GetRequiredOpts(j string) (map[string]string, error)
func (*RundeckClient) GetSystemAclPolicies ¶
func (c *RundeckClient) GetSystemAclPolicies() (data AclPolicies, err error)
func (*RundeckClient) GetToken ¶
func (c *RundeckClient) GetToken(tokenId string) (data Token, err error)
func (*RundeckClient) GetTokens ¶
func (c *RundeckClient) GetTokens() (data Tokens, err error)
func (*RundeckClient) GetUserTokens ¶
func (c *RundeckClient) GetUserTokens(user string) (data Tokens, err error)
func (*RundeckClient) ImportJob ¶
func (c *RundeckClient) ImportJob(j ImportParams) (string, error)
func (*RundeckClient) ListNodes ¶
func (c *RundeckClient) ListNodes(projectId string) (Nodes, error)
func (*RundeckClient) ListProjectExecutions ¶
func (c *RundeckClient) ListProjectExecutions(projectId string, options map[string]string) (Executions, error)
func (*RundeckClient) ListProjects ¶
func (c *RundeckClient) ListProjects() (data Projects, err error)
func (*RundeckClient) ListRunningExecutions ¶
func (c *RundeckClient) ListRunningExecutions(projectId string) (executions Executions, err error)
func (*RundeckClient) MakeProject ¶
func (c *RundeckClient) MakeProject(p NewProject) error
func (*RundeckClient) Post ¶
func (rc *RundeckClient) Post(i *[]byte, path string, data []byte, options interface{}) error
func (*RundeckClient) Put ¶
func (rc *RundeckClient) Put(i *[]byte, path string, data []byte, options interface{}) error
func (*RundeckClient) RunAdhoc ¶
func (c *RundeckClient) RunAdhoc(projectId string, exec string, node_filter string) (ExecutionId, error)
func (*RundeckClient) RunJob ¶
func (c *RundeckClient) RunJob(id string, options RunOptions) (Executions, error)
type RundeckError ¶
type RundeckResult ¶
type RundeckResult struct { XMLName xml.Name `xml:"result"` Succeeded bool `xml:"success,attr,omitempty"` Errored bool `xml:"error,attr,omitempty"` ApiVersion string `xml:"apiversion,attr,omitempty"` SuccessMessages []string `xml:"success>message,omitempty"` ErrorMessages []string `xml:"error>message,omitempty"` }
type ScriptStep ¶
type SequenceStep ¶
type SequenceStep struct { XMLName xml.Name Description string `xml:"description,omitempty"` JobRef *JobRefStep `xml:"jobref,omitempty"` NodeStepPlugin *PluginStep `xml:"node-step-plugin,omitempty"` StepPlugin *PluginStep `xml:"step-plugin,omitempty"` Exec *string `xml:"exec,omitempty"` *ScriptStep `xml:",omitempty"` }
type SystemInfo ¶
type ThreadDump ¶
Click to show internal directories.
Click to hide internal directories.