Documentation ¶
Index ¶
- Constants
- Variables
- type ACLPolicies
- type AbortExecutionOption
- type AbortedExecution
- type AdHocExecution
- type AdHocRunOption
- type AdHocScriptOption
- func ScriptArgString(i string) AdHocScriptOption
- func ScriptArgsQuoted(q bool) AdHocScriptOption
- func ScriptFileExtension(e string) AdHocScriptOption
- func ScriptInterpreter(i string) AdHocScriptOption
- func ScriptKeepGoing(b bool) AdHocScriptOption
- func ScriptNodeFilters(filters string) AdHocScriptOption
- func ScriptRunAs(user string) AdHocScriptOption
- func ScriptThreadCount(count int) AdHocScriptOption
- type AdHocScriptURLOption
- func ScriptURLArgString(i string) AdHocScriptURLOption
- func ScriptURLArgsQuoted(q bool) AdHocScriptURLOption
- func ScriptURLFileExtension(e string) AdHocScriptURLOption
- func ScriptURLInterpreter(i string) AdHocScriptURLOption
- func ScriptURLKeepGoing(b bool) AdHocScriptURLOption
- func ScriptURLNodeFilters(filters string) AdHocScriptURLOption
- func ScriptURLRunAs(user string) AdHocScriptURLOption
- func ScriptURLThreadCount(count int) AdHocScriptURLOption
- type AuthError
- type BulkToggleResponse
- type Client
- func (c *Client) AbortExecution(executionID int, opts ...AbortExecutionOption) (*AbortedExecution, error)
- func (c *Client) BulkDeleteExecutions(ids ...int) (*DeletedExecutions, error)
- func (c *Client) BulkDisableExecution(ids ...string) (*BulkToggleResponse, error)
- func (c *Client) BulkDisableSchedule(ids ...string) (*responses.BulkToggleResponse, error)
- func (c *Client) BulkEnableExecution(ids ...string) (*BulkToggleResponse, error)
- func (c *Client) BulkEnableSchedule(ids ...string) (*responses.BulkToggleResponse, error)
- func (c *Client) BulkJobDelete(ids ...string) error
- func (c *Client) CreateProject(name string, properties map[string]string) (*Project, error)
- func (c *Client) CreateProjectACLPolicy(projectName, policyName string, contents io.Reader) error
- func (c *Client) CreateSystemACLPolicy(name string, contents io.Reader) error
- func (c *Client) CreateToken(username string, opts ...TokenOption) (*Token, error)
- func (c *Client) DeleteAllExecutionsForJob(jobid string) (*DeletedExecutions, error)
- func (c *Client) DeleteExecution(executionID int) error
- func (c *Client) DeleteJob(id string) error
- func (c *Client) DeleteKey() error
- func (c *Client) DeleteProject(p string) error
- func (c *Client) DeleteProjectACLPolicy(projectName, policyName string) error
- func (c *Client) DeleteProjectConfigurationKey(projectName, key string) error
- func (c *Client) DeleteProjectMotd(projectName string) error
- func (c *Client) DeleteProjectReadme(projectName string) error
- func (c *Client) DeleteSystemACLPolicy(name string) error
- func (c *Client) DeleteToken(token string) error
- func (c *Client) DisableExecution(executionID int) (bool, error)
- func (c *Client) DisableSCMPluginForProject(project, integration, pluginType string) error
- func (c *Client) DisableSchedule(id string) (bool, error)
- func (c *Client) EnableExecution(executionID int) (bool, error)
- func (c *Client) EnableSCMPluginForProject(project, integration, pluginType string) error
- func (c *Client) EnableSchedule(id string) (bool, error)
- func (c *Client) ExportJob(id string, format string) ([]byte, error)
- func (c *Client) FindJobByName(name string) ([]JobMetaData, error)
- func (rc *Client) Get(path string, opts ...httpclient.RequestOption) ([]byte, error)
- func (c *Client) GetCurrentUserProfile() (*User, error)
- func (c *Client) GetExecutionInfo(executionID int) (*Execution, error)
- func (c *Client) GetExecutionOutput(executionID int) (*ExecutionOutput, error)
- func (c *Client) GetExecutionOutputWithOffset(executionID int, offset int) (*ExecutionOutput, error)
- func (c *Client) GetExecutionState(executionID int) (*ExecutionState, error)
- func (c *Client) GetExecutionsForJob(jobid string) error
- func (c *Client) GetIncompleteLogStorage() (*IncompleteLogStorage, error)
- func (c *Client) GetJobDefinition(id string, format string) ([]byte, error)
- func (c *Client) GetJobInfo(id string) (*JobMetaData, error)
- func (c *Client) GetJobMetaData(id string) (*JobMetaData, error)
- func (c *Client) GetJobOpts(j string) ([]*JobOption, error)
- func (c *Client) GetJobSCMActionInputFields(jobid, integration, action string) (*SCMActionInputFields, error)
- func (c *Client) GetJobSCMDiff(jobid, integration string) (*SCMJobDiff, error)
- func (c *Client) GetJobSCMStatus(jobid, integration string) (*SCMJobStatus, error)
- func (c *Client) GetKeyContents() error
- func (c *Client) GetKeyMetaData() error
- func (c *Client) GetLogStorageInfo() (*LogStorage, error)
- func (c *Client) GetProjectACLPolicy(projectName, policyName string) ([]byte, error)
- func (c *Client) GetProjectArchiveExport(p string, w io.Writer, opts ...ProjectExportOption) error
- func (c *Client) GetProjectArchiveExportAsync(p string, opts ...ProjectExportOption) (string, error)
- func (c *Client) GetProjectArchiveExportAsyncDownload(p, token string, w io.Writer) error
- func (c *Client) GetProjectArchiveExportAsyncStatus(p, token string) (*responses.ProjectArchiveExportAsyncResponse, error)
- func (c *Client) GetProjectConfiguration(p string) (map[string]string, error)
- func (c *Client) GetProjectConfigurationKey(projectName, key string) (string, error)
- func (c *Client) GetProjectInfo(name string) (*Project, error)
- func (c *Client) GetProjectMotd(projectName string) (string, error)
- func (c *Client) GetProjectReadme(projectName string) (string, error)
- func (c *Client) GetProjectSCMActionInputFields(project, integration, action string) (*SCMActionInputFields, error)
- func (c *Client) GetProjectSCMConfig(projectName, integration string) (*ProjectSCMConfig, error)
- func (c *Client) GetProjectSCMPluginInputFields(projectName, integration, pluginType string) (*SCMPluginInputFields, error)
- func (c *Client) GetProjectSCMStatus(project, integration string) (*SCMProjectStatus, error)
- func (c *Client) GetRequiredOpts(j string) (map[string]string, error)
- func (c *Client) GetResourceInfo(projectName, resourceName string) (*ResourceDetail, error)
- func (c *Client) GetSystemACLPolicy(policy string) ([]byte, error)
- func (c *Client) GetSystemInfo() (*SystemInfo, error)
- func (c *Client) GetToken(tokenID string) (*Token, error)
- func (c *Client) GetUploadedFileInfo(ids ...string) error
- func (c *Client) GetUserProfile(login string) (*User, error)
- func (c *Client) ImportJob(project string, data io.Reader, opt ...JobImportOption) (*JobImportResult, error)
- func (c *Client) ListFilesUploadedForJob(ids ...string) error
- func (c *Client) ListHistory(project string, opts ...map[string]string) (*History, error)
- func (c *Client) ListInputFilesForExecution() error
- func (c *Client) ListJobs(projectID string) (JobList, error)
- func (c *Client) ListKeys() error
- func (c *Client) ListProjectACLPolicies(name string) (*ACLPolicies, error)
- func (c *Client) ListProjectExecutions(projectID string, options map[string]string) (*Executions, error)
- func (c *Client) ListProjects() (Projects, error)
- func (c *Client) ListResourcesForProject(p string) (*Resources, error)
- func (c *Client) ListRunningExecutions(projectID string) (*Executions, error)
- func (c *Client) ListSCMPlugins(projectName string) (*SCMPlugins, error)
- func (c *Client) ListSystemACLPolicies() (*ACLPolicies, error)
- func (c *Client) ListTokens() ([]*Token, error)
- func (c *Client) ListTokensForUser(user string) ([]*Token, error)
- func (c *Client) ListUsers() (Users, error)
- func (c *Client) ModifyUserProfile(u *User) (*User, error)
- func (c *Client) PerformJobSCMAction() error
- func (c *Client) PerformProjectSCMAction(project, integration, action string, opts ...SCMActionOption) (*SCMPluginForProject, error)
- func (c *Client) ProjectArchiveImport(projectName string, f io.Reader, opts ...ProjectImportOption) (*responses.ProjectImportArchiveResponse, error)
- func (c *Client) PutProjectConfiguration(projectName string, config map[string]string) (map[string]string, error)
- func (c *Client) PutProjectConfigurationKey(projectName, key, value string) error
- func (c *Client) PutProjectMotd(projectName string, motd io.Reader) error
- func (c *Client) PutProjectReadme(projectName string, readme io.Reader) error
- func (c *Client) ResumeIncompleteLogStorage() (bool, error)
- func (c *Client) RunAdHocCommand(projectID string, exec string, opts ...AdHocRunOption) (*AdHocExecution, error)
- func (c *Client) RunAdHocScript(projectID string, scriptData io.Reader, opts ...AdHocScriptOption) (*AdHocExecution, error)
- func (c *Client) RunAdHocScriptFromURL(projectID, scriptURL string, opts ...AdHocScriptURLOption) (*AdHocExecution, error)
- func (c *Client) RunJob(id string, opts ...RunJobOption) (*Execution, error)
- func (c *Client) SetupSCMPluginForProject(project, integration, pluginType string, params map[string]string) (*SCMPluginForProject, error)
- func (c *Client) UpdateProjectACLPolicy(projectName, policyName string, contents io.Reader) error
- func (c *Client) UpdateSystemACLPolicy(name string, contents io.Reader) error
- func (c *Client) UploadFileForJobOption(ids ...string) error
- func (c *Client) UploadKey() error
- func (c *Client) WaitFor(f func() (bool, error), max time.Duration) (bool, error)
- type ClientConfig
- type DeletedExecutions
- type Execution
- type ExecutionOutput
- type ExecutionState
- type Executions
- type History
- type IncompleteLogStorage
- type Job
- type JobImportDefinition
- type JobImportOption
- type JobImportResult
- type JobList
- type JobMetaData
- type JobOption
- type LogStorage
- type MarshalError
- type OptionError
- type PolicyValidationError
- type Project
- type ProjectExportOption
- func ProjectExportAcls(b bool) ProjectExportOption
- func ProjectExportAll(b bool) ProjectExportOption
- func ProjectExportConfigs(b bool) ProjectExportOption
- func ProjectExportExecutionIDs(ids ...string) ProjectExportOption
- func ProjectExportExecutions(b bool) ProjectExportOption
- func ProjectExportJobs(b bool) ProjectExportOption
- func ProjectExportReadmes(b bool) ProjectExportOption
- type ProjectImportOption
- type ProjectSCMConfig
- type Projects
- type Resource
- type ResourceDetail
- type Resources
- type RunJobOption
- type SCMAction
- type SCMActionInputFields
- type SCMActionOption
- type SCMJobDiff
- type SCMJobStatus
- type SCMPluginForProject
- type SCMPluginInputFields
- type SCMPlugins
- type SCMProjectStatus
- type SCMValidationError
- type SystemInfo
- type Token
- type TokenOption
- type TokenRequest
- type Tokens
- type UnmarshalError
- type User
- type Users
- type WaitingJob
Constants ¶
const MaxRundeckVersion = "31"
MaxRundeckVersion is the maximum version of the api this library supports can be overridden TODO: make this a min/max option and validate
const RDTime = "2006-01-02T15:04:05Z"
RDTime is the rundeck time format
Variables ¶
var ( // ErrInvalidRundeckURL is the error for an invalid rundeck url ErrInvalidRundeckURL = errors.New("Invalid Rundeck URL") // ErrAuthFailed is the error for a auth failure in an api call // this is slightly different the ErrInvalidUsernamePassword // as this means auth succeeded with basic auth but a 401 could be returned farther down ErrAuthFailed = errors.New("API call failed due to authentication failure") // ErrMissingResource is the error type for 404 not found ErrMissingResource = errors.New("Rundeck could not find the resource you requested") // ErrResourceConflict is the error type for 409 responses ErrResourceConflict = errors.New("resource already exists on the rundeck server") )
Functions ¶
This section is empty.
Types ¶
type ACLPolicies ¶
type ACLPolicies struct {
responses.ACLResponse
}
ACLPolicies represents ACL Policies
type AbortExecutionOption ¶
AbortExecutionOption is a function option type for AbortExection options
func AbortExecutionAsUser ¶
func AbortExecutionAsUser(runAsUser string) AbortExecutionOption
AbortExecutionAsUser sets the user for the abort execution call
type AbortedExecution ¶
type AbortedExecution struct {
responses.AbortExecutionResponse
}
AbortedExecution represents the results of aborting an execution
type AdHocExecution ¶
type AdHocExecution struct {
responses.AdHocExecutionResponse
}
AdHocExecution represents an adhoc execution
type AdHocRunOption ¶
type AdHocRunOption func(c *requests.AdHocCommandRequest) error
AdHocRunOption is a function option type for adhoc commands
func CmdKeepGoing ¶
func CmdKeepGoing(b bool) AdHocRunOption
CmdKeepGoing is the option to keep running even if a node fails
func CmdNodeFilters ¶
func CmdNodeFilters(filters string) AdHocRunOption
CmdNodeFilters is the option for passing node filters to an adhoc command
func CmdRunAs ¶
func CmdRunAs(user string) AdHocRunOption
CmdRunAs is the option for specifying who to run an adhoc command
func CmdThreadCount ¶
func CmdThreadCount(count int) AdHocRunOption
CmdThreadCount is the option for number of threads to run an adhoc command
type AdHocScriptOption ¶
AdHocScriptOption is a function option type for adhoc commands
func ScriptArgString ¶
func ScriptArgString(i string) AdHocScriptOption
ScriptArgString is the option for setting arguments passed to the Script being run
func ScriptArgsQuoted ¶
func ScriptArgsQuoted(q bool) AdHocScriptOption
ScriptArgsQuoted is the option for setting if Script and args are quoted when passed to the interpreter
func ScriptFileExtension ¶
func ScriptFileExtension(e string) AdHocScriptOption
ScriptFileExtension is the option for setting the file extension on the remote host
func ScriptInterpreter ¶
func ScriptInterpreter(i string) AdHocScriptOption
ScriptInterpreter is the option to set the Script interpreter
func ScriptKeepGoing ¶
func ScriptKeepGoing(b bool) AdHocScriptOption
ScriptKeepGoing is the option to keep running even if a node fails
func ScriptNodeFilters ¶
func ScriptNodeFilters(filters string) AdHocScriptOption
ScriptNodeFilters is the option for passing node filters to an adhoc command
func ScriptRunAs ¶
func ScriptRunAs(user string) AdHocScriptOption
ScriptRunAs is the option for specifying who to run an adhoc command
func ScriptThreadCount ¶
func ScriptThreadCount(count int) AdHocScriptOption
ScriptThreadCount is the option for number of threads to run an adhoc command
type AdHocScriptURLOption ¶
AdHocScriptURLOption is a function option type for adhoc commands
func ScriptURLArgString ¶
func ScriptURLArgString(i string) AdHocScriptURLOption
ScriptURLArgString is the option for setting arguments passed to the ScriptURL being run
func ScriptURLArgsQuoted ¶
func ScriptURLArgsQuoted(q bool) AdHocScriptURLOption
ScriptURLArgsQuoted is the option for setting if ScriptURL and args are quoted when passed to the interpreter
func ScriptURLFileExtension ¶
func ScriptURLFileExtension(e string) AdHocScriptURLOption
ScriptURLFileExtension is the option for setting the file extension on the remote host
func ScriptURLInterpreter ¶
func ScriptURLInterpreter(i string) AdHocScriptURLOption
ScriptURLInterpreter is the option to set the ScriptURL interpreter
func ScriptURLKeepGoing ¶
func ScriptURLKeepGoing(b bool) AdHocScriptURLOption
ScriptURLKeepGoing is the option to keep running even if a node fails
func ScriptURLNodeFilters ¶
func ScriptURLNodeFilters(filters string) AdHocScriptURLOption
ScriptURLNodeFilters is the option for passing node filters to an adhoc command
func ScriptURLRunAs ¶
func ScriptURLRunAs(user string) AdHocScriptURLOption
ScriptURLRunAs is the option for specifying who to run an adhoc command
func ScriptURLThreadCount ¶
func ScriptURLThreadCount(count int) AdHocScriptURLOption
ScriptURLThreadCount is the option for number of threads to run an adhoc command
type AuthError ¶
type AuthError struct {
// contains filtered or unexported fields
}
AuthError is a custom error type for decoding errors
type BulkToggleResponse ¶
type BulkToggleResponse struct {
responses.BulkToggleResponse
}
BulkToggleResponse represents the results of a bulk toggle request
type Client ¶
type Client struct { HTTPClient *http.Client Config *ClientConfig }
Client represents a rundeck client
func NewBasicAuthClient ¶
NewBasicAuthClient returns a new client configured for basic auth using default settings
func NewClient ¶
func NewClient(config *ClientConfig) (*Client, error)
NewClient creates a new client from the provided `ClientConfig`
func NewClientFromEnv ¶
NewClientFromEnv returns a new client from provided env vars
func NewTokenAuthClient ¶
NewTokenAuthClient returns a new client configured for token auth using default settings
func (*Client) AbortExecution ¶
func (c *Client) AbortExecution(executionID int, opts ...AbortExecutionOption) (*AbortedExecution, error)
AbortExecution lists input files used for an execution http://rundeck.org/docs/api/index.html#aborting-executions
func (*Client) BulkDeleteExecutions ¶
func (c *Client) BulkDeleteExecutions(ids ...int) (*DeletedExecutions, error)
BulkDeleteExecutions deletes a list of executions by id http://rundeck.org/docs/api/index.html#bulk-delete-executions
func (*Client) BulkDisableExecution ¶
func (c *Client) BulkDisableExecution(ids ...string) (*BulkToggleResponse, error)
BulkDisableExecution disables job execution in bulk http://rundeck.org/docs/api/index.html#bulk-toggle-job-execution
func (*Client) BulkDisableSchedule ¶
func (c *Client) BulkDisableSchedule(ids ...string) (*responses.BulkToggleResponse, error)
BulkDisableSchedule enables scheduled jobs in bulk http://rundeck.org/docs/api/index.html#bulk-toggle-job-schedules
func (*Client) BulkEnableExecution ¶
func (c *Client) BulkEnableExecution(ids ...string) (*BulkToggleResponse, error)
BulkEnableExecution enables job execution in bulk http://rundeck.org/docs/api/index.html#bulk-toggle-job-execution
func (*Client) BulkEnableSchedule ¶
func (c *Client) BulkEnableSchedule(ids ...string) (*responses.BulkToggleResponse, error)
BulkEnableSchedule enables scheduled jobs in bulk http://rundeck.org/docs/api/index.html#bulk-toggle-job-schedules
func (*Client) BulkJobDelete ¶
BulkJobDelete deletes jobs in bulk http://rundeck.org/docs/api/index.html#bulk-job-delete
func (*Client) CreateProject ¶
CreateProject makes a project http://rundeck.org/docs/api/index.html#project-creation
func (*Client) CreateProjectACLPolicy ¶
CreateProjectACLPolicy creates a project ACL Policy http://rundeck.org/docs/api/index.html#create-a-project-acl-policy
func (*Client) CreateSystemACLPolicy ¶
CreateSystemACLPolicy creates a system acl policy http://rundeck.org/docs/api/index.html#create-an-acl-policy
func (*Client) CreateToken ¶
func (c *Client) CreateToken(username string, opts ...TokenOption) (*Token, error)
CreateToken creates a token http://rundeck.org/docs/api/index.html#create-a-token
func (*Client) DeleteAllExecutionsForJob ¶
func (c *Client) DeleteAllExecutionsForJob(jobid string) (*DeletedExecutions, error)
DeleteAllExecutionsForJob deletes all executions for a job http://rundeck.org/docs/api/index.html#delete-all-executions-for-a-job
func (*Client) DeleteExecution ¶
DeleteExecution deletes an execution http://rundeck.org/docs/api/index.html#delete-an-execution
func (*Client) DeleteJob ¶
DeleteJob deletes a job http://rundeck.org/docs/api/index.html#deleting-a-job-definition
func (*Client) DeleteKey ¶
DeleteKey deletes a key http://rundeck.org/docs/api/index.html#delete-keys
func (*Client) DeleteProject ¶
DeleteProject deletes a project http://rundeck.org/docs/api/index.html#project-deletion
func (*Client) DeleteProjectACLPolicy ¶
DeleteProjectACLPolicy deletes a project ACL Policy http://rundeck.org/docs/api/index.html#delete-a-project-acl-policy
func (*Client) DeleteProjectConfigurationKey ¶
DeleteProjectConfigurationKey deletes a configuration key http://rundeck.org/docs/api/index.html#delete-project-configuration-key
func (*Client) DeleteProjectMotd ¶
DeleteProjectMotd deletes a project's motd.md
func (*Client) DeleteProjectReadme ¶
DeleteProjectReadme deletes a project's readme.md
func (*Client) DeleteSystemACLPolicy ¶
DeleteSystemACLPolicy deletes a system ACL Policy http://rundeck.org/docs/api/index.html#delete-an-acl-policy
func (*Client) DeleteToken ¶
DeleteToken deletes a token http://rundeck.org/docs/api/index.html#delete-a-token
func (*Client) DisableExecution ¶
DisableExecution disables an execution http://rundeck.org/docs/api/index.html#disable-executions-for-a-job
func (*Client) DisableSCMPluginForProject ¶
DisableSCMPluginForProject disables a plugin for a project http://rundeck.org/docs/api/index.html#enable-scm-plugin-for-a-project
func (*Client) DisableSchedule ¶
DisableSchedule disables a scheduled job http://rundeck.org/docs/api/index.html#disable-scheduling-for-a-job
func (*Client) EnableExecution ¶
EnableExecution enables an execution http://rundeck.org/docs/api/index.html#enable-executions-for-a-job
func (*Client) EnableSCMPluginForProject ¶
EnableSCMPluginForProject enables a plugin for a project http://rundeck.org/docs/api/index.html#enable-scm-plugin-for-a-project
func (*Client) EnableSchedule ¶
EnableSchedule enables a scheduled job http://rundeck.org/docs/api/index.html#enable-scheduling-for-a-job
func (*Client) ExportJob ¶
ExportJob exports a job http://rundeck.org/docs/api/index.html#exporting-jobs
func (*Client) FindJobByName ¶
func (c *Client) FindJobByName(name string) ([]JobMetaData, error)
FindJobByName runs a job by name
func (*Client) Get ¶
func (rc *Client) Get(path string, opts ...httpclient.RequestOption) ([]byte, error)
Get performs an http get
func (*Client) GetCurrentUserProfile ¶
GetCurrentUserProfile returns information about the current user http://rundeck.org/docs/api/index.html#get-user-profile
func (*Client) GetExecutionInfo ¶
GetExecutionInfo returns the details of a job execution http://rundeck.org/docs/api/index.html#execution-info
func (*Client) GetExecutionOutput ¶
func (c *Client) GetExecutionOutput(executionID int) (*ExecutionOutput, error)
GetExecutionOutput returns the output of an execution http://rundeck.org/docs/api/index.html#execution-output
func (*Client) GetExecutionOutputWithOffset ¶
func (c *Client) GetExecutionOutputWithOffset(executionID int, offset int) (*ExecutionOutput, error)
GetExecutionOutputWithOffset gets the output of an execution at the given offset
func (*Client) GetExecutionState ¶
func (c *Client) GetExecutionState(executionID int) (*ExecutionState, error)
GetExecutionState returns the state of an execution http://rundeck.org/docs/api/index.html#execution-state
func (*Client) GetExecutionsForJob ¶
GetExecutionsForJob gets executions for a job http://rundeck.org/docs/api/index.html#getting-executions-for-a-job
func (*Client) GetIncompleteLogStorage ¶
func (c *Client) GetIncompleteLogStorage() (*IncompleteLogStorage, error)
GetIncompleteLogStorage gets executions with incomplete logstorage http://rundeck.org/docs/api/index.html#list-executions-with-incomplete-log-storage
func (*Client) GetJobDefinition ¶
GetJobDefinition gets a job definition http://rundeck.org/docs/api/index.html#getting-a-job-definition
func (*Client) GetJobInfo ¶
func (c *Client) GetJobInfo(id string) (*JobMetaData, error)
GetJobInfo gets a job's details http://rundeck.org/docs/api/index.html#get-job-metadata
func (*Client) GetJobMetaData ¶
func (c *Client) GetJobMetaData(id string) (*JobMetaData, error)
GetJobMetaData gets a job's metadata http://rundeck.org/docs/api/index.html#get-job-metadata
func (*Client) GetJobOpts ¶
GetJobOpts returns the required options for a job
func (*Client) GetJobSCMActionInputFields ¶
func (c *Client) GetJobSCMActionInputFields(jobid, integration, action string) (*SCMActionInputFields, error)
GetJobSCMActionInputFields Get the input fields and selectable items for a specific action. http://rundeck.org/docs/api/index.html#get-job-scm-action-input-fields
func (*Client) GetJobSCMDiff ¶
func (c *Client) GetJobSCMDiff(jobid, integration string) (*SCMJobDiff, error)
GetJobSCMDiff Retrieve the file diff for the Job, if there are changes for the integration. http://rundeck.org/docs/api/index.html#get-job-scm-diff
func (*Client) GetJobSCMStatus ¶
func (c *Client) GetJobSCMStatus(jobid, integration string) (*SCMJobStatus, error)
GetJobSCMStatus gets a job's scm status http://rundeck.org/docs/api/index.html#get-job-scm-status
func (*Client) GetKeyContents ¶
GetKeyContents provides the public key content http://rundeck.org/docs/api/index.html#get-key-contents
func (*Client) GetKeyMetaData ¶
GetKeyMetaData returns the metadata about a stored key http://rundeck.org/docs/api/index.html#get-key-metadata
func (*Client) GetLogStorageInfo ¶
func (c *Client) GetLogStorageInfo() (*LogStorage, error)
GetLogStorageInfo gets the logstorage http://rundeck.org/docs/api/index.html#log-storage-info
func (*Client) GetProjectACLPolicy ¶
GetProjectACLPolicy gets a project ACL Policy http://rundeck.org/docs/api/index.html#get-a-project-acl-policy
func (*Client) GetProjectArchiveExport ¶
GetProjectArchiveExport export exports a zip file of the project http://rundeck.org/docs/api/index.html#project-archive-export
func (*Client) GetProjectArchiveExportAsync ¶
func (c *Client) GetProjectArchiveExportAsync(p string, opts ...ProjectExportOption) (string, error)
GetProjectArchiveExportAsync export a zip archive of a project async http://rundeck.org/docs/api/index.html#project-archive-export-async
func (*Client) GetProjectArchiveExportAsyncDownload ¶
GetProjectArchiveExportAsyncDownload downloads an async project export archive file http://rundeck.org/docs/api/index.html#project-archive-export-async-download
func (*Client) GetProjectArchiveExportAsyncStatus ¶
func (c *Client) GetProjectArchiveExportAsyncStatus(p, token string) (*responses.ProjectArchiveExportAsyncResponse, error)
GetProjectArchiveExportAsyncStatus gets the status of an async export request http://rundeck.org/docs/api/index.html#project-archive-export-async-status
func (*Client) GetProjectConfiguration ¶
GetProjectConfiguration gets a project's configuration http://rundeck.org/docs/api/index.html#get-project-configuration
func (*Client) GetProjectConfigurationKey ¶
GetProjectConfigurationKey gets a specific configuration key http://rundeck.org/docs/api/index.html#get-project-configuration-key
func (*Client) GetProjectInfo ¶
GetProjectInfo gets a project by name http://rundeck.org/docs/api/index.html#getting-project-info
func (*Client) GetProjectMotd ¶
GetProjectMotd gets a project's Motd.md http://rundeck.org/docs/api/index.html#get-readme-file
func (*Client) GetProjectReadme ¶
GetProjectReadme gets a project's readme.md http://rundeck.org/docs/api/index.html#get-readme-file
func (*Client) GetProjectSCMActionInputFields ¶
func (c *Client) GetProjectSCMActionInputFields(project, integration, action string) (*SCMActionInputFields, error)
GetProjectSCMActionInputFields Get the input fields and selectable items for a specific action. http://rundeck.org/docs/api/index.html#get-project-scm-action-input-fields
func (*Client) GetProjectSCMConfig ¶
func (c *Client) GetProjectSCMConfig(projectName, integration string) (*ProjectSCMConfig, error)
GetProjectSCMConfig Get the configuration properties for the current plugin. http://rundeck.org/docs/api/index.html#get-project-scm-config
func (*Client) GetProjectSCMPluginInputFields ¶
func (c *Client) GetProjectSCMPluginInputFields(projectName, integration, pluginType string) (*SCMPluginInputFields, error)
GetProjectSCMPluginInputFields List the input fields for a specific plugin. http://rundeck.org/docs/api/index.html#get-scm-plugin-input-fields
func (*Client) GetProjectSCMStatus ¶
func (c *Client) GetProjectSCMStatus(project, integration string) (*SCMProjectStatus, error)
GetProjectSCMStatus Get the SCM plugin status and available actions for the project. http://rundeck.org/docs/api/index.html#get-project-scm-status
func (*Client) GetRequiredOpts ¶
GetRequiredOpts returns the required options for a job
func (*Client) GetResourceInfo ¶
func (c *Client) GetResourceInfo(projectName, resourceName string) (*ResourceDetail, error)
GetResourceInfo get a specific resource within a project (usually a node) http://rundeck.org/docs/api/index.html#getting-resource-info
func (*Client) GetSystemACLPolicy ¶
GetSystemACLPolicy returns the named acl policy http://rundeck.org/docs/api/index.html#get-an-acl-policy
func (*Client) GetSystemInfo ¶
func (c *Client) GetSystemInfo() (*SystemInfo, error)
GetSystemInfo gets system information from the rundeck server http://rundeck.org/docs/api/index.html#system-info
func (*Client) GetToken ¶
GetToken gets a token http://rundeck.org/docs/api/index.html#get-a-token
func (*Client) GetUploadedFileInfo ¶
GetUploadedFileInfo gets info about an uploaded file http://rundeck.org/docs/api/index.html#get-info-about-an-uploaded-file
func (*Client) GetUserProfile ¶
GetUserProfile returns information about the named user - requires admin privileges http://rundeck.org/docs/api/index.html#get-another-user-profile
func (*Client) ImportJob ¶
func (c *Client) ImportJob(project string, data io.Reader, opt ...JobImportOption) (*JobImportResult, error)
ImportJob imports a job http://rundeck.org/docs/api/index.html#importing-jobs
func (*Client) ListFilesUploadedForJob ¶
ListFilesUploadedForJob lists files that have been uploaded for a job http://rundeck.org/docs/api/index.html#list-files-uploaded-for-a-job
func (*Client) ListHistory ¶
ListHistory returns the history for a project http://rundeck.org/docs/api/index.html#listing-history
func (*Client) ListInputFilesForExecution ¶
ListInputFilesForExecution lists input files used for an execution http://rundeck.org/docs/api/index.html#list-input-files-for-an-execution
func (*Client) ListJobs ¶
ListJobs lists the jobs for a project http://rundeck.org/docs/api/index.html#listing-jobs
func (*Client) ListKeys ¶
ListKeys lists key resources http://rundeck.org/docs/api/index.html#list-keys
func (*Client) ListProjectACLPolicies ¶
func (c *Client) ListProjectACLPolicies(name string) (*ACLPolicies, error)
ListProjectACLPolicies gets a project ACL Policies http://rundeck.org/docs/api/index.html#list-project-acl-policies
func (*Client) ListProjectExecutions ¶
func (c *Client) ListProjectExecutions(projectID string, options map[string]string) (*Executions, error)
ListProjectExecutions lists a projects executions http://rundeck.org/docs/api/index.html#execution-query
func (*Client) ListProjects ¶
ListProjects lists all projects http://rundeck.org/docs/api/index.html#listing-projects
func (*Client) ListResourcesForProject ¶
ListResourcesForProject returns resources for a project (usually nodes) http://rundeck.org/docs/api/index.html#list-resources-for-a-project
func (*Client) ListRunningExecutions ¶
func (c *Client) ListRunningExecutions(projectID string) (*Executions, error)
ListRunningExecutions lists running executions http://rundeck.org/docs/api/index.html#listing-running-executions
func (*Client) ListSCMPlugins ¶
func (c *Client) ListSCMPlugins(projectName string) (*SCMPlugins, error)
ListSCMPlugins list the available plugins for the specified integration http://rundeck.org/docs/api/index.html#list-scm-plugins One minor customization we do here is to return both import and export in this for a nicer bit of sugar
func (*Client) ListSystemACLPolicies ¶
func (c *Client) ListSystemACLPolicies() (*ACLPolicies, error)
ListSystemACLPolicies gets the system ACL Policies http://rundeck.org/docs/api/index.html#list-system-acl-policies
func (*Client) ListTokens ¶
ListTokens gets all tokens for the current user http://rundeck.org/docs/api/index.html#list-tokens
func (*Client) ListTokensForUser ¶
ListTokensForUser gets the api tokens for a user http://rundeck.org/docs/api/index.html#list-tokens
func (*Client) ListUsers ¶
ListUsers returns all rundeck users http://rundeck.org/docs/api/index.html#list-users
func (*Client) ModifyUserProfile ¶
ModifyUserProfile updates a user http://rundeck.org/docs/api/index.html#modify-user-profile
func (*Client) PerformJobSCMAction ¶
PerformJobSCMAction Perform the action for the SCM integration plugin, with a set of input parameters, selected Jobs, or Items, or Items to delete. http://rundeck.org/docs/api/index.html#perform-job-scm-action
func (*Client) PerformProjectSCMAction ¶
func (c *Client) PerformProjectSCMAction(project, integration, action string, opts ...SCMActionOption) (*SCMPluginForProject, error)
PerformProjectSCMAction Perform the action for the SCM integration plugin, with a set of input parameters, selected Jobs, or Items, or Items to delete. http://rundeck.org/docs/api/index.html#perform-project-scm-action
func (*Client) ProjectArchiveImport ¶
func (c *Client) ProjectArchiveImport(projectName string, f io.Reader, opts ...ProjectImportOption) (*responses.ProjectImportArchiveResponse, error)
ProjectArchiveImport imports a zip archive to a project http://rundeck.org/docs/api/index.html#project-archive-import
func (*Client) PutProjectConfiguration ¶
func (c *Client) PutProjectConfiguration(projectName string, config map[string]string) (map[string]string, error)
PutProjectConfiguration replaces all configuration data with the submitted values http://rundeck.org/docs/api/index.html#put-project-configuration
func (*Client) PutProjectConfigurationKey ¶
PutProjectConfigurationKey sets a value for a configuration key http://rundeck.org/docs/api/index.html#put-project-configuration-key
func (*Client) PutProjectMotd ¶
PutProjectMotd creates or modifies a project's motd.md http://rundeck.org/docs/api/index.html#put-readme-file
func (*Client) PutProjectReadme ¶
PutProjectReadme creates or modifies a project's readme.md http://rundeck.org/docs/api/index.html#put-readme-file
func (*Client) ResumeIncompleteLogStorage ¶
ResumeIncompleteLogStorage resumes processing incomplete log storage uploads http://rundeck.org/docs/api/index.html#resume-incomplete-log-storage
func (*Client) RunAdHocCommand ¶
func (c *Client) RunAdHocCommand(projectID string, exec string, opts ...AdHocRunOption) (*AdHocExecution, error)
RunAdHocCommand runs an adhoc job - all nodes by default http://rundeck.org/docs/api/index.html#running-adhoc-commands
func (*Client) RunAdHocScript ¶
func (c *Client) RunAdHocScript(projectID string, scriptData io.Reader, opts ...AdHocScriptOption) (*AdHocExecution, error)
RunAdHocScript runs a Script ad-hoc http://rundeck.org/docs/api/index.html#running-adhoc-scripts Because script contents can be overly complicated and large, we do not currently run scripts via json body post
func (*Client) RunAdHocScriptFromURL ¶
func (c *Client) RunAdHocScriptFromURL(projectID, scriptURL string, opts ...AdHocScriptURLOption) (*AdHocExecution, error)
RunAdHocScriptFromURL runs a ScriptURL ad-hoc from a url http://rundeck.org/docs/api/index.html#running-adhoc-ScriptURL-urls Due to the fact that we must still provide scriptURL as a query param, we do not currently run script urls via json body post
func (*Client) RunJob ¶
func (c *Client) RunJob(id string, opts ...RunJobOption) (*Execution, error)
RunJob runs a job http://rundeck.org/docs/api/index.html#running-a-job
func (*Client) SetupSCMPluginForProject ¶
func (c *Client) SetupSCMPluginForProject(project, integration, pluginType string, params map[string]string) (*SCMPluginForProject, error)
SetupSCMPluginForProject configures and enables a plugin for a project http://rundeck.org/docs/api/index.html#setup-scm-plugin-for-a-project
func (*Client) UpdateProjectACLPolicy ¶
UpdateProjectACLPolicy updates a project ACL Policy http://rundeck.org/docs/api/index.html#update-a-project-acl-policy
func (*Client) UpdateSystemACLPolicy ¶
UpdateSystemACLPolicy creates a system acl policy http://rundeck.org/docs/api/index.html#update-an-acl-policy
func (*Client) UploadFileForJobOption ¶
UploadFileForJobOption uploads a file for a job 'file' option type http://rundeck.org/docs/api/index.html#upload-a-file-for-a-job-option
func (*Client) UploadKey ¶
UploadKey stores keys on the rundeck server http://rundeck.org/docs/api/index.html#upload-keys
type ClientConfig ¶
type ClientConfig struct { BaseURL string Token string VerifySSL bool Username string Password string AuthMethod string APIVersion string HTTPClient *http.Client }
ClientConfig represents a client configuration
type DeletedExecutions ¶
type DeletedExecutions struct {
responses.BulkDeleteExecutionsResponse
}
DeletedExecutions represents the results of a bulk execution delete
type Execution ¶
type Execution struct {
responses.ExecutionResponse
}
Execution represents a job execution
type ExecutionOutput ¶
type ExecutionOutput struct {
responses.ExecutionOutputResponse
}
ExecutionOutput represents the output of an execution
type ExecutionState ¶
type ExecutionState struct {
responses.ExecutionStateResponse
}
ExecutionState represents a job execution state
type Executions ¶
type Executions struct {
responses.ListRunningExecutionsResponse
}
Executions represents a list of executions for a project
type History ¶
type History struct {
responses.HistoryResponse
}
History represents a project history
type IncompleteLogStorage ¶
type IncompleteLogStorage struct {
responses.IncompleteLogStorageResponse
}
IncompleteLogStorage represents IncompleteLogStorage
type JobImportDefinition ¶
JobImportDefinition is a type for importing a job
type JobImportOption ¶
type JobImportOption func(j *JobImportDefinition) error
JobImportOption is a functional option for importing jobs
func ImportDupe ¶
func ImportDupe(f string) JobImportOption
ImportDupe sets dupe handling for the job import
func ImportFormat ¶
func ImportFormat(f string) JobImportOption
ImportFormat sets the format of the job import
func ImportUUID ¶
func ImportUUID(f string) JobImportOption
ImportUUID sets uuid handling for the job import
type JobImportResult ¶
type JobImportResult struct {
responses.ImportedJobResponse
}
JobImportResult is the result of a job import
type JobMetaData ¶
type JobMetaData struct {
responses.JobMetaDataResponse
}
JobMetaData is the result of getting a job's metadata
type LogStorage ¶
type LogStorage struct {
responses.LogStorageResponse
}
LogStorage represents log storage
type MarshalError ¶
type MarshalError struct {
// contains filtered or unexported fields
}
MarshalError is a custom error type for decoding errors
type OptionError ¶
type OptionError struct {
// contains filtered or unexported fields
}
OptionError is a custom error type for option errors
type PolicyValidationError ¶
type PolicyValidationError struct {
// contains filtered or unexported fields
}
PolicyValidationError is a custom error type for policy validation errors
func (*PolicyValidationError) Error ¶
func (e *PolicyValidationError) Error() string
Error returns the error message
type ProjectExportOption ¶
ProjectExportOption is a functional option for project exports
func ProjectExportAcls ¶
func ProjectExportAcls(b bool) ProjectExportOption
ProjectExportAcls toggles exporting project acls
func ProjectExportAll ¶
func ProjectExportAll(b bool) ProjectExportOption
ProjectExportAll toggles exporting everything
func ProjectExportConfigs ¶
func ProjectExportConfigs(b bool) ProjectExportOption
ProjectExportConfigs toggles exporting configs
func ProjectExportExecutionIDs ¶
func ProjectExportExecutionIDs(ids ...string) ProjectExportOption
ProjectExportExecutionIDs specifies the execution ids to export
func ProjectExportExecutions ¶
func ProjectExportExecutions(b bool) ProjectExportOption
ProjectExportExecutions toggles exporting executions
func ProjectExportJobs ¶
func ProjectExportJobs(b bool) ProjectExportOption
ProjectExportJobs toggles exporting jobs
func ProjectExportReadmes ¶
func ProjectExportReadmes(b bool) ProjectExportOption
ProjectExportReadmes toggles exporting readmes and motds
type ProjectImportOption ¶
ProjectImportOption is a functional option for project imports
func ProjectImportAcls ¶
func ProjectImportAcls(b bool) ProjectImportOption
ProjectImportAcls toggles importing acls with the project
func ProjectImportConfigs ¶
func ProjectImportConfigs(b bool) ProjectImportOption
ProjectImportConfigs toggles importing configs with the project
func ProjectImportExecutions ¶
func ProjectImportExecutions(b bool) ProjectImportOption
ProjectImportExecutions toggles importing executions with the project
func ProjectImportJobUUIDs ¶
func ProjectImportJobUUIDs(s string) ProjectImportOption
ProjectImportJobUUIDs toggles importing job uuids with the project
type ProjectSCMConfig ¶
type ProjectSCMConfig struct {
responses.GetProjectSCMConfigResponse
}
ProjectSCMConfig represents a project's SCM config
type Resource ¶
type Resource map[string]ResourceDetail
Resource represents a project resource (usually a node)
type ResourceDetail ¶
type ResourceDetail struct {
responses.ResourceDetailResponse
}
ResourceDetail represents a resource's details
type Resources ¶
type Resources map[string]ResourceDetail
Resources represents a collection of project resources (usually nodes)
type RunJobOption ¶
type RunJobOption func(*requests.RunJobRequest) error
RunJobOption is a type for functional options
func RunJobArgs ¶
func RunJobArgs(a string) RunJobOption
RunJobArgs runs the job with the specified arg string
func RunJobFilter ¶
func RunJobFilter(a string) RunJobOption
RunJobFilter runs the job with the specified filter
func RunJobLogLevel ¶
func RunJobLogLevel(l string) RunJobOption
RunJobLogLevel runs the job with the specified log level
func RunJobOpts ¶
func RunJobOpts(a map[string]string) RunJobOption
RunJobOpts runs the job with the specified filter
func RunJobRunAt ¶
func RunJobRunAt(t time.Time) RunJobOption
RunJobRunAt runs the specified job at the specified time
type SCMActionInputFields ¶
type SCMActionInputFields struct {
responses.GetSCMActionInputFieldsResponse
}
SCMActionInputFields represents project scm action input fields
type SCMActionOption ¶
SCMActionOption is the functional option type for setting an SCMAction
func SCMActionDeleted ¶
func SCMActionDeleted(deleted ...string) SCMActionOption
SCMActionDeleted sets the jobs for an SCMAction
func SCMActionInput ¶
func SCMActionInput(m map[string]string) SCMActionOption
SCMActionInput sets the input map for an SCMAction
func SCMActionItems ¶
func SCMActionItems(items ...string) SCMActionOption
SCMActionItems sets the itemss for an SCMAction
func SCMActionJobs ¶
func SCMActionJobs(jobs ...string) SCMActionOption
SCMActionJobs sets the jobs for an SCMAction
type SCMJobDiff ¶
type SCMJobDiff struct {
responses.GetJobSCMDiffResponse
}
SCMJobDiff represent's a job's scm diff
type SCMJobStatus ¶
type SCMJobStatus struct {
responses.GetJobSCMStatusResponse
}
SCMJobStatus represents a job's scm status
type SCMPluginForProject ¶
type SCMPluginForProject struct {
responses.SCMPluginForProjectResponse
}
SCMPluginForProject represents an scm plugin for a project
type SCMPluginInputFields ¶
type SCMPluginInputFields struct {
responses.GetSCMPluginInputFieldsResponse
}
SCMPluginInputFields are input fields for scm plugins
type SCMPlugins ¶
type SCMPlugins struct { Import []responses.SCMPluginResponse Export []responses.SCMPluginResponse }
SCMPlugins is a list of SCM plugins grouped by Integration (import or export)
type SCMProjectStatus ¶
type SCMProjectStatus struct {
responses.GetProjectSCMStatusResponse
}
SCMProjectStatus represents a project's scm status
type SCMValidationError ¶
type SCMValidationError struct {
// contains filtered or unexported fields
}
SCMValidationError is a custom error type for scm validation errors
func (*SCMValidationError) Error ¶
func (e *SCMValidationError) Error() string
Error returns the error message
type SystemInfo ¶
type SystemInfo struct {
responses.SystemInfoResponse
}
SystemInfo represents the rundeck server system info output
type TokenOption ¶
type TokenOption func(*TokenRequest) error
TokenOption is a type for options in creating new tokens
func TokenDuration ¶
func TokenDuration(duration string) TokenOption
TokenDuration is an option for setting the duration of a new token
func TokenRoles ¶
func TokenRoles(roles ...string) TokenOption
TokenRoles is an option to set the roles for a new token
type TokenRequest ¶
type TokenRequest struct {
requests.TokenRequest
}
TokenRequest is a new token request
type UnmarshalError ¶
type UnmarshalError struct {
// contains filtered or unexported fields
}
UnmarshalError is a custom error type for decoding errors
func (*UnmarshalError) Error ¶
func (e *UnmarshalError) Error() string
Error returns the error message
type User ¶
type User struct { Login string FirstName string LastName string Email string Created time.Time Updated time.Time LastJob time.Time Tokens int }
User represents a user in rundeck
type WaitingJob ¶
WaitingJob is a type for determining if work is done