Documentation
¶
Overview ¶
Package gen contains generated code for the schedule API.
Package gen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.1 DO NOT EDIT.
Index ¶
- Constants
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- func RegisterHandlersWithOptions(router EchoRouter, si ServerInterface, options RegisterHandlersOptions)
- type DeleteNodeSchedule200JSONResponse
- type DeleteNodeSchedule400JSONResponse
- type DeleteNodeSchedule401JSONResponse
- type DeleteNodeSchedule403JSONResponse
- type DeleteNodeSchedule404JSONResponse
- type DeleteNodeSchedule500JSONResponse
- type DeleteNodeScheduleRequestObject
- type DeleteNodeScheduleResponseObject
- type EchoRouter
- type ErrorResponse
- type GetNodeSchedule200JSONResponse
- type GetNodeSchedule400JSONResponse
- type GetNodeSchedule401JSONResponse
- type GetNodeSchedule403JSONResponse
- type GetNodeSchedule500JSONResponse
- type GetNodeScheduleByName200JSONResponse
- type GetNodeScheduleByName400JSONResponse
- type GetNodeScheduleByName401JSONResponse
- type GetNodeScheduleByName403JSONResponse
- type GetNodeScheduleByName404JSONResponse
- type GetNodeScheduleByName500JSONResponse
- type GetNodeScheduleByNameRequestObject
- type GetNodeScheduleByNameResponseObject
- type GetNodeScheduleRequestObject
- type GetNodeScheduleResponseObject
- type Hostname
- type PostNodeSchedule200JSONResponse
- type PostNodeSchedule400JSONResponse
- type PostNodeSchedule401JSONResponse
- type PostNodeSchedule403JSONResponse
- type PostNodeSchedule500JSONResponse
- type PostNodeScheduleJSONRequestBody
- type PostNodeScheduleRequestObject
- type PostNodeScheduleResponseObject
- type PutNodeSchedule200JSONResponse
- type PutNodeSchedule400JSONResponse
- type PutNodeSchedule401JSONResponse
- type PutNodeSchedule403JSONResponse
- type PutNodeSchedule404JSONResponse
- type PutNodeSchedule500JSONResponse
- type PutNodeScheduleJSONRequestBody
- type PutNodeScheduleRequestObject
- type PutNodeScheduleResponseObject
- type RegisterHandlersOptions
- type ScheduleCollectionResponse
- type ScheduleCreateRequest
- type ScheduleCreateRequestContentType
- type ScheduleCreateRequestInterval
- type ScheduleCreateResponse
- type ScheduleDeleteResponse
- type ScheduleEntry
- type ScheduleEntryInterval
- type ScheduleEntryStatus
- type ScheduleGetResponse
- type ScheduleMutationResult
- type ScheduleMutationResultStatus
- type ScheduleName
- type ScheduleUpdateRequest
- type ScheduleUpdateRequestContentType
- type ScheduleUpdateResponse
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) DeleteNodeSchedule(ctx *echo.Context) error
- func (w *ServerInterfaceWrapper) GetNodeSchedule(ctx *echo.Context) error
- func (w *ServerInterfaceWrapper) GetNodeScheduleByName(ctx *echo.Context) error
- func (w *ServerInterfaceWrapper) PostNodeSchedule(ctx *echo.Context) error
- func (w *ServerInterfaceWrapper) PutNodeSchedule(ctx *echo.Context) error
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
Constants ¶
const (
BearerAuthScopes bearerAuthContextKey = "BearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func RegisterHandlers ¶
func RegisterHandlers(router EchoRouter, si ServerInterface)
RegisterHandlers adds each server route to the EchoRouter.
func RegisterHandlersWithBaseURL ¶
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
RegisterHandlersWithBaseURL registers handlers and prepends BaseURL to the paths so the API can be served under a prefix.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router EchoRouter, si ServerInterface, options RegisterHandlersOptions)
RegisterHandlersWithOptions registers handlers using the supplied options, including any per-operation middleware.
Types ¶
type DeleteNodeSchedule200JSONResponse ¶ added in v0.2.0
type DeleteNodeSchedule200JSONResponse ScheduleDeleteResponse
func (DeleteNodeSchedule200JSONResponse) VisitDeleteNodeScheduleResponse ¶ added in v0.2.0
func (response DeleteNodeSchedule200JSONResponse) VisitDeleteNodeScheduleResponse(w http.ResponseWriter) error
type DeleteNodeSchedule400JSONResponse ¶ added in v0.2.0
type DeleteNodeSchedule400JSONResponse externalRef0.ErrorResponse
func (DeleteNodeSchedule400JSONResponse) VisitDeleteNodeScheduleResponse ¶ added in v0.2.0
func (response DeleteNodeSchedule400JSONResponse) VisitDeleteNodeScheduleResponse(w http.ResponseWriter) error
type DeleteNodeSchedule401JSONResponse ¶ added in v0.2.0
type DeleteNodeSchedule401JSONResponse externalRef0.ErrorResponse
func (DeleteNodeSchedule401JSONResponse) VisitDeleteNodeScheduleResponse ¶ added in v0.2.0
func (response DeleteNodeSchedule401JSONResponse) VisitDeleteNodeScheduleResponse(w http.ResponseWriter) error
type DeleteNodeSchedule403JSONResponse ¶ added in v0.2.0
type DeleteNodeSchedule403JSONResponse externalRef0.ErrorResponse
func (DeleteNodeSchedule403JSONResponse) VisitDeleteNodeScheduleResponse ¶ added in v0.2.0
func (response DeleteNodeSchedule403JSONResponse) VisitDeleteNodeScheduleResponse(w http.ResponseWriter) error
type DeleteNodeSchedule404JSONResponse ¶ added in v0.2.0
type DeleteNodeSchedule404JSONResponse externalRef0.ErrorResponse
func (DeleteNodeSchedule404JSONResponse) VisitDeleteNodeScheduleResponse ¶ added in v0.2.0
func (response DeleteNodeSchedule404JSONResponse) VisitDeleteNodeScheduleResponse(w http.ResponseWriter) error
type DeleteNodeSchedule500JSONResponse ¶ added in v0.2.0
type DeleteNodeSchedule500JSONResponse externalRef0.ErrorResponse
func (DeleteNodeSchedule500JSONResponse) VisitDeleteNodeScheduleResponse ¶ added in v0.2.0
func (response DeleteNodeSchedule500JSONResponse) VisitDeleteNodeScheduleResponse(w http.ResponseWriter) error
type DeleteNodeScheduleRequestObject ¶ added in v0.2.0
type DeleteNodeScheduleRequestObject struct {
Hostname Hostname `json:"hostname" validate:"required,min=1,valid_target"`
Name ScheduleName `json:"name" validate:"required,min=1"`
}
type DeleteNodeScheduleResponseObject ¶ added in v0.2.0
type DeleteNodeScheduleResponseObject interface {
VisitDeleteNodeScheduleResponse(w http.ResponseWriter) error
}
type EchoRouter ¶
type EchoRouter interface {
CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo
DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo
GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo
HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo
OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo
PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo
POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo
PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo
TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo
}
This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration
type ErrorResponse ¶
type ErrorResponse = externalRef0.ErrorResponse
ErrorResponse defines model for ErrorResponse.
type GetNodeSchedule200JSONResponse ¶ added in v0.2.0
type GetNodeSchedule200JSONResponse ScheduleCollectionResponse
func (GetNodeSchedule200JSONResponse) VisitGetNodeScheduleResponse ¶ added in v0.2.0
func (response GetNodeSchedule200JSONResponse) VisitGetNodeScheduleResponse(w http.ResponseWriter) error
type GetNodeSchedule400JSONResponse ¶ added in v0.2.0
type GetNodeSchedule400JSONResponse externalRef0.ErrorResponse
func (GetNodeSchedule400JSONResponse) VisitGetNodeScheduleResponse ¶ added in v0.2.0
func (response GetNodeSchedule400JSONResponse) VisitGetNodeScheduleResponse(w http.ResponseWriter) error
type GetNodeSchedule401JSONResponse ¶ added in v0.2.0
type GetNodeSchedule401JSONResponse externalRef0.ErrorResponse
func (GetNodeSchedule401JSONResponse) VisitGetNodeScheduleResponse ¶ added in v0.2.0
func (response GetNodeSchedule401JSONResponse) VisitGetNodeScheduleResponse(w http.ResponseWriter) error
type GetNodeSchedule403JSONResponse ¶ added in v0.2.0
type GetNodeSchedule403JSONResponse externalRef0.ErrorResponse
func (GetNodeSchedule403JSONResponse) VisitGetNodeScheduleResponse ¶ added in v0.2.0
func (response GetNodeSchedule403JSONResponse) VisitGetNodeScheduleResponse(w http.ResponseWriter) error
type GetNodeSchedule500JSONResponse ¶ added in v0.2.0
type GetNodeSchedule500JSONResponse externalRef0.ErrorResponse
func (GetNodeSchedule500JSONResponse) VisitGetNodeScheduleResponse ¶ added in v0.2.0
func (response GetNodeSchedule500JSONResponse) VisitGetNodeScheduleResponse(w http.ResponseWriter) error
type GetNodeScheduleByName200JSONResponse ¶ added in v0.2.0
type GetNodeScheduleByName200JSONResponse ScheduleGetResponse
func (GetNodeScheduleByName200JSONResponse) VisitGetNodeScheduleByNameResponse ¶ added in v0.2.0
func (response GetNodeScheduleByName200JSONResponse) VisitGetNodeScheduleByNameResponse(w http.ResponseWriter) error
type GetNodeScheduleByName400JSONResponse ¶ added in v0.2.0
type GetNodeScheduleByName400JSONResponse externalRef0.ErrorResponse
func (GetNodeScheduleByName400JSONResponse) VisitGetNodeScheduleByNameResponse ¶ added in v0.2.0
func (response GetNodeScheduleByName400JSONResponse) VisitGetNodeScheduleByNameResponse(w http.ResponseWriter) error
type GetNodeScheduleByName401JSONResponse ¶ added in v0.2.0
type GetNodeScheduleByName401JSONResponse externalRef0.ErrorResponse
func (GetNodeScheduleByName401JSONResponse) VisitGetNodeScheduleByNameResponse ¶ added in v0.2.0
func (response GetNodeScheduleByName401JSONResponse) VisitGetNodeScheduleByNameResponse(w http.ResponseWriter) error
type GetNodeScheduleByName403JSONResponse ¶ added in v0.2.0
type GetNodeScheduleByName403JSONResponse externalRef0.ErrorResponse
func (GetNodeScheduleByName403JSONResponse) VisitGetNodeScheduleByNameResponse ¶ added in v0.2.0
func (response GetNodeScheduleByName403JSONResponse) VisitGetNodeScheduleByNameResponse(w http.ResponseWriter) error
type GetNodeScheduleByName404JSONResponse ¶ added in v0.2.0
type GetNodeScheduleByName404JSONResponse externalRef0.ErrorResponse
func (GetNodeScheduleByName404JSONResponse) VisitGetNodeScheduleByNameResponse ¶ added in v0.2.0
func (response GetNodeScheduleByName404JSONResponse) VisitGetNodeScheduleByNameResponse(w http.ResponseWriter) error
type GetNodeScheduleByName500JSONResponse ¶ added in v0.2.0
type GetNodeScheduleByName500JSONResponse externalRef0.ErrorResponse
func (GetNodeScheduleByName500JSONResponse) VisitGetNodeScheduleByNameResponse ¶ added in v0.2.0
func (response GetNodeScheduleByName500JSONResponse) VisitGetNodeScheduleByNameResponse(w http.ResponseWriter) error
type GetNodeScheduleByNameRequestObject ¶ added in v0.2.0
type GetNodeScheduleByNameRequestObject struct {
Hostname Hostname `json:"hostname" validate:"required,min=1,valid_target"`
Name ScheduleName `json:"name" validate:"required,min=1"`
}
type GetNodeScheduleByNameResponseObject ¶ added in v0.2.0
type GetNodeScheduleByNameResponseObject interface {
VisitGetNodeScheduleByNameResponse(w http.ResponseWriter) error
}
type GetNodeScheduleRequestObject ¶ added in v0.2.0
type GetNodeScheduleRequestObject struct {
Hostname Hostname `json:"hostname" validate:"required,min=1,valid_target"`
}
type GetNodeScheduleResponseObject ¶ added in v0.2.0
type GetNodeScheduleResponseObject interface {
VisitGetNodeScheduleResponse(w http.ResponseWriter) error
}
type PostNodeSchedule200JSONResponse ¶ added in v0.2.0
type PostNodeSchedule200JSONResponse ScheduleCreateResponse
func (PostNodeSchedule200JSONResponse) VisitPostNodeScheduleResponse ¶ added in v0.2.0
func (response PostNodeSchedule200JSONResponse) VisitPostNodeScheduleResponse(w http.ResponseWriter) error
type PostNodeSchedule400JSONResponse ¶ added in v0.2.0
type PostNodeSchedule400JSONResponse externalRef0.ErrorResponse
func (PostNodeSchedule400JSONResponse) VisitPostNodeScheduleResponse ¶ added in v0.2.0
func (response PostNodeSchedule400JSONResponse) VisitPostNodeScheduleResponse(w http.ResponseWriter) error
type PostNodeSchedule401JSONResponse ¶ added in v0.2.0
type PostNodeSchedule401JSONResponse externalRef0.ErrorResponse
func (PostNodeSchedule401JSONResponse) VisitPostNodeScheduleResponse ¶ added in v0.2.0
func (response PostNodeSchedule401JSONResponse) VisitPostNodeScheduleResponse(w http.ResponseWriter) error
type PostNodeSchedule403JSONResponse ¶ added in v0.2.0
type PostNodeSchedule403JSONResponse externalRef0.ErrorResponse
func (PostNodeSchedule403JSONResponse) VisitPostNodeScheduleResponse ¶ added in v0.2.0
func (response PostNodeSchedule403JSONResponse) VisitPostNodeScheduleResponse(w http.ResponseWriter) error
type PostNodeSchedule500JSONResponse ¶ added in v0.2.0
type PostNodeSchedule500JSONResponse externalRef0.ErrorResponse
func (PostNodeSchedule500JSONResponse) VisitPostNodeScheduleResponse ¶ added in v0.2.0
func (response PostNodeSchedule500JSONResponse) VisitPostNodeScheduleResponse(w http.ResponseWriter) error
type PostNodeScheduleJSONRequestBody ¶ added in v0.2.0
type PostNodeScheduleJSONRequestBody = ScheduleCreateRequest
PostNodeScheduleJSONRequestBody defines body for PostNodeSchedule for application/json ContentType.
type PostNodeScheduleRequestObject ¶ added in v0.2.0
type PostNodeScheduleRequestObject struct {
Hostname Hostname `json:"hostname" validate:"required,min=1,valid_target"`
Body *PostNodeScheduleJSONRequestBody
}
type PostNodeScheduleResponseObject ¶ added in v0.2.0
type PostNodeScheduleResponseObject interface {
VisitPostNodeScheduleResponse(w http.ResponseWriter) error
}
type PutNodeSchedule200JSONResponse ¶ added in v0.2.0
type PutNodeSchedule200JSONResponse ScheduleUpdateResponse
func (PutNodeSchedule200JSONResponse) VisitPutNodeScheduleResponse ¶ added in v0.2.0
func (response PutNodeSchedule200JSONResponse) VisitPutNodeScheduleResponse(w http.ResponseWriter) error
type PutNodeSchedule400JSONResponse ¶ added in v0.2.0
type PutNodeSchedule400JSONResponse externalRef0.ErrorResponse
func (PutNodeSchedule400JSONResponse) VisitPutNodeScheduleResponse ¶ added in v0.2.0
func (response PutNodeSchedule400JSONResponse) VisitPutNodeScheduleResponse(w http.ResponseWriter) error
type PutNodeSchedule401JSONResponse ¶ added in v0.2.0
type PutNodeSchedule401JSONResponse externalRef0.ErrorResponse
func (PutNodeSchedule401JSONResponse) VisitPutNodeScheduleResponse ¶ added in v0.2.0
func (response PutNodeSchedule401JSONResponse) VisitPutNodeScheduleResponse(w http.ResponseWriter) error
type PutNodeSchedule403JSONResponse ¶ added in v0.2.0
type PutNodeSchedule403JSONResponse externalRef0.ErrorResponse
func (PutNodeSchedule403JSONResponse) VisitPutNodeScheduleResponse ¶ added in v0.2.0
func (response PutNodeSchedule403JSONResponse) VisitPutNodeScheduleResponse(w http.ResponseWriter) error
type PutNodeSchedule404JSONResponse ¶ added in v0.2.0
type PutNodeSchedule404JSONResponse externalRef0.ErrorResponse
func (PutNodeSchedule404JSONResponse) VisitPutNodeScheduleResponse ¶ added in v0.2.0
func (response PutNodeSchedule404JSONResponse) VisitPutNodeScheduleResponse(w http.ResponseWriter) error
type PutNodeSchedule500JSONResponse ¶ added in v0.2.0
type PutNodeSchedule500JSONResponse externalRef0.ErrorResponse
func (PutNodeSchedule500JSONResponse) VisitPutNodeScheduleResponse ¶ added in v0.2.0
func (response PutNodeSchedule500JSONResponse) VisitPutNodeScheduleResponse(w http.ResponseWriter) error
type PutNodeScheduleJSONRequestBody ¶ added in v0.2.0
type PutNodeScheduleJSONRequestBody = ScheduleUpdateRequest
PutNodeScheduleJSONRequestBody defines body for PutNodeSchedule for application/json ContentType.
type PutNodeScheduleRequestObject ¶ added in v0.2.0
type PutNodeScheduleRequestObject struct {
Hostname Hostname `json:"hostname" validate:"required,min=1,valid_target"`
Name ScheduleName `json:"name" validate:"required,min=1"`
Body *PutNodeScheduleJSONRequestBody
}
type PutNodeScheduleResponseObject ¶ added in v0.2.0
type PutNodeScheduleResponseObject interface {
VisitPutNodeScheduleResponse(w http.ResponseWriter) error
}
type RegisterHandlersOptions ¶
type RegisterHandlersOptions struct {
// BaseURL is prepended to every registered path so the API can be served
// under a prefix.
BaseURL string
// OperationMiddlewares lets the caller attach per-operation middleware at
// registration time. The map key is the OpenAPI `operationId` value as it
// appears in the spec (the raw, un-normalized form). Operations that have
// no entry are registered with no extra middleware. A nil map disables
// per-operation middleware entirely.
OperationMiddlewares map[string][]echo.MiddlewareFunc
}
RegisterHandlersOptions configures RegisterHandlersWithOptions.
type ScheduleCollectionResponse ¶ added in v0.2.0
type ScheduleCollectionResponse struct {
// JobId The job ID used to process this request.
JobId *openapi_types.UUID `json:"job_id,omitempty"`
Results []ScheduleEntry `json:"results"`
}
ScheduleCollectionResponse defines model for ScheduleCollectionResponse.
type ScheduleCreateRequest ¶ added in v0.2.0
type ScheduleCreateRequest struct {
// ContentType Content type: "raw" or "template". When "template", the file content is rendered through Go text/template with agent facts and user-supplied vars.
ContentType *ScheduleCreateRequestContentType `json:"content_type,omitempty" validate:"omitempty,oneof=raw template"`
// Interval Periodic interval (hourly, daily, weekly, monthly). Places the script in /etc/cron.{interval}/. Mutually exclusive with schedule — provide exactly one.
Interval *ScheduleCreateRequestInterval `` /* 129-byte string literal not displayed */
// Name Name for the scheduled entry. Used as the file name under /etc/cron.d/ or /etc/cron.{interval}/.
Name string `json:"name" validate:"required,min=1,max=64"`
// Object Name of the uploaded file in the object store to deploy as the scheduled entry content.
Object string `json:"object" validate:"required,min=1"`
// Schedule Cron schedule expression (e.g., "*/5 * * * *"). Mutually exclusive with interval — provide exactly one.
Schedule *string `json:"schedule,omitempty" validate:"required_without=Interval,excluded_with=Interval,omitempty,cron_schedule"`
// User User to run the command as. Only applies when using schedule (cron.d entries include a user field).
User *string `json:"user,omitempty"`
// Vars Template variables. Only used when content_type is "template".
Vars *map[string]interface{} `json:"vars,omitempty"`
}
ScheduleCreateRequest defines model for ScheduleCreateRequest.
type ScheduleCreateRequestContentType ¶ added in v0.2.0
type ScheduleCreateRequestContentType string
ScheduleCreateRequestContentType Content type: "raw" or "template". When "template", the file content is rendered through Go text/template with agent facts and user-supplied vars.
const ( ScheduleCreateRequestContentTypeRaw ScheduleCreateRequestContentType = "raw" ScheduleCreateRequestContentTypeTemplate ScheduleCreateRequestContentType = "template" )
Defines values for ScheduleCreateRequestContentType.
func (ScheduleCreateRequestContentType) Valid ¶ added in v0.2.0
func (e ScheduleCreateRequestContentType) Valid() bool
Valid indicates whether the value is a known member of the ScheduleCreateRequestContentType enum.
type ScheduleCreateRequestInterval ¶ added in v0.2.0
type ScheduleCreateRequestInterval string
ScheduleCreateRequestInterval Periodic interval (hourly, daily, weekly, monthly). Places the script in /etc/cron.{interval}/. Mutually exclusive with schedule — provide exactly one.
const ( ScheduleCreateRequestIntervalDaily ScheduleCreateRequestInterval = "daily" ScheduleCreateRequestIntervalHourly ScheduleCreateRequestInterval = "hourly" ScheduleCreateRequestIntervalMonthly ScheduleCreateRequestInterval = "monthly" ScheduleCreateRequestIntervalWeekly ScheduleCreateRequestInterval = "weekly" )
Defines values for ScheduleCreateRequestInterval.
func (ScheduleCreateRequestInterval) Valid ¶ added in v0.2.0
func (e ScheduleCreateRequestInterval) Valid() bool
Valid indicates whether the value is a known member of the ScheduleCreateRequestInterval enum.
type ScheduleCreateResponse ¶ added in v0.2.0
type ScheduleCreateResponse struct {
// JobId The job ID used to process this request.
JobId *openapi_types.UUID `json:"job_id,omitempty"`
Results []ScheduleMutationResult `json:"results"`
}
ScheduleCreateResponse defines model for ScheduleCreateResponse.
type ScheduleDeleteResponse ¶ added in v0.2.0
type ScheduleDeleteResponse struct {
// JobId The job ID used to process this request.
JobId *openapi_types.UUID `json:"job_id,omitempty"`
Results []ScheduleMutationResult `json:"results"`
}
ScheduleDeleteResponse defines model for ScheduleDeleteResponse.
type ScheduleEntry ¶ added in v0.2.0
type ScheduleEntry struct {
// Error Error message if the agent failed to retrieve this entry.
Error *string `json:"error,omitempty"`
// Hostname Hostname of the agent that reported this entry.
Hostname string `json:"hostname"`
// Interval Periodic interval (hourly, daily, weekly, monthly). Present for /etc/cron.{interval}/ entries.
Interval *ScheduleEntryInterval `json:"interval,omitempty"`
// Name Scheduled entry name.
Name *string `json:"name,omitempty"`
// Object Object store name for the deployed content.
Object *string `json:"object,omitempty"`
// Schedule Cron schedule expression. Present for /etc/cron.d/ entries.
Schedule *string `json:"schedule,omitempty"`
// Source Where the entry lives: "cron.d", "hourly", "daily", "weekly", or "monthly".
Source *string `json:"source,omitempty"`
// Status The status of the operation for this host.
Status ScheduleEntryStatus `json:"status"`
// User User the scheduled entry runs as.
User *string `json:"user,omitempty"`
}
ScheduleEntry A scheduled entry.
type ScheduleEntryInterval ¶ added in v0.2.0
type ScheduleEntryInterval string
ScheduleEntryInterval Periodic interval (hourly, daily, weekly, monthly). Present for /etc/cron.{interval}/ entries.
const ( ScheduleEntryIntervalDaily ScheduleEntryInterval = "daily" ScheduleEntryIntervalHourly ScheduleEntryInterval = "hourly" ScheduleEntryIntervalMonthly ScheduleEntryInterval = "monthly" ScheduleEntryIntervalWeekly ScheduleEntryInterval = "weekly" )
Defines values for ScheduleEntryInterval.
func (ScheduleEntryInterval) Valid ¶ added in v0.2.0
func (e ScheduleEntryInterval) Valid() bool
Valid indicates whether the value is a known member of the ScheduleEntryInterval enum.
type ScheduleEntryStatus ¶ added in v0.2.0
type ScheduleEntryStatus string
ScheduleEntryStatus The status of the operation for this host.
const ( ScheduleEntryStatusFailed ScheduleEntryStatus = "failed" ScheduleEntryStatusOk ScheduleEntryStatus = "ok" ScheduleEntryStatusSkipped ScheduleEntryStatus = "skipped" ScheduleEntryStatusTimeout ScheduleEntryStatus = "timeout" )
Defines values for ScheduleEntryStatus.
func (ScheduleEntryStatus) Valid ¶ added in v0.2.0
func (e ScheduleEntryStatus) Valid() bool
Valid indicates whether the value is a known member of the ScheduleEntryStatus enum.
type ScheduleGetResponse ¶ added in v0.2.0
type ScheduleGetResponse struct {
// JobId The job ID used to process this request.
JobId *openapi_types.UUID `json:"job_id,omitempty"`
Results []ScheduleEntry `json:"results"`
}
ScheduleGetResponse Collection response for a single scheduled entry get operation.
type ScheduleMutationResult ¶ added in v0.2.0
type ScheduleMutationResult struct {
// Changed Whether the operation modified system state.
Changed *bool `json:"changed,omitempty"`
// Error Error message if the agent failed.
Error *string `json:"error,omitempty"`
// Hostname Hostname of the agent that processed this operation.
Hostname string `json:"hostname"`
// Name Scheduled entry name.
Name *string `json:"name,omitempty"`
// Status The status of the operation for this host.
Status ScheduleMutationResultStatus `json:"status"`
}
ScheduleMutationResult Result of a cron create, update, or delete operation for one host.
type ScheduleMutationResultStatus ¶ added in v0.2.0
type ScheduleMutationResultStatus string
ScheduleMutationResultStatus The status of the operation for this host.
const ( ScheduleMutationResultStatusFailed ScheduleMutationResultStatus = "failed" ScheduleMutationResultStatusOk ScheduleMutationResultStatus = "ok" ScheduleMutationResultStatusSkipped ScheduleMutationResultStatus = "skipped" ScheduleMutationResultStatusTimeout ScheduleMutationResultStatus = "timeout" )
Defines values for ScheduleMutationResultStatus.
func (ScheduleMutationResultStatus) Valid ¶ added in v0.2.0
func (e ScheduleMutationResultStatus) Valid() bool
Valid indicates whether the value is a known member of the ScheduleMutationResultStatus enum.
type ScheduleName ¶ added in v0.2.0
type ScheduleName = string
ScheduleName defines model for ScheduleName.
type ScheduleUpdateRequest ¶ added in v0.2.0
type ScheduleUpdateRequest struct {
// ContentType Content type: "raw" or "template".
ContentType *ScheduleUpdateRequestContentType `json:"content_type,omitempty" validate:"omitempty,oneof=raw template"`
// Object New object to deploy (redeploy with updated content).
Object *string `json:"object,omitempty" validate:"omitempty,min=1"`
// Schedule Cron schedule expression (e.g., "*/5 * * * *").
Schedule *string `json:"schedule,omitempty" validate:"omitempty,cron_schedule"`
// User User to run the command as.
User *string `json:"user,omitempty"`
// Vars Template variables.
Vars *map[string]interface{} `json:"vars,omitempty"`
}
ScheduleUpdateRequest defines model for ScheduleUpdateRequest.
type ScheduleUpdateRequestContentType ¶ added in v0.2.0
type ScheduleUpdateRequestContentType string
ScheduleUpdateRequestContentType Content type: "raw" or "template".
const ( ScheduleUpdateRequestContentTypeRaw ScheduleUpdateRequestContentType = "raw" ScheduleUpdateRequestContentTypeTemplate ScheduleUpdateRequestContentType = "template" )
Defines values for ScheduleUpdateRequestContentType.
func (ScheduleUpdateRequestContentType) Valid ¶ added in v0.2.0
func (e ScheduleUpdateRequestContentType) Valid() bool
Valid indicates whether the value is a known member of the ScheduleUpdateRequestContentType enum.
type ScheduleUpdateResponse ¶ added in v0.2.0
type ScheduleUpdateResponse struct {
// JobId The job ID used to process this request.
JobId *openapi_types.UUID `json:"job_id,omitempty"`
Results []ScheduleMutationResult `json:"results"`
}
ScheduleUpdateResponse defines model for ScheduleUpdateResponse.
type ServerInterface ¶
type ServerInterface interface {
// List all scheduled entries
// (GET /api/node/{hostname}/schedule)
GetNodeSchedule(ctx *echo.Context, hostname Hostname) error
// Create a scheduled entry
// (POST /api/node/{hostname}/schedule)
PostNodeSchedule(ctx *echo.Context, hostname Hostname) error
// Delete a scheduled entry
// (DELETE /api/node/{hostname}/schedule/{name})
DeleteNodeSchedule(ctx *echo.Context, hostname Hostname, name ScheduleName) error
// Get a scheduled entry
// (GET /api/node/{hostname}/schedule/{name})
GetNodeScheduleByName(ctx *echo.Context, hostname Hostname, name ScheduleName) error
// Update a scheduled entry
// (PUT /api/node/{hostname}/schedule/{name})
PutNodeSchedule(ctx *echo.Context, hostname Hostname, name ScheduleName) error
}
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) DeleteNodeSchedule ¶ added in v0.2.0
func (w *ServerInterfaceWrapper) DeleteNodeSchedule(ctx *echo.Context) error
DeleteNodeSchedule converts echo context to params.
func (*ServerInterfaceWrapper) GetNodeSchedule ¶ added in v0.2.0
func (w *ServerInterfaceWrapper) GetNodeSchedule(ctx *echo.Context) error
GetNodeSchedule converts echo context to params.
func (*ServerInterfaceWrapper) GetNodeScheduleByName ¶ added in v0.2.0
func (w *ServerInterfaceWrapper) GetNodeScheduleByName(ctx *echo.Context) error
GetNodeScheduleByName converts echo context to params.
func (*ServerInterfaceWrapper) PostNodeSchedule ¶ added in v0.2.0
func (w *ServerInterfaceWrapper) PostNodeSchedule(ctx *echo.Context) error
PostNodeSchedule converts echo context to params.
func (*ServerInterfaceWrapper) PutNodeSchedule ¶ added in v0.2.0
func (w *ServerInterfaceWrapper) PutNodeSchedule(ctx *echo.Context) error
PutNodeSchedule converts echo context to params.
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// List all scheduled entries
// (GET /api/node/{hostname}/schedule)
GetNodeSchedule(ctx context.Context, request GetNodeScheduleRequestObject) (GetNodeScheduleResponseObject, error)
// Create a scheduled entry
// (POST /api/node/{hostname}/schedule)
PostNodeSchedule(ctx context.Context, request PostNodeScheduleRequestObject) (PostNodeScheduleResponseObject, error)
// Delete a scheduled entry
// (DELETE /api/node/{hostname}/schedule/{name})
DeleteNodeSchedule(ctx context.Context, request DeleteNodeScheduleRequestObject) (DeleteNodeScheduleResponseObject, error)
// Get a scheduled entry
// (GET /api/node/{hostname}/schedule/{name})
GetNodeScheduleByName(ctx context.Context, request GetNodeScheduleByNameRequestObject) (GetNodeScheduleByNameResponseObject, error)
// Update a scheduled entry
// (PUT /api/node/{hostname}/schedule/{name})
PutNodeSchedule(ctx context.Context, request PutNodeScheduleRequestObject) (PutNodeScheduleResponseObject, error)
}
StrictServerInterface represents all server handlers.