Documentation ¶
Overview ¶
Package genserver provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.8.1 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type AddArrayJobJSONBody
- type AddArrayJobJSONRequestBody
- type AddArrayJobOutput
- type AddJobJSONBody
- type AddJobJSONRequestBody
- type AddJobOutput
- type ChiServerOptions
- type DeleteJobParams
- type Error
- type JobControlParams
- type JobControlParamsAction
- type JobID
- type JobInfo
- type JobInfoOutput
- type JobInfoParams
- type JobInfo_Extension
- type JobState
- type JobStateOutput
- type JobStateParams
- type JobSubState
- type JobTemplate
- type JobTemplate_Extension
- type JobTemplate_JobEnvironment
- type JobTemplate_ResourceLimits
- type JobTemplate_StageInFiles
- type JobTemplate_StageOutFiles
- type ListArrayJobsParams
- type ListJobsParams
- type MiddlewareFunc
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) AddArrayJob(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) AddJob(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteJob(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) JobControl(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) JobInfo(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) JobState(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListArrayJobs(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListJobCategories(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListJobs(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type AddArrayJobJSONBody ¶
type AddArrayJobJSONBody struct { // Embedded struct due to allOf(#/components/schemas/JobTemplate) JobTemplate `yaml:",inline"` // Embedded fields due to inline allOf schema Begin int64 `json:"begin"` End int64 `json:"end"` MaxParallel *int64 `json:"maxParallel,omitempty"` Step *int64 `json:"step,omitempty"` }
AddArrayJobJSONBody defines parameters for AddArrayJob.
type AddArrayJobJSONRequestBody ¶
type AddArrayJobJSONRequestBody AddArrayJobJSONBody
AddArrayJobJSONRequestBody defines body for AddArrayJob for application/json ContentType.
type AddArrayJobOutput ¶
type AddArrayJobOutput struct { // Embedded struct due to allOf(#/components/schemas/JobID) JobID `yaml:",inline"` // Embedded struct due to allOf(#/components/schemas/Error) Error `yaml:",inline"` }
AddArrayJobOutput defines model for AddArrayJobOutput.
type AddJobJSONRequestBody ¶
type AddJobJSONRequestBody AddJobJSONBody
AddJobJSONRequestBody defines body for AddJob for application/json ContentType.
type AddJobOutput ¶
type AddJobOutput struct { // Embedded struct due to allOf(#/components/schemas/JobID) JobID `yaml:",inline"` // Embedded struct due to allOf(#/components/schemas/Error) Error `yaml:",inline"` }
AddJobOutput defines model for AddJobOutput.
type ChiServerOptions ¶
type ChiServerOptions struct { BaseURL string BaseRouter chi.Router Middlewares []MiddlewareFunc }
type DeleteJobParams ¶
type DeleteJobParams struct { // ID of the job to manipulate JobID string `json:"jobID"` }
DeleteJobParams defines parameters for DeleteJob.
type JobControlParams ¶
type JobControlParams struct { // ID of the job to manipulate JobID string `json:"jobID"` // action to perform (suspend, resume, hold, release, terminate) Action JobControlParamsAction `json:"action"` }
JobControlParams defines parameters for JobControl.
type JobControlParamsAction ¶
type JobControlParamsAction string
JobControlParamsAction defines parameters for JobControl.
type JobInfo ¶
type JobInfo struct { AllocatedMachines []string `json:"allocatedMachines"` Annotation string `json:"annotation"` CpuTime int64 `json:"cpuTime"` DispatchTime time.Time `json:"dispatchTime"` ExitStatus int `json:"exitStatus"` Extension *JobInfo_Extension `json:"extension,omitempty"` FinishTime time.Time `json:"finishTime"` Id string `json:"id"` JobOwner string `json:"jobOwner"` QueueName string `json:"queueName"` Slots int `json:"slots"` State string `json:"state"` SubState string `json:"subState"` SubmissionMachine string `json:"submissionMachine"` SubmissionTime time.Time `json:"submissionTime"` TerminatingSignal string `json:"terminatingSignal"` WallclockTime int64 `json:"wallclockTime"` }
JobInfo defines model for JobInfo.
type JobInfoOutput ¶
type JobInfoOutput struct { // Embedded struct due to allOf(#/components/schemas/JobInfo) JobInfo `yaml:",inline"` // Embedded struct due to allOf(#/components/schemas/Error) Error `yaml:",inline"` }
JobInfoOutput defines model for JobInfoOutput.
type JobInfoParams ¶
type JobInfoParams struct { // ID if the job for which the JobInfo should be returned JobID string `json:"jobID"` }
JobInfoParams defines parameters for JobInfo.
type JobInfo_Extension ¶ added in v0.3.13
JobInfo_Extension defines model for JobInfo.Extension.
func (JobInfo_Extension) Get ¶ added in v0.3.13
func (a JobInfo_Extension) Get(fieldName string) (value string, found bool)
Getter for additional properties for JobInfo_Extension. Returns the specified element and whether it was found
func (JobInfo_Extension) MarshalJSON ¶ added in v0.3.13
func (a JobInfo_Extension) MarshalJSON() ([]byte, error)
Override default JSON handling for JobInfo_Extension to handle AdditionalProperties
func (*JobInfo_Extension) Set ¶ added in v0.3.13
func (a *JobInfo_Extension) Set(fieldName string, value string)
Setter for additional properties for JobInfo_Extension
func (*JobInfo_Extension) UnmarshalJSON ¶ added in v0.3.13
func (a *JobInfo_Extension) UnmarshalJSON(b []byte) error
Override default JSON handling for JobInfo_Extension to handle AdditionalProperties
type JobState ¶
type JobState string
JobState defines model for JobState.
const ( JobStateDone JobState = "done" JobStateFailed JobState = "failed" JobStateQueued JobState = "queued" JobStateQueuedHeld JobState = "queuedHeld" JobStateRequeued JobState = "requeued" JobStateRequeuedHeld JobState = "requeuedHeld" JobStateRunning JobState = "running" JobStateSuspended JobState = "suspended" JobStateUndetermined JobState = "undetermined" JobStateUnset JobState = "unset" )
Defines values for JobState.
type JobStateOutput ¶
type JobStateOutput struct { // Embedded struct due to allOf(#/components/schemas/JobState) JobState `yaml:",inline"` // Embedded struct due to allOf(#/components/schemas/JobSubState) JobSubState `yaml:",inline"` }
JobStateOutput defines model for JobStateOutput.
type JobStateParams ¶
type JobStateParams struct { // job ID the current job state should be queried for JobID string `json:"jobID"` }
JobStateParams defines parameters for JobState.
type JobTemplate ¶
type JobTemplate struct { AccountingID string `json:"accountingID"` Args []string `json:"args"` CandidateMachines []string `json:"candidateMachines"` DeadlineTime time.Time `json:"deadlineTime"` Email []string `json:"email"` EmailOnStarted bool `json:"emailOnStarted"` EmailOnTerminated bool `json:"emailOnTerminated"` ErrorPath string `json:"errorPath"` Extension *JobTemplate_Extension `json:"extension,omitempty"` InputPath string `json:"inputPath"` JobCategory string `json:"jobCategory"` JobEnvironment JobTemplate_JobEnvironment `json:"jobEnvironment"` JobName string `json:"jobName"` JoinFiles bool `json:"joinFiles"` MachineArch string `json:"machineArch"` MachineOs string `json:"machineOs"` MaxSlots int64 `json:"maxSlots"` MinPhysMemory int64 `json:"minPhysMemory"` MinSlots int64 `json:"minSlots"` OutputPath string `json:"outputPath"` Priority int64 `json:"priority"` QueueName string `json:"queueName"` ReRunnable bool `json:"reRunnable"` RemoteCommand string `json:"remoteCommand"` ReservationID string `json:"reservationID"` ResourceLimits JobTemplate_ResourceLimits `json:"resourceLimits"` StageInFiles JobTemplate_StageInFiles `json:"stageInFiles"` StageOutFiles JobTemplate_StageOutFiles `json:"stageOutFiles"` StartTime time.Time `json:"startTime"` SubmitAsHold bool `json:"submitAsHold"` WorkingDirectory string `json:"workingDirectory"` }
DRMAA2 job template definition
type JobTemplate_Extension ¶ added in v0.3.13
JobTemplate_Extension defines model for JobTemplate.Extension.
func (JobTemplate_Extension) Get ¶ added in v0.3.13
func (a JobTemplate_Extension) Get(fieldName string) (value string, found bool)
Getter for additional properties for JobTemplate_Extension. Returns the specified element and whether it was found
func (JobTemplate_Extension) MarshalJSON ¶ added in v0.3.13
func (a JobTemplate_Extension) MarshalJSON() ([]byte, error)
Override default JSON handling for JobTemplate_Extension to handle AdditionalProperties
func (*JobTemplate_Extension) Set ¶ added in v0.3.13
func (a *JobTemplate_Extension) Set(fieldName string, value string)
Setter for additional properties for JobTemplate_Extension
func (*JobTemplate_Extension) UnmarshalJSON ¶ added in v0.3.13
func (a *JobTemplate_Extension) UnmarshalJSON(b []byte) error
Override default JSON handling for JobTemplate_Extension to handle AdditionalProperties
type JobTemplate_JobEnvironment ¶
JobTemplate_JobEnvironment defines model for JobTemplate.JobEnvironment.
func (JobTemplate_JobEnvironment) Get ¶
func (a JobTemplate_JobEnvironment) Get(fieldName string) (value string, found bool)
Getter for additional properties for JobTemplate_JobEnvironment. Returns the specified element and whether it was found
func (JobTemplate_JobEnvironment) MarshalJSON ¶
func (a JobTemplate_JobEnvironment) MarshalJSON() ([]byte, error)
Override default JSON handling for JobTemplate_JobEnvironment to handle AdditionalProperties
func (*JobTemplate_JobEnvironment) Set ¶
func (a *JobTemplate_JobEnvironment) Set(fieldName string, value string)
Setter for additional properties for JobTemplate_JobEnvironment
func (*JobTemplate_JobEnvironment) UnmarshalJSON ¶
func (a *JobTemplate_JobEnvironment) UnmarshalJSON(b []byte) error
Override default JSON handling for JobTemplate_JobEnvironment to handle AdditionalProperties
type JobTemplate_ResourceLimits ¶
JobTemplate_ResourceLimits defines model for JobTemplate.ResourceLimits.
func (JobTemplate_ResourceLimits) Get ¶
func (a JobTemplate_ResourceLimits) Get(fieldName string) (value string, found bool)
Getter for additional properties for JobTemplate_ResourceLimits. Returns the specified element and whether it was found
func (JobTemplate_ResourceLimits) MarshalJSON ¶
func (a JobTemplate_ResourceLimits) MarshalJSON() ([]byte, error)
Override default JSON handling for JobTemplate_ResourceLimits to handle AdditionalProperties
func (*JobTemplate_ResourceLimits) Set ¶
func (a *JobTemplate_ResourceLimits) Set(fieldName string, value string)
Setter for additional properties for JobTemplate_ResourceLimits
func (*JobTemplate_ResourceLimits) UnmarshalJSON ¶
func (a *JobTemplate_ResourceLimits) UnmarshalJSON(b []byte) error
Override default JSON handling for JobTemplate_ResourceLimits to handle AdditionalProperties
type JobTemplate_StageInFiles ¶
JobTemplate_StageInFiles defines model for JobTemplate.StageInFiles.
func (JobTemplate_StageInFiles) Get ¶
func (a JobTemplate_StageInFiles) Get(fieldName string) (value string, found bool)
Getter for additional properties for JobTemplate_StageInFiles. Returns the specified element and whether it was found
func (JobTemplate_StageInFiles) MarshalJSON ¶
func (a JobTemplate_StageInFiles) MarshalJSON() ([]byte, error)
Override default JSON handling for JobTemplate_StageInFiles to handle AdditionalProperties
func (*JobTemplate_StageInFiles) Set ¶
func (a *JobTemplate_StageInFiles) Set(fieldName string, value string)
Setter for additional properties for JobTemplate_StageInFiles
func (*JobTemplate_StageInFiles) UnmarshalJSON ¶
func (a *JobTemplate_StageInFiles) UnmarshalJSON(b []byte) error
Override default JSON handling for JobTemplate_StageInFiles to handle AdditionalProperties
type JobTemplate_StageOutFiles ¶
JobTemplate_StageOutFiles defines model for JobTemplate.StageOutFiles.
func (JobTemplate_StageOutFiles) Get ¶
func (a JobTemplate_StageOutFiles) Get(fieldName string) (value string, found bool)
Getter for additional properties for JobTemplate_StageOutFiles. Returns the specified element and whether it was found
func (JobTemplate_StageOutFiles) MarshalJSON ¶
func (a JobTemplate_StageOutFiles) MarshalJSON() ([]byte, error)
Override default JSON handling for JobTemplate_StageOutFiles to handle AdditionalProperties
func (*JobTemplate_StageOutFiles) Set ¶
func (a *JobTemplate_StageOutFiles) Set(fieldName string, value string)
Setter for additional properties for JobTemplate_StageOutFiles
func (*JobTemplate_StageOutFiles) UnmarshalJSON ¶
func (a *JobTemplate_StageOutFiles) UnmarshalJSON(b []byte) error
Override default JSON handling for JobTemplate_StageOutFiles to handle AdditionalProperties
type ListArrayJobsParams ¶
type ListArrayJobsParams struct { // array job ID ArrayJobID string `json:"arrayJobID"` // number of records to skip for pagination Skip *int32 `json:"skip,omitempty"` // Maximum number of records to return. If not given the number of records are not limited. Limit *int32 `json:"limit,omitempty"` }
ListArrayJobsParams defines parameters for ListArrayJobs.
type ListJobsParams ¶
type ListJobsParams struct { // number of records to skip for pagination Skip *int32 `json:"skip,omitempty"` // maximum number of records to return Limit *int32 `json:"limit,omitempty"` }
ListJobsParams defines parameters for ListJobs.
type MiddlewareFunc ¶
type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc
type ServerInterface ¶
type ServerInterface interface { // submits a set of jobs sharing the same job template // (POST /addarrayjob) AddArrayJob(w http.ResponseWriter, r *http.Request) // submits a job based on a job template // (POST /addjob) AddJob(w http.ResponseWriter, r *http.Request) // removes a finished job from interal DB // (GET /deletejob) DeleteJob(w http.ResponseWriter, r *http.Request, params DeleteJobParams) // changes the state of a job // (GET /jobcontrol) JobControl(w http.ResponseWriter, r *http.Request, params JobControlParams) // retuns detailed information about a job // (GET /jobinfo) JobInfo(w http.ResponseWriter, r *http.Request, params JobInfoParams) // returns the state of a job // (GET /jobstate) JobState(w http.ResponseWriter, r *http.Request, params JobStateParams) // lists job IDs for a given array job ID // (GET /listarrayjobs) ListArrayJobs(w http.ResponseWriter, r *http.Request, params ListArrayJobsParams) // returns available job categories // (GET /listjobcategories) ListJobCategories(w http.ResponseWriter, r *http.Request) // lists jobs managed by jobtracker // (GET /listjobs) ListJobs(w http.ResponseWriter, r *http.Request, params ListJobsParams) }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) AddArrayJob ¶
func (siw *ServerInterfaceWrapper) AddArrayJob(w http.ResponseWriter, r *http.Request)
AddArrayJob operation middleware
func (*ServerInterfaceWrapper) AddJob ¶
func (siw *ServerInterfaceWrapper) AddJob(w http.ResponseWriter, r *http.Request)
AddJob operation middleware
func (*ServerInterfaceWrapper) DeleteJob ¶
func (siw *ServerInterfaceWrapper) DeleteJob(w http.ResponseWriter, r *http.Request)
DeleteJob operation middleware
func (*ServerInterfaceWrapper) JobControl ¶
func (siw *ServerInterfaceWrapper) JobControl(w http.ResponseWriter, r *http.Request)
JobControl operation middleware
func (*ServerInterfaceWrapper) JobInfo ¶
func (siw *ServerInterfaceWrapper) JobInfo(w http.ResponseWriter, r *http.Request)
JobInfo operation middleware
func (*ServerInterfaceWrapper) JobState ¶
func (siw *ServerInterfaceWrapper) JobState(w http.ResponseWriter, r *http.Request)
JobState operation middleware
func (*ServerInterfaceWrapper) ListArrayJobs ¶
func (siw *ServerInterfaceWrapper) ListArrayJobs(w http.ResponseWriter, r *http.Request)
ListArrayJobs operation middleware
func (*ServerInterfaceWrapper) ListJobCategories ¶
func (siw *ServerInterfaceWrapper) ListJobCategories(w http.ResponseWriter, r *http.Request)
ListJobCategories operation middleware
func (*ServerInterfaceWrapper) ListJobs ¶
func (siw *ServerInterfaceWrapper) ListJobs(w http.ResponseWriter, r *http.Request)
ListJobs operation middleware