Documentation
¶
Overview ¶
Package logsadapterclientgen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
Index ¶
- func NewCreateAlertRuleRequest(server string, body CreateAlertRuleJSONRequestBody) (*http.Request, error)
- func NewCreateAlertRuleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteAlertRuleRequest(server string, ruleName string) (*http.Request, error)
- func NewGetAlertRuleRequest(server string, ruleName string) (*http.Request, error)
- func NewHandleAlertWebhookRequest(server string, body HandleAlertWebhookJSONRequestBody) (*http.Request, error)
- func NewHandleAlertWebhookRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewHealthRequest(server string) (*http.Request, error)
- func NewQueryLogsRequest(server string, body QueryLogsJSONRequestBody) (*http.Request, error)
- func NewQueryLogsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateAlertRuleRequest(server string, ruleName string, body UpdateAlertRuleJSONRequestBody) (*http.Request, error)
- func NewUpdateAlertRuleRequestWithBody(server string, ruleName string, contentType string, body io.Reader) (*http.Request, error)
- type AlertRuleRequest
- type AlertRuleRequestConditionOperator
- type AlertRuleResponse
- type AlertRuleResponseConditionOperator
- type AlertRuleResponseSourceMetric
- type AlertWebhookResponse
- type AlertWebhookResponseStatus
- type AlertingRuleSyncResponse
- type AlertingRuleSyncResponseAction
- type AlertingRuleSyncResponseStatus
- type Client
- func (c *Client) CreateAlertRule(ctx context.Context, body CreateAlertRuleJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateAlertRuleWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteAlertRule(ctx context.Context, ruleName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAlertRule(ctx context.Context, ruleName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) HandleAlertWebhook(ctx context.Context, body HandleAlertWebhookJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) HandleAlertWebhookWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) Health(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) QueryLogs(ctx context.Context, body QueryLogsJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) QueryLogsWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateAlertRule(ctx context.Context, ruleName string, body UpdateAlertRuleJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateAlertRuleWithBody(ctx context.Context, ruleName string, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateAlertRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateAlertRuleResp, error)
- func (c *ClientWithResponses) CreateAlertRuleWithResponse(ctx context.Context, body CreateAlertRuleJSONRequestBody, ...) (*CreateAlertRuleResp, error)
- func (c *ClientWithResponses) DeleteAlertRuleWithResponse(ctx context.Context, ruleName string, reqEditors ...RequestEditorFn) (*DeleteAlertRuleResp, error)
- func (c *ClientWithResponses) GetAlertRuleWithResponse(ctx context.Context, ruleName string, reqEditors ...RequestEditorFn) (*GetAlertRuleResp, error)
- func (c *ClientWithResponses) HandleAlertWebhookWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*HandleAlertWebhookResp, error)
- func (c *ClientWithResponses) HandleAlertWebhookWithResponse(ctx context.Context, body HandleAlertWebhookJSONRequestBody, ...) (*HandleAlertWebhookResp, error)
- func (c *ClientWithResponses) HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResp, error)
- func (c *ClientWithResponses) QueryLogsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*QueryLogsResp, error)
- func (c *ClientWithResponses) QueryLogsWithResponse(ctx context.Context, body QueryLogsJSONRequestBody, ...) (*QueryLogsResp, error)
- func (c *ClientWithResponses) UpdateAlertRuleWithBodyWithResponse(ctx context.Context, ruleName string, contentType string, body io.Reader, ...) (*UpdateAlertRuleResp, error)
- func (c *ClientWithResponses) UpdateAlertRuleWithResponse(ctx context.Context, ruleName string, body UpdateAlertRuleJSONRequestBody, ...) (*UpdateAlertRuleResp, error)
- type ClientWithResponsesInterface
- type ComponentLogEntry
- type ComponentSearchScope
- type CreateAlertRuleJSONRequestBody
- type CreateAlertRuleResp
- type DeleteAlertRuleResp
- type ErrorResponse
- type ErrorResponseTitle
- type GetAlertRuleResp
- type HandleAlertWebhookJSONBody
- type HandleAlertWebhookJSONRequestBody
- type HandleAlertWebhookResp
- type HealthResp
- type HttpRequestDoer
- type LogsQueryRequest
- type LogsQueryRequestLogLevels
- type LogsQueryRequestSortOrder
- type LogsQueryRequest_SearchScope
- func (t LogsQueryRequest_SearchScope) AsComponentSearchScope() (ComponentSearchScope, error)
- func (t LogsQueryRequest_SearchScope) AsWorkflowSearchScope() (WorkflowSearchScope, error)
- func (t *LogsQueryRequest_SearchScope) FromComponentSearchScope(v ComponentSearchScope) error
- func (t *LogsQueryRequest_SearchScope) FromWorkflowSearchScope(v WorkflowSearchScope) error
- func (t LogsQueryRequest_SearchScope) MarshalJSON() ([]byte, error)
- func (t *LogsQueryRequest_SearchScope) MergeComponentSearchScope(v ComponentSearchScope) error
- func (t *LogsQueryRequest_SearchScope) MergeWorkflowSearchScope(v WorkflowSearchScope) error
- func (t *LogsQueryRequest_SearchScope) UnmarshalJSON(b []byte) error
- type LogsQueryResponse
- type LogsQueryResponseLogs0
- type LogsQueryResponseLogs1
- type LogsQueryResponse_Logs
- func (t LogsQueryResponse_Logs) AsLogsQueryResponseLogs0() (LogsQueryResponseLogs0, error)
- func (t LogsQueryResponse_Logs) AsLogsQueryResponseLogs1() (LogsQueryResponseLogs1, error)
- func (t *LogsQueryResponse_Logs) FromLogsQueryResponseLogs0(v LogsQueryResponseLogs0) error
- func (t *LogsQueryResponse_Logs) FromLogsQueryResponseLogs1(v LogsQueryResponseLogs1) error
- func (t LogsQueryResponse_Logs) MarshalJSON() ([]byte, error)
- func (t *LogsQueryResponse_Logs) MergeLogsQueryResponseLogs0(v LogsQueryResponseLogs0) error
- func (t *LogsQueryResponse_Logs) MergeLogsQueryResponseLogs1(v LogsQueryResponseLogs1) error
- func (t *LogsQueryResponse_Logs) UnmarshalJSON(b []byte) error
- type QueryLogsJSONRequestBody
- type QueryLogsResp
- type RequestEditorFn
- type UpdateAlertRuleJSONRequestBody
- type UpdateAlertRuleResp
- type WorkflowLogEntry
- type WorkflowSearchScope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateAlertRuleRequest ¶
func NewCreateAlertRuleRequest(server string, body CreateAlertRuleJSONRequestBody) (*http.Request, error)
NewCreateAlertRuleRequest calls the generic CreateAlertRule builder with application/json body
func NewCreateAlertRuleRequestWithBody ¶
func NewCreateAlertRuleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateAlertRuleRequestWithBody generates requests for CreateAlertRule with any type of body
func NewDeleteAlertRuleRequest ¶
NewDeleteAlertRuleRequest generates requests for DeleteAlertRule
func NewGetAlertRuleRequest ¶
NewGetAlertRuleRequest generates requests for GetAlertRule
func NewHandleAlertWebhookRequest ¶
func NewHandleAlertWebhookRequest(server string, body HandleAlertWebhookJSONRequestBody) (*http.Request, error)
NewHandleAlertWebhookRequest calls the generic HandleAlertWebhook builder with application/json body
func NewHandleAlertWebhookRequestWithBody ¶
func NewHandleAlertWebhookRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewHandleAlertWebhookRequestWithBody generates requests for HandleAlertWebhook with any type of body
func NewHealthRequest ¶
NewHealthRequest generates requests for Health
func NewQueryLogsRequest ¶
func NewQueryLogsRequest(server string, body QueryLogsJSONRequestBody) (*http.Request, error)
NewQueryLogsRequest calls the generic QueryLogs builder with application/json body
func NewQueryLogsRequestWithBody ¶
func NewQueryLogsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewQueryLogsRequestWithBody generates requests for QueryLogs with any type of body
func NewUpdateAlertRuleRequest ¶
func NewUpdateAlertRuleRequest(server string, ruleName string, body UpdateAlertRuleJSONRequestBody) (*http.Request, error)
NewUpdateAlertRuleRequest calls the generic UpdateAlertRule builder with application/json body
Types ¶
type AlertRuleRequest ¶
type AlertRuleRequest struct {
Condition struct {
// Enabled Whether the alert rule is enabled
Enabled bool `json:"enabled"`
// Interval The interval of time to query for the alert rule
Interval string `json:"interval"`
// Operator The operator to use for the alert rule
Operator AlertRuleRequestConditionOperator `json:"operator"`
// Threshold The threshold value to use for the alert rule
Threshold float32 `json:"threshold"`
// Window The window of time to query for the alert rule
Window string `json:"window"`
} `json:"condition"`
Metadata struct {
// ComponentUid The OpenChoreo component UID to query
ComponentUid openapi_types.UUID `json:"componentUid"`
// EnvironmentUid The OpenChoreo environment UID to query
EnvironmentUid openapi_types.UUID `json:"environmentUid"`
// Name The name of the alert rule
Name string `json:"name"`
// Namespace The namespace of the alert rule CR
Namespace string `json:"namespace"`
// ProjectUid The OpenChoreo project UID to query
ProjectUid openapi_types.UUID `json:"projectUid"`
} `json:"metadata"`
Source struct {
// Query The query to execute for log based alerts
Query string `json:"query"`
} `json:"source"`
}
AlertRuleRequest defines model for AlertRuleRequest.
type AlertRuleRequestConditionOperator ¶
type AlertRuleRequestConditionOperator string
AlertRuleRequestConditionOperator The operator to use for the alert rule
const ( AlertRuleRequestConditionOperatorEq AlertRuleRequestConditionOperator = "eq" AlertRuleRequestConditionOperatorGt AlertRuleRequestConditionOperator = "gt" AlertRuleRequestConditionOperatorGte AlertRuleRequestConditionOperator = "gte" AlertRuleRequestConditionOperatorLt AlertRuleRequestConditionOperator = "lt" AlertRuleRequestConditionOperatorLte AlertRuleRequestConditionOperator = "lte" AlertRuleRequestConditionOperatorNeq AlertRuleRequestConditionOperator = "neq" )
Defines values for AlertRuleRequestConditionOperator.
type AlertRuleResponse ¶
type AlertRuleResponse struct {
Condition *struct {
// Enabled Whether the alert rule is enabled
Enabled *bool `json:"enabled,omitempty"`
// Interval The interval of time to query for the alert rule
Interval *string `json:"interval,omitempty"`
// Operator The operator to use for the alert rule
Operator *AlertRuleResponseConditionOperator `json:"operator,omitempty"`
// Threshold The threshold value to use for the alert rule
Threshold *float32 `json:"threshold,omitempty"`
// Window The window of time to query for the alert rule
Window *string `json:"window,omitempty"`
} `json:"condition,omitempty"`
Metadata *struct {
// ComponentUid The OpenChoreo component UID to query
ComponentUid *openapi_types.UUID `json:"componentUid,omitempty"`
// EnvironmentUid The OpenChoreo environment UID to query
EnvironmentUid *openapi_types.UUID `json:"environmentUid,omitempty"`
// Name The name of the alert rule
Name *string `json:"name,omitempty"`
// Namespace The namespace of the alert rule CR
Namespace *string `json:"namespace,omitempty"`
// ProjectUid The OpenChoreo project UID to query
ProjectUid *openapi_types.UUID `json:"projectUid,omitempty"`
} `json:"metadata,omitempty"`
Source *struct {
// Metric The metric to query for metric based alerts
Metric *AlertRuleResponseSourceMetric `json:"metric,omitempty"`
// Query The query to execute for log based alerts
Query *string `json:"query,omitempty"`
} `json:"source,omitempty"`
}
AlertRuleResponse defines model for AlertRuleResponse.
type AlertRuleResponseConditionOperator ¶
type AlertRuleResponseConditionOperator string
AlertRuleResponseConditionOperator The operator to use for the alert rule
const ( AlertRuleResponseConditionOperatorEq AlertRuleResponseConditionOperator = "eq" AlertRuleResponseConditionOperatorGt AlertRuleResponseConditionOperator = "gt" AlertRuleResponseConditionOperatorGte AlertRuleResponseConditionOperator = "gte" AlertRuleResponseConditionOperatorLt AlertRuleResponseConditionOperator = "lt" AlertRuleResponseConditionOperatorLte AlertRuleResponseConditionOperator = "lte" AlertRuleResponseConditionOperatorNeq AlertRuleResponseConditionOperator = "neq" )
Defines values for AlertRuleResponseConditionOperator.
type AlertRuleResponseSourceMetric ¶
type AlertRuleResponseSourceMetric string
AlertRuleResponseSourceMetric The metric to query for metric based alerts
const ( CpuUsage AlertRuleResponseSourceMetric = "cpu_usage" MemoryUsage AlertRuleResponseSourceMetric = "memory_usage" )
Defines values for AlertRuleResponseSourceMetric.
type AlertWebhookResponse ¶
type AlertWebhookResponse struct {
// Message The message of the alert webhook
Message *string `json:"message,omitempty"`
// Status The status of the alert webhook
Status *AlertWebhookResponseStatus `json:"status,omitempty"`
}
AlertWebhookResponse defines model for AlertWebhookResponse.
type AlertWebhookResponseStatus ¶
type AlertWebhookResponseStatus string
AlertWebhookResponseStatus The status of the alert webhook
const ( Error AlertWebhookResponseStatus = "error" Success AlertWebhookResponseStatus = "success" )
Defines values for AlertWebhookResponseStatus.
type AlertingRuleSyncResponse ¶
type AlertingRuleSyncResponse struct {
// Action The action taken on the alert rule
Action *AlertingRuleSyncResponseAction `json:"action,omitempty"`
// LastSyncedAt The timestamp of the last sync
LastSyncedAt *string `json:"lastSyncedAt,omitempty"`
// RuleBackendId The backend ID (UID from observability backend) of the alert rule
RuleBackendId *string `json:"ruleBackendId,omitempty"`
// RuleLogicalId The logical ID (name) of the alert rule
RuleLogicalId *string `json:"ruleLogicalId,omitempty"`
// Status The status of the alert rule
Status *AlertingRuleSyncResponseStatus `json:"status,omitempty"`
}
AlertingRuleSyncResponse defines model for AlertingRuleSyncResponse.
type AlertingRuleSyncResponseAction ¶
type AlertingRuleSyncResponseAction string
AlertingRuleSyncResponseAction The action taken on the alert rule
const ( Created AlertingRuleSyncResponseAction = "created" Deleted AlertingRuleSyncResponseAction = "deleted" Unchanged AlertingRuleSyncResponseAction = "unchanged" Updated AlertingRuleSyncResponseAction = "updated" )
Defines values for AlertingRuleSyncResponseAction.
type AlertingRuleSyncResponseStatus ¶
type AlertingRuleSyncResponseStatus string
AlertingRuleSyncResponseStatus The status of the alert rule
const ( Failed AlertingRuleSyncResponseStatus = "failed" Synced AlertingRuleSyncResponseStatus = "synced" )
Defines values for AlertingRuleSyncResponseStatus.
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateAlertRule ¶
func (c *Client) CreateAlertRule(ctx context.Context, body CreateAlertRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateAlertRuleWithBody ¶
func (*Client) DeleteAlertRule ¶
func (*Client) GetAlertRule ¶
func (*Client) HandleAlertWebhook ¶
func (c *Client) HandleAlertWebhook(ctx context.Context, body HandleAlertWebhookJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) HandleAlertWebhookWithBody ¶
func (*Client) QueryLogs ¶
func (c *Client) QueryLogs(ctx context.Context, body QueryLogsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) QueryLogsWithBody ¶
func (*Client) UpdateAlertRule ¶
func (c *Client) UpdateAlertRule(ctx context.Context, ruleName string, body UpdateAlertRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// QueryLogsWithBody request with any body
QueryLogsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
QueryLogs(ctx context.Context, body QueryLogsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateAlertRuleWithBody request with any body
CreateAlertRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateAlertRule(ctx context.Context, body CreateAlertRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteAlertRule request
DeleteAlertRule(ctx context.Context, ruleName string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAlertRule request
GetAlertRule(ctx context.Context, ruleName string, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateAlertRuleWithBody request with any body
UpdateAlertRuleWithBody(ctx context.Context, ruleName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateAlertRule(ctx context.Context, ruleName string, body UpdateAlertRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// HandleAlertWebhookWithBody request with any body
HandleAlertWebhookWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
HandleAlertWebhook(ctx context.Context, body HandleAlertWebhookJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// Health request
Health(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateAlertRuleWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateAlertRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAlertRuleResp, error)
CreateAlertRuleWithBodyWithResponse request with arbitrary body returning *CreateAlertRuleResp
func (*ClientWithResponses) CreateAlertRuleWithResponse ¶
func (c *ClientWithResponses) CreateAlertRuleWithResponse(ctx context.Context, body CreateAlertRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAlertRuleResp, error)
func (*ClientWithResponses) DeleteAlertRuleWithResponse ¶
func (c *ClientWithResponses) DeleteAlertRuleWithResponse(ctx context.Context, ruleName string, reqEditors ...RequestEditorFn) (*DeleteAlertRuleResp, error)
DeleteAlertRuleWithResponse request returning *DeleteAlertRuleResp
func (*ClientWithResponses) GetAlertRuleWithResponse ¶
func (c *ClientWithResponses) GetAlertRuleWithResponse(ctx context.Context, ruleName string, reqEditors ...RequestEditorFn) (*GetAlertRuleResp, error)
GetAlertRuleWithResponse request returning *GetAlertRuleResp
func (*ClientWithResponses) HandleAlertWebhookWithBodyWithResponse ¶
func (c *ClientWithResponses) HandleAlertWebhookWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*HandleAlertWebhookResp, error)
HandleAlertWebhookWithBodyWithResponse request with arbitrary body returning *HandleAlertWebhookResp
func (*ClientWithResponses) HandleAlertWebhookWithResponse ¶
func (c *ClientWithResponses) HandleAlertWebhookWithResponse(ctx context.Context, body HandleAlertWebhookJSONRequestBody, reqEditors ...RequestEditorFn) (*HandleAlertWebhookResp, error)
func (*ClientWithResponses) HealthWithResponse ¶
func (c *ClientWithResponses) HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResp, error)
HealthWithResponse request returning *HealthResp
func (*ClientWithResponses) QueryLogsWithBodyWithResponse ¶
func (c *ClientWithResponses) QueryLogsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QueryLogsResp, error)
QueryLogsWithBodyWithResponse request with arbitrary body returning *QueryLogsResp
func (*ClientWithResponses) QueryLogsWithResponse ¶
func (c *ClientWithResponses) QueryLogsWithResponse(ctx context.Context, body QueryLogsJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryLogsResp, error)
func (*ClientWithResponses) UpdateAlertRuleWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateAlertRuleWithBodyWithResponse(ctx context.Context, ruleName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAlertRuleResp, error)
UpdateAlertRuleWithBodyWithResponse request with arbitrary body returning *UpdateAlertRuleResp
func (*ClientWithResponses) UpdateAlertRuleWithResponse ¶
func (c *ClientWithResponses) UpdateAlertRuleWithResponse(ctx context.Context, ruleName string, body UpdateAlertRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAlertRuleResp, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// QueryLogsWithBodyWithResponse request with any body
QueryLogsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QueryLogsResp, error)
QueryLogsWithResponse(ctx context.Context, body QueryLogsJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryLogsResp, error)
// CreateAlertRuleWithBodyWithResponse request with any body
CreateAlertRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAlertRuleResp, error)
CreateAlertRuleWithResponse(ctx context.Context, body CreateAlertRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAlertRuleResp, error)
// DeleteAlertRuleWithResponse request
DeleteAlertRuleWithResponse(ctx context.Context, ruleName string, reqEditors ...RequestEditorFn) (*DeleteAlertRuleResp, error)
// GetAlertRuleWithResponse request
GetAlertRuleWithResponse(ctx context.Context, ruleName string, reqEditors ...RequestEditorFn) (*GetAlertRuleResp, error)
// UpdateAlertRuleWithBodyWithResponse request with any body
UpdateAlertRuleWithBodyWithResponse(ctx context.Context, ruleName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAlertRuleResp, error)
UpdateAlertRuleWithResponse(ctx context.Context, ruleName string, body UpdateAlertRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAlertRuleResp, error)
// HandleAlertWebhookWithBodyWithResponse request with any body
HandleAlertWebhookWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*HandleAlertWebhookResp, error)
HandleAlertWebhookWithResponse(ctx context.Context, body HandleAlertWebhookJSONRequestBody, reqEditors ...RequestEditorFn) (*HandleAlertWebhookResp, error)
// HealthWithResponse request
HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResp, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type ComponentLogEntry ¶
type ComponentLogEntry struct {
// Level The log level
Level *string `json:"level,omitempty"`
// Log The log message
Log *string `json:"log,omitempty"`
// Metadata The metadata of the log entry
Metadata *struct {
// ComponentName The OpenChoreo component name that generated the log
ComponentName *string `json:"componentName,omitempty"`
// ComponentUid The OpenChoreo component UID that generated the log
ComponentUid *openapi_types.UUID `json:"componentUid,omitempty"`
// ContainerName The container name that generated the log
ContainerName *string `json:"containerName,omitempty"`
// EnvironmentName The OpenChoreo environment name that generated the log
EnvironmentName *string `json:"environmentName,omitempty"`
// EnvironmentUid The OpenChoreo environment UID that generated the log
EnvironmentUid *openapi_types.UUID `json:"environmentUid,omitempty"`
// NamespaceName The OpenChoreo namespace name that generated the log
NamespaceName *string `json:"namespaceName,omitempty"`
// PodName The Kubernetes pod name that generated the log
PodName *string `json:"podName,omitempty"`
// PodNamespace The namespace of the Kubernetes pod that generated the log
PodNamespace *string `json:"podNamespace,omitempty"`
// ProjectName The OpenChoreo project name that generated the log
ProjectName *string `json:"projectName,omitempty"`
// ProjectUid The OpenChoreo project UID that generated the log
ProjectUid *openapi_types.UUID `json:"projectUid,omitempty"`
} `json:"metadata,omitempty"`
// Timestamp The timestamp of the log entry
Timestamp *time.Time `json:"timestamp,omitempty"`
}
ComponentLogEntry defines model for ComponentLogEntry.
type ComponentSearchScope ¶
type ComponentSearchScope struct {
ComponentUid *string `json:"componentUid,omitempty"`
EnvironmentUid *string `json:"environmentUid,omitempty"`
Namespace string `json:"namespace"`
ProjectUid *string `json:"projectUid,omitempty"`
}
ComponentSearchScope defines model for ComponentSearchScope.
type CreateAlertRuleJSONRequestBody ¶
type CreateAlertRuleJSONRequestBody = AlertRuleRequest
CreateAlertRuleJSONRequestBody defines body for CreateAlertRule for application/json ContentType.
type CreateAlertRuleResp ¶
type CreateAlertRuleResp struct {
Body []byte
HTTPResponse *http.Response
JSON201 *AlertingRuleSyncResponse
JSON400 *ErrorResponse
JSON409 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseCreateAlertRuleResp ¶
func ParseCreateAlertRuleResp(rsp *http.Response) (*CreateAlertRuleResp, error)
ParseCreateAlertRuleResp parses an HTTP response from a CreateAlertRuleWithResponse call
func (CreateAlertRuleResp) Status ¶
func (r CreateAlertRuleResp) Status() string
Status returns HTTPResponse.Status
func (CreateAlertRuleResp) StatusCode ¶
func (r CreateAlertRuleResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteAlertRuleResp ¶
type DeleteAlertRuleResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AlertingRuleSyncResponse
JSON400 *ErrorResponse
JSON404 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseDeleteAlertRuleResp ¶
func ParseDeleteAlertRuleResp(rsp *http.Response) (*DeleteAlertRuleResp, error)
ParseDeleteAlertRuleResp parses an HTTP response from a DeleteAlertRuleWithResponse call
func (DeleteAlertRuleResp) Status ¶
func (r DeleteAlertRuleResp) Status() string
Status returns HTTPResponse.Status
func (DeleteAlertRuleResp) StatusCode ¶
func (r DeleteAlertRuleResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ErrorResponse ¶
type ErrorResponse struct {
// ErrorCode The error code from observer service
ErrorCode *string `json:"errorCode,omitempty"`
// Message Human-readable error message
Message *string `json:"message,omitempty"`
// Title The error message
Title *ErrorResponseTitle `json:"title,omitempty"`
}
ErrorResponse defines model for ErrorResponse.
type ErrorResponseTitle ¶
type ErrorResponseTitle string
ErrorResponseTitle The error message
const ( BadRequest ErrorResponseTitle = "badRequest" Conflict ErrorResponseTitle = "conflict" Forbidden ErrorResponseTitle = "forbidden" InternalServerError ErrorResponseTitle = "internalServerError" NotFound ErrorResponseTitle = "notFound" )
Defines values for ErrorResponseTitle.
type GetAlertRuleResp ¶
type GetAlertRuleResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AlertRuleResponse
JSON400 *ErrorResponse
JSON404 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseGetAlertRuleResp ¶
func ParseGetAlertRuleResp(rsp *http.Response) (*GetAlertRuleResp, error)
ParseGetAlertRuleResp parses an HTTP response from a GetAlertRuleWithResponse call
func (GetAlertRuleResp) Status ¶
func (r GetAlertRuleResp) Status() string
Status returns HTTPResponse.Status
func (GetAlertRuleResp) StatusCode ¶
func (r GetAlertRuleResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HandleAlertWebhookJSONBody ¶
type HandleAlertWebhookJSONBody = map[string]interface{}
HandleAlertWebhookJSONBody defines parameters for HandleAlertWebhook.
type HandleAlertWebhookJSONRequestBody ¶
type HandleAlertWebhookJSONRequestBody = HandleAlertWebhookJSONBody
HandleAlertWebhookJSONRequestBody defines body for HandleAlertWebhook for application/json ContentType.
type HandleAlertWebhookResp ¶
type HandleAlertWebhookResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AlertWebhookResponse
JSON400 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseHandleAlertWebhookResp ¶
func ParseHandleAlertWebhookResp(rsp *http.Response) (*HandleAlertWebhookResp, error)
ParseHandleAlertWebhookResp parses an HTTP response from a HandleAlertWebhookWithResponse call
func (HandleAlertWebhookResp) Status ¶
func (r HandleAlertWebhookResp) Status() string
Status returns HTTPResponse.Status
func (HandleAlertWebhookResp) StatusCode ¶
func (r HandleAlertWebhookResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HealthResp ¶
type HealthResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
Status *string `json:"status,omitempty"`
}
JSON503 *struct {
Error *string `json:"error,omitempty"`
Status *string `json:"status,omitempty"`
}
}
func ParseHealthResp ¶
func ParseHealthResp(rsp *http.Response) (*HealthResp, error)
ParseHealthResp parses an HTTP response from a HealthWithResponse call
func (HealthResp) StatusCode ¶
func (r HealthResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type LogsQueryRequest ¶
type LogsQueryRequest struct {
// EndTime The end time of the query
EndTime time.Time `json:"endTime"`
// Limit The maximum number of items to return
Limit *int `json:"limit,omitempty"`
LogLevels *[]LogsQueryRequestLogLevels `json:"logLevels,omitempty"`
SearchPhrase *string `json:"searchPhrase,omitempty"`
SearchScope LogsQueryRequest_SearchScope `json:"searchScope"`
// SortOrder The sort order of the query
SortOrder *LogsQueryRequestSortOrder `json:"sortOrder,omitempty"`
// StartTime The start time of the query
StartTime time.Time `json:"startTime"`
}
LogsQueryRequest defines model for LogsQueryRequest.
type LogsQueryRequestLogLevels ¶
type LogsQueryRequestLogLevels string
LogsQueryRequestLogLevels defines model for LogsQueryRequest.LogLevels.
const ( DEBUG LogsQueryRequestLogLevels = "DEBUG" ERROR LogsQueryRequestLogLevels = "ERROR" INFO LogsQueryRequestLogLevels = "INFO" WARN LogsQueryRequestLogLevels = "WARN" )
Defines values for LogsQueryRequestLogLevels.
type LogsQueryRequestSortOrder ¶
type LogsQueryRequestSortOrder string
LogsQueryRequestSortOrder The sort order of the query
const ( Asc LogsQueryRequestSortOrder = "asc" Desc LogsQueryRequestSortOrder = "desc" )
Defines values for LogsQueryRequestSortOrder.
type LogsQueryRequest_SearchScope ¶
type LogsQueryRequest_SearchScope struct {
// contains filtered or unexported fields
}
LogsQueryRequest_SearchScope defines model for LogsQueryRequest.SearchScope.
func (LogsQueryRequest_SearchScope) AsComponentSearchScope ¶
func (t LogsQueryRequest_SearchScope) AsComponentSearchScope() (ComponentSearchScope, error)
AsComponentSearchScope returns the union data inside the LogsQueryRequest_SearchScope as a ComponentSearchScope
func (LogsQueryRequest_SearchScope) AsWorkflowSearchScope ¶
func (t LogsQueryRequest_SearchScope) AsWorkflowSearchScope() (WorkflowSearchScope, error)
AsWorkflowSearchScope returns the union data inside the LogsQueryRequest_SearchScope as a WorkflowSearchScope
func (*LogsQueryRequest_SearchScope) FromComponentSearchScope ¶
func (t *LogsQueryRequest_SearchScope) FromComponentSearchScope(v ComponentSearchScope) error
FromComponentSearchScope overwrites any union data inside the LogsQueryRequest_SearchScope as the provided ComponentSearchScope
func (*LogsQueryRequest_SearchScope) FromWorkflowSearchScope ¶
func (t *LogsQueryRequest_SearchScope) FromWorkflowSearchScope(v WorkflowSearchScope) error
FromWorkflowSearchScope overwrites any union data inside the LogsQueryRequest_SearchScope as the provided WorkflowSearchScope
func (LogsQueryRequest_SearchScope) MarshalJSON ¶
func (t LogsQueryRequest_SearchScope) MarshalJSON() ([]byte, error)
func (*LogsQueryRequest_SearchScope) MergeComponentSearchScope ¶
func (t *LogsQueryRequest_SearchScope) MergeComponentSearchScope(v ComponentSearchScope) error
MergeComponentSearchScope performs a merge with any union data inside the LogsQueryRequest_SearchScope, using the provided ComponentSearchScope
func (*LogsQueryRequest_SearchScope) MergeWorkflowSearchScope ¶
func (t *LogsQueryRequest_SearchScope) MergeWorkflowSearchScope(v WorkflowSearchScope) error
MergeWorkflowSearchScope performs a merge with any union data inside the LogsQueryRequest_SearchScope, using the provided WorkflowSearchScope
func (*LogsQueryRequest_SearchScope) UnmarshalJSON ¶
func (t *LogsQueryRequest_SearchScope) UnmarshalJSON(b []byte) error
type LogsQueryResponse ¶
type LogsQueryResponse struct {
// Logs The logs queried successfully
Logs *LogsQueryResponse_Logs `json:"logs,omitempty"`
// TookMs The time taken to query the logs in milliseconds
TookMs *int `json:"tookMs,omitempty"`
// Total The total number of matching log entries, capped at 1000
Total *int `json:"total,omitempty"`
}
LogsQueryResponse defines model for LogsQueryResponse.
type LogsQueryResponseLogs0 ¶
type LogsQueryResponseLogs0 = []ComponentLogEntry
LogsQueryResponseLogs0 defines model for .
type LogsQueryResponseLogs1 ¶
type LogsQueryResponseLogs1 = []WorkflowLogEntry
LogsQueryResponseLogs1 defines model for .
type LogsQueryResponse_Logs ¶
type LogsQueryResponse_Logs struct {
// contains filtered or unexported fields
}
LogsQueryResponse_Logs The logs queried successfully
func (LogsQueryResponse_Logs) AsLogsQueryResponseLogs0 ¶
func (t LogsQueryResponse_Logs) AsLogsQueryResponseLogs0() (LogsQueryResponseLogs0, error)
AsLogsQueryResponseLogs0 returns the union data inside the LogsQueryResponse_Logs as a LogsQueryResponseLogs0
func (LogsQueryResponse_Logs) AsLogsQueryResponseLogs1 ¶
func (t LogsQueryResponse_Logs) AsLogsQueryResponseLogs1() (LogsQueryResponseLogs1, error)
AsLogsQueryResponseLogs1 returns the union data inside the LogsQueryResponse_Logs as a LogsQueryResponseLogs1
func (*LogsQueryResponse_Logs) FromLogsQueryResponseLogs0 ¶
func (t *LogsQueryResponse_Logs) FromLogsQueryResponseLogs0(v LogsQueryResponseLogs0) error
FromLogsQueryResponseLogs0 overwrites any union data inside the LogsQueryResponse_Logs as the provided LogsQueryResponseLogs0
func (*LogsQueryResponse_Logs) FromLogsQueryResponseLogs1 ¶
func (t *LogsQueryResponse_Logs) FromLogsQueryResponseLogs1(v LogsQueryResponseLogs1) error
FromLogsQueryResponseLogs1 overwrites any union data inside the LogsQueryResponse_Logs as the provided LogsQueryResponseLogs1
func (LogsQueryResponse_Logs) MarshalJSON ¶
func (t LogsQueryResponse_Logs) MarshalJSON() ([]byte, error)
func (*LogsQueryResponse_Logs) MergeLogsQueryResponseLogs0 ¶
func (t *LogsQueryResponse_Logs) MergeLogsQueryResponseLogs0(v LogsQueryResponseLogs0) error
MergeLogsQueryResponseLogs0 performs a merge with any union data inside the LogsQueryResponse_Logs, using the provided LogsQueryResponseLogs0
func (*LogsQueryResponse_Logs) MergeLogsQueryResponseLogs1 ¶
func (t *LogsQueryResponse_Logs) MergeLogsQueryResponseLogs1(v LogsQueryResponseLogs1) error
MergeLogsQueryResponseLogs1 performs a merge with any union data inside the LogsQueryResponse_Logs, using the provided LogsQueryResponseLogs1
func (*LogsQueryResponse_Logs) UnmarshalJSON ¶
func (t *LogsQueryResponse_Logs) UnmarshalJSON(b []byte) error
type QueryLogsJSONRequestBody ¶
type QueryLogsJSONRequestBody = LogsQueryRequest
QueryLogsJSONRequestBody defines body for QueryLogs for application/json ContentType.
type QueryLogsResp ¶
type QueryLogsResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *LogsQueryResponse
JSON400 *ErrorResponse
JSON401 *ErrorResponse
JSON403 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseQueryLogsResp ¶
func ParseQueryLogsResp(rsp *http.Response) (*QueryLogsResp, error)
ParseQueryLogsResp parses an HTTP response from a QueryLogsWithResponse call
func (QueryLogsResp) Status ¶
func (r QueryLogsResp) Status() string
Status returns HTTPResponse.Status
func (QueryLogsResp) StatusCode ¶
func (r QueryLogsResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type UpdateAlertRuleJSONRequestBody ¶
type UpdateAlertRuleJSONRequestBody = AlertRuleRequest
UpdateAlertRuleJSONRequestBody defines body for UpdateAlertRule for application/json ContentType.
type UpdateAlertRuleResp ¶
type UpdateAlertRuleResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AlertingRuleSyncResponse
JSON400 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseUpdateAlertRuleResp ¶
func ParseUpdateAlertRuleResp(rsp *http.Response) (*UpdateAlertRuleResp, error)
ParseUpdateAlertRuleResp parses an HTTP response from a UpdateAlertRuleWithResponse call
func (UpdateAlertRuleResp) Status ¶
func (r UpdateAlertRuleResp) Status() string
Status returns HTTPResponse.Status
func (UpdateAlertRuleResp) StatusCode ¶
func (r UpdateAlertRuleResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type WorkflowLogEntry ¶
type WorkflowLogEntry struct {
// Log The log message
Log *string `json:"log,omitempty"`
// Timestamp The timestamp of the log entry
Timestamp *time.Time `json:"timestamp,omitempty"`
}
WorkflowLogEntry defines model for WorkflowLogEntry.
type WorkflowSearchScope ¶
type WorkflowSearchScope struct {
Namespace string `json:"namespace"`
WorkflowRunName *string `json:"workflowRunName,omitempty"`
}
WorkflowSearchScope defines model for WorkflowSearchScope.