{"modulePath":"github.com/osapi-io/osapi","version":"v0.2.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package gen\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\nPackage gen contains generated code for the node file API.\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 FileDeployCollectionResponse struct {\n\t// JobId The job ID used to process this request.\n\tJobId   *openapi_types.UUID `json:\"job_id,omitempty\"`\n\tResults []FileDeployResult  `json:\"results\"`\n}\n```\nFileDeployCollectionResponse defines model for FileDeployCollectionResponse.\n\n```go\ntype FileDeployRequest struct {\n\t// ContentType Content type — \"raw\" or \"template\".\n\tContentType FileDeployRequestContentType `json:\"content_type\" validate:\"required,oneof=raw template\"`\n\n\t// Group File owner group.\n\tGroup *string `json:\"group,omitempty\"`\n\n\t// Mode File permission mode as three or four octal digits (e.g., \"0644\").\n\tMode *string `json:\"mode,omitempty\" validate:\"omitempty,file_mode\"`\n\n\t// ObjectName Name of the file in the Object Store.\n\tObjectName string `json:\"object_name\" validate:\"required,min=1,max=255\"`\n\n\t// Owner File owner user.\n\tOwner *string `json:\"owner,omitempty\"`\n\n\t// Path Destination path on the target filesystem.\n\tPath string `json:\"path\" validate:\"required,min=1\"`\n\n\t// Vars Template variables when content_type is \"template\".\n\tVars *map[string]interface{} `json:\"vars,omitempty\"`\n}\n```\nFileDeployRequest defines model for FileDeployRequest.\n\n```go\ntype FileDeployRequestContentType string\n```\nFileDeployRequestContentType Content type — \"raw\" or \"template\".\n\n```go\nconst (\n\tRaw      FileDeployRequestContentType = \"raw\"\n\tTemplate FileDeployRequestContentType = \"template\"\n)\n```\nDefines values for FileDeployRequestContentType.\n\n```go\nfunc (e FileDeployRequestContentType) Valid() bool\n```\nValid indicates whether the value is a known member of the FileDeployRequestContentType enum.\n\n```go\ntype FileDeployResult struct {\n\t// Changed Whether the file was actually written.\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 The agent that processed the job.\n\tHostname string `json:\"hostname\"`\n\n\t// Status The status of the operation for this host.\n\tStatus FileDeployResultStatus `json:\"status\"`\n}\n```\nFileDeployResult defines model for FileDeployResult.\n\n```go\ntype FileDeployResultStatus string\n```\nFileDeployResultStatus The status of the operation for this host.\n\n```go\nconst (\n\tFileDeployResultStatusFailed  FileDeployResultStatus = \"failed\"\n\tFileDeployResultStatusOk      FileDeployResultStatus = \"ok\"\n\tFileDeployResultStatusSkipped FileDeployResultStatus = \"skipped\"\n\tFileDeployResultStatusTimeout FileDeployResultStatus = \"timeout\"\n)\n```\nDefines values for FileDeployResultStatus.\n\n```go\nfunc (e FileDeployResultStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the FileDeployResultStatus enum.\n\n```go\ntype FileStatusCollectionResponse struct {\n\t// JobId The job ID used to process this request.\n\tJobId   *openapi_types.UUID `json:\"job_id,omitempty\"`\n\tResults []FileStatusResult  `json:\"results\"`\n}\n```\nFileStatusCollectionResponse defines model for FileStatusCollectionResponse.\n\n```go\ntype FileStatusRequest struct {\n\t// Path Filesystem path to check.\n\tPath string `json:\"path\" validate:\"required,min=1\"`\n}\n```\nFileStatusRequest defines model for FileStatusRequest.\n\n```go\ntype FileStatusResult 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 The agent that processed the job.\n\tHostname string `json:\"hostname\"`\n\n\t// Path The filesystem path.\n\tPath *string `json:\"path,omitempty\"`\n\n\t// Sha256 Current SHA-256 of the file on disk.\n\tSha256 *string `json:\"sha256,omitempty\"`\n\n\t// Status File state — \"in-sync\", \"drifted\", or \"missing\".\n\tStatus *string `json:\"status,omitempty\"`\n}\n```\nFileStatusResult defines model for FileStatusResult.\n\n```go\ntype FileUndeployCollectionResponse struct {\n\t// JobId The job ID used to process this request.\n\tJobId   *openapi_types.UUID  `json:\"job_id,omitempty\"`\n\tResults []FileUndeployResult `json:\"results\"`\n}\n```\nFileUndeployCollectionResponse defines model for FileUndeployCollectionResponse.\n\n```go\ntype FileUndeployRequest struct {\n\t// Path Filesystem path to undeploy.\n\tPath string `json:\"path\" validate:\"required,min=1\"`\n}\n```\nFileUndeployRequest defines model for FileUndeployRequest.\n\n```go\ntype FileUndeployResult struct {\n\t// Changed Whether the file was actually removed.\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 The agent that processed the job.\n\tHostname string `json:\"hostname\"`\n\n\t// Status The status of the operation for this host.\n\tStatus FileUndeployResultStatus `json:\"status\"`\n}\n```\nFileUndeployResult defines model for FileUndeployResult.\n\n```go\ntype FileUndeployResultStatus string\n```\nFileUndeployResultStatus The status of the operation for this host.\n\n```go\nconst (\n\tFileUndeployResultStatusFailed  FileUndeployResultStatus = \"failed\"\n\tFileUndeployResultStatusOk      FileUndeployResultStatus = \"ok\"\n\tFileUndeployResultStatusSkipped FileUndeployResultStatus = \"skipped\"\n\tFileUndeployResultStatusTimeout FileUndeployResultStatus = \"timeout\"\n)\n```\nDefines values for FileUndeployResultStatus.\n\n```go\nfunc (e FileUndeployResultStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the FileUndeployResultStatus enum.\n\n```go\ntype Hostname = string\n```\nHostname defines model for Hostname.\n\n```go\ntype PostNodeFileDeploy202JSONResponse FileDeployCollectionResponse\n```\n\n```go\nfunc (response PostNodeFileDeploy202JSONResponse) VisitPostNodeFileDeployResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeFileDeploy400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeFileDeploy400JSONResponse) VisitPostNodeFileDeployResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeFileDeploy401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeFileDeploy401JSONResponse) VisitPostNodeFileDeployResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeFileDeploy403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeFileDeploy403JSONResponse) VisitPostNodeFileDeployResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeFileDeploy500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeFileDeploy500JSONResponse) VisitPostNodeFileDeployResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeFileDeployJSONRequestBody = FileDeployRequest\n```\nPostNodeFileDeployJSONRequestBody defines body for PostNodeFileDeploy for application/json ContentType.\n\n```go\ntype PostNodeFileDeployRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n\tBody     *PostNodeFileDeployJSONRequestBody\n}\n```\n\n```go\ntype PostNodeFileDeployResponseObject interface {\n\tVisitPostNodeFileDeployResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype PostNodeFileStatus200JSONResponse FileStatusCollectionResponse\n```\n\n```go\nfunc (response PostNodeFileStatus200JSONResponse) VisitPostNodeFileStatusResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeFileStatus400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeFileStatus400JSONResponse) VisitPostNodeFileStatusResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeFileStatus401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeFileStatus401JSONResponse) VisitPostNodeFileStatusResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeFileStatus403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeFileStatus403JSONResponse) VisitPostNodeFileStatusResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeFileStatus500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeFileStatus500JSONResponse) VisitPostNodeFileStatusResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeFileStatusJSONRequestBody = FileStatusRequest\n```\nPostNodeFileStatusJSONRequestBody defines body for PostNodeFileStatus for application/json ContentType.\n\n```go\ntype PostNodeFileStatusRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n\tBody     *PostNodeFileStatusJSONRequestBody\n}\n```\n\n```go\ntype PostNodeFileStatusResponseObject interface {\n\tVisitPostNodeFileStatusResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype PostNodeFileUndeploy202JSONResponse FileUndeployCollectionResponse\n```\n\n```go\nfunc (response PostNodeFileUndeploy202JSONResponse) VisitPostNodeFileUndeployResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeFileUndeploy400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeFileUndeploy400JSONResponse) VisitPostNodeFileUndeployResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeFileUndeploy401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeFileUndeploy401JSONResponse) VisitPostNodeFileUndeployResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeFileUndeploy403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeFileUndeploy403JSONResponse) VisitPostNodeFileUndeployResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeFileUndeploy500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeFileUndeploy500JSONResponse) VisitPostNodeFileUndeployResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeFileUndeployJSONRequestBody = FileUndeployRequest\n```\nPostNodeFileUndeployJSONRequestBody defines body for PostNodeFileUndeploy for application/json ContentType.\n\n```go\ntype PostNodeFileUndeployRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n\tBody     *PostNodeFileUndeployJSONRequestBody\n}\n```\n\n```go\ntype PostNodeFileUndeployResponseObject interface {\n\tVisitPostNodeFileUndeployResponse(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// Deploy a file from Object Store to the host\n\t// (POST /api/node/{hostname}/file/deploy)\n\tPostNodeFileDeploy(ctx *echo.Context, hostname Hostname) error\n\t// Check deployment status of a file on the host\n\t// (POST /api/node/{hostname}/file/status)\n\tPostNodeFileStatus(ctx *echo.Context, hostname Hostname) error\n\t// Remove a deployed file from the host filesystem\n\t// (POST /api/node/{hostname}/file/undeploy)\n\tPostNodeFileUndeploy(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) PostNodeFileDeploy(ctx *echo.Context) error\n```\nPostNodeFileDeploy converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) PostNodeFileStatus(ctx *echo.Context) error\n```\nPostNodeFileStatus converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) PostNodeFileUndeploy(ctx *echo.Context) error\n```\nPostNodeFileUndeploy 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// Deploy a file from Object Store to the host\n\t// (POST /api/node/{hostname}/file/deploy)\n\tPostNodeFileDeploy(ctx context.Context, request PostNodeFileDeployRequestObject) (PostNodeFileDeployResponseObject, error)\n\t// Check deployment status of a file on the host\n\t// (POST /api/node/{hostname}/file/status)\n\tPostNodeFileStatus(ctx context.Context, request PostNodeFileStatusRequestObject) (PostNodeFileStatusResponseObject, error)\n\t// Remove a deployed file from the host filesystem\n\t// (POST /api/node/{hostname}/file/undeploy)\n\tPostNodeFileUndeploy(ctx context.Context, request PostNodeFileUndeployRequestObject) (PostNodeFileUndeployResponseObject, error)\n}\n```\nStrictServerInterface represents all server handlers.\n\n","path":"github.com/osapi-io/osapi/internal/controller/api/node/file/gen","name":"gen","synopsis":"Package gen provides primitives to interact with the openapi HTTP API.","isRedistributable":true}
