v1

package
v0.0.0-...-d45fff1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package v1 Beanstalk API

Documentation of Beanstalk API.

Schemes: http, https BasePath: /api/system/v1 Version: 1

Consumes: - application/json

Produces: - application/json

SecurityDefinitions:

bearer:
   type: apiKey
   in: header
   name: authorization
cookie:
   type: apiKey
   in: cookie
   name: access_token

swagger:meta

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuryJob

func BuryJob() beanstalk.Handler

swagger:route POST /jobs/{id}/bury jobs bury-job

Bury the specified job

Responses: 200: SuccessResponse 400: BadRequestResponse 404: NotFoundResponse

Security: - bearer: [] - cookie: []

func CreateJob

func CreateJob() beanstalk.Handler

swagger:route POST /jobs jobs create-job

Creates a new job

Responses: 200: CreateJobSuccessResponse 400: BadRequestResponse

Security: - bearer: [] - cookie: []

func DeleteJob

func DeleteJob() beanstalk.Handler

swagger:route POST /jobs/{id}/delete jobs delete-job

Delete the specified job

Responses: 200: SuccessResponse 404: NotFoundResponse

Security: - bearer: [] - cookie: []

func GetEmbedFiles

func GetEmbedFiles(fs http.FileSystem) http.Handler

func GetJob

func GetJob() beanstalk.Handler

swagger:route GET /jobs/{id} jobs get-job

Gets data of the specified job

Responses: 200: GetJobSuccessResponse 400: BadRequestResponse 404: NotFoundResponse

Security: - bearer: [] - cookie: []

func GetJobStats

func GetJobStats() beanstalk.Handler

swagger:route GET /jobs/{id}/stats jobs job-stats

Statistics of specified job

Responses: 200: JobStatsSuccessResponse 404: NotFoundResponse

Security: - bearer: [] - cookie: []

func GetServerStats

func GetServerStats() beanstalk.Handler

swagger:route GET /server/stats server server-stats

Beanstalk server statistics

Responses: 200: ServerStatsSuccessResponse

Security: - bearer: [] - cookie: []

func GetTubeStats

func GetTubeStats() beanstalk.Handler

swagger:route GET /tubes/{name}/stats tubes tube-stats

Gets statistics of specified tube

Responses: 200: TubeStatsSuccessResponse 404: NotFoundResponse

Security: - bearer: [] - cookie: []

func GetTubes

func GetTubes() beanstalk.Handler

swagger:route GET /tubes tubes list-of-tubes

List of exists tubes

Responses: 200: TubesSuccessResponse

Security: - bearer: [] - cookie: []

func KickJob

func KickJob() beanstalk.Handler

swagger:route POST /jobs/{id}/kick jobs kick-job

Kick the specified job

Responses: 200: SuccessResponse 404: NotFoundResponse

Security: - bearer: [] - cookie: []

func ReleaseJob

func ReleaseJob() beanstalk.Handler

swagger:route POST /jobs/{id}/release jobs release-job

Release the specified job

Responses: 200: SuccessResponse 400: BadRequestResponse 404: NotFoundResponse

Security: - bearer: [] - cookie: []

Types

type BadRequestSwaggerResponse

type BadRequestSwaggerResponse struct {
	// in: body
	Response struct {
		// default: failure
		Status string `json:"status"`
		// default: Bad Request
		Message string    `json:"message"`
		Data    ErrorData `json:"data"`
	}
}

swagger:response BadRequestResponse

type BuryJobRequest

type BuryJobRequest struct {
	Priority uint32 `json:"priority"`
}

Request types

type BuryJobSwaggerParameters

type BuryJobSwaggerParameters struct {
	// Job identifier
	//
	// in: path
	// example: 1
	ID int `json:"id"`
	// in: body
	Body BuryJobRequest
}

swagger:parameters bury-job

type CreateJobRequest

type CreateJobRequest struct {
	Tube     string   `json:"tube"`
	Priority uint32   `json:"priority"`
	Delay    Duration `json:"delay"`
	TTR      Duration `json:"ttr"`
	Data     string   `json:"data"`
}

Request types

type CreateJobResponse

type CreateJobResponse struct {
	Tube string `json:"tube"`
	ID   int    `json:"id"`
}

Response types

type CreateJobSuccessSwaggerResponse

type CreateJobSuccessSwaggerResponse struct {
	// in: body
	Response struct {
		// default: success
		Status string            `json:"status"`
		Data   CreateJobResponse `json:"data"`
	}
}

swagger:response CreateJobSuccessResponse

type CreateJobSwaggerParameters

type CreateJobSwaggerParameters struct {
	// in: body
	Body CreateJobRequest
}

swagger:parameters create-job

type DeleteJobSwaggerParameters

type DeleteJobSwaggerParameters struct {
	// Job identifier
	//
	// in: path
	// example: 1
	ID int `json:"id"`
}

swagger:parameters delete-job

type Duration

type Duration time.Duration

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) error

type ErrorData

type ErrorData struct {
	Errors []string `json:"errors"`
}

type GetJobSuccessSwaggerResponse

type GetJobSuccessSwaggerResponse struct {
	// in: body
	Response struct {
		// default: success
		Status string      `json:"status"`
		Data   JobResponse `json:"data"`
	}
}

swagger:response GetJobSuccessResponse

type GetJobSwaggerParameters

type GetJobSwaggerParameters struct {
	// Job identifier
	//
	// in: path
	// example: 1
	ID int `json:"id"`
}

swagger:parameters get-job

type JobResponse

type JobResponse struct {
	Data string `json:"data"`
}

Response types

type JobStatsResponse

type JobStatsResponse struct {
	Stats *beanstalk.StatsJob `json:"stats"`
}

Response types

type JobStatsSuccessSwaggerResponse

type JobStatsSuccessSwaggerResponse struct {
	// in: body
	Response struct {
		// default: success
		Status string           `json:"status"`
		Data   JobStatsResponse `json:"data"`
	}
}

swagger:response JobStatsSuccessResponse

type JobStatsSwaggerParameters

type JobStatsSwaggerParameters struct {
	// Job identifier
	//
	// in: path
	// example: 1
	ID int `json:"id"`
}

swagger:parameters job-stats

type KickJobSwaggerParameters

type KickJobSwaggerParameters struct {
	// Job identifier
	//
	// in: path
	// example: 1
	ID int `json:"id"`
}

swagger:parameters kick-job

type NotFoundSwaggerResponse

type NotFoundSwaggerResponse struct {
	// in: body
	Response struct {
		// default: failure
		Status string `json:"status"`
		// default: Not Found
		Message string `json:"message"`
	}
}

swagger:response NotFoundResponse

type ReleaseJobRequest

type ReleaseJobRequest struct {
	Priority uint32   `json:"priority"`
	Delay    Duration `json:"delay"`
}

Request types

type ReleaseJobSwaggerParameters

type ReleaseJobSwaggerParameters struct {
	// Job identifier
	//
	// in: path
	// example: 1
	ID int `json:"id"`
	// in: body
	Body ReleaseJobRequest
}

swagger:parameters release-job

type ServerStatsResponse

type ServerStatsResponse struct {
	Stats *beanstalk.Stats `json:"stats"`
}

Response types

type ServerStatsSuccessSwaggerResponse

type ServerStatsSuccessSwaggerResponse struct {
	// in: body
	Response struct {
		// default: success
		Status string              `json:"status"`
		Data   ServerStatsResponse `json:"data"`
	}
}

swagger:response ServerStatsSuccessResponse

type SuccessSwaggerResponse

type SuccessSwaggerResponse struct {
	// in: body
	Response struct {
		// default: success
		Status string `json:"status"`
	}
}

swagger:response SuccessResponse

type TubeStatsResponse

type TubeStatsResponse struct {
	Stats *beanstalk.StatsTube `json:"stats"`
}

Response types

type TubeStatsSuccessSwaggerResponse

type TubeStatsSuccessSwaggerResponse struct {
	// in: body
	Response struct {
		// default: success
		Status string            `json:"status"`
		Data   TubeStatsResponse `json:"data"`
	}
}

swagger:response TubeStatsSuccessResponse

type TubeStatsSwaggerParameters

type TubeStatsSwaggerParameters struct {
	// Tube name
	//
	// in: path
	// example: default
	Name string `json:"name"`
}

swagger:parameters tube-stats

type TubesResponse

type TubesResponse struct {
	Tubes []string `json:"tubes"`
}

Response types

type TubesSuccessSwaggerResponse

type TubesSuccessSwaggerResponse struct {
	// in: body
	Response struct {
		// default: success
		Status string        `json:"status"`
		Data   TubesResponse `json:"data"`
	}
}

swagger:response TubesSuccessResponse

Jump to

Keyboard shortcuts

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