api

package
v0.0.0-...-c93f736 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JobServiceKey = "job_service"
	UuidPathKey   = "uuid"
)
View Source
const (
	ContentTypeJSON           = "application/json"
	ContentTypeGraphQL        = "application/graphql"
	ContentTypeFormURLEncoded = "application/x-www-form-urlencoded"
)

Variables

This section is empty.

Functions

func BulkCreateJobsHandler

func BulkCreateJobsHandler(c *gin.Context)

BulkCreateJobsHandler create multiple new jobs

func CORSMiddleware

func CORSMiddleware() gin.HandlerFunc

func CleanJobsHandler

func CleanJobsHandler(c *gin.Context)

CleanJobsHandler is the handler to clean the stalled jobs

func CompleteJobHandler

func CompleteJobHandler(c *gin.Context)

CompleteJobHandler marks a job completed

func CreateJobHandler

func CreateJobHandler(c *gin.Context)

CreateJobHandler creates a new job

func FormatTimestamp

func FormatTimestamp(ts time.Time) time.Time

func GetJobsHandler

func GetJobsHandler(c *gin.Context)

GetJobsHandler gets the latest job from the database Checks if there is already a job assigned

func HealthHandler

func HealthHandler(c *gin.Context)

func HeartBeatJobHandler

func HeartBeatJobHandler(c *gin.Context)

HeartBeatJobHandler mark job as alive

func InitServer

func InitServer()

func InitServerEngine

func InitServerEngine() (r *gin.Engine)

func LivenessHandler

func LivenessHandler(c *gin.Context)

func ReadStatsJobHandler

func ReadStatsJobHandler(c *gin.Context)

ReadStatsJobHandler reads the current stats

func ReleaseJobHandler

func ReleaseJobHandler(c *gin.Context)

ReleaseJobHandler Releases the job after crash or problem

func StartJobHandler

func StartJobHandler(c *gin.Context)

StartJobHandler marks a job as started

Types

type RequestOptions

type RequestOptions struct {
	Query         string                 `json:"query" url:"query" schema:"query"`
	Variables     map[string]interface{} `json:"variables" url:"variables" schema:"variables"`
	OperationName string                 `json:"operationName" url:"operationName" schema:"operationName"`
}

func NewRequestOptions

func NewRequestOptions(r *http.Request) *RequestOptions

Jump to

Keyboard shortcuts

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