{"modulePath":"github.com/osapi-io/osapi","version":"v0.2.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package gen\n\nPackage gen contains generated code for the Timezone 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 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 GetNodeTimezone200JSONResponse TimezoneCollectionResponse\n```\n\n```go\nfunc (response GetNodeTimezone200JSONResponse) VisitGetNodeTimezoneResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeTimezone400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeTimezone400JSONResponse) VisitGetNodeTimezoneResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeTimezone401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeTimezone401JSONResponse) VisitGetNodeTimezoneResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeTimezone403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeTimezone403JSONResponse) VisitGetNodeTimezoneResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeTimezone500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeTimezone500JSONResponse) VisitGetNodeTimezoneResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeTimezoneRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n}\n```\n\n```go\ntype GetNodeTimezoneResponseObject interface {\n\tVisitGetNodeTimezoneResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype Hostname = string\n```\nHostname defines model for Hostname.\n\n```go\ntype PutNodeTimezone200JSONResponse TimezoneUpdateResponse\n```\n\n```go\nfunc (response PutNodeTimezone200JSONResponse) VisitPutNodeTimezoneResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutNodeTimezone400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PutNodeTimezone400JSONResponse) VisitPutNodeTimezoneResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutNodeTimezone401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PutNodeTimezone401JSONResponse) VisitPutNodeTimezoneResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutNodeTimezone403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PutNodeTimezone403JSONResponse) VisitPutNodeTimezoneResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutNodeTimezone500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PutNodeTimezone500JSONResponse) VisitPutNodeTimezoneResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutNodeTimezoneJSONRequestBody = TimezoneUpdateRequest\n```\nPutNodeTimezoneJSONRequestBody defines body for PutNodeTimezone for application/json ContentType.\n\n```go\ntype PutNodeTimezoneRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n\tBody     *PutNodeTimezoneJSONRequestBody\n}\n```\n\n```go\ntype PutNodeTimezoneResponseObject interface {\n\tVisitPutNodeTimezoneResponse(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// Get system timezone\n\t// (GET /api/node/{hostname}/timezone)\n\tGetNodeTimezone(ctx *echo.Context, hostname Hostname) error\n\t// Update system timezone\n\t// (PUT /api/node/{hostname}/timezone)\n\tPutNodeTimezone(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) GetNodeTimezone(ctx *echo.Context) error\n```\nGetNodeTimezone converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) PutNodeTimezone(ctx *echo.Context) error\n```\nPutNodeTimezone 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// Get system timezone\n\t// (GET /api/node/{hostname}/timezone)\n\tGetNodeTimezone(ctx context.Context, request GetNodeTimezoneRequestObject) (GetNodeTimezoneResponseObject, error)\n\t// Update system timezone\n\t// (PUT /api/node/{hostname}/timezone)\n\tPutNodeTimezone(ctx context.Context, request PutNodeTimezoneRequestObject) (PutNodeTimezoneResponseObject, error)\n}\n```\nStrictServerInterface represents all server handlers.\n\n```go\ntype TimezoneCollectionResponse struct {\n\t// JobId The job ID used to process this request.\n\tJobId   *openapi_types.UUID `json:\"job_id,omitempty\"`\n\tResults []TimezoneEntry     `json:\"results\"`\n}\n```\nTimezoneCollectionResponse defines model for TimezoneCollectionResponse.\n\n```go\ntype TimezoneEntry struct {\n\t// Error Error message if the agent failed.\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// Status The status of the operation for this host.\n\tStatus TimezoneEntryStatus `json:\"status\"`\n\n\t// Timezone Current timezone name.\n\tTimezone *string `json:\"timezone,omitempty\"`\n\n\t// UtcOffset Current UTC offset (e.g., \"-05:00\").\n\tUtcOffset *string `json:\"utc_offset,omitempty\"`\n}\n```\nTimezoneEntry Timezone information for a single host.\n\n```go\ntype TimezoneEntryStatus string\n```\nTimezoneEntryStatus The status of the operation for this host.\n\n```go\nconst (\n\tTimezoneEntryStatusFailed  TimezoneEntryStatus = \"failed\"\n\tTimezoneEntryStatusOk      TimezoneEntryStatus = \"ok\"\n\tTimezoneEntryStatusSkipped TimezoneEntryStatus = \"skipped\"\n\tTimezoneEntryStatusTimeout TimezoneEntryStatus = \"timeout\"\n)\n```\nDefines values for TimezoneEntryStatus.\n\n```go\nfunc (e TimezoneEntryStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the TimezoneEntryStatus enum.\n\n```go\ntype TimezoneMutationResult 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 TimezoneMutationResultStatus `json:\"status\"`\n\n\t// Timezone Timezone that was set.\n\tTimezone *string `json:\"timezone,omitempty\"`\n}\n```\nTimezoneMutationResult Result of a timezone update operation for one host.\n\n```go\ntype TimezoneMutationResultStatus string\n```\nTimezoneMutationResultStatus The status of the operation for this host.\n\n```go\nconst (\n\tTimezoneMutationResultStatusFailed  TimezoneMutationResultStatus = \"failed\"\n\tTimezoneMutationResultStatusOk      TimezoneMutationResultStatus = \"ok\"\n\tTimezoneMutationResultStatusSkipped TimezoneMutationResultStatus = \"skipped\"\n\tTimezoneMutationResultStatusTimeout TimezoneMutationResultStatus = \"timeout\"\n)\n```\nDefines values for TimezoneMutationResultStatus.\n\n```go\nfunc (e TimezoneMutationResultStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the TimezoneMutationResultStatus enum.\n\n```go\ntype TimezoneUpdateRequest struct {\n\t// Timezone IANA timezone name (e.g., \"America/New_York\", \"UTC\").\n\tTimezone string `json:\"timezone\" validate:\"required,min=1\"`\n}\n```\nTimezoneUpdateRequest defines model for TimezoneUpdateRequest.\n\n```go\ntype TimezoneUpdateResponse struct {\n\t// JobId The job ID used to process this request.\n\tJobId   *openapi_types.UUID      `json:\"job_id,omitempty\"`\n\tResults []TimezoneMutationResult `json:\"results\"`\n}\n```\nTimezoneUpdateResponse defines model for TimezoneUpdateResponse.\n\n","path":"github.com/osapi-io/osapi/internal/controller/api/node/timezone/gen","name":"gen","synopsis":"Package gen contains generated code for the Timezone API.","isRedistributable":true}
