Documentation ¶
Index ¶
- type FailureResponse
- type JobDetailsResponse
- type JobListResponse
- type ManagerAPI
- func (a *ManagerAPI) JobDetails(c *gin.Context)
- func (a *ManagerAPI) JobList(c *gin.Context)
- func (a *ManagerAPI) PipelineCreate(c *gin.Context)
- func (a *ManagerAPI) PipelineDelete(c *gin.Context)
- func (a *ManagerAPI) PipelineDetails(c *gin.Context)
- func (a *ManagerAPI) PipelineExecute(c *gin.Context)
- func (a *ManagerAPI) PipelineList(c *gin.Context)
- func (a *ManagerAPI) PipelineUpdate(c *gin.Context)
- type PipelineCreateResponse
- type PipelineDetailsResponse
- type PipelineExecuteRequest
- type PipelineExecuteResponse
- type PipelineListResponse
- type SuccessResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FailureResponse ¶
FailureResponse - response for a failed operation
type JobDetailsResponse ¶
type JobDetailsResponse struct { Job *model.Job `json:"job"` Messages []messages.Message `json:"messages"` }
JobDetailsResponse - response with job details
type JobListResponse ¶
JobListResponse - response with a list of jobs
type ManagerAPI ¶
type ManagerAPI struct {
// contains filtered or unexported fields
}
func CreateManagerAPI ¶
func CreateManagerAPI( gin *gin.Engine, dipscl *dipscl.Client, mongo *mongo.Database, messageHandler messages.MessageHandler, ) (*ManagerAPI, error)
CreateManagerAPI - adds the manager api to a gin engine
func (*ManagerAPI) JobDetails ¶
func (a *ManagerAPI) JobDetails(c *gin.Context)
JobDetails - find a single job by it's id and shows all fields @Summary find a single job by it's id and shows all fields @Description This method will return a single job by it's id or an error. @ID job-details @Tags jobs @Produce json @Param job_id path string true "Job ID" @Success 200 {object} JobDetailsResponse @Failure 400 {object} FailureResponse @Router /manager/job/details/{job_id} [get]
func (*ManagerAPI) JobList ¶
func (a *ManagerAPI) JobList(c *gin.Context)
JobList - lists all jobs @Summary lists all jobs @Description This method will return a list of all jobs @ID job-list @Tags jobs @Produce json @Success 200 {object} JobListResponse @Failure 400 {object} FailureResponse @Router /manager/job/all [get]
func (*ManagerAPI) PipelineCreate ¶
func (a *ManagerAPI) PipelineCreate(c *gin.Context)
PipelineCreate - creates a pipeline @Summary creates a pipeline @Description This method will create the pipeline sent via the post body @ID pipeline-create @Tags pipelines @Accept plain @Produce json @Param pipeline body string true "Pipeline Script" @Success 200 {object} PipelineCreateResponse @Failure 400 {object} FailureResponse @Router /manager/pipeline/ [post]
func (*ManagerAPI) PipelineDelete ¶
func (a *ManagerAPI) PipelineDelete(c *gin.Context)
PipelineDelete - deletes the pipeline with the given id @Summary deletes the pipeline with the given id @Description This method will delete the given pipeline @ID pipeline-delete @Tags pipelines @Produce json @Param pipeline_id path string true "Pipeline ID" @Success 200 {object} SuccessResponse @Failure 400 {object} FailureResponse @Router /manager/pipeline/{pipeline_id} [delete]
func (*ManagerAPI) PipelineDetails ¶
func (a *ManagerAPI) PipelineDetails(c *gin.Context)
PipelineDetails - find a pipeline by it's id and shows all fields @Summary find a pipeline by it's id and shows all fields @Description This method will return a single pipeline by it's id or an error. @ID pipeline-details @Tags pipelines @Produce json @Param pipeline_id path string true "Pipeline ID" @Success 200 {object} PipelineDetailsResponse @Failure 400 {object} FailureResponse @Router /manager/pipeline/details/{pipeline_id} [get]
func (*ManagerAPI) PipelineExecute ¶
func (a *ManagerAPI) PipelineExecute(c *gin.Context)
PipelineExecute - executes a pipeline @Summary executes a pipeline @Description This method will execute the pipeline with the given id @ID pipeline-execute @Tags pipelines @Accept json @Produce json @Param pipeline_id path string true "Pipeline ID" @Param execute_request body PipelineExecuteRequest true "Request Body" @Success 200 {object} PipelineExecuteResponse @Failure 400 {object} FailureResponse @Router /manager/pipeline/execute/{pipeline_id} [post]
func (*ManagerAPI) PipelineList ¶
func (a *ManagerAPI) PipelineList(c *gin.Context)
PipelineList - lists all registered pipelines @Summary lists all registered pipelines @Description This method will return a list of all registered pipelines @ID pipeline-list @Tags pipelines @Produce json @Success 200 {object} PipelineListResponse @Failure 400 {object} FailureResponse @Router /manager/pipeline/all [get]
func (*ManagerAPI) PipelineUpdate ¶
func (a *ManagerAPI) PipelineUpdate(c *gin.Context)
PipelineUpdate - updates the pipeline with the given id @Summary updates the pipeline with the given id @Description This method will update the given pipeline from a provided script @ID pipeline-update @Tags pipelines @Accept plain @Produce json @Param pipeline_id path string true "Pipeline ID" @Param pipeline body string true "Pipeline Script" @Success 200 {object} PipelineDetailsResponse @Failure 400 {object} FailureResponse @Router /manager/pipeline/{pipeline_id} [patch]
type PipelineCreateResponse ¶
type PipelineCreateResponse struct { Status string `json:"status"` Pipeline model.Pipeline `json:"pipeline"` }
PipelineCreateResponse - reponse for a successful pipeline creation
type PipelineDetailsResponse ¶
PipelineDetailsResponse - response with pipeline details
type PipelineExecuteRequest ¶
type PipelineExecuteRequest struct { Name string `json:"name"` Parameters map[string]interface{} `json:"parameters"` }
PipelineExecuteRequest - Request Body when executing a pipeline
type PipelineExecuteResponse ¶
PipelineExecuteResponse - Response when a pipeline was started
type PipelineListResponse ¶
PipelineListResponse - response with a list of pipelines
type SuccessResponse ¶
type SuccessResponse struct {
Status string `json:"status"`
}
SuccessResponse - reponse for a successful operation