- Refactor executeCheck to return checkResult struct with metrics map - Add ping check kind (ICMP reachability via system ping, macOS+Linux) - Add ssh-script check kind (remote host exec via SSH, allowlisted scripts) - Add threshold evaluation (warn/crit per metric from check config JSONB) - Add inode tracking to disk check - All 4 existing checks now return structured metrics - 17 check scripts: cpu, memory, load, swap, disk_usage, disk_smart, updates, zfs, process, uptime, oom, journal, time, fd, docker_health, caddy_error_rate, backup_freshness - Auto-deploy via tools/setup-checks.sh -> checks/install.sh on git pull - Add ping to OpenAPI CheckKind enum and generated Go types
8425 lines
287 KiB
Go
8425 lines
287 KiB
Go
// Package gen provides primitives to interact with the openapi HTTP API.
|
|
//
|
|
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
|
|
package gen
|
|
|
|
import (
|
|
"bytes"
|
|
"compress/gzip"
|
|
"context"
|
|
"encoding/base64"
|
|
"encoding/json"
|
|
"fmt"
|
|
"io"
|
|
"net/http"
|
|
"net/url"
|
|
"path"
|
|
"strings"
|
|
"time"
|
|
|
|
"github.com/getkin/kin-openapi/openapi3"
|
|
"github.com/go-chi/chi/v5"
|
|
"github.com/oapi-codegen/runtime"
|
|
strictnethttp "github.com/oapi-codegen/runtime/strictmiddleware/nethttp"
|
|
openapi_types "github.com/oapi-codegen/runtime/types"
|
|
)
|
|
|
|
const (
|
|
BearerAuthScopes = "bearerAuth.Scopes"
|
|
)
|
|
|
|
// Defines values for AgentActivityActivityType.
|
|
const (
|
|
Decision AgentActivityActivityType = "decision"
|
|
Escalation AgentActivityActivityType = "escalation"
|
|
McpQuery AgentActivityActivityType = "mcp_query"
|
|
Reasoning AgentActivityActivityType = "reasoning"
|
|
ToolCall AgentActivityActivityType = "tool_call"
|
|
)
|
|
|
|
// Defines values for ApprovalKind.
|
|
const (
|
|
ApprovalKindExecution ApprovalKind = "execution"
|
|
ApprovalKindPatternActivation ApprovalKind = "pattern-activation"
|
|
ApprovalKindPolicyChange ApprovalKind = "policy-change"
|
|
)
|
|
|
|
// Defines values for ApprovalStatus.
|
|
const (
|
|
ApprovalStatusApproved ApprovalStatus = "approved"
|
|
ApprovalStatusDenied ApprovalStatus = "denied"
|
|
ApprovalStatusExpired ApprovalStatus = "expired"
|
|
ApprovalStatusPending ApprovalStatus = "pending"
|
|
ApprovalStatusRevoked ApprovalStatus = "revoked"
|
|
)
|
|
|
|
// Defines values for ApprovalRuleAutonomyLevel.
|
|
const (
|
|
ApprovalRuleAutonomyLevelAuto ApprovalRuleAutonomyLevel = "auto"
|
|
ApprovalRuleAutonomyLevelEscalate ApprovalRuleAutonomyLevel = "escalate"
|
|
ApprovalRuleAutonomyLevelNever ApprovalRuleAutonomyLevel = "never"
|
|
)
|
|
|
|
// Defines values for ApprovalRuleCreateAutonomyLevel.
|
|
const (
|
|
ApprovalRuleCreateAutonomyLevelAuto ApprovalRuleCreateAutonomyLevel = "auto"
|
|
ApprovalRuleCreateAutonomyLevelEscalate ApprovalRuleCreateAutonomyLevel = "escalate"
|
|
ApprovalRuleCreateAutonomyLevelNever ApprovalRuleCreateAutonomyLevel = "never"
|
|
)
|
|
|
|
// Defines values for AuditEntryActorType.
|
|
const (
|
|
AuditEntryActorTypeAgent AuditEntryActorType = "agent"
|
|
AuditEntryActorTypeOperator AuditEntryActorType = "operator"
|
|
AuditEntryActorTypeScheduler AuditEntryActorType = "scheduler"
|
|
AuditEntryActorTypeSystem AuditEntryActorType = "system"
|
|
)
|
|
|
|
// Defines values for CheckKind.
|
|
const (
|
|
CheckKindCertExpiry CheckKind = "cert-expiry"
|
|
CheckKindDisk CheckKind = "disk"
|
|
CheckKindDrift CheckKind = "drift"
|
|
CheckKindHttp CheckKind = "http"
|
|
CheckKindPing CheckKind = "ping"
|
|
CheckKindSshScript CheckKind = "ssh-script"
|
|
CheckKindTcp CheckKind = "tcp"
|
|
)
|
|
|
|
// Defines values for CheckCreateKind.
|
|
const (
|
|
CheckCreateKindCertExpiry CheckCreateKind = "cert-expiry"
|
|
CheckCreateKindDisk CheckCreateKind = "disk"
|
|
CheckCreateKindDrift CheckCreateKind = "drift"
|
|
CheckCreateKindHttp CheckCreateKind = "http"
|
|
CheckCreateKindPing CheckCreateKind = "ping"
|
|
CheckCreateKindSshScript CheckCreateKind = "ssh-script"
|
|
CheckCreateKindTcp CheckCreateKind = "tcp"
|
|
)
|
|
|
|
// Defines values for ClassificationRoute.
|
|
const (
|
|
ClassificationRouteAutoAct ClassificationRoute = "auto-act"
|
|
ClassificationRouteEscalate ClassificationRoute = "escalate"
|
|
ClassificationRouteHold ClassificationRoute = "hold"
|
|
)
|
|
|
|
// Defines values for EntityTypeLayer.
|
|
const (
|
|
EntityTypeLayerCognition EntityTypeLayer = "cognition"
|
|
EntityTypeLayerGovernance EntityTypeLayer = "governance"
|
|
EntityTypeLayerInfrastructure EntityTypeLayer = "infrastructure"
|
|
EntityTypeLayerMeta EntityTypeLayer = "meta"
|
|
)
|
|
|
|
// Defines values for EntityTypeStatus.
|
|
const (
|
|
EntityTypeStatusActive EntityTypeStatus = "active"
|
|
EntityTypeStatusDeprecated EntityTypeStatus = "deprecated"
|
|
)
|
|
|
|
// Defines values for EntityTypeCreateLayer.
|
|
const (
|
|
EntityTypeCreateLayerCognition EntityTypeCreateLayer = "cognition"
|
|
EntityTypeCreateLayerGovernance EntityTypeCreateLayer = "governance"
|
|
EntityTypeCreateLayerInfrastructure EntityTypeCreateLayer = "infrastructure"
|
|
)
|
|
|
|
// Defines values for EntityTypePatchStatus.
|
|
const (
|
|
EntityTypePatchStatusActive EntityTypePatchStatus = "active"
|
|
EntityTypePatchStatusDeprecated EntityTypePatchStatus = "deprecated"
|
|
)
|
|
|
|
// Defines values for EventSeverity.
|
|
const (
|
|
EventSeverityCritical EventSeverity = "critical"
|
|
EventSeverityInfo EventSeverity = "info"
|
|
EventSeverityWarning EventSeverity = "warning"
|
|
)
|
|
|
|
// Defines values for ExecutionStatus.
|
|
const (
|
|
ExecutionStatusApproved ExecutionStatus = "approved"
|
|
ExecutionStatusAutoApproved ExecutionStatus = "auto_approved"
|
|
ExecutionStatusCancelled ExecutionStatus = "cancelled"
|
|
ExecutionStatusDenied ExecutionStatus = "denied"
|
|
ExecutionStatusExecuting ExecutionStatus = "executing"
|
|
ExecutionStatusExpired ExecutionStatus = "expired"
|
|
ExecutionStatusFailed ExecutionStatus = "failed"
|
|
ExecutionStatusProposed ExecutionStatus = "proposed"
|
|
ExecutionStatusRollbackFailed ExecutionStatus = "rollback_failed"
|
|
ExecutionStatusRolledBack ExecutionStatus = "rolled_back"
|
|
ExecutionStatusTimedOut ExecutionStatus = "timed_out"
|
|
ExecutionStatusVerified ExecutionStatus = "verified"
|
|
ExecutionStatusVerifying ExecutionStatus = "verifying"
|
|
)
|
|
|
|
// Defines values for GraphViewHealth.
|
|
const (
|
|
GraphViewHealthDegraded GraphViewHealth = "degraded"
|
|
GraphViewHealthDown GraphViewHealth = "down"
|
|
GraphViewHealthHealthy GraphViewHealth = "healthy"
|
|
GraphViewHealthUnknown GraphViewHealth = "unknown"
|
|
)
|
|
|
|
// Defines values for HealthSummaryEntitiesHealth.
|
|
const (
|
|
HealthSummaryEntitiesHealthDegraded HealthSummaryEntitiesHealth = "degraded"
|
|
HealthSummaryEntitiesHealthDown HealthSummaryEntitiesHealth = "down"
|
|
HealthSummaryEntitiesHealthHealthy HealthSummaryEntitiesHealth = "healthy"
|
|
HealthSummaryEntitiesHealthUnknown HealthSummaryEntitiesHealth = "unknown"
|
|
)
|
|
|
|
// Defines values for HealthSummaryEntitiesTrend.
|
|
const (
|
|
HealthSummaryEntitiesTrendDegrading HealthSummaryEntitiesTrend = "degrading"
|
|
HealthSummaryEntitiesTrendImproving HealthSummaryEntitiesTrend = "improving"
|
|
HealthSummaryEntitiesTrendStable HealthSummaryEntitiesTrend = "stable"
|
|
HealthSummaryEntitiesTrendUnknown HealthSummaryEntitiesTrend = "unknown"
|
|
)
|
|
|
|
// Defines values for KnowledgeHitType.
|
|
const (
|
|
Document KnowledgeHitType = "document"
|
|
Investigation KnowledgeHitType = "investigation"
|
|
Runbook KnowledgeHitType = "runbook"
|
|
)
|
|
|
|
// Defines values for MetricSeriesRollup.
|
|
const (
|
|
MetricSeriesRollupN1d MetricSeriesRollup = "1d"
|
|
MetricSeriesRollupN1h MetricSeriesRollup = "1h"
|
|
MetricSeriesRollupRaw MetricSeriesRollup = "raw"
|
|
)
|
|
|
|
// Defines values for PatternStatus.
|
|
const (
|
|
PatternStatusActive PatternStatus = "active"
|
|
PatternStatusDeprecated PatternStatus = "deprecated"
|
|
PatternStatusHypothesized PatternStatus = "hypothesized"
|
|
PatternStatusInvalidated PatternStatus = "invalidated"
|
|
PatternStatusValidated PatternStatus = "validated"
|
|
)
|
|
|
|
// Defines values for ProvisionStatusStepsStatus.
|
|
const (
|
|
ProvisionStatusStepsStatusFailed ProvisionStatusStepsStatus = "failed"
|
|
ProvisionStatusStepsStatusOk ProvisionStatusStepsStatus = "ok"
|
|
ProvisionStatusStepsStatusPending ProvisionStatusStepsStatus = "pending"
|
|
ProvisionStatusStepsStatusRunning ProvisionStatusStepsStatus = "running"
|
|
ProvisionStatusStepsStatusSkipped ProvisionStatusStepsStatus = "skipped"
|
|
)
|
|
|
|
// Defines values for RelationshipTypeCardinality.
|
|
const (
|
|
ManyToMany RelationshipTypeCardinality = "many-to-many"
|
|
ManyToOne RelationshipTypeCardinality = "many-to-one"
|
|
OneToMany RelationshipTypeCardinality = "one-to-many"
|
|
OneToOne RelationshipTypeCardinality = "one-to-one"
|
|
)
|
|
|
|
// Defines values for RiskClassApprovalRequired.
|
|
const (
|
|
RiskClassApprovalRequiredNone RiskClassApprovalRequired = "none"
|
|
RiskClassApprovalRequiredOperator RiskClassApprovalRequired = "operator"
|
|
RiskClassApprovalRequiredOperatorConfirmed RiskClassApprovalRequired = "operator_confirmed"
|
|
)
|
|
|
|
// Defines values for SignalSeverity.
|
|
const (
|
|
SignalSeverityCritical SignalSeverity = "critical"
|
|
SignalSeverityInfo SignalSeverity = "info"
|
|
SignalSeverityWarning SignalSeverity = "warning"
|
|
)
|
|
|
|
// Defines values for SignalState.
|
|
const (
|
|
SignalStateAcknowledged SignalState = "acknowledged"
|
|
SignalStateActing SignalState = "acting"
|
|
SignalStateFailed SignalState = "failed"
|
|
SignalStateMuted SignalState = "muted"
|
|
SignalStateRaised SignalState = "raised"
|
|
SignalStateResolved SignalState = "resolved"
|
|
)
|
|
|
|
// Defines values for SkillStatus.
|
|
const (
|
|
SkillStatusActive SkillStatus = "active"
|
|
SkillStatusDeprecated SkillStatus = "deprecated"
|
|
SkillStatusDrafted SkillStatus = "drafted"
|
|
SkillStatusFailed SkillStatus = "failed"
|
|
SkillStatusRefined SkillStatus = "refined"
|
|
SkillStatusTested SkillStatus = "tested"
|
|
)
|
|
|
|
// Defines values for SkillStepRunner.
|
|
const (
|
|
Http SkillStepRunner = "http"
|
|
Internal SkillStepRunner = "internal"
|
|
Ssh SkillStepRunner = "ssh"
|
|
)
|
|
|
|
// Defines values for TrendDirection.
|
|
const (
|
|
TrendDirectionDegrading TrendDirection = "degrading"
|
|
TrendDirectionImproving TrendDirection = "improving"
|
|
TrendDirectionStable TrendDirection = "stable"
|
|
TrendDirectionUnknown TrendDirection = "unknown"
|
|
)
|
|
|
|
// Defines values for ListApprovalsParamsStatus.
|
|
const (
|
|
Approved ListApprovalsParamsStatus = "approved"
|
|
Denied ListApprovalsParamsStatus = "denied"
|
|
Expired ListApprovalsParamsStatus = "expired"
|
|
Pending ListApprovalsParamsStatus = "pending"
|
|
Revoked ListApprovalsParamsStatus = "revoked"
|
|
)
|
|
|
|
// Defines values for ListApprovalsParamsKind.
|
|
const (
|
|
ListApprovalsParamsKindExecution ListApprovalsParamsKind = "execution"
|
|
ListApprovalsParamsKindPatternActivation ListApprovalsParamsKind = "pattern-activation"
|
|
ListApprovalsParamsKindPolicyChange ListApprovalsParamsKind = "policy-change"
|
|
)
|
|
|
|
// Defines values for DecideApprovalJSONBodyDecision.
|
|
const (
|
|
Approve DecideApprovalJSONBodyDecision = "approve"
|
|
Deny DecideApprovalJSONBodyDecision = "deny"
|
|
Revoke DecideApprovalJSONBodyDecision = "revoke"
|
|
)
|
|
|
|
// Defines values for ListClassificationsParamsRoute.
|
|
const (
|
|
ListClassificationsParamsRouteAutoAct ListClassificationsParamsRoute = "auto-act"
|
|
ListClassificationsParamsRouteEscalate ListClassificationsParamsRoute = "escalate"
|
|
ListClassificationsParamsRouteHold ListClassificationsParamsRoute = "hold"
|
|
)
|
|
|
|
// Defines values for GetEntityRelationsParamsDirection.
|
|
const (
|
|
Both GetEntityRelationsParamsDirection = "both"
|
|
In GetEntityRelationsParamsDirection = "in"
|
|
Out GetEntityRelationsParamsDirection = "out"
|
|
)
|
|
|
|
// Defines values for GetGraphParamsInclude.
|
|
const (
|
|
Status GetGraphParamsInclude = "status"
|
|
)
|
|
|
|
// Defines values for QueryMetricsParamsRollup.
|
|
const (
|
|
QueryMetricsParamsRollupAuto QueryMetricsParamsRollup = "auto"
|
|
QueryMetricsParamsRollupN1d QueryMetricsParamsRollup = "1d"
|
|
QueryMetricsParamsRollupN1h QueryMetricsParamsRollup = "1h"
|
|
QueryMetricsParamsRollupRaw QueryMetricsParamsRollup = "raw"
|
|
)
|
|
|
|
// Defines values for PatchPatternJSONBodyStatus.
|
|
const (
|
|
PatchPatternJSONBodyStatusActive PatchPatternJSONBodyStatus = "active"
|
|
PatchPatternJSONBodyStatusDeprecated PatchPatternJSONBodyStatus = "deprecated"
|
|
PatchPatternJSONBodyStatusInvalidated PatchPatternJSONBodyStatus = "invalidated"
|
|
PatchPatternJSONBodyStatusValidated PatchPatternJSONBodyStatus = "validated"
|
|
)
|
|
|
|
// Defines values for ListSignalsParamsSeverity.
|
|
const (
|
|
Critical ListSignalsParamsSeverity = "critical"
|
|
Info ListSignalsParamsSeverity = "info"
|
|
Warning ListSignalsParamsSeverity = "warning"
|
|
)
|
|
|
|
// Defines values for PatchSkillJSONBodyStatus.
|
|
const (
|
|
PatchSkillJSONBodyStatusActive PatchSkillJSONBodyStatus = "active"
|
|
PatchSkillJSONBodyStatusDeprecated PatchSkillJSONBodyStatus = "deprecated"
|
|
PatchSkillJSONBodyStatusTested PatchSkillJSONBodyStatus = "tested"
|
|
)
|
|
|
|
// AgentActivity defines model for AgentActivity.
|
|
type AgentActivity struct {
|
|
ActivityType AgentActivityActivityType `json:"activity_type"`
|
|
AgentId string `json:"agent_id"`
|
|
CorrelationId *string `json:"correlation_id"`
|
|
DurationMs *int `json:"duration_ms"`
|
|
EntityId *string `json:"entity_id"`
|
|
Id int `json:"id"`
|
|
InputSummary *string `json:"input_summary"`
|
|
OutputSummary *string `json:"output_summary"`
|
|
SessionId *string `json:"session_id"`
|
|
Success *bool `json:"success"`
|
|
TokenCount *int `json:"token_count"`
|
|
ToolName *string `json:"tool_name"`
|
|
Ts time.Time `json:"ts"`
|
|
}
|
|
|
|
// AgentActivityActivityType defines model for AgentActivity.ActivityType.
|
|
type AgentActivityActivityType string
|
|
|
|
// Approval defines model for Approval.
|
|
type Approval struct {
|
|
Action string `json:"action"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
DecidedAt *time.Time `json:"decided_at"`
|
|
DecidedBy *string `json:"decided_by"`
|
|
ExpiresAt time.Time `json:"expires_at"`
|
|
Id openapi_types.UUID `json:"id"`
|
|
Kind ApprovalKind `json:"kind"`
|
|
|
|
// Payload e.g. proposed policy diff
|
|
Payload *map[string]interface{} `json:"payload"`
|
|
RiskClass string `json:"risk_class"`
|
|
Slug string `json:"slug"`
|
|
Status ApprovalStatus `json:"status"`
|
|
|
|
// Subject Entity slug the approval concerns
|
|
Subject *string `json:"subject"`
|
|
}
|
|
|
|
// ApprovalKind defines model for Approval.Kind.
|
|
type ApprovalKind string
|
|
|
|
// ApprovalStatus defines model for Approval.Status.
|
|
type ApprovalStatus string
|
|
|
|
// ApprovalRule defines model for ApprovalRule.
|
|
type ApprovalRule struct {
|
|
Action string `json:"action"`
|
|
AutonomyLevel ApprovalRuleAutonomyLevel `json:"autonomy_level"`
|
|
|
|
// EntityType May be abstract (inherits down)
|
|
EntityType *string `json:"entity_type"`
|
|
Id openapi_types.UUID `json:"id"`
|
|
RiskClass string `json:"risk_class"`
|
|
|
|
// ScopeEntity Entity slug for per-entity overrides
|
|
ScopeEntity *string `json:"scope_entity"`
|
|
Version int `json:"version"`
|
|
}
|
|
|
|
// ApprovalRuleAutonomyLevel defines model for ApprovalRule.AutonomyLevel.
|
|
type ApprovalRuleAutonomyLevel string
|
|
|
|
// ApprovalRuleCreate defines model for ApprovalRuleCreate.
|
|
type ApprovalRuleCreate struct {
|
|
Action string `json:"action"`
|
|
AutonomyLevel ApprovalRuleCreateAutonomyLevel `json:"autonomy_level"`
|
|
EntityType *string `json:"entity_type,omitempty"`
|
|
RiskClass string `json:"risk_class"`
|
|
ScopeEntity *string `json:"scope_entity,omitempty"`
|
|
}
|
|
|
|
// ApprovalRuleCreateAutonomyLevel defines model for ApprovalRuleCreate.AutonomyLevel.
|
|
type ApprovalRuleCreateAutonomyLevel string
|
|
|
|
// AuditEntry defines model for AuditEntry.
|
|
type AuditEntry struct {
|
|
Action string `json:"action"`
|
|
ActorId *string `json:"actor_id"`
|
|
ActorType AuditEntryActorType `json:"actor_type"`
|
|
CorrelationId *string `json:"correlation_id"`
|
|
Detail *map[string]interface{} `json:"detail,omitempty"`
|
|
EntityId *string `json:"entity_id"`
|
|
Id int `json:"id"`
|
|
Method *string `json:"method"`
|
|
Path *string `json:"path"`
|
|
SourceIp *string `json:"source_ip"`
|
|
StatusCode *int `json:"status_code"`
|
|
Ts time.Time `json:"ts"`
|
|
}
|
|
|
|
// AuditEntryActorType defines model for AuditEntry.ActorType.
|
|
type AuditEntryActorType string
|
|
|
|
// AutonomySetting defines model for AutonomySetting.
|
|
type AutonomySetting struct {
|
|
Key string `json:"key"`
|
|
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
|
Value string `json:"value"`
|
|
Version int `json:"version"`
|
|
}
|
|
|
|
// Check defines model for Check.
|
|
type Check struct {
|
|
// Config Validated per-kind
|
|
Config *map[string]interface{} `json:"config,omitempty"`
|
|
Enabled bool `json:"enabled"`
|
|
Id openapi_types.UUID `json:"id"`
|
|
IntervalS int `json:"interval_s"`
|
|
Kind CheckKind `json:"kind"`
|
|
Slug string `json:"slug"`
|
|
|
|
// Target Entity slug (instance-scoped)
|
|
Target *string `json:"target"`
|
|
|
|
// TargetType Entity type (type-scoped)
|
|
TargetType *string `json:"target_type"`
|
|
TimeoutS int `json:"timeout_s"`
|
|
Version int `json:"version"`
|
|
Zone *string `json:"zone"`
|
|
}
|
|
|
|
// CheckKind defines model for Check.Kind.
|
|
type CheckKind string
|
|
|
|
// CheckCreate defines model for CheckCreate.
|
|
type CheckCreate struct {
|
|
Config *map[string]interface{} `json:"config,omitempty"`
|
|
Enabled *bool `json:"enabled,omitempty"`
|
|
IntervalS *int `json:"interval_s,omitempty"`
|
|
Kind CheckCreateKind `json:"kind"`
|
|
Slug string `json:"slug"`
|
|
Target *string `json:"target,omitempty"`
|
|
TargetType *string `json:"target_type,omitempty"`
|
|
TimeoutS *int `json:"timeout_s,omitempty"`
|
|
Zone *string `json:"zone,omitempty"`
|
|
}
|
|
|
|
// CheckCreateKind defines model for CheckCreate.Kind.
|
|
type CheckCreateKind string
|
|
|
|
// CheckPatch defines model for CheckPatch.
|
|
type CheckPatch struct {
|
|
Config *map[string]interface{} `json:"config,omitempty"`
|
|
Enabled *bool `json:"enabled,omitempty"`
|
|
IntervalS *int `json:"interval_s,omitempty"`
|
|
TimeoutS *int `json:"timeout_s,omitempty"`
|
|
}
|
|
|
|
// Classification defines model for Classification.
|
|
type Classification struct {
|
|
Action string `json:"action"`
|
|
AutonomyCheck *string `json:"autonomy_check,omitempty"`
|
|
BlastRadius *[]string `json:"blast_radius,omitempty"`
|
|
CorrelationId string `json:"correlation_id"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
Id openapi_types.UUID `json:"id"`
|
|
PatternConfidence *float32 `json:"pattern_confidence"`
|
|
Reasoning map[string]interface{} `json:"reasoning"`
|
|
RecommendedAction *map[string]interface{} `json:"recommended_action"`
|
|
RiskClass string `json:"risk_class"`
|
|
Route ClassificationRoute `json:"route"`
|
|
SignalId *string `json:"signal_id"`
|
|
SkillId *string `json:"skill_id"`
|
|
Target *string `json:"target"`
|
|
}
|
|
|
|
// ClassificationRoute defines model for Classification.Route.
|
|
type ClassificationRoute string
|
|
|
|
// ClientContext defines model for ClientContext.
|
|
type ClientContext struct {
|
|
// AgentFilesChanged Paths of agent instruction files that changed
|
|
AgentFilesChanged *[]string `json:"agent_files_changed,omitempty"`
|
|
|
|
// Since Timestamp for the next poll request
|
|
Since *time.Time `json:"since,omitempty"`
|
|
|
|
// SopsConfigChanged True if .sops.yaml recipients changed
|
|
SopsConfigChanged *bool `json:"sops_config_changed,omitempty"`
|
|
|
|
// ToolsChanged Paths of tools/*.setup.sh that changed
|
|
ToolsChanged *[]string `json:"tools_changed,omitempty"`
|
|
|
|
// Version Monotonic context version number
|
|
Version int `json:"version"`
|
|
}
|
|
|
|
// ClientSecrets defines model for ClientSecrets.
|
|
type ClientSecrets struct {
|
|
// Keys Infisical secret keys accessible to this client
|
|
Keys []string `json:"keys"`
|
|
}
|
|
|
|
// DashboardSummary defines model for DashboardSummary.
|
|
type DashboardSummary struct {
|
|
ApprovalsPending int `json:"approvals_pending"`
|
|
|
|
// EntitiesByState entity counts keyed by state
|
|
EntitiesByState map[string]int `json:"entities_by_state"`
|
|
|
|
// EntitiesByType entity counts keyed by type
|
|
EntitiesByType map[string]int `json:"entities_by_type"`
|
|
|
|
// EventRate event counts bucketed by 5-minute interval, most recent last
|
|
EventRate []struct {
|
|
Bucket time.Time `json:"bucket"`
|
|
Count int `json:"count"`
|
|
} `json:"event_rate"`
|
|
|
|
// ExecutionsByState execution counts keyed by state, last 24h
|
|
ExecutionsByState map[string]int `json:"executions_by_state"`
|
|
Health struct {
|
|
Degraded int `json:"degraded"`
|
|
Down int `json:"down"`
|
|
Healthy int `json:"healthy"`
|
|
Unknown int `json:"unknown"`
|
|
} `json:"health"`
|
|
|
|
// SignalsBySeverity open (non-resolved) signal counts keyed by severity
|
|
SignalsBySeverity map[string]int `json:"signals_by_severity"`
|
|
}
|
|
|
|
// EnrollRequest defines model for EnrollRequest.
|
|
type EnrollRequest struct {
|
|
// Hostname Actual hostname of the enrolling machine
|
|
Hostname *string `json:"hostname,omitempty"`
|
|
|
|
// MeshIp Source mesh IP for identity validation
|
|
MeshIp *string `json:"mesh_ip,omitempty"`
|
|
|
|
// Slug Entity slug (e.g. ws:new-laptop)
|
|
Slug string `json:"slug"`
|
|
}
|
|
|
|
// EnrollResponse defines model for EnrollResponse.
|
|
type EnrollResponse struct {
|
|
// AgePrivateKey AGE-SECRET-KEY-... for local decryption
|
|
AgePrivateKey string `json:"age_private_key"`
|
|
|
|
// AgePublicKey age1... public key for SOPS recipients
|
|
AgePublicKey string `json:"age_public_key"`
|
|
|
|
// InfisicalClientId Infisical UniversalAuth client ID
|
|
InfisicalClientId string `json:"infisical_client_id"`
|
|
|
|
// InfisicalClientSecret Infisical UniversalAuth client secret
|
|
InfisicalClientSecret string `json:"infisical_client_secret"`
|
|
|
|
// MachineIdentityToken Infisical machine identity access token
|
|
MachineIdentityToken *string `json:"machine_identity_token,omitempty"`
|
|
}
|
|
|
|
// Entity defines model for Entity.
|
|
type Entity struct {
|
|
Attributes *map[string]interface{} `json:"attributes,omitempty"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
Id openapi_types.UUID `json:"id"`
|
|
MaintenanceUntil *time.Time `json:"maintenance_until"`
|
|
Name string `json:"name"`
|
|
Slug string `json:"slug"`
|
|
State *string `json:"state"`
|
|
Type string `json:"type"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
Version int `json:"version"`
|
|
}
|
|
|
|
// EntityCreate defines model for EntityCreate.
|
|
type EntityCreate struct {
|
|
// Attributes Validated against the type's attribute_schema
|
|
Attributes *map[string]interface{} `json:"attributes,omitempty"`
|
|
Name string `json:"name"`
|
|
Slug string `json:"slug"`
|
|
|
|
// State Defaults to the lifecycle's default_state
|
|
State *string `json:"state,omitempty"`
|
|
|
|
// Type Must be a non-abstract entity type
|
|
Type string `json:"type"`
|
|
}
|
|
|
|
// EntityPatch At least one of the fields must be present.
|
|
type EntityPatch struct {
|
|
// Attributes Merged; validated against attribute_schema
|
|
Attributes *map[string]interface{} `json:"attributes,omitempty"`
|
|
MaintenanceUntil *time.Time `json:"maintenance_until"`
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
// State Target lifecycle state (transition validated)
|
|
State *string `json:"state,omitempty"`
|
|
}
|
|
|
|
// EntityType defines model for EntityType.
|
|
type EntityType struct {
|
|
// AttributeSchema JSON Schema
|
|
AttributeSchema *map[string]interface{} `json:"attribute_schema"`
|
|
Description *string `json:"description,omitempty"`
|
|
Domain string `json:"domain"`
|
|
IsAbstract bool `json:"is_abstract"`
|
|
Layer EntityTypeLayer `json:"layer"`
|
|
LifecycleId *string `json:"lifecycle_id"`
|
|
Name string `json:"name"`
|
|
ParentType *string `json:"parent_type"`
|
|
SchemaVersion *int `json:"schema_version,omitempty"`
|
|
Status EntityTypeStatus `json:"status"`
|
|
Version *int `json:"version,omitempty"`
|
|
}
|
|
|
|
// EntityTypeLayer defines model for EntityType.Layer.
|
|
type EntityTypeLayer string
|
|
|
|
// EntityTypeStatus defines model for EntityType.Status.
|
|
type EntityTypeStatus string
|
|
|
|
// EntityTypeCreate defines model for EntityTypeCreate.
|
|
type EntityTypeCreate struct {
|
|
AttributeSchema *map[string]interface{} `json:"attribute_schema,omitempty"`
|
|
Description *string `json:"description,omitempty"`
|
|
Domain string `json:"domain"`
|
|
IsAbstract *bool `json:"is_abstract,omitempty"`
|
|
Layer EntityTypeCreateLayer `json:"layer"`
|
|
LifecycleId *string `json:"lifecycle_id,omitempty"`
|
|
Name string `json:"name"`
|
|
ParentType *string `json:"parent_type,omitempty"`
|
|
}
|
|
|
|
// EntityTypeCreateLayer defines model for EntityTypeCreate.Layer.
|
|
type EntityTypeCreateLayer string
|
|
|
|
// EntityTypePatch defines model for EntityTypePatch.
|
|
type EntityTypePatch struct {
|
|
AttributeSchema *map[string]interface{} `json:"attribute_schema,omitempty"`
|
|
Description *string `json:"description,omitempty"`
|
|
Status *EntityTypePatchStatus `json:"status,omitempty"`
|
|
}
|
|
|
|
// EntityTypePatchStatus defines model for EntityTypePatch.Status.
|
|
type EntityTypePatchStatus string
|
|
|
|
// Event defines model for Event.
|
|
type Event struct {
|
|
CorrelationId *string `json:"correlation_id"`
|
|
Data *map[string]interface{} `json:"data,omitempty"`
|
|
EntityId *string `json:"entity_id"`
|
|
Id int `json:"id"`
|
|
Severity EventSeverity `json:"severity"`
|
|
Source string `json:"source"`
|
|
Ts time.Time `json:"ts"`
|
|
Type string `json:"type"`
|
|
}
|
|
|
|
// EventSeverity defines model for Event.Severity.
|
|
type EventSeverity string
|
|
|
|
// Execution defines model for Execution.
|
|
type Execution struct {
|
|
Action string `json:"action"`
|
|
AgentId *string `json:"agent_id"`
|
|
ApprovalId *string `json:"approval_id"`
|
|
ClassificationId *string `json:"classification_id"`
|
|
CompletedAt *time.Time `json:"completed_at"`
|
|
CorrelationId string `json:"correlation_id"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
DurationMs *int `json:"duration_ms"`
|
|
Id openapi_types.UUID `json:"id"`
|
|
|
|
// Params Skill params (validated against params_schema)
|
|
Params *map[string]interface{} `json:"params,omitempty"`
|
|
Result *map[string]interface{} `json:"result"`
|
|
RiskClass string `json:"risk_class"`
|
|
SignalId *string `json:"signal_id"`
|
|
SkillId *string `json:"skill_id"`
|
|
SkillVersion *int `json:"skill_version"`
|
|
Slug string `json:"slug"`
|
|
StartedAt *time.Time `json:"started_at"`
|
|
Status ExecutionStatus `json:"status"`
|
|
Target *string `json:"target"`
|
|
Verified *bool `json:"verified,omitempty"`
|
|
}
|
|
|
|
// ExecutionStatus defines model for Execution.Status.
|
|
type ExecutionStatus string
|
|
|
|
// ExecutionRequest defines model for ExecutionRequest.
|
|
type ExecutionRequest struct {
|
|
Action string `json:"action"`
|
|
Params *map[string]interface{} `json:"params,omitempty"`
|
|
Reason *string `json:"reason,omitempty"`
|
|
|
|
// SignalId Signal that motivated this (optional)
|
|
SignalId *string `json:"signal_id,omitempty"`
|
|
|
|
// Target Entity UUID or slug
|
|
Target string `json:"target"`
|
|
}
|
|
|
|
// GraphView defines model for GraphView.
|
|
type GraphView struct {
|
|
Edges []Relationship `json:"edges"`
|
|
|
|
// Health entity id -> health, present when include=status was requested
|
|
Health *map[string]GraphViewHealth `json:"health,omitempty"`
|
|
Nodes []Entity `json:"nodes"`
|
|
|
|
// Truncated True if node cap was hit
|
|
Truncated *bool `json:"truncated,omitempty"`
|
|
}
|
|
|
|
// GraphViewHealth defines model for GraphView.Health.
|
|
type GraphViewHealth string
|
|
|
|
// HealthSummary defines model for HealthSummary.
|
|
type HealthSummary struct {
|
|
Entities []struct {
|
|
Health HealthSummaryEntitiesHealth `json:"health"`
|
|
LastCheckAt *time.Time `json:"last_check_at"`
|
|
Slug string `json:"slug"`
|
|
Trend *HealthSummaryEntitiesTrend `json:"trend"`
|
|
Type string `json:"type"`
|
|
} `json:"entities"`
|
|
Summary struct {
|
|
Degraded int `json:"degraded"`
|
|
Down int `json:"down"`
|
|
Healthy int `json:"healthy"`
|
|
Unknown int `json:"unknown"`
|
|
} `json:"summary"`
|
|
}
|
|
|
|
// HealthSummaryEntitiesHealth defines model for HealthSummary.Entities.Health.
|
|
type HealthSummaryEntitiesHealth string
|
|
|
|
// HealthSummaryEntitiesTrend defines model for HealthSummary.Entities.Trend.
|
|
type HealthSummaryEntitiesTrend string
|
|
|
|
// KnowledgeHit defines model for KnowledgeHit.
|
|
type KnowledgeHit struct {
|
|
Id openapi_types.UUID `json:"id"`
|
|
LinkedEntities *[]string `json:"linked_entities,omitempty"`
|
|
Rank *float32 `json:"rank"`
|
|
Slug string `json:"slug"`
|
|
|
|
// Snippet Highlighted match context
|
|
Snippet *string `json:"snippet"`
|
|
SourcePath *string `json:"source_path"`
|
|
Title string `json:"title"`
|
|
Type KnowledgeHitType `json:"type"`
|
|
}
|
|
|
|
// KnowledgeHitType defines model for KnowledgeHit.Type.
|
|
type KnowledgeHitType string
|
|
|
|
// LifecycleDef defines model for LifecycleDef.
|
|
type LifecycleDef struct {
|
|
DefaultState string `json:"default_state"`
|
|
Id string `json:"id"`
|
|
States []string `json:"states"`
|
|
TerminalStates *[]string `json:"terminal_states,omitempty"`
|
|
|
|
// Transitions {from: {to: {requires: [named-check, ...]}}}
|
|
Transitions map[string]interface{} `json:"transitions"`
|
|
}
|
|
|
|
// MetricSeries defines model for MetricSeries.
|
|
type MetricSeries struct {
|
|
EntityId string `json:"entity_id"`
|
|
Metric string `json:"metric"`
|
|
Rollup MetricSeriesRollup `json:"rollup"`
|
|
Samples []struct {
|
|
Avg *float32 `json:"avg"`
|
|
Count *int `json:"count"`
|
|
Max *float32 `json:"max"`
|
|
Min *float32 `json:"min"`
|
|
Ts time.Time `json:"ts"`
|
|
|
|
// Value Raw sample value
|
|
Value *float32 `json:"value"`
|
|
} `json:"samples"`
|
|
Trend *Trend `json:"trend,omitempty"`
|
|
}
|
|
|
|
// MetricSeriesRollup defines model for MetricSeries.Rollup.
|
|
type MetricSeriesRollup string
|
|
|
|
// Pattern defines model for Pattern.
|
|
type Pattern struct {
|
|
Action string `json:"action"`
|
|
AppliesType string `json:"applies_type"`
|
|
|
|
// Confidence Wilson lower bound, capped by evidence_count/5
|
|
Confidence float32 `json:"confidence"`
|
|
EvidenceCount int `json:"evidence_count"`
|
|
FailureCount *int `json:"failure_count,omitempty"`
|
|
Id openapi_types.UUID `json:"id"`
|
|
LastValidatedAt *time.Time `json:"last_validated_at"`
|
|
Pattern string `json:"pattern"`
|
|
Quarantined *bool `json:"quarantined,omitempty"`
|
|
Slug string `json:"slug"`
|
|
Status PatternStatus `json:"status"`
|
|
SuccessCount *int `json:"success_count,omitempty"`
|
|
Version int `json:"version"`
|
|
}
|
|
|
|
// PatternStatus defines model for Pattern.Status.
|
|
type PatternStatus string
|
|
|
|
// Problem defines model for Problem.
|
|
type Problem struct {
|
|
Detail *string `json:"detail,omitempty"`
|
|
|
|
// Errors Field-level validation errors (422)
|
|
Errors *[]struct {
|
|
Field string `json:"field"`
|
|
Reason string `json:"reason"`
|
|
} `json:"errors,omitempty"`
|
|
Instance *string `json:"instance,omitempty"`
|
|
Status int `json:"status"`
|
|
Title string `json:"title"`
|
|
Type *string `json:"type,omitempty"`
|
|
}
|
|
|
|
// ProvisionRequest defines model for ProvisionRequest.
|
|
type ProvisionRequest struct {
|
|
// Attributes VMID, cores, ram_mb, disk_gb, ip, template, mounts, services
|
|
Attributes *map[string]interface{} `json:"attributes,omitempty"`
|
|
|
|
// Host Slug of the Proxmox host (e.g. host:hubris)
|
|
Host string `json:"host"`
|
|
|
|
// Name Human-readable name
|
|
Name string `json:"name"`
|
|
|
|
// Slug e.g. lxc:jellyfin
|
|
Slug string `json:"slug"`
|
|
|
|
// Type Must be lxc, vm, or docker-container
|
|
Type string `json:"type"`
|
|
}
|
|
|
|
// ProvisionResponse defines model for ProvisionResponse.
|
|
type ProvisionResponse struct {
|
|
Entity Entity `json:"entity"`
|
|
|
|
// ExecutionId Execution ID to track provisioning progress
|
|
ExecutionId openapi_types.UUID `json:"execution_id"`
|
|
}
|
|
|
|
// ProvisionStatus defines model for ProvisionStatus.
|
|
type ProvisionStatus struct {
|
|
// Error Overall error if provisioning failed
|
|
Error *string `json:"error"`
|
|
Slug string `json:"slug"`
|
|
|
|
// State Current entity state
|
|
State string `json:"state"`
|
|
Steps []struct {
|
|
ErrorMessage *string `json:"error_message"`
|
|
FinishedAt *time.Time `json:"finished_at"`
|
|
StartedAt *time.Time `json:"started_at"`
|
|
Status ProvisionStatusStepsStatus `json:"status"`
|
|
Step string `json:"step"`
|
|
} `json:"steps"`
|
|
}
|
|
|
|
// ProvisionStatusStepsStatus defines model for ProvisionStatus.Steps.Status.
|
|
type ProvisionStatusStepsStatus string
|
|
|
|
// Relationship defines model for Relationship.
|
|
type Relationship struct {
|
|
Attributes *map[string]interface{} `json:"attributes"`
|
|
|
|
// Source Slug of source entity
|
|
Source string `json:"source"`
|
|
|
|
// Target Slug of target entity
|
|
Target string `json:"target"`
|
|
Type string `json:"type"`
|
|
ValidFrom time.Time `json:"valid_from"`
|
|
ValidTo *time.Time `json:"valid_to"`
|
|
}
|
|
|
|
// RelationshipCreate defines model for RelationshipCreate.
|
|
type RelationshipCreate struct {
|
|
Attributes *map[string]interface{} `json:"attributes,omitempty"`
|
|
|
|
// Source UUID or slug
|
|
Source string `json:"source"`
|
|
|
|
// Target UUID or slug
|
|
Target string `json:"target"`
|
|
Type string `json:"type"`
|
|
}
|
|
|
|
// RelationshipType defines model for RelationshipType.
|
|
type RelationshipType struct {
|
|
Cardinality RelationshipTypeCardinality `json:"cardinality"`
|
|
Description *string `json:"description,omitempty"`
|
|
Inverse *string `json:"inverse"`
|
|
Name string `json:"name"`
|
|
|
|
// SourceType May be abstract
|
|
SourceType string `json:"source_type"`
|
|
|
|
// TargetType May be abstract
|
|
TargetType string `json:"target_type"`
|
|
}
|
|
|
|
// RelationshipTypeCardinality defines model for RelationshipType.Cardinality.
|
|
type RelationshipTypeCardinality string
|
|
|
|
// RiskClass defines model for RiskClass.
|
|
type RiskClass struct {
|
|
ApprovalRequired RiskClassApprovalRequired `json:"approval_required"`
|
|
AutonomyAllowed bool `json:"autonomy_allowed"`
|
|
Description *string `json:"description,omitempty"`
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
// RiskClassApprovalRequired defines model for RiskClass.ApprovalRequired.
|
|
type RiskClassApprovalRequired string
|
|
|
|
// Signal defines model for Signal.
|
|
type Signal struct {
|
|
CheckId *string `json:"check_id"`
|
|
Evidence *string `json:"evidence"`
|
|
FirstSeenAt time.Time `json:"first_seen_at"`
|
|
FlapCount *int `json:"flap_count,omitempty"`
|
|
HoldDownUntil *time.Time `json:"hold_down_until"`
|
|
Id openapi_types.UUID `json:"id"`
|
|
Kind string `json:"kind"`
|
|
LastSeenAt time.Time `json:"last_seen_at"`
|
|
LikelyCause *string `json:"likely_cause"`
|
|
MuteUntil *time.Time `json:"mute_until"`
|
|
OccurrenceCount int `json:"occurrence_count"`
|
|
Severity SignalSeverity `json:"severity"`
|
|
Slug string `json:"slug"`
|
|
State SignalState `json:"state"`
|
|
|
|
// Target Slug of the entity this concerns
|
|
Target *string `json:"target"`
|
|
}
|
|
|
|
// SignalSeverity defines model for Signal.Severity.
|
|
type SignalSeverity string
|
|
|
|
// SignalState defines model for Signal.State.
|
|
type SignalState string
|
|
|
|
// Skill defines model for Skill.
|
|
type Skill struct {
|
|
Action string `json:"action"`
|
|
AppliesType *string `json:"applies_type"`
|
|
ChangeReason *string `json:"change_reason"`
|
|
ChangedBy *string `json:"changed_by"`
|
|
Id openapi_types.UUID `json:"id"`
|
|
LastUsedAt *time.Time `json:"last_used_at"`
|
|
Name string `json:"name"`
|
|
PatternIds *[]string `json:"pattern_ids,omitempty"`
|
|
|
|
// Procedure Structured steps/verify/rollback/params (plan R3-9)
|
|
Procedure struct {
|
|
ExpectedDurationS *int `json:"expected_duration_s,omitempty"`
|
|
KnownFailureModes *[]string `json:"known_failure_modes,omitempty"`
|
|
ParamsSchema *map[string]interface{} `json:"params_schema,omitempty"`
|
|
Rollback *[]SkillStep `json:"rollback,omitempty"`
|
|
Steps []SkillStep `json:"steps"`
|
|
Verify []SkillStep `json:"verify"`
|
|
} `json:"procedure"`
|
|
Slug string `json:"slug"`
|
|
Status SkillStatus `json:"status"`
|
|
SuccessRate *float32 `json:"success_rate"`
|
|
Version int `json:"version"`
|
|
}
|
|
|
|
// SkillStatus defines model for Skill.Status.
|
|
type SkillStatus string
|
|
|
|
// SkillStep defines model for SkillStep.
|
|
type SkillStep struct {
|
|
// Command Go template over params
|
|
Command string `json:"command"`
|
|
Expect *struct {
|
|
ExitCode *int `json:"exit_code,omitempty"`
|
|
StdoutContains *string `json:"stdout_contains,omitempty"`
|
|
} `json:"expect,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Retry *struct {
|
|
Attempts *int `json:"attempts,omitempty"`
|
|
DelayS *int `json:"delay_s,omitempty"`
|
|
} `json:"retry,omitempty"`
|
|
Runner SkillStepRunner `json:"runner"`
|
|
|
|
// Target Go template over params
|
|
Target *string `json:"target,omitempty"`
|
|
TimeoutS *int `json:"timeout_s,omitempty"`
|
|
}
|
|
|
|
// SkillStepRunner defines model for SkillStep.Runner.
|
|
type SkillStepRunner string
|
|
|
|
// Trend defines model for Trend.
|
|
type Trend struct {
|
|
Anomaly *bool `json:"anomaly,omitempty"`
|
|
Direction TrendDirection `json:"direction"`
|
|
|
|
// Forecast Simple linear projection, 7d out
|
|
Forecast *float32 `json:"forecast"`
|
|
Metric string `json:"metric"`
|
|
|
|
// Slope Linear fit per day
|
|
Slope *float32 `json:"slope"`
|
|
}
|
|
|
|
// TrendDirection defines model for Trend.Direction.
|
|
type TrendDirection string
|
|
|
|
// Cursor defines model for Cursor.
|
|
type Cursor = string
|
|
|
|
// EntityId defines model for EntityId.
|
|
type EntityId = string
|
|
|
|
// EntitySlug defines model for EntitySlug.
|
|
type EntitySlug = string
|
|
|
|
// FromTime defines model for FromTime.
|
|
type FromTime = time.Time
|
|
|
|
// IdempotencyKey defines model for IdempotencyKey.
|
|
type IdempotencyKey = string
|
|
|
|
// IfMatch defines model for IfMatch.
|
|
type IfMatch = string
|
|
|
|
// Limit defines model for Limit.
|
|
type Limit = int
|
|
|
|
// ToTime defines model for ToTime.
|
|
type ToTime = time.Time
|
|
|
|
// PendingApproval defines model for PendingApproval.
|
|
type PendingApproval = Approval
|
|
|
|
// SignalUpdated defines model for SignalUpdated.
|
|
type SignalUpdated = Signal
|
|
|
|
// QueryAgentActivityParams defines parameters for QueryAgentActivity.
|
|
type QueryAgentActivityParams struct {
|
|
AgentId *string `form:"agent_id,omitempty" json:"agent_id,omitempty"`
|
|
ActivityType *string `form:"activity_type,omitempty" json:"activity_type,omitempty"`
|
|
EntityId *string `form:"entity_id,omitempty" json:"entity_id,omitempty"`
|
|
From *FromTime `form:"from,omitempty" json:"from,omitempty"`
|
|
To *ToTime `form:"to,omitempty" json:"to,omitempty"`
|
|
|
|
// Cursor Opaque cursor from a previous response's next_cursor
|
|
Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
|
|
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
|
|
}
|
|
|
|
// ListApprovalsParams defines parameters for ListApprovals.
|
|
type ListApprovalsParams struct {
|
|
Status *ListApprovalsParamsStatus `form:"status,omitempty" json:"status,omitempty"`
|
|
Kind *ListApprovalsParamsKind `form:"kind,omitempty" json:"kind,omitempty"`
|
|
|
|
// Cursor Opaque cursor from a previous response's next_cursor
|
|
Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
|
|
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
|
|
}
|
|
|
|
// ListApprovalsParamsStatus defines parameters for ListApprovals.
|
|
type ListApprovalsParamsStatus string
|
|
|
|
// ListApprovalsParamsKind defines parameters for ListApprovals.
|
|
type ListApprovalsParamsKind string
|
|
|
|
// DecideApprovalJSONBody defines parameters for DecideApproval.
|
|
type DecideApprovalJSONBody struct {
|
|
Decision DecideApprovalJSONBodyDecision `json:"decision"`
|
|
Note *string `json:"note,omitempty"`
|
|
|
|
// Token HMAC approval token (single-use, verified server-side)
|
|
Token *string `json:"token,omitempty"`
|
|
}
|
|
|
|
// DecideApprovalParams defines parameters for DecideApproval.
|
|
type DecideApprovalParams struct {
|
|
// IdempotencyKey Client-generated key; replays within 24h return the original response
|
|
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
|
|
}
|
|
|
|
// DecideApprovalJSONBodyDecision defines parameters for DecideApproval.
|
|
type DecideApprovalJSONBodyDecision string
|
|
|
|
// QueryAuditParams defines parameters for QueryAudit.
|
|
type QueryAuditParams struct {
|
|
ActorType *string `form:"actor_type,omitempty" json:"actor_type,omitempty"`
|
|
ActorId *string `form:"actor_id,omitempty" json:"actor_id,omitempty"`
|
|
EntityId *string `form:"entity_id,omitempty" json:"entity_id,omitempty"`
|
|
Action *string `form:"action,omitempty" json:"action,omitempty"`
|
|
CorrelationId *string `form:"correlation_id,omitempty" json:"correlation_id,omitempty"`
|
|
From *FromTime `form:"from,omitempty" json:"from,omitempty"`
|
|
To *ToTime `form:"to,omitempty" json:"to,omitempty"`
|
|
|
|
// Cursor Opaque cursor from a previous response's next_cursor
|
|
Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
|
|
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
|
|
}
|
|
|
|
// ListChecksParams defines parameters for ListChecks.
|
|
type ListChecksParams struct {
|
|
Kind *string `form:"kind,omitempty" json:"kind,omitempty"`
|
|
Target *string `form:"target,omitempty" json:"target,omitempty"`
|
|
Enabled *bool `form:"enabled,omitempty" json:"enabled,omitempty"`
|
|
|
|
// Cursor Opaque cursor from a previous response's next_cursor
|
|
Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
|
|
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
|
|
}
|
|
|
|
// CreateCheckParams defines parameters for CreateCheck.
|
|
type CreateCheckParams struct {
|
|
// IdempotencyKey Client-generated key; replays within 24h return the original response
|
|
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
|
|
}
|
|
|
|
// PatchCheckParams defines parameters for PatchCheck.
|
|
type PatchCheckParams struct {
|
|
// IfMatch ETag from a prior GET; 412 on version mismatch
|
|
IfMatch IfMatch `json:"If-Match"`
|
|
}
|
|
|
|
// ListClassificationsParams defines parameters for ListClassifications.
|
|
type ListClassificationsParams struct {
|
|
SignalId *string `form:"signal_id,omitempty" json:"signal_id,omitempty"`
|
|
EntityId *string `form:"entity_id,omitempty" json:"entity_id,omitempty"`
|
|
Route *ListClassificationsParamsRoute `form:"route,omitempty" json:"route,omitempty"`
|
|
|
|
// Cursor Opaque cursor from a previous response's next_cursor
|
|
Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
|
|
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
|
|
}
|
|
|
|
// ListClassificationsParamsRoute defines parameters for ListClassifications.
|
|
type ListClassificationsParamsRoute string
|
|
|
|
// GetClientContextParams defines parameters for GetClientContext.
|
|
type GetClientContextParams struct {
|
|
// Since Return only changes since this timestamp (RFC 3339)
|
|
Since *time.Time `form:"since,omitempty" json:"since,omitempty"`
|
|
}
|
|
|
|
// ListEntitiesParams defines parameters for ListEntities.
|
|
type ListEntitiesParams struct {
|
|
// Type Filter by entity type (includes descendants)
|
|
Type *string `form:"type,omitempty" json:"type,omitempty"`
|
|
State *string `form:"state,omitempty" json:"state,omitempty"`
|
|
Domain *string `form:"domain,omitempty" json:"domain,omitempty"`
|
|
Layer *string `form:"layer,omitempty" json:"layer,omitempty"`
|
|
|
|
// Q Substring match on slug/name
|
|
Q *string `form:"q,omitempty" json:"q,omitempty"`
|
|
|
|
// Cursor Opaque cursor from a previous response's next_cursor
|
|
Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
|
|
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
|
|
}
|
|
|
|
// CreateEntityParams defines parameters for CreateEntity.
|
|
type CreateEntityParams struct {
|
|
// IdempotencyKey Client-generated key; replays within 24h return the original response
|
|
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
|
|
}
|
|
|
|
// ProvisionEntityParams defines parameters for ProvisionEntity.
|
|
type ProvisionEntityParams struct {
|
|
// IdempotencyKey Client-generated key; replays within 24h return the original response
|
|
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
|
|
}
|
|
|
|
// PatchEntityParams defines parameters for PatchEntity.
|
|
type PatchEntityParams struct {
|
|
// IfMatch ETag from a prior GET; 412 on version mismatch
|
|
IfMatch IfMatch `json:"If-Match"`
|
|
}
|
|
|
|
// GetBlastRadiusParams defines parameters for GetBlastRadius.
|
|
type GetBlastRadiusParams struct {
|
|
Depth *int `form:"depth,omitempty" json:"depth,omitempty"`
|
|
}
|
|
|
|
// GetEntityRelationsParams defines parameters for GetEntityRelations.
|
|
type GetEntityRelationsParams struct {
|
|
RelType *string `form:"rel_type,omitempty" json:"rel_type,omitempty"`
|
|
Direction *GetEntityRelationsParamsDirection `form:"direction,omitempty" json:"direction,omitempty"`
|
|
}
|
|
|
|
// GetEntityRelationsParamsDirection defines parameters for GetEntityRelations.
|
|
type GetEntityRelationsParamsDirection string
|
|
|
|
// QueryEventsParams defines parameters for QueryEvents.
|
|
type QueryEventsParams struct {
|
|
Type *string `form:"type,omitempty" json:"type,omitempty"`
|
|
EntityId *string `form:"entity_id,omitempty" json:"entity_id,omitempty"`
|
|
Severity *string `form:"severity,omitempty" json:"severity,omitempty"`
|
|
CorrelationId *string `form:"correlation_id,omitempty" json:"correlation_id,omitempty"`
|
|
From *FromTime `form:"from,omitempty" json:"from,omitempty"`
|
|
To *ToTime `form:"to,omitempty" json:"to,omitempty"`
|
|
|
|
// Cursor Opaque cursor from a previous response's next_cursor
|
|
Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
|
|
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
|
|
}
|
|
|
|
// StreamEventsParams defines parameters for StreamEvents.
|
|
type StreamEventsParams struct {
|
|
// Type Filter by event type prefix
|
|
Type *string `form:"type,omitempty" json:"type,omitempty"`
|
|
LastEventID *string `json:"Last-Event-ID,omitempty"`
|
|
}
|
|
|
|
// ListExecutionsParams defines parameters for ListExecutions.
|
|
type ListExecutionsParams struct {
|
|
Status *string `form:"status,omitempty" json:"status,omitempty"`
|
|
Target *string `form:"target,omitempty" json:"target,omitempty"`
|
|
Action *string `form:"action,omitempty" json:"action,omitempty"`
|
|
CorrelationId *string `form:"correlation_id,omitempty" json:"correlation_id,omitempty"`
|
|
|
|
// Cursor Opaque cursor from a previous response's next_cursor
|
|
Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
|
|
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
|
|
}
|
|
|
|
// RequestExecutionParams defines parameters for RequestExecution.
|
|
type RequestExecutionParams struct {
|
|
// IdempotencyKey Client-generated key; replays within 24h return the original response
|
|
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
|
|
}
|
|
|
|
// GetGraphParams defines parameters for GetGraph.
|
|
type GetGraphParams struct {
|
|
// Root Start entity (UUID or slug); omit for whole graph (capped)
|
|
Root *string `form:"root,omitempty" json:"root,omitempty"`
|
|
Depth *int `form:"depth,omitempty" json:"depth,omitempty"`
|
|
RelType *[]string `form:"rel_type,omitempty" json:"rel_type,omitempty"`
|
|
|
|
// Include include=status joins entity_status and populates GraphView.health
|
|
Include *[]GetGraphParamsInclude `form:"include,omitempty" json:"include,omitempty"`
|
|
}
|
|
|
|
// GetGraphParamsInclude defines parameters for GetGraph.
|
|
type GetGraphParamsInclude string
|
|
|
|
// SearchKnowledgeParams defines parameters for SearchKnowledge.
|
|
type SearchKnowledgeParams struct {
|
|
Q string `form:"q" json:"q"`
|
|
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
|
|
}
|
|
|
|
// QueryMetricsParams defines parameters for QueryMetrics.
|
|
type QueryMetricsParams struct {
|
|
EntityId *string `form:"entity_id,omitempty" json:"entity_id,omitempty"`
|
|
Metric *[]string `form:"metric,omitempty" json:"metric,omitempty"`
|
|
Rollup *QueryMetricsParamsRollup `form:"rollup,omitempty" json:"rollup,omitempty"`
|
|
From *FromTime `form:"from,omitempty" json:"from,omitempty"`
|
|
To *ToTime `form:"to,omitempty" json:"to,omitempty"`
|
|
}
|
|
|
|
// QueryMetricsParamsRollup defines parameters for QueryMetrics.
|
|
type QueryMetricsParamsRollup string
|
|
|
|
// CreateEntityTypeParams defines parameters for CreateEntityType.
|
|
type CreateEntityTypeParams struct {
|
|
// IdempotencyKey Client-generated key; replays within 24h return the original response
|
|
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
|
|
}
|
|
|
|
// PatchEntityTypeParams defines parameters for PatchEntityType.
|
|
type PatchEntityTypeParams struct {
|
|
// IfMatch ETag from a prior GET; 412 on version mismatch
|
|
IfMatch IfMatch `json:"If-Match"`
|
|
}
|
|
|
|
// ListPatternsParams defines parameters for ListPatterns.
|
|
type ListPatternsParams struct {
|
|
EntityType *string `form:"entity_type,omitempty" json:"entity_type,omitempty"`
|
|
Action *string `form:"action,omitempty" json:"action,omitempty"`
|
|
Status *string `form:"status,omitempty" json:"status,omitempty"`
|
|
|
|
// Cursor Opaque cursor from a previous response's next_cursor
|
|
Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
|
|
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
|
|
}
|
|
|
|
// PatchPatternJSONBody defines parameters for PatchPattern.
|
|
type PatchPatternJSONBody struct {
|
|
Note *string `json:"note,omitempty"`
|
|
Quarantined *bool `json:"quarantined,omitempty"`
|
|
Status *PatchPatternJSONBodyStatus `json:"status,omitempty"`
|
|
}
|
|
|
|
// PatchPatternParams defines parameters for PatchPattern.
|
|
type PatchPatternParams struct {
|
|
// IfMatch ETag from a prior GET; 412 on version mismatch
|
|
IfMatch IfMatch `json:"If-Match"`
|
|
}
|
|
|
|
// PatchPatternJSONBodyStatus defines parameters for PatchPattern.
|
|
type PatchPatternJSONBodyStatus string
|
|
|
|
// CreateApprovalRuleParams defines parameters for CreateApprovalRule.
|
|
type CreateApprovalRuleParams struct {
|
|
// IdempotencyKey Client-generated key; replays within 24h return the original response
|
|
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
|
|
}
|
|
|
|
// PatchApprovalRuleParams defines parameters for PatchApprovalRule.
|
|
type PatchApprovalRuleParams struct {
|
|
// IfMatch ETag from a prior GET; 412 on version mismatch
|
|
IfMatch IfMatch `json:"If-Match"`
|
|
}
|
|
|
|
// PatchAutonomySettingsJSONBody defines parameters for PatchAutonomySettings.
|
|
type PatchAutonomySettingsJSONBody map[string]string
|
|
|
|
// EndRelationshipParams defines parameters for EndRelationship.
|
|
type EndRelationshipParams struct {
|
|
Source string `form:"source" json:"source"`
|
|
Target string `form:"target" json:"target"`
|
|
RelType string `form:"rel_type" json:"rel_type"`
|
|
}
|
|
|
|
// CreateRelationshipParams defines parameters for CreateRelationship.
|
|
type CreateRelationshipParams struct {
|
|
// IdempotencyKey Client-generated key; replays within 24h return the original response
|
|
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
|
|
}
|
|
|
|
// ListSignalsParams defines parameters for ListSignals.
|
|
type ListSignalsParams struct {
|
|
State *string `form:"state,omitempty" json:"state,omitempty"`
|
|
Severity *ListSignalsParamsSeverity `form:"severity,omitempty" json:"severity,omitempty"`
|
|
EntityId *string `form:"entity_id,omitempty" json:"entity_id,omitempty"`
|
|
Kind *string `form:"kind,omitempty" json:"kind,omitempty"`
|
|
|
|
// Cursor Opaque cursor from a previous response's next_cursor
|
|
Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
|
|
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
|
|
}
|
|
|
|
// ListSignalsParamsSeverity defines parameters for ListSignals.
|
|
type ListSignalsParamsSeverity string
|
|
|
|
// MuteSignalJSONBody defines parameters for MuteSignal.
|
|
type MuteSignalJSONBody struct {
|
|
MuteUntil time.Time `json:"mute_until"`
|
|
Note *string `json:"note,omitempty"`
|
|
}
|
|
|
|
// ResolveSignalJSONBody defines parameters for ResolveSignal.
|
|
type ResolveSignalJSONBody struct {
|
|
Note *string `json:"note,omitempty"`
|
|
}
|
|
|
|
// ListSkillsParams defines parameters for ListSkills.
|
|
type ListSkillsParams struct {
|
|
AppliesTo *string `form:"applies_to,omitempty" json:"applies_to,omitempty"`
|
|
Action *string `form:"action,omitempty" json:"action,omitempty"`
|
|
Status *string `form:"status,omitempty" json:"status,omitempty"`
|
|
|
|
// Cursor Opaque cursor from a previous response's next_cursor
|
|
Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
|
|
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
|
|
}
|
|
|
|
// PatchSkillJSONBody defines parameters for PatchSkill.
|
|
type PatchSkillJSONBody struct {
|
|
Note *string `json:"note,omitempty"`
|
|
PinnedVersion *int `json:"pinned_version,omitempty"`
|
|
Status *PatchSkillJSONBodyStatus `json:"status,omitempty"`
|
|
}
|
|
|
|
// PatchSkillParams defines parameters for PatchSkill.
|
|
type PatchSkillParams struct {
|
|
// IfMatch ETag from a prior GET; 412 on version mismatch
|
|
IfMatch IfMatch `json:"If-Match"`
|
|
}
|
|
|
|
// PatchSkillJSONBodyStatus defines parameters for PatchSkill.
|
|
type PatchSkillJSONBodyStatus string
|
|
|
|
// GetTrendsParams defines parameters for GetTrends.
|
|
type GetTrendsParams struct {
|
|
From *FromTime `form:"from,omitempty" json:"from,omitempty"`
|
|
To *ToTime `form:"to,omitempty" json:"to,omitempty"`
|
|
}
|
|
|
|
// DecideApprovalJSONRequestBody defines body for DecideApproval for application/json ContentType.
|
|
type DecideApprovalJSONRequestBody DecideApprovalJSONBody
|
|
|
|
// CreateCheckJSONRequestBody defines body for CreateCheck for application/json ContentType.
|
|
type CreateCheckJSONRequestBody = CheckCreate
|
|
|
|
// PatchCheckJSONRequestBody defines body for PatchCheck for application/json ContentType.
|
|
type PatchCheckJSONRequestBody = CheckPatch
|
|
|
|
// EnrollClientJSONRequestBody defines body for EnrollClient for application/json ContentType.
|
|
type EnrollClientJSONRequestBody = EnrollRequest
|
|
|
|
// CreateEntityJSONRequestBody defines body for CreateEntity for application/json ContentType.
|
|
type CreateEntityJSONRequestBody = EntityCreate
|
|
|
|
// ProvisionEntityJSONRequestBody defines body for ProvisionEntity for application/json ContentType.
|
|
type ProvisionEntityJSONRequestBody = ProvisionRequest
|
|
|
|
// PatchEntityJSONRequestBody defines body for PatchEntity for application/json ContentType.
|
|
type PatchEntityJSONRequestBody = EntityPatch
|
|
|
|
// RequestExecutionJSONRequestBody defines body for RequestExecution for application/json ContentType.
|
|
type RequestExecutionJSONRequestBody = ExecutionRequest
|
|
|
|
// CreateEntityTypeJSONRequestBody defines body for CreateEntityType for application/json ContentType.
|
|
type CreateEntityTypeJSONRequestBody = EntityTypeCreate
|
|
|
|
// PatchEntityTypeJSONRequestBody defines body for PatchEntityType for application/json ContentType.
|
|
type PatchEntityTypeJSONRequestBody = EntityTypePatch
|
|
|
|
// PatchPatternJSONRequestBody defines body for PatchPattern for application/json ContentType.
|
|
type PatchPatternJSONRequestBody PatchPatternJSONBody
|
|
|
|
// CreateApprovalRuleJSONRequestBody defines body for CreateApprovalRule for application/json ContentType.
|
|
type CreateApprovalRuleJSONRequestBody = ApprovalRuleCreate
|
|
|
|
// PatchApprovalRuleJSONRequestBody defines body for PatchApprovalRule for application/json ContentType.
|
|
type PatchApprovalRuleJSONRequestBody = ApprovalRuleCreate
|
|
|
|
// PatchAutonomySettingsJSONRequestBody defines body for PatchAutonomySettings for application/json ContentType.
|
|
type PatchAutonomySettingsJSONRequestBody PatchAutonomySettingsJSONBody
|
|
|
|
// CreateRelationshipJSONRequestBody defines body for CreateRelationship for application/json ContentType.
|
|
type CreateRelationshipJSONRequestBody = RelationshipCreate
|
|
|
|
// MuteSignalJSONRequestBody defines body for MuteSignal for application/json ContentType.
|
|
type MuteSignalJSONRequestBody MuteSignalJSONBody
|
|
|
|
// ResolveSignalJSONRequestBody defines body for ResolveSignal for application/json ContentType.
|
|
type ResolveSignalJSONRequestBody ResolveSignalJSONBody
|
|
|
|
// PatchSkillJSONRequestBody defines body for PatchSkill for application/json ContentType.
|
|
type PatchSkillJSONRequestBody PatchSkillJSONBody
|
|
|
|
// ServerInterface represents all server handlers.
|
|
type ServerInterface interface {
|
|
// Agent behavior log
|
|
// (GET /agent-activity)
|
|
QueryAgentActivity(w http.ResponseWriter, r *http.Request, params QueryAgentActivityParams)
|
|
// List approvals
|
|
// (GET /approvals)
|
|
ListApprovals(w http.ResponseWriter, r *http.Request, params ListApprovalsParams)
|
|
// Approve or deny (single-use token verified server-side)
|
|
// (POST /approvals/{id}/decision)
|
|
DecideApproval(w http.ResponseWriter, r *http.Request, id EntityId, params DecideApprovalParams)
|
|
// Audit log
|
|
// (GET /audit)
|
|
QueryAudit(w http.ResponseWriter, r *http.Request, params QueryAuditParams)
|
|
// List check definitions
|
|
// (GET /checks)
|
|
ListChecks(w http.ResponseWriter, r *http.Request, params ListChecksParams)
|
|
// Create a check (checks-as-data, plan R3-7)
|
|
// (POST /checks)
|
|
CreateCheck(w http.ResponseWriter, r *http.Request, params CreateCheckParams)
|
|
// Update or disable a check
|
|
// (PATCH /checks/{id})
|
|
PatchCheck(w http.ResponseWriter, r *http.Request, id EntityId, params PatchCheckParams)
|
|
// Classifier decisions (the autonomous-decision audit trail)
|
|
// (GET /classifications)
|
|
ListClassifications(w http.ResponseWriter, r *http.Request, params ListClassificationsParams)
|
|
// Enroll a new client — issue age key, create Infisical identity
|
|
// (POST /clients/enroll)
|
|
EnrollClient(w http.ResponseWriter, r *http.Request)
|
|
// Get agent context delta since a timestamp
|
|
// (GET /clients/{slug}/context)
|
|
GetClientContext(w http.ResponseWriter, r *http.Request, slug EntitySlug, params GetClientContextParams)
|
|
// List secrets accessible to this client
|
|
// (GET /clients/{slug}/secrets)
|
|
GetClientSecrets(w http.ResponseWriter, r *http.Request, slug EntitySlug)
|
|
// One-round-trip overview for the control room home page
|
|
// (GET /dashboard/summary)
|
|
GetDashboardSummary(w http.ResponseWriter, r *http.Request)
|
|
// List entities
|
|
// (GET /entities)
|
|
ListEntities(w http.ResponseWriter, r *http.Request, params ListEntitiesParams)
|
|
// Create an entity
|
|
// (POST /entities)
|
|
CreateEntity(w http.ResponseWriter, r *http.Request, params CreateEntityParams)
|
|
// Provision a compute entity (LXC, VM, container) on a host
|
|
// (POST /entities/provision)
|
|
ProvisionEntity(w http.ResponseWriter, r *http.Request, params ProvisionEntityParams)
|
|
// Get entity by UUID or slug
|
|
// (GET /entities/{id})
|
|
GetEntity(w http.ResponseWriter, r *http.Request, id EntityId)
|
|
// Update attributes or transition lifecycle state
|
|
// (PATCH /entities/{id})
|
|
PatchEntity(w http.ResponseWriter, r *http.Request, id EntityId, params PatchEntityParams)
|
|
// Entities affected if this entity fails
|
|
// (GET /entities/{id}/blast-radius)
|
|
GetBlastRadius(w http.ResponseWriter, r *http.Request, id EntityId, params GetBlastRadiusParams)
|
|
// Direct relationships of an entity (both directions)
|
|
// (GET /entities/{id}/relations)
|
|
GetEntityRelations(w http.ResponseWriter, r *http.Request, id EntityId, params GetEntityRelationsParams)
|
|
// Poll provisioning progress for a compute entity
|
|
// (GET /entities/{slug}/provision/status)
|
|
GetProvisionStatus(w http.ResponseWriter, r *http.Request, slug EntitySlug)
|
|
// Historical events
|
|
// (GET /events)
|
|
QueryEvents(w http.ResponseWriter, r *http.Request, params QueryEventsParams)
|
|
// Live event stream (SSE)
|
|
// (GET /events/stream)
|
|
StreamEvents(w http.ResponseWriter, r *http.Request, params StreamEventsParams)
|
|
// List executions
|
|
// (GET /executions)
|
|
ListExecutions(w http.ResponseWriter, r *http.Request, params ListExecutionsParams)
|
|
// Request an execution (classify → approval check → enqueue)
|
|
// (POST /executions)
|
|
RequestExecution(w http.ResponseWriter, r *http.Request, params RequestExecutionParams)
|
|
// Execution status + result
|
|
// (GET /executions/{id})
|
|
GetExecution(w http.ResponseWriter, r *http.Request, id EntityId)
|
|
// Cancel a proposed/executing execution
|
|
// (POST /executions/{id}/cancel)
|
|
CancelExecution(w http.ResponseWriter, r *http.Request, id EntityId)
|
|
// Regenerate seed YAMLs from current DB state (DR / version control)
|
|
// (GET /export)
|
|
ExportSeeds(w http.ResponseWriter, r *http.Request)
|
|
// Subgraph for visualization (nodes + edges)
|
|
// (GET /graph)
|
|
GetGraph(w http.ResponseWriter, r *http.Request, params GetGraphParams)
|
|
// Fleet health summary with trend indicators
|
|
// (GET /health)
|
|
GetFleetHealth(w http.ResponseWriter, r *http.Request)
|
|
// Full-text search over knowledge entities (documents, runbooks)
|
|
// (GET /knowledge/search)
|
|
SearchKnowledge(w http.ResponseWriter, r *http.Request, params SearchKnowledgeParams)
|
|
// All documents/runbooks linked to an entity
|
|
// (GET /knowledge/{entity_id})
|
|
GetEntityKnowledge(w http.ResponseWriter, r *http.Request, entityId string)
|
|
// Query time-series metrics
|
|
// (GET /metrics)
|
|
QueryMetrics(w http.ResponseWriter, r *http.Request, params QueryMetricsParams)
|
|
// Full ontology — entity types, relationship types, lifecycles
|
|
// (GET /ontology)
|
|
GetOntology(w http.ResponseWriter, r *http.Request)
|
|
// Extend the ontology with a new entity type
|
|
// (POST /ontology/entity-types)
|
|
CreateEntityType(w http.ResponseWriter, r *http.Request, params CreateEntityTypeParams)
|
|
// Update or deprecate an entity type
|
|
// (PATCH /ontology/entity-types/{name})
|
|
PatchEntityType(w http.ResponseWriter, r *http.Request, name string, params PatchEntityTypeParams)
|
|
// List patterns
|
|
// (GET /patterns)
|
|
ListPatterns(w http.ResponseWriter, r *http.Request, params ListPatternsParams)
|
|
// Transition a pattern (activate / invalidate / deprecate)
|
|
// (PATCH /patterns/{id})
|
|
PatchPattern(w http.ResponseWriter, r *http.Request, id EntityId, params PatchPatternParams)
|
|
// List approval rules
|
|
// (GET /policy/approval-rules)
|
|
ListApprovalRules(w http.ResponseWriter, r *http.Request)
|
|
// Propose a new approval rule (dual-control)
|
|
// (POST /policy/approval-rules)
|
|
CreateApprovalRule(w http.ResponseWriter, r *http.Request, params CreateApprovalRuleParams)
|
|
// Propose a rule change (dual-control)
|
|
// (PATCH /policy/approval-rules/{id})
|
|
PatchApprovalRule(w http.ResponseWriter, r *http.Request, id EntityId, params PatchApprovalRuleParams)
|
|
// Autonomy settings (kill-switch, never-auto-act list)
|
|
// (GET /policy/autonomy)
|
|
GetAutonomySettings(w http.ResponseWriter, r *http.Request)
|
|
// Propose autonomy changes (dual-control; kill-switch OFF is immediate)
|
|
// (PATCH /policy/autonomy)
|
|
PatchAutonomySettings(w http.ResponseWriter, r *http.Request)
|
|
// List risk classes
|
|
// (GET /policy/risk-classes)
|
|
ListRiskClasses(w http.ResponseWriter, r *http.Request)
|
|
// End a relationship (sets valid_to; the edge is kept for history)
|
|
// (DELETE /relationships)
|
|
EndRelationship(w http.ResponseWriter, r *http.Request, params EndRelationshipParams)
|
|
// Create a relationship edge
|
|
// (POST /relationships)
|
|
CreateRelationship(w http.ResponseWriter, r *http.Request, params CreateRelationshipParams)
|
|
// List signals
|
|
// (GET /signals)
|
|
ListSignals(w http.ResponseWriter, r *http.Request, params ListSignalsParams)
|
|
// Acknowledge a signal
|
|
// (POST /signals/{id}/ack)
|
|
AckSignal(w http.ResponseWriter, r *http.Request, id EntityId)
|
|
// Mute a signal for a TTL
|
|
// (POST /signals/{id}/mute)
|
|
MuteSignal(w http.ResponseWriter, r *http.Request, id EntityId)
|
|
// Resolve a signal manually
|
|
// (POST /signals/{id}/resolve)
|
|
ResolveSignal(w http.ResponseWriter, r *http.Request, id EntityId)
|
|
// List skills (latest version per skill)
|
|
// (GET /skills)
|
|
ListSkills(w http.ResponseWriter, r *http.Request, params ListSkillsParams)
|
|
// Transition a skill or pin a version
|
|
// (PATCH /skills/{id})
|
|
PatchSkill(w http.ResponseWriter, r *http.Request, id EntityId, params PatchSkillParams)
|
|
// Version history of a skill
|
|
// (GET /skills/{id}/versions)
|
|
ListSkillVersions(w http.ResponseWriter, r *http.Request, id EntityId)
|
|
// Trend analysis for all metrics on an entity
|
|
// (GET /trends/{entity_id})
|
|
GetTrends(w http.ResponseWriter, r *http.Request, entityId string, params GetTrendsParams)
|
|
}
|
|
|
|
// Unimplemented server implementation that returns http.StatusNotImplemented for each endpoint.
|
|
|
|
type Unimplemented struct{}
|
|
|
|
// Agent behavior log
|
|
// (GET /agent-activity)
|
|
func (_ Unimplemented) QueryAgentActivity(w http.ResponseWriter, r *http.Request, params QueryAgentActivityParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// List approvals
|
|
// (GET /approvals)
|
|
func (_ Unimplemented) ListApprovals(w http.ResponseWriter, r *http.Request, params ListApprovalsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Approve or deny (single-use token verified server-side)
|
|
// (POST /approvals/{id}/decision)
|
|
func (_ Unimplemented) DecideApproval(w http.ResponseWriter, r *http.Request, id EntityId, params DecideApprovalParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Audit log
|
|
// (GET /audit)
|
|
func (_ Unimplemented) QueryAudit(w http.ResponseWriter, r *http.Request, params QueryAuditParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// List check definitions
|
|
// (GET /checks)
|
|
func (_ Unimplemented) ListChecks(w http.ResponseWriter, r *http.Request, params ListChecksParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Create a check (checks-as-data, plan R3-7)
|
|
// (POST /checks)
|
|
func (_ Unimplemented) CreateCheck(w http.ResponseWriter, r *http.Request, params CreateCheckParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Update or disable a check
|
|
// (PATCH /checks/{id})
|
|
func (_ Unimplemented) PatchCheck(w http.ResponseWriter, r *http.Request, id EntityId, params PatchCheckParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Classifier decisions (the autonomous-decision audit trail)
|
|
// (GET /classifications)
|
|
func (_ Unimplemented) ListClassifications(w http.ResponseWriter, r *http.Request, params ListClassificationsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Enroll a new client — issue age key, create Infisical identity
|
|
// (POST /clients/enroll)
|
|
func (_ Unimplemented) EnrollClient(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Get agent context delta since a timestamp
|
|
// (GET /clients/{slug}/context)
|
|
func (_ Unimplemented) GetClientContext(w http.ResponseWriter, r *http.Request, slug EntitySlug, params GetClientContextParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// List secrets accessible to this client
|
|
// (GET /clients/{slug}/secrets)
|
|
func (_ Unimplemented) GetClientSecrets(w http.ResponseWriter, r *http.Request, slug EntitySlug) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// One-round-trip overview for the control room home page
|
|
// (GET /dashboard/summary)
|
|
func (_ Unimplemented) GetDashboardSummary(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// List entities
|
|
// (GET /entities)
|
|
func (_ Unimplemented) ListEntities(w http.ResponseWriter, r *http.Request, params ListEntitiesParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Create an entity
|
|
// (POST /entities)
|
|
func (_ Unimplemented) CreateEntity(w http.ResponseWriter, r *http.Request, params CreateEntityParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Provision a compute entity (LXC, VM, container) on a host
|
|
// (POST /entities/provision)
|
|
func (_ Unimplemented) ProvisionEntity(w http.ResponseWriter, r *http.Request, params ProvisionEntityParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Get entity by UUID or slug
|
|
// (GET /entities/{id})
|
|
func (_ Unimplemented) GetEntity(w http.ResponseWriter, r *http.Request, id EntityId) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Update attributes or transition lifecycle state
|
|
// (PATCH /entities/{id})
|
|
func (_ Unimplemented) PatchEntity(w http.ResponseWriter, r *http.Request, id EntityId, params PatchEntityParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Entities affected if this entity fails
|
|
// (GET /entities/{id}/blast-radius)
|
|
func (_ Unimplemented) GetBlastRadius(w http.ResponseWriter, r *http.Request, id EntityId, params GetBlastRadiusParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Direct relationships of an entity (both directions)
|
|
// (GET /entities/{id}/relations)
|
|
func (_ Unimplemented) GetEntityRelations(w http.ResponseWriter, r *http.Request, id EntityId, params GetEntityRelationsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Poll provisioning progress for a compute entity
|
|
// (GET /entities/{slug}/provision/status)
|
|
func (_ Unimplemented) GetProvisionStatus(w http.ResponseWriter, r *http.Request, slug EntitySlug) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Historical events
|
|
// (GET /events)
|
|
func (_ Unimplemented) QueryEvents(w http.ResponseWriter, r *http.Request, params QueryEventsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Live event stream (SSE)
|
|
// (GET /events/stream)
|
|
func (_ Unimplemented) StreamEvents(w http.ResponseWriter, r *http.Request, params StreamEventsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// List executions
|
|
// (GET /executions)
|
|
func (_ Unimplemented) ListExecutions(w http.ResponseWriter, r *http.Request, params ListExecutionsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Request an execution (classify → approval check → enqueue)
|
|
// (POST /executions)
|
|
func (_ Unimplemented) RequestExecution(w http.ResponseWriter, r *http.Request, params RequestExecutionParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Execution status + result
|
|
// (GET /executions/{id})
|
|
func (_ Unimplemented) GetExecution(w http.ResponseWriter, r *http.Request, id EntityId) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Cancel a proposed/executing execution
|
|
// (POST /executions/{id}/cancel)
|
|
func (_ Unimplemented) CancelExecution(w http.ResponseWriter, r *http.Request, id EntityId) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Regenerate seed YAMLs from current DB state (DR / version control)
|
|
// (GET /export)
|
|
func (_ Unimplemented) ExportSeeds(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Subgraph for visualization (nodes + edges)
|
|
// (GET /graph)
|
|
func (_ Unimplemented) GetGraph(w http.ResponseWriter, r *http.Request, params GetGraphParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Fleet health summary with trend indicators
|
|
// (GET /health)
|
|
func (_ Unimplemented) GetFleetHealth(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Full-text search over knowledge entities (documents, runbooks)
|
|
// (GET /knowledge/search)
|
|
func (_ Unimplemented) SearchKnowledge(w http.ResponseWriter, r *http.Request, params SearchKnowledgeParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// All documents/runbooks linked to an entity
|
|
// (GET /knowledge/{entity_id})
|
|
func (_ Unimplemented) GetEntityKnowledge(w http.ResponseWriter, r *http.Request, entityId string) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Query time-series metrics
|
|
// (GET /metrics)
|
|
func (_ Unimplemented) QueryMetrics(w http.ResponseWriter, r *http.Request, params QueryMetricsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Full ontology — entity types, relationship types, lifecycles
|
|
// (GET /ontology)
|
|
func (_ Unimplemented) GetOntology(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Extend the ontology with a new entity type
|
|
// (POST /ontology/entity-types)
|
|
func (_ Unimplemented) CreateEntityType(w http.ResponseWriter, r *http.Request, params CreateEntityTypeParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Update or deprecate an entity type
|
|
// (PATCH /ontology/entity-types/{name})
|
|
func (_ Unimplemented) PatchEntityType(w http.ResponseWriter, r *http.Request, name string, params PatchEntityTypeParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// List patterns
|
|
// (GET /patterns)
|
|
func (_ Unimplemented) ListPatterns(w http.ResponseWriter, r *http.Request, params ListPatternsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Transition a pattern (activate / invalidate / deprecate)
|
|
// (PATCH /patterns/{id})
|
|
func (_ Unimplemented) PatchPattern(w http.ResponseWriter, r *http.Request, id EntityId, params PatchPatternParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// List approval rules
|
|
// (GET /policy/approval-rules)
|
|
func (_ Unimplemented) ListApprovalRules(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Propose a new approval rule (dual-control)
|
|
// (POST /policy/approval-rules)
|
|
func (_ Unimplemented) CreateApprovalRule(w http.ResponseWriter, r *http.Request, params CreateApprovalRuleParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Propose a rule change (dual-control)
|
|
// (PATCH /policy/approval-rules/{id})
|
|
func (_ Unimplemented) PatchApprovalRule(w http.ResponseWriter, r *http.Request, id EntityId, params PatchApprovalRuleParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Autonomy settings (kill-switch, never-auto-act list)
|
|
// (GET /policy/autonomy)
|
|
func (_ Unimplemented) GetAutonomySettings(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Propose autonomy changes (dual-control; kill-switch OFF is immediate)
|
|
// (PATCH /policy/autonomy)
|
|
func (_ Unimplemented) PatchAutonomySettings(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// List risk classes
|
|
// (GET /policy/risk-classes)
|
|
func (_ Unimplemented) ListRiskClasses(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// End a relationship (sets valid_to; the edge is kept for history)
|
|
// (DELETE /relationships)
|
|
func (_ Unimplemented) EndRelationship(w http.ResponseWriter, r *http.Request, params EndRelationshipParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Create a relationship edge
|
|
// (POST /relationships)
|
|
func (_ Unimplemented) CreateRelationship(w http.ResponseWriter, r *http.Request, params CreateRelationshipParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// List signals
|
|
// (GET /signals)
|
|
func (_ Unimplemented) ListSignals(w http.ResponseWriter, r *http.Request, params ListSignalsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Acknowledge a signal
|
|
// (POST /signals/{id}/ack)
|
|
func (_ Unimplemented) AckSignal(w http.ResponseWriter, r *http.Request, id EntityId) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Mute a signal for a TTL
|
|
// (POST /signals/{id}/mute)
|
|
func (_ Unimplemented) MuteSignal(w http.ResponseWriter, r *http.Request, id EntityId) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Resolve a signal manually
|
|
// (POST /signals/{id}/resolve)
|
|
func (_ Unimplemented) ResolveSignal(w http.ResponseWriter, r *http.Request, id EntityId) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// List skills (latest version per skill)
|
|
// (GET /skills)
|
|
func (_ Unimplemented) ListSkills(w http.ResponseWriter, r *http.Request, params ListSkillsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Transition a skill or pin a version
|
|
// (PATCH /skills/{id})
|
|
func (_ Unimplemented) PatchSkill(w http.ResponseWriter, r *http.Request, id EntityId, params PatchSkillParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Version history of a skill
|
|
// (GET /skills/{id}/versions)
|
|
func (_ Unimplemented) ListSkillVersions(w http.ResponseWriter, r *http.Request, id EntityId) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Trend analysis for all metrics on an entity
|
|
// (GET /trends/{entity_id})
|
|
func (_ Unimplemented) GetTrends(w http.ResponseWriter, r *http.Request, entityId string, params GetTrendsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// ServerInterfaceWrapper converts contexts to parameters.
|
|
type ServerInterfaceWrapper struct {
|
|
Handler ServerInterface
|
|
HandlerMiddlewares []MiddlewareFunc
|
|
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
|
|
}
|
|
|
|
type MiddlewareFunc func(http.Handler) http.Handler
|
|
|
|
// QueryAgentActivity operation middleware
|
|
func (siw *ServerInterfaceWrapper) QueryAgentActivity(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params QueryAgentActivityParams
|
|
|
|
// ------------- Optional query parameter "agent_id" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "agent_id", r.URL.Query(), ¶ms.AgentId)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "agent_id", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "activity_type" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "activity_type", r.URL.Query(), ¶ms.ActivityType)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "activity_type", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "entity_id" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "entity_id", r.URL.Query(), ¶ms.EntityId)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "entity_id", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "from" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "from", r.URL.Query(), ¶ms.From)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "from", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "to" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "to", r.URL.Query(), ¶ms.To)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "to", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "cursor" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), ¶ms.Cursor)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "limit" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.QueryAgentActivity(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListApprovals operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListApprovals(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params ListApprovalsParams
|
|
|
|
// ------------- Optional query parameter "status" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "status", r.URL.Query(), ¶ms.Status)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "status", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "kind" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "kind", r.URL.Query(), ¶ms.Kind)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "kind", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "cursor" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), ¶ms.Cursor)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "limit" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListApprovals(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// DecideApproval operation middleware
|
|
func (siw *ServerInterfaceWrapper) DecideApproval(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "id" -------------
|
|
var id EntityId
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params DecideApprovalParams
|
|
|
|
headers := r.Header
|
|
|
|
// ------------- Optional header parameter "Idempotency-Key" -------------
|
|
if valueList, found := headers[http.CanonicalHeaderKey("Idempotency-Key")]; found {
|
|
var IdempotencyKey IdempotencyKey
|
|
n := len(valueList)
|
|
if n != 1 {
|
|
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Idempotency-Key", Count: n})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "Idempotency-Key", valueList[0], &IdempotencyKey, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Idempotency-Key", Err: err})
|
|
return
|
|
}
|
|
|
|
params.IdempotencyKey = &IdempotencyKey
|
|
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.DecideApproval(w, r, id, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// QueryAudit operation middleware
|
|
func (siw *ServerInterfaceWrapper) QueryAudit(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params QueryAuditParams
|
|
|
|
// ------------- Optional query parameter "actor_type" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "actor_type", r.URL.Query(), ¶ms.ActorType)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "actor_type", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "actor_id" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "actor_id", r.URL.Query(), ¶ms.ActorId)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "actor_id", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "entity_id" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "entity_id", r.URL.Query(), ¶ms.EntityId)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "entity_id", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "action" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "action", r.URL.Query(), ¶ms.Action)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "action", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "correlation_id" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "correlation_id", r.URL.Query(), ¶ms.CorrelationId)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "correlation_id", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "from" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "from", r.URL.Query(), ¶ms.From)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "from", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "to" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "to", r.URL.Query(), ¶ms.To)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "to", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "cursor" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), ¶ms.Cursor)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "limit" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.QueryAudit(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListChecks operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListChecks(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params ListChecksParams
|
|
|
|
// ------------- Optional query parameter "kind" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "kind", r.URL.Query(), ¶ms.Kind)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "kind", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "target" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "target", r.URL.Query(), ¶ms.Target)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "target", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "enabled" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "enabled", r.URL.Query(), ¶ms.Enabled)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "enabled", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "cursor" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), ¶ms.Cursor)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "limit" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListChecks(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// CreateCheck operation middleware
|
|
func (siw *ServerInterfaceWrapper) CreateCheck(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params CreateCheckParams
|
|
|
|
headers := r.Header
|
|
|
|
// ------------- Optional header parameter "Idempotency-Key" -------------
|
|
if valueList, found := headers[http.CanonicalHeaderKey("Idempotency-Key")]; found {
|
|
var IdempotencyKey IdempotencyKey
|
|
n := len(valueList)
|
|
if n != 1 {
|
|
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Idempotency-Key", Count: n})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "Idempotency-Key", valueList[0], &IdempotencyKey, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Idempotency-Key", Err: err})
|
|
return
|
|
}
|
|
|
|
params.IdempotencyKey = &IdempotencyKey
|
|
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.CreateCheck(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// PatchCheck operation middleware
|
|
func (siw *ServerInterfaceWrapper) PatchCheck(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "id" -------------
|
|
var id EntityId
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params PatchCheckParams
|
|
|
|
headers := r.Header
|
|
|
|
// ------------- Required header parameter "If-Match" -------------
|
|
if valueList, found := headers[http.CanonicalHeaderKey("If-Match")]; found {
|
|
var IfMatch IfMatch
|
|
n := len(valueList)
|
|
if n != 1 {
|
|
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "If-Match", Count: n})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "If-Match", valueList[0], &IfMatch, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "If-Match", Err: err})
|
|
return
|
|
}
|
|
|
|
params.IfMatch = IfMatch
|
|
|
|
} else {
|
|
err := fmt.Errorf("Header parameter If-Match is required, but not found")
|
|
siw.ErrorHandlerFunc(w, r, &RequiredHeaderError{ParamName: "If-Match", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.PatchCheck(w, r, id, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListClassifications operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListClassifications(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params ListClassificationsParams
|
|
|
|
// ------------- Optional query parameter "signal_id" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "signal_id", r.URL.Query(), ¶ms.SignalId)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "signal_id", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "entity_id" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "entity_id", r.URL.Query(), ¶ms.EntityId)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "entity_id", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "route" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "route", r.URL.Query(), ¶ms.Route)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "route", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "cursor" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), ¶ms.Cursor)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "limit" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListClassifications(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// EnrollClient operation middleware
|
|
func (siw *ServerInterfaceWrapper) EnrollClient(w http.ResponseWriter, r *http.Request) {
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.EnrollClient(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetClientContext operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetClientContext(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "slug" -------------
|
|
var slug EntitySlug
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "slug", chi.URLParam(r, "slug"), &slug, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "slug", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetClientContextParams
|
|
|
|
// ------------- Optional query parameter "since" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "since", r.URL.Query(), ¶ms.Since)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "since", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetClientContext(w, r, slug, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetClientSecrets operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetClientSecrets(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "slug" -------------
|
|
var slug EntitySlug
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "slug", chi.URLParam(r, "slug"), &slug, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "slug", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetClientSecrets(w, r, slug)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetDashboardSummary operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetDashboardSummary(w http.ResponseWriter, r *http.Request) {
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetDashboardSummary(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListEntities operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListEntities(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params ListEntitiesParams
|
|
|
|
// ------------- Optional query parameter "type" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "type", r.URL.Query(), ¶ms.Type)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "type", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "state" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "state", r.URL.Query(), ¶ms.State)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "state", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "domain" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "domain", r.URL.Query(), ¶ms.Domain)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "domain", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "layer" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "layer", r.URL.Query(), ¶ms.Layer)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "layer", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "q" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "q", r.URL.Query(), ¶ms.Q)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "q", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "cursor" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), ¶ms.Cursor)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "limit" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListEntities(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// CreateEntity operation middleware
|
|
func (siw *ServerInterfaceWrapper) CreateEntity(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params CreateEntityParams
|
|
|
|
headers := r.Header
|
|
|
|
// ------------- Optional header parameter "Idempotency-Key" -------------
|
|
if valueList, found := headers[http.CanonicalHeaderKey("Idempotency-Key")]; found {
|
|
var IdempotencyKey IdempotencyKey
|
|
n := len(valueList)
|
|
if n != 1 {
|
|
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Idempotency-Key", Count: n})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "Idempotency-Key", valueList[0], &IdempotencyKey, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Idempotency-Key", Err: err})
|
|
return
|
|
}
|
|
|
|
params.IdempotencyKey = &IdempotencyKey
|
|
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.CreateEntity(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ProvisionEntity operation middleware
|
|
func (siw *ServerInterfaceWrapper) ProvisionEntity(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params ProvisionEntityParams
|
|
|
|
headers := r.Header
|
|
|
|
// ------------- Optional header parameter "Idempotency-Key" -------------
|
|
if valueList, found := headers[http.CanonicalHeaderKey("Idempotency-Key")]; found {
|
|
var IdempotencyKey IdempotencyKey
|
|
n := len(valueList)
|
|
if n != 1 {
|
|
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Idempotency-Key", Count: n})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "Idempotency-Key", valueList[0], &IdempotencyKey, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Idempotency-Key", Err: err})
|
|
return
|
|
}
|
|
|
|
params.IdempotencyKey = &IdempotencyKey
|
|
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ProvisionEntity(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetEntity operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetEntity(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "id" -------------
|
|
var id EntityId
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetEntity(w, r, id)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// PatchEntity operation middleware
|
|
func (siw *ServerInterfaceWrapper) PatchEntity(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "id" -------------
|
|
var id EntityId
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params PatchEntityParams
|
|
|
|
headers := r.Header
|
|
|
|
// ------------- Required header parameter "If-Match" -------------
|
|
if valueList, found := headers[http.CanonicalHeaderKey("If-Match")]; found {
|
|
var IfMatch IfMatch
|
|
n := len(valueList)
|
|
if n != 1 {
|
|
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "If-Match", Count: n})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "If-Match", valueList[0], &IfMatch, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "If-Match", Err: err})
|
|
return
|
|
}
|
|
|
|
params.IfMatch = IfMatch
|
|
|
|
} else {
|
|
err := fmt.Errorf("Header parameter If-Match is required, but not found")
|
|
siw.ErrorHandlerFunc(w, r, &RequiredHeaderError{ParamName: "If-Match", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.PatchEntity(w, r, id, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetBlastRadius operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetBlastRadius(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "id" -------------
|
|
var id EntityId
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetBlastRadiusParams
|
|
|
|
// ------------- Optional query parameter "depth" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "depth", r.URL.Query(), ¶ms.Depth)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "depth", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetBlastRadius(w, r, id, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetEntityRelations operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetEntityRelations(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "id" -------------
|
|
var id EntityId
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetEntityRelationsParams
|
|
|
|
// ------------- Optional query parameter "rel_type" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "rel_type", r.URL.Query(), ¶ms.RelType)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "rel_type", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "direction" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "direction", r.URL.Query(), ¶ms.Direction)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "direction", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetEntityRelations(w, r, id, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetProvisionStatus operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetProvisionStatus(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "slug" -------------
|
|
var slug EntitySlug
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "slug", chi.URLParam(r, "slug"), &slug, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "slug", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetProvisionStatus(w, r, slug)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// QueryEvents operation middleware
|
|
func (siw *ServerInterfaceWrapper) QueryEvents(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params QueryEventsParams
|
|
|
|
// ------------- Optional query parameter "type" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "type", r.URL.Query(), ¶ms.Type)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "type", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "entity_id" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "entity_id", r.URL.Query(), ¶ms.EntityId)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "entity_id", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "severity" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "severity", r.URL.Query(), ¶ms.Severity)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "severity", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "correlation_id" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "correlation_id", r.URL.Query(), ¶ms.CorrelationId)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "correlation_id", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "from" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "from", r.URL.Query(), ¶ms.From)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "from", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "to" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "to", r.URL.Query(), ¶ms.To)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "to", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "cursor" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), ¶ms.Cursor)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "limit" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.QueryEvents(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// StreamEvents operation middleware
|
|
func (siw *ServerInterfaceWrapper) StreamEvents(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params StreamEventsParams
|
|
|
|
// ------------- Optional query parameter "type" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "type", r.URL.Query(), ¶ms.Type)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "type", Err: err})
|
|
return
|
|
}
|
|
|
|
headers := r.Header
|
|
|
|
// ------------- Optional header parameter "Last-Event-ID" -------------
|
|
if valueList, found := headers[http.CanonicalHeaderKey("Last-Event-ID")]; found {
|
|
var LastEventID string
|
|
n := len(valueList)
|
|
if n != 1 {
|
|
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Last-Event-ID", Count: n})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "Last-Event-ID", valueList[0], &LastEventID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Last-Event-ID", Err: err})
|
|
return
|
|
}
|
|
|
|
params.LastEventID = &LastEventID
|
|
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.StreamEvents(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListExecutions operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListExecutions(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params ListExecutionsParams
|
|
|
|
// ------------- Optional query parameter "status" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "status", r.URL.Query(), ¶ms.Status)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "status", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "target" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "target", r.URL.Query(), ¶ms.Target)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "target", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "action" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "action", r.URL.Query(), ¶ms.Action)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "action", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "correlation_id" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "correlation_id", r.URL.Query(), ¶ms.CorrelationId)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "correlation_id", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "cursor" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), ¶ms.Cursor)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "limit" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListExecutions(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// RequestExecution operation middleware
|
|
func (siw *ServerInterfaceWrapper) RequestExecution(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params RequestExecutionParams
|
|
|
|
headers := r.Header
|
|
|
|
// ------------- Optional header parameter "Idempotency-Key" -------------
|
|
if valueList, found := headers[http.CanonicalHeaderKey("Idempotency-Key")]; found {
|
|
var IdempotencyKey IdempotencyKey
|
|
n := len(valueList)
|
|
if n != 1 {
|
|
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Idempotency-Key", Count: n})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "Idempotency-Key", valueList[0], &IdempotencyKey, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Idempotency-Key", Err: err})
|
|
return
|
|
}
|
|
|
|
params.IdempotencyKey = &IdempotencyKey
|
|
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.RequestExecution(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetExecution operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetExecution(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "id" -------------
|
|
var id EntityId
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetExecution(w, r, id)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// CancelExecution operation middleware
|
|
func (siw *ServerInterfaceWrapper) CancelExecution(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "id" -------------
|
|
var id EntityId
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.CancelExecution(w, r, id)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ExportSeeds operation middleware
|
|
func (siw *ServerInterfaceWrapper) ExportSeeds(w http.ResponseWriter, r *http.Request) {
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ExportSeeds(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetGraph operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetGraph(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetGraphParams
|
|
|
|
// ------------- Optional query parameter "root" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "root", r.URL.Query(), ¶ms.Root)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "root", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "depth" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "depth", r.URL.Query(), ¶ms.Depth)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "depth", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "rel_type" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "rel_type", r.URL.Query(), ¶ms.RelType)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "rel_type", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "include" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "include", r.URL.Query(), ¶ms.Include)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "include", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetGraph(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetFleetHealth operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetFleetHealth(w http.ResponseWriter, r *http.Request) {
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetFleetHealth(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// SearchKnowledge operation middleware
|
|
func (siw *ServerInterfaceWrapper) SearchKnowledge(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params SearchKnowledgeParams
|
|
|
|
// ------------- Required query parameter "q" -------------
|
|
|
|
if paramValue := r.URL.Query().Get("q"); paramValue != "" {
|
|
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "q"})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindQueryParameter("form", true, true, "q", r.URL.Query(), ¶ms.Q)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "q", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "limit" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.SearchKnowledge(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetEntityKnowledge operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetEntityKnowledge(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "entity_id" -------------
|
|
var entityId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "entity_id", chi.URLParam(r, "entity_id"), &entityId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "entity_id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetEntityKnowledge(w, r, entityId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// QueryMetrics operation middleware
|
|
func (siw *ServerInterfaceWrapper) QueryMetrics(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params QueryMetricsParams
|
|
|
|
// ------------- Optional query parameter "entity_id" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "entity_id", r.URL.Query(), ¶ms.EntityId)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "entity_id", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "metric" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "metric", r.URL.Query(), ¶ms.Metric)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "metric", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "rollup" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "rollup", r.URL.Query(), ¶ms.Rollup)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "rollup", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "from" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "from", r.URL.Query(), ¶ms.From)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "from", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "to" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "to", r.URL.Query(), ¶ms.To)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "to", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.QueryMetrics(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetOntology operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetOntology(w http.ResponseWriter, r *http.Request) {
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetOntology(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// CreateEntityType operation middleware
|
|
func (siw *ServerInterfaceWrapper) CreateEntityType(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params CreateEntityTypeParams
|
|
|
|
headers := r.Header
|
|
|
|
// ------------- Optional header parameter "Idempotency-Key" -------------
|
|
if valueList, found := headers[http.CanonicalHeaderKey("Idempotency-Key")]; found {
|
|
var IdempotencyKey IdempotencyKey
|
|
n := len(valueList)
|
|
if n != 1 {
|
|
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Idempotency-Key", Count: n})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "Idempotency-Key", valueList[0], &IdempotencyKey, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Idempotency-Key", Err: err})
|
|
return
|
|
}
|
|
|
|
params.IdempotencyKey = &IdempotencyKey
|
|
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.CreateEntityType(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// PatchEntityType operation middleware
|
|
func (siw *ServerInterfaceWrapper) PatchEntityType(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "name" -------------
|
|
var name string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "name", chi.URLParam(r, "name"), &name, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "name", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params PatchEntityTypeParams
|
|
|
|
headers := r.Header
|
|
|
|
// ------------- Required header parameter "If-Match" -------------
|
|
if valueList, found := headers[http.CanonicalHeaderKey("If-Match")]; found {
|
|
var IfMatch IfMatch
|
|
n := len(valueList)
|
|
if n != 1 {
|
|
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "If-Match", Count: n})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "If-Match", valueList[0], &IfMatch, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "If-Match", Err: err})
|
|
return
|
|
}
|
|
|
|
params.IfMatch = IfMatch
|
|
|
|
} else {
|
|
err := fmt.Errorf("Header parameter If-Match is required, but not found")
|
|
siw.ErrorHandlerFunc(w, r, &RequiredHeaderError{ParamName: "If-Match", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.PatchEntityType(w, r, name, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListPatterns operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListPatterns(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params ListPatternsParams
|
|
|
|
// ------------- Optional query parameter "entity_type" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "entity_type", r.URL.Query(), ¶ms.EntityType)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "entity_type", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "action" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "action", r.URL.Query(), ¶ms.Action)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "action", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "status" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "status", r.URL.Query(), ¶ms.Status)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "status", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "cursor" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), ¶ms.Cursor)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "limit" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListPatterns(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// PatchPattern operation middleware
|
|
func (siw *ServerInterfaceWrapper) PatchPattern(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "id" -------------
|
|
var id EntityId
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params PatchPatternParams
|
|
|
|
headers := r.Header
|
|
|
|
// ------------- Required header parameter "If-Match" -------------
|
|
if valueList, found := headers[http.CanonicalHeaderKey("If-Match")]; found {
|
|
var IfMatch IfMatch
|
|
n := len(valueList)
|
|
if n != 1 {
|
|
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "If-Match", Count: n})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "If-Match", valueList[0], &IfMatch, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "If-Match", Err: err})
|
|
return
|
|
}
|
|
|
|
params.IfMatch = IfMatch
|
|
|
|
} else {
|
|
err := fmt.Errorf("Header parameter If-Match is required, but not found")
|
|
siw.ErrorHandlerFunc(w, r, &RequiredHeaderError{ParamName: "If-Match", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.PatchPattern(w, r, id, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListApprovalRules operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListApprovalRules(w http.ResponseWriter, r *http.Request) {
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListApprovalRules(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// CreateApprovalRule operation middleware
|
|
func (siw *ServerInterfaceWrapper) CreateApprovalRule(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params CreateApprovalRuleParams
|
|
|
|
headers := r.Header
|
|
|
|
// ------------- Optional header parameter "Idempotency-Key" -------------
|
|
if valueList, found := headers[http.CanonicalHeaderKey("Idempotency-Key")]; found {
|
|
var IdempotencyKey IdempotencyKey
|
|
n := len(valueList)
|
|
if n != 1 {
|
|
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Idempotency-Key", Count: n})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "Idempotency-Key", valueList[0], &IdempotencyKey, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Idempotency-Key", Err: err})
|
|
return
|
|
}
|
|
|
|
params.IdempotencyKey = &IdempotencyKey
|
|
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.CreateApprovalRule(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// PatchApprovalRule operation middleware
|
|
func (siw *ServerInterfaceWrapper) PatchApprovalRule(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "id" -------------
|
|
var id EntityId
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params PatchApprovalRuleParams
|
|
|
|
headers := r.Header
|
|
|
|
// ------------- Required header parameter "If-Match" -------------
|
|
if valueList, found := headers[http.CanonicalHeaderKey("If-Match")]; found {
|
|
var IfMatch IfMatch
|
|
n := len(valueList)
|
|
if n != 1 {
|
|
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "If-Match", Count: n})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "If-Match", valueList[0], &IfMatch, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "If-Match", Err: err})
|
|
return
|
|
}
|
|
|
|
params.IfMatch = IfMatch
|
|
|
|
} else {
|
|
err := fmt.Errorf("Header parameter If-Match is required, but not found")
|
|
siw.ErrorHandlerFunc(w, r, &RequiredHeaderError{ParamName: "If-Match", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.PatchApprovalRule(w, r, id, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetAutonomySettings operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetAutonomySettings(w http.ResponseWriter, r *http.Request) {
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetAutonomySettings(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// PatchAutonomySettings operation middleware
|
|
func (siw *ServerInterfaceWrapper) PatchAutonomySettings(w http.ResponseWriter, r *http.Request) {
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.PatchAutonomySettings(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListRiskClasses operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListRiskClasses(w http.ResponseWriter, r *http.Request) {
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListRiskClasses(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// EndRelationship operation middleware
|
|
func (siw *ServerInterfaceWrapper) EndRelationship(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params EndRelationshipParams
|
|
|
|
// ------------- Required query parameter "source" -------------
|
|
|
|
if paramValue := r.URL.Query().Get("source"); paramValue != "" {
|
|
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "source"})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindQueryParameter("form", true, true, "source", r.URL.Query(), ¶ms.Source)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "source", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Required query parameter "target" -------------
|
|
|
|
if paramValue := r.URL.Query().Get("target"); paramValue != "" {
|
|
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "target"})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindQueryParameter("form", true, true, "target", r.URL.Query(), ¶ms.Target)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "target", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Required query parameter "rel_type" -------------
|
|
|
|
if paramValue := r.URL.Query().Get("rel_type"); paramValue != "" {
|
|
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "rel_type"})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindQueryParameter("form", true, true, "rel_type", r.URL.Query(), ¶ms.RelType)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "rel_type", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.EndRelationship(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// CreateRelationship operation middleware
|
|
func (siw *ServerInterfaceWrapper) CreateRelationship(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params CreateRelationshipParams
|
|
|
|
headers := r.Header
|
|
|
|
// ------------- Optional header parameter "Idempotency-Key" -------------
|
|
if valueList, found := headers[http.CanonicalHeaderKey("Idempotency-Key")]; found {
|
|
var IdempotencyKey IdempotencyKey
|
|
n := len(valueList)
|
|
if n != 1 {
|
|
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Idempotency-Key", Count: n})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "Idempotency-Key", valueList[0], &IdempotencyKey, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Idempotency-Key", Err: err})
|
|
return
|
|
}
|
|
|
|
params.IdempotencyKey = &IdempotencyKey
|
|
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.CreateRelationship(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListSignals operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListSignals(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params ListSignalsParams
|
|
|
|
// ------------- Optional query parameter "state" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "state", r.URL.Query(), ¶ms.State)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "state", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "severity" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "severity", r.URL.Query(), ¶ms.Severity)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "severity", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "entity_id" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "entity_id", r.URL.Query(), ¶ms.EntityId)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "entity_id", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "kind" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "kind", r.URL.Query(), ¶ms.Kind)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "kind", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "cursor" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), ¶ms.Cursor)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "limit" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListSignals(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// AckSignal operation middleware
|
|
func (siw *ServerInterfaceWrapper) AckSignal(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "id" -------------
|
|
var id EntityId
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.AckSignal(w, r, id)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// MuteSignal operation middleware
|
|
func (siw *ServerInterfaceWrapper) MuteSignal(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "id" -------------
|
|
var id EntityId
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.MuteSignal(w, r, id)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ResolveSignal operation middleware
|
|
func (siw *ServerInterfaceWrapper) ResolveSignal(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "id" -------------
|
|
var id EntityId
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ResolveSignal(w, r, id)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListSkills operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListSkills(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params ListSkillsParams
|
|
|
|
// ------------- Optional query parameter "applies_to" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "applies_to", r.URL.Query(), ¶ms.AppliesTo)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "applies_to", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "action" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "action", r.URL.Query(), ¶ms.Action)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "action", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "status" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "status", r.URL.Query(), ¶ms.Status)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "status", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "cursor" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), ¶ms.Cursor)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "limit" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListSkills(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// PatchSkill operation middleware
|
|
func (siw *ServerInterfaceWrapper) PatchSkill(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "id" -------------
|
|
var id EntityId
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params PatchSkillParams
|
|
|
|
headers := r.Header
|
|
|
|
// ------------- Required header parameter "If-Match" -------------
|
|
if valueList, found := headers[http.CanonicalHeaderKey("If-Match")]; found {
|
|
var IfMatch IfMatch
|
|
n := len(valueList)
|
|
if n != 1 {
|
|
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "If-Match", Count: n})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "If-Match", valueList[0], &IfMatch, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "If-Match", Err: err})
|
|
return
|
|
}
|
|
|
|
params.IfMatch = IfMatch
|
|
|
|
} else {
|
|
err := fmt.Errorf("Header parameter If-Match is required, but not found")
|
|
siw.ErrorHandlerFunc(w, r, &RequiredHeaderError{ParamName: "If-Match", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.PatchSkill(w, r, id, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListSkillVersions operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListSkillVersions(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "id" -------------
|
|
var id EntityId
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListSkillVersions(w, r, id)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetTrends operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetTrends(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "entity_id" -------------
|
|
var entityId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "entity_id", chi.URLParam(r, "entity_id"), &entityId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "entity_id", Err: err})
|
|
return
|
|
}
|
|
|
|
ctx := r.Context()
|
|
|
|
ctx = context.WithValue(ctx, BearerAuthScopes, []string{})
|
|
|
|
r = r.WithContext(ctx)
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetTrendsParams
|
|
|
|
// ------------- Optional query parameter "from" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "from", r.URL.Query(), ¶ms.From)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "from", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "to" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "to", r.URL.Query(), ¶ms.To)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "to", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetTrends(w, r, entityId, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
type UnescapedCookieParamError struct {
|
|
ParamName string
|
|
Err error
|
|
}
|
|
|
|
func (e *UnescapedCookieParamError) Error() string {
|
|
return fmt.Sprintf("error unescaping cookie parameter '%s'", e.ParamName)
|
|
}
|
|
|
|
func (e *UnescapedCookieParamError) Unwrap() error {
|
|
return e.Err
|
|
}
|
|
|
|
type UnmarshalingParamError struct {
|
|
ParamName string
|
|
Err error
|
|
}
|
|
|
|
func (e *UnmarshalingParamError) Error() string {
|
|
return fmt.Sprintf("Error unmarshaling parameter %s as JSON: %s", e.ParamName, e.Err.Error())
|
|
}
|
|
|
|
func (e *UnmarshalingParamError) Unwrap() error {
|
|
return e.Err
|
|
}
|
|
|
|
type RequiredParamError struct {
|
|
ParamName string
|
|
}
|
|
|
|
func (e *RequiredParamError) Error() string {
|
|
return fmt.Sprintf("Query argument %s is required, but not found", e.ParamName)
|
|
}
|
|
|
|
type RequiredHeaderError struct {
|
|
ParamName string
|
|
Err error
|
|
}
|
|
|
|
func (e *RequiredHeaderError) Error() string {
|
|
return fmt.Sprintf("Header parameter %s is required, but not found", e.ParamName)
|
|
}
|
|
|
|
func (e *RequiredHeaderError) Unwrap() error {
|
|
return e.Err
|
|
}
|
|
|
|
type InvalidParamFormatError struct {
|
|
ParamName string
|
|
Err error
|
|
}
|
|
|
|
func (e *InvalidParamFormatError) Error() string {
|
|
return fmt.Sprintf("Invalid format for parameter %s: %s", e.ParamName, e.Err.Error())
|
|
}
|
|
|
|
func (e *InvalidParamFormatError) Unwrap() error {
|
|
return e.Err
|
|
}
|
|
|
|
type TooManyValuesForParamError struct {
|
|
ParamName string
|
|
Count int
|
|
}
|
|
|
|
func (e *TooManyValuesForParamError) Error() string {
|
|
return fmt.Sprintf("Expected one value for %s, got %d", e.ParamName, e.Count)
|
|
}
|
|
|
|
// Handler creates http.Handler with routing matching OpenAPI spec.
|
|
func Handler(si ServerInterface) http.Handler {
|
|
return HandlerWithOptions(si, ChiServerOptions{})
|
|
}
|
|
|
|
type ChiServerOptions struct {
|
|
BaseURL string
|
|
BaseRouter chi.Router
|
|
Middlewares []MiddlewareFunc
|
|
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
|
|
}
|
|
|
|
// HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
|
|
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler {
|
|
return HandlerWithOptions(si, ChiServerOptions{
|
|
BaseRouter: r,
|
|
})
|
|
}
|
|
|
|
func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler {
|
|
return HandlerWithOptions(si, ChiServerOptions{
|
|
BaseURL: baseURL,
|
|
BaseRouter: r,
|
|
})
|
|
}
|
|
|
|
// HandlerWithOptions creates http.Handler with additional options
|
|
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler {
|
|
r := options.BaseRouter
|
|
|
|
if r == nil {
|
|
r = chi.NewRouter()
|
|
}
|
|
if options.ErrorHandlerFunc == nil {
|
|
options.ErrorHandlerFunc = func(w http.ResponseWriter, r *http.Request, err error) {
|
|
http.Error(w, err.Error(), http.StatusBadRequest)
|
|
}
|
|
}
|
|
wrapper := ServerInterfaceWrapper{
|
|
Handler: si,
|
|
HandlerMiddlewares: options.Middlewares,
|
|
ErrorHandlerFunc: options.ErrorHandlerFunc,
|
|
}
|
|
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/agent-activity", wrapper.QueryAgentActivity)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/approvals", wrapper.ListApprovals)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Post(options.BaseURL+"/approvals/{id}/decision", wrapper.DecideApproval)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/audit", wrapper.QueryAudit)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/checks", wrapper.ListChecks)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Post(options.BaseURL+"/checks", wrapper.CreateCheck)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Patch(options.BaseURL+"/checks/{id}", wrapper.PatchCheck)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/classifications", wrapper.ListClassifications)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Post(options.BaseURL+"/clients/enroll", wrapper.EnrollClient)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/clients/{slug}/context", wrapper.GetClientContext)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/clients/{slug}/secrets", wrapper.GetClientSecrets)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/dashboard/summary", wrapper.GetDashboardSummary)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/entities", wrapper.ListEntities)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Post(options.BaseURL+"/entities", wrapper.CreateEntity)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Post(options.BaseURL+"/entities/provision", wrapper.ProvisionEntity)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/entities/{id}", wrapper.GetEntity)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Patch(options.BaseURL+"/entities/{id}", wrapper.PatchEntity)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/entities/{id}/blast-radius", wrapper.GetBlastRadius)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/entities/{id}/relations", wrapper.GetEntityRelations)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/entities/{slug}/provision/status", wrapper.GetProvisionStatus)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/events", wrapper.QueryEvents)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/events/stream", wrapper.StreamEvents)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/executions", wrapper.ListExecutions)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Post(options.BaseURL+"/executions", wrapper.RequestExecution)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/executions/{id}", wrapper.GetExecution)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Post(options.BaseURL+"/executions/{id}/cancel", wrapper.CancelExecution)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/export", wrapper.ExportSeeds)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/graph", wrapper.GetGraph)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/health", wrapper.GetFleetHealth)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/knowledge/search", wrapper.SearchKnowledge)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/knowledge/{entity_id}", wrapper.GetEntityKnowledge)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/metrics", wrapper.QueryMetrics)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/ontology", wrapper.GetOntology)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Post(options.BaseURL+"/ontology/entity-types", wrapper.CreateEntityType)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Patch(options.BaseURL+"/ontology/entity-types/{name}", wrapper.PatchEntityType)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/patterns", wrapper.ListPatterns)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Patch(options.BaseURL+"/patterns/{id}", wrapper.PatchPattern)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/policy/approval-rules", wrapper.ListApprovalRules)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Post(options.BaseURL+"/policy/approval-rules", wrapper.CreateApprovalRule)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Patch(options.BaseURL+"/policy/approval-rules/{id}", wrapper.PatchApprovalRule)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/policy/autonomy", wrapper.GetAutonomySettings)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Patch(options.BaseURL+"/policy/autonomy", wrapper.PatchAutonomySettings)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/policy/risk-classes", wrapper.ListRiskClasses)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Delete(options.BaseURL+"/relationships", wrapper.EndRelationship)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Post(options.BaseURL+"/relationships", wrapper.CreateRelationship)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/signals", wrapper.ListSignals)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Post(options.BaseURL+"/signals/{id}/ack", wrapper.AckSignal)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Post(options.BaseURL+"/signals/{id}/mute", wrapper.MuteSignal)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Post(options.BaseURL+"/signals/{id}/resolve", wrapper.ResolveSignal)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/skills", wrapper.ListSkills)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Patch(options.BaseURL+"/skills/{id}", wrapper.PatchSkill)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/skills/{id}/versions", wrapper.ListSkillVersions)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/trends/{entity_id}", wrapper.GetTrends)
|
|
})
|
|
|
|
return r
|
|
}
|
|
|
|
type PendingApprovalJSONResponse Approval
|
|
|
|
type ProblemApplicationProblemPlusJSONResponse Problem
|
|
|
|
type SignalUpdatedJSONResponse Signal
|
|
|
|
type QueryAgentActivityRequestObject struct {
|
|
Params QueryAgentActivityParams
|
|
}
|
|
|
|
type QueryAgentActivityResponseObject interface {
|
|
VisitQueryAgentActivityResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type QueryAgentActivity200JSONResponse struct {
|
|
Items []AgentActivity `json:"items"`
|
|
NextCursor *string `json:"next_cursor"`
|
|
}
|
|
|
|
func (response QueryAgentActivity200JSONResponse) VisitQueryAgentActivityResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type QueryAgentActivitydefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response QueryAgentActivitydefaultApplicationProblemPlusJSONResponse) VisitQueryAgentActivityResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type ListApprovalsRequestObject struct {
|
|
Params ListApprovalsParams
|
|
}
|
|
|
|
type ListApprovalsResponseObject interface {
|
|
VisitListApprovalsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ListApprovals200JSONResponse struct {
|
|
Items []Approval `json:"items"`
|
|
NextCursor *string `json:"next_cursor"`
|
|
}
|
|
|
|
func (response ListApprovals200JSONResponse) VisitListApprovalsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListApprovalsdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response ListApprovalsdefaultApplicationProblemPlusJSONResponse) VisitListApprovalsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type DecideApprovalRequestObject struct {
|
|
Id EntityId `json:"id"`
|
|
Params DecideApprovalParams
|
|
Body *DecideApprovalJSONRequestBody
|
|
}
|
|
|
|
type DecideApprovalResponseObject interface {
|
|
VisitDecideApprovalResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type DecideApproval200JSONResponse Approval
|
|
|
|
func (response DecideApproval200JSONResponse) VisitDecideApprovalResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DecideApprovaldefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response DecideApprovaldefaultApplicationProblemPlusJSONResponse) VisitDecideApprovalResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type QueryAuditRequestObject struct {
|
|
Params QueryAuditParams
|
|
}
|
|
|
|
type QueryAuditResponseObject interface {
|
|
VisitQueryAuditResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type QueryAudit200JSONResponse struct {
|
|
Items []AuditEntry `json:"items"`
|
|
NextCursor *string `json:"next_cursor"`
|
|
}
|
|
|
|
func (response QueryAudit200JSONResponse) VisitQueryAuditResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type QueryAuditdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response QueryAuditdefaultApplicationProblemPlusJSONResponse) VisitQueryAuditResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type ListChecksRequestObject struct {
|
|
Params ListChecksParams
|
|
}
|
|
|
|
type ListChecksResponseObject interface {
|
|
VisitListChecksResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ListChecks200JSONResponse struct {
|
|
Items []Check `json:"items"`
|
|
NextCursor *string `json:"next_cursor"`
|
|
}
|
|
|
|
func (response ListChecks200JSONResponse) VisitListChecksResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListChecksdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response ListChecksdefaultApplicationProblemPlusJSONResponse) VisitListChecksResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type CreateCheckRequestObject struct {
|
|
Params CreateCheckParams
|
|
Body *CreateCheckJSONRequestBody
|
|
}
|
|
|
|
type CreateCheckResponseObject interface {
|
|
VisitCreateCheckResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type CreateCheck201JSONResponse Check
|
|
|
|
func (response CreateCheck201JSONResponse) VisitCreateCheckResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(201)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type CreateCheckdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response CreateCheckdefaultApplicationProblemPlusJSONResponse) VisitCreateCheckResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type PatchCheckRequestObject struct {
|
|
Id EntityId `json:"id"`
|
|
Params PatchCheckParams
|
|
Body *PatchCheckJSONRequestBody
|
|
}
|
|
|
|
type PatchCheckResponseObject interface {
|
|
VisitPatchCheckResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type PatchCheck200JSONResponse Check
|
|
|
|
func (response PatchCheck200JSONResponse) VisitPatchCheckResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type PatchCheckdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response PatchCheckdefaultApplicationProblemPlusJSONResponse) VisitPatchCheckResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type ListClassificationsRequestObject struct {
|
|
Params ListClassificationsParams
|
|
}
|
|
|
|
type ListClassificationsResponseObject interface {
|
|
VisitListClassificationsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ListClassifications200JSONResponse struct {
|
|
Items []Classification `json:"items"`
|
|
NextCursor *string `json:"next_cursor"`
|
|
}
|
|
|
|
func (response ListClassifications200JSONResponse) VisitListClassificationsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListClassificationsdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response ListClassificationsdefaultApplicationProblemPlusJSONResponse) VisitListClassificationsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type EnrollClientRequestObject struct {
|
|
Body *EnrollClientJSONRequestBody
|
|
}
|
|
|
|
type EnrollClientResponseObject interface {
|
|
VisitEnrollClientResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type EnrollClient200JSONResponse EnrollResponse
|
|
|
|
func (response EnrollClient200JSONResponse) VisitEnrollClientResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type EnrollClientdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response EnrollClientdefaultApplicationProblemPlusJSONResponse) VisitEnrollClientResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type GetClientContextRequestObject struct {
|
|
Slug EntitySlug `json:"slug"`
|
|
Params GetClientContextParams
|
|
}
|
|
|
|
type GetClientContextResponseObject interface {
|
|
VisitGetClientContextResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetClientContext200JSONResponse ClientContext
|
|
|
|
func (response GetClientContext200JSONResponse) VisitGetClientContextResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetClientContextdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response GetClientContextdefaultApplicationProblemPlusJSONResponse) VisitGetClientContextResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type GetClientSecretsRequestObject struct {
|
|
Slug EntitySlug `json:"slug"`
|
|
}
|
|
|
|
type GetClientSecretsResponseObject interface {
|
|
VisitGetClientSecretsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetClientSecrets200JSONResponse ClientSecrets
|
|
|
|
func (response GetClientSecrets200JSONResponse) VisitGetClientSecretsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetClientSecretsdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response GetClientSecretsdefaultApplicationProblemPlusJSONResponse) VisitGetClientSecretsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type GetDashboardSummaryRequestObject struct {
|
|
}
|
|
|
|
type GetDashboardSummaryResponseObject interface {
|
|
VisitGetDashboardSummaryResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetDashboardSummary200JSONResponse DashboardSummary
|
|
|
|
func (response GetDashboardSummary200JSONResponse) VisitGetDashboardSummaryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDashboardSummarydefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response GetDashboardSummarydefaultApplicationProblemPlusJSONResponse) VisitGetDashboardSummaryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type ListEntitiesRequestObject struct {
|
|
Params ListEntitiesParams
|
|
}
|
|
|
|
type ListEntitiesResponseObject interface {
|
|
VisitListEntitiesResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ListEntities200JSONResponse struct {
|
|
Items []Entity `json:"items"`
|
|
NextCursor *string `json:"next_cursor"`
|
|
}
|
|
|
|
func (response ListEntities200JSONResponse) VisitListEntitiesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListEntitiesdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response ListEntitiesdefaultApplicationProblemPlusJSONResponse) VisitListEntitiesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type CreateEntityRequestObject struct {
|
|
Params CreateEntityParams
|
|
Body *CreateEntityJSONRequestBody
|
|
}
|
|
|
|
type CreateEntityResponseObject interface {
|
|
VisitCreateEntityResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type CreateEntity201ResponseHeaders struct {
|
|
ETag string
|
|
}
|
|
|
|
type CreateEntity201JSONResponse struct {
|
|
Body Entity
|
|
Headers CreateEntity201ResponseHeaders
|
|
}
|
|
|
|
func (response CreateEntity201JSONResponse) VisitCreateEntityResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.Header().Set("ETag", fmt.Sprint(response.Headers.ETag))
|
|
w.WriteHeader(201)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type CreateEntitydefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response CreateEntitydefaultApplicationProblemPlusJSONResponse) VisitCreateEntityResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type ProvisionEntityRequestObject struct {
|
|
Params ProvisionEntityParams
|
|
Body *ProvisionEntityJSONRequestBody
|
|
}
|
|
|
|
type ProvisionEntityResponseObject interface {
|
|
VisitProvisionEntityResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ProvisionEntity201ResponseHeaders struct {
|
|
ETag string
|
|
}
|
|
|
|
type ProvisionEntity201JSONResponse struct {
|
|
Body ProvisionResponse
|
|
Headers ProvisionEntity201ResponseHeaders
|
|
}
|
|
|
|
func (response ProvisionEntity201JSONResponse) VisitProvisionEntityResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.Header().Set("ETag", fmt.Sprint(response.Headers.ETag))
|
|
w.WriteHeader(201)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type ProvisionEntitydefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response ProvisionEntitydefaultApplicationProblemPlusJSONResponse) VisitProvisionEntityResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type GetEntityRequestObject struct {
|
|
Id EntityId `json:"id"`
|
|
}
|
|
|
|
type GetEntityResponseObject interface {
|
|
VisitGetEntityResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetEntity200ResponseHeaders struct {
|
|
ETag string
|
|
}
|
|
|
|
type GetEntity200JSONResponse struct {
|
|
Body Entity
|
|
Headers GetEntity200ResponseHeaders
|
|
}
|
|
|
|
func (response GetEntity200JSONResponse) VisitGetEntityResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.Header().Set("ETag", fmt.Sprint(response.Headers.ETag))
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type GetEntitydefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response GetEntitydefaultApplicationProblemPlusJSONResponse) VisitGetEntityResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type PatchEntityRequestObject struct {
|
|
Id EntityId `json:"id"`
|
|
Params PatchEntityParams
|
|
Body *PatchEntityJSONRequestBody
|
|
}
|
|
|
|
type PatchEntityResponseObject interface {
|
|
VisitPatchEntityResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type PatchEntity200ResponseHeaders struct {
|
|
ETag string
|
|
}
|
|
|
|
type PatchEntity200JSONResponse struct {
|
|
Body Entity
|
|
Headers PatchEntity200ResponseHeaders
|
|
}
|
|
|
|
func (response PatchEntity200JSONResponse) VisitPatchEntityResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.Header().Set("ETag", fmt.Sprint(response.Headers.ETag))
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type PatchEntitydefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response PatchEntitydefaultApplicationProblemPlusJSONResponse) VisitPatchEntityResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type GetBlastRadiusRequestObject struct {
|
|
Id EntityId `json:"id"`
|
|
Params GetBlastRadiusParams
|
|
}
|
|
|
|
type GetBlastRadiusResponseObject interface {
|
|
VisitGetBlastRadiusResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetBlastRadius200JSONResponse struct {
|
|
Items []struct {
|
|
Depth int `json:"depth"`
|
|
Entity Entity `json:"entity"`
|
|
} `json:"items"`
|
|
}
|
|
|
|
func (response GetBlastRadius200JSONResponse) VisitGetBlastRadiusResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetBlastRadiusdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response GetBlastRadiusdefaultApplicationProblemPlusJSONResponse) VisitGetBlastRadiusResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type GetEntityRelationsRequestObject struct {
|
|
Id EntityId `json:"id"`
|
|
Params GetEntityRelationsParams
|
|
}
|
|
|
|
type GetEntityRelationsResponseObject interface {
|
|
VisitGetEntityRelationsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetEntityRelations200JSONResponse struct {
|
|
Items []Relationship `json:"items"`
|
|
}
|
|
|
|
func (response GetEntityRelations200JSONResponse) VisitGetEntityRelationsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetEntityRelationsdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response GetEntityRelationsdefaultApplicationProblemPlusJSONResponse) VisitGetEntityRelationsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type GetProvisionStatusRequestObject struct {
|
|
Slug EntitySlug `json:"slug"`
|
|
}
|
|
|
|
type GetProvisionStatusResponseObject interface {
|
|
VisitGetProvisionStatusResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetProvisionStatus200JSONResponse ProvisionStatus
|
|
|
|
func (response GetProvisionStatus200JSONResponse) VisitGetProvisionStatusResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetProvisionStatusdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response GetProvisionStatusdefaultApplicationProblemPlusJSONResponse) VisitGetProvisionStatusResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type QueryEventsRequestObject struct {
|
|
Params QueryEventsParams
|
|
}
|
|
|
|
type QueryEventsResponseObject interface {
|
|
VisitQueryEventsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type QueryEvents200JSONResponse struct {
|
|
Items []Event `json:"items"`
|
|
NextCursor *string `json:"next_cursor"`
|
|
}
|
|
|
|
func (response QueryEvents200JSONResponse) VisitQueryEventsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type QueryEventsdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response QueryEventsdefaultApplicationProblemPlusJSONResponse) VisitQueryEventsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type StreamEventsRequestObject struct {
|
|
Params StreamEventsParams
|
|
}
|
|
|
|
type StreamEventsResponseObject interface {
|
|
VisitStreamEventsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type StreamEvents200TexteventStreamResponse struct {
|
|
Body io.Reader
|
|
ContentLength int64
|
|
}
|
|
|
|
func (response StreamEvents200TexteventStreamResponse) VisitStreamEventsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "text/event-stream")
|
|
if response.ContentLength != 0 {
|
|
w.Header().Set("Content-Length", fmt.Sprint(response.ContentLength))
|
|
}
|
|
w.WriteHeader(200)
|
|
|
|
if closer, ok := response.Body.(io.ReadCloser); ok {
|
|
defer closer.Close()
|
|
}
|
|
_, err := io.Copy(w, response.Body)
|
|
return err
|
|
}
|
|
|
|
type StreamEventsdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response StreamEventsdefaultApplicationProblemPlusJSONResponse) VisitStreamEventsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type ListExecutionsRequestObject struct {
|
|
Params ListExecutionsParams
|
|
}
|
|
|
|
type ListExecutionsResponseObject interface {
|
|
VisitListExecutionsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ListExecutions200JSONResponse struct {
|
|
Items []Execution `json:"items"`
|
|
NextCursor *string `json:"next_cursor"`
|
|
}
|
|
|
|
func (response ListExecutions200JSONResponse) VisitListExecutionsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListExecutionsdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response ListExecutionsdefaultApplicationProblemPlusJSONResponse) VisitListExecutionsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type RequestExecutionRequestObject struct {
|
|
Params RequestExecutionParams
|
|
Body *RequestExecutionJSONRequestBody
|
|
}
|
|
|
|
type RequestExecutionResponseObject interface {
|
|
VisitRequestExecutionResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type RequestExecution201JSONResponse Execution
|
|
|
|
func (response RequestExecution201JSONResponse) VisitRequestExecutionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(201)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type RequestExecutiondefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response RequestExecutiondefaultApplicationProblemPlusJSONResponse) VisitRequestExecutionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type GetExecutionRequestObject struct {
|
|
Id EntityId `json:"id"`
|
|
}
|
|
|
|
type GetExecutionResponseObject interface {
|
|
VisitGetExecutionResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetExecution200JSONResponse Execution
|
|
|
|
func (response GetExecution200JSONResponse) VisitGetExecutionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetExecutiondefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response GetExecutiondefaultApplicationProblemPlusJSONResponse) VisitGetExecutionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type CancelExecutionRequestObject struct {
|
|
Id EntityId `json:"id"`
|
|
}
|
|
|
|
type CancelExecutionResponseObject interface {
|
|
VisitCancelExecutionResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type CancelExecution200JSONResponse Execution
|
|
|
|
func (response CancelExecution200JSONResponse) VisitCancelExecutionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type CancelExecutiondefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response CancelExecutiondefaultApplicationProblemPlusJSONResponse) VisitCancelExecutionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type ExportSeedsRequestObject struct {
|
|
}
|
|
|
|
type ExportSeedsResponseObject interface {
|
|
VisitExportSeedsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ExportSeeds200JSONResponse struct {
|
|
// Inventory YAML document
|
|
Inventory string `json:"inventory"`
|
|
|
|
// Ontology YAML document
|
|
Ontology string `json:"ontology"`
|
|
|
|
// Policy YAML document
|
|
Policy string `json:"policy"`
|
|
}
|
|
|
|
func (response ExportSeeds200JSONResponse) VisitExportSeedsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ExportSeedsdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response ExportSeedsdefaultApplicationProblemPlusJSONResponse) VisitExportSeedsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type GetGraphRequestObject struct {
|
|
Params GetGraphParams
|
|
}
|
|
|
|
type GetGraphResponseObject interface {
|
|
VisitGetGraphResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetGraph200JSONResponse GraphView
|
|
|
|
func (response GetGraph200JSONResponse) VisitGetGraphResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetGraphdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response GetGraphdefaultApplicationProblemPlusJSONResponse) VisitGetGraphResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type GetFleetHealthRequestObject struct {
|
|
}
|
|
|
|
type GetFleetHealthResponseObject interface {
|
|
VisitGetFleetHealthResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetFleetHealth200JSONResponse HealthSummary
|
|
|
|
func (response GetFleetHealth200JSONResponse) VisitGetFleetHealthResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetFleetHealthdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response GetFleetHealthdefaultApplicationProblemPlusJSONResponse) VisitGetFleetHealthResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type SearchKnowledgeRequestObject struct {
|
|
Params SearchKnowledgeParams
|
|
}
|
|
|
|
type SearchKnowledgeResponseObject interface {
|
|
VisitSearchKnowledgeResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type SearchKnowledge200JSONResponse struct {
|
|
Items []KnowledgeHit `json:"items"`
|
|
}
|
|
|
|
func (response SearchKnowledge200JSONResponse) VisitSearchKnowledgeResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type SearchKnowledgedefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response SearchKnowledgedefaultApplicationProblemPlusJSONResponse) VisitSearchKnowledgeResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type GetEntityKnowledgeRequestObject struct {
|
|
EntityId string `json:"entity_id"`
|
|
}
|
|
|
|
type GetEntityKnowledgeResponseObject interface {
|
|
VisitGetEntityKnowledgeResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetEntityKnowledge200JSONResponse struct {
|
|
Items []KnowledgeHit `json:"items"`
|
|
}
|
|
|
|
func (response GetEntityKnowledge200JSONResponse) VisitGetEntityKnowledgeResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetEntityKnowledgedefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response GetEntityKnowledgedefaultApplicationProblemPlusJSONResponse) VisitGetEntityKnowledgeResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type QueryMetricsRequestObject struct {
|
|
Params QueryMetricsParams
|
|
}
|
|
|
|
type QueryMetricsResponseObject interface {
|
|
VisitQueryMetricsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type QueryMetrics200JSONResponse struct {
|
|
Items []MetricSeries `json:"items"`
|
|
}
|
|
|
|
func (response QueryMetrics200JSONResponse) VisitQueryMetricsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type QueryMetricsdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response QueryMetricsdefaultApplicationProblemPlusJSONResponse) VisitQueryMetricsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type GetOntologyRequestObject struct {
|
|
}
|
|
|
|
type GetOntologyResponseObject interface {
|
|
VisitGetOntologyResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetOntology200JSONResponse struct {
|
|
EntityTypes []EntityType `json:"entity_types"`
|
|
Lifecycles []LifecycleDef `json:"lifecycles"`
|
|
RelationshipTypes []RelationshipType `json:"relationship_types"`
|
|
}
|
|
|
|
func (response GetOntology200JSONResponse) VisitGetOntologyResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetOntologydefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response GetOntologydefaultApplicationProblemPlusJSONResponse) VisitGetOntologyResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type CreateEntityTypeRequestObject struct {
|
|
Params CreateEntityTypeParams
|
|
Body *CreateEntityTypeJSONRequestBody
|
|
}
|
|
|
|
type CreateEntityTypeResponseObject interface {
|
|
VisitCreateEntityTypeResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type CreateEntityType201JSONResponse EntityType
|
|
|
|
func (response CreateEntityType201JSONResponse) VisitCreateEntityTypeResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(201)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type CreateEntityType202JSONResponse struct{ PendingApprovalJSONResponse }
|
|
|
|
func (response CreateEntityType202JSONResponse) VisitCreateEntityTypeResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(202)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type CreateEntityTypedefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response CreateEntityTypedefaultApplicationProblemPlusJSONResponse) VisitCreateEntityTypeResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type PatchEntityTypeRequestObject struct {
|
|
Name string `json:"name"`
|
|
Params PatchEntityTypeParams
|
|
Body *PatchEntityTypeJSONRequestBody
|
|
}
|
|
|
|
type PatchEntityTypeResponseObject interface {
|
|
VisitPatchEntityTypeResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type PatchEntityType200JSONResponse EntityType
|
|
|
|
func (response PatchEntityType200JSONResponse) VisitPatchEntityTypeResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type PatchEntityType202JSONResponse struct{ PendingApprovalJSONResponse }
|
|
|
|
func (response PatchEntityType202JSONResponse) VisitPatchEntityTypeResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(202)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type PatchEntityTypedefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response PatchEntityTypedefaultApplicationProblemPlusJSONResponse) VisitPatchEntityTypeResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type ListPatternsRequestObject struct {
|
|
Params ListPatternsParams
|
|
}
|
|
|
|
type ListPatternsResponseObject interface {
|
|
VisitListPatternsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ListPatterns200JSONResponse struct {
|
|
Items []Pattern `json:"items"`
|
|
NextCursor *string `json:"next_cursor"`
|
|
}
|
|
|
|
func (response ListPatterns200JSONResponse) VisitListPatternsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListPatternsdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response ListPatternsdefaultApplicationProblemPlusJSONResponse) VisitListPatternsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type PatchPatternRequestObject struct {
|
|
Id EntityId `json:"id"`
|
|
Params PatchPatternParams
|
|
Body *PatchPatternJSONRequestBody
|
|
}
|
|
|
|
type PatchPatternResponseObject interface {
|
|
VisitPatchPatternResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type PatchPattern200JSONResponse Pattern
|
|
|
|
func (response PatchPattern200JSONResponse) VisitPatchPatternResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type PatchPattern202JSONResponse struct{ PendingApprovalJSONResponse }
|
|
|
|
func (response PatchPattern202JSONResponse) VisitPatchPatternResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(202)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type PatchPatterndefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response PatchPatterndefaultApplicationProblemPlusJSONResponse) VisitPatchPatternResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type ListApprovalRulesRequestObject struct {
|
|
}
|
|
|
|
type ListApprovalRulesResponseObject interface {
|
|
VisitListApprovalRulesResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ListApprovalRules200JSONResponse struct {
|
|
Items []ApprovalRule `json:"items"`
|
|
}
|
|
|
|
func (response ListApprovalRules200JSONResponse) VisitListApprovalRulesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListApprovalRulesdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response ListApprovalRulesdefaultApplicationProblemPlusJSONResponse) VisitListApprovalRulesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type CreateApprovalRuleRequestObject struct {
|
|
Params CreateApprovalRuleParams
|
|
Body *CreateApprovalRuleJSONRequestBody
|
|
}
|
|
|
|
type CreateApprovalRuleResponseObject interface {
|
|
VisitCreateApprovalRuleResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type CreateApprovalRule202JSONResponse struct{ PendingApprovalJSONResponse }
|
|
|
|
func (response CreateApprovalRule202JSONResponse) VisitCreateApprovalRuleResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(202)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type CreateApprovalRuledefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response CreateApprovalRuledefaultApplicationProblemPlusJSONResponse) VisitCreateApprovalRuleResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type PatchApprovalRuleRequestObject struct {
|
|
Id EntityId `json:"id"`
|
|
Params PatchApprovalRuleParams
|
|
Body *PatchApprovalRuleJSONRequestBody
|
|
}
|
|
|
|
type PatchApprovalRuleResponseObject interface {
|
|
VisitPatchApprovalRuleResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type PatchApprovalRule202JSONResponse struct{ PendingApprovalJSONResponse }
|
|
|
|
func (response PatchApprovalRule202JSONResponse) VisitPatchApprovalRuleResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(202)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type PatchApprovalRuledefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response PatchApprovalRuledefaultApplicationProblemPlusJSONResponse) VisitPatchApprovalRuleResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type GetAutonomySettingsRequestObject struct {
|
|
}
|
|
|
|
type GetAutonomySettingsResponseObject interface {
|
|
VisitGetAutonomySettingsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetAutonomySettings200JSONResponse struct {
|
|
Items []AutonomySetting `json:"items"`
|
|
}
|
|
|
|
func (response GetAutonomySettings200JSONResponse) VisitGetAutonomySettingsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAutonomySettingsdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response GetAutonomySettingsdefaultApplicationProblemPlusJSONResponse) VisitGetAutonomySettingsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type PatchAutonomySettingsRequestObject struct {
|
|
Body *PatchAutonomySettingsJSONRequestBody
|
|
}
|
|
|
|
type PatchAutonomySettingsResponseObject interface {
|
|
VisitPatchAutonomySettingsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type PatchAutonomySettings200JSONResponse struct {
|
|
Items []AutonomySetting `json:"items"`
|
|
}
|
|
|
|
func (response PatchAutonomySettings200JSONResponse) VisitPatchAutonomySettingsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type PatchAutonomySettings202JSONResponse struct{ PendingApprovalJSONResponse }
|
|
|
|
func (response PatchAutonomySettings202JSONResponse) VisitPatchAutonomySettingsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(202)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type PatchAutonomySettingsdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response PatchAutonomySettingsdefaultApplicationProblemPlusJSONResponse) VisitPatchAutonomySettingsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type ListRiskClassesRequestObject struct {
|
|
}
|
|
|
|
type ListRiskClassesResponseObject interface {
|
|
VisitListRiskClassesResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ListRiskClasses200JSONResponse struct {
|
|
Items []RiskClass `json:"items"`
|
|
}
|
|
|
|
func (response ListRiskClasses200JSONResponse) VisitListRiskClassesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListRiskClassesdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response ListRiskClassesdefaultApplicationProblemPlusJSONResponse) VisitListRiskClassesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type EndRelationshipRequestObject struct {
|
|
Params EndRelationshipParams
|
|
}
|
|
|
|
type EndRelationshipResponseObject interface {
|
|
VisitEndRelationshipResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type EndRelationship204Response struct {
|
|
}
|
|
|
|
func (response EndRelationship204Response) VisitEndRelationshipResponse(w http.ResponseWriter) error {
|
|
w.WriteHeader(204)
|
|
return nil
|
|
}
|
|
|
|
type EndRelationshipdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response EndRelationshipdefaultApplicationProblemPlusJSONResponse) VisitEndRelationshipResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type CreateRelationshipRequestObject struct {
|
|
Params CreateRelationshipParams
|
|
Body *CreateRelationshipJSONRequestBody
|
|
}
|
|
|
|
type CreateRelationshipResponseObject interface {
|
|
VisitCreateRelationshipResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type CreateRelationship201JSONResponse Relationship
|
|
|
|
func (response CreateRelationship201JSONResponse) VisitCreateRelationshipResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(201)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type CreateRelationshipdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response CreateRelationshipdefaultApplicationProblemPlusJSONResponse) VisitCreateRelationshipResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type ListSignalsRequestObject struct {
|
|
Params ListSignalsParams
|
|
}
|
|
|
|
type ListSignalsResponseObject interface {
|
|
VisitListSignalsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ListSignals200JSONResponse struct {
|
|
Items []Signal `json:"items"`
|
|
NextCursor *string `json:"next_cursor"`
|
|
}
|
|
|
|
func (response ListSignals200JSONResponse) VisitListSignalsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListSignalsdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response ListSignalsdefaultApplicationProblemPlusJSONResponse) VisitListSignalsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type AckSignalRequestObject struct {
|
|
Id EntityId `json:"id"`
|
|
}
|
|
|
|
type AckSignalResponseObject interface {
|
|
VisitAckSignalResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type AckSignal200JSONResponse struct{ SignalUpdatedJSONResponse }
|
|
|
|
func (response AckSignal200JSONResponse) VisitAckSignalResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type AckSignaldefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response AckSignaldefaultApplicationProblemPlusJSONResponse) VisitAckSignalResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type MuteSignalRequestObject struct {
|
|
Id EntityId `json:"id"`
|
|
Body *MuteSignalJSONRequestBody
|
|
}
|
|
|
|
type MuteSignalResponseObject interface {
|
|
VisitMuteSignalResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type MuteSignal200JSONResponse struct{ SignalUpdatedJSONResponse }
|
|
|
|
func (response MuteSignal200JSONResponse) VisitMuteSignalResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type MuteSignaldefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response MuteSignaldefaultApplicationProblemPlusJSONResponse) VisitMuteSignalResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type ResolveSignalRequestObject struct {
|
|
Id EntityId `json:"id"`
|
|
Body *ResolveSignalJSONRequestBody
|
|
}
|
|
|
|
type ResolveSignalResponseObject interface {
|
|
VisitResolveSignalResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ResolveSignal200JSONResponse struct{ SignalUpdatedJSONResponse }
|
|
|
|
func (response ResolveSignal200JSONResponse) VisitResolveSignalResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ResolveSignaldefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response ResolveSignaldefaultApplicationProblemPlusJSONResponse) VisitResolveSignalResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type ListSkillsRequestObject struct {
|
|
Params ListSkillsParams
|
|
}
|
|
|
|
type ListSkillsResponseObject interface {
|
|
VisitListSkillsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ListSkills200JSONResponse struct {
|
|
Items []Skill `json:"items"`
|
|
NextCursor *string `json:"next_cursor"`
|
|
}
|
|
|
|
func (response ListSkills200JSONResponse) VisitListSkillsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListSkillsdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response ListSkillsdefaultApplicationProblemPlusJSONResponse) VisitListSkillsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type PatchSkillRequestObject struct {
|
|
Id EntityId `json:"id"`
|
|
Params PatchSkillParams
|
|
Body *PatchSkillJSONRequestBody
|
|
}
|
|
|
|
type PatchSkillResponseObject interface {
|
|
VisitPatchSkillResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type PatchSkill200JSONResponse Skill
|
|
|
|
func (response PatchSkill200JSONResponse) VisitPatchSkillResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type PatchSkill202JSONResponse struct{ PendingApprovalJSONResponse }
|
|
|
|
func (response PatchSkill202JSONResponse) VisitPatchSkillResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(202)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type PatchSkilldefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response PatchSkilldefaultApplicationProblemPlusJSONResponse) VisitPatchSkillResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type ListSkillVersionsRequestObject struct {
|
|
Id EntityId `json:"id"`
|
|
}
|
|
|
|
type ListSkillVersionsResponseObject interface {
|
|
VisitListSkillVersionsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ListSkillVersions200JSONResponse struct {
|
|
Items []Skill `json:"items"`
|
|
}
|
|
|
|
func (response ListSkillVersions200JSONResponse) VisitListSkillVersionsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListSkillVersionsdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response ListSkillVersionsdefaultApplicationProblemPlusJSONResponse) VisitListSkillVersionsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
type GetTrendsRequestObject struct {
|
|
EntityId string `json:"entity_id"`
|
|
Params GetTrendsParams
|
|
}
|
|
|
|
type GetTrendsResponseObject interface {
|
|
VisitGetTrendsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetTrends200JSONResponse struct {
|
|
Items []Trend `json:"items"`
|
|
}
|
|
|
|
func (response GetTrends200JSONResponse) VisitGetTrendsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetTrendsdefaultApplicationProblemPlusJSONResponse struct {
|
|
Body Problem
|
|
StatusCode int
|
|
}
|
|
|
|
func (response GetTrendsdefaultApplicationProblemPlusJSONResponse) VisitGetTrendsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/problem+json")
|
|
w.WriteHeader(response.StatusCode)
|
|
|
|
return json.NewEncoder(w).Encode(response.Body)
|
|
}
|
|
|
|
// StrictServerInterface represents all server handlers.
|
|
type StrictServerInterface interface {
|
|
// Agent behavior log
|
|
// (GET /agent-activity)
|
|
QueryAgentActivity(ctx context.Context, request QueryAgentActivityRequestObject) (QueryAgentActivityResponseObject, error)
|
|
// List approvals
|
|
// (GET /approvals)
|
|
ListApprovals(ctx context.Context, request ListApprovalsRequestObject) (ListApprovalsResponseObject, error)
|
|
// Approve or deny (single-use token verified server-side)
|
|
// (POST /approvals/{id}/decision)
|
|
DecideApproval(ctx context.Context, request DecideApprovalRequestObject) (DecideApprovalResponseObject, error)
|
|
// Audit log
|
|
// (GET /audit)
|
|
QueryAudit(ctx context.Context, request QueryAuditRequestObject) (QueryAuditResponseObject, error)
|
|
// List check definitions
|
|
// (GET /checks)
|
|
ListChecks(ctx context.Context, request ListChecksRequestObject) (ListChecksResponseObject, error)
|
|
// Create a check (checks-as-data, plan R3-7)
|
|
// (POST /checks)
|
|
CreateCheck(ctx context.Context, request CreateCheckRequestObject) (CreateCheckResponseObject, error)
|
|
// Update or disable a check
|
|
// (PATCH /checks/{id})
|
|
PatchCheck(ctx context.Context, request PatchCheckRequestObject) (PatchCheckResponseObject, error)
|
|
// Classifier decisions (the autonomous-decision audit trail)
|
|
// (GET /classifications)
|
|
ListClassifications(ctx context.Context, request ListClassificationsRequestObject) (ListClassificationsResponseObject, error)
|
|
// Enroll a new client — issue age key, create Infisical identity
|
|
// (POST /clients/enroll)
|
|
EnrollClient(ctx context.Context, request EnrollClientRequestObject) (EnrollClientResponseObject, error)
|
|
// Get agent context delta since a timestamp
|
|
// (GET /clients/{slug}/context)
|
|
GetClientContext(ctx context.Context, request GetClientContextRequestObject) (GetClientContextResponseObject, error)
|
|
// List secrets accessible to this client
|
|
// (GET /clients/{slug}/secrets)
|
|
GetClientSecrets(ctx context.Context, request GetClientSecretsRequestObject) (GetClientSecretsResponseObject, error)
|
|
// One-round-trip overview for the control room home page
|
|
// (GET /dashboard/summary)
|
|
GetDashboardSummary(ctx context.Context, request GetDashboardSummaryRequestObject) (GetDashboardSummaryResponseObject, error)
|
|
// List entities
|
|
// (GET /entities)
|
|
ListEntities(ctx context.Context, request ListEntitiesRequestObject) (ListEntitiesResponseObject, error)
|
|
// Create an entity
|
|
// (POST /entities)
|
|
CreateEntity(ctx context.Context, request CreateEntityRequestObject) (CreateEntityResponseObject, error)
|
|
// Provision a compute entity (LXC, VM, container) on a host
|
|
// (POST /entities/provision)
|
|
ProvisionEntity(ctx context.Context, request ProvisionEntityRequestObject) (ProvisionEntityResponseObject, error)
|
|
// Get entity by UUID or slug
|
|
// (GET /entities/{id})
|
|
GetEntity(ctx context.Context, request GetEntityRequestObject) (GetEntityResponseObject, error)
|
|
// Update attributes or transition lifecycle state
|
|
// (PATCH /entities/{id})
|
|
PatchEntity(ctx context.Context, request PatchEntityRequestObject) (PatchEntityResponseObject, error)
|
|
// Entities affected if this entity fails
|
|
// (GET /entities/{id}/blast-radius)
|
|
GetBlastRadius(ctx context.Context, request GetBlastRadiusRequestObject) (GetBlastRadiusResponseObject, error)
|
|
// Direct relationships of an entity (both directions)
|
|
// (GET /entities/{id}/relations)
|
|
GetEntityRelations(ctx context.Context, request GetEntityRelationsRequestObject) (GetEntityRelationsResponseObject, error)
|
|
// Poll provisioning progress for a compute entity
|
|
// (GET /entities/{slug}/provision/status)
|
|
GetProvisionStatus(ctx context.Context, request GetProvisionStatusRequestObject) (GetProvisionStatusResponseObject, error)
|
|
// Historical events
|
|
// (GET /events)
|
|
QueryEvents(ctx context.Context, request QueryEventsRequestObject) (QueryEventsResponseObject, error)
|
|
// Live event stream (SSE)
|
|
// (GET /events/stream)
|
|
StreamEvents(ctx context.Context, request StreamEventsRequestObject) (StreamEventsResponseObject, error)
|
|
// List executions
|
|
// (GET /executions)
|
|
ListExecutions(ctx context.Context, request ListExecutionsRequestObject) (ListExecutionsResponseObject, error)
|
|
// Request an execution (classify → approval check → enqueue)
|
|
// (POST /executions)
|
|
RequestExecution(ctx context.Context, request RequestExecutionRequestObject) (RequestExecutionResponseObject, error)
|
|
// Execution status + result
|
|
// (GET /executions/{id})
|
|
GetExecution(ctx context.Context, request GetExecutionRequestObject) (GetExecutionResponseObject, error)
|
|
// Cancel a proposed/executing execution
|
|
// (POST /executions/{id}/cancel)
|
|
CancelExecution(ctx context.Context, request CancelExecutionRequestObject) (CancelExecutionResponseObject, error)
|
|
// Regenerate seed YAMLs from current DB state (DR / version control)
|
|
// (GET /export)
|
|
ExportSeeds(ctx context.Context, request ExportSeedsRequestObject) (ExportSeedsResponseObject, error)
|
|
// Subgraph for visualization (nodes + edges)
|
|
// (GET /graph)
|
|
GetGraph(ctx context.Context, request GetGraphRequestObject) (GetGraphResponseObject, error)
|
|
// Fleet health summary with trend indicators
|
|
// (GET /health)
|
|
GetFleetHealth(ctx context.Context, request GetFleetHealthRequestObject) (GetFleetHealthResponseObject, error)
|
|
// Full-text search over knowledge entities (documents, runbooks)
|
|
// (GET /knowledge/search)
|
|
SearchKnowledge(ctx context.Context, request SearchKnowledgeRequestObject) (SearchKnowledgeResponseObject, error)
|
|
// All documents/runbooks linked to an entity
|
|
// (GET /knowledge/{entity_id})
|
|
GetEntityKnowledge(ctx context.Context, request GetEntityKnowledgeRequestObject) (GetEntityKnowledgeResponseObject, error)
|
|
// Query time-series metrics
|
|
// (GET /metrics)
|
|
QueryMetrics(ctx context.Context, request QueryMetricsRequestObject) (QueryMetricsResponseObject, error)
|
|
// Full ontology — entity types, relationship types, lifecycles
|
|
// (GET /ontology)
|
|
GetOntology(ctx context.Context, request GetOntologyRequestObject) (GetOntologyResponseObject, error)
|
|
// Extend the ontology with a new entity type
|
|
// (POST /ontology/entity-types)
|
|
CreateEntityType(ctx context.Context, request CreateEntityTypeRequestObject) (CreateEntityTypeResponseObject, error)
|
|
// Update or deprecate an entity type
|
|
// (PATCH /ontology/entity-types/{name})
|
|
PatchEntityType(ctx context.Context, request PatchEntityTypeRequestObject) (PatchEntityTypeResponseObject, error)
|
|
// List patterns
|
|
// (GET /patterns)
|
|
ListPatterns(ctx context.Context, request ListPatternsRequestObject) (ListPatternsResponseObject, error)
|
|
// Transition a pattern (activate / invalidate / deprecate)
|
|
// (PATCH /patterns/{id})
|
|
PatchPattern(ctx context.Context, request PatchPatternRequestObject) (PatchPatternResponseObject, error)
|
|
// List approval rules
|
|
// (GET /policy/approval-rules)
|
|
ListApprovalRules(ctx context.Context, request ListApprovalRulesRequestObject) (ListApprovalRulesResponseObject, error)
|
|
// Propose a new approval rule (dual-control)
|
|
// (POST /policy/approval-rules)
|
|
CreateApprovalRule(ctx context.Context, request CreateApprovalRuleRequestObject) (CreateApprovalRuleResponseObject, error)
|
|
// Propose a rule change (dual-control)
|
|
// (PATCH /policy/approval-rules/{id})
|
|
PatchApprovalRule(ctx context.Context, request PatchApprovalRuleRequestObject) (PatchApprovalRuleResponseObject, error)
|
|
// Autonomy settings (kill-switch, never-auto-act list)
|
|
// (GET /policy/autonomy)
|
|
GetAutonomySettings(ctx context.Context, request GetAutonomySettingsRequestObject) (GetAutonomySettingsResponseObject, error)
|
|
// Propose autonomy changes (dual-control; kill-switch OFF is immediate)
|
|
// (PATCH /policy/autonomy)
|
|
PatchAutonomySettings(ctx context.Context, request PatchAutonomySettingsRequestObject) (PatchAutonomySettingsResponseObject, error)
|
|
// List risk classes
|
|
// (GET /policy/risk-classes)
|
|
ListRiskClasses(ctx context.Context, request ListRiskClassesRequestObject) (ListRiskClassesResponseObject, error)
|
|
// End a relationship (sets valid_to; the edge is kept for history)
|
|
// (DELETE /relationships)
|
|
EndRelationship(ctx context.Context, request EndRelationshipRequestObject) (EndRelationshipResponseObject, error)
|
|
// Create a relationship edge
|
|
// (POST /relationships)
|
|
CreateRelationship(ctx context.Context, request CreateRelationshipRequestObject) (CreateRelationshipResponseObject, error)
|
|
// List signals
|
|
// (GET /signals)
|
|
ListSignals(ctx context.Context, request ListSignalsRequestObject) (ListSignalsResponseObject, error)
|
|
// Acknowledge a signal
|
|
// (POST /signals/{id}/ack)
|
|
AckSignal(ctx context.Context, request AckSignalRequestObject) (AckSignalResponseObject, error)
|
|
// Mute a signal for a TTL
|
|
// (POST /signals/{id}/mute)
|
|
MuteSignal(ctx context.Context, request MuteSignalRequestObject) (MuteSignalResponseObject, error)
|
|
// Resolve a signal manually
|
|
// (POST /signals/{id}/resolve)
|
|
ResolveSignal(ctx context.Context, request ResolveSignalRequestObject) (ResolveSignalResponseObject, error)
|
|
// List skills (latest version per skill)
|
|
// (GET /skills)
|
|
ListSkills(ctx context.Context, request ListSkillsRequestObject) (ListSkillsResponseObject, error)
|
|
// Transition a skill or pin a version
|
|
// (PATCH /skills/{id})
|
|
PatchSkill(ctx context.Context, request PatchSkillRequestObject) (PatchSkillResponseObject, error)
|
|
// Version history of a skill
|
|
// (GET /skills/{id}/versions)
|
|
ListSkillVersions(ctx context.Context, request ListSkillVersionsRequestObject) (ListSkillVersionsResponseObject, error)
|
|
// Trend analysis for all metrics on an entity
|
|
// (GET /trends/{entity_id})
|
|
GetTrends(ctx context.Context, request GetTrendsRequestObject) (GetTrendsResponseObject, error)
|
|
}
|
|
|
|
type StrictHandlerFunc = strictnethttp.StrictHTTPHandlerFunc
|
|
type StrictMiddlewareFunc = strictnethttp.StrictHTTPMiddlewareFunc
|
|
|
|
type StrictHTTPServerOptions struct {
|
|
RequestErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
|
|
ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
|
|
}
|
|
|
|
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface {
|
|
return &strictHandler{ssi: ssi, middlewares: middlewares, options: StrictHTTPServerOptions{
|
|
RequestErrorHandlerFunc: func(w http.ResponseWriter, r *http.Request, err error) {
|
|
http.Error(w, err.Error(), http.StatusBadRequest)
|
|
},
|
|
ResponseErrorHandlerFunc: func(w http.ResponseWriter, r *http.Request, err error) {
|
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
|
},
|
|
}}
|
|
}
|
|
|
|
func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface {
|
|
return &strictHandler{ssi: ssi, middlewares: middlewares, options: options}
|
|
}
|
|
|
|
type strictHandler struct {
|
|
ssi StrictServerInterface
|
|
middlewares []StrictMiddlewareFunc
|
|
options StrictHTTPServerOptions
|
|
}
|
|
|
|
// QueryAgentActivity operation middleware
|
|
func (sh *strictHandler) QueryAgentActivity(w http.ResponseWriter, r *http.Request, params QueryAgentActivityParams) {
|
|
var request QueryAgentActivityRequestObject
|
|
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.QueryAgentActivity(ctx, request.(QueryAgentActivityRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "QueryAgentActivity")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(QueryAgentActivityResponseObject); ok {
|
|
if err := validResponse.VisitQueryAgentActivityResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// ListApprovals operation middleware
|
|
func (sh *strictHandler) ListApprovals(w http.ResponseWriter, r *http.Request, params ListApprovalsParams) {
|
|
var request ListApprovalsRequestObject
|
|
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ListApprovals(ctx, request.(ListApprovalsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ListApprovals")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ListApprovalsResponseObject); ok {
|
|
if err := validResponse.VisitListApprovalsResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// DecideApproval operation middleware
|
|
func (sh *strictHandler) DecideApproval(w http.ResponseWriter, r *http.Request, id EntityId, params DecideApprovalParams) {
|
|
var request DecideApprovalRequestObject
|
|
|
|
request.Id = id
|
|
request.Params = params
|
|
|
|
var body DecideApprovalJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.DecideApproval(ctx, request.(DecideApprovalRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "DecideApproval")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(DecideApprovalResponseObject); ok {
|
|
if err := validResponse.VisitDecideApprovalResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// QueryAudit operation middleware
|
|
func (sh *strictHandler) QueryAudit(w http.ResponseWriter, r *http.Request, params QueryAuditParams) {
|
|
var request QueryAuditRequestObject
|
|
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.QueryAudit(ctx, request.(QueryAuditRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "QueryAudit")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(QueryAuditResponseObject); ok {
|
|
if err := validResponse.VisitQueryAuditResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// ListChecks operation middleware
|
|
func (sh *strictHandler) ListChecks(w http.ResponseWriter, r *http.Request, params ListChecksParams) {
|
|
var request ListChecksRequestObject
|
|
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ListChecks(ctx, request.(ListChecksRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ListChecks")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ListChecksResponseObject); ok {
|
|
if err := validResponse.VisitListChecksResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// CreateCheck operation middleware
|
|
func (sh *strictHandler) CreateCheck(w http.ResponseWriter, r *http.Request, params CreateCheckParams) {
|
|
var request CreateCheckRequestObject
|
|
|
|
request.Params = params
|
|
|
|
var body CreateCheckJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.CreateCheck(ctx, request.(CreateCheckRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "CreateCheck")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(CreateCheckResponseObject); ok {
|
|
if err := validResponse.VisitCreateCheckResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// PatchCheck operation middleware
|
|
func (sh *strictHandler) PatchCheck(w http.ResponseWriter, r *http.Request, id EntityId, params PatchCheckParams) {
|
|
var request PatchCheckRequestObject
|
|
|
|
request.Id = id
|
|
request.Params = params
|
|
|
|
var body PatchCheckJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.PatchCheck(ctx, request.(PatchCheckRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "PatchCheck")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(PatchCheckResponseObject); ok {
|
|
if err := validResponse.VisitPatchCheckResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// ListClassifications operation middleware
|
|
func (sh *strictHandler) ListClassifications(w http.ResponseWriter, r *http.Request, params ListClassificationsParams) {
|
|
var request ListClassificationsRequestObject
|
|
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ListClassifications(ctx, request.(ListClassificationsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ListClassifications")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ListClassificationsResponseObject); ok {
|
|
if err := validResponse.VisitListClassificationsResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// EnrollClient operation middleware
|
|
func (sh *strictHandler) EnrollClient(w http.ResponseWriter, r *http.Request) {
|
|
var request EnrollClientRequestObject
|
|
|
|
var body EnrollClientJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.EnrollClient(ctx, request.(EnrollClientRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "EnrollClient")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(EnrollClientResponseObject); ok {
|
|
if err := validResponse.VisitEnrollClientResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// GetClientContext operation middleware
|
|
func (sh *strictHandler) GetClientContext(w http.ResponseWriter, r *http.Request, slug EntitySlug, params GetClientContextParams) {
|
|
var request GetClientContextRequestObject
|
|
|
|
request.Slug = slug
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetClientContext(ctx, request.(GetClientContextRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetClientContext")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetClientContextResponseObject); ok {
|
|
if err := validResponse.VisitGetClientContextResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// GetClientSecrets operation middleware
|
|
func (sh *strictHandler) GetClientSecrets(w http.ResponseWriter, r *http.Request, slug EntitySlug) {
|
|
var request GetClientSecretsRequestObject
|
|
|
|
request.Slug = slug
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetClientSecrets(ctx, request.(GetClientSecretsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetClientSecrets")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetClientSecretsResponseObject); ok {
|
|
if err := validResponse.VisitGetClientSecretsResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// GetDashboardSummary operation middleware
|
|
func (sh *strictHandler) GetDashboardSummary(w http.ResponseWriter, r *http.Request) {
|
|
var request GetDashboardSummaryRequestObject
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetDashboardSummary(ctx, request.(GetDashboardSummaryRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetDashboardSummary")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetDashboardSummaryResponseObject); ok {
|
|
if err := validResponse.VisitGetDashboardSummaryResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// ListEntities operation middleware
|
|
func (sh *strictHandler) ListEntities(w http.ResponseWriter, r *http.Request, params ListEntitiesParams) {
|
|
var request ListEntitiesRequestObject
|
|
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ListEntities(ctx, request.(ListEntitiesRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ListEntities")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ListEntitiesResponseObject); ok {
|
|
if err := validResponse.VisitListEntitiesResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// CreateEntity operation middleware
|
|
func (sh *strictHandler) CreateEntity(w http.ResponseWriter, r *http.Request, params CreateEntityParams) {
|
|
var request CreateEntityRequestObject
|
|
|
|
request.Params = params
|
|
|
|
var body CreateEntityJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.CreateEntity(ctx, request.(CreateEntityRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "CreateEntity")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(CreateEntityResponseObject); ok {
|
|
if err := validResponse.VisitCreateEntityResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// ProvisionEntity operation middleware
|
|
func (sh *strictHandler) ProvisionEntity(w http.ResponseWriter, r *http.Request, params ProvisionEntityParams) {
|
|
var request ProvisionEntityRequestObject
|
|
|
|
request.Params = params
|
|
|
|
var body ProvisionEntityJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ProvisionEntity(ctx, request.(ProvisionEntityRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ProvisionEntity")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ProvisionEntityResponseObject); ok {
|
|
if err := validResponse.VisitProvisionEntityResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// GetEntity operation middleware
|
|
func (sh *strictHandler) GetEntity(w http.ResponseWriter, r *http.Request, id EntityId) {
|
|
var request GetEntityRequestObject
|
|
|
|
request.Id = id
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetEntity(ctx, request.(GetEntityRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetEntity")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetEntityResponseObject); ok {
|
|
if err := validResponse.VisitGetEntityResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// PatchEntity operation middleware
|
|
func (sh *strictHandler) PatchEntity(w http.ResponseWriter, r *http.Request, id EntityId, params PatchEntityParams) {
|
|
var request PatchEntityRequestObject
|
|
|
|
request.Id = id
|
|
request.Params = params
|
|
|
|
var body PatchEntityJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.PatchEntity(ctx, request.(PatchEntityRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "PatchEntity")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(PatchEntityResponseObject); ok {
|
|
if err := validResponse.VisitPatchEntityResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// GetBlastRadius operation middleware
|
|
func (sh *strictHandler) GetBlastRadius(w http.ResponseWriter, r *http.Request, id EntityId, params GetBlastRadiusParams) {
|
|
var request GetBlastRadiusRequestObject
|
|
|
|
request.Id = id
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetBlastRadius(ctx, request.(GetBlastRadiusRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetBlastRadius")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetBlastRadiusResponseObject); ok {
|
|
if err := validResponse.VisitGetBlastRadiusResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// GetEntityRelations operation middleware
|
|
func (sh *strictHandler) GetEntityRelations(w http.ResponseWriter, r *http.Request, id EntityId, params GetEntityRelationsParams) {
|
|
var request GetEntityRelationsRequestObject
|
|
|
|
request.Id = id
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetEntityRelations(ctx, request.(GetEntityRelationsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetEntityRelations")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetEntityRelationsResponseObject); ok {
|
|
if err := validResponse.VisitGetEntityRelationsResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// GetProvisionStatus operation middleware
|
|
func (sh *strictHandler) GetProvisionStatus(w http.ResponseWriter, r *http.Request, slug EntitySlug) {
|
|
var request GetProvisionStatusRequestObject
|
|
|
|
request.Slug = slug
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetProvisionStatus(ctx, request.(GetProvisionStatusRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetProvisionStatus")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetProvisionStatusResponseObject); ok {
|
|
if err := validResponse.VisitGetProvisionStatusResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// QueryEvents operation middleware
|
|
func (sh *strictHandler) QueryEvents(w http.ResponseWriter, r *http.Request, params QueryEventsParams) {
|
|
var request QueryEventsRequestObject
|
|
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.QueryEvents(ctx, request.(QueryEventsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "QueryEvents")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(QueryEventsResponseObject); ok {
|
|
if err := validResponse.VisitQueryEventsResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// StreamEvents operation middleware
|
|
func (sh *strictHandler) StreamEvents(w http.ResponseWriter, r *http.Request, params StreamEventsParams) {
|
|
var request StreamEventsRequestObject
|
|
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.StreamEvents(ctx, request.(StreamEventsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "StreamEvents")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(StreamEventsResponseObject); ok {
|
|
if err := validResponse.VisitStreamEventsResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// ListExecutions operation middleware
|
|
func (sh *strictHandler) ListExecutions(w http.ResponseWriter, r *http.Request, params ListExecutionsParams) {
|
|
var request ListExecutionsRequestObject
|
|
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ListExecutions(ctx, request.(ListExecutionsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ListExecutions")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ListExecutionsResponseObject); ok {
|
|
if err := validResponse.VisitListExecutionsResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// RequestExecution operation middleware
|
|
func (sh *strictHandler) RequestExecution(w http.ResponseWriter, r *http.Request, params RequestExecutionParams) {
|
|
var request RequestExecutionRequestObject
|
|
|
|
request.Params = params
|
|
|
|
var body RequestExecutionJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.RequestExecution(ctx, request.(RequestExecutionRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "RequestExecution")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(RequestExecutionResponseObject); ok {
|
|
if err := validResponse.VisitRequestExecutionResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// GetExecution operation middleware
|
|
func (sh *strictHandler) GetExecution(w http.ResponseWriter, r *http.Request, id EntityId) {
|
|
var request GetExecutionRequestObject
|
|
|
|
request.Id = id
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetExecution(ctx, request.(GetExecutionRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetExecution")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetExecutionResponseObject); ok {
|
|
if err := validResponse.VisitGetExecutionResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// CancelExecution operation middleware
|
|
func (sh *strictHandler) CancelExecution(w http.ResponseWriter, r *http.Request, id EntityId) {
|
|
var request CancelExecutionRequestObject
|
|
|
|
request.Id = id
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.CancelExecution(ctx, request.(CancelExecutionRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "CancelExecution")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(CancelExecutionResponseObject); ok {
|
|
if err := validResponse.VisitCancelExecutionResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// ExportSeeds operation middleware
|
|
func (sh *strictHandler) ExportSeeds(w http.ResponseWriter, r *http.Request) {
|
|
var request ExportSeedsRequestObject
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ExportSeeds(ctx, request.(ExportSeedsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ExportSeeds")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ExportSeedsResponseObject); ok {
|
|
if err := validResponse.VisitExportSeedsResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// GetGraph operation middleware
|
|
func (sh *strictHandler) GetGraph(w http.ResponseWriter, r *http.Request, params GetGraphParams) {
|
|
var request GetGraphRequestObject
|
|
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetGraph(ctx, request.(GetGraphRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetGraph")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetGraphResponseObject); ok {
|
|
if err := validResponse.VisitGetGraphResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// GetFleetHealth operation middleware
|
|
func (sh *strictHandler) GetFleetHealth(w http.ResponseWriter, r *http.Request) {
|
|
var request GetFleetHealthRequestObject
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetFleetHealth(ctx, request.(GetFleetHealthRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetFleetHealth")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetFleetHealthResponseObject); ok {
|
|
if err := validResponse.VisitGetFleetHealthResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// SearchKnowledge operation middleware
|
|
func (sh *strictHandler) SearchKnowledge(w http.ResponseWriter, r *http.Request, params SearchKnowledgeParams) {
|
|
var request SearchKnowledgeRequestObject
|
|
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.SearchKnowledge(ctx, request.(SearchKnowledgeRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "SearchKnowledge")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(SearchKnowledgeResponseObject); ok {
|
|
if err := validResponse.VisitSearchKnowledgeResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// GetEntityKnowledge operation middleware
|
|
func (sh *strictHandler) GetEntityKnowledge(w http.ResponseWriter, r *http.Request, entityId string) {
|
|
var request GetEntityKnowledgeRequestObject
|
|
|
|
request.EntityId = entityId
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetEntityKnowledge(ctx, request.(GetEntityKnowledgeRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetEntityKnowledge")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetEntityKnowledgeResponseObject); ok {
|
|
if err := validResponse.VisitGetEntityKnowledgeResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// QueryMetrics operation middleware
|
|
func (sh *strictHandler) QueryMetrics(w http.ResponseWriter, r *http.Request, params QueryMetricsParams) {
|
|
var request QueryMetricsRequestObject
|
|
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.QueryMetrics(ctx, request.(QueryMetricsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "QueryMetrics")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(QueryMetricsResponseObject); ok {
|
|
if err := validResponse.VisitQueryMetricsResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// GetOntology operation middleware
|
|
func (sh *strictHandler) GetOntology(w http.ResponseWriter, r *http.Request) {
|
|
var request GetOntologyRequestObject
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetOntology(ctx, request.(GetOntologyRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetOntology")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetOntologyResponseObject); ok {
|
|
if err := validResponse.VisitGetOntologyResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// CreateEntityType operation middleware
|
|
func (sh *strictHandler) CreateEntityType(w http.ResponseWriter, r *http.Request, params CreateEntityTypeParams) {
|
|
var request CreateEntityTypeRequestObject
|
|
|
|
request.Params = params
|
|
|
|
var body CreateEntityTypeJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.CreateEntityType(ctx, request.(CreateEntityTypeRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "CreateEntityType")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(CreateEntityTypeResponseObject); ok {
|
|
if err := validResponse.VisitCreateEntityTypeResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// PatchEntityType operation middleware
|
|
func (sh *strictHandler) PatchEntityType(w http.ResponseWriter, r *http.Request, name string, params PatchEntityTypeParams) {
|
|
var request PatchEntityTypeRequestObject
|
|
|
|
request.Name = name
|
|
request.Params = params
|
|
|
|
var body PatchEntityTypeJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.PatchEntityType(ctx, request.(PatchEntityTypeRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "PatchEntityType")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(PatchEntityTypeResponseObject); ok {
|
|
if err := validResponse.VisitPatchEntityTypeResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// ListPatterns operation middleware
|
|
func (sh *strictHandler) ListPatterns(w http.ResponseWriter, r *http.Request, params ListPatternsParams) {
|
|
var request ListPatternsRequestObject
|
|
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ListPatterns(ctx, request.(ListPatternsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ListPatterns")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ListPatternsResponseObject); ok {
|
|
if err := validResponse.VisitListPatternsResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// PatchPattern operation middleware
|
|
func (sh *strictHandler) PatchPattern(w http.ResponseWriter, r *http.Request, id EntityId, params PatchPatternParams) {
|
|
var request PatchPatternRequestObject
|
|
|
|
request.Id = id
|
|
request.Params = params
|
|
|
|
var body PatchPatternJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.PatchPattern(ctx, request.(PatchPatternRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "PatchPattern")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(PatchPatternResponseObject); ok {
|
|
if err := validResponse.VisitPatchPatternResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// ListApprovalRules operation middleware
|
|
func (sh *strictHandler) ListApprovalRules(w http.ResponseWriter, r *http.Request) {
|
|
var request ListApprovalRulesRequestObject
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ListApprovalRules(ctx, request.(ListApprovalRulesRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ListApprovalRules")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ListApprovalRulesResponseObject); ok {
|
|
if err := validResponse.VisitListApprovalRulesResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// CreateApprovalRule operation middleware
|
|
func (sh *strictHandler) CreateApprovalRule(w http.ResponseWriter, r *http.Request, params CreateApprovalRuleParams) {
|
|
var request CreateApprovalRuleRequestObject
|
|
|
|
request.Params = params
|
|
|
|
var body CreateApprovalRuleJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.CreateApprovalRule(ctx, request.(CreateApprovalRuleRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "CreateApprovalRule")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(CreateApprovalRuleResponseObject); ok {
|
|
if err := validResponse.VisitCreateApprovalRuleResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// PatchApprovalRule operation middleware
|
|
func (sh *strictHandler) PatchApprovalRule(w http.ResponseWriter, r *http.Request, id EntityId, params PatchApprovalRuleParams) {
|
|
var request PatchApprovalRuleRequestObject
|
|
|
|
request.Id = id
|
|
request.Params = params
|
|
|
|
var body PatchApprovalRuleJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.PatchApprovalRule(ctx, request.(PatchApprovalRuleRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "PatchApprovalRule")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(PatchApprovalRuleResponseObject); ok {
|
|
if err := validResponse.VisitPatchApprovalRuleResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// GetAutonomySettings operation middleware
|
|
func (sh *strictHandler) GetAutonomySettings(w http.ResponseWriter, r *http.Request) {
|
|
var request GetAutonomySettingsRequestObject
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetAutonomySettings(ctx, request.(GetAutonomySettingsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetAutonomySettings")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetAutonomySettingsResponseObject); ok {
|
|
if err := validResponse.VisitGetAutonomySettingsResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// PatchAutonomySettings operation middleware
|
|
func (sh *strictHandler) PatchAutonomySettings(w http.ResponseWriter, r *http.Request) {
|
|
var request PatchAutonomySettingsRequestObject
|
|
|
|
var body PatchAutonomySettingsJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.PatchAutonomySettings(ctx, request.(PatchAutonomySettingsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "PatchAutonomySettings")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(PatchAutonomySettingsResponseObject); ok {
|
|
if err := validResponse.VisitPatchAutonomySettingsResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// ListRiskClasses operation middleware
|
|
func (sh *strictHandler) ListRiskClasses(w http.ResponseWriter, r *http.Request) {
|
|
var request ListRiskClassesRequestObject
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ListRiskClasses(ctx, request.(ListRiskClassesRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ListRiskClasses")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ListRiskClassesResponseObject); ok {
|
|
if err := validResponse.VisitListRiskClassesResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// EndRelationship operation middleware
|
|
func (sh *strictHandler) EndRelationship(w http.ResponseWriter, r *http.Request, params EndRelationshipParams) {
|
|
var request EndRelationshipRequestObject
|
|
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.EndRelationship(ctx, request.(EndRelationshipRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "EndRelationship")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(EndRelationshipResponseObject); ok {
|
|
if err := validResponse.VisitEndRelationshipResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// CreateRelationship operation middleware
|
|
func (sh *strictHandler) CreateRelationship(w http.ResponseWriter, r *http.Request, params CreateRelationshipParams) {
|
|
var request CreateRelationshipRequestObject
|
|
|
|
request.Params = params
|
|
|
|
var body CreateRelationshipJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.CreateRelationship(ctx, request.(CreateRelationshipRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "CreateRelationship")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(CreateRelationshipResponseObject); ok {
|
|
if err := validResponse.VisitCreateRelationshipResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// ListSignals operation middleware
|
|
func (sh *strictHandler) ListSignals(w http.ResponseWriter, r *http.Request, params ListSignalsParams) {
|
|
var request ListSignalsRequestObject
|
|
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ListSignals(ctx, request.(ListSignalsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ListSignals")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ListSignalsResponseObject); ok {
|
|
if err := validResponse.VisitListSignalsResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// AckSignal operation middleware
|
|
func (sh *strictHandler) AckSignal(w http.ResponseWriter, r *http.Request, id EntityId) {
|
|
var request AckSignalRequestObject
|
|
|
|
request.Id = id
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.AckSignal(ctx, request.(AckSignalRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "AckSignal")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(AckSignalResponseObject); ok {
|
|
if err := validResponse.VisitAckSignalResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// MuteSignal operation middleware
|
|
func (sh *strictHandler) MuteSignal(w http.ResponseWriter, r *http.Request, id EntityId) {
|
|
var request MuteSignalRequestObject
|
|
|
|
request.Id = id
|
|
|
|
var body MuteSignalJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.MuteSignal(ctx, request.(MuteSignalRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "MuteSignal")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(MuteSignalResponseObject); ok {
|
|
if err := validResponse.VisitMuteSignalResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// ResolveSignal operation middleware
|
|
func (sh *strictHandler) ResolveSignal(w http.ResponseWriter, r *http.Request, id EntityId) {
|
|
var request ResolveSignalRequestObject
|
|
|
|
request.Id = id
|
|
|
|
var body ResolveSignalJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ResolveSignal(ctx, request.(ResolveSignalRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ResolveSignal")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ResolveSignalResponseObject); ok {
|
|
if err := validResponse.VisitResolveSignalResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// ListSkills operation middleware
|
|
func (sh *strictHandler) ListSkills(w http.ResponseWriter, r *http.Request, params ListSkillsParams) {
|
|
var request ListSkillsRequestObject
|
|
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ListSkills(ctx, request.(ListSkillsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ListSkills")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ListSkillsResponseObject); ok {
|
|
if err := validResponse.VisitListSkillsResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// PatchSkill operation middleware
|
|
func (sh *strictHandler) PatchSkill(w http.ResponseWriter, r *http.Request, id EntityId, params PatchSkillParams) {
|
|
var request PatchSkillRequestObject
|
|
|
|
request.Id = id
|
|
request.Params = params
|
|
|
|
var body PatchSkillJSONRequestBody
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
|
|
sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
|
|
return
|
|
}
|
|
request.Body = &body
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.PatchSkill(ctx, request.(PatchSkillRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "PatchSkill")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(PatchSkillResponseObject); ok {
|
|
if err := validResponse.VisitPatchSkillResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// ListSkillVersions operation middleware
|
|
func (sh *strictHandler) ListSkillVersions(w http.ResponseWriter, r *http.Request, id EntityId) {
|
|
var request ListSkillVersionsRequestObject
|
|
|
|
request.Id = id
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ListSkillVersions(ctx, request.(ListSkillVersionsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ListSkillVersions")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ListSkillVersionsResponseObject); ok {
|
|
if err := validResponse.VisitListSkillVersionsResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// GetTrends operation middleware
|
|
func (sh *strictHandler) GetTrends(w http.ResponseWriter, r *http.Request, entityId string, params GetTrendsParams) {
|
|
var request GetTrendsRequestObject
|
|
|
|
request.EntityId = entityId
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetTrends(ctx, request.(GetTrendsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetTrends")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetTrendsResponseObject); ok {
|
|
if err := validResponse.VisitGetTrendsResponse(w); err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
}
|
|
} else if response != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
|
|
}
|
|
}
|
|
|
|
// Base64 encoded, gzipped, json marshaled Swagger object
|
|
var swaggerSpec = []string{
|
|
|
|
"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",
|
|
}
|
|
|
|
// GetSwagger returns the content of the embedded swagger specification file
|
|
// or error if failed to decode
|
|
func decodeSpec() ([]byte, error) {
|
|
zipped, err := base64.StdEncoding.DecodeString(strings.Join(swaggerSpec, ""))
|
|
if err != nil {
|
|
return nil, fmt.Errorf("error base64 decoding spec: %w", err)
|
|
}
|
|
zr, err := gzip.NewReader(bytes.NewReader(zipped))
|
|
if err != nil {
|
|
return nil, fmt.Errorf("error decompressing spec: %w", err)
|
|
}
|
|
var buf bytes.Buffer
|
|
_, err = buf.ReadFrom(zr)
|
|
if err != nil {
|
|
return nil, fmt.Errorf("error decompressing spec: %w", err)
|
|
}
|
|
|
|
return buf.Bytes(), nil
|
|
}
|
|
|
|
var rawSpec = decodeSpecCached()
|
|
|
|
// a naive cached of a decoded swagger spec
|
|
func decodeSpecCached() func() ([]byte, error) {
|
|
data, err := decodeSpec()
|
|
return func() ([]byte, error) {
|
|
return data, err
|
|
}
|
|
}
|
|
|
|
// Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
|
|
func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) {
|
|
res := make(map[string]func() ([]byte, error))
|
|
if len(pathToFile) > 0 {
|
|
res[pathToFile] = rawSpec
|
|
}
|
|
|
|
return res
|
|
}
|
|
|
|
// GetSwagger returns the Swagger specification corresponding to the generated code
|
|
// in this file. The external references of Swagger specification are resolved.
|
|
// The logic of resolving external references is tightly connected to "import-mapping" feature.
|
|
// Externally referenced files must be embedded in the corresponding golang packages.
|
|
// Urls can be supported but this task was out of the scope.
|
|
func GetSwagger() (swagger *openapi3.T, err error) {
|
|
resolvePath := PathToRawSpec("")
|
|
|
|
loader := openapi3.NewLoader()
|
|
loader.IsExternalRefsAllowed = true
|
|
loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) {
|
|
pathToFile := url.String()
|
|
pathToFile = path.Clean(pathToFile)
|
|
getSpec, ok := resolvePath[pathToFile]
|
|
if !ok {
|
|
err1 := fmt.Errorf("path not found: %s", pathToFile)
|
|
return nil, err1
|
|
}
|
|
return getSpec()
|
|
}
|
|
var specData []byte
|
|
specData, err = rawSpec()
|
|
if err != nil {
|
|
return
|
|
}
|
|
swagger, err = loader.LoadFromData(specData)
|
|
if err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|