rundeck

package
v18.0.0-...-aec8858 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AclListContents

type AclListContents struct {
	XMLName   xml.Name `xml:"contents"`
	Resources []struct {
		XMLName xml.Name `xml:"resource"`
		Path    string   `xml:"path,attr"`
		Type    string   `xml:"type,attr"`
		Href    string   `xml:"href,attr"`
		Name    string   `xml:"name,attr"`
	} `xml:"resource,omitempty"`
}

type AclPolicies

type AclPolicies struct {
	XMLName  xml.Name        `xml:"resource"`
	Path     string          `xml:"path,attr"`
	Type     string          `xml:"type,attr"`
	Href     string          `xml:"href,attr"`
	Contents AclListContents `xml:"contents,omitempty"`
}

type CPU

type CPU struct {
	XMLName     xml.Name `xml:"cpu"`
	LoadAverage struct {
		XMLName xml.Name
		Unit    string  `xml:"unit,attr"`
		Value   float64 `xml:",chardata"`
	} `xml:"loadAverage"`
	Processors int64 `xml:"processors"`
}

type ClientConfig

type ClientConfig struct {
	BaseURL    string
	Token      string
	VerifySSL  bool
	Username   string
	Password   string
	AuthMethod string
	Transport  *http.Transport
	HTTPClient *http.Client
}

type ConfigProperty

type ConfigProperty struct {
	XMLName xml.Name `xml:"property"`
	Key     string   `xml:"key,attr"`
	Value   string   `xml:"value,attr"`
}

type Contents

type Contents struct {
	XMLName   xml.Name   `xml:"contents"`
	Count     int64      `xml:"count"`
	Resources []Resource `xml:"resource"`
}

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 Events

type Events struct {
	XMLName xml.Name `xml:"events"`
	Count   int64    `xml:"count,attr"`
	Total   int64    `xml:"total,attr"`
	Max     int64    `xml:"max,attr"`
	Offset  int64    `xml:"offset,attr"`
	Events  []Event  `xml:"event"`
}

type ExecStep

type ExecStep struct {
	XMLName xml.Name
	// contains filtered or unexported fields
}

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 ExecutionAbort struct {
	XMLName   xml.Name `xml:"abort"`
	Status    string   `xml:"status,attr"`
	Execution struct {
		HRef      string `xml:"href,attr"`
		Permalink string `xml:"permalink,attr"`
		ID        string `xml:"id,attr"`
		Status    string `xml:"status,attr"`
	} `xml:"execution"`
}

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 Executions struct {
	Count      int64       `xml:"count,attr"`
	Total      int64       `xml:"total,attr"`
	Max        int64       `xml:"max,attr"`
	Offset     int64       `xml:"offset,attr"`
	Executions []Execution `xml:"execution"`
}

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 FailedExecutionDelete struct {
	XMLName xml.Name `xml:"execution"`
	ID      int64    `xml:"id,attr"`
	Message string   `xml:"message,attr"`
}

type ImportParams

type ImportParams struct {
	Filename string
	Format   string
	Dupe     string
	Uuid     string
	Project  string
}

type JVM

type JVM struct {
	Name                  string `xml:"name"`
	Vendor                string `xml:"vendor"`
	Version               string `xml:"version"`
	ImplementationVersion string `xml:"implementationVersion"`
}

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 JobContext struct {
	XMLName xml.Name     `xml:"context"`
	Project string       `xml:"project"`
	Options *[]JobOption `xml:"options>option,omitempty"`
}

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 JobDispatch struct {
	XMLName           xml.Name `xml:"dispatch"`
	ThreadCount       int64    `xml:"threadcount"`
	KeepGoing         bool     `xml:"keepgoing"`
	ExcludePrecedence bool     `xml:"excludePrecendence"`
	RankOrder         string   `xml:"rankOrder"`
}

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 JobOptions struct {
	XMLName xml.Name
	Options []JobOption `xml:"option"`
}

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 JobPluginConfigurationEntry

type JobPluginConfigurationEntry struct {
	Key   string `xml:"key,attr"`
	Value string `xml:"value,attr,omitempty"`
}

type JobPlugins

type JobPlugins struct {
	Plugins []JobPlugin `xml:"plugin,omitempty"`
}

type JobRefStep

type JobRefStep struct {
	XMLName  xml.Name
	Name     string `xml:"name,attr,omitempty"`
	Group    string `xml:"group,attr,omitempty"`
	NodeStep bool   `xml:"nodeStep,attr,omitempty"`
}

type JobSequence

type JobSequence struct {
	XMLName   xml.Name
	KeepGoing bool           `xml:"keepgoing,attr"`
	Strategy  string         `xml:"strategy,attr"`
	Steps     []SequenceStep `xml:"command"`
}

type Jobs

type Jobs struct {
	XMLName xml.Name
	Count   int64 `xml:"count,attr"`
	Jobs    []Job `xml:"job"`
}

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 Memory

type Memory struct {
	XMLName xml.Name `xml:"memory"`
	Unit    string   `xml:"unit,attr"`
	Max     int64    `xml:"max"`
	Free    int64    `xml:"free"`
	Total   int64    `xml:"total"`
}

type Metrics

type Metrics struct {
	XMLName     xml.Name `xml:"metrics"`
	Href        string   `xml:"href,attr"`
	ContentType string   `xml:"contentType,attr"`
}

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 NodeState

type NodeState struct {
	XMLName        xml.Name `xml:"nodeState"`
	Name           string   `xml:"name,attr"`
	StartTime      string   `xml:"startTime"`
	UpdateTime     string   `xml:"updateTime"`
	EndTime        string   `xml:"endTime"`
	ExecutionState string   `xml:"executionState"`
}

type NodeStep

type NodeStep struct {
	XMLName        xml.Name `xml:"step"`
	StepCtx        int64    `xml:"stepctx"`
	ExecutionState string   `xml:"executionState"`
}

type NodeWithSteps

type NodeWithSteps struct {
	XMLName xml.Name   `xml:"node"`
	Name    string     `xml:"name,attr"`
	Steps   []NodeStep `xml:"steps>step"`
}

type Nodes

type Nodes struct {
	Nodes []Node `xml:"node"`
}

type OS

type OS struct {
	Arch    string `xml:"arch"`
	Name    string `xml:"name"`
	Version string `xml:"version"`
}

type Option

type Option struct {
	XMLName xml.Name `xml:"option"`
	Name    string   `xml:"name,attr"`
	Value   string   `xml:"value,attr,omitempty"`
}

type Options

type Options struct {
	XMLName xml.Name
	Options []Option `xml:"option"`
}

type PluginStep

type PluginStep struct {
	XMLName       xml.Name
	Type          string `xml:"type,attr"`
	Configuration []struct {
		XMLName xml.Name `xml:"entry"`
		Key     string   `xml:"key,attr"`
		Value   string   `xml:"value,attr"`
	} `xml:"configuration>entry,omitempty"`
}

type Project

type Project struct {
	XMLName     xml.Name `xml:"project"`
	Name        string   `xml:"name"`
	Description string   `xml:"description,omitempty"`
	Url         string   `xml:"url,attr"`
}

type Projects

type Projects struct {
	Count    int64     `xml:"count,attr"`
	Projects []Project `xml:"project"`
}

type Resource

type Resource struct {
	XMLName      xml.Name     `xml:"resource"`
	Path         string       `xml:"path,attr"`
	ResourceType string       `xml:"type,attr"`
	URL          string       `xml:"url,attr"`
	Name         string       `xml:"name,omitempty"`
	MetaData     ResourceMeta `xml:"resource-meta,omitempty"`
	Contents     Contents     `xml:"contents,omitempty"`
}

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 Resources

type Resources struct {
	Resources []Resource `xml:"resource"`
}

type RunOptions

type RunOptions struct {
	Filter    string `qp:"filter,omitempty"`
	LogLevel  string `qp:"loglevel,omitempty"`
	RunAs     string `qp:"runAs,omitempty"`
	Arguments string `qp:"argString,omitempty"`
}

type Rundeck

type Rundeck struct {
	XMLName    xml.Name `xml:"rundeck"`
	Version    string   `xml:"version"`
	ApiVersion int64    `xml:"apiversion"`
	Build      string   `xml:"build"`
	Node       string   `xml:"node"`
	Base       string   `xml:"base"`
	ServerUUID string   `xml:"serverUUID,omitempty"`
}

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) GetJob

func (c *RundeckClient) GetJob(id string) (JobList, 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) ListJobs

func (c *RundeckClient) ListJobs(projectId string) (Jobs, 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 RundeckError struct {
	XMLName    xml.Name `xml:"result"`
	Error      bool     `xml:"error,attr"`
	ApiVersion string   `xml:"apiversion,attr"`
	Message    string   `xml:"error>message"`
}

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 Scheduler

type Scheduler struct {
	Running int64 `xml:"running"`
}

type ScriptStep

type ScriptStep struct {
	XMLName           xml.Name
	Script            *string `xml:"script,omitempty"`
	ScriptArgs        *string `xml:"scriptargs,omitempty"`
	ScriptFile        *string `xml:"scriptfile,omitempty"`
	ScriptUrl         *string `xml:"scripturl,omitempty"`
	ScriptInterpreter *string `xml:"scriptinterpreter,omitempty"`
}

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 Stats

type Stats struct {
	XMLName   xml.Name  `xml:"stats"`
	Uptime    Uptime    `xml:"uptime"`
	CPU       CPU       `xml:"cpu"`
	Memory    Memory    `xml:"memory"`
	Scheduler Scheduler `xml:"scheduler"`
	Threads   Threads   `xml:"threads"`
}

type SystemInfo

type SystemInfo struct {
	XMLName    xml.Name   `xml:"system"`
	Timestamp  TS         `xml:"timestamp"`
	Rundeck    Rundeck    `xml:"rundeck"`
	OS         OS         `xml:"os"`
	JVM        JVM        `xml:"jvm"`
	Stats      Stats      `xml:"stats"`
	Metrics    Metrics    `xml:"metrics"`
	ThreadDump ThreadDump `xml:"threadDump"`
}

type TS

type TS struct {
	Epoch    string `xml:"epoch,attr"`
	Unit     string `xml:"unit,attr"`
	DateTime string `xml:"datetime"`
}

type ThreadDump

type ThreadDump struct {
	XMLName     xml.Name `xml:"threadDump"`
	Href        string   `xml:"href,attr"`
	ContentType string   `xml:"contentType,attr"`
}

type Threads

type Threads struct {
	Active int64 `xml:"active"`
}

type Token

type Token struct {
	XMLName xml.Name `xml:"token"`
	ID      string   `xml:"id,attr"`
	User    string   `xml:"user,attr"`
}

type Tokens

type Tokens struct {
	XMLName  xml.Name `xml:"tokens"`
	Count    int64    `xml:"count,attr"`
	AllUsers *bool    `xml:"allusers,omitempty"`
	User     *string  `xml:"user,attr"`
	Tokens   []*Token `xml:"token"`
}

type Uptime

type Uptime struct {
	XMLName  xml.Name `xml:"uptime"`
	Duration string   `xml:"duration,attr"`
	Unit     string   `xml:"unit,attr"`
	Since    struct {
		XMLName  xml.Name
		TS       `xml:"since"`
		DateTime string `xml:"datetime"`
	} `xml:"since"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL