jams

package module
v0.0.0-...-5539d67 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: BSD-2-Clause Imports: 16 Imported by: 0

README

JAMS Client for Go

A Go client for the JAMS scheduler and (later) a set of useful tools built on it.It doesn't map all possible API's available, but who cares about the Theme API?

If you care about the Theme API (or the other skipped API's) create an issue and explain why they're so useful.

Examples
  • submit - Find and submit a job
  • schedule - Look at Jobs and Setups to make a simplified weekly job schedule
  • joblog - Retrieve a specific job's history
TODO:
  1. This is built against the 6.X release of the JAMS Rest API. I plan on working on the 7.X version at some point.
Planned Tools:
  • jamscli - A cli that can interact with the JAMS server
  • heidibot - A daemon that monitors for failing jobs and can notify on things like Microsoft Teams, Slack, or email.
  • watcher - Notifies when jobs start or stop using OS notifications

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type ACE

type ACE struct {
	Identifier string `json:"identifier,omitempty"`
	Flags      string `json:"flags,omitempty"`
	Access     string `json:"access,omitempty"`
}

type ACL

type ACL struct {
	GenericACL []ACE `json:"genericACL,omitempty"`
}

type APIClient

type APIClient struct {

	// API Services
	Agent        *AgentAPI
	BatchQueue   *BatchQueueAPI
	Config       *ConfigAPI
	Date         *DateAPI
	DateType     *DateTypeAPI
	Entry        *EntryAPI
	Folder       *FolderAPI
	History      *HistoryAPI
	Job          *JobAPI
	Resource     *ResourceAPI
	Setup        *SetupAPI
	Submit       *SubmitAPI
	SubmitMenu   *SubmitMenuAPI
	Trigger      *TriggerAPI
	UserSecurity *UserSecurityAPI
	Variable     *VariableAPI
	// contains filtered or unexported fields
}

APIClient manages communication with the JAMS REST API API vV6 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) Call

func (c *APIClient) Call(ctx context.Context, request *http.Request) (*http.Response, error)

Call do the request.

func (*APIClient) Login

func (client *APIClient) Login(ctx context.Context, loginData LoginData) (AccessToken, error)

Login to the web server, it will automatically save the access token to the client to be used on future requests.

  • @param loginData The login credentials

func (*APIClient) UserInfo

func (client *APIClient) UserInfo(ctx context.Context) (Authentication, error)

UserInfo Provides information about the authenticated user

returns Authentication

type AccessToken

type AccessToken struct {
	AccessToken string `json:"access_token,omitempty"`
	ExpiresIn   string `json:"expires_in,omitempty"`
}

type Agent

type Agent struct {
	AgentName        string    `json:"agentName,omitempty"`
	AgentID          int       `json:"agentID,omitempty"`
	AgentType        string    `json:"agentType,omitempty"`
	Description      string    `json:"description,omitempty"`
	LastChangeUTC    time.Time `json:"lastChangeUTC,omitempty"`
	LastChangedBy    string    `json:"lastChangedBy,omitempty"`
	Platform         string    `json:"platform,omitempty"`
	JobCount         int       `json:"jobCount,omitempty"`
	JobLimit         int       `json:"jobLimit,omitempty"`
	LicenseAllocated bool      `json:"licenseAllocated,omitempty"`
	Online           bool      `json:"online,omitempty"`
	Port             int       `json:"port,omitempty"`
	TimeOffset       string    `json:"timeOffset,omitempty"`
	Username         string    `json:"username,omitempty"`
	AgentState       string    `json:"agentState,omitempty"`
}

type AgentAPI

type AgentAPI service

func (*AgentAPI) AgentByID

func (a *AgentAPI) AgentByID(ctx context.Context, id int) (Agent, error)

AgentAPI Get the Agent with the specified agentID.

  • @param id

returns Agent

func (*AgentAPI) AgentByName

func (a *AgentAPI) AgentByName(ctx context.Context, name string) (Agent, error)

AgentAPI Get the Agent with the specified agentName.

  • @param name The name of the Agent

returns Agent

func (*AgentAPI) Agents

func (a *AgentAPI) Agents(ctx context.Context) ([]Agent, error)

AgentAPI Gets a list of all agents

returns []Agent

func (*AgentAPI) CreateAgent

func (a *AgentAPI) CreateAgent(ctx context.Context, agent Agent) (Agent, error)

AgentAPI Creates a new Agent object.

  • @param agent >The name of the agent

returns Agent

func (*AgentAPI) DeleteAgent

func (a *AgentAPI) DeleteAgent(ctx context.Context, name string) (string, error)

AgentAPI Deletes an Agent object.

  • @param name The name of the Agent

returns string

func (*AgentAPI) UpdateAgent

func (a *AgentAPI) UpdateAgent(ctx context.Context, agent Agent) (Agent, error)

AgentAPI Updates an existing Agent object or creates a new definition if it doesn't exist.

  • @param agent The name of the agent

returns Agent

type Alert

type Alert struct {
	AlertID         int       `json:"alertID,omitempty"`
	AlertName       string    `json:"alertName,omitempty"`
	Description     string    `json:"description,omitempty"`
	DetailText      string    `json:"detailText,omitempty"`
	EventList       []string  `json:"eventList,omitempty"`
	HandlerList     string    `json:"handlerList,omitempty"`
	InheritanceName string    `json:"inheritanceName,omitempty"`
	LastChangedBy   string    `json:"lastChangedBy,omitempty"`
	LastChangeUTC   time.Time `json:"lastChangeUTC,omitempty"`
	NotifyNames     string    `json:"notifyNames,omitempty"`
	SummaryText     string    `json:"summaryText,omitempty"`
}
type AlertLink struct {
	AlertID     int    `json:"alertID,omitempty"`
	AlertName   string `json:"alertName,omitempty"`
	IsInherited bool   `json:"isInherited,omitempty"`
}

type Authentication

type Authentication struct {
	Username         string `json:"username,omitempty"`
	MappedTo         string `json:"mappedTo,omitempty"`
	ImpersonatedUser string `json:"impersonatedUser,omitempty"`
}

type BatchQueue

type BatchQueue struct {
	QueueID       int         `json:"queueID,omitempty"`
	QueueName     string      `json:"queueName,omitempty"`
	Description   string      `json:"description,omitempty"`
	JobCount      int         `json:"jobCount,omitempty"`
	JobLimit      int         `json:"jobLimit,omitempty"`
	LastChangeUTC time.Time   `json:"lastChangeUTC,omitempty"`
	LastChangedBy string      `json:"lastChangedBy,omitempty"`
	Started       bool        `json:"started,omitempty"`
	StartedOn     []QueueNode `json:"startedOn,omitempty"`
}

type BatchQueueAPI

type BatchQueueAPI service

func (*BatchQueueAPI) BatchQueueByID

func (a *BatchQueueAPI) BatchQueueByID(ctx context.Context, id int) (BatchQueue, error)

BatchQueueAPI Gets a batch queue definition by ID

  • @param id ID of the BatchQueue

returns BatchQueue

func (*BatchQueueAPI) BatchQueueByName

func (a *BatchQueueAPI) BatchQueueByName(ctx context.Context, name string) (BatchQueue, error)

BatchQueueAPI Gets a batch queue definition by name

  • @param name Name of the BatchQueue

returns BatchQueue

func (*BatchQueueAPI) BatchQueues

func (a *BatchQueueAPI) BatchQueues(ctx context.Context) ([]BatchQueue, error)

BatchQueueAPI Gets all batch queue definitions

returns []BatchQueue

func (*BatchQueueAPI) CreateBatchQueue

func (a *BatchQueueAPI) CreateBatchQueue(ctx context.Context, batchqueue BatchQueue) (BatchQueue, error)

BatchQueueAPI Adds a new batch queue definition

  • @param batchqueue The BatchQueue object.

returns BatchQueue

func (*BatchQueueAPI) DeleteBatchQueue

func (a *BatchQueueAPI) DeleteBatchQueue(ctx context.Context, name string) (string, error)

BatchQueueAPI Delete the batch queue definition by name.

  • @param name Name of the batch queue to delete.

returns string

func (*BatchQueueAPI) StartBatchQueue

func (a *BatchQueueAPI) StartBatchQueue(ctx context.Context, name string) (string, error)

BatchQueueAPI Starts a batch queue

  • @param name Name of the queue to start

returns string

func (*BatchQueueAPI) StopBatchQueue

func (a *BatchQueueAPI) StopBatchQueue(ctx context.Context, name string) (string, error)

BatchQueueAPI Stops a batch queue

  • @param name Name of the queue to stop

returns string

func (*BatchQueueAPI) UpdateBatchQueue

func (a *BatchQueueAPI) UpdateBatchQueue(ctx context.Context, batchqueue BatchQueue) (BatchQueue, error)

BatchQueueAPI Updates an existing batch queue

  • @param batchqueue Batch queue definition to be updated

returns BatchQueue

type CancelEntry

type CancelEntry struct {
	Force        bool   `json:"force,omitempty"`
	Reprocess    bool   `json:"reprocess,omitempty"`
	AuditComment string `json:"auditComment,omitempty"`
	Severity     string `json:"severity,omitempty"`
}

type Cfg

type Cfg struct {
	CfgName       string    `json:"cfgName,omitempty"`
	DataType      string    `json:"dataType,omitempty"`
	Value         *Object   `json:"value,omitempty"`
	Description   string    `json:"description,omitempty"`
	LastChangeUTC time.Time `json:"lastChangeUTC,omitempty"`
}

type ConfigAPI

type ConfigAPI service

func (*ConfigAPI) ConfigByName

func (a *ConfigAPI) ConfigByName(ctx context.Context, name string) (Cfg, error)

ConfigAPI Get the Configuration with the specified configName.

  • @param name The name of the Configuration

returns Cfg

func (*ConfigAPI) Configs

func (a *ConfigAPI) Configs(ctx context.Context) ([]Cfg, error)

ConfigAPI Gets a list of all configurations

returns []Cfg

func (*ConfigAPI) CreateConfig

func (a *ConfigAPI) CreateConfig(ctx context.Context, config Cfg) (Cfg, error)

ConfigAPI Creates a new Configuration object.

  • @param config The name of the configuration

returns Cfg

func (*ConfigAPI) DeleteConfig

func (a *ConfigAPI) DeleteConfig(ctx context.Context, name string) (string, error)

ConfigAPI Deletes a Configuration object.

  • @param name The name of the Configuration

returns string

func (*ConfigAPI) UpdateConfig

func (a *ConfigAPI) UpdateConfig(ctx context.Context, config Cfg) (Cfg, error)

ConfigAPI Updates an existing Cfg object or creates a new definition if it doesn't exist.

  • @param config The name of the cfg

returns Cfg

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

type DateAPI

type DateAPI service

func (*DateAPI) EvaluateDate

func (a *DateAPI) EvaluateDate(ctx context.Context, date string, localVarOptionals *DateApiDateGetEvaluateDateOpts) (time.Time, error)

func (*DateAPI) UpdateDate

func (a *DateAPI) UpdateDate(ctx context.Context, dateTypeName string, date time.Time) (Object, error)

DateAPI Adds a date to an existing DateType or creates a new DateType if it doesn't exist.

  • @param dateTypeName The name of the DateType to add the date to.
  • @param date The date to add.

returns Object

type DateApiDateGetEvaluateDateOpts

type DateApiDateGetEvaluateDateOpts struct {
	Today     optional.Time
	StartDate optional.Time
}

type DateDetail

type DateDetail struct {
	DateTypeID    int       `json:"dateTypeID,omitempty"`
	DateTypeType  string    `json:"dateTypeType,omitempty"`
	Description   string    `json:"description,omitempty"`
	LastChangeUTC time.Time `json:"lastChangeUTC,omitempty"`
	SpecificType  string    `json:"specificType,omitempty"`
	StartDate     time.Time `json:"startDate,omitempty"`
	WorkDay       string    `json:"workDay,omitempty"`
}

type DateType

type DateType struct {
	Continuous    bool               `json:"continuous,omitempty"`
	Dates         []DateDetail       `json:"dates,omitempty"`
	DateTypeID    int                `json:"dateTypeID,omitempty"`
	DateTypeType  string             `json:"dateTypeType,omitempty"`
	Description   string             `json:"description,omitempty"`
	LastChangeUTC time.Time          `json:"lastChangeUTC,omitempty"`
	SpecificTypes []SpecificDateType `json:"specificTypes,omitempty"`
}

type DateTypeAPI

type DateTypeAPI service

func (*DateTypeAPI) CreateDateType

func (a *DateTypeAPI) CreateDateType(ctx context.Context, dateType DateType) (Object, error)

DateTypeAPI Creates a new DateType object.

  • @param dateType A DateType object

returns Object

func (*DateTypeAPI) DateTypeByID

func (a *DateTypeAPI) DateTypeByID(ctx context.Context, id int) (DateType, error)

DateTypeAPI Get the DateType with the specified ID.

  • @param id

returns DateType

func (*DateTypeAPI) DateTypeByName

func (a *DateTypeAPI) DateTypeByName(ctx context.Context, name string) (DateType, error)

DateTypeAPI Get the DateType with the specified name.

  • @param name The name of the DateType

returns DateType

func (*DateTypeAPI) DateTypes

func (a *DateTypeAPI) DateTypes(ctx context.Context) ([]DateType, error)

DateTypeAPI Gets a collection of all DateTypes

returns []DateType

func (*DateTypeAPI) DeleteDateType

func (a *DateTypeAPI) DeleteDateType(ctx context.Context, name string) (Object, error)

DateTypeAPI Deletes a DateType object.

  • @param name The name of the DateType

returns Object

func (*DateTypeAPI) UpdateDateType

func (a *DateTypeAPI) UpdateDateType(ctx context.Context, dateType DateType) (Object, error)

DateTypeAPI Updates an existing DateType object or creates a new definition if it doesn't exist.

  • @param dateType A DateType object

returns Object

type Dependency

type Dependency struct {
	DependencyName string    `json:"dependencyName,omitempty"`
	DependencyType string    `json:"dependencyType,omitempty"`
	DependID       int       `json:"dependID,omitempty"`
	Description    string    `json:"description,omitempty"`
	LastChangeUTC  time.Time `json:"lastChangeUTC,omitempty"`
}

type Entry

type Entry struct {
	AgentNode            string    `json:"agentNode,omitempty"`
	AltUserName          string    `json:"altUserName,omitempty"`
	BatchQueueID         int       `json:"batchQueueID,omitempty"`
	BatchQueueName       string    `json:"batchQueueName,omitempty"`
	CompletionTimeUTC    time.Time `json:"completionTimeUTC,omitempty"`
	CurrentState         string    `json:"currentState,omitempty"`
	CurrentStep          int       `json:"currentStep,omitempty"`
	DebugMode            bool      `json:"debugMode,omitempty"`
	DependOK             bool      `json:"dependOK,omitempty"`
	Description          string    `json:"description,omitempty"`
	DetailID             int       `json:"detailID,omitempty"`
	DisplayName          string    `json:"displayName,omitempty"`
	FinalSeverity        string    `json:"finalSeverity,omitempty"`
	FinalStatus          string    `json:"finalStatus,omitempty"`
	FinalStatusCode      int       `json:"finalStatusCode,omitempty"`
	Halted               bool      `json:"halted,omitempty"`
	Held                 bool      `json:"held,omitempty"`
	HoldTimeUTC          time.Time `json:"holdTimeUTC,omitempty"`
	Icon                 string    `json:"icon,omitempty"`
	IgnoreResReq         bool      `json:"ignoreResReq,omitempty"`
	InitiatorID          int       `json:"initiatorID,omitempty"`
	InitiatorType        string    `json:"initiatorType,omitempty"`
	JamsEntry            int       `json:"jamsEntry,omitempty"`
	JamsId               string    `json:"jamsId,omitempty"`
	JobID                int       `json:"jobID,omitempty"`
	JobName              string    `json:"jobName,omitempty"`
	JobStatus            string    `json:"jobStatus,omitempty"`
	LogFileActive        bool      `json:"logFileActive,omitempty"`
	LogFilename          string    `json:"logFilename,omitempty"`
	MasterEntry          int       `json:"masterEntry,omitempty"`
	MasterRON            int       `json:"masterRON,omitempty"`
	Message              string    `json:"message,omitempty"`
	MissedWindowAction   string    `json:"missedWindowAction,omitempty"`
	Monitor              bool      `json:"monitor,omitempty"`
	NodeName             string    `json:"nodeName,omitempty"`
	Note                 string    `json:"note,omitempty"`
	NotifyOfMissedWindow bool      `json:"notifyOfMissedWindow,omitempty"`
	NotifyUser           bool      `json:"notifyUser,omitempty"`
	OriginalHoldTimeUTC  time.Time `json:"originalHoldTimeUTC,omitempty"`
	ParentFolderID       int       `json:"parentFolderID,omitempty"`
	Permanent            bool      `json:"permanent,omitempty"`
	PrecheckCount        int       `json:"precheckCount,omitempty"`
	PrecheckEntry        int       `json:"precheckEntry,omitempty"`
	PrecheckInterval     string    `json:"precheckInterval,omitempty"`
	PrecheckJobID        int       `json:"precheckJobID,omitempty"`
	PrecheckTimeUTC      time.Time `json:"precheckTimeUTC,omitempty"`
	Preprocessed         bool      `json:"preprocessed,omitempty"`
	ProcessID            int       `json:"processID,omitempty"`
	Restartable          bool      `json:"restartable,omitempty"`
	RestartCount         int       `json:"restartCount,omitempty"`
	RetainOption         string    `json:"retainOption,omitempty"`
	RetainTime           string    `json:"retainTime,omitempty"`
	Ron                  int       `json:"ron,omitempty"`
	Runaway              bool      `json:"runaway,omitempty"`
	RunawayElapsed       string    `json:"runawayElapsed,omitempty"`
	RunPriority          int       `json:"runPriority,omitempty"`
	ScheduledTimeUTC     time.Time `json:"scheduledTimeUTC,omitempty"`
	ScheduleFromTime     string    `json:"scheduleFromTime,omitempty"`
	ScheduleToTime       string    `json:"scheduleToTime,omitempty"`
	ScheduleWindowID     int       `json:"scheduleWindowID,omitempty"`
	SchedulingPriority   int       `json:"schedulingPriority,omitempty"`
	SetupID              int       `json:"setupID,omitempty"`
	SetupOk              bool      `json:"setupOk,omitempty"`
	Stalled              bool      `json:"stalled,omitempty"`
	StalledTime          string    `json:"stalledTime,omitempty"`
	StartTimeUTC         time.Time `json:"startTimeUTC,omitempty"`
	Step                 int       `json:"step,omitempty"`
	StepWait             bool      `json:"stepWait,omitempty"`
	SubmitMethodName     string    `json:"submitMethodName,omitempty"`
	SubmitMethodID       int       `json:"submitMethodID,omitempty"`
	SubmittedBy          string    `json:"submittedBy,omitempty"`
	SuppressNotify       bool      `json:"suppressNotify,omitempty"`
	TempFilename         string    `json:"tempFilename,omitempty"`
	TodaysDate           time.Time `json:"todaysDate,omitempty"`
	UserID               int       `json:"userID,omitempty"`
	UserName             string    `json:"userName,omitempty"`
	Version              int       `json:"version,omitempty"`
	WaitFor              bool      `json:"waitFor,omitempty"`
}

type EntryAPI

type EntryAPI service

func (*EntryAPI) CancelEntry

func (a *EntryAPI) CancelEntry(ctx context.Context, id int, cancelEntry CancelEntry) error

EntryAPI Cancels a JAMS entry.

  • @param id The JAMS entry to cancel.
  • @param cancelEntry A CancelEntry.

func (*EntryAPI) Entries

func (a *EntryAPI) Entries(ctx context.Context) ([]Entry, error)

EntryAPI Gets entry information for all entries in the current schedule.

returns []Entry

func (*EntryAPI) EntryByID

func (a *EntryAPI) EntryByID(ctx context.Context, id int) (Entry, error)

EntryAPI Gets Entry information with the specified ID

  • @param id The JAMS entry to get.

returns Entry

func (*EntryAPI) EntryDownload

func (a *EntryAPI) EntryDownload(ctx context.Context, entryId int, localVarOptionals *EntryApiEntryDownloadOpts) (Object, error)

func (*EntryAPI) EntryParameter

func (a *EntryAPI) EntryParameter(ctx context.Context, id int, name string) (EntryParam, error)

EntryAPI Gets parameter value for a given entry.

  • @param id The JAMS entry for which to get the parameter.
  • @param name The name of the parameter to return.

returns EntryParam

func (*EntryAPI) EntryParameters

func (a *EntryAPI) EntryParameters(ctx context.Context, id int) ([]EntryParam, error)

EntryAPI Gets parameter list for a given entry.

  • @param id The JAMS entry for which to get parameters.

returns []EntryParam

func (*EntryAPI) HoldEntry

func (a *EntryAPI) HoldEntry(ctx context.Context, id int, holdEntry HoldEntry) error

EntryAPI Holds an Entry with the specified ID, with the specified HoldEntry Audit Comment.

  • @param id The JAMS entry to hold.
  • @param holdEntry A HoldEntry.

func (*EntryAPI) ReleaseEntry

func (a *EntryAPI) ReleaseEntry(ctx context.Context, id int, releaseEntry ReleaseEntry) error

EntryAPI Releases a CurJob with the specified ID to Run Again, with specified ReleaseEntry Audit Comment

  • @param id The JAMS entry to release.
  • @param releaseEntry A ReleaseEntry.

func (*EntryAPI) RescheduleEntry

func (a *EntryAPI) RescheduleEntry(ctx context.Context, id int, rescheduleEntry RescheduleEntry) error

EntryAPI Reschedules a JAMS entry.

  • @param id The JAMS entry to reschedule.
  • @param rescheduleEntry A RescheduleEntry.

func (*EntryAPI) RestartEntry

func (a *EntryAPI) RestartEntry(ctx context.Context, id int, restartEntry RestartEntry) error

EntryAPI Restarts a JAMS entry.

  • @param id The JAMS entry to restart.
  • @param restartEntry A RestartEntry.

func (*EntryAPI) UpdateEntryParameter

func (a *EntryAPI) UpdateEntryParameter(ctx context.Context, id int, name, value string) error

EntryAPI Sets parameter value for a given entry.

  • @param id The JAMS entry to update.
  • @param name The name of the parameter to update.
  • @param value The new parameter value.

func (*EntryAPI) UpdateStatus

func (a *EntryAPI) UpdateStatus(ctx context.Context, id int, status string, icon string, message string, permanent bool) error

EntryAPI Sets the status message for an entry.

  • @param id The JAMS entry to update.
  • @param status The new status message.
  • @param icon The new icon.
  • @param message A tooltip message for this entry.
  • @param permanent When true, the status change is permanent.

type EntryApiEntryDownloadOpts

type EntryApiEntryDownloadOpts struct {
	IsPreview optional.Bool
}

type EntryAuditTrail

type EntryAuditTrail struct {
	JamsId    string    `json:"jamsId,omitempty"`
	AuditTime time.Time `json:"auditTime,omitempty"`
	UserName  string    `json:"userName,omitempty"`
	Message   string    `json:"message,omitempty"`
	Comment   string    `json:"comment,omitempty"`
	Details   string    `json:"details,omitempty"`
}

type EntryParam

type EntryParam struct {
	DataType        string `json:"dataType,omitempty"`
	DefaultFormat   string `json:"defaultFormat,omitempty"`
	JamsEntry       int    `json:"jamsEntry,omitempty"`
	LoadedFrom      string `json:"loadedFrom,omitempty"`
	ParameterOrigin string `json:"parameterOrigin,omitempty"`
	ParamName       string `json:"paramName,omitempty"`
	Sequence        int    `json:"sequence,omitempty"`
	Value           string `json:"value,omitempty"`
}

type Error

type Error struct {
	Body  []byte
	Err   string
	Model interface{}
}

Error Provides access to the body, error and model on returned errors.

func (Error) Error

func (e Error) Error() string

Error returns non-empty string if there was an error.

type Folder

type Folder struct {
	ACL                        *ACL        `json:"acl,omitempty"`
	BatchQueueName             string      `json:"batchQueueName,omitempty"`
	BatchQueueID               int         `json:"batchQueueID,omitempty"`
	Description                string      `json:"description,omitempty"`
	HomeDirectory              string      `json:"homeDirectory,omitempty"`
	KeepLogs                   string      `json:"keepLogs,omitempty"`
	LastChangedBy              string      `json:"lastChangedBy,omitempty"`
	LastChangeUTC              time.Time   `json:"lastChangeUTC,omitempty"`
	LogLocation                string      `json:"logLocation,omitempty"`
	NotifyEmail                string      `json:"notifyEmail,omitempty"`
	NotifyJobID                int         `json:"notifyJobID,omitempty"`
	NotifyJobName              string      `json:"notifyJobName,omitempty"`
	NotifyJobNameIsRelative    bool        `json:"notifyJobNameIsRelative,omitempty"`
	TimestampLogs              string      `json:"timestampLogs,omitempty"`
	UserID                     int         `json:"userID,omitempty"`
	NotifyOther                string      `json:"notifyOther,omitempty"`
	PrintLocation              string      `json:"printLocation,omitempty"`
	PrintQueue                 string      `json:"printQueue,omitempty"`
	Parameters                 []Param     `json:"parameters,omitempty"`
	Alerts                     []AlertLink `json:"alerts,omitempty"`
	SchedulingPriorityModifier int         `json:"schedulingPriorityModifier,omitempty"`
	NotifyUsers                string      `json:"notifyUsers,omitempty"`
	RecoveryInstructions       string      `json:"recoveryInstructions,omitempty"`
	RetainOption               string      `json:"retainOption,omitempty"`
	RetainTime                 string      `json:"retainTime,omitempty"`
	RunawayElapsedPer          int         `json:"runawayElapsedPer,omitempty"`
	TemplateLibrary            string      `json:"templateLibrary,omitempty"`
	ShortElapsedPer            int         `json:"shortElapsedPer,omitempty"`
	ShortSeverity              string      `json:"shortSeverity,omitempty"`
	StalledTime                string      `json:"stalledTime,omitempty"`
	FolderID                   int         `json:"folderID,omitempty"`
	FolderName                 string      `json:"folderName,omitempty"`
	Name                       string      `json:"name,omitempty"`
	ParentFolderID             int         `json:"parentFolderID,omitempty"`
	ParentFolderName           string      `json:"parentFolderName,omitempty"`
	UserName                   string      `json:"userName,omitempty"`
	Requirements               []ResReq    `json:"requirements,omitempty"`
	SearchPath                 string      `json:"searchPath,omitempty"`
}

type FolderAPI

type FolderAPI service

func (*FolderAPI) CreateFolder

func (a *FolderAPI) CreateFolder(ctx context.Context, folder Folder) (Folder, error)

FolderAPI Adds a new folder definition

  • @param folder The folder definition

returns Folder

func (*FolderAPI) DeleteFolder

func (a *FolderAPI) DeleteFolder(ctx context.Context, qualifiedName string) (string, error)

FolderAPI Deletes a folder definition

  • @param qualifiedName The fully qualified name of the folder

returns string

func (*FolderAPI) FolderByID

func (a *FolderAPI) FolderByID(ctx context.Context, id int) (Folder, error)

FolderAPI Get full folder definition by ID

  • @param id ID of the folder definition.

returns Folder

func (*FolderAPI) FolderByName

func (a *FolderAPI) FolderByName(ctx context.Context, name string) (Folder, error)

FolderAPI Get full folder definition by name.

  • @param name Name of the folder definition.

returns Folder

func (*FolderAPI) FoldersByParentID

func (a *FolderAPI) FoldersByParentID(ctx context.Context, id int) ([]Folder, error)

FolderAPI Gets all child folder definitions of selected folder by ID

  • @param id ID of the parent folder.

returns []Folder

func (*FolderAPI) FoldersByParentName

func (a *FolderAPI) FoldersByParentName(ctx context.Context, name string) ([]Folder, error)

FolderAPI Gets all child folder definitions of selected folder by name

  • @param name Name of the parent folder.

returns []Folder

func (*FolderAPI) SubFoldersOfRootFolder

func (a *FolderAPI) SubFoldersOfRootFolder(ctx context.Context) ([]Folder, error)

FolderAPI Gets all child folder definitions of the root folder

returns []Folder

func (*FolderAPI) UpdateFolder

func (a *FolderAPI) UpdateFolder(ctx context.Context, folder Folder) (Folder, error)

FolderAPI Updates an existing folder definition

  • @param folder The folder definition

returns Folder

type History

type History struct {
	BatchQueue        string    `json:"batchQueue,omitempty"`
	BufferedIOCount   int       `json:"bufferedIOCount,omitempty"`
	CompletionTimeUTC time.Time `json:"completionTimeUTC,omitempty"`
	CpuTime           string    `json:"cpuTime,omitempty"`
	DebugMode         bool      `json:"debugMode,omitempty"`
	DirectIOCount     int       `json:"directIOCount,omitempty"`
	ElapsedTime       string    `json:"elapsedTime,omitempty"`
	FinalSeverity     string    `json:"finalSeverity,omitempty"`
	FinalStatus       string    `json:"finalStatus,omitempty"`
	FinalStatusCode   int       `json:"finalStatusCode,omitempty"`
	FolderID          int       `json:"folderID,omitempty"`
	FolderName        string    `json:"folderName,omitempty"`
	HoldTimeUTC       time.Time `json:"holdTimeUTC,omitempty"`
	InitiatorID       int       `json:"initiatorID,omitempty"`
	InitiatorType     string    `json:"initiatorType,omitempty"`
	JamsEntry         int       `json:"jamsEntry,omitempty"`
	JamsId            string    `json:"jamsId,omitempty"`
	JobID             int       `json:"jobID,omitempty"`
	JobName           string    `json:"jobName,omitempty"`
	JobStatus         string    `json:"jobStatus,omitempty"`
	LogFilename       string    `json:"logFilename,omitempty"`
	MasterRON         int       `json:"masterRON,omitempty"`
	NodeName          string    `json:"nodeName,omitempty"`
	Note              string    `json:"note,omitempty"`
	OverrideJobName   string    `json:"overrideJobName,omitempty"`
	PageFaults        int       `json:"pageFaults,omitempty"`
	ProcessID         int       `json:"processID,omitempty"`
	RestartCount      int       `json:"restartCount,omitempty"`
	Ron               int       `json:"ron,omitempty"`
	ScheduledTimeUTC  time.Time `json:"scheduledTimeUTC,omitempty"`
	SetupID           int       `json:"setupID,omitempty"`
	SetupName         string    `json:"setupName,omitempty"`
	StartTimeUTC      time.Time `json:"startTimeUTC,omitempty"`
	SubmittedBy       string    `json:"submittedBy,omitempty"`
	UserName          string    `json:"userName,omitempty"`
	WorkingSetPeak    int64     `json:"workingSetPeak,omitempty"`
}

type HistoryAPI

type HistoryAPI service

func (*HistoryAPI) History

func (a *HistoryAPI) History(ctx context.Context, search HistorySearch) ([]History, error)

HistoryAPI Gets job execution history.

returns []History

func (*HistoryAPI) HistoryOdata

func (a *HistoryAPI) HistoryOdata(ctx context.Context, query url.Values) (PageResultHistory, error)

HistoryAPI Gets job execution history using OData filters. You'll have to build them manually until I find or build an oData client.

returns PageResultHistory

func (*HistoryAPI) JobLog

func (a *HistoryAPI) JobLog(ctx context.Context, jobName string, ron, restartCount int, largeLog bool) (string, error)

func (*HistoryAPI) SetupLog

func (a *HistoryAPI) SetupLog(ctx context.Context, setupName string, ron, restartCount int, localVarOptionals *HistoryApiHistoryGetSetupLogOpts) (Object, error)

type HistoryApiHistoryGetSetupLogOpts

type HistoryApiHistoryGetSetupLogOpts struct {
	IsPreview optional.Bool
}

type HistorySearch

type HistorySearch struct {
	FolderName string
	JobName    string
	SetupName  string
	StartDate  time.Time
	EndDate    time.Time
}

type HoldEntry

type HoldEntry struct {
	AuditComment string `json:"auditComment,omitempty"`
}

type Job

type Job struct {
	ACL                        *ACL         `json:"acl,omitempty"`
	AdvanceWarning             string       `json:"advanceWarning,omitempty"`
	AgentNode                  string       `json:"agentNode,omitempty"`
	Alerts                     []AlertLink  `json:"alerts,omitempty"`
	AutoSubmit                 bool         `json:"autoSubmit,omitempty"`
	AvgBufferedIOCount         int          `json:"avgBufferedIOCount,omitempty"`
	AvgCount                   int          `json:"avgCount,omitempty"`
	AvgCpuTime                 string       `json:"avgCpuTime,omitempty"`
	AvgDirectIOCount           int          `json:"avgDirectIOCount,omitempty"`
	AvgElapsedTime             string       `json:"avgElapsedTime,omitempty"`
	AvgPageFaults              int          `json:"avgPageFaults,omitempty"`
	AvgWorkingSetPeak          int64        `json:"avgWorkingSetPeak,omitempty"`
	BadPattern                 string       `json:"badPattern,omitempty"`
	BatchQueueID               int          `json:"batchQueueID,omitempty"`
	BatchQueueName             string       `json:"batchQueueName,omitempty"`
	DefaultDate                string       `json:"defaultDate,omitempty"`
	DefaultSubmitTime          string       `json:"defaultSubmitTime,omitempty"`
	Dependencies               []Dependency `json:"dependencies,omitempty"`
	Description                string       `json:"description,omitempty"`
	ExceptForDate              string       `json:"exceptForDate,omitempty"`
	GoodPattern                string       `json:"goodPattern,omitempty"`
	HomeDirectory              string       `json:"homeDirectory,omitempty"`
	JobID                      int          `json:"jobID,omitempty"`
	JobName                    string       `json:"jobName,omitempty"`
	KeepLogs                   string       `json:"keepLogs,omitempty"`
	LastAutosubmitUTC          time.Time    `json:"lastAutosubmitUTC,omitempty"`
	LastChangedBy              string       `json:"lastChangedBy,omitempty"`
	LastChangeUTC              time.Time    `json:"lastChangeUTC,omitempty"`
	LastErrorUTC               time.Time    `json:"lastErrorUTC,omitempty"`
	LastFatalUTC               time.Time    `json:"lastFatalUTC,omitempty"`
	LastInfoUTC                time.Time    `json:"lastInfoUTC,omitempty"`
	LastResetUTC               time.Time    `json:"lastResetUTC,omitempty"`
	LastSuccessUTC             time.Time    `json:"lastSuccessUTC,omitempty"`
	LastWarningUTC             time.Time    `json:"lastWarningUTC,omitempty"`
	LogFilename                string       `json:"logFilename,omitempty"`
	MaxBufferedIOCount         int          `json:"maxBufferedIOCount,omitempty"`
	MaxCount                   int          `json:"maxCount,omitempty"`
	MaxCpuTime                 string       `json:"maxCpuTime,omitempty"`
	MaxDirectIOCount           int          `json:"maxDirectIOCount,omitempty"`
	MaxElapsedTime             string       `json:"maxElapsedTime,omitempty"`
	MaxPageFaults              int          `json:"maxPageFaults,omitempty"`
	MaxWorkingSetPeak          int64        `json:"maxWorkingSetPeak,omitempty"`
	MinBufferedIOCount         int          `json:"minBufferedIOCount,omitempty"`
	MinCount                   int          `json:"minCount,omitempty"`
	MinCpuTime                 string       `json:"minCpuTime,omitempty"`
	MinDirectIOCount           int          `json:"minDirectIOCount,omitempty"`
	MinElapsedTime             string       `json:"minElapsedTime,omitempty"`
	MinPageFaults              int          `json:"minPageFaults,omitempty"`
	MinWorkingSetPeak          int64        `json:"minWorkingSetPeak,omitempty"`
	MissedWindowAction         string       `json:"missedWindowAction,omitempty"`
	NonWorkdayScheduling       string       `json:"nonWorkdayScheduling,omitempty"`
	NotifyEMail                string       `json:"notifyEMail,omitempty"`
	NotifyJobID                int          `json:"notifyJobID,omitempty"`
	NotifyJobName              string       `json:"notifyJobName,omitempty"`
	NotifyJobNameIsRelative    bool         `json:"notifyJobNameIsRelative,omitempty"`
	NotifyOfMissedWindow       bool         `json:"notifyOfMissedWindow,omitempty"`
	NotifyOther                string       `json:"notifyOther,omitempty"`
	NotifySeverity             string       `json:"notifySeverity,omitempty"`
	NotifyUser                 bool         `json:"notifyUser,omitempty"`
	NotifyUsers                string       `json:"notifyUsers,omitempty"`
	Parameters                 []Param      `json:"parameters,omitempty"`
	ParentFolderID             int          `json:"parentFolderID,omitempty"`
	ParentFolderName           string       `json:"parentFolderName,omitempty"`
	PrecheckInterval           string       `json:"precheckInterval,omitempty"`
	PrecheckJobID              int          `json:"precheckJobID,omitempty"`
	PrecheckJobName            string       `json:"precheckJobName,omitempty"`
	PrecheckJobNameIsRelative  bool         `json:"precheckJobNameIsRelative,omitempty"`
	RecoverJobID               int          `json:"recoverJobID,omitempty"`
	RecoverJobName             string       `json:"recoverJobName,omitempty"`
	RecoverJobNameIsRelative   bool         `json:"recoverJobNameIsRelative,omitempty"`
	RecoveryInstructions       string       `json:"recoveryInstructions,omitempty"`
	RecoverySeverity           string       `json:"recoverySeverity,omitempty"`
	Reports                    []Report     `json:"reports,omitempty"`
	Requirements               []ResReq     `json:"requirements,omitempty"`
	Restartable                bool         `json:"restartable,omitempty"`
	ResubmitBase               string       `json:"resubmitBase,omitempty"`
	ResubmitDelay              string       `json:"resubmitDelay,omitempty"`
	ResubmitEnd                string       `json:"resubmitEnd,omitempty"`
	ResubmitOnError            bool         `json:"resubmitOnError,omitempty"`
	RetainOption               string       `json:"retainOption,omitempty"`
	RetainTime                 string       `json:"retainTime,omitempty"`
	RetryCount                 int          `json:"retryCount,omitempty"`
	RetryInterval              string       `json:"retryInterval,omitempty"`
	RunawayAction              string       `json:"runawayAction,omitempty"`
	RunawayElapsed             string       `json:"runawayElapsed,omitempty"`
	RunawayElapsedPer          int          `json:"runawayElapsedPer,omitempty"`
	RunPriority                int          `json:"runPriority,omitempty"`
	ScheduledDate              string       `json:"scheduledDate,omitempty"`
	ScheduledDateEnd           time.Time    `json:"scheduledDateEnd,omitempty"`
	ScheduledDateStart         time.Time    `json:"scheduledDateStart,omitempty"`
	ScheduledTime              string       `json:"scheduledTime,omitempty"`
	ScheduleFromTime           string       `json:"scheduleFromTime,omitempty"`
	ScheduleToTime             string       `json:"scheduleToTime,omitempty"`
	ScheduleWindowID           int          `json:"scheduleWindowID,omitempty"`
	ScheduleWindowName         string       `json:"scheduleWindowName,omitempty"`
	SchedulingPriorityModifier int          `json:"schedulingPriorityModifier,omitempty"`
	ShortElapsed               string       `json:"shortElapsed,omitempty"`
	ShortElapsedPer            int          `json:"shortElapsedPer,omitempty"`
	ShortSeverity              string       `json:"shortSeverity,omitempty"`
	SlaTime                    string       `json:"slaTime,omitempty"`
	Source                     string       `json:"source,omitempty"`
	SpecificInformational      string       `json:"specificInformational,omitempty"`
	SpecificValues             string       `json:"specificValues,omitempty"`
	SpecificWarning            string       `json:"specificWarning,omitempty"`
	StalledTime                string       `json:"stalledTime,omitempty"`
	SubmitMethodID             int          `json:"submitMethodID,omitempty"`
	SubmitMethodName           string       `json:"submitMethodName,omitempty"`
	SubmitOnHold               bool         `json:"submitOnHold,omitempty"`
	SuppressMenuDisplay        bool         `json:"suppressMenuDisplay,omitempty"`
	TimestampLogs              string       `json:"timestampLogs,omitempty"`
	TimeZoneID                 int          `json:"timeZoneID,omitempty"`
	TimeZoneName               string       `json:"timeZoneName,omitempty"`
	UserID                     int          `json:"userID,omitempty"`
	UserName                   string       `json:"userName,omitempty"`
	WorkingSetDefault          int          `json:"workingSetDefault,omitempty"`
	WorkingSetMax              int          `json:"workingSetMax,omitempty"`
	WorkingSetQuota            int          `json:"workingSetQuota,omitempty"`
}

type JobAPI

type JobAPI service

func (*JobAPI) CreateJob

func (a *JobAPI) CreateJob(ctx context.Context, job Job) (Job, error)

JobAPI Creates a new Job object.

  • @param job A Job object

returns Job

func (*JobAPI) DeleteJob

func (a *JobAPI) DeleteJob(ctx context.Context, name string) (string, error)

JobAPI Deletes a Job by name.

  • @param name The name of the Job to delete

returns string

func (*JobAPI) JobByID

func (a *JobAPI) JobByID(ctx context.Context, id int) (Job, error)

JobAPI Get the Job with the specified ID.

  • @param id The ID of the Job.

returns Job

func (*JobAPI) JobByName

func (a *JobAPI) JobByName(ctx context.Context, name string) (Job, error)

JobAPI Get the Job with the specified name.

  • @param name The name of the Job

returns Job

func (*JobAPI) Jobs

func (a *JobAPI) Jobs(ctx context.Context) ([]Job, error)

JobAPI Gets a list of all jobs

returns []Job

func (*JobAPI) JobsByFolder

func (a *JobAPI) JobsByFolder(ctx context.Context, folderName string, name string) ([]Job, error)

JobAPI Gets Jobs in the Folder with the specified name

  • @param folderName The name of the Folder to return Jobs from.
  • @param name The name of the Job.

returns []Job

func (*JobAPI) JobsByFolderID

func (a *JobAPI) JobsByFolderID(ctx context.Context, id int) ([]Job, error)

JobAPI Gets all jobs in the Folder with the specified ID

  • @param id ID of the folder definition

returns []Job

func (*JobAPI) UpdateJob

func (a *JobAPI) UpdateJob(ctx context.Context, job Job) (Job, error)

JobAPI Updates an existing Job object or creates new definition if it doesn't exist.

  • @param job A Job object

returns Job

type LoginData

type LoginData struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}
type MenuEntry struct {
	MenuName string `json:"menuName,omitempty"`
	MenuType string `json:"menuType,omitempty"`
	MenuText string `json:"menuText,omitempty"`
	Id       int    `json:"id,omitempty"`
}

type NestedMenuEntry

type NestedMenuEntry struct {
	Items    []NestedMenuEntry `json:"items,omitempty"`
	MenuName string            `json:"menuName,omitempty"`
	MenuType string            `json:"menuType,omitempty"`
	MenuText string            `json:"menuText,omitempty"`
	Id       int               `json:"id,omitempty"`
}

type Object

type Object struct {
}

type PageResultHistory

type PageResultHistory struct {
	Items        []History `json:"items,omitempty"`
	NextPageLink string    `json:"nextPageLink,omitempty"`
	Count        int64     `json:"count,omitempty"`
}

type Param

type Param struct {
	AllowEntry             bool      `json:"allowEntry,omitempty"`
	DataType               string    `json:"dataType,omitempty"`
	DefaultFormat          string    `json:"defaultFormat,omitempty"`
	DefaultValue           string    `json:"defaultValue,omitempty"`
	HelpText               string    `json:"helpText,omitempty"`
	Hide                   bool      `json:"hide,omitempty"`
	JobID                  int       `json:"jobID,omitempty"`
	LastChangeUTC          time.Time `json:"lastChangeUTC,omitempty"`
	Length                 int       `json:"length,omitempty"`
	MustFill               bool      `json:"mustFill,omitempty"`
	ParameterOrigin        string    `json:"parameterOrigin,omitempty"`
	ParamName              string    `json:"paramName,omitempty"`
	Prompt                 string    `json:"prompt,omitempty"`
	Required               bool      `json:"required,omitempty"`
	Sequence               int       `json:"sequence,omitempty"`
	Uppercase              bool      `json:"uppercase,omitempty"`
	ValidationData         string    `json:"validationData,omitempty"`
	ValidationType         string    `json:"validationType,omitempty"`
	VariableID             int       `json:"variableID,omitempty"`
	VariableName           string    `json:"variableName,omitempty"`
	VariableNameIsRelative bool      `json:"variableNameIsRelative,omitempty"`
}

type QueueNode

type QueueNode struct {
	NodeName string `json:"nodeName,omitempty"`
}

type ReleaseEntry

type ReleaseEntry struct {
	AuditComment string `json:"auditComment,omitempty"`
	ReleaseType  string `json:"releaseType,omitempty"`
	ForcePresent bool   `json:"forcePresent,omitempty"`
	DependOk     bool   `json:"dependOk,omitempty"`
}

type Report

type Report struct {
	Copies          int       `json:"copies,omitempty"`
	Description     string    `json:"description,omitempty"`
	FullFilename    string    `json:"fullFilename,omitempty"`
	LastChangeUTC   time.Time `json:"lastChangeUTC,omitempty"`
	LogicalName     string    `json:"logicalName,omitempty"`
	PrintForm       string    `json:"printForm,omitempty"`
	PrintQualifiers string    `json:"printQualifiers,omitempty"`
	PrintQueue      string    `json:"printQueue,omitempty"`
	ReportID        string    `json:"reportID,omitempty"`
	RetentionDays   int       `json:"retentionDays,omitempty"`
}

type ResReq

type ResReq struct {
	AutoRelease         bool      `json:"autoRelease,omitempty"`
	LastChangeUTC       time.Time `json:"lastChangeUTC,omitempty"`
	NetQuantityRequired int       `json:"netQuantityRequired,omitempty"`
	QuantityInherited   int       `json:"quantityInherited,omitempty"`
	QuantityRequired    int       `json:"quantityRequired,omitempty"`
	ResourceID          int       `json:"resourceID,omitempty"`
	ResourceName        string    `json:"resourceName,omitempty"`
	RetainOnFailure     bool      `json:"retainOnFailure,omitempty"`
}

type RescheduleEntry

type RescheduleEntry struct {
	BatchQueue   string    `json:"batchQueue,omitempty"`
	AgentNode    string    `json:"agentNode,omitempty"`
	HoldTime     time.Time `json:"holdTime,omitempty"`
	Held         bool      `json:"held,omitempty"`
	Priority     int       `json:"priority,omitempty"`
	AuditComment string    `json:"auditComment,omitempty"`
}

type Resource

type Resource struct {
	ACL               *ACL             `json:"acl,omitempty"`
	LastChangeUTC     time.Time        `json:"lastChangeUTC,omitempty"`
	ResourceName      string           `json:"resourceName,omitempty"`
	ResourceID        int              `json:"resourceID,omitempty"`
	QuantityAvailable int              `json:"quantityAvailable,omitempty"`
	QuantityInUse     int              `json:"quantityInUse,omitempty"`
	RoutineName       string           `json:"routineName,omitempty"`
	NodeSpecific      bool             `json:"nodeSpecific,omitempty"`
	Description       string           `json:"description,omitempty"`
	ResourceDetails   []ResourceDetail `json:"resourceDetails,omitempty"`
}

type ResourceAPI

type ResourceAPI service

func (*ResourceAPI) CreateResource

func (a *ResourceAPI) CreateResource(ctx context.Context, resource Resource) (Resource, error)

ResourceAPI Add a new resource definition

  • @param resource The resource definition

returns Resource

func (*ResourceAPI) DeleteResource

func (a *ResourceAPI) DeleteResource(ctx context.Context, name string) (string, error)

ResourceAPI Delete the resource definition by name

  • @param name Name of the resource to delete

returns string

func (*ResourceAPI) ResourceByID

func (a *ResourceAPI) ResourceByID(ctx context.Context, id int) (Resource, error)

ResourceAPI Gets a resource by ID

  • @param id ID of the resource

returns Resource

func (*ResourceAPI) ResourceByName

func (a *ResourceAPI) ResourceByName(ctx context.Context, name string) (Resource, error)

ResourceAPI Gets a resource by name

  • @param name Name of the resource

returns Resource

func (*ResourceAPI) ResourceSetQuantityAvailable

func (a *ResourceAPI) ResourceSetQuantityAvailable(ctx context.Context, name string, available int) (Resource, error)

ResourceAPI Change the value of quantity available on a resource

  • @param name Name of the resource
  • @param available The true or false value of node specific

returns Resource

func (*ResourceAPI) Resources

func (a *ResourceAPI) Resources(ctx context.Context) ([]Resource, error)

ResourceAPI Gets all resources

returns []Resource

func (*ResourceAPI) UpdateResource

func (a *ResourceAPI) UpdateResource(ctx context.Context, resource Resource) (Resource, error)

ResourceAPI Updates an existing resource

  • @param resource Resource definition to be updated

returns Resource

type ResourceDetail

type ResourceDetail struct {
	NodeName          string `json:"nodeName,omitempty"`
	QuantityAvailable int    `json:"quantityAvailable,omitempty"`
}

type RestartEntry

type RestartEntry struct {
	AuditComment string `json:"auditComment,omitempty"`
	Severity     string `json:"severity,omitempty"`
	Hold         bool   `json:"hold,omitempty"`
}

type Setup

type Setup struct {
	ACL                        *ACL         `json:"acl,omitempty"`
	AdvanceWarning             string       `json:"advanceWarning,omitempty"`
	Alerts                     []AlertLink  `json:"alerts,omitempty"`
	AutoSubmit                 bool         `json:"autoSubmit,omitempty"`
	AvgCount                   int          `json:"avgCount,omitempty"`
	AvgElapsedTime             string       `json:"avgElapsedTime,omitempty"`
	AvgJobCount                int          `json:"avgJobCount,omitempty"`
	BatchQueueID               int          `json:"batchQueueID,omitempty"`
	BatchQueueName             string       `json:"batchQueueName,omitempty"`
	DefaultDate                string       `json:"defaultDate,omitempty"`
	DefaultSubmitTime          string       `json:"defaultSubmitTime,omitempty"`
	Dependencies               []Dependency `json:"dependencies,omitempty"`
	Description                string       `json:"description,omitempty"`
	ExceptForDate              string       `json:"exceptForDate,omitempty"`
	Jobs                       []SetupJob   `json:"jobs,omitempty"`
	LastAutosubmitUTC          time.Time    `json:"lastAutosubmitUTC,omitempty"`
	LastBadUTC                 time.Time    `json:"lastBadUTC,omitempty"`
	LastChangedBy              string       `json:"lastChangedBy,omitempty"`
	LastChangeUTC              time.Time    `json:"lastChangeUTC,omitempty"`
	LastGoodUTC                time.Time    `json:"lastGoodUTC,omitempty"`
	LastResetUTC               time.Time    `json:"lastResetUTC,omitempty"`
	LogFilename                string       `json:"logFilename,omitempty"`
	KeepLogs                   string       `json:"keepLogs,omitempty"`
	TimestampLogs              string       `json:"timestampLogs,omitempty"`
	MaxCount                   int          `json:"maxCount,omitempty"`
	MaxElapsedTime             string       `json:"maxElapsedTime,omitempty"`
	MaxJobCount                int          `json:"maxJobCount,omitempty"`
	MinCount                   int          `json:"minCount,omitempty"`
	MinElapsedTime             string       `json:"minElapsedTime,omitempty"`
	MinJobCount                int          `json:"minJobCount,omitempty"`
	MissedWindowAction         string       `json:"missedWindowAction,omitempty"`
	NotifyEMail                string       `json:"notifyEMail,omitempty"`
	NotifyJobID                int          `json:"notifyJobID,omitempty"`
	NotifyJobName              string       `json:"notifyJobName,omitempty"`
	NotifyJobNameIsRelative    bool         `json:"notifyJobNameIsRelative,omitempty"`
	NotifyOfMissedWindow       bool         `json:"notifyOfMissedWindow,omitempty"`
	NotifyOther                string       `json:"notifyOther,omitempty"`
	NotifySeverity             string       `json:"notifySeverity,omitempty"`
	NotifyUser                 bool         `json:"notifyUser,omitempty"`
	NotifyUsers                string       `json:"notifyUsers,omitempty"`
	ParentFolderId             int          `json:"parentFolderId,omitempty"`
	ParentFolderName           string       `json:"parentFolderName,omitempty"`
	PrecheckJobName            string       `json:"precheckJobName,omitempty"`
	PrechkInterval             string       `json:"prechkInterval,omitempty"`
	PrecheckJobNameIsRelative  bool         `json:"precheckJobNameIsRelative,omitempty"`
	PrechkJobID                int          `json:"prechkJobID,omitempty"`
	QualifiedName              string       `json:"qualifiedName,omitempty"`
	RecoverJobNameIsRelative   bool         `json:"recoverJobNameIsRelative,omitempty"`
	RecoverJobID               int          `json:"recoverJobID,omitempty"`
	RecoverJobName             string       `json:"recoverJobName,omitempty"`
	RecoverSeverity            string       `json:"recoverSeverity,omitempty"`
	RecoveryInstructions       string       `json:"recoveryInstructions,omitempty"`
	References                 []SetupRef   `json:"references,omitempty"`
	Requirements               []ResReq     `json:"requirements,omitempty"`
	Restartable                bool         `json:"restartable,omitempty"`
	ResubmitBase               string       `json:"resubmitBase,omitempty"`
	ResubmitDelay              string       `json:"resubmitDelay,omitempty"`
	ResubmitEnd                string       `json:"resubmitEnd,omitempty"`
	ResubmitOnError            bool         `json:"resubmitOnError,omitempty"`
	RetainOption               string       `json:"retainOption,omitempty"`
	RetainTime                 string       `json:"retainTime,omitempty"`
	RetryCount                 int          `json:"retryCount,omitempty"`
	RetryInterval              string       `json:"retryInterval,omitempty"`
	RunawayAction              string       `json:"runawayAction,omitempty"`
	RunawayElapsed             string       `json:"runawayElapsed,omitempty"`
	RunawayElapsedPer          int          `json:"runawayElapsedPer,omitempty"`
	ScheduledDate              string       `json:"scheduledDate,omitempty"`
	ScheduledDateEnd           time.Time    `json:"scheduledDateEnd,omitempty"`
	ScheduledDateStart         time.Time    `json:"scheduledDateStart,omitempty"`
	ScheduledTime              string       `json:"scheduledTime,omitempty"`
	SchedulingPriorityModifier int          `json:"schedulingPriorityModifier,omitempty"`
	ScheduleWindowName         string       `json:"scheduleWindowName,omitempty"`
	SetupID                    int          `json:"setupID,omitempty"`
	SetupName                  string       `json:"setupName,omitempty"`
	ShortElapsed               string       `json:"shortElapsed,omitempty"`
	ShortElapsedPer            int          `json:"shortElapsedPer,omitempty"`
	FailShort                  bool         `json:"failShort,omitempty"`
	SlaTime                    string       `json:"slaTime,omitempty"`
	StalledTime                string       `json:"stalledTime,omitempty"`
	SubmitOnHold               bool         `json:"submitOnHold,omitempty"`
	SubmitTime                 string       `json:"submitTime,omitempty"`
	SuppressMenuDisplay        bool         `json:"suppressMenuDisplay,omitempty"`
	TimeZoneID                 int          `json:"timeZoneID,omitempty"`
	TimeZoneName               string       `json:"timeZoneName,omitempty"`
	DefaultUserName            string       `json:"defaultUserName,omitempty"`
	ScheduleFromTime           string       `json:"scheduleFromTime,omitempty"`
	ScheduleToTime             string       `json:"scheduleToTime,omitempty"`
	ScheduleWindowID           int          `json:"scheduleWindowID,omitempty"`
	NonWorkdayScheduling       string       `json:"nonWorkdayScheduling,omitempty"`
}

type SetupAPI

type SetupAPI service

func (*SetupAPI) CreateSetup

func (a *SetupAPI) CreateSetup(ctx context.Context, setup Setup) (Setup, error)

SetupAPI Creates a new Setup definition

  • @param setup New Setup definition

returns Setup

func (*SetupAPI) DeleteSetup

func (a *SetupAPI) DeleteSetup(ctx context.Context, name string) (string, error)

SetupAPI Deletes a Setup definition.

  • @param name The name of the Setup

returns string

func (*SetupAPI) SetupByID

func (a *SetupAPI) SetupByID(ctx context.Context, id int) (Setup, error)

SetupAPI Get the Setup with the specified ID.

  • @param id The ID of the Setup definition

returns Setup

func (*SetupAPI) SetupByName

func (a *SetupAPI) SetupByName(ctx context.Context, name string) (Setup, error)

SetupAPI Get the Setup with the specified setupName.

  • @param name The name of the Setup

returns Setup

func (*SetupAPI) Setups

func (a *SetupAPI) Setups(ctx context.Context) ([]Setup, error)

SetupAPI Gets a collection of all setups

returns []Setup

func (*SetupAPI) SetupsByFolderID

func (a *SetupAPI) SetupsByFolderID(ctx context.Context, id int) ([]Setup, error)

SetupAPI Gets all Setups in the folder with the specified ID

  • @param id ID of the folder definition

returns []Setup

func (*SetupAPI) UpdateSetup

func (a *SetupAPI) UpdateSetup(ctx context.Context, setup Setup) (Setup, error)

SetupAPI Updates an existing Setup definition or creates a new definition if it doesn't exist.

  • @param setup The name of the setup

returns Setup

type SetupJob

type SetupJob struct {
	AgentNode                  string           `json:"agentNode,omitempty"`
	Alerts                     []Alert          `json:"alerts,omitempty"`
	AvgBufferedIOCount         int              `json:"avgBufferedIOCount,omitempty"`
	AvgCount                   int              `json:"avgCount,omitempty"`
	AvgCpuTime                 string           `json:"avgCpuTime,omitempty"`
	AvgDirectIOCount           int              `json:"avgDirectIOCount,omitempty"`
	AvgElapsedTime             string           `json:"avgElapsedTime,omitempty"`
	AvgPageFaults              int              `json:"avgPageFaults,omitempty"`
	AvgWorkingSetPeak          int              `json:"avgWorkingSetPeak,omitempty"`
	BatchQueueID               int              `json:"batchQueueID,omitempty"`
	BatchQueueName             string           `json:"batchQueueName,omitempty"`
	Description                string           `json:"description,omitempty"`
	DetailID                   int              `json:"detailID,omitempty"`
	ExceptForDate              string           `json:"exceptForDate,omitempty"`
	FailureAction              string           `json:"failureAction,omitempty"`
	IsRelative                 bool             `json:"isRelative,omitempty"`
	JobDescription             string           `json:"jobDescription,omitempty"`
	JobID                      int              `json:"jobID,omitempty"`
	JobName                    string           `json:"jobName,omitempty"`
	LastChangeUTC              time.Time        `json:"lastChangeUTC,omitempty"`
	LogFilename                string           `json:"logFilename,omitempty"`
	MaxBufferedIOCount         int              `json:"maxBufferedIOCount,omitempty"`
	MaxCount                   int              `json:"maxCount,omitempty"`
	MaxCpuTime                 string           `json:"maxCpuTime,omitempty"`
	MaxDirectIOCount           int              `json:"maxDirectIOCount,omitempty"`
	MaxElapsedTime             string           `json:"maxElapsedTime,omitempty"`
	MaxPageFaults              int              `json:"maxPageFaults,omitempty"`
	MaxWorkingSetPeak          int              `json:"maxWorkingSetPeak,omitempty"`
	MinBufferedIOCount         int              `json:"minBufferedIOCount,omitempty"`
	MinCount                   int              `json:"minCount,omitempty"`
	MinCpuTime                 string           `json:"minCpuTime,omitempty"`
	MinDirectIOCount           int              `json:"minDirectIOCount,omitempty"`
	MinElapsedTime             string           `json:"minElapsedTime,omitempty"`
	MinimumSeverity            string           `json:"minimumSeverity,omitempty"`
	MinPageFaults              int              `json:"minPageFaults,omitempty"`
	MinWorkingSetPeak          int              `json:"minWorkingSetPeak,omitempty"`
	MissedWindowAction         string           `json:"missedWindowAction,omitempty"`
	NonWorkdayScheduling       string           `json:"nonWorkdayScheduling,omitempty"`
	NotifyEMail                string           `json:"notifyEMail,omitempty"`
	NotifyJobID                int              `json:"notifyJobID,omitempty"`
	NotifyJobName              string           `json:"notifyJobName,omitempty"`
	NotifyJobNameIsRelative    bool             `json:"notifyJobNameIsRelative,omitempty"`
	NotifyOfMissedWindow       string           `json:"notifyOfMissedWindow,omitempty"`
	NotifyOther                string           `json:"notifyOther,omitempty"`
	NotifySeverity             string           `json:"notifySeverity,omitempty"`
	NotifyUsers                string           `json:"notifyUsers,omitempty"`
	OverrideDescription        string           `json:"overrideDescription,omitempty"`
	OverrideName               string           `json:"overrideName,omitempty"`
	PrecheckInterval           string           `json:"precheckInterval,omitempty"`
	PrecheckJobID              int              `json:"precheckJobID,omitempty"`
	PrecheckJobName            string           `json:"precheckJobName,omitempty"`
	PrecheckJobNameIsRelative  bool             `json:"precheckJobNameIsRelative,omitempty"`
	RecoverJobID               int              `json:"recoverJobID,omitempty"`
	RecoverJobName             string           `json:"recoverJobName,omitempty"`
	RecoverJobNameIsRelative   bool             `json:"recoverJobNameIsRelative,omitempty"`
	RecoverySeverity           string           `json:"recoverySeverity,omitempty"`
	Reports                    []SetupJobReport `json:"reports,omitempty"`
	RetryCount                 int              `json:"retryCount,omitempty"`
	RetryInterval              string           `json:"retryInterval,omitempty"`
	RunawayAction              string           `json:"runawayAction,omitempty"`
	RunawayElapsed             string           `json:"runawayElapsed,omitempty"`
	RunawayElapsedPer          int              `json:"runawayElapsedPer,omitempty"`
	RunPriority                int              `json:"runPriority,omitempty"`
	ScheduledDate              string           `json:"scheduledDate,omitempty"`
	ScheduleFromTime           string           `json:"scheduleFromTime,omitempty"`
	ScheduleToTime             string           `json:"scheduleToTime,omitempty"`
	ScheduleWindowID           int              `json:"scheduleWindowID,omitempty"`
	ScheduleWindowName         string           `json:"scheduleWindowName,omitempty"`
	SchedulingPriorityModifier int              `json:"schedulingPriorityModifier,omitempty"`
	SetupID                    int              `json:"setupID,omitempty"`
	ShortElapsed               string           `json:"shortElapsed,omitempty"`
	ShortElapsedPer            int              `json:"shortElapsedPer,omitempty"`
	ShortSeverity              string           `json:"shortSeverity,omitempty"`
	StalledTime                string           `json:"stalledTime,omitempty"`
	Step                       int              `json:"step,omitempty"`
	SubmitOnHold               string           `json:"submitOnHold,omitempty"`
	UserID                     int              `json:"userID,omitempty"`
	UserName                   string           `json:"userName,omitempty"`
	WaitFor                    bool             `json:"waitFor,omitempty"`
}

type SetupJobReport

type SetupJobReport struct {
	Copies          int       `json:"copies,omitempty"`
	FullFilename    string    `json:"fullFilename,omitempty"`
	LastChangeUTC   time.Time `json:"lastChangeUTC,omitempty"`
	Overriden       bool      `json:"overriden,omitempty"`
	PrintForm       string    `json:"printForm,omitempty"`
	PrintQualifiers string    `json:"printQualifiers,omitempty"`
	PrintQueue      string    `json:"printQueue,omitempty"`
	ReportID        string    `json:"reportID,omitempty"`
	RetentionDays   int       `json:"retentionDays,omitempty"`
}

type SetupRef

type SetupRef struct {
	ReferenceID int    `json:"referenceID,omitempty"`
	Name        string `json:"name,omitempty"`
	Type_       string `json:"type,omitempty"`
	Description string `json:"description,omitempty"`
	FolderPath  string `json:"folderPath,omitempty"`
}

type SpecificDateType

type SpecificDateType struct {
	Sequence     int    `json:"sequence,omitempty"`
	SpecificType string `json:"specificType,omitempty"`
}

type SubmitAPI

type SubmitAPI service

func (*SubmitAPI) SubmitInfoByJobID

func (a *SubmitAPI) SubmitInfoByJobID(ctx context.Context, id int) (SubmitInfo, error)

SubmitAPI Get the submit info for a Job with the specified ID

  • @param id The ID of the Job.

returns SubmitInfo

func (*SubmitAPI) SubmitInfoByName

func (a *SubmitAPI) SubmitInfoByName(ctx context.Context, name string) (SubmitInfo, error)

SubmitAPI Get the submit information for a Job or Setup with the specified name.

  • @param name The qualified name of the Job or Setup.

returns SubmitInfo

func (*SubmitAPI) SubmitInfoBySetupID

func (a *SubmitAPI) SubmitInfoBySetupID(ctx context.Context, id int) (SubmitInfo, error)

SubmitAPI Get the submit info for a Setup with the specified ID

  • @param id The ID of the Setup.

returns SubmitInfo

func (*SubmitAPI) SubmitJob

func (a *SubmitAPI) SubmitJob(ctx context.Context, si SubmitInfo) (SubmitInfo, error)

SubmitAPI Submit the job specified in the SubmitInfo object. Usually, you create the SubmitInfo object by calling GetSubmit which returns a SubmitInfo. You can then modify values in the SubmitInfo before calling PutSubmit.

  • @param si A SubmitInfo object

returns SubmitInfo

type SubmitInfo

type SubmitInfo struct {
	AfterTimeUTC         time.Time         `json:"afterTimeUTC,omitempty"`
	BatchQueueID         int               `json:"batchQueueID,omitempty"`
	BatchQueueName       string            `json:"batchQueueName,omitempty"`
	DebugMode            bool              `json:"debugMode,omitempty"`
	Description          string            `json:"description,omitempty"`
	FailShort            bool              `json:"failShort,omitempty"`
	FolderID             int               `json:"folderID,omitempty"`
	FolderName           string            `json:"folderName,omitempty"`
	Hold                 bool              `json:"hold,omitempty"`
	JamsEntry            int               `json:"jamsEntry,omitempty"`
	JamsId               string            `json:"jamsId,omitempty"`
	Jobs                 []SubmitJob       `json:"jobs,omitempty"`
	LogFile              bool              `json:"logFile,omitempty"`
	LogFilename          string            `json:"logFilename,omitempty"`
	LogLocation          string            `json:"logLocation,omitempty"`
	ManageAccess         bool              `json:"manageAccess,omitempty"`
	MissedWindowAction   string            `json:"missedWindowAction,omitempty"`
	Name                 string            `json:"name,omitempty"`
	Note                 string            `json:"note,omitempty"`
	NotifyOfMissedWindow bool              `json:"notifyOfMissedWindow,omitempty"`
	NotifyUser           bool              `json:"notifyUser,omitempty"`
	OverrideName         string            `json:"overrideName,omitempty"`
	Parameters           []SubmitParameter `json:"parameters,omitempty"`
	PrecheckInterval     string            `json:"precheckInterval,omitempty"`
	PrecheckJobID        int               `json:"precheckJobID,omitempty"`
	Restartable          bool              `json:"restartable,omitempty"`
	ResultText           string            `json:"resultText,omitempty"`
	RetainOption         string            `json:"retainOption,omitempty"`
	RetainTime           string            `json:"retainTime,omitempty"`
	Ron                  int               `json:"ron,omitempty"`
	RunawayElapsed       string            `json:"runawayElapsed,omitempty"`
	ScheduleFromTime     string            `json:"scheduleFromTime,omitempty"`
	ScheduleToTime       string            `json:"scheduleToTime,omitempty"`
	ScheduleWindowID     int               `json:"scheduleWindowID,omitempty"`
	SchedulingPriority   int               `json:"schedulingPriority,omitempty"`
	SetSymbols           bool              `json:"setSymbols,omitempty"`
	ShortElapsed         string            `json:"shortElapsed,omitempty"`
	StalledTime          string            `json:"stalledTime,omitempty"`
	SubmitID             int               `json:"submitID,omitempty"`
	SubmitIsSimple       bool              `json:"submitIsSimple,omitempty"`
	SubmittedBy          string            `json:"submittedBy,omitempty"`
	SubmitType           string            `json:"submitType,omitempty"`
	SuppressNotify       bool              `json:"suppressNotify,omitempty"`
	TestSubmit           bool              `json:"testSubmit,omitempty"`
	TimestampLogs        string            `json:"timestampLogs,omitempty"`
	UserID               int               `json:"userID,omitempty"`
	UserName             string            `json:"userName,omitempty"`
	UseSymbols           bool              `json:"useSymbols,omitempty"`
}

func (*SubmitInfo) SetParameter

func (si *SubmitInfo) SetParameter(key, value string)

type SubmitJob

type SubmitJob struct {
	AgentNode            string `json:"agentNode,omitempty"`
	AllowEditSource      bool   `json:"allowEditSource,omitempty"`
	AltUserName          string `json:"altUserName,omitempty"`
	BatchQueueID         int    `json:"batchQueueID,omitempty"`
	BatchQueueName       string `json:"batchQueueName,omitempty"`
	Description          string `json:"description,omitempty"`
	DetailID             int    `json:"detailID,omitempty"`
	FolderID             int    `json:"folderID,omitempty"`
	FolderName           string `json:"folderName,omitempty"`
	Hold                 bool   `json:"hold,omitempty"`
	InSchedule           bool   `json:"inSchedule,omitempty"`
	JobID                int    `json:"jobID,omitempty"`
	KeepLogs             string `json:"keepLogs,omitempty"`
	LogFile              bool   `json:"logFile,omitempty"`
	LogFilename          string `json:"logFilename,omitempty"`
	LogLocation          string `json:"logLocation,omitempty"`
	MinimumSeverity      string `json:"minimumSeverity,omitempty"`
	MissedWindowAction   string `json:"missedWindowAction,omitempty"`
	Name                 string `json:"name,omitempty"`
	NotifyOfMissedWindow bool   `json:"notifyOfMissedWindow,omitempty"`
	NotifyUser           bool   `json:"notifyUser,omitempty"`
	OverrideName         string `json:"overrideName,omitempty"`
	PrecheckInterval     string `json:"precheckInterval,omitempty"`
	PrecheckJobID        int    `json:"precheckJobID,omitempty"`
	RequiresSnapshot     bool   `json:"requiresSnapshot,omitempty"`
	Restartable          bool   `json:"restartable,omitempty"`
	RunawayElapsed       string `json:"runawayElapsed,omitempty"`
	RunPriority          int    `json:"runPriority,omitempty"`
	ScheduleFromTime     string `json:"scheduleFromTime,omitempty"`
	ScheduleToTime       string `json:"scheduleToTime,omitempty"`
	ScheduleWindowID     int    `json:"scheduleWindowID,omitempty"`
	SchedulingPriority   int    `json:"schedulingPriority,omitempty"`
	ShortElapsed         string `json:"shortElapsed,omitempty"`
	ShortSeverity        string `json:"shortSeverity,omitempty"`
	Source               string `json:"source,omitempty"`
	SourceModified       bool   `json:"sourceModified,omitempty"`
	StalledTime          string `json:"stalledTime,omitempty"`
	Step                 int    `json:"step,omitempty"`
	SubmitMethodID       int    `json:"submitMethodID,omitempty"`
	TimestampLogs        string `json:"timestampLogs,omitempty"`
	UserID               int    `json:"userID,omitempty"`
	UserName             string `json:"userName,omitempty"`
	WaitFor              bool   `json:"waitFor,omitempty"`
}

type SubmitMenuAPI

type SubmitMenuAPI service

func (*SubmitMenuAPI) NestedMenu

func (a *SubmitMenuAPI) NestedMenu(ctx context.Context) ([]NestedMenuEntry, error)

SubmitMenuAPI Gets the full populated menu. This is starts from the Folders in the root.

returns []NestedMenuEntry

func (*SubmitMenuAPI) SubmitMenu

func (a *SubmitMenuAPI) SubmitMenu(ctx context.Context) ([]MenuEntry, error)

SubmitMenuAPI Gets the default root level menu. This is created from the Folders in the root.

returns []MenuEntry

func (*SubmitMenuAPI) SubmitMenuByID

func (a *SubmitMenuAPI) SubmitMenuByID(ctx context.Context, menuType string, id int) ([]MenuEntry, error)

SubmitMenuAPI Gets the entries in a branch of a submit menu. Use GetSubmitMenuByName to get the top level menu and use this to expand branches when they are selected.

  • @param menuType Specifies which type of menu should be retrieved.
  • @param id The ID of the folder or menu that should be retrieved.

returns []MenuEntry

func (*SubmitMenuAPI) SubmitMenuByName

func (a *SubmitMenuAPI) SubmitMenuByName(ctx context.Context, menuType, name string) ([]MenuEntry, error)

SubmitMenuAPI Gets a submit menu.

  • @param menuType Specifies which type of menu should be retrieved.
  • @param name Specifies the name of the folder or menu to be retrieved.

returns []MenuEntry

type SubmitParameter

type SubmitParameter struct {
	AllowEntry      bool   `json:"allowEntry,omitempty"`
	DataType        string `json:"dataType,omitempty"`
	DefaultFormat   string `json:"defaultFormat,omitempty"`
	DetailID        int    `json:"detailID,omitempty"`
	GlobalName      string `json:"globalName,omitempty"`
	GlobalOverride  bool   `json:"globalOverride,omitempty"`
	HelpText        string `json:"helpText,omitempty"`
	Hide            bool   `json:"hide,omitempty"`
	JobID           int    `json:"jobID,omitempty"`
	Length          int    `json:"length,omitempty"`
	MustFill        bool   `json:"mustFill,omitempty"`
	ParameterOrigin string `json:"parameterOrigin,omitempty"`
	ParamID         int    `json:"paramID,omitempty"`
	ParamName       string `json:"paramName,omitempty"`
	ParamValue      string `json:"paramValue,omitempty"`
	Prompt          string `json:"prompt,omitempty"`
	Required        bool   `json:"required,omitempty"`
	Uppercase       bool   `json:"uppercase,omitempty"`
	ValidationData  string `json:"validationData,omitempty"`
	ValidationType  string `json:"validationType,omitempty"`
}

type Trigger

type Trigger struct {
	TriggerID        int             `json:"triggerID,omitempty"`
	TriggerName      string          `json:"triggerName,omitempty"`
	QualifiedName    string          `json:"qualifiedName,omitempty"`
	Description      string          `json:"description,omitempty"`
	ParentFolderID   int             `json:"parentFolderID,omitempty"`
	ParentFolderName string          `json:"parentFolderName,omitempty"`
	Status           string          `json:"status,omitempty"`
	UserName         string          `json:"userName,omitempty"`
	ResetWhenFired   bool            `json:"resetWhenFired,omitempty"`
	LastChangeUTC    time.Time       `json:"lastChangeUTC,omitempty"`
	LastResetUTC     time.Time       `json:"lastResetUTC,omitempty"`
	LastFiredUTC     time.Time       `json:"lastFiredUTC,omitempty"`
	Events           []TriggerEvent  `json:"events,omitempty"`
	Actions          []TriggerAction `json:"actions,omitempty"`
}

type TriggerAPI

type TriggerAPI service

func (*TriggerAPI) CreateTrigger

func (a *TriggerAPI) CreateTrigger(ctx context.Context, trigger Trigger) (Trigger, error)

TriggerAPI Adds a new trigger definition to a JAMS Server

  • @param trigger The trigger definition

returns Trigger

func (*TriggerAPI) DeleteTrigger

func (a *TriggerAPI) DeleteTrigger(ctx context.Context, name string) (string, error)

TriggerAPI Deletes a trigger definition

  • @param name Name of the trigger definition

returns string

func (*TriggerAPI) DisableTrigger

func (a *TriggerAPI) DisableTrigger(ctx context.Context, name string) (string, error)

TriggerAPI Disables a trigger by name

  • @param name Name of the trigger to disable

returns string

func (*TriggerAPI) EnableTrigger

func (a *TriggerAPI) EnableTrigger(ctx context.Context, name string) (string, error)

TriggerAPI Enables a trigger by name

  • @param name Name of the trigger to enable

returns string

func (*TriggerAPI) ResetTrigger

func (a *TriggerAPI) ResetTrigger(ctx context.Context, name string) (string, error)

TriggerAPI Resets a trigger

  • @param name Name of the trigger to reset

returns string

func (*TriggerAPI) TriggerByName

func (a *TriggerAPI) TriggerByName(ctx context.Context, name string) (Trigger, error)

TriggerAPI Gets a trigger definition by name

  • @param name Name of the trigger definition

returns Trigger

func (*TriggerAPI) TriggersByFolderID

func (a *TriggerAPI) TriggersByFolderID(ctx context.Context, id int) ([]Trigger, error)

TriggerAPI Gets all trigger definitions by parent folder ID

  • @param id The Trigger Id

returns []Trigger

func (*TriggerAPI) UpdateTrigger

func (a *TriggerAPI) UpdateTrigger(ctx context.Context, trigger Trigger) (Trigger, error)

TriggerAPI Updates and existing trigger definition

  • @param trigger The trigger definition

returns Trigger

type TriggerAction

type TriggerAction struct {
	ActionID      int       `json:"actionID,omitempty"`
	ActionName    string    `json:"actionName,omitempty"`
	LastChangeUTC time.Time `json:"lastChangeUTC,omitempty"`
	Description   string    `json:"description,omitempty"`
	ActionType    string    `json:"actionType,omitempty"`
}

type TriggerEvent

type TriggerEvent struct {
	EventID          int       `json:"eventID,omitempty"`
	EventName        string    `json:"eventName,omitempty"`
	Description      string    `json:"description,omitempty"`
	LastChangeUTC    time.Time `json:"lastChangeUTC,omitempty"`
	EventType        string    `json:"eventType,omitempty"`
	EventHappenedUTC time.Time `json:"eventHappenedUTC,omitempty"`
	EventIsTrue      bool      `json:"eventIsTrue,omitempty"`
}

type UserSecurity

type UserSecurity struct {
	ACL           *ACL      `json:"acl,omitempty"`
	Description   string    `json:"description,omitempty"`
	Fingerprint   string    `json:"fingerprint,omitempty"`
	LastChangeUTC time.Time `json:"lastChangeUTC,omitempty"`
	LogonUserName string    `json:"logonUserName,omitempty"`
	Password      string    `json:"password,omitempty"`
	PrivateKey    string    `json:"privateKey,omitempty"`
	PublicKey     string    `json:"publicKey,omitempty"`
	UserID        int       `json:"userID,omitempty"`
	UserName      string    `json:"userName,omitempty"`
}

type UserSecurityAPI

type UserSecurityAPI service

func (*UserSecurityAPI) CreateUser

func (a *UserSecurityAPI) CreateUser(ctx context.Context, user UserSecurity) (UserSecurity, error)

UserSecurityAPI Creates a new UserSecurity object.

  • @param user A UserSecurity object

returns UserSecurity

func (*UserSecurityAPI) DeleteUser

func (a *UserSecurityAPI) DeleteUser(ctx context.Context, name string) (string, error)

UserSecurityAPI Deletes a UserSecurity object.

  • @param name The name of the UserSecurity to delete.

returns string

func (*UserSecurityAPI) UpdateUser

func (a *UserSecurityAPI) UpdateUser(ctx context.Context, user UserSecurity) (UserSecurity, error)

UserSecurityAPI Updates an existing UserSecurity object or creates new definition if it doesn't exist.

  • @param user A UserSecurity object

returns UserSecurity

func (*UserSecurityAPI) UserByID

func (a *UserSecurityAPI) UserByID(ctx context.Context, id int) (UserSecurity, error)

UserSecurityAPI Get the User with the specified ID.

  • @param id The id of the UserSecurity.

returns UserSecurity

func (*UserSecurityAPI) UserByName

func (a *UserSecurityAPI) UserByName(ctx context.Context, name string) (UserSecurity, error)

UserSecurityAPI Get the UserSecurity with the specified name.

  • @param name The name of the UserSecurity.

returns UserSecurity

func (*UserSecurityAPI) Users

func (a *UserSecurityAPI) Users(ctx context.Context) ([]UserSecurity, error)

UserSecurityAPI Gets a collection of all users

returns []UserSecurity

type Variable

type Variable struct {
	ACL              *ACL      `json:"acl,omitempty"`
	CurrentLength    int       `json:"currentLength,omitempty"`
	DataType         string    `json:"dataType,omitempty"`
	Description      string    `json:"description,omitempty"`
	LastChangedBy    string    `json:"lastChangedBy,omitempty"`
	LastChangeUTC    time.Time `json:"lastChangeUTC,omitempty"`
	ParentFolderId   int       `json:"parentFolderId,omitempty"`
	ParentFolderName string    `json:"parentFolderName,omitempty"`
	Value            string    `json:"value,omitempty"`
	VariableId       int       `json:"variableId,omitempty"`
	VariableName     string    `json:"variableName,omitempty"`
}

type VariableAPI

type VariableAPI service

func (*VariableAPI) ChangeVariableValue

func (a *VariableAPI) ChangeVariableValue(ctx context.Context, name string, value Object) (Object, error)

VariableAPI Changes the value of a variable identified by name

  • @param name Name of the variable definition
  • @param value The new value of the variable definition

returns Object

func (*VariableAPI) CreateVariable

func (a *VariableAPI) CreateVariable(ctx context.Context, variable Variable) (Variable, error)

VariableAPI Creates a new variable definition

  • @param variable Model of a new variable definition

returns Variable

func (*VariableAPI) DeleteVariable

func (a *VariableAPI) DeleteVariable(ctx context.Context, name string) (string, error)

VariableAPI Deletes a variable definition

  • @param name Name of the variable

returns string

func (*VariableAPI) UpdateVariable

func (a *VariableAPI) UpdateVariable(ctx context.Context, var_ Variable) (Variable, error)

VariableAPI Update the Variable object.

  • @param var_ A Variable object

returns Variable

func (*VariableAPI) VariableByID

func (a *VariableAPI) VariableByID(ctx context.Context, id int) (Variable, error)

VariableAPI Get the Variable with the specified ID.

  • @param id

returns Variable

func (*VariableAPI) Variables

func (a *VariableAPI) Variables(ctx context.Context) ([]Variable, error)

VariableAPI Gets a list of variables that match the queryString

returns []Variable

func (*VariableAPI) VariablesByFolderID

func (a *VariableAPI) VariablesByFolderID(ctx context.Context, id int) ([]Variable, error)

VariableAPI Gets a list of variables under the specified folder definition by ID

  • @param id ID of the folder definition

returns []Variable

Directories

Path Synopsis
cmd
examples

Jump to

Keyboard shortcuts

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