cron

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: AGPL-3.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cron provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.

Package cron provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHandlers

func RegisterHandlers(router gin.IRouter, si ServerInterface)

RegisterHandlers creates http.Handler with routing matching OpenAPI spec.

func RegisterHandlersWithOptions

func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)

RegisterHandlersWithOptions creates http.Handler with additional options

Types

type GetJobAuditLogsParams

type GetJobAuditLogsParams struct {
	// Page page number
	Page *int32 `form:"page,omitempty" json:"page,omitempty"`

	// PageSize maximum number of results to return
	PageSize *int32 `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// SortBy field to sort by
	SortBy *string `form:"sortBy,omitempty" json:"sortBy,omitempty"`

	// Order sort order
	Order *GetJobAuditLogsParamsOrder `form:"order,omitempty" json:"order,omitempty"`

	// Q starts with
	Q *string `form:"q,omitempty" json:"q,omitempty"`
}

GetJobAuditLogsParams defines parameters for GetJobAuditLogs.

type GetJobAuditLogsParamsOrder

type GetJobAuditLogsParamsOrder string

GetJobAuditLogsParamsOrder defines parameters for GetJobAuditLogs.

const (
	GetJobAuditLogsParamsOrderAsc  GetJobAuditLogsParamsOrder = "asc"
	GetJobAuditLogsParamsOrderDesc GetJobAuditLogsParamsOrder = "desc"
)

Defines values for GetJobAuditLogsParamsOrder.

type GetJobByIDParams

type GetJobByIDParams struct {
	Lang *GetJobByIDParamsLang `form:"lang,omitempty" json:"lang,omitempty"`
}

GetJobByIDParams defines parameters for GetJobByID.

type GetJobByIDParamsLang

type GetJobByIDParamsLang string

GetJobByIDParamsLang defines parameters for GetJobByID.

const (
	GetJobByIDParamsLangEn GetJobByIDParamsLang = "en"
	GetJobByIDParamsLangFr GetJobByIDParamsLang = "fr"
)

Defines values for GetJobByIDParamsLang.

type GinServerOptions

type GinServerOptions struct {
	BaseURL      string
	Middlewares  []MiddlewareFunc
	ErrorHandler func(*gin.Context, error, int)
}

GinServerOptions provides options for the Gin server.

type Job

type Job struct {
	Id                openapi_types.UUID `json:"id"`
	LastExecutionTime *time.Time         `json:"last_execution_time,omitempty"`
	LockedAt          *time.Time         `json:"locked_at,omitempty"`
	LockedBy          *string            `json:"locked_by,omitempty"`
	Name              string             `json:"name"`
	NextExecutionTime *time.Time         `json:"next_execution_time,omitempty"`
	Status            string             `json:"status"`
}

Job defines model for Job.

type JobAuditLog

type JobAuditLog struct {
	AppId         string             `json:"app_id"`
	CreatedAt     time.Time          `json:"createdAt"`
	EndTime       *time.Time         `json:"end_time,omitempty"`
	Error         *string            `json:"error,omitempty"`
	Id            openapi_types.UUID `json:"id"`
	JobName       string             `json:"job_name"`
	Output        *string            `json:"output,omitempty"`
	RequestId     string             `json:"request_id"`
	ScheduledTime time.Time          `json:"scheduled_time"`
	StartTime     *time.Time         `json:"start_time,omitempty"`
	Status        string             `json:"status"`
	TenantID      string             `json:"tenantID"`
	UpdatedAt     *time.Time         `json:"updatedAt,omitempty"`
}

JobAuditLog defines model for JobAuditLog.

type ListJobAuditLogsParams

type ListJobAuditLogsParams struct {
	// Page page number
	Page *int32 `form:"page,omitempty" json:"page,omitempty"`

	// PageSize maximum number of results to return
	PageSize *int32 `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// SortBy field to sort by
	SortBy *string `form:"sortBy,omitempty" json:"sortBy,omitempty"`

	// Order sort order
	Order *ListJobAuditLogsParamsOrder `form:"order,omitempty" json:"order,omitempty"`

	// Q starts with
	Q *string `form:"q,omitempty" json:"q,omitempty"`

	// Detail basic or full
	Detail *string `form:"detail,omitempty" json:"detail,omitempty"`
}

ListJobAuditLogsParams defines parameters for ListJobAuditLogs.

type ListJobAuditLogsParamsOrder

type ListJobAuditLogsParamsOrder string

ListJobAuditLogsParamsOrder defines parameters for ListJobAuditLogs.

const (
	ListJobAuditLogsParamsOrderAsc  ListJobAuditLogsParamsOrder = "asc"
	ListJobAuditLogsParamsOrderDesc ListJobAuditLogsParamsOrder = "desc"
)

Defines values for ListJobAuditLogsParamsOrder.

type ListJobsParams

type ListJobsParams struct {
	// Page page number
	Page *int32 `form:"page,omitempty" json:"page,omitempty"`

	// PageSize maximum number of results to return
	PageSize *int32 `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// SortBy field to sort by
	SortBy *string `form:"sortBy,omitempty" json:"sortBy,omitempty"`

	// Order sort order
	Order *ListJobsParamsOrder `form:"order,omitempty" json:"order,omitempty"`

	// Q starts with
	Q *string `form:"q,omitempty" json:"q,omitempty"`

	// Detail basic or full
	Detail *string             `form:"detail,omitempty" json:"detail,omitempty"`
	Lang   *ListJobsParamsLang `form:"lang,omitempty" json:"lang,omitempty"`
}

ListJobsParams defines parameters for ListJobs.

type ListJobsParamsLang

type ListJobsParamsLang string

ListJobsParamsLang defines parameters for ListJobs.

const (
	ListJobsParamsLangEn ListJobsParamsLang = "en"
	ListJobsParamsLangFr ListJobsParamsLang = "fr"
)

Defines values for ListJobsParamsLang.

type ListJobsParamsOrder

type ListJobsParamsOrder string

ListJobsParamsOrder defines parameters for ListJobs.

const (
	ListJobsParamsOrderAsc  ListJobsParamsOrder = "asc"
	ListJobsParamsOrderDesc ListJobsParamsOrder = "desc"
)

Defines values for ListJobsParamsOrder.

type ListRegisteredJobsParams

type ListRegisteredJobsParams struct {
	// Page Page number for pagination
	Page *int32 `form:"page,omitempty" json:"page,omitempty"`

	// PageSize Maximum number of results to return
	PageSize *int32 `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// SortBy Field to sort by
	SortBy *ListRegisteredJobsParamsSortBy `form:"sortBy,omitempty" json:"sortBy,omitempty"`

	// Order Sort order
	Order *ListRegisteredJobsParamsOrder `form:"order,omitempty" json:"order,omitempty"`

	// Q Search term for job name
	Q *string `form:"q,omitempty" json:"q,omitempty"`
}

ListRegisteredJobsParams defines parameters for ListRegisteredJobs.

type ListRegisteredJobsParamsOrder

type ListRegisteredJobsParamsOrder string

ListRegisteredJobsParamsOrder defines parameters for ListRegisteredJobs.

const (
	ListRegisteredJobsParamsOrderAsc  ListRegisteredJobsParamsOrder = "asc"
	ListRegisteredJobsParamsOrderDesc ListRegisteredJobsParamsOrder = "desc"
)

Defines values for ListRegisteredJobsParamsOrder.

type ListRegisteredJobsParamsSortBy

type ListRegisteredJobsParamsSortBy string

ListRegisteredJobsParamsSortBy defines parameters for ListRegisteredJobs.

const (
	IsEnabled        ListRegisteredJobsParamsSortBy = "is_enabled"
	JobName          ListRegisteredJobsParamsSortBy = "job_name"
	LastRegisteredAt ListRegisteredJobsParamsSortBy = "last_registered_at"
	Schedule         ListRegisteredJobsParamsSortBy = "schedule"
)

Defines values for ListRegisteredJobsParamsSortBy.

type MiddlewareFunc

type MiddlewareFunc func(c *gin.Context)

type NewJob

type NewJob struct {
	LastExecutionTime *time.Time `json:"last_execution_time,omitempty"`
	LockedAt          *time.Time `json:"locked_at,omitempty"`
	LockedBy          *string    `json:"locked_by,omitempty"`
	Name              string     `json:"name"`
	NextExecutionTime *time.Time `json:"next_execution_time,omitempty"`
	Status            string     `json:"status"`
}

NewJob defines model for NewJob.

type RegisteredJob

type RegisteredJob struct {
	// CreatedAt When the job was first registered
	CreatedAt time.Time `json:"created_at"`

	// Description Human-readable description of the job
	Description *string `json:"description,omitempty"`

	// Id Unique identifier for the job
	Id openapi_types.UUID `json:"id"`

	// InstanceId ID of the instance that registered the job
	InstanceId string `json:"instance_id"`

	// IsEnabled Whether the job is enabled
	IsEnabled bool `json:"is_enabled"`

	// IsLongRunning Whether this is a long-running job that needs heartbeats
	IsLongRunning bool `json:"is_long_running"`

	// JobName Name of the job
	JobName string `json:"job_name"`

	// LastRegisteredAt When the job was last registered
	LastRegisteredAt time.Time `json:"last_registered_at"`

	// Schedule Cron schedule expression
	Schedule string `json:"schedule"`

	// TenantId Tenant ID the job belongs to
	TenantId string `json:"tenant_id"`

	// UpdatedAt When the job was last updated
	UpdatedAt time.Time `json:"updated_at"`
}

RegisteredJob defines model for RegisteredJob.

type ServerInterface

type ServerInterface interface {

	// (GET /api/v1/cron/job-audit-logs)
	ListJobAuditLogs(c *gin.Context, params ListJobAuditLogsParams)

	// (DELETE /api/v1/cron/job-audit-logs/{id})
	DeleteJobAuditLog(c *gin.Context, id openapi_types.UUID)

	// (GET /api/v1/cron/job-audit-logs/{id})
	GetJobAuditLogByID(c *gin.Context, id openapi_types.UUID)

	// (GET /api/v1/cron/jobs)
	ListJobs(c *gin.Context, params ListJobsParams)

	// (DELETE /api/v1/cron/jobs/{id})
	DeleteJob(c *gin.Context, id openapi_types.UUID)

	// (GET /api/v1/cron/jobs/{id})
	GetJobByID(c *gin.Context, id openapi_types.UUID, params GetJobByIDParams)

	// (GET /api/v1/cron/registered-jobs)
	ListRegisteredJobs(c *gin.Context, params ListRegisteredJobsParams)

	// (GET /api/v1/cron/registered-jobs/{id})
	GetRegisteredJob(c *gin.Context, id openapi_types.UUID)

	// (PATCH /api/v1/cron/registered-jobs/{id})
	UpdateRegisteredJob(c *gin.Context, id openapi_types.UUID)

	// (GET /api/v1/cron/registered-jobs/{id}/audit-logs)
	GetJobAuditLogs(c *gin.Context, id openapi_types.UUID, params GetJobAuditLogsParams)

	// (POST /api/v1/cron/seed/reference)
	SeedReferenceData(c *gin.Context)

	// (POST /api/v1/cron/seed/sample)
	SeedSampleData(c *gin.Context)
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandler       func(*gin.Context, error, int)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) DeleteJob

func (siw *ServerInterfaceWrapper) DeleteJob(c *gin.Context)

DeleteJob operation middleware

func (*ServerInterfaceWrapper) DeleteJobAuditLog

func (siw *ServerInterfaceWrapper) DeleteJobAuditLog(c *gin.Context)

DeleteJobAuditLog operation middleware

func (*ServerInterfaceWrapper) GetJobAuditLogByID

func (siw *ServerInterfaceWrapper) GetJobAuditLogByID(c *gin.Context)

GetJobAuditLogByID operation middleware

func (*ServerInterfaceWrapper) GetJobAuditLogs

func (siw *ServerInterfaceWrapper) GetJobAuditLogs(c *gin.Context)

GetJobAuditLogs operation middleware

func (*ServerInterfaceWrapper) GetJobByID

func (siw *ServerInterfaceWrapper) GetJobByID(c *gin.Context)

GetJobByID operation middleware

func (*ServerInterfaceWrapper) GetRegisteredJob

func (siw *ServerInterfaceWrapper) GetRegisteredJob(c *gin.Context)

GetRegisteredJob operation middleware

func (*ServerInterfaceWrapper) ListJobAuditLogs

func (siw *ServerInterfaceWrapper) ListJobAuditLogs(c *gin.Context)

ListJobAuditLogs operation middleware

func (*ServerInterfaceWrapper) ListJobs

func (siw *ServerInterfaceWrapper) ListJobs(c *gin.Context)

ListJobs operation middleware

func (*ServerInterfaceWrapper) ListRegisteredJobs

func (siw *ServerInterfaceWrapper) ListRegisteredJobs(c *gin.Context)

ListRegisteredJobs operation middleware

func (*ServerInterfaceWrapper) SeedReferenceData

func (siw *ServerInterfaceWrapper) SeedReferenceData(c *gin.Context)

SeedReferenceData operation middleware

func (*ServerInterfaceWrapper) SeedSampleData

func (siw *ServerInterfaceWrapper) SeedSampleData(c *gin.Context)

SeedSampleData operation middleware

func (*ServerInterfaceWrapper) UpdateRegisteredJob

func (siw *ServerInterfaceWrapper) UpdateRegisteredJob(c *gin.Context)

UpdateRegisteredJob operation middleware

type UpdateRegisteredJobJSONBody

type UpdateRegisteredJobJSONBody struct {
	// IsEnabled Whether the job is enabled
	IsEnabled *bool `json:"is_enabled,omitempty"`
}

UpdateRegisteredJobJSONBody defines parameters for UpdateRegisteredJob.

type UpdateRegisteredJobJSONRequestBody

type UpdateRegisteredJobJSONRequestBody UpdateRegisteredJobJSONBody

UpdateRegisteredJobJSONRequestBody defines body for UpdateRegisteredJob for application/json ContentType.

Jump to

Keyboard shortcuts

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