{"modulePath":"github.com/osapi-io/osapi","version":"v0.2.0","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package gen\n\nPackage gen contains generated code for the NTP API.\n\nPackage gen provides primitives to interact with the openapi HTTP API.\n\nCode generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.1 DO NOT EDIT.\n\n## Constants\n\n```go\nconst (\n\tBearerAuthScopes bearerAuthContextKey = \"BearerAuth.Scopes\"\n)\n```\n\n## Functions\n\n```go\nfunc RegisterHandlers(router EchoRouter, si ServerInterface)\n```\nRegisterHandlers adds each server route to the EchoRouter.\n\n```go\nfunc RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)\n```\nRegisterHandlersWithBaseURL registers handlers and prepends BaseURL to the paths so the API can be served under a prefix.\n\n```go\nfunc RegisterHandlersWithOptions(router EchoRouter, si ServerInterface, options RegisterHandlersOptions)\n```\nRegisterHandlersWithOptions registers handlers using the supplied options, including any per-operation middleware.\n\n## Types\n\n```go\ntype DeleteNodeNtp200JSONResponse NtpDeleteResponse\n```\n\n```go\nfunc (response DeleteNodeNtp200JSONResponse) VisitDeleteNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype DeleteNodeNtp400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response DeleteNodeNtp400JSONResponse) VisitDeleteNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype DeleteNodeNtp401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response DeleteNodeNtp401JSONResponse) VisitDeleteNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype DeleteNodeNtp403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response DeleteNodeNtp403JSONResponse) VisitDeleteNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype DeleteNodeNtp404JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response DeleteNodeNtp404JSONResponse) VisitDeleteNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype DeleteNodeNtp500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response DeleteNodeNtp500JSONResponse) VisitDeleteNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype DeleteNodeNtpRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n}\n```\n\n```go\ntype DeleteNodeNtpResponseObject interface {\n\tVisitDeleteNodeNtpResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype EchoRouter interface {\n\tCONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo\n\tDELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo\n\tGET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo\n\tHEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo\n\tOPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo\n\tPATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo\n\tPOST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo\n\tPUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo\n\tTRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) echo.RouteInfo\n}\n```\nThis 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\n\n```go\ntype ErrorResponse = externalRef0.ErrorResponse\n```\nErrorResponse defines model for ErrorResponse.\n\n```go\ntype GetNodeNtp200JSONResponse NtpCollectionResponse\n```\n\n```go\nfunc (response GetNodeNtp200JSONResponse) VisitGetNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeNtp400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeNtp400JSONResponse) VisitGetNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeNtp401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeNtp401JSONResponse) VisitGetNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeNtp403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeNtp403JSONResponse) VisitGetNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeNtp500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeNtp500JSONResponse) VisitGetNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeNtpRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n}\n```\n\n```go\ntype GetNodeNtpResponseObject interface {\n\tVisitGetNodeNtpResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype Hostname = string\n```\nHostname defines model for Hostname.\n\n```go\ntype NtpCollectionResponse struct {\n\t// JobId The job ID used to process this request.\n\tJobId   *openapi_types.UUID `json:\"job_id,omitempty\"`\n\tResults []NtpStatusEntry    `json:\"results\"`\n}\n```\nNtpCollectionResponse defines model for NtpCollectionResponse.\n\n```go\ntype NtpCreateRequest struct {\n\t// Servers List of NTP server addresses to configure.\n\tServers []string `json:\"servers\" validate:\"required,min=1\"`\n}\n```\nNtpCreateRequest defines model for NtpCreateRequest.\n\n```go\ntype NtpCreateResponse struct {\n\t// JobId The job ID used to process this request.\n\tJobId   *openapi_types.UUID `json:\"job_id,omitempty\"`\n\tResults []NtpMutationResult `json:\"results\"`\n}\n```\nNtpCreateResponse defines model for NtpCreateResponse.\n\n```go\ntype NtpDeleteResponse struct {\n\t// JobId The job ID used to process this request.\n\tJobId   *openapi_types.UUID `json:\"job_id,omitempty\"`\n\tResults []NtpMutationResult `json:\"results\"`\n}\n```\nNtpDeleteResponse defines model for NtpDeleteResponse.\n\n```go\ntype NtpMutationResult struct {\n\t// Changed Whether the operation modified system state.\n\tChanged *bool `json:\"changed,omitempty\"`\n\n\t// Error Error message if the agent failed.\n\tError *string `json:\"error,omitempty\"`\n\n\t// Hostname Hostname of the agent that processed this operation.\n\tHostname string `json:\"hostname\"`\n\n\t// Status The status of the operation for this host.\n\tStatus NtpMutationResultStatus `json:\"status\"`\n}\n```\nNtpMutationResult Result of an NTP create, update, or delete operation for one host.\n\n```go\ntype NtpMutationResultStatus string\n```\nNtpMutationResultStatus The status of the operation for this host.\n\n```go\nconst (\n\tNtpMutationResultStatusFailed  NtpMutationResultStatus = \"failed\"\n\tNtpMutationResultStatusOk      NtpMutationResultStatus = \"ok\"\n\tNtpMutationResultStatusSkipped NtpMutationResultStatus = \"skipped\"\n\tNtpMutationResultStatusTimeout NtpMutationResultStatus = \"timeout\"\n)\n```\nDefines values for NtpMutationResultStatus.\n\n```go\nfunc (e NtpMutationResultStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the NtpMutationResultStatus enum.\n\n```go\ntype NtpStatusEntry struct {\n\t// CurrentSource The currently selected NTP source.\n\tCurrentSource *string `json:\"current_source,omitempty\"`\n\n\t// Error Error message if the agent failed to retrieve NTP status.\n\tError *string `json:\"error,omitempty\"`\n\n\t// Hostname Hostname of the agent that reported this entry.\n\tHostname string `json:\"hostname\"`\n\n\t// Offset Clock offset from the NTP source.\n\tOffset *string `json:\"offset,omitempty\"`\n\n\t// Servers Configured NTP server addresses.\n\tServers *[]string `json:\"servers,omitempty\"`\n\n\t// Status The status of the operation for this host.\n\tStatus NtpStatusEntryStatus `json:\"status\"`\n\n\t// Stratum NTP stratum level.\n\tStratum *int `json:\"stratum,omitempty\"`\n\n\t// Synchronized Whether the system clock is synchronized.\n\tSynchronized *bool `json:\"synchronized,omitempty\"`\n}\n```\nNtpStatusEntry NTP status for a single host.\n\n```go\ntype NtpStatusEntryStatus string\n```\nNtpStatusEntryStatus The status of the operation for this host.\n\n```go\nconst (\n\tNtpStatusEntryStatusFailed  NtpStatusEntryStatus = \"failed\"\n\tNtpStatusEntryStatusOk      NtpStatusEntryStatus = \"ok\"\n\tNtpStatusEntryStatusSkipped NtpStatusEntryStatus = \"skipped\"\n\tNtpStatusEntryStatusTimeout NtpStatusEntryStatus = \"timeout\"\n)\n```\nDefines values for NtpStatusEntryStatus.\n\n```go\nfunc (e NtpStatusEntryStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the NtpStatusEntryStatus enum.\n\n```go\ntype NtpUpdateRequest struct {\n\t// Servers List of NTP server addresses to configure.\n\tServers []string `json:\"servers\" validate:\"required,min=1\"`\n}\n```\nNtpUpdateRequest defines model for NtpUpdateRequest.\n\n```go\ntype NtpUpdateResponse struct {\n\t// JobId The job ID used to process this request.\n\tJobId   *openapi_types.UUID `json:\"job_id,omitempty\"`\n\tResults []NtpMutationResult `json:\"results\"`\n}\n```\nNtpUpdateResponse defines model for NtpUpdateResponse.\n\n```go\ntype PostNodeNtp200JSONResponse NtpCreateResponse\n```\n\n```go\nfunc (response PostNodeNtp200JSONResponse) VisitPostNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeNtp400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeNtp400JSONResponse) VisitPostNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeNtp401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeNtp401JSONResponse) VisitPostNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeNtp403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeNtp403JSONResponse) VisitPostNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeNtp500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeNtp500JSONResponse) VisitPostNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeNtpJSONRequestBody = NtpCreateRequest\n```\nPostNodeNtpJSONRequestBody defines body for PostNodeNtp for application/json ContentType.\n\n```go\ntype PostNodeNtpRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n\tBody     *PostNodeNtpJSONRequestBody\n}\n```\n\n```go\ntype PostNodeNtpResponseObject interface {\n\tVisitPostNodeNtpResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype PutNodeNtp200JSONResponse NtpUpdateResponse\n```\n\n```go\nfunc (response PutNodeNtp200JSONResponse) VisitPutNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutNodeNtp400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PutNodeNtp400JSONResponse) VisitPutNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutNodeNtp401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PutNodeNtp401JSONResponse) VisitPutNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutNodeNtp403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PutNodeNtp403JSONResponse) VisitPutNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutNodeNtp404JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PutNodeNtp404JSONResponse) VisitPutNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutNodeNtp500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PutNodeNtp500JSONResponse) VisitPutNodeNtpResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutNodeNtpJSONRequestBody = NtpUpdateRequest\n```\nPutNodeNtpJSONRequestBody defines body for PutNodeNtp for application/json ContentType.\n\n```go\ntype PutNodeNtpRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n\tBody     *PutNodeNtpJSONRequestBody\n}\n```\n\n```go\ntype PutNodeNtpResponseObject interface {\n\tVisitPutNodeNtpResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype RegisterHandlersOptions struct {\n\t// BaseURL is prepended to every registered path so the API can be served\n\t// under a prefix.\n\tBaseURL string\n\t// OperationMiddlewares lets the caller attach per-operation middleware at\n\t// registration time. The map key is the OpenAPI `operationId` value as it\n\t// appears in the spec (the raw, un-normalized form). Operations that have\n\t// no entry are registered with no extra middleware. A nil map disables\n\t// per-operation middleware entirely.\n\tOperationMiddlewares map[string][]echo.MiddlewareFunc\n}\n```\nRegisterHandlersOptions configures RegisterHandlersWithOptions.\n\n```go\ntype ServerInterface interface {\n\t// Delete NTP configuration\n\t// (DELETE /api/node/{hostname}/ntp)\n\tDeleteNodeNtp(ctx *echo.Context, hostname Hostname) error\n\t// Get NTP status\n\t// (GET /api/node/{hostname}/ntp)\n\tGetNodeNtp(ctx *echo.Context, hostname Hostname) error\n\t// Create NTP configuration\n\t// (POST /api/node/{hostname}/ntp)\n\tPostNodeNtp(ctx *echo.Context, hostname Hostname) error\n\t// Update NTP configuration\n\t// (PUT /api/node/{hostname}/ntp)\n\tPutNodeNtp(ctx *echo.Context, hostname Hostname) error\n}\n```\nServerInterface represents all server handlers.\n\n```go\nfunc NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface\n```\n\n```go\ntype ServerInterfaceWrapper struct {\n\tHandler ServerInterface\n}\n```\nServerInterfaceWrapper converts echo contexts to parameters.\n\n```go\nfunc (w *ServerInterfaceWrapper) DeleteNodeNtp(ctx *echo.Context) error\n```\nDeleteNodeNtp converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) GetNodeNtp(ctx *echo.Context) error\n```\nGetNodeNtp converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) PostNodeNtp(ctx *echo.Context) error\n```\nPostNodeNtp converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) PutNodeNtp(ctx *echo.Context) error\n```\nPutNodeNtp converts echo context to params.\n\n```go\ntype StrictHandlerFunc func(ctx *echo.Context, request any) (any, error)\n```\n\n```go\ntype StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc\n```\n\n```go\ntype StrictServerInterface interface {\n\t// Delete NTP configuration\n\t// (DELETE /api/node/{hostname}/ntp)\n\tDeleteNodeNtp(ctx context.Context, request DeleteNodeNtpRequestObject) (DeleteNodeNtpResponseObject, error)\n\t// Get NTP status\n\t// (GET /api/node/{hostname}/ntp)\n\tGetNodeNtp(ctx context.Context, request GetNodeNtpRequestObject) (GetNodeNtpResponseObject, error)\n\t// Create NTP configuration\n\t// (POST /api/node/{hostname}/ntp)\n\tPostNodeNtp(ctx context.Context, request PostNodeNtpRequestObject) (PostNodeNtpResponseObject, error)\n\t// Update NTP configuration\n\t// (PUT /api/node/{hostname}/ntp)\n\tPutNodeNtp(ctx context.Context, request PutNodeNtpRequestObject) (PutNodeNtpResponseObject, error)\n}\n```\nStrictServerInterface represents all server handlers.\n\n","path":"github.com/osapi-io/osapi/internal/controller/api/node/ntp/gen","name":"gen","synopsis":"Package gen contains generated code for the NTP API.","isRedistributable":true}
