http

package
v0.0.0-...-32d6f47 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIURLStatus = "/status"

	APIURLHealth        = "/api/v1/health"
	APIURLWorkflow      = "/api/v1/workflow/:name"
	APIURLWorkflowBatch = "/api/v1/workflow/:name/batch"
	APIURLWorkflowID    = "/api/v1/workflow/:name/:id"
	APIURLJobsID        = "/api/v1/jobs/:id"

	APIURLWorkflows = "/api/v1/metadata/workflows"
)

API URL used by the HTTP router

Variables

View Source
var (
	HeaderWorkflowMinVersion = "X-Workflows-Min-Version"
)

Functions

func NewRouter

func NewRouter(dataStore store.DataStore, nats nats.Client) *gin.Engine

NewRouter returns the gin router

Types

type StatusController

type StatusController struct{}

StatusController contains status-related end-points

func NewStatusController

func NewStatusController() *StatusController

NewStatusController returns a new StatusController

func (StatusController) Status

func (h StatusController) Status(c *gin.Context)

Status responds to GET /status

type WorkflowController

type WorkflowController struct {
	// contains filtered or unexported fields
}

WorkflowController container for end-points

func NewWorkflowController

func NewWorkflowController(dataStore store.DataStore, nats nats.Client) *WorkflowController

NewWorkflowController returns a new StatusController

func (WorkflowController) GetJobByID

func (h WorkflowController) GetJobByID(c *gin.Context)

GetJobByID responds to GET /api/jobs/:id

func (WorkflowController) GetWorkflowByNameAndID

func (h WorkflowController) GetWorkflowByNameAndID(c *gin.Context)

GetWorkflowByNameAndID responds to GET /api/workflow/:name/:id

func (WorkflowController) GetWorkflows

func (h WorkflowController) GetWorkflows(c *gin.Context)

GetWorkflows responds to GET /api/v1/metadata/workflows

func (WorkflowController) HealthCheck

func (h WorkflowController) HealthCheck(c *gin.Context)

func (WorkflowController) RegisterWorkflow

func (h WorkflowController) RegisterWorkflow(c *gin.Context)

RegisterWorkflow responds to POST /api/v1/metadata/workflows

func (WorkflowController) StartBatchWorkflows

func (h WorkflowController) StartBatchWorkflows(c *gin.Context)

StartBatchWorkflows responds to POST /api/workflow/:name/batch

func (WorkflowController) StartWorkflow

func (h WorkflowController) StartWorkflow(c *gin.Context)

StartWorkflow responds to POST /api/workflow/:name

Jump to

Keyboard shortcuts

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