requests

package
v0.0.0-...-69f973d Latest Latest
Warning

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

Go to latest
Published: May 6, 2019 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdHocCommandRequest

type AdHocCommandRequest struct {
	Exec string `json:"exec"`
	AdHocCommonRequest
}

AdHocCommandRequest represents an AdHocCommand request http://rundeck.org/docs/api/index.html#running-adhoc-commands

{
    "project":"[project]",
    "exec":"[exec]",
    "nodeThreadcount": #threadcount#,
    "nodeKeepgoing": true/false,
    "asUser": "[asUser]",
    "filter": "[node filter string]"
}

type AdHocCommonRequest

type AdHocCommonRequest struct {
	Project         string `json:"project"`
	NodeThreadCount int    `json:"nodeThreadcount,omitempty"`
	NodeKeepGoing   bool   `json:"nodeKeepgoing,omitempty"`
	AsUser          string `json:"asUser,omitempty"`
	Filter          string `json:"filter,omitempty"`
}

AdHocCommonRequest represents fields that are common in all adhoc requests

type AdHocScriptRequest

type AdHocScriptRequest struct {
	Script                string `json:"script"`
	ArgString             string `json:"argString,omitempty"`
	ScriptInterpreter     string `json:"scriptInterpreter,omitempty"`
	InterpreterArgsQuoted bool   `json:"interpreterArgsQuoted,omitempty"`
	FileExtension         string `json:"fileExtension,omitempty"`
	AdHocCommonRequest
}

AdHocScriptRequest represents an AdHocScript request http://rundeck.org/docs/api/index.html#running-adhoc-scripts

{
    "project":"[project]",
    "script":"[script]",
    "nodeThreadcount": #threadcount#,
    "nodeKeepgoing": true/false,
    "asUser": "[asUser]",
    "argString": "[argString]",
    "scriptInterpreter": "[scriptInterpreter]",
    "interpreterArgsQuoted": true/false,
    "fileExtension": "[fileExtension]",
    "filter": "[node filter string]"
}

type AdHocScriptURLRequest

type AdHocScriptURLRequest struct {
	URL                   string `json:"url"`
	ArgString             string `json:"argString,omitempty"`
	ScriptInterpreter     string `json:"scriptInterpreter,omitempty"`
	InterpreterArgsQuoted bool   `json:"interpreterArgsQuoted,omitempty"`
	FileExtension         string `json:"fileExtension,omitempty"`
	AdHocCommonRequest
}

AdHocScriptURLRequest represents an adhoc script request http://rundeck.org/docs/api/index.html#running-adhoc-script-urls

{
    "project":"[project]",
    "url":"[scriptURL]",
    "nodeThreadcount": #threadcount#,
    "nodeKeepgoing": true/false,
    "asUser": "[asUser]",
    "argString": "[argString]",
    "scriptInterpreter": "[scriptInterpreter]",
    "interpreterArgsQuoted": true/false,
    "fileExtension": "[fileExtension]",
    "filter": "[node filter string]"
}

type BulkToggleRequest

type BulkToggleRequest struct {
	IDs    []string `json:"ids,omitempty"`
	IDList string   `json:"idlist,omitempty"`
}

BulkToggleRequest represents a bulk toggle request body

type JSONTime

type JSONTime struct {
	time.Time
}

JSONTime is for custom marshal/unmarshal of rundeck datetime values

func (*JSONTime) MarshalJSON

func (t *JSONTime) MarshalJSON() ([]byte, error)

MarshalJSON converts a JSONTime to the format supported for rundeck requests if empty, we specify the current time

type PerformSCMActionRequest

type PerformSCMActionRequest struct {
	Input   map[string]string `json:"input"`
	Jobs    []string          `json:"jobs,omitempty"`
	Items   []string          `json:"items,omitempty"`
	Deleted []string          `json:"deleted,omitempty"`
}

PerformSCMActionRequest is the request body for performing an scm action

{
    "input":{
        "message":"$commitMessage"
    },
    "jobs":[
        "$jobId"
    ],
    "items":[
        "$itemId"
    ],
    "deleted":null
}

type ProjectCreationRequest

type ProjectCreationRequest struct {
	Name   string             `json:"name"`
	Config *map[string]string `json:"config,omitempty"`
}

ProjectCreationRequest is the payload for creating a new project

{
	"name":"fooproject3",
	"config":{
		"somekey":"somevar",
		"anotherkey":"anothervar"
	}
}

type RunJobRequest

type RunJobRequest struct {
	ArgString string            `json:"argString,omitempty"`
	LogLevel  string            `json:"loglevel,omitempty"`
	AsUser    string            `json:"asUser,omitempty"`
	Filter    string            `json:"filter,omitempty"`
	RunAtTime *JSONTime         `json:"runAtTime,omitempty"`
	Options   map[string]string `json:"options,omitempty"`
}

RunJobRequest is the payload for running a job

type SetupSCMPluginRequest

type SetupSCMPluginRequest struct {
	Config map[string]string `json:"config"`
}

SetupSCMPluginRequest is the request body for calling setup scm plugin

type TokenRequest

type TokenRequest struct {
	User     string `json:"user"`
	Roles    string `json:"roles"`
	Duration string `json:"duration,omitempty"`
}

TokenRequest represents a user and token http://rundeck.org/docs/api/index.html#get-a-token

type UserInfo

type UserInfo struct {
	FirstName string `json:"firstName,omitempty"`
	LastName  string `json:"lastName,omitempty"`
	Email     string `json:"email,omitempty"`
}

UserInfo represents a user info request

Jump to

Keyboard shortcuts

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