{"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 log 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 GetNodeLog200JSONResponse LogCollectionResponse\n```\n\n```go\nfunc (response GetNodeLog200JSONResponse) VisitGetNodeLogResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeLog400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeLog400JSONResponse) VisitGetNodeLogResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeLog401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeLog401JSONResponse) VisitGetNodeLogResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeLog403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeLog403JSONResponse) VisitGetNodeLogResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeLog500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeLog500JSONResponse) VisitGetNodeLogResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeLogParams struct {\n\t// Lines Maximum number of log lines to return.\n\tLines *int `form:\"lines,omitempty\" json:\"lines,omitempty\" validate:\"omitempty,min=1,max=10000\"`\n\n\t// Since Return log entries since this time. Accepts systemd time specifications (e.g., \"1h\", \"2026-01-01 00:00:00\").\n\tSince *string `form:\"since,omitempty\" json:\"since,omitempty\" validate:\"omitempty\"`\n\n\t// Priority Filter by log priority level (e.g., \"err\", \"warning\", \"info\", \"debug\").\n\tPriority *string `form:\"priority,omitempty\" json:\"priority,omitempty\" validate:\"omitempty,oneof=emerg alert crit err warning notice info debug\"`\n}\n```\nGetNodeLogParams defines parameters for GetNodeLog.\n\n```go\ntype GetNodeLogRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n\tParams   GetNodeLogParams\n}\n```\n\n```go\ntype GetNodeLogResponseObject interface {\n\tVisitGetNodeLogResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetNodeLogSource200JSONResponse LogSourceCollectionResponse\n```\n\n```go\nfunc (response GetNodeLogSource200JSONResponse) VisitGetNodeLogSourceResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeLogSource400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeLogSource400JSONResponse) VisitGetNodeLogSourceResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeLogSource401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeLogSource401JSONResponse) VisitGetNodeLogSourceResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeLogSource403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeLogSource403JSONResponse) VisitGetNodeLogSourceResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeLogSource500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeLogSource500JSONResponse) VisitGetNodeLogSourceResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeLogSourceRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n}\n```\n\n```go\ntype GetNodeLogSourceResponseObject interface {\n\tVisitGetNodeLogSourceResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetNodeLogUnit200JSONResponse LogCollectionResponse\n```\n\n```go\nfunc (response GetNodeLogUnit200JSONResponse) VisitGetNodeLogUnitResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeLogUnit400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeLogUnit400JSONResponse) VisitGetNodeLogUnitResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeLogUnit401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeLogUnit401JSONResponse) VisitGetNodeLogUnitResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeLogUnit403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeLogUnit403JSONResponse) VisitGetNodeLogUnitResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeLogUnit500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeLogUnit500JSONResponse) VisitGetNodeLogUnitResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeLogUnitParams struct {\n\t// Lines Maximum number of log lines to return.\n\tLines *int `form:\"lines,omitempty\" json:\"lines,omitempty\" validate:\"omitempty,min=1,max=10000\"`\n\n\t// Since Return log entries since this time. Accepts systemd time specifications (e.g., \"1h\", \"2026-01-01 00:00:00\").\n\tSince *string `form:\"since,omitempty\" json:\"since,omitempty\" validate:\"omitempty\"`\n\n\t// Priority Filter by log priority level (e.g., \"err\", \"warning\", \"info\", \"debug\").\n\tPriority *string `form:\"priority,omitempty\" json:\"priority,omitempty\" validate:\"omitempty,oneof=emerg alert crit err warning notice info debug\"`\n}\n```\nGetNodeLogUnitParams defines parameters for GetNodeLogUnit.\n\n```go\ntype GetNodeLogUnitRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n\tName     UnitName `json:\"name\" validate:\"required,min=1\"`\n\tParams   GetNodeLogUnitParams\n}\n```\n\n```go\ntype GetNodeLogUnitResponseObject interface {\n\tVisitGetNodeLogUnitResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype Hostname = string\n```\nHostname defines model for Hostname.\n\n```go\ntype LogCollectionResponse struct {\n\t// JobId The job ID used to process this request.\n\tJobId   *openapi_types.UUID `json:\"job_id,omitempty\"`\n\tResults []LogResultEntry    `json:\"results\"`\n}\n```\nLogCollectionResponse defines model for LogCollectionResponse.\n\n```go\ntype LogEntryInfo struct {\n\t// Hostname Hostname of the system that produced this entry.\n\tHostname *string `json:\"hostname,omitempty\"`\n\n\t// Message Log message text.\n\tMessage *string `json:\"message,omitempty\"`\n\n\t// Pid Process identifier that produced this entry.\n\tPid *int `json:\"pid,omitempty\"`\n\n\t// Priority Log priority level.\n\tPriority *string `json:\"priority,omitempty\"`\n\n\t// Timestamp Log entry timestamp.\n\tTimestamp *string `json:\"timestamp,omitempty\"`\n\n\t// Unit Systemd unit that produced this entry.\n\tUnit *string `json:\"unit,omitempty\"`\n}\n```\nLogEntryInfo A single log entry from the system journal.\n\n```go\ntype LogResultEntry struct {\n\t// Entries Log entries from this agent.\n\tEntries *[]LogEntryInfo `json:\"entries,omitempty\"`\n\n\t// Error Error message if the agent failed.\n\tError *string `json:\"error,omitempty\"`\n\n\t// Hostname The hostname of the agent.\n\tHostname string `json:\"hostname\"`\n\n\t// Status The status of the operation for this host.\n\tStatus LogResultEntryStatus `json:\"status\"`\n}\n```\nLogResultEntry Log result for a single agent.\n\n```go\ntype LogResultEntryStatus string\n```\nLogResultEntryStatus The status of the operation for this host.\n\n```go\nconst (\n\tLogResultEntryStatusFailed  LogResultEntryStatus = \"failed\"\n\tLogResultEntryStatusOk      LogResultEntryStatus = \"ok\"\n\tLogResultEntryStatusSkipped LogResultEntryStatus = \"skipped\"\n\tLogResultEntryStatusTimeout LogResultEntryStatus = \"timeout\"\n)\n```\nDefines values for LogResultEntryStatus.\n\n```go\nfunc (e LogResultEntryStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the LogResultEntryStatus enum.\n\n```go\ntype LogSourceCollectionResponse struct {\n\t// JobId The job ID used to process this request.\n\tJobId   *openapi_types.UUID `json:\"job_id,omitempty\"`\n\tResults []LogSourceEntry    `json:\"results\"`\n}\n```\nLogSourceCollectionResponse defines model for LogSourceCollectionResponse.\n\n```go\ntype LogSourceEntry struct {\n\t// Error Error message if the agent failed.\n\tError *string `json:\"error,omitempty\"`\n\n\t// Hostname The hostname of the agent.\n\tHostname string `json:\"hostname\"`\n\n\t// Sources Unique syslog identifiers on this agent.\n\tSources *[]string `json:\"sources,omitempty\"`\n\n\t// Status The status of the operation for this host.\n\tStatus LogSourceEntryStatus `json:\"status\"`\n}\n```\nLogSourceEntry Log source result for a single agent.\n\n```go\ntype LogSourceEntryStatus string\n```\nLogSourceEntryStatus The status of the operation for this host.\n\n```go\nconst (\n\tLogSourceEntryStatusFailed  LogSourceEntryStatus = \"failed\"\n\tLogSourceEntryStatusOk      LogSourceEntryStatus = \"ok\"\n\tLogSourceEntryStatusSkipped LogSourceEntryStatus = \"skipped\"\n\tLogSourceEntryStatusTimeout LogSourceEntryStatus = \"timeout\"\n)\n```\nDefines values for LogSourceEntryStatus.\n\n```go\nfunc (e LogSourceEntryStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the LogSourceEntryStatus enum.\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 log entries\n\t// (GET /api/node/{hostname}/log)\n\tGetNodeLog(ctx *echo.Context, hostname Hostname, params GetNodeLogParams) error\n\t// List log sources\n\t// (GET /api/node/{hostname}/log/source)\n\tGetNodeLogSource(ctx *echo.Context, hostname Hostname) error\n\t// Get log entries for a systemd unit\n\t// (GET /api/node/{hostname}/log/unit/{name})\n\tGetNodeLogUnit(ctx *echo.Context, hostname Hostname, name UnitName, params GetNodeLogUnitParams) 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) GetNodeLog(ctx *echo.Context) error\n```\nGetNodeLog converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) GetNodeLogSource(ctx *echo.Context) error\n```\nGetNodeLogSource converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) GetNodeLogUnit(ctx *echo.Context) error\n```\nGetNodeLogUnit 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 log entries\n\t// (GET /api/node/{hostname}/log)\n\tGetNodeLog(ctx context.Context, request GetNodeLogRequestObject) (GetNodeLogResponseObject, error)\n\t// List log sources\n\t// (GET /api/node/{hostname}/log/source)\n\tGetNodeLogSource(ctx context.Context, request GetNodeLogSourceRequestObject) (GetNodeLogSourceResponseObject, error)\n\t// Get log entries for a systemd unit\n\t// (GET /api/node/{hostname}/log/unit/{name})\n\tGetNodeLogUnit(ctx context.Context, request GetNodeLogUnitRequestObject) (GetNodeLogUnitResponseObject, error)\n}\n```\nStrictServerInterface represents all server handlers.\n\n```go\ntype UnitName = string\n```\nUnitName defines model for UnitName.\n\n","path":"github.com/osapi-io/osapi/internal/controller/api/node/log/gen","name":"gen","synopsis":"Package gen contains generated code for the log API.","isRedistributable":true}
