handler

package
v0.0.0-...-6a3170c Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(c *gin.Context, obj interface{}) error

Bind binds the request to the object.

func JSON

func JSON(c *gin.Context, code int, data interface{})

Types

type HTTPError

type HTTPError struct {
	Code       int
	CauseError error
}

func (*HTTPError) Cause

func (e *HTTPError) Cause() error

func (*HTTPError) Error

func (e *HTTPError) Error() string

type Handler

type Handler struct {
	api.UnimplementedServerServer
	// contains filtered or unexported fields
}

Handler is the http handler for the server.

func NewHandler

func NewHandler(db *db.Client, pipelineService *pipeline.Service, dispatchService *dispatch.Service,
	locker lib.Locker, logService *logstorage.Service, eventhook *eventhook.Service,
) *Handler

func (*Handler) CancelJobExecution

func (h *Handler) CancelJobExecution(ctx context.Context, request *api.CancelJobExecutionRequest) (*api.CancelJobExecutionResponse, error)

func (*Handler) CreatePipeline

func (h *Handler) CreatePipeline(ctx context.Context, request *api.CreatePipelineRequest) (*api.CreatePipelineResponse, error)

func (*Handler) GetJobExecution

func (*Handler) GetLogLines

func (h *Handler) GetLogLines(ctx context.Context, request *api.GetLogLinesRequest) (*api.GetLogLinesResponse, error)

func (*Handler) GetStepExecution

func (h *Handler) GetStepExecution(ctx context.Context, request *api.GetStepExecutionRequest) (*api.GetStepExecutionResponse, error)

func (*Handler) Heartbeat

func (h *Handler) Heartbeat(ctx context.Context, request *api.HeartbeatRequest) (*api.HeartbeatResponse, error)

func (*Handler) ListJobExecutions

func (*Handler) Ping

func (*Handler) RegisterRouter

func (h *Handler) RegisterRouter(g *gin.RouterGroup)

func (*Handler) RequestJob

func (h *Handler) RequestJob(ctx context.Context, request *api.RequestJobRequest) (*api.RequestJobResponse, error)

func (*Handler) RequestJobHandler

func (h *Handler) RequestJobHandler(c *gin.Context)

func (*Handler) RerunJob

func (h *Handler) RerunJob(ctx context.Context, in *api.RerunJobRequest) (*api.RerunJobResponse, error)

RerunJob rerun the job by the latest job execution. TODO: this implementation is not correct, rerun should create new job executions include jobs depends on it.

func (*Handler) UpdateJobExecution

func (h *Handler) UpdateJobExecution(ctx context.Context, request *api.UpdateJobExecutionRequest) (*api.UpdateJobExecutionResponse, error)

func (*Handler) UpdateStepExecution

func (h *Handler) UpdateStepExecution(ctx context.Context, request *api.UpdateStepExecutionRequest) (*api.UpdateStepExecutionResponse, error)

func (*Handler) UploadLogLines

func (h *Handler) UploadLogLines(ctx context.Context, request *api.UpdateLogLinesRequest) (*api.UpdateLogLinesResponse, error)

type Message

type Message struct {
	Message error
}

Message is a struct for error message.

func (*Message) MarshalJSON

func (m *Message) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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