{"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 hostname 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 GetNodeHostname200JSONResponse HostnameCollectionResponse\n```\n\n```go\nfunc (response GetNodeHostname200JSONResponse) VisitGetNodeHostnameResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeHostname400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeHostname400JSONResponse) VisitGetNodeHostnameResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeHostname401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeHostname401JSONResponse) VisitGetNodeHostnameResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeHostname403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeHostname403JSONResponse) VisitGetNodeHostnameResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeHostname500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeHostname500JSONResponse) VisitGetNodeHostnameResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeHostnameRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n}\n```\n\n```go\ntype GetNodeHostnameResponseObject interface {\n\tVisitGetNodeHostnameResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype Hostname = string\n```\nHostname defines model for Hostname.\n\n```go\ntype HostnameCollectionResponse struct {\n\t// JobId The job ID used to process this request.\n\tJobId   *openapi_types.UUID `json:\"job_id,omitempty\"`\n\tResults []HostnameResponse  `json:\"results\"`\n}\n```\nHostnameCollectionResponse defines model for HostnameCollectionResponse.\n\n```go\ntype HostnameResponse 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 system's hostname.\n\tHostname string `json:\"hostname\"`\n\n\t// Labels Key-value labels configured on the agent.\n\tLabels *map[string]string `json:\"labels,omitempty\"`\n\n\t// Status The status of the operation for this host.\n\tStatus HostnameResponseStatus `json:\"status\"`\n}\n```\nHostnameResponse The hostname of the system.\n\n```go\ntype HostnameResponseStatus string\n```\nHostnameResponseStatus The status of the operation for this host.\n\n```go\nconst (\n\tHostnameResponseStatusFailed  HostnameResponseStatus = \"failed\"\n\tHostnameResponseStatusOk      HostnameResponseStatus = \"ok\"\n\tHostnameResponseStatusSkipped HostnameResponseStatus = \"skipped\"\n\tHostnameResponseStatusTimeout HostnameResponseStatus = \"timeout\"\n)\n```\nDefines values for HostnameResponseStatus.\n\n```go\nfunc (e HostnameResponseStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the HostnameResponseStatus enum.\n\n```go\ntype HostnameUpdateCollectionResponse struct {\n\t// JobId The job ID used to process this request.\n\tJobId   *openapi_types.UUID        `json:\"job_id,omitempty\"`\n\tResults []HostnameUpdateResultItem `json:\"results\"`\n}\n```\nHostnameUpdateCollectionResponse defines model for HostnameUpdateCollectionResponse.\n\n```go\ntype HostnameUpdateRequest struct {\n\t// Hostname The new hostname to set.\n\tHostname string `json:\"hostname\" validate:\"required,min=1,max=253\"`\n}\n```\nHostnameUpdateRequest defines model for HostnameUpdateRequest.\n\n```go\ntype HostnameUpdateResultItem struct {\n\t// Changed Whether the hostname was actually modified.\n\tChanged *bool   `json:\"changed,omitempty\"`\n\tError   *string `json:\"error,omitempty\"`\n\n\t// Hostname The hostname of the agent.\n\tHostname string                         `json:\"hostname\"`\n\tStatus   HostnameUpdateResultItemStatus `json:\"status\"`\n}\n```\nHostnameUpdateResultItem defines model for HostnameUpdateResultItem.\n\n```go\ntype HostnameUpdateResultItemStatus string\n```\nHostnameUpdateResultItemStatus defines model for HostnameUpdateResultItem.Status.\n\n```go\nconst (\n\tHostnameUpdateResultItemStatusFailed  HostnameUpdateResultItemStatus = \"failed\"\n\tHostnameUpdateResultItemStatusOk      HostnameUpdateResultItemStatus = \"ok\"\n\tHostnameUpdateResultItemStatusSkipped HostnameUpdateResultItemStatus = \"skipped\"\n\tHostnameUpdateResultItemStatusTimeout HostnameUpdateResultItemStatus = \"timeout\"\n)\n```\nDefines values for HostnameUpdateResultItemStatus.\n\n```go\nfunc (e HostnameUpdateResultItemStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the HostnameUpdateResultItemStatus enum.\n\n```go\ntype PutNodeHostname202JSONResponse HostnameUpdateCollectionResponse\n```\n\n```go\nfunc (response PutNodeHostname202JSONResponse) VisitPutNodeHostnameResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutNodeHostname400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PutNodeHostname400JSONResponse) VisitPutNodeHostnameResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutNodeHostname401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PutNodeHostname401JSONResponse) VisitPutNodeHostnameResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutNodeHostname403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PutNodeHostname403JSONResponse) VisitPutNodeHostnameResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutNodeHostname500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PutNodeHostname500JSONResponse) VisitPutNodeHostnameResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutNodeHostnameJSONRequestBody = HostnameUpdateRequest\n```\nPutNodeHostnameJSONRequestBody defines body for PutNodeHostname for application/json ContentType.\n\n```go\ntype PutNodeHostnameRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n\tBody     *PutNodeHostnameJSONRequestBody\n}\n```\n\n```go\ntype PutNodeHostnameResponseObject interface {\n\tVisitPutNodeHostnameResponse(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// Retrieve node hostname\n\t// (GET /api/node/{hostname}/hostname)\n\tGetNodeHostname(ctx *echo.Context, hostname Hostname) error\n\t// Update node hostname\n\t// (PUT /api/node/{hostname}/hostname)\n\tPutNodeHostname(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) GetNodeHostname(ctx *echo.Context) error\n```\nGetNodeHostname converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) PutNodeHostname(ctx *echo.Context) error\n```\nPutNodeHostname 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// Retrieve node hostname\n\t// (GET /api/node/{hostname}/hostname)\n\tGetNodeHostname(ctx context.Context, request GetNodeHostnameRequestObject) (GetNodeHostnameResponseObject, error)\n\t// Update node hostname\n\t// (PUT /api/node/{hostname}/hostname)\n\tPutNodeHostname(ctx context.Context, request PutNodeHostnameRequestObject) (PutNodeHostnameResponseObject, error)\n}\n```\nStrictServerInterface represents all server handlers.\n\n","path":"github.com/osapi-io/osapi/internal/controller/api/node/hostname/gen","name":"gen","synopsis":"Package gen contains generated code for the hostname API.","isRedistributable":true}
