types

package
v1.0.65 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package types define various structures used to interact with Control-M API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseTime

func ParseTime(s string) (t time.Time, err error)

ParseTime parses a non empty StartTime or EndTime from a Status structure and returns a Time

func ParseTime2

func ParseTime2(s string) (t time.Time, err error)

ParseTime2 parses a non empty StartTime or EndTime from a Status structure and returns a Time. Actually needs a second one since the time is different when retrieving through job.status

Types

type AddResourceQuery

type AddResourceQuery struct {
	Max  string `json:"max"`
	Name string `json:"name"`
}

AddResourceQuery contain the data to create a QR

type Agent

type Agent struct {
	NodeID string
	Status string
}

Agent replied by the config.agents service

type ConfigAgentParam

type ConfigAgentParam struct {
	Name, Value, DefaultValue string
}

ConfigAgentParam is one paramater of the agent

type ConfigAgentParamsReply

type ConfigAgentParamsReply []ConfigAgentParam

ConfigAgentParamsReply is the reply to the config agent params action

type ConfigAgentsReply

type ConfigAgentsReply struct {
	Agents []Agent
}

ConfigAgentsReply is the reply to the config.agents service

type ConfigHostGroupsReply added in v1.0.3

type ConfigHostGroupsReply = []string

ConfigHostGroupsReply is just a list of hostgroups

type ConfigServersReply

type ConfigServersReply []Server

ConfigServersReply is the reply to the config server

type DeployErrors

type DeployErrors struct {
	Lines []string
}

DeployErrors are the kind of errors you get when deploying

type DeployPutFormat

type DeployPutFormat = map[string]OneFolderOrConnectionProfileDefinition

DeployPutFormat is part of what you give in input to the deploy or build service

type DeployReply

type DeployReply = []DeployResult

DeployReply is the reply to the deployment service

type DeployResult

type DeployResult struct {
	DeploymentFile                    string
	SuccessfulFoldersCount            int
	SuccessfulSmartFoldersCount       int
	SuccessfulSubFoldersCount         int
	SuccessfulJobsCount               int
	SuccessfulConnectionProfilesCount int
	SuccessfulDriversCount            int
	IsDeployDescriptorValid           bool
	DeployedFolders                   []string
	Errors                            []DeployErrors
}

DeployResult is the result of a deployment

type ErrorReply

type ErrorReply struct {
	Errors []Message
}

ErrorReply is returned in case of errors most of the time

type HostGroupAgentsReply

type HostGroupAgentsReply = []HostInGroup

HostGroupAgentsReply is the reply to the hostgroup/agents service

type HostInGroup

type HostInGroup struct {
	Host string
}

HostInGroup is one host part of a host group

type JobActionReply

type JobActionReply = Message

JobActionReply is returned for most actions

type JobGetReply

type JobGetReply = map[string]OneJobDefinition

JobGetReply is what the job/get service will reply

type JobsStatusReply

type JobsStatusReply struct {
	Statuses []Status
	Returned int
	Total    int
}

JobsStatusReply is the reply from run/jobs/status

type LogoutReply

type LogoutReply = Message

LogoutReply is the message returned after login out

type Message

type Message struct {
	Message string
	File    string
	Line    int
	Col     int
	ID      string `json:"id"`
	Item    string
}

Message is returned by various services

type OneFolderOrConnectionProfileDefinition

type OneFolderOrConnectionProfileDefinition struct {
	ControlmServer string
	SiteStandard   string
	Type           string
	OrderMethod    string
	TargetCTM      string
}

OneFolderOrConnectionProfileDefinition is a folder containing a few jobs not sure if you could mix the 2, so creating a single structure here for the time being

type OneJobDefinition

type OneJobDefinition struct {
	FilePath       string
	FileName       string
	Description    string
	RunAs          string
	Application    string
	SubApplication string
	Arguments      []string
}

OneJobDefinition is part of one job replied by JobGetReply

type OrderJobReply

type OrderJobReply struct {
	RunID          string `json:"runId"` // this syntax should probably be adopted everywhere in the file
	StatusURI      string
	MonitorPageURI string
}

OrderJobReply is returned after ordering a job

type OrderQuery

type OrderQuery struct {
	Hold   bool
	Ctm    string
	Folder string
	Jobs   string `json:"jobs,omitempty"`
}

OrderQuery contains the data to order a new job

type PingAgentQuery

type PingAgentQuery struct {
	Timeout  int  `json:"timeout"`
	Discover bool `json:"discover"`
}

PingAgentQuery are the parameters sent to ping an agent

type PingAgentReply

type PingAgentReply = Message

PingAgentReply is the message returned when pinging an agent

type QR

type QR struct {
	Name      string
	Ctm       string
	Available string // Available is an int but defined as a String
	Max       int
}

QR contains the definition of a quantitative resource

type RerunQuery added in v1.0.56

type RerunQuery struct {
}

RerunQuery is an empty structure needed in some version of Control-M

type SecretAddQuery added in v1.0.2

type SecretAddQuery struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value"`
}

SecretAddQuery is what you give to add a named secret

type Server

type Server struct {
	Name    string
	Host    string
	State   string
	Message string
	Version string
}

Server replied by the config.servers service

type SessionLoginQuery

type SessionLoginQuery struct {
	Username string
	Password string
}

SessionLoginQuery contains the data to pass when login in

type SetResourceQuery

type SetResourceQuery struct {
	Max string
}

SetResourceQuery contain the data to set a QR. QR name is given in the URL parameter

type SetResourceReply

type SetResourceReply = Message

SetResourceReply is returned when setting a QR

type Status

type Status struct {
	JobId              string
	FolderID           string `json:"folderId"`
	NumberOfRuns       int
	Name               string
	Folder             string
	Type               string
	Status             string
	Held               bool
	Deleted            bool
	StartTime          string
	EndTime            string
	OrderDate          string
	Ctm                string
	Description        string
	Host               string
	Application        string
	SubApplication     string
	OutputURI          string
	LogURI             string
	EstimatedStartTime []string
	EstimatedEndTime   []string
}

Status is a job status

type Token

type Token struct {
	Version  string
	Token    string
	Username string
}

Token is contained in the login response

type TokenFile

type TokenFile struct {
	Endpoint map[string]TokenFileToken
}

TokenFile contains all the acquired tokens

type TokenFileToken

type TokenFileToken struct {
	Token
	Created time.Time
}

TokenFileToken is a token as found in the token file

type WaitinfoReply

type WaitinfoReply = []string

WaitinfoReply is the information from the waiting info

Jump to

Keyboard shortcuts

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