{"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 process 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 GetNodeProcess200JSONResponse ProcessCollectionResponse\n```\n\n```go\nfunc (response GetNodeProcess200JSONResponse) VisitGetNodeProcessResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeProcess400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeProcess400JSONResponse) VisitGetNodeProcessResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeProcess401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeProcess401JSONResponse) VisitGetNodeProcessResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeProcess403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeProcess403JSONResponse) VisitGetNodeProcessResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeProcess500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeProcess500JSONResponse) VisitGetNodeProcessResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeProcessByPid200JSONResponse ProcessGetResponse\n```\n\n```go\nfunc (response GetNodeProcessByPid200JSONResponse) VisitGetNodeProcessByPidResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeProcessByPid400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeProcessByPid400JSONResponse) VisitGetNodeProcessByPidResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeProcessByPid401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeProcessByPid401JSONResponse) VisitGetNodeProcessByPidResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeProcessByPid403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeProcessByPid403JSONResponse) VisitGetNodeProcessByPidResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeProcessByPid404JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeProcessByPid404JSONResponse) VisitGetNodeProcessByPidResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeProcessByPid500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response GetNodeProcessByPid500JSONResponse) VisitGetNodeProcessByPidResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetNodeProcessByPidRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n\tPid      Pid      `json:\"pid\" validate:\"required,min=1\"`\n}\n```\n\n```go\ntype GetNodeProcessByPidResponseObject interface {\n\tVisitGetNodeProcessByPidResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetNodeProcessRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n}\n```\n\n```go\ntype GetNodeProcessResponseObject interface {\n\tVisitGetNodeProcessResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype Hostname = string\n```\nHostname defines model for Hostname.\n\n```go\ntype Pid = int\n```\nPid defines model for Pid.\n\n```go\ntype PostNodeProcessSignal200JSONResponse ProcessSignalResponse\n```\n\n```go\nfunc (response PostNodeProcessSignal200JSONResponse) VisitPostNodeProcessSignalResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeProcessSignal400JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeProcessSignal400JSONResponse) VisitPostNodeProcessSignalResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeProcessSignal401JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeProcessSignal401JSONResponse) VisitPostNodeProcessSignalResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeProcessSignal403JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeProcessSignal403JSONResponse) VisitPostNodeProcessSignalResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeProcessSignal404JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeProcessSignal404JSONResponse) VisitPostNodeProcessSignalResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeProcessSignal500JSONResponse externalRef0.ErrorResponse\n```\n\n```go\nfunc (response PostNodeProcessSignal500JSONResponse) VisitPostNodeProcessSignalResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PostNodeProcessSignalJSONRequestBody = ProcessSignalRequest\n```\nPostNodeProcessSignalJSONRequestBody defines body for PostNodeProcessSignal for application/json ContentType.\n\n```go\ntype PostNodeProcessSignalRequestObject struct {\n\tHostname Hostname `json:\"hostname\" validate:\"required,min=1,valid_target\"`\n\tPid      Pid      `json:\"pid\" validate:\"required,min=1\"`\n\tBody     *PostNodeProcessSignalJSONRequestBody\n}\n```\n\n```go\ntype PostNodeProcessSignalResponseObject interface {\n\tVisitPostNodeProcessSignalResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype ProcessCollectionResponse struct {\n\t// JobId The job ID used to process this request.\n\tJobId   *openapi_types.UUID `json:\"job_id,omitempty\"`\n\tResults []ProcessEntry      `json:\"results\"`\n}\n```\nProcessCollectionResponse defines model for ProcessCollectionResponse.\n\n```go\ntype ProcessEntry 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// Processes List of processes on this agent.\n\tProcesses *[]ProcessInfo `json:\"processes,omitempty\"`\n\n\t// Status The status of the operation for this host.\n\tStatus ProcessEntryStatus `json:\"status\"`\n}\n```\nProcessEntry Process list result for a single agent.\n\n```go\ntype ProcessEntryStatus string\n```\nProcessEntryStatus The status of the operation for this host.\n\n```go\nconst (\n\tProcessEntryStatusFailed  ProcessEntryStatus = \"failed\"\n\tProcessEntryStatusOk      ProcessEntryStatus = \"ok\"\n\tProcessEntryStatusSkipped ProcessEntryStatus = \"skipped\"\n\tProcessEntryStatusTimeout ProcessEntryStatus = \"timeout\"\n)\n```\nDefines values for ProcessEntryStatus.\n\n```go\nfunc (e ProcessEntryStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the ProcessEntryStatus enum.\n\n```go\ntype ProcessGetEntry 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// Process Information about a running process.\n\tProcess *ProcessInfo `json:\"process,omitempty\"`\n\n\t// Status The status of the operation for this host.\n\tStatus ProcessGetEntryStatus `json:\"status\"`\n}\n```\nProcessGetEntry Process get result for a single agent.\n\n```go\ntype ProcessGetEntryStatus string\n```\nProcessGetEntryStatus The status of the operation for this host.\n\n```go\nconst (\n\tProcessGetEntryStatusFailed  ProcessGetEntryStatus = \"failed\"\n\tProcessGetEntryStatusOk      ProcessGetEntryStatus = \"ok\"\n\tProcessGetEntryStatusSkipped ProcessGetEntryStatus = \"skipped\"\n\tProcessGetEntryStatusTimeout ProcessGetEntryStatus = \"timeout\"\n)\n```\nDefines values for ProcessGetEntryStatus.\n\n```go\nfunc (e ProcessGetEntryStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the ProcessGetEntryStatus enum.\n\n```go\ntype ProcessGetResponse struct {\n\t// JobId The job ID used to process this request.\n\tJobId   *openapi_types.UUID `json:\"job_id,omitempty\"`\n\tResults []ProcessGetEntry   `json:\"results\"`\n}\n```\nProcessGetResponse defines model for ProcessGetResponse.\n\n```go\ntype ProcessInfo struct {\n\t// Command Full command line.\n\tCommand *string `json:\"command,omitempty\"`\n\n\t// CpuPercent CPU usage percentage.\n\tCpuPercent *float64 `json:\"cpu_percent,omitempty\"`\n\n\t// MemPercent Memory usage percentage.\n\tMemPercent *float32 `json:\"mem_percent,omitempty\"`\n\n\t// MemRss Resident set size in bytes.\n\tMemRss *int64 `json:\"mem_rss,omitempty\"`\n\n\t// Name Process name.\n\tName *string `json:\"name,omitempty\"`\n\n\t// Pid Process identifier.\n\tPid *int `json:\"pid,omitempty\"`\n\n\t// StartTime Process start time.\n\tStartTime *string `json:\"start_time,omitempty\"`\n\n\t// State Process state.\n\tState *string `json:\"state,omitempty\"`\n\n\t// User User running the process.\n\tUser *string `json:\"user,omitempty\"`\n}\n```\nProcessInfo Information about a running process.\n\n```go\ntype ProcessSignalRequest struct {\n\t// Signal Signal name to send to the process.\n\tSignal ProcessSignalRequestSignal `json:\"signal\" validate:\"required,oneof=TERM KILL HUP INT USR1 USR2\"`\n}\n```\nProcessSignalRequest defines model for ProcessSignalRequest.\n\n```go\ntype ProcessSignalRequestSignal string\n```\nProcessSignalRequestSignal Signal name to send to the process.\n\n```go\nconst (\n\tHUP  ProcessSignalRequestSignal = \"HUP\"\n\tINT  ProcessSignalRequestSignal = \"INT\"\n\tKILL ProcessSignalRequestSignal = \"KILL\"\n\tTERM ProcessSignalRequestSignal = \"TERM\"\n\tUSR1 ProcessSignalRequestSignal = \"USR1\"\n\tUSR2 ProcessSignalRequestSignal = \"USR2\"\n)\n```\nDefines values for ProcessSignalRequestSignal.\n\n```go\nfunc (e ProcessSignalRequestSignal) Valid() bool\n```\nValid indicates whether the value is a known member of the ProcessSignalRequestSignal enum.\n\n```go\ntype ProcessSignalResponse struct {\n\t// JobId The job ID used to process this request.\n\tJobId   *openapi_types.UUID   `json:\"job_id,omitempty\"`\n\tResults []ProcessSignalResult `json:\"results\"`\n}\n```\nProcessSignalResponse defines model for ProcessSignalResponse.\n\n```go\ntype ProcessSignalResult 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 hostname of the agent.\n\tHostname string `json:\"hostname\"`\n\n\t// Pid Process identifier.\n\tPid *int `json:\"pid,omitempty\"`\n\n\t// Signal Signal that was sent.\n\tSignal *string `json:\"signal,omitempty\"`\n\n\t// Status The status of the operation for this host.\n\tStatus ProcessSignalResultStatus `json:\"status\"`\n}\n```\nProcessSignalResult Result of sending a signal to a process.\n\n```go\ntype ProcessSignalResultStatus string\n```\nProcessSignalResultStatus The status of the operation for this host.\n\n```go\nconst (\n\tFailed  ProcessSignalResultStatus = \"failed\"\n\tOk      ProcessSignalResultStatus = \"ok\"\n\tSkipped ProcessSignalResultStatus = \"skipped\"\n\tTimeout ProcessSignalResultStatus = \"timeout\"\n)\n```\nDefines values for ProcessSignalResultStatus.\n\n```go\nfunc (e ProcessSignalResultStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the ProcessSignalResultStatus 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// List processes\n\t// (GET /api/node/{hostname}/process)\n\tGetNodeProcess(ctx *echo.Context, hostname Hostname) error\n\t// Get process by PID\n\t// (GET /api/node/{hostname}/process/{pid})\n\tGetNodeProcessByPid(ctx *echo.Context, hostname Hostname, pid Pid) error\n\t// Send signal to process\n\t// (POST /api/node/{hostname}/process/{pid}/signal)\n\tPostNodeProcessSignal(ctx *echo.Context, hostname Hostname, pid Pid) 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) GetNodeProcess(ctx *echo.Context) error\n```\nGetNodeProcess converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) GetNodeProcessByPid(ctx *echo.Context) error\n```\nGetNodeProcessByPid converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) PostNodeProcessSignal(ctx *echo.Context) error\n```\nPostNodeProcessSignal 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// List processes\n\t// (GET /api/node/{hostname}/process)\n\tGetNodeProcess(ctx context.Context, request GetNodeProcessRequestObject) (GetNodeProcessResponseObject, error)\n\t// Get process by PID\n\t// (GET /api/node/{hostname}/process/{pid})\n\tGetNodeProcessByPid(ctx context.Context, request GetNodeProcessByPidRequestObject) (GetNodeProcessByPidResponseObject, error)\n\t// Send signal to process\n\t// (POST /api/node/{hostname}/process/{pid}/signal)\n\tPostNodeProcessSignal(ctx context.Context, request PostNodeProcessSignalRequestObject) (PostNodeProcessSignalResponseObject, error)\n}\n```\nStrictServerInterface represents all server handlers.\n\n","path":"github.com/osapi-io/osapi/internal/controller/api/node/process/gen","name":"gen","synopsis":"Package gen contains generated code for the process API.","isRedistributable":true}
