Documentation
¶
Index ¶
- Constants
- Variables
- type API
- type APIAssociation
- type APIDeletionEvent
- type APIGatewayWithDetails
- type APIKey
- type APIKeyCreatedEvent
- type APIKeyRevokedEvent
- type APIKeySecurity
- type APIKeyUpdatedEvent
- type APIMetadata
- type APIUndeploymentEvent
- type Application
- type ApplicationAPIKey
- type ApplicationAssociationTarget
- type ApplicationKeyMapping
- type ApplicationUpdatedEvent
- type Artifact
- type AssociatedGatewayMapping
- type Channel
- type ChannelRequest
- type CostRateLimit
- type CustomPolicy
- type Deployment
- type DeploymentAckPayload
- type DeploymentContent
- type DeploymentEvent
- type DeploymentInfo
- type DeploymentMetadata
- type DeploymentStatus
- type ExpiresInDuration
- type ExtractionIdentifier
- type Gateway
- type GatewayConfigEvent
- type GatewayEvent
- type GatewayToken
- type GlobalPolicy
- type InternalAPIKeyItem
- type LLMAccessControl
- type LLMModel
- type LLMModelProvider
- type LLMPolicy
- type LLMPolicyPath
- type LLMProvider
- type LLMProviderConfig
- type LLMProviderDeletionEvent
- type LLMProviderDeploymentEvent
- type LLMProviderTemplate
- type LLMProviderTemplateAuth
- type LLMProviderTemplateExtractionFields
- type LLMProviderTemplateMetadata
- type LLMProviderTemplateResourceMapping
- type LLMProviderTemplateResourceMappings
- type LLMProviderUndeploymentEvent
- type LLMProxy
- type LLMProxyConfig
- type LLMProxyDeletionEvent
- type LLMProxyDeploymentEvent
- type LLMProxyUndeploymentEvent
- type LLMRateLimitingConfig
- type MCPProxy
- type MCPProxyCapabilities
- type MCPProxyConfiguration
- type MCPProxyDeletionEvent
- type MCPProxyDeploymentEvent
- type MCPProxyDeploymentSpec
- type MCPProxyDeploymentYAML
- type MCPProxyUndeploymentEvent
- type MCPProxyUpstream
- type Operation
- type OperationPolicy
- type OperationPolicyPath
- type OperationRequest
- type Organization
- type Policy
- type Project
- type RateLimitResetWindow
- type RateLimitingLimitConfig
- type RateLimitingResourceLimit
- type RateLimitingScopeConfig
- type RequestRateLimit
- type ResourceWiseRateLimitingConfig
- type RestAPIConfig
- type RouteException
- type Secret
- type SecretReference
- type SecretScope
- type SecurityConfig
- type Subscription
- type SubscriptionCreatedEvent
- type SubscriptionDeletedEvent
- type SubscriptionPlan
- type SubscriptionPlanCreatedEvent
- type SubscriptionPlanDeletedEvent
- type SubscriptionPlanStatus
- type SubscriptionPlanUpdate
- type SubscriptionPlanUpdatedEvent
- type SubscriptionStatus
- type SubscriptionUpdatedEvent
- type TimeUnit
- type TokenRateLimit
- type UpstreamAuth
- type UpstreamConfig
- type UpstreamEndpoint
- type UserAPIKey
- type UserIdentityMapping
- type UserOrganizationMapping
- type WebBrokerAPI
- type WebBrokerAPIConfiguration
- type WebBrokerAPIDeletionEvent
- type WebBrokerAPIDeploymentEvent
- type WebBrokerAPIDeploymentSpec
- type WebBrokerAPIDeploymentVhosts
- type WebBrokerAPIDeploymentYAML
- type WebBrokerAPIUndeploymentEvent
- type WebBrokerAllChannelPolicies
- type WebBrokerBroker
- type WebBrokerChannel
- type WebBrokerChannelPolicies
- type WebBrokerDeployAllChannelPolicies
- type WebBrokerDeployBroker
- type WebBrokerDeployChannel
- type WebBrokerDeployEventPolicies
- type WebBrokerDeployReceiver
- type WebBrokerDeployTopic
- type WebBrokerEventPolicies
- type WebBrokerReceiver
- type WebBrokerTopic
- type WebSubAPI
- type WebSubAPIConfiguration
- type WebSubAPIDeletionEvent
- type WebSubAPIDeploymentEvent
- type WebSubAPIDeploymentSpec
- type WebSubAPIDeploymentVhosts
- type WebSubAPIDeploymentYAML
- type WebSubAPIHmacSecret
- type WebSubAPIHmacSecretEvent
- type WebSubAPIUndeploymentEvent
- type WebSubAllChannelPolicies
- type WebSubChannel
- type WebSubChannelPolicies
- type WebSubDelivery
- type WebSubDeployAllChannelPolicies
- type WebSubDeployChannel
- type WebSubDeployDelivery
- type WebSubDeployEventPolicies
- type WebSubDeployHub
- type WebSubDeployHubChannel
- type WebSubDeployReceiver
- type WebSubEventPolicies
- type WebSubHub
- type WebSubHubChannel
- type WebSubReceiver
Constants ¶
const ( DeploymentErrorTimeout = "DEPLOYMENT_TIMEOUT" DeploymentErrorGatewayFailure = "GATEWAY_PROCESSING_ERROR" )
const ( SecretTypeCertificate = "CERTIFICATE" SecretTypeGeneric = "GENERIC" SecretProviderInHouse = "IN_BUILT" SecretProviderAWSKMS = "AWS_KMS" SecretProviderHashiCorpVault = "HASHICORP_VAULT" SecretStatusActive = "ACTIVE" SecretStatusDeprecated = "DEPRECATED" // SecretScopeType* identify the kind of entity a secret is scoped to. SecretScopeTypeOrg = "org" SecretScopeTypeProject = "project" SecretScopeTypeArtifact = "artifact" )
Variables ¶
var DeploymentErrorMessages = map[string]string{ DeploymentErrorTimeout: "Deployment timed out waiting for gateway acknowledgement", DeploymentErrorGatewayFailure: "Gateway failed to process the deployment", }
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
ID string `json:"id" db:"uuid"`
Handle string `json:"handle" db:"handle"`
Name string `json:"displayName" db:"display_name"`
Kind string `json:"kind" db:"kind"`
Description string `json:"description,omitempty" db:"description"`
Version string `json:"version" db:"version"`
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
UpdatedBy string `json:"updatedBy,omitempty" db:"updated_by"`
ProjectID string `json:"projectId" db:"project_uuid"` // FK to Project.ID
OrganizationID string `json:"organizationId" db:"organization_uuid"` // FK to Organization.ID
CreatedAt time.Time `json:"createdAt,omitempty" db:"created_at"`
UpdatedAt time.Time `json:"updatedAt,omitempty" db:"updated_at"`
LifeCycleStatus string `json:"lifeCycleStatus,omitempty" db:"lifecycle_status"`
Channels []Channel `json:"channels,omitempty"`
Configuration RestAPIConfig `json:"configuration" db:"-"`
Origin string `json:"origin,omitempty" db:"origin"`
}
API represents an API entity in the platform
type APIAssociation ¶
type APIAssociation struct {
ArtifactID string `json:"artifactId" db:"artifact_uuid"`
OrganizationID string `json:"organizationId" db:"organization_uuid"`
GatewayID string `json:"gatewayId" db:"gateway_uuid"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
}
APIAssociation represents the association between an API and a resource (gateway or dev portal)
func (APIAssociation) TableName ¶
func (APIAssociation) TableName() string
TableName returns the table name for the APIAssociation model
type APIDeletionEvent ¶
type APIDeletionEvent struct {
// ApiId identifies the deleted API
ApiId string `json:"apiId"`
}
APIDeletionEvent contains payload data for "api.deleted" event type. This event is sent when an API is permanently deleted from the platform.
type APIGatewayWithDetails ¶
type APIGatewayWithDetails struct {
// Gateway information
ID string `json:"id" db:"id"`
OrganizationID string `json:"organizationId" db:"organization_id"`
Name string `json:"name" db:"name"`
Handle string `json:"handle" db:"handle"`
Description string `json:"description" db:"description"`
Properties map[string]interface{} `json:"properties,omitempty" db:"properties"`
Endpoints []string `json:"endpoints" db:"-"`
IsCritical bool `json:"isCritical" db:"is_critical"`
FunctionalityType string `json:"functionalityType" db:"functionality_type"`
IsActive bool `json:"isActive" db:"is_active"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
// Association information
AssociatedAt time.Time `json:"associatedAt" db:"associated_at"`
AssociationUpdatedAt time.Time `json:"associationUpdatedAt" db:"association_updated_at"`
IsDeployed bool `json:"isDeployed" db:"is_deployed"`
// Deployment information (nullable if not deployed)
DeploymentID *string `json:"deploymentId,omitempty" db:"deployment_uuid"`
DeployedAt *time.Time `json:"deployedAt,omitempty" db:"deployed_at"`
}
APIGatewayWithDetails represents a gateway with its association and deployment details for an API
type APIKey ¶
type APIKey struct {
UUID string
ArtifactUUID string
Name string // URL-safe handle (identifier) of the API key; maps to the "handle" column
DisplayName string // Human-readable display name; maps to the "display_name" column
MaskedAPIKey string
APIKeyHashes string // JSON string mapping algorithm to hash e.g. {"sha256": "<hashed_api_key>"}
Status string
CreatedAt time.Time
CreatedBy string
UpdatedAt time.Time
ExpiresAt *time.Time
Issuer *string // Identifier of the developer portal that provisioned this key; nil if not provided
AllowedTargets string // Comma-separated list of allowed gateways; defaults to 'ALL'
}
APIKey represents a persisted API key record in the database.
type APIKeyCreatedEvent ¶
type APIKeyCreatedEvent struct {
// UUID is the UUID v7 of the API key record in the platform API database
UUID string `json:"uuid"`
// ApiId identifies the API this key belongs to
ApiId string `json:"apiId"`
// Name is the unique name of the API key
Name string `json:"name,omitempty"`
// ApiKeyHashes is a JSON string representation of hashed API key values keyed by algorithm e.g. {"sha256": "<hash>"}
ApiKeyHashes string `json:"apiKeyHashes"`
// MaskedApiKey is the masked representation of the API key for display purposes
MaskedApiKey string `json:"maskedApiKey"`
// ExternalRefId is an optional reference ID for tracing purposes
ExternalRefId *string `json:"externalRefId,omitempty"`
// ExpiresAt is the optional expiration time in ISO 8601 format
ExpiresAt *string `json:"expiresAt,omitempty"`
// Issuer identifies the developer portal that provisioned this key; nil (omitted) if not provided
Issuer *string `json:"issuer,omitempty"`
// CreatedAt is the timestamp when the key was created on the platform API (RFC3339)
CreatedAt string `json:"createdAt"`
// UpdatedAt is the timestamp when the key was last updated on the platform API (RFC3339)
UpdatedAt string `json:"updatedAt"`
}
APIKeyCreatedEvent represents the payload for "apikey.created" event type. This event is sent when an external API key is registered to hybrid gateways.
type APIKeyRevokedEvent ¶
type APIKeyRevokedEvent struct {
// ApiId identifies the API this key belongs to
ApiId string `json:"apiId"`
// KeyName is the unique name of the API key that was revoked
KeyName string `json:"keyName"`
}
APIKeyRevokedEvent represents the payload for "apikey.revoked" event type. This event is sent when an API key is revoked from hybrid gateways.
type APIKeySecurity ¶
type APIKeyUpdatedEvent ¶
type APIKeyUpdatedEvent struct {
// ApiId identifies the API this key belongs to
ApiId string `json:"apiId"`
// KeyName is the unique name of the API key being updated
KeyName string `json:"keyName"`
// ExternalRefId is an optional reference ID for tracing purposes
ExternalRefId *string `json:"externalRefId,omitempty"`
// ApiKeyHashes is a JSON string representation of hashed API key values keyed by algorithm e.g. {"sha256": "<hash>"}
ApiKeyHashes string `json:"apiKeyHashes"`
// MaskedApiKey is the masked representation of the API key for display purposes
MaskedApiKey string `json:"maskedApiKey"`
// ExpiresAt is the optional new expiration time in ISO 8601 format
ExpiresAt *string `json:"expiresAt,omitempty"`
// Issuer identifies the developer portal that provisioned this key; nil (omitted) if not provided
Issuer *string `json:"issuer,omitempty"`
// UpdatedAt is the timestamp when the key was last updated on the platform API (RFC3339)
UpdatedAt string `json:"updatedAt"`
}
APIKeyUpdatedEvent represents the payload for "apikey.updated" event type. This event is sent when an API key is updated/regenerated on hybrid gateways.
type APIMetadata ¶
type APIMetadata struct {
ID string `json:"id" db:"uuid"`
Handle string `json:"handle" db:"handle"`
Name string `json:"displayName" db:"display_name"`
Version string `json:"version" db:"version"`
Kind string `json:"kind" db:"kind"`
OrganizationID string `json:"organizationId" db:"organization_uuid"`
}
APIMetadata contains minimal API information for handle-to-UUID resolution
type APIUndeploymentEvent ¶
type APIUndeploymentEvent struct {
// ApiId identifies the undeployed API
ApiId string `json:"apiId"`
// DeploymentID identifies the specific deployment being undeployed
DeploymentID string `json:"deploymentId"`
// PerformedAt is the timestamp when the undeployment was initiated (concurrency token)
PerformedAt time.Time `json:"performedAt"`
}
APIUndeploymentEvent contains payload data for "api.undeployed" event type. This event is sent when an API is undeployed from a gateway.
type Application ¶
type Application struct {
UUID string `json:"uuid" db:"uuid"`
Handle string `json:"id" db:"handle"`
ProjectUUID string `json:"projectId" db:"project_uuid"`
OrganizationUUID string `json:"organizationId" db:"organization_uuid"`
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
UpdatedBy string `json:"updatedBy,omitempty" db:"updated_by"`
Name string `json:"displayName" db:"display_name"`
Description string `json:"description,omitempty" db:"description"`
Type string `json:"type" db:"type"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
}
Application represents an application entity.
func (Application) TableName ¶
func (Application) TableName() string
type ApplicationAPIKey ¶
type ApplicationAPIKey struct {
ID string `json:"id"`
APIKeyUUID string `json:"-" db:"uuid"`
Name string `json:"name" db:"name"`
ArtifactID string `json:"artifactId" db:"artifact_uuid"`
ArtifactHandle string `json:"-" db:"handle"`
ArtifactType string `json:"-" db:"type"`
Status string `json:"status,omitempty" db:"status"`
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
CreatedAt time.Time `json:"createdAt,omitempty" db:"created_at"`
UpdatedAt time.Time `json:"updatedAt,omitempty" db:"updated_at"`
ExpiresAt *time.Time `json:"expiresAt,omitempty" db:"expires_at"`
}
ApplicationAPIKey represents an API key mapped to an application.
type ApplicationAssociationTarget ¶
type ApplicationAssociationTarget struct {
TargetUUID string `json:"-" db:"uuid"`
TargetHandle string `json:"-" db:"handle"`
TargetName string `json:"-" db:"name"`
TargetVersion string `json:"-" db:"version"`
Type string `json:"-" db:"type"`
CreatedAt time.Time `json:"-" db:"created_at"`
}
ApplicationAssociationTarget represents an association target mapped to an application.
type ApplicationKeyMapping ¶
type ApplicationKeyMapping struct {
ApiKeyUuid string `json:"apiKeyUuid"`
}
ApplicationKeyMapping represents a single application to API key mapping.
type ApplicationUpdatedEvent ¶
type ApplicationUpdatedEvent struct {
ApplicationId string `json:"applicationId"`
ApplicationUuid string `json:"applicationUuid"`
ApplicationName string `json:"applicationName"`
ApplicationType string `json:"applicationType"`
Mappings []ApplicationKeyMapping `json:"mappings"`
}
ApplicationUpdatedEvent represents the payload for "application.updated" events. This event is sent when application API key mappings are changed.
type Artifact ¶
type Artifact struct {
UUID string `db:"uuid"`
Type string `db:"type"`
OrganizationUUID string `db:"organization_uuid"`
// Supplemental fields: populated by UNION queries across kind-specific tables, not stored in artifacts table.
Handle string `db:"handle"`
Name string `db:"display_name"`
Version string `db:"version"`
Kind string `db:"kind"`
Origin string `db:"origin"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
type AssociatedGatewayMapping ¶
type AssociatedGatewayMapping struct {
GatewayUUID string `json:"gatewayUuid" db:"gateway_uuid"`
GatewayHandle string `json:"gatewayHandle" db:"handle"`
Metadata string `json:"metadata,omitempty" db:"metadata"`
}
AssociatedGatewayMapping is a resolved gateway association persisted in the artifact_gateway_mappings table alongside an artifact (e.g. an LLM provider). GatewayHandle is populated on reads (joined from the gateways table) and is what callers reference by name; GatewayUUID is used for the foreign-key write.
type Channel ¶
type Channel struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Request *ChannelRequest `json:"request,omitempty"`
}
Channel represents an API channel
type ChannelRequest ¶
type ChannelRequest struct {
Method string `json:"method,omitempty"`
Name string `json:"name,omitempty"`
Policies []Policy `json:"policies,omitempty"`
}
ChannelRequest represents channel request details
type CostRateLimit ¶
type CostRateLimit struct {
Enabled bool `json:"enabled" db:"-"`
Amount float64 `json:"amount" db:"-"`
Reset RateLimitResetWindow `json:"reset" db:"-"`
}
type CustomPolicy ¶
type CustomPolicy struct {
UUID string `json:"uuid" db:"uuid"`
OrganizationUUID string `json:"organizationUuid" db:"organization_uuid"`
Name string `json:"name" db:"name"`
DisplayName *string `json:"displayName,omitempty" db:"display_name"`
Version string `json:"version" db:"version"`
Description *string `json:"description,omitempty" db:"description"`
PolicyDefinition json.RawMessage `json:"policyDefinition" db:"policy_definition"`
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
UpdatedBy string `json:"updatedBy,omitempty" db:"updated_by"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
}
CustomPolicy represents an org-scoped custom policy synced from a gateway manifest
type Deployment ¶
type Deployment struct {
DeploymentID string `json:"deploymentId" db:"uuid"`
Name string `json:"name" db:"name"`
ArtifactID string `json:"artifactId" db:"artifact_uuid"`
OrganizationID string `json:"organizationId" db:"organization_uuid"`
GatewayID string `json:"gatewayId" db:"gateway_uuid"`
BaseDeploymentID *string `json:"baseDeploymentId,omitempty" db:"base_deployment_uuid"`
Content []byte `json:"-" db:"content"`
Metadata map[string]any `json:"metadata,omitempty" db:"metadata"`
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
// Lifecycle state fields (from deployment_status table via JOIN)
// nil values indicate ARCHIVED state (no record in status table)
Status *DeploymentStatus `json:"status,omitempty" db:"status"`
UpdatedAt *time.Time `json:"updatedAt,omitempty" db:"status_updated_at"`
StatusReason *string `json:"statusReason,omitempty" db:"status_reason"`
}
Deployment represents an immutable artifact deployment Status and UpdatedAt are populated from deployment_status table via JOIN If Status is nil, the deployment is ARCHIVED (not currently active or undeployed)
func (Deployment) TableName ¶
func (Deployment) TableName() string
TableName returns the table name for the Deployment model
type DeploymentAckPayload ¶
type DeploymentAckPayload struct {
DeploymentID string `json:"deploymentId"`
ArtifactID string `json:"artifactId"`
ResourceType string `json:"resourceType"` // "api", "llmprovider", "llmproxy"
Action string `json:"action"` // "deploy", "undeploy"
Status string `json:"status"` // "success", "failed"
PerformedAt time.Time `json:"performedAt"`
ErrorCode string `json:"errorCode,omitempty"`
}
DeploymentAckPayload represents the acknowledgement message sent by the gateway after processing a deployment or undeployment event.
type DeploymentContent ¶
DeploymentContent holds the artifact content for a single deployment, used internally when constructing batch archive responses.
type DeploymentEvent ¶
type DeploymentEvent struct {
// ApiId identifies the deployed API
ApiId string `json:"apiId"`
// DeploymentID identifies the specific API deployment
DeploymentID string `json:"deploymentId"`
// PerformedAt is the timestamp when the deployment was initiated (concurrency token)
PerformedAt time.Time `json:"performedAt"`
}
DeploymentEvent contains payload data for "api.deployed" event type. This event is sent when an API is successfully deployed to a gateway.
type DeploymentInfo ¶
type DeploymentInfo struct {
DeploymentID string `json:"deploymentId" db:"deployment_uuid"`
ArtifactID string `json:"artifactId" db:"artifact_uuid"`
Handle string `json:"handle" db:"handle"` // Artifact handle (apiId)
Type string `json:"type" db:"type"` // Artifact type: RestAPI, LLMProvider, LLMProxy, MCPProxy
Status DeploymentStatus `json:"status" db:"status"`
PerformedAt time.Time `json:"performedAt" db:"performed_at"` // When the deploy/undeploy action was initiated
}
DeploymentInfo is a lightweight representation of a deployment Contains only the essential fields needed for listing deployments
type DeploymentMetadata ¶
type DeploymentMetadata struct {
Name string `yaml:"name" binding:"required"`
Labels map[string]string `yaml:"labels,omitempty"`
}
DeploymentMetadata represents the metadata section of the API deployment YAML
type DeploymentStatus ¶
type DeploymentStatus string
DeploymentStatus represents the status of a deployment Note: ARCHIVED is a derived state (not stored in database)
const ( DeploymentStatusDeployed DeploymentStatus = "DEPLOYED" DeploymentStatusUndeployed DeploymentStatus = "UNDEPLOYED" DeploymentStatusDeploying DeploymentStatus = "DEPLOYING" DeploymentStatusUndeploying DeploymentStatus = "UNDEPLOYING" DeploymentStatusFailed DeploymentStatus = "FAILED" DeploymentStatusArchived DeploymentStatus = "ARCHIVED" // Derived state: exists in history but not in status table )
type ExpiresInDuration ¶
type ExtractionIdentifier ¶
type Gateway ¶
type Gateway struct {
ID string `json:"id" db:"uuid"`
OrganizationID string `json:"organizationId" db:"organization_uuid"`
Name string `json:"name" db:"name"`
Handle string `json:"handle" db:"handle"`
Description string `json:"description" db:"description"`
Properties map[string]interface{} `json:"properties,omitempty" db:"properties"`
Endpoints []string `json:"endpoints" db:"-"`
IsCritical bool `json:"isCritical" db:"is_critical"`
FunctionalityType string `json:"functionalityType" db:"gateway_functionality_type"`
Version string `json:"version" db:"version"`
IsActive bool `json:"isActive" db:"is_active"`
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
UpdatedBy string `json:"updatedBy,omitempty" db:"updated_by"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
}
Gateway represents a registered gateway instance within an organization
type GatewayConfigEvent ¶
type GatewayConfigEvent struct {
// ConfigType identifies the configuration category (e.g., "rate-limit", "cors")
ConfigType string `json:"configType"`
// Action specifies the configuration change action ("update", "delete", "refresh")
Action string `json:"action"`
}
GatewayConfigEvent contains payload data for "gateway.config.updated" event type. This event is sent when gateway configuration needs to be refreshed.
type GatewayEvent ¶
type GatewayEvent struct {
// Type identifies the event category (e.g., "api.deployed", "api.undeployed", "api.deleted")
Type string `json:"type"`
// Payload contains event-specific data as raw JSON.
// The structure depends on the event type:
// - "api.deployed": DeploymentEvent
// - "api.undeployed": APIUndeploymentEvent
// - "api.deleted": APIDeletionEvent
// - "gateway.config.updated": GatewayConfigEvent
Payload json.RawMessage `json:"payload"`
// GatewayID identifies the target gateway for this event (UUID)
GatewayID string `json:"gatewayId"`
// Timestamp records when the event was created on the platform
Timestamp time.Time `json:"timestamp"`
// CorrelationID provides a unique identifier for request tracing across systems
CorrelationID string `json:"correlationId"`
}
GatewayEvent represents a notification to be sent to a gateway instance. Events are sent over the WebSocket connection to notify gateways of platform-side changes that require gateway action (e.g., API deployment).
type GatewayToken ¶
type GatewayToken struct {
ID string `json:"id" db:"uuid"`
GatewayID string `json:"gatewayId" db:"gateway_uuid"`
TokenHash string `json:"-" db:"token_hash"` // Never expose in JSON responses
Salt string `json:"-" db:"salt"` // Never expose in JSON responses
Status string `json:"status" db:"status"` // "active" or "revoked"
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
RevokedBy *string `json:"revokedBy,omitempty" db:"revoked_by"`
RevokedAt *time.Time `json:"revokedAt,omitempty" db:"revoked_at"`
}
GatewayToken represents an authentication token for a gateway
func (*GatewayToken) IsActive ¶
func (t *GatewayToken) IsActive() bool
IsActive returns true if token status is active
func (*GatewayToken) Revoke ¶
func (t *GatewayToken) Revoke(revokedBy string)
Revoke marks the token as revoked with current timestamp and actor
func (GatewayToken) TableName ¶
func (GatewayToken) TableName() string
TableName returns the table name for the GatewayToken model
type GlobalPolicy ¶
type InternalAPIKeyItem ¶
type InternalAPIKeyItem struct {
ETag string `json:"etag"`
UUID string `json:"uuid"`
Name string `json:"name"`
MaskedAPIKey string `json:"maskedApiKey"`
APIKeyHashes map[string]string `json:"apiKeyHashes"`
ArtifactUUID string `json:"artifactUuid"`
Status string `json:"status"`
CreatedAt time.Time `json:"createdAt"`
CreatedBy string `json:"createdBy"`
UpdatedAt time.Time `json:"updatedAt"`
ExpiresAt *time.Time `json:"expiresAt"`
Source string `json:"source"` // always "external"
ExternalRefId *string `json:"externalRefId"` // always null
Issuer *string `json:"issuer,omitempty"`
}
InternalAPIKeyItem is the response shape for the internal API key listing endpoints.
type LLMAccessControl ¶
type LLMAccessControl struct {
Mode string `json:"mode" db:"-"`
Exceptions []RouteException `json:"exceptions,omitempty" db:"-"`
}
type LLMModelProvider ¶
type LLMPolicy ¶
type LLMPolicy struct {
Name string `json:"name" db:"-"`
Version string `json:"version" db:"-"`
Paths []LLMPolicyPath `json:"paths" db:"-"`
}
type LLMPolicyPath ¶
type LLMProvider ¶
type LLMProvider struct {
UUID string `json:"uuid" db:"uuid"`
OrganizationUUID string `json:"organizationId" db:"organization_uuid"`
ID string `json:"id" db:"handle"`
Name string `json:"displayName" db:"display_name"`
Description string `json:"description,omitempty" db:"description"`
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
UpdatedBy string `json:"updatedBy,omitempty" db:"updated_by"`
Version string `json:"version" db:"version"`
TemplateUUID string `json:"templateUuid" db:"template_uuid"`
OpenAPISpec string `json:"openapi,omitempty" db:"openapi_spec"`
ModelProviders []LLMModelProvider `json:"modelProviders,omitempty" db:"-"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
Configuration LLMProviderConfig `json:"configuration" db:"configuration"`
Origin string `json:"origin,omitempty" db:"origin"`
AssociatedGateways []AssociatedGatewayMapping `json:"-" db:"-"`
ReplaceAssociatedGateways bool `json:"-" db:"-"`
}
LLMProvider represents an LLM provider entity
type LLMProviderConfig ¶
type LLMProviderConfig struct {
Name string `json:"name,omitempty" db:"-"`
Version string `json:"version,omitempty" db:"-"`
Context *string `json:"context,omitempty" db:"-"`
VHost *string `json:"vhost,omitempty" db:"-"`
Template string `json:"template,omitempty" db:"-"`
Upstream *UpstreamConfig `json:"upstream,omitempty" db:"-"`
AccessControl *LLMAccessControl `json:"accessControl,omitempty" db:"-"`
RateLimiting *LLMRateLimitingConfig `json:"rateLimiting,omitempty" db:"-"`
GlobalPolicies []GlobalPolicy `json:"globalPolicies,omitempty" db:"-"`
OperationPolicies []OperationPolicy `json:"operationPolicies,omitempty" db:"-"`
Policies []LLMPolicy `json:"policies,omitempty" db:"-"`
Security *SecurityConfig `json:"security,omitempty" db:"-"`
}
type LLMProviderDeletionEvent ¶
type LLMProviderDeletionEvent struct {
// ProviderId identifies the deleted LLM provider
ProviderId string `json:"providerId"`
}
LLMProviderDeletionEvent contains payload data for "llmprovider.deleted" event type. This event is sent when an LLM provider is permanently deleted from the platform.
type LLMProviderDeploymentEvent ¶
type LLMProviderDeploymentEvent struct {
// ProviderId identifies the deployed LLM provider (handle)
ProviderId string `json:"providerId"`
// DeploymentID identifies the specific deployment artifact
DeploymentID string `json:"deploymentId"`
// PerformedAt is the timestamp when the deployment was initiated (concurrency token)
PerformedAt time.Time `json:"performedAt"`
}
LLMProviderDeploymentEvent contains payload data for "llmprovider.deployed" event type. This event is sent when an LLM provider is successfully deployed to a gateway.
type LLMProviderTemplate ¶
type LLMProviderTemplate struct {
UUID string `json:"uuid" db:"uuid"`
OrganizationUUID string `json:"organizationId" db:"organization_uuid"`
ID string `json:"id" db:"handle"`
GroupID string `json:"groupId,omitempty" db:"group_id"`
Name string `json:"displayName" db:"display_name"`
Description string `json:"description,omitempty" db:"description"`
ManagedBy string `json:"managedBy,omitempty" db:"managed_by"`
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
UpdatedBy string `json:"updatedBy,omitempty" db:"updated_by"`
Version string `json:"version" db:"version"`
IsLatest bool `json:"isLatest" db:"is_latest"`
Enabled bool `json:"enabled" db:"enabled"`
Metadata *LLMProviderTemplateMetadata `json:"metadata,omitempty" db:"-"`
PromptTokens *ExtractionIdentifier `json:"promptTokens,omitempty" db:"-"`
CompletionTokens *ExtractionIdentifier `json:"completionTokens,omitempty" db:"-"`
TotalTokens *ExtractionIdentifier `json:"totalTokens,omitempty" db:"-"`
RemainingTokens *ExtractionIdentifier `json:"remainingTokens,omitempty" db:"-"`
RequestModel *ExtractionIdentifier `json:"requestModel,omitempty" db:"-"`
ResponseModel *ExtractionIdentifier `json:"responseModel,omitempty" db:"-"`
ResourceMappings *LLMProviderTemplateResourceMappings `json:"resourceMappings,omitempty" db:"-"`
OpenAPISpec string `json:"openapi,omitempty" db:"openapi_spec"`
Origin string `json:"origin,omitempty" db:"origin"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
}
type LLMProviderTemplateAuth ¶
type LLMProviderTemplateExtractionFields ¶
type LLMProviderTemplateExtractionFields struct {
PromptTokens *ExtractionIdentifier `json:"promptTokens,omitempty" db:"-"`
CompletionTokens *ExtractionIdentifier `json:"completionTokens,omitempty" db:"-"`
TotalTokens *ExtractionIdentifier `json:"totalTokens,omitempty" db:"-"`
RemainingTokens *ExtractionIdentifier `json:"remainingTokens,omitempty" db:"-"`
RequestModel *ExtractionIdentifier `json:"requestModel,omitempty" db:"-"`
ResponseModel *ExtractionIdentifier `json:"responseModel,omitempty" db:"-"`
}
type LLMProviderTemplateMetadata ¶
type LLMProviderTemplateMetadata struct {
EndpointURL string `json:"endpointUrl,omitempty" db:"-"`
Auth *LLMProviderTemplateAuth `json:"auth,omitempty" db:"-"`
LogoURL string `json:"logoUrl,omitempty" db:"-"`
OpenapiSpecURL string `json:"openapiSpecUrl,omitempty" db:"-"`
}
type LLMProviderTemplateResourceMapping ¶
type LLMProviderTemplateResourceMapping struct {
Resource string `json:"resource" db:"-"`
LLMProviderTemplateExtractionFields
}
type LLMProviderTemplateResourceMappings ¶
type LLMProviderTemplateResourceMappings struct {
Resources []LLMProviderTemplateResourceMapping `json:"resources,omitempty" db:"-"`
}
type LLMProviderUndeploymentEvent ¶
type LLMProviderUndeploymentEvent struct {
// ProviderId identifies the undeployed LLM provider (handle)
ProviderId string `json:"providerId"`
// DeploymentID identifies the specific deployment being undeployed
DeploymentID string `json:"deploymentId"`
// PerformedAt is the timestamp when the undeployment was initiated (concurrency token)
PerformedAt time.Time `json:"performedAt"`
}
LLMProviderUndeploymentEvent contains payload data for "llmprovider.undeployed" event type. This event is sent when an LLM provider is undeployed from a gateway.
type LLMProxy ¶
type LLMProxy struct {
UUID string `json:"uuid" db:"uuid"`
OrganizationUUID string `json:"organizationId" db:"organization_uuid"`
ID string `json:"id" db:"handle"`
Name string `json:"displayName" db:"display_name"`
ProjectUUID string `json:"projectId" db:"project_uuid"`
Description string `json:"description,omitempty" db:"description"`
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
UpdatedBy string `json:"updatedBy,omitempty" db:"updated_by"`
Version string `json:"version" db:"version"`
ProviderUUID string `json:"providerUuid" db:"provider_uuid"`
OpenAPISpec string `json:"openapi,omitempty" db:"openapi_spec"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
Configuration LLMProxyConfig `json:"configuration" db:"configuration"`
Origin string `json:"origin,omitempty" db:"origin"`
AssociatedGateways []AssociatedGatewayMapping `json:"-" db:"-"`
ReplaceAssociatedGateways bool `json:"-" db:"-"`
}
LLMProxy represents an LLM proxy entity
type LLMProxyConfig ¶
type LLMProxyConfig struct {
Name string `json:"name,omitempty" db:"-"`
Version string `json:"version,omitempty" db:"-"`
Context *string `json:"context,omitempty" db:"-"`
Vhost *string `json:"vhost,omitempty" db:"-"`
Provider string `json:"provider,omitempty" db:"-"`
UpstreamAuth *UpstreamAuth `json:"upstreamAuth,omitempty" db:"-"`
GlobalPolicies []GlobalPolicy `json:"globalPolicies,omitempty" db:"-"`
OperationPolicies []OperationPolicy `json:"operationPolicies,omitempty" db:"-"`
Policies []LLMPolicy `json:"policies,omitempty" db:"-"`
Security *SecurityConfig `json:"security,omitempty" db:"-"`
}
type LLMProxyDeletionEvent ¶
type LLMProxyDeletionEvent struct {
// ProxyId identifies the deleted LLM proxy
ProxyId string `json:"proxyId"`
}
LLMProxyDeletionEvent contains payload data for "llmproxy.deleted" event type. This event is sent when an LLM proxy is permanently deleted from the platform.
type LLMProxyDeploymentEvent ¶
type LLMProxyDeploymentEvent struct {
// ProxyId identifies the deployed LLM proxy (handle)
ProxyId string `json:"proxyId"`
// DeploymentID identifies the specific deployment artifact
DeploymentID string `json:"deploymentId"`
// PerformedAt is the timestamp when the deployment was initiated (concurrency token)
PerformedAt time.Time `json:"performedAt"`
}
LLMProxyDeploymentEvent contains payload data for "llmproxy.deployed" event type. This event is sent when an LLM proxy is successfully deployed to a gateway.
type LLMProxyUndeploymentEvent ¶
type LLMProxyUndeploymentEvent struct {
// ProxyId identifies the undeployed LLM proxy (handle)
ProxyId string `json:"proxyId"`
// DeploymentID identifies the specific deployment being undeployed
DeploymentID string `json:"deploymentId"`
// PerformedAt is the timestamp when the undeployment was initiated (concurrency token)
PerformedAt time.Time `json:"performedAt"`
}
LLMProxyUndeploymentEvent contains payload data for "llmproxy.undeployed" event type. This event is sent when an LLM proxy is undeployed from a gateway.
type LLMRateLimitingConfig ¶
type LLMRateLimitingConfig struct {
ProviderLevel *RateLimitingScopeConfig `json:"providerLevel,omitempty" db:"-"`
ConsumerLevel *RateLimitingScopeConfig `json:"consumerLevel,omitempty" db:"-"`
}
type MCPProxy ¶
type MCPProxy struct {
UUID string `json:"uuid" db:"-"`
Handle string `json:"id" db:"-"`
OrganizationUUID string `json:"organizationId" db:"-"`
ProjectUUID *string `json:"projectId" db:"-"`
Name string `json:"name" db:"-"`
Description string `json:"description,omitempty" db:"-"`
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
UpdatedBy string `json:"updatedBy,omitempty" db:"updated_by"`
Version string `json:"version" db:"-"`
CreatedAt time.Time `json:"createdAt" db:"-"`
UpdatedAt time.Time `json:"updatedAt" db:"-"`
Configuration MCPProxyConfiguration `json:"configuration" db:"-"`
Origin string `json:"origin,omitempty" db:"origin"`
AssociatedGateways []AssociatedGatewayMapping `json:"-" db:"-"`
ReplaceAssociatedGateways bool `json:"-" db:"-"`
}
type MCPProxyCapabilities ¶
type MCPProxyConfiguration ¶
type MCPProxyConfiguration struct {
Name string `json:"name" db:"-"`
Version string `json:"version" db:"-"`
Context *string `json:"context" db:"-"`
Vhost *string `json:"vhost" db:"-"`
SpecVersion string `json:"specVersion" db:"-"`
Upstream UpstreamConfig `json:"upstream" db:"-"`
Policies []Policy `json:"policies,omitempty" db:"-"`
Capabilities *MCPProxyCapabilities `json:"capabilities,omitempty" db:"-"`
}
type MCPProxyDeletionEvent ¶
type MCPProxyDeletionEvent struct {
// ProxyId identifies the deleted MCP proxy
ProxyId string `json:"proxyId"`
}
MCPProxyDeletionEvent contains payload data for "mcpproxy.deleted" event type. This event is sent when an MCP proxy is permanently deleted from the platform.
type MCPProxyDeploymentEvent ¶
type MCPProxyDeploymentEvent struct {
// ProxyId identifies the deployed MCP proxy (handle)
ProxyId string `json:"proxyId"`
// DeploymentID identifies the specific deployment artifact
DeploymentID string `json:"deploymentId"`
// PerformedAt is the timestamp when the deployment was initiated (concurrency token)
PerformedAt time.Time `json:"performedAt"`
}
MCPProxyDeploymentEvent contains payload data for "mcpproxy.deployed" event type. This event is sent when an MCP proxy is successfully deployed to a gateway.
type MCPProxyDeploymentSpec ¶
type MCPProxyDeploymentSpec struct {
DisplayName string `yaml:"displayName" binding:"required"`
Version string `yaml:"version" binding:"required"`
Context string `yaml:"context" binding:"required"`
Vhost *string `yaml:"vhost" binding:"required"`
Upstream MCPProxyUpstream `yaml:"upstream" binding:"required"`
SpecVersion string `yaml:"specVersion" binding:"required"`
Policies []Policy `yaml:"policies,omitempty"`
}
MCPProxyDeploymentSpec represents the spec section of the MCP proxy deployment YAML
type MCPProxyDeploymentYAML ¶
type MCPProxyDeploymentYAML struct {
ApiVersion string `yaml:"apiVersion" binding:"required"`
Kind string `yaml:"kind" binding:"required"`
Metadata DeploymentMetadata `yaml:"metadata" binding:"required"`
Spec MCPProxyDeploymentSpec `yaml:"spec" binding:"required"`
}
MCPProxyDeploymentYAML represents the structure of the YAML used for deploying an MCP proxy
type MCPProxyUndeploymentEvent ¶
type MCPProxyUndeploymentEvent struct {
// ProxyId identifies the undeployed MCP proxy (handle)
ProxyId string `json:"proxyId"`
// DeploymentID identifies the specific deployment being undeployed
DeploymentID string `json:"deploymentId"`
// PerformedAt is the timestamp when the undeployment was initiated (concurrency token)
PerformedAt time.Time `json:"performedAt"`
}
MCPProxyUndeploymentEvent contains payload data for "mcpproxy.undeployed" event type. This event is sent when an MCP proxy is undeployed from a gateway.
type MCPProxyUpstream ¶
type MCPProxyUpstream struct {
URL string `yaml:"url" binding:"required"`
Auth *UpstreamAuth `json:"auth,omitempty"`
}
Adding this type to support the model in the gateway side
type Operation ¶
type Operation struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Request *OperationRequest `json:"request,omitempty"`
}
Operation represents an API operation
type OperationPolicy ¶
type OperationPolicy struct {
Name string `json:"name" db:"-"`
Version string `json:"version" db:"-"`
ExecutionCondition string `json:"executionCondition,omitempty" db:"-"`
Paths []OperationPolicyPath `json:"paths" db:"-"`
}
type OperationPolicyPath ¶
type OperationRequest ¶
type OperationRequest struct {
Method string `json:"method,omitempty"`
Path string `json:"path,omitempty"`
Policies []Policy `json:"policies,omitempty"`
}
OperationRequest represents operation request details
type Organization ¶
type Organization struct {
ID string `json:"id" db:"uuid"`
Handle string `json:"handle" db:"handle"`
Name string `json:"name" db:"name"`
Region string `json:"region" db:"region"`
// IdpOrganizationRefUUID is the identity provider's organization UUID, sourced
// from the token's org_id claim. Empty for file-based auth (no external IDP).
IdpOrganizationRefUUID string `json:"idpOrganizationRefUuid" db:"idp_organization_ref_uuid"`
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
UpdatedBy string `json:"updatedBy,omitempty" db:"updated_by"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
}
Organization represents an organization entity in the API management platform
func (Organization) TableName ¶
func (Organization) TableName() string
TableName returns the table name for the Organization model
type Policy ¶
type Policy struct {
ExecutionCondition *string `json:"executionCondition,omitempty"`
Name string `json:"name"`
Params *map[string]interface{} `json:"params,omitempty"`
Version string `json:"version"`
}
Policy represents a request or response policy
type Project ¶
type Project struct {
ID string `json:"uuid" db:"uuid"`
Handle string `json:"id" db:"handle"`
Name string `json:"displayName" db:"display_name"`
OrganizationID string `json:"organizationId" db:"organization_uuid"` // FK to Organization.ID
Description string `json:"description" db:"description"`
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
UpdatedBy string `json:"updatedBy,omitempty" db:"updated_by"`
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
}
Project represents a project entity in the API management platform
type RateLimitResetWindow ¶
type RateLimitingLimitConfig ¶
type RateLimitingLimitConfig struct {
Request *RequestRateLimit `json:"request,omitempty" db:"-"`
Token *TokenRateLimit `json:"token,omitempty" db:"-"`
Cost *CostRateLimit `json:"cost,omitempty" db:"-"`
}
type RateLimitingResourceLimit ¶
type RateLimitingResourceLimit struct {
Resource string `json:"resource" db:"-"`
Limit RateLimitingLimitConfig `json:"limit" db:"-"`
}
type RateLimitingScopeConfig ¶
type RateLimitingScopeConfig struct {
Global *RateLimitingLimitConfig `json:"global,omitempty" db:"-"`
ResourceWise *ResourceWiseRateLimitingConfig `json:"resourceWise,omitempty" db:"-"`
}
type RequestRateLimit ¶
type RequestRateLimit struct {
Enabled bool `json:"enabled" db:"-"`
Count int `json:"count" db:"-"`
Reset RateLimitResetWindow `json:"reset" db:"-"`
}
type ResourceWiseRateLimitingConfig ¶
type ResourceWiseRateLimitingConfig struct {
Default RateLimitingLimitConfig `json:"default" db:"-"`
Resources []RateLimitingResourceLimit `json:"resources" db:"-"`
}
type RestAPIConfig ¶
type RestAPIConfig struct {
Name string `json:"name,omitempty"`
Version string `json:"version,omitempty"`
Context *string `json:"context,omitempty"`
Transport []string `json:"transport,omitempty"`
Upstream UpstreamConfig `json:"upstream,omitempty"`
Policies []Policy `json:"policies,omitempty"`
Operations []Operation `json:"operations,omitempty"`
SubscriptionPlans []string `json:"subscriptionPlans,omitempty"`
}
type RouteException ¶
type Secret ¶
type Secret struct {
UUID string `db:"uuid"`
OrganizationID string `db:"organization_uuid"`
Handle string `db:"handle"`
DisplayName string `db:"name"`
Description string `db:"description"`
Ciphertext []byte `db:"ciphertext"`
Hash string `db:"hash"`
Type string `db:"type"`
Provider string `db:"provider"`
Status string `db:"status"`
CreatedAt time.Time `db:"created_at"`
CreatedBy string `db:"created_by"`
UpdatedAt time.Time `db:"updated_at"`
UpdatedBy string `db:"updated_by"`
Scopes []SecretScope `db:"-"`
}
Secret represents an encrypted secret stored in the platform.
type SecretReference ¶
type SecretReference struct {
Type string `json:"type"`
Handle string `json:"handle"`
Name string `json:"name"`
}
SecretReference identifies a resource that references a secret.
type SecretScope ¶
type SecretScope struct {
SecretUUID string `db:"secret_uuid"`
Scope string `db:"scope"`
ScopeValue string `db:"scope_value"`
}
SecretScope links a secret to a scoped entity (org, project, artifact).
type SecurityConfig ¶
type SecurityConfig struct {
Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
APIKey *APIKeySecurity `json:"apiKey,omitempty" yaml:"apiKey,omitempty"`
}
type Subscription ¶
type Subscription struct {
UUID string `json:"id" db:"uuid"`
ArtifactUUID string `json:"artifactId" db:"artifact_uuid"`
SubscriberID string `json:"subscriberId" db:"subscriber_id"`
ApplicationID *string `json:"applicationId,omitempty" db:"application_id"`
SubscriptionToken string `json:"subscriptionToken" db:"subscription_token"` // Decrypted for API response
SubscriptionPlanID *string `json:"subscriptionPlanId,omitempty" db:"subscription_plan_uuid"`
OrganizationUUID string `json:"organizationId" db:"organization_uuid"`
Status SubscriptionStatus `json:"status" db:"status"`
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
UpdatedBy string `json:"updatedBy,omitempty" db:"updated_by"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
}
Subscription represents a subscription to a REST API
type SubscriptionCreatedEvent ¶
type SubscriptionCreatedEvent struct {
ApiId string `json:"apiId"`
SubscriptionId string `json:"subscriptionId"`
ApplicationId string `json:"applicationId,omitempty"`
SubscriptionToken string `json:"subscriptionToken"`
SubscriptionPlanId string `json:"subscriptionPlanId,omitempty"`
Status string `json:"status"`
}
SubscriptionCreatedEvent represents the payload for a subscription.created event.
type SubscriptionDeletedEvent ¶
type SubscriptionDeletedEvent struct {
ApiId string `json:"apiId"`
SubscriptionId string `json:"subscriptionId"`
ApplicationId string `json:"applicationId,omitempty"`
SubscriptionToken string `json:"subscriptionToken"`
}
SubscriptionDeletedEvent represents the payload for a subscription.deleted event.
type SubscriptionPlan ¶
type SubscriptionPlan struct {
UUID string `json:"id" db:"uuid"`
Handle string `json:"handle" db:"handle"`
Name string `json:"name" db:"name"`
StopOnQuotaReach bool `json:"stopOnQuotaReach"`
ThrottleLimitCount *int `json:"throttleLimitCount,omitempty"`
ThrottleLimitUnit string `json:"throttleLimitUnit,omitempty"`
ExpiryTime *time.Time `json:"expiryTime,omitempty" db:"expiry_time"`
OrganizationUUID string `json:"organizationId" db:"organization_uuid"`
Status SubscriptionPlanStatus `json:"status" db:"status"`
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
UpdatedBy string `json:"updatedBy,omitempty" db:"updated_by"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
}
SubscriptionPlan represents an organization-scoped subscription plan
NOTE: throttling limits are stored in the subscription_plan_limits table, which is modelled to hold MULTIPLE limits per plan. For now the platform-api only surfaces a SINGLE REQUEST_COUNT limit, mapped onto the StopOnQuotaReach / ThrottleLimitCount / ThrottleLimitUnit fields below (these no longer have columns on subscription_plans). This must be improved to expose all limits.
type SubscriptionPlanCreatedEvent ¶
type SubscriptionPlanCreatedEvent struct {
PlanId string `json:"planId"`
Handle string `json:"handle"`
PlanName string `json:"planName"`
BillingPlan string `json:"billingPlan,omitempty"`
StopOnQuotaReach bool `json:"stopOnQuotaReach"`
ThrottleLimitCount *int `json:"throttleLimitCount,omitempty"`
ThrottleLimitUnit string `json:"throttleLimitUnit,omitempty"`
ExpiryTime *time.Time `json:"expiryTime,omitempty"`
Status string `json:"status"`
}
SubscriptionPlanCreatedEvent represents the payload for a subscriptionPlan.created event.
StopOnQuotaReach is sent as a boolean to match the gateway-controller's payload contract; the platform-api stores it as a SMALLINT (0/1) and converts at this boundary.
type SubscriptionPlanDeletedEvent ¶
type SubscriptionPlanDeletedEvent struct {
PlanId string `json:"planId"`
Handle string `json:"handle"`
PlanName string `json:"planName"`
}
SubscriptionPlanDeletedEvent represents the payload for a subscriptionPlan.deleted event.
type SubscriptionPlanStatus ¶
type SubscriptionPlanStatus string
SubscriptionPlanStatus represents the lifecycle state of a subscription plan
const ( SubscriptionPlanStatusActive SubscriptionPlanStatus = "ACTIVE" SubscriptionPlanStatusInactive SubscriptionPlanStatus = "INACTIVE" )
type SubscriptionPlanUpdate ¶
type SubscriptionPlanUpdate struct {
Handle *string
Name *string
StopOnQuotaReach *bool
ThrottleLimitCount *int
ThrottleLimitUnit *string
// ClearLimit removes the plan's throttling limit entirely. Set when the caller
// submits an explicit empty "limits" array. Ignored if ThrottleLimitCount is set.
ClearLimit bool
ExpiryTime *time.Time
Status *SubscriptionPlanStatus
}
SubscriptionPlanUpdate holds fields for partial updates. All pointer fields are only applied when non-nil (patch semantics).
type SubscriptionPlanUpdatedEvent ¶
type SubscriptionPlanUpdatedEvent struct {
PlanId string `json:"planId"`
Handle string `json:"handle"`
PlanName string `json:"planName"`
BillingPlan string `json:"billingPlan,omitempty"`
StopOnQuotaReach bool `json:"stopOnQuotaReach"`
ThrottleLimitCount *int `json:"throttleLimitCount,omitempty"`
ThrottleLimitUnit string `json:"throttleLimitUnit,omitempty"`
ExpiryTime *time.Time `json:"expiryTime,omitempty"`
Status string `json:"status"`
}
SubscriptionPlanUpdatedEvent represents the payload for a subscriptionPlan.updated event.
StopOnQuotaReach is sent as a boolean to match the gateway-controller's payload contract; the platform-api stores it as a SMALLINT (0/1) and converts at this boundary.
type SubscriptionStatus ¶
type SubscriptionStatus string
SubscriptionStatus represents the lifecycle state of a subscription
const ( SubscriptionStatusActive SubscriptionStatus = "ACTIVE" SubscriptionStatusInactive SubscriptionStatus = "INACTIVE" SubscriptionStatusRevoked SubscriptionStatus = "REVOKED" )
type SubscriptionUpdatedEvent ¶
type SubscriptionUpdatedEvent struct {
ApiId string `json:"apiId"`
SubscriptionId string `json:"subscriptionId"`
ApplicationId string `json:"applicationId,omitempty"`
SubscriptionToken string `json:"subscriptionToken"`
SubscriptionPlanId string `json:"subscriptionPlanId,omitempty"`
Status string `json:"status"`
}
SubscriptionUpdatedEvent represents the payload for a subscription.updated event.
type TokenRateLimit ¶
type TokenRateLimit struct {
Enabled bool `json:"enabled" db:"-"`
Count int `json:"count" db:"-"`
Reset RateLimitResetWindow `json:"reset" db:"-"`
}
type UpstreamAuth ¶
type UpstreamConfig ¶
type UpstreamConfig struct {
Main *UpstreamEndpoint `json:"main,omitempty" db:"-"`
Sandbox *UpstreamEndpoint `json:"sandbox,omitempty" db:"-"`
}
UpstreamConfig represents the upstream configuration with main and sandbox endpoints
type UpstreamEndpoint ¶
type UpstreamEndpoint struct {
URL string `json:"url,omitempty" db:"-"`
Ref string `json:"ref,omitempty" db:"-"`
Auth *UpstreamAuth `json:"auth,omitempty" db:"-"`
}
UpstreamEndpoint represents an upstream endpoint configuration
type UserAPIKey ¶
type UserAPIKey struct {
APIKey
ArtifactHandle string // Handle (ID) of the LLM provider or proxy
ArtifactType string // Type of the artifact: LlmProvider or LlmProxy
}
UserAPIKey extends APIKey with artifact context, used when listing keys across multiple artifact types.
type UserIdentityMapping ¶
type UserIdentityMapping struct {
UUID string `json:"uuid" db:"uuid"`
IdpID string `json:"idpId" db:"idp_id"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
}
UserIdentityMapping maps our internal platform user UUID to the identity provider's resolved actor identifier (the OIDC "sub" claim, falling back to the configured claim / user_id when sub is absent — see middleware.GetActorIdentityFromRequest). Audit columns (created_by/updated_by/revoked_by/performed_by) store UserIdentityMapping.UUID; API responses and external/data-plane events resolve it back to IdpID at the boundary (see service.IdentityService).
type UserOrganizationMapping ¶
type UserOrganizationMapping struct {
UserUUID string `json:"userUuid" db:"user_uuid"`
OrgUUID string `json:"orgUuid" db:"org_uuid"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
}
UserOrganizationMapping records that a user (identified by their internal UUID) has onboarded to an organization. Populate-only today: no reader depends on this table yet. There is no ON DELETE CASCADE on either FK by design — deleting the referenced user or organization must delete the matching rows here first, in the same transaction (see repository.UserOrganizationMappingRepository).
type WebBrokerAPI ¶
type WebBrokerAPI struct {
UUID string `json:"uuid" db:"-"`
Handle string `json:"id" db:"-"`
OrganizationUUID string `json:"organizationId" db:"-"`
ProjectUUID string `json:"projectId" db:"-"`
Name string `json:"name" db:"-"`
Description string `json:"description,omitempty" db:"-"`
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
UpdatedBy string `json:"updatedBy,omitempty" db:"updated_by"`
Version string `json:"version" db:"-"`
LifeCycleStatus string `json:"lifeCycleStatus" db:"-"`
CreatedAt time.Time `json:"createdAt" db:"-"`
UpdatedAt time.Time `json:"updatedAt" db:"-"`
Configuration WebBrokerAPIConfiguration `json:"configuration" db:"-"`
Origin string `json:"origin,omitempty" db:"origin"`
}
WebBrokerAPI represents a WebBroker API entity in the platform
type WebBrokerAPIConfiguration ¶
type WebBrokerAPIConfiguration struct {
Name string `json:"name,omitempty"`
Version string `json:"version,omitempty"`
Context *string `json:"context,omitempty"`
Transport []string `json:"transport,omitempty"`
Receiver WebBrokerReceiver `json:"receiver,omitempty"`
Broker WebBrokerBroker `json:"broker,omitempty"`
Channels map[string]WebBrokerChannel `json:"channels,omitempty"`
AllChannels *WebBrokerAllChannelPolicies `json:"allChannels,omitempty"`
SubscriptionPlans []string `json:"subscriptionPlans,omitempty"`
}
WebBrokerAPIConfiguration holds the WebBroker API configuration stored as JSON in the DB
type WebBrokerAPIDeletionEvent ¶
type WebBrokerAPIDeletionEvent struct {
// ApiId identifies the deleted WebBroker API (UUID)
ApiId string `json:"apiId"`
}
WebBrokerAPIDeletionEvent contains payload data for "webbroker.deleted" event type. This event is sent when a WebBroker API is permanently deleted from the platform.
type WebBrokerAPIDeploymentEvent ¶
type WebBrokerAPIDeploymentEvent struct {
// ApiId identifies the deployed WebBroker API (UUID)
ApiId string `json:"apiId"`
// DeploymentID identifies the specific deployment artifact
DeploymentID string `json:"deploymentId"`
// PerformedAt is the timestamp when the deployment was initiated (concurrency token)
PerformedAt time.Time `json:"performedAt"`
}
WebBrokerAPIDeploymentEvent contains payload data for "webbroker.deployed" event type. This event is sent when a WebBroker API is successfully deployed to a gateway.
type WebBrokerAPIDeploymentSpec ¶
type WebBrokerAPIDeploymentSpec struct {
DisplayName string `yaml:"displayName"`
Version string `yaml:"version"`
Context string `yaml:"context"`
Vhosts *WebBrokerAPIDeploymentVhosts `yaml:"vhosts,omitempty"`
AllChannels *WebBrokerDeployAllChannelPolicies `yaml:"allChannels,omitempty"`
Receiver *WebBrokerDeployReceiver `yaml:"receiver,omitempty"`
Broker *WebBrokerDeployBroker `yaml:"broker,omitempty"`
Channels map[string]WebBrokerDeployChannel `yaml:"channels,omitempty"`
DeploymentState string `yaml:"deploymentState,omitempty"`
}
WebBrokerAPIDeploymentSpec represents the spec section of the WebBroker API deployment YAML
type WebBrokerAPIDeploymentVhosts ¶
type WebBrokerAPIDeploymentVhosts struct {
Main string `yaml:"main"`
Sandbox *string `yaml:"sandbox,omitempty"`
}
WebBrokerAPIDeploymentVhosts represents vhost configuration in the WebBroker API deployment YAML
type WebBrokerAPIDeploymentYAML ¶
type WebBrokerAPIDeploymentYAML struct {
ApiVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
Metadata DeploymentMetadata `yaml:"metadata"`
Spec WebBrokerAPIDeploymentSpec `yaml:"spec"`
}
WebBrokerAPIDeploymentYAML represents the structure of the YAML used for deploying a WebBroker API
type WebBrokerAPIUndeploymentEvent ¶
type WebBrokerAPIUndeploymentEvent struct {
// ApiId identifies the undeployed WebBroker API (UUID)
ApiId string `json:"apiId"`
// DeploymentID identifies the specific deployment being undeployed
DeploymentID string `json:"deploymentId"`
// PerformedAt is the timestamp when the undeployment was initiated (concurrency token)
PerformedAt time.Time `json:"performedAt"`
}
WebBrokerAPIUndeploymentEvent contains payload data for "webbroker.undeployed" event type. This event is sent when a WebBroker API is undeployed from a gateway.
type WebBrokerAllChannelPolicies ¶
type WebBrokerAllChannelPolicies struct {
OnConnectionInit *WebBrokerEventPolicies `json:"on_connection_init,omitempty"`
OnProduce *WebBrokerEventPolicies `json:"on_produce,omitempty"`
OnConsume *WebBrokerEventPolicies `json:"on_consume,omitempty"`
}
WebBrokerAllChannelPolicies holds policies applied to all channels, organized by event type
type WebBrokerBroker ¶
type WebBrokerBroker struct {
Name string `json:"name"`
Type string `json:"type"` // e.g., "kafka"
Properties map[string]interface{} `json:"properties,omitempty"`
}
WebBrokerBroker represents the broker configuration
type WebBrokerChannel ¶
type WebBrokerChannel struct {
ProduceTo *WebBrokerTopic `json:"produceTo,omitempty"`
ConsumeFrom *WebBrokerTopic `json:"consumeFrom,omitempty"`
OnConnectionInit *WebBrokerEventPolicies `json:"on_connection_init,omitempty"`
OnProduce *WebBrokerEventPolicies `json:"on_produce,omitempty"`
OnConsume *WebBrokerEventPolicies `json:"on_consume,omitempty"`
}
WebBrokerChannel represents a single channel with optional per-channel policy overrides
type WebBrokerChannelPolicies ¶
type WebBrokerChannelPolicies = WebBrokerAllChannelPolicies
WebBrokerChannelPolicies holds policies applied to a specific channel, organized by event type
type WebBrokerDeployAllChannelPolicies ¶
type WebBrokerDeployAllChannelPolicies struct {
OnConnectionInit *WebBrokerDeployEventPolicies `yaml:"on_connection_init,omitempty"`
OnProduce *WebBrokerDeployEventPolicies `yaml:"on_produce,omitempty"`
OnConsume *WebBrokerDeployEventPolicies `yaml:"on_consume,omitempty"`
}
WebBrokerDeployAllChannelPolicies represents policies for all channels in the deployment YAML, organized by event type.
type WebBrokerDeployBroker ¶
type WebBrokerDeployBroker struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
Properties map[string]interface{} `yaml:"properties,omitempty"`
Policies []Policy `yaml:"policies,omitempty"`
}
WebBrokerDeployBroker represents the broker section in the deployment YAML.
type WebBrokerDeployChannel ¶
type WebBrokerDeployChannel struct {
ProduceTo *WebBrokerDeployTopic `yaml:"produceTo,omitempty"`
ConsumeFrom *WebBrokerDeployTopic `yaml:"consumeFrom,omitempty"`
OnConnectionInit *WebBrokerDeployEventPolicies `yaml:"on_connection_init,omitempty"`
OnProduce *WebBrokerDeployEventPolicies `yaml:"on_produce,omitempty"`
OnConsume *WebBrokerDeployEventPolicies `yaml:"on_consume,omitempty"`
}
WebBrokerDeployChannel represents a single channel entry in the deployment YAML.
type WebBrokerDeployEventPolicies ¶
type WebBrokerDeployEventPolicies struct {
Policies *[]Policy `yaml:"policies,omitempty"`
}
WebBrokerDeployEventPolicies wraps a list of policies for a single event type, matching the gateway controller's WebBrokerEventPolicies schema.
type WebBrokerDeployReceiver ¶
type WebBrokerDeployReceiver struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
Properties map[string]interface{} `yaml:"properties,omitempty"`
Policies []Policy `yaml:"policies,omitempty"`
}
WebBrokerDeployReceiver represents the receiver section in the deployment YAML.
type WebBrokerDeployTopic ¶
type WebBrokerDeployTopic struct {
Topic string `yaml:"topic"`
}
WebBrokerDeployTopic represents a topic configuration in the deployment YAML
type WebBrokerEventPolicies ¶
type WebBrokerEventPolicies struct {
Policies []Policy `json:"policies,omitempty"`
}
WebBrokerEventPolicies holds policies for a single event type
type WebBrokerReceiver ¶
type WebBrokerReceiver struct {
Name string `json:"name"`
Type string `json:"type"` // e.g., "websocket"
Properties map[string]interface{} `json:"properties,omitempty"`
}
WebBrokerReceiver represents the receiver configuration
type WebBrokerTopic ¶
type WebBrokerTopic struct {
Topic string `json:"topic"`
}
WebBrokerTopic represents a topic configuration
type WebSubAPI ¶
type WebSubAPI struct {
UUID string `json:"uuid" db:"-"`
Handle string `json:"id" db:"-"`
OrganizationUUID string `json:"organizationId" db:"-"`
ProjectUUID string `json:"projectId" db:"-"`
Name string `json:"name" db:"-"`
Description string `json:"description,omitempty" db:"-"`
CreatedBy string `json:"createdBy,omitempty" db:"created_by"`
UpdatedBy string `json:"updatedBy,omitempty" db:"updated_by"`
Version string `json:"version" db:"-"`
LifeCycleStatus string `json:"lifeCycleStatus" db:"-"`
CreatedAt time.Time `json:"createdAt" db:"-"`
UpdatedAt time.Time `json:"updatedAt" db:"-"`
Configuration WebSubAPIConfiguration `json:"configuration" db:"-"`
Origin string `json:"origin,omitempty" db:"origin"`
}
WebSubAPI represents a WebSub API entity in the platform
type WebSubAPIConfiguration ¶
type WebSubAPIConfiguration struct {
Name string `json:"name,omitempty"`
Version string `json:"version,omitempty"`
Context *string `json:"context,omitempty"`
Transport []string `json:"transport,omitempty"`
Channels map[string]WebSubChannel `json:"channels,omitempty"`
Upstream UpstreamConfig `json:"upstream,omitempty"`
AllChannels *WebSubAllChannelPolicies `json:"allChannels,omitempty"`
SubscriptionPlans []string `json:"subscriptionPlans,omitempty"`
}
WebSubAPIConfiguration holds the WebSub API configuration stored as JSON in the DB
type WebSubAPIDeletionEvent ¶
type WebSubAPIDeletionEvent struct {
// ApiId identifies the deleted WebSub API (UUID)
ApiId string `json:"apiId"`
}
WebSubAPIDeletionEvent contains payload data for "websub.deleted" event type. This event is sent when a WebSub API is permanently deleted from the platform.
type WebSubAPIDeploymentEvent ¶
type WebSubAPIDeploymentEvent struct {
// ApiId identifies the deployed WebSub API (UUID)
ApiId string `json:"apiId"`
// DeploymentID identifies the specific deployment artifact
DeploymentID string `json:"deploymentId"`
// PerformedAt is the timestamp when the deployment was initiated (concurrency token)
PerformedAt time.Time `json:"performedAt"`
}
WebSubAPIDeploymentEvent contains payload data for "websub.deployed" event type. This event is sent when a WebSub API is successfully deployed to a gateway.
type WebSubAPIDeploymentSpec ¶
type WebSubAPIDeploymentSpec struct {
DisplayName string `yaml:"displayName"`
Version string `yaml:"version"`
Context string `yaml:"context"`
Vhosts *WebSubAPIDeploymentVhosts `yaml:"vhosts,omitempty"`
AllChannels *WebSubDeployAllChannelPolicies `yaml:"allChannels,omitempty"`
Receiver *WebSubDeployReceiver `yaml:"receiver,omitempty"`
Hub *WebSubDeployHub `yaml:"hub,omitempty"`
Delivery *WebSubDeployDelivery `yaml:"delivery,omitempty"`
Channels map[string]WebSubDeployChannel `yaml:"channels,omitempty"`
DeploymentState string `yaml:"deploymentState,omitempty"`
}
WebSubAPIDeploymentSpec represents the spec section of the WebSub API deployment YAML
type WebSubAPIDeploymentVhosts ¶
type WebSubAPIDeploymentVhosts struct {
Main string `yaml:"main"`
Sandbox *string `yaml:"sandbox,omitempty"`
}
WebSubAPIDeploymentVhosts represents vhost configuration in the WebSub API deployment YAML
type WebSubAPIDeploymentYAML ¶
type WebSubAPIDeploymentYAML struct {
ApiVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
Metadata DeploymentMetadata `yaml:"metadata"`
Spec WebSubAPIDeploymentSpec `yaml:"spec"`
}
WebSubAPIDeploymentYAML represents the structure of the YAML used for deploying a WebSub API
type WebSubAPIHmacSecret ¶
type WebSubAPIHmacSecret struct {
UUID string `json:"uuid"`
ArtifactUUID string `json:"artifactUuid"`
Handle string `json:"handle"`
Name string `json:"name"`
EncryptedSecret string `json:"-"`
Status string `json:"status"`
CreatedBy string `json:"createdBy,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedBy string `json:"updatedBy,omitempty"`
UpdatedAt time.Time `json:"updatedAt"`
}
WebSubAPIHmacSecret represents a platform-managed HMAC secret for a WebSub API. Plaintext is never persisted; only the AES-256-GCM encrypted form is stored.
type WebSubAPIHmacSecretEvent ¶
type WebSubAPIHmacSecretEvent struct {
// ArtifactUUID is the UUID of the WebSub API artifact.
ArtifactUUID string `json:"artifactUuid"`
// SecretName is the handle (URL-safe slug) of the secret.
SecretName string `json:"secretName"`
}
WebSubAPIHmacSecretEvent is broadcast to gateways when a secret is created, regenerated, or deleted.
type WebSubAPIUndeploymentEvent ¶
type WebSubAPIUndeploymentEvent struct {
// ApiId identifies the undeployed WebSub API (UUID)
ApiId string `json:"apiId"`
// DeploymentID identifies the specific deployment being undeployed
DeploymentID string `json:"deploymentId"`
// PerformedAt is the timestamp when the undeployment was initiated (concurrency token)
PerformedAt time.Time `json:"performedAt"`
}
WebSubAPIUndeploymentEvent contains payload data for "websub.undeployed" event type. This event is sent when a WebSub API is undeployed from a gateway.
type WebSubAllChannelPolicies ¶
type WebSubAllChannelPolicies struct {
OnSubscription *WebSubEventPolicies `json:"on_subscription,omitempty"`
OnUnsubscription *WebSubEventPolicies `json:"on_unsubscription,omitempty"`
OnMessageReceived *WebSubEventPolicies `json:"on_message_received,omitempty"`
OnMessageDelivery *WebSubEventPolicies `json:"on_message_delivery,omitempty"`
}
WebSubAllChannelPolicies holds policies applied to all channels, organized by event type.
type WebSubChannel ¶
type WebSubChannel struct {
OnSubscription *WebSubEventPolicies `json:"on_subscription,omitempty"`
OnUnsubscription *WebSubEventPolicies `json:"on_unsubscription,omitempty"`
OnMessageReceived *WebSubEventPolicies `json:"on_message_received,omitempty"`
OnMessageDelivery *WebSubEventPolicies `json:"on_message_delivery,omitempty"`
}
WebSubChannel represents a single channel with optional per-channel policy overrides.
type WebSubChannelPolicies ¶
type WebSubChannelPolicies = WebSubAllChannelPolicies
WebSubChannelPolicies holds policies applied to a specific channel, organized by event type.
type WebSubDelivery ¶
type WebSubDelivery struct {
Policies []Policy `json:"policies,omitempty"`
}
WebSubDelivery represents the delivery section of a WebSub API configuration.
type WebSubDeployAllChannelPolicies ¶
type WebSubDeployAllChannelPolicies struct {
OnSubscription *WebSubDeployEventPolicies `yaml:"on_subscription,omitempty"`
OnUnsubscription *WebSubDeployEventPolicies `yaml:"on_unsubscription,omitempty"`
OnMessageReceived *WebSubDeployEventPolicies `yaml:"on_message_received,omitempty"`
OnMessageDelivery *WebSubDeployEventPolicies `yaml:"on_message_delivery,omitempty"`
}
WebSubDeployAllChannelPolicies represents policies for all channels in the deployment YAML, organized by event type.
type WebSubDeployChannel ¶
type WebSubDeployChannel struct {
OnSubscription *WebSubDeployEventPolicies `yaml:"on_subscription,omitempty"`
OnUnsubscription *WebSubDeployEventPolicies `yaml:"on_unsubscription,omitempty"`
OnMessageReceived *WebSubDeployEventPolicies `yaml:"on_message_received,omitempty"`
OnMessageDelivery *WebSubDeployEventPolicies `yaml:"on_message_delivery,omitempty"`
}
WebSubDeployChannel represents a single channel entry in the deployment YAML. Event policies are at the top level to match the gateway-controller's WebSubChannel schema.
type WebSubDeployDelivery ¶
type WebSubDeployDelivery struct {
Policies []Policy `yaml:"policies"`
}
WebSubDeployDelivery represents the delivery section in the deployment YAML.
type WebSubDeployEventPolicies ¶
type WebSubDeployEventPolicies struct {
Policies *[]Policy `yaml:"policies,omitempty"`
}
WebSubDeployEventPolicies wraps a list of policies for a single event type, matching the gateway controller's WebSubEventPolicies schema.
type WebSubDeployHub ¶
type WebSubDeployHub struct {
Policies []Policy `yaml:"policies"`
Channels []WebSubDeployHubChannel `yaml:"channels,omitempty"`
}
WebSubDeployHub represents the hub section in the deployment YAML.
type WebSubDeployHubChannel ¶
type WebSubDeployHubChannel struct {
Name string `yaml:"name"`
Policies []Policy `yaml:"policies"`
}
WebSubDeployHubChannel represents a channel entry under the hub section in the deployment YAML.
type WebSubDeployReceiver ¶
type WebSubDeployReceiver struct {
Policies []Policy `yaml:"policies"`
}
WebSubDeployReceiver represents the receiver section in the deployment YAML.
type WebSubEventPolicies ¶
type WebSubEventPolicies struct {
Policies []Policy `json:"policies,omitempty"`
}
WebSubEventPolicies holds policies for a single event type.
type WebSubHub ¶
type WebSubHub struct {
Policies []Policy `json:"policies,omitempty"`
Channels []WebSubHubChannel `json:"channels,omitempty"`
}
WebSubHub represents the hub section of a WebSub API configuration.
type WebSubHubChannel ¶
type WebSubHubChannel struct {
Name string `json:"name"`
Policies []Policy `json:"policies,omitempty"`
}
WebSubHubChannel represents a channel entry under the hub section.
type WebSubReceiver ¶
type WebSubReceiver struct {
Policies []Policy `json:"policies,omitempty"`
}
WebSubReceiver represents the receiver section of a WebSub API configuration.
Source Files
¶
- api.go
- apikey.go
- apikey_event.go
- application.go
- application_event.go
- artifact.go
- custom_policy.go
- deployment.go
- deployment_ack.go
- deployment_error_codes.go
- gateway.go
- gateway_event.go
- llm.go
- mcp.go
- organization.go
- project.go
- secret.go
- subscription.go
- subscription_event.go
- subscription_plan.go
- subscription_plan_event.go
- upstream.go
- user_identity_mapping.go
- user_organization_mapping.go
- webbroker_api.go
- websub_api.go
- websub_api_hmac_secret.go