handler

package
v0.11.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIHandler

type APIHandler struct {
	// contains filtered or unexported fields
}

func NewAPIHandler

func NewAPIHandler(apiService *service.APIService, identity *service.IdentityService, slogger *slog.Logger) *APIHandler

func (*APIHandler) AddGatewaysToAPI

func (h *APIHandler) AddGatewaysToAPI(w http.ResponseWriter, r *http.Request) error

AddGatewaysToAPI handles POST /api/v0.9/rest-apis/:apiId/gateways to associate gateways with an API

func (*APIHandler) CreateAPI

func (h *APIHandler) CreateAPI(w http.ResponseWriter, r *http.Request) error

CreateAPI handles POST /api/v0.9/rest-apis and creates a new API

func (*APIHandler) DeleteAPI

func (h *APIHandler) DeleteAPI(w http.ResponseWriter, r *http.Request) error

DeleteAPI handles DELETE /api/v0.9/rest-apis/:apiId and deletes an API by its handle

func (*APIHandler) GetAPI

func (h *APIHandler) GetAPI(w http.ResponseWriter, r *http.Request) error

GetAPI handles GET /api/v0.9/rest-apis/:apiId and retrieves an API by its handle

func (*APIHandler) GetAPIGateways

func (h *APIHandler) GetAPIGateways(w http.ResponseWriter, r *http.Request) error

GetAPIGateways handles GET /api/v0.9/rest-apis/:apiId/gateways to get gateways associated with an API including deployment details

func (*APIHandler) ListAPIs

func (h *APIHandler) ListAPIs(w http.ResponseWriter, r *http.Request) error

ListAPIs handles GET /api/v0.9/rest-apis and lists APIs for an organization filtered by project

func (*APIHandler) RegisterRoutes

func (h *APIHandler) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers all API routes

func (*APIHandler) UpdateAPI

func (h *APIHandler) UpdateAPI(w http.ResponseWriter, r *http.Request) error

UpdateAPI updates an existing API identified by handle

type APIKeyHandler

type APIKeyHandler struct {
	// contains filtered or unexported fields
}

APIKeyHandler handles API key operations for external services (Cloud APIM)

func NewAPIKeyHandler

func NewAPIKeyHandler(apiKeyService *service.APIKeyService, identity *service.IdentityService, slogger *slog.Logger) *APIKeyHandler

NewAPIKeyHandler creates a new API key handler

func (*APIKeyHandler) CreateAPIKey

func (h *APIKeyHandler) CreateAPIKey(w http.ResponseWriter, r *http.Request) error

CreateAPIKey handles POST /rest-apis/{restApiId}/api-keys This endpoint allows users to inject external API keys to all the gateways where the API is deployed

func (*APIKeyHandler) RegisterRoutes

func (h *APIKeyHandler) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers API key routes with the router

func (*APIKeyHandler) RevokeAPIKey

func (h *APIKeyHandler) RevokeAPIKey(w http.ResponseWriter, r *http.Request) error

RevokeAPIKey handles DELETE /rest-apis/{restApiId}/api-keys/{apiKeyId} This endpoint allows Cloud APIM to revoke external API keys on hybrid gateways

func (*APIKeyHandler) UpdateAPIKey

func (h *APIKeyHandler) UpdateAPIKey(w http.ResponseWriter, r *http.Request) error

UpdateAPIKey handles PUT /rest-apis/{restApiId}/api-keys/{apiKeyId} This endpoint allows external platforms to update/regenerate external API keys on hybrid gateways

type APIKeyUserHandler

type APIKeyUserHandler struct {
	// contains filtered or unexported fields
}

APIKeyUserHandler handles listing API keys for a user across artifact types.

func NewAPIKeyUserHandler

func NewAPIKeyUserHandler(apiKeyUserService *service.APIKeyUserService, identity *service.IdentityService, slogger *slog.Logger) *APIKeyUserHandler

NewAPIKeyUserHandler creates a new APIKeyUserHandler.

func (*APIKeyUserHandler) ListUserAPIKeys

func (h *APIKeyUserHandler) ListUserAPIKeys(w http.ResponseWriter, r *http.Request) error

ListUserAPIKeys handles GET /api/v0.9/me/api-keys

func (*APIKeyUserHandler) RegisterRoutes

func (h *APIKeyUserHandler) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers the user API key routes.

type ApplicationHandler

type ApplicationHandler struct {
	// contains filtered or unexported fields
}

func NewApplicationHandler

func NewApplicationHandler(applicationService *service.ApplicationService, identity *service.IdentityService, slogger *slog.Logger) *ApplicationHandler

func (*ApplicationHandler) AddApplicationAPIKeys

func (h *ApplicationHandler) AddApplicationAPIKeys(w http.ResponseWriter, r *http.Request) error

func (*ApplicationHandler) AddApplicationAssociations

func (h *ApplicationHandler) AddApplicationAssociations(w http.ResponseWriter, r *http.Request) error

func (*ApplicationHandler) CreateApplication

func (h *ApplicationHandler) CreateApplication(w http.ResponseWriter, r *http.Request) error

func (*ApplicationHandler) DeleteApplication

func (h *ApplicationHandler) DeleteApplication(w http.ResponseWriter, r *http.Request) error

func (*ApplicationHandler) GetApplication

func (h *ApplicationHandler) GetApplication(w http.ResponseWriter, r *http.Request) error

func (*ApplicationHandler) ListApplicationAPIKeys

func (h *ApplicationHandler) ListApplicationAPIKeys(w http.ResponseWriter, r *http.Request) error

func (*ApplicationHandler) ListApplicationAssociationAPIKeys

func (h *ApplicationHandler) ListApplicationAssociationAPIKeys(w http.ResponseWriter, r *http.Request) error

func (*ApplicationHandler) ListApplicationAssociations

func (h *ApplicationHandler) ListApplicationAssociations(w http.ResponseWriter, r *http.Request) error

func (*ApplicationHandler) ListApplications

func (h *ApplicationHandler) ListApplications(w http.ResponseWriter, r *http.Request) error

func (*ApplicationHandler) RegisterRoutes

func (h *ApplicationHandler) RegisterRoutes(mux *http.ServeMux)

func (*ApplicationHandler) RemoveApplicationAPIKey

func (h *ApplicationHandler) RemoveApplicationAPIKey(w http.ResponseWriter, r *http.Request) error

func (*ApplicationHandler) RemoveApplicationAssociation

func (h *ApplicationHandler) RemoveApplicationAssociation(w http.ResponseWriter, r *http.Request) error

func (*ApplicationHandler) UpdateApplication

func (h *ApplicationHandler) UpdateApplication(w http.ResponseWriter, r *http.Request) error

type AuthLoginHandler

type AuthLoginHandler struct {
	// contains filtered or unexported fields
}

AuthLoginHandler issues JWT tokens for locally-configured users (file-based auth mode).

func NewAuthLoginHandler

func NewAuthLoginHandler(cfg *config.Server) *AuthLoginHandler

func (*AuthLoginHandler) Login

func (*AuthLoginHandler) RegisterPublicRoutes

func (h *AuthLoginHandler) RegisterPublicRoutes(mux *http.ServeMux)

type CreateSubscriptionPlanRequest

type CreateSubscriptionPlanRequest struct {
	Id          string                         `json:"id" binding:"required"`
	DisplayName string                         `json:"displayName" binding:"required"`
	Limits      []SubscriptionPlanLimitRequest `json:"limits,omitempty"`
	ExpiryTime  *string                        `json:"expiryTime,omitempty"`
	Status      string                         `json:"status,omitempty"`
}

CreateSubscriptionPlanRequest is the body for POST /api/v0.9/subscription-plans

type CreateSubscriptionRequest

type CreateSubscriptionRequest struct {
	APIID              string  `json:"apiId" binding:"required"`
	Kind               string  `json:"kind" binding:"required"`
	SubscriberID       string  `json:"subscriberId" binding:"required"`
	ApplicationID      *string `json:"applicationId,omitempty"`
	SubscriptionPlanID *string `json:"subscriptionPlanId,omitempty"`
	Status             string  `json:"status,omitempty"`
}

CreateSubscriptionRequest is the body for POST /api/v0.9/subscriptions

type DeploymentHandler

type DeploymentHandler struct {
	// contains filtered or unexported fields
}

func NewDeploymentHandler

func NewDeploymentHandler(deploymentService *service.DeploymentService, identity *service.IdentityService, slogger *slog.Logger) *DeploymentHandler

func (*DeploymentHandler) DeleteDeployment

func (h *DeploymentHandler) DeleteDeployment(w http.ResponseWriter, r *http.Request) error

DeleteDeployment handles DELETE /api/v0.9/rest-apis/:apiId/deployments/:deploymentId Permanently deletes an undeployed deployment artifact

func (*DeploymentHandler) DeployAPI

func (h *DeploymentHandler) DeployAPI(w http.ResponseWriter, r *http.Request) error

DeployAPI handles POST /api/v0.9/rest-apis/:apiId/deployments Creates a new immutable deployment artifact and deploys it to a gateway

func (*DeploymentHandler) GetDeployment

func (h *DeploymentHandler) GetDeployment(w http.ResponseWriter, r *http.Request) error

GetDeployment handles GET /api/v0.9/rest-apis/:apiId/deployments/:deploymentId Retrieves metadata for a specific deployment artifact

func (*DeploymentHandler) GetDeployments

func (h *DeploymentHandler) GetDeployments(w http.ResponseWriter, r *http.Request) error

GetDeployments handles GET /api/v0.9/rest-apis/:apiId/deployments Retrieves all deployment records for an API with optional filters

func (*DeploymentHandler) RegisterRoutes

func (h *DeploymentHandler) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers all deployment-related routes

func (*DeploymentHandler) RestoreDeployment

func (h *DeploymentHandler) RestoreDeployment(w http.ResponseWriter, r *http.Request) error

RestoreDeployment handles POST /api/v0.9/rest-apis/:apiId/deployments/:deploymentId/restore

func (*DeploymentHandler) UndeployDeployment

func (h *DeploymentHandler) UndeployDeployment(w http.ResponseWriter, r *http.Request) error

UndeployDeployment handles POST /api/v0.9/rest-apis/:apiId/deployments/:deploymentId/undeploy

type GatewayHandler

type GatewayHandler struct {
	// contains filtered or unexported fields
}

GatewayHandler handles HTTP requests for gateway operations

func NewGatewayHandler

func NewGatewayHandler(gatewayService *service.GatewayService, identity *service.IdentityService, slogger *slog.Logger) *GatewayHandler

NewGatewayHandler creates a new gateway handler

func (*GatewayHandler) CreateGateway

func (h *GatewayHandler) CreateGateway(w http.ResponseWriter, r *http.Request) error

CreateGateway handles POST /api/v0.9/gateways

func (*GatewayHandler) DeleteCustomPolicy

func (h *GatewayHandler) DeleteCustomPolicy(w http.ResponseWriter, r *http.Request) error

DeleteCustomPolicy handles DELETE /api/v0.9/gateway-custom-policies/:customPolicyUuid/versions/:version

func (*GatewayHandler) DeleteGateway

func (h *GatewayHandler) DeleteGateway(w http.ResponseWriter, r *http.Request) error

DeleteGateway handles DELETE /api/v0.9/gateways/:gatewayId

func (*GatewayHandler) GetCustomPolicy

func (h *GatewayHandler) GetCustomPolicy(w http.ResponseWriter, r *http.Request) error

GetCustomPolicy handles GET /api/v0.9/gateway-custom-policies/:customPolicyUuid/versions/:version

func (*GatewayHandler) GetGateway

func (h *GatewayHandler) GetGateway(w http.ResponseWriter, r *http.Request) error

GetGateway handles GET /api/v0.9/gateways/:gatewayId

func (*GatewayHandler) GetGatewayManifest

func (h *GatewayHandler) GetGatewayManifest(w http.ResponseWriter, r *http.Request) error

GetGatewayManifest handles GET /api/v0.9/gateways/{gatewayId}/manifest Called by APIM to retrieve the manifest pushed by the gateway controller on connect.

func (*GatewayHandler) GetGatewayStatus

func (h *GatewayHandler) GetGatewayStatus(w http.ResponseWriter, r *http.Request) error

GetGatewayStatus retrieves gateway status, optionally filtered by gatewayId query param.

func (*GatewayHandler) ListCustomPolicies

func (h *GatewayHandler) ListCustomPolicies(w http.ResponseWriter, r *http.Request) error

ListCustomPolicies handles GET /api/v0.9/gateway-custom-policies

func (*GatewayHandler) ListGateways

func (h *GatewayHandler) ListGateways(w http.ResponseWriter, r *http.Request) error

ListGateways handles GET /api/v0.9/gateways with constitution-compliant response

func (*GatewayHandler) ListTokens

func (h *GatewayHandler) ListTokens(w http.ResponseWriter, r *http.Request) error

ListTokens handles GET /api/v0.9/gateways/:gatewayId/tokens

func (*GatewayHandler) RegisterRoutes

func (h *GatewayHandler) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers gateway routes with the router

func (*GatewayHandler) RevokeToken

func (h *GatewayHandler) RevokeToken(w http.ResponseWriter, r *http.Request) error

RevokeToken handles DELETE /api/v0.9/gateways/:gatewayId/tokens/:tokenId

func (*GatewayHandler) RotateToken

func (h *GatewayHandler) RotateToken(w http.ResponseWriter, r *http.Request) error

RotateToken handles POST /api/v0.9/gateways/:gatewayId/tokens

func (*GatewayHandler) SyncCustomPolicy

func (h *GatewayHandler) SyncCustomPolicy(w http.ResponseWriter, r *http.Request) error

SyncCustomPolicy handles POST /api/v0.9/gateway-custom-policies/sync It upserts a custom policy from the gateway's stored manifest into the gateway_custom_policies table.

func (*GatewayHandler) UpdateGateway

func (h *GatewayHandler) UpdateGateway(w http.ResponseWriter, r *http.Request) error

UpdateGateway handles PUT /api/v0.9/gateways/:gatewayId

type GatewayInternalAPIHandler

type GatewayInternalAPIHandler struct {
	// contains filtered or unexported fields
}

func NewGatewayInternalAPIHandler

func NewGatewayInternalAPIHandler(gatewayService *service.GatewayService,
	gatewayInternalService *service.GatewayInternalAPIService,
	artifactImportService *service.ArtifactImportService,
	secretService *service.SecretService,
	slogger *slog.Logger) *GatewayInternalAPIHandler

func (*GatewayInternalAPIHandler) BatchFetchDeployments

func (h *GatewayInternalAPIHandler) BatchFetchDeployments(w http.ResponseWriter, r *http.Request)

BatchFetchDeployments handles POST /api/internal/v1/deployments/fetch-batch Fetches multiple deployment artifacts in a single request for gateway startup sync

func (*GatewayInternalAPIHandler) CheckArtifactsExist

func (h *GatewayInternalAPIHandler) CheckArtifactsExist(w http.ResponseWriter, r *http.Request)

CheckArtifactsExist handles POST /api/internal/v1/artifacts/exists Returns the subset of provided artifact UUIDs that still exist on the platform. Used by the gateway during sync to avoid deleting artifacts that still exist but have no active deployment (e.g., after deployment deletion).

func (*GatewayInternalAPIHandler) GetAPI

GetAPI handles GET /api/internal/v1/apis/:apiId

func (*GatewayInternalAPIHandler) GetGatewayDeployments

func (h *GatewayInternalAPIHandler) GetGatewayDeployments(w http.ResponseWriter, r *http.Request)

GetGatewayDeployments handles GET /api/internal/v1/deployments Returns the list of deployments that should be active on a gateway for startup sync

func (*GatewayInternalAPIHandler) GetGatewaySecretValue

func (h *GatewayInternalAPIHandler) GetGatewaySecretValue(w http.ResponseWriter, r *http.Request)

GetGatewaySecretValue handles GET /api/internal/v1/secrets/{handle}/value Returns the decrypted plaintext value of a secret. Called by the GW controller only when the secret's hash has changed, minimising decryption calls. Authenticated via gateway api-key — no JWT required.

func (*GatewayInternalAPIHandler) GetGatewaySecrets

func (h *GatewayInternalAPIHandler) GetGatewaySecrets(w http.ResponseWriter, r *http.Request)

GetGatewaySecrets handles GET /api/internal/v1/secrets Returns secret metadata for secrets referenced by this gateway's deployed artifacts. Supports ?updatedAfter=<RFC3339> for incremental sync. Supports ?includeValues=true for startup bulk fetch — decrypts all secrets server-side and returns plaintext values in a single response, avoiding N per-secret round trips.

func (*GatewayInternalAPIHandler) GetLLMProvider

func (h *GatewayInternalAPIHandler) GetLLMProvider(w http.ResponseWriter, r *http.Request)

GetLLMProvider handles GET /api/internal/v1/llm-providers/:providerId

func (*GatewayInternalAPIHandler) GetLLMProviderAPIKeys

func (h *GatewayInternalAPIHandler) GetLLMProviderAPIKeys(w http.ResponseWriter, r *http.Request)

GetLLMProviderAPIKeys handles GET /api/internal/v1/llm-providers/api-keys

func (*GatewayInternalAPIHandler) GetLLMProxy

GetLLMProxy handles GET /api/internal/v1/llm-proxies/:proxyId

func (*GatewayInternalAPIHandler) GetLLMProxyAPIKeys

func (h *GatewayInternalAPIHandler) GetLLMProxyAPIKeys(w http.ResponseWriter, r *http.Request)

GetLLMProxyAPIKeys handles GET /api/internal/v1/llm-proxies/api-keys

func (*GatewayInternalAPIHandler) GetMCPProxy

GetMCPProxy handles GET /api/internal/v1/mcp-proxies/:proxyId

func (*GatewayInternalAPIHandler) GetRestAPIAPIKeys

func (h *GatewayInternalAPIHandler) GetRestAPIAPIKeys(w http.ResponseWriter, r *http.Request)

GetRestAPIAPIKeys handles GET /api/internal/v1/apis/api-keys

func (*GatewayInternalAPIHandler) GetSubscriptionPlans

func (h *GatewayInternalAPIHandler) GetSubscriptionPlans(w http.ResponseWriter, r *http.Request)

GetSubscriptionPlans handles GET /api/internal/v1/subscription-plans

func (*GatewayInternalAPIHandler) GetSubscriptions

func (h *GatewayInternalAPIHandler) GetSubscriptions(w http.ResponseWriter, r *http.Request)

GetSubscriptions handles GET /api/internal/v1/apis/:apiId/subscriptions

func (*GatewayInternalAPIHandler) GetWebBrokerAPI

func (h *GatewayInternalAPIHandler) GetWebBrokerAPI(w http.ResponseWriter, r *http.Request)

GetWebBrokerAPI handles GET /api/internal/v1/webbroker-apis/:apiId

func (*GatewayInternalAPIHandler) GetWebBrokerAPIAPIKeys

func (h *GatewayInternalAPIHandler) GetWebBrokerAPIAPIKeys(w http.ResponseWriter, r *http.Request)

GetWebBrokerAPIAPIKeys handles GET /api/internal/v1/webbroker-apis/api-keys

func (*GatewayInternalAPIHandler) GetWebSubAPI

func (h *GatewayInternalAPIHandler) GetWebSubAPI(w http.ResponseWriter, r *http.Request)

GetWebSubAPI handles GET /api/internal/v1/websub-apis/:apiId

func (*GatewayInternalAPIHandler) GetWebSubAPIAPIKeys

func (h *GatewayInternalAPIHandler) GetWebSubAPIAPIKeys(w http.ResponseWriter, r *http.Request)

GetWebSubAPIAPIKeys handles GET /api/internal/v1/websub-apis/api-keys

func (*GatewayInternalAPIHandler) GetWebSubAPIHmacSecrets

func (h *GatewayInternalAPIHandler) GetWebSubAPIHmacSecrets(w http.ResponseWriter, r *http.Request)

GetWebSubAPIHmacSecrets handles GET /api/internal/v1/websub-apis/:apiId/secrets Returns decrypted plaintext HMAC secrets for the gateway-controller to load into its webhook secret store.

func (*GatewayInternalAPIHandler) ImportGatewayArtifacts

func (h *GatewayInternalAPIHandler) ImportGatewayArtifacts(w http.ResponseWriter, r *http.Request)

ImportGatewayArtifacts handles POST /api/internal/v1/artifacts/import-gateway-artifacts. It is the generic bulk DP->CP push endpoint. The request is multipart/form-data with an "artifacts" zip part (containing the artifacts.json file — a JSON array of ImportGatewayArtifactRequest) and an advisory "total" field. The control plane creates or updates each artifact (read-only, origin "gateway_api") in dependency order and is continue-on-error: a failure on one artifact is recorded against its dpid and does not abort the rest. The response maps each artifact's dpid to its result, with total/success/ failed counts. Only a malformed request (bad multipart/zip) returns a non-200.

func (*GatewayInternalAPIHandler) ReceiveGatewayManifest

func (h *GatewayInternalAPIHandler) ReceiveGatewayManifest(w http.ResponseWriter, r *http.Request)

ReceiveGatewayManifest handles POST /api/internal/v1/gateways/:gatewayId/manifest Called by the gateway controller to post back its installed custom policy manifest.

func (*GatewayInternalAPIHandler) RegisterRoutes

func (h *GatewayInternalAPIHandler) RegisterRoutes(mux *http.ServeMux)

func (*GatewayInternalAPIHandler) SetHmacSecretService

func (h *GatewayInternalAPIHandler) SetHmacSecretService(svc hmacSecretDecrypter)

SetHmacSecretService wires in the HMAC secret service. Called by the server after the event-gateway plugin is initialized (experimental builds only).

type LLMHandler

type LLMHandler struct {
	// contains filtered or unexported fields
}

func NewLLMHandler

func NewLLMHandler(
	templateService *service.LLMProviderTemplateService,
	providerService *service.LLMProviderService,
	proxyService *service.LLMProxyService,
	identity *service.IdentityService,
	slogger *slog.Logger,
) *LLMHandler

func (*LLMHandler) CopyLLMProviderTemplateVersion

func (h *LLMHandler) CopyLLMProviderTemplateVersion(w http.ResponseWriter, r *http.Request) error

CopyLLMProviderTemplateVersion creates a new version within a family by cloning an existing version. The source version, the derived destination handle and the new version are given as query params (fromTemplateId, toTemplateId, toVersion); an optional body overrides fields on top of the copied config.

func (*LLMHandler) CreateLLMProvider

func (h *LLMHandler) CreateLLMProvider(w http.ResponseWriter, r *http.Request) error

func (*LLMHandler) CreateLLMProviderTemplate

func (h *LLMHandler) CreateLLMProviderTemplate(w http.ResponseWriter, r *http.Request) error

func (*LLMHandler) CreateLLMProxy

func (h *LLMHandler) CreateLLMProxy(w http.ResponseWriter, r *http.Request) error

func (*LLMHandler) DeleteLLMProvider

func (h *LLMHandler) DeleteLLMProvider(w http.ResponseWriter, r *http.Request) error

func (*LLMHandler) DeleteLLMProviderTemplateVersion

func (h *LLMHandler) DeleteLLMProviderTemplateVersion(w http.ResponseWriter, r *http.Request) error

DeleteLLMProviderTemplateVersion removes a single version of a template.

func (*LLMHandler) DeleteLLMProxy

func (h *LLMHandler) DeleteLLMProxy(w http.ResponseWriter, r *http.Request) error

func (*LLMHandler) GetLLMProvider

func (h *LLMHandler) GetLLMProvider(w http.ResponseWriter, r *http.Request) error

func (*LLMHandler) GetLLMProviderTemplate

func (h *LLMHandler) GetLLMProviderTemplate(w http.ResponseWriter, r *http.Request) error

func (*LLMHandler) GetLLMProxy

func (h *LLMHandler) GetLLMProxy(w http.ResponseWriter, r *http.Request) error

func (*LLMHandler) ListLLMProviderTemplates

func (h *LLMHandler) ListLLMProviderTemplates(w http.ResponseWriter, r *http.Request) error

func (*LLMHandler) ListLLMProviders

func (h *LLMHandler) ListLLMProviders(w http.ResponseWriter, r *http.Request) error

func (*LLMHandler) ListLLMProxies

func (h *LLMHandler) ListLLMProxies(w http.ResponseWriter, r *http.Request) error

func (*LLMHandler) ListLLMProxiesByProvider

func (h *LLMHandler) ListLLMProxiesByProvider(w http.ResponseWriter, r *http.Request) error

func (*LLMHandler) RegisterRoutes

func (h *LLMHandler) RegisterRoutes(mux *http.ServeMux)

func (*LLMHandler) SetLLMProviderTemplateVersionEnabled

func (h *LLMHandler) SetLLMProviderTemplateVersionEnabled(w http.ResponseWriter, r *http.Request) error

func (*LLMHandler) UpdateLLMProvider

func (h *LLMHandler) UpdateLLMProvider(w http.ResponseWriter, r *http.Request) error

func (*LLMHandler) UpdateLLMProviderTemplate

func (h *LLMHandler) UpdateLLMProviderTemplate(w http.ResponseWriter, r *http.Request) error

func (*LLMHandler) UpdateLLMProxy

func (h *LLMHandler) UpdateLLMProxy(w http.ResponseWriter, r *http.Request) error

type LLMProviderAPIKeyHandler

type LLMProviderAPIKeyHandler struct {
	// contains filtered or unexported fields
}

LLMProviderAPIKeyHandler handles API key operations for LLM providers

func NewLLMProviderAPIKeyHandler

func NewLLMProviderAPIKeyHandler(apiKeyService *service.LLMProviderAPIKeyService, identity *service.IdentityService, slogger *slog.Logger) *LLMProviderAPIKeyHandler

NewLLMProviderAPIKeyHandler creates a new LLM provider API key handler

func (*LLMProviderAPIKeyHandler) CreateAPIKey

CreateAPIKey handles POST /api/v0.9/llm-providers/{llmProviderId}/api-keys

func (*LLMProviderAPIKeyHandler) DeleteAPIKey

DeleteAPIKey handles DELETE /api/v0.9/llm-providers/{llmProviderId}/api-keys/{apiKeyId}

func (*LLMProviderAPIKeyHandler) ListAPIKeys

ListAPIKeys handles GET /api/v0.9/llm-providers/{llmProviderId}/api-keys

func (*LLMProviderAPIKeyHandler) RegisterRoutes

func (h *LLMProviderAPIKeyHandler) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers LLM provider API key routes with the router

type LLMProviderDeploymentHandler

type LLMProviderDeploymentHandler struct {
	// contains filtered or unexported fields
}

LLMProviderDeploymentHandler handles LLM provider deployment endpoints using the shared deployment model.

func NewLLMProviderDeploymentHandler

func NewLLMProviderDeploymentHandler(deploymentService *service.LLMProviderDeploymentService, slogger *slog.Logger) *LLMProviderDeploymentHandler

func (*LLMProviderDeploymentHandler) DeleteLLMProviderDeployment

func (h *LLMProviderDeploymentHandler) DeleteLLMProviderDeployment(w http.ResponseWriter, r *http.Request) error

DeleteLLMProviderDeployment handles DELETE /api/v0.9/llm-providers/{llmProviderId}/deployments/{deploymentId}

func (*LLMProviderDeploymentHandler) DeployLLMProvider

func (h *LLMProviderDeploymentHandler) DeployLLMProvider(w http.ResponseWriter, r *http.Request) error

DeployLLMProvider handles POST /api/v0.9/llm-providers/{llmProviderId}/deployments

func (*LLMProviderDeploymentHandler) GetLLMProviderDeployment

func (h *LLMProviderDeploymentHandler) GetLLMProviderDeployment(w http.ResponseWriter, r *http.Request) error

GetLLMProviderDeployment handles GET /api/v0.9/llm-providers/{llmProviderId}/deployments/{deploymentId}

func (*LLMProviderDeploymentHandler) GetLLMProviderDeployments

func (h *LLMProviderDeploymentHandler) GetLLMProviderDeployments(w http.ResponseWriter, r *http.Request) error

GetLLMProviderDeployments handles GET /api/v0.9/llm-providers/{llmProviderId}/deployments

func (*LLMProviderDeploymentHandler) RegisterRoutes

func (h *LLMProviderDeploymentHandler) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers all LLM provider deployment-related routes

func (*LLMProviderDeploymentHandler) RestoreLLMProviderDeployment

func (h *LLMProviderDeploymentHandler) RestoreLLMProviderDeployment(w http.ResponseWriter, r *http.Request) error

RestoreLLMProviderDeployment handles POST /api/v0.9/llm-providers/{llmProviderId}/deployments/{deploymentId}/restore

func (*LLMProviderDeploymentHandler) UndeployLLMProviderDeployment

func (h *LLMProviderDeploymentHandler) UndeployLLMProviderDeployment(w http.ResponseWriter, r *http.Request) error

UndeployLLMProviderDeployment handles POST /api/v0.9/llm-providers/{llmProviderId}/deployments/{deploymentId}/undeploy

type LLMProxyAPIKeyHandler

type LLMProxyAPIKeyHandler struct {
	// contains filtered or unexported fields
}

LLMProxyAPIKeyHandler handles API key operations for LLM proxies

func NewLLMProxyAPIKeyHandler

func NewLLMProxyAPIKeyHandler(apiKeyService *service.LLMProxyAPIKeyService, identity *service.IdentityService, slogger *slog.Logger) *LLMProxyAPIKeyHandler

NewLLMProxyAPIKeyHandler creates a new LLM proxy API key handler

func (*LLMProxyAPIKeyHandler) CreateAPIKey

func (h *LLMProxyAPIKeyHandler) CreateAPIKey(w http.ResponseWriter, r *http.Request) error

CreateAPIKey handles POST /api/v0.9/llm-proxies/{llmProxyId}/api-keys

func (*LLMProxyAPIKeyHandler) DeleteAPIKey

func (h *LLMProxyAPIKeyHandler) DeleteAPIKey(w http.ResponseWriter, r *http.Request) error

DeleteAPIKey handles DELETE /api/v0.9/llm-proxies/{llmProxyId}/api-keys/{apiKeyId}

func (*LLMProxyAPIKeyHandler) ListAPIKeys

ListAPIKeys handles GET /api/v0.9/llm-proxies/{llmProxyId}/api-keys

func (*LLMProxyAPIKeyHandler) RegisterRoutes

func (h *LLMProxyAPIKeyHandler) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers LLM proxy API key routes with the router

type LLMProxyDeploymentHandler

type LLMProxyDeploymentHandler struct {
	// contains filtered or unexported fields
}

LLMProxyDeploymentHandler handles LLM proxy deployment endpoints using the shared deployment model.

func NewLLMProxyDeploymentHandler

func NewLLMProxyDeploymentHandler(deploymentService *service.LLMProxyDeploymentService, slogger *slog.Logger) *LLMProxyDeploymentHandler

func (*LLMProxyDeploymentHandler) DeleteLLMProxyDeployment

func (h *LLMProxyDeploymentHandler) DeleteLLMProxyDeployment(w http.ResponseWriter, r *http.Request) error

DeleteLLMProxyDeployment handles DELETE /api/v0.9/llm-proxies/{llmProxyId}/deployments/{deploymentId}

func (*LLMProxyDeploymentHandler) DeployLLMProxy

DeployLLMProxy handles POST /api/v0.9/llm-proxies/{llmProxyId}/deployments

func (*LLMProxyDeploymentHandler) GetLLMProxyDeployment

func (h *LLMProxyDeploymentHandler) GetLLMProxyDeployment(w http.ResponseWriter, r *http.Request) error

GetLLMProxyDeployment handles GET /api/v0.9/llm-proxies/{llmProxyId}/deployments/{deploymentId}

func (*LLMProxyDeploymentHandler) GetLLMProxyDeployments

func (h *LLMProxyDeploymentHandler) GetLLMProxyDeployments(w http.ResponseWriter, r *http.Request) error

GetLLMProxyDeployments handles GET /api/v0.9/llm-proxies/{llmProxyId}/deployments

func (*LLMProxyDeploymentHandler) RegisterRoutes

func (h *LLMProxyDeploymentHandler) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers all LLM proxy deployment-related routes

func (*LLMProxyDeploymentHandler) RestoreLLMProxyDeployment

func (h *LLMProxyDeploymentHandler) RestoreLLMProxyDeployment(w http.ResponseWriter, r *http.Request) error

RestoreLLMProxyDeployment handles POST /api/v0.9/llm-proxies/{llmProxyId}/deployments/{deploymentId}/restore

func (*LLMProxyDeploymentHandler) UndeployLLMProxyDeployment

func (h *LLMProxyDeploymentHandler) UndeployLLMProxyDeployment(w http.ResponseWriter, r *http.Request) error

UndeployLLMProxyDeployment handles POST /api/v0.9/llm-proxies/{llmProxyId}/deployments/{deploymentId}/undeploy

type MCPProxyDeploymentHandler

type MCPProxyDeploymentHandler struct {
	// contains filtered or unexported fields
}

MCPProxyDeploymentHandler handles MCP proxy deployment endpoints

func NewMCPProxyDeploymentHandler

func NewMCPProxyDeploymentHandler(deploymentService *service.MCPDeploymentService, identity *service.IdentityService, slogger *slog.Logger) *MCPProxyDeploymentHandler

NewMCPProxyDeploymentHandler creates a new MCP proxy deployment handler

func (*MCPProxyDeploymentHandler) DeleteMCPProxyDeployment

func (h *MCPProxyDeploymentHandler) DeleteMCPProxyDeployment(w http.ResponseWriter, r *http.Request) error

DeleteMCPProxyDeployment handles DELETE /api/v0.9/mcp-proxies/:id/deployments/:deploymentId

func (*MCPProxyDeploymentHandler) DeployMCPProxy

DeployMCPProxy handles POST /api/v0.9/mcp-proxies/:id/deployments

func (*MCPProxyDeploymentHandler) GetMCPProxyDeployment

func (h *MCPProxyDeploymentHandler) GetMCPProxyDeployment(w http.ResponseWriter, r *http.Request) error

GetMCPProxyDeployment handles GET /api/v0.9/mcp-proxies/:id/deployments/:deploymentId

func (*MCPProxyDeploymentHandler) GetMCPProxyDeployments

func (h *MCPProxyDeploymentHandler) GetMCPProxyDeployments(w http.ResponseWriter, r *http.Request) error

GetMCPProxyDeployments handles GET /api/v0.9/mcp-proxies/:id/deployments

func (*MCPProxyDeploymentHandler) RegisterRoutes

func (h *MCPProxyDeploymentHandler) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers all MCP proxy deployment-related routes

func (*MCPProxyDeploymentHandler) RestoreMCPProxyDeployment

func (h *MCPProxyDeploymentHandler) RestoreMCPProxyDeployment(w http.ResponseWriter, r *http.Request) error

RestoreMCPProxyDeployment handles POST /api/v0.9/mcp-proxies/:id/deployments/:deploymentId/restore

func (*MCPProxyDeploymentHandler) UndeployMCPProxyDeployment

func (h *MCPProxyDeploymentHandler) UndeployMCPProxyDeployment(w http.ResponseWriter, r *http.Request) error

UndeployMCPProxyDeployment handles POST /api/v0.9/mcp-proxies/:id/deployments/:deploymentId/undeploy

type MCPProxyHandler

type MCPProxyHandler struct {
	// contains filtered or unexported fields
}

func NewMCPProxyHandler

func NewMCPProxyHandler(service *service.MCPProxyService, identity *service.IdentityService, slogger *slog.Logger) *MCPProxyHandler

func (*MCPProxyHandler) CreateMCPProxy

func (h *MCPProxyHandler) CreateMCPProxy(w http.ResponseWriter, r *http.Request) error

CreateMCPProxy handles POST /api/v0.9/mcp-proxies

func (*MCPProxyHandler) DeleteMCPProxy

func (h *MCPProxyHandler) DeleteMCPProxy(w http.ResponseWriter, r *http.Request) error

DeleteMCPProxy handles DELETE /api/v0.9/mcp-proxies/:id

func (*MCPProxyHandler) FetchMCPProxyServerInfo

func (h *MCPProxyHandler) FetchMCPProxyServerInfo(w http.ResponseWriter, r *http.Request) error

FetchMCPProxyServerInfo handles POST /api/v0.9/mcp-proxies/fetch-server-info

func (*MCPProxyHandler) GetMCPProxy

func (h *MCPProxyHandler) GetMCPProxy(w http.ResponseWriter, r *http.Request) error

GetMCPProxy handles GET /api/v0.9/mcp-proxies/:id

func (*MCPProxyHandler) ListMCPProxies

func (h *MCPProxyHandler) ListMCPProxies(w http.ResponseWriter, r *http.Request) error

ListMCPProxies handles GET /api/v0.9/mcp-proxies

func (*MCPProxyHandler) RegisterRoutes

func (h *MCPProxyHandler) RegisterRoutes(mux *http.ServeMux)

func (*MCPProxyHandler) UpdateMCPProxy

func (h *MCPProxyHandler) UpdateMCPProxy(w http.ResponseWriter, r *http.Request) error

UpdateMCPProxy handles PUT /api/v0.9/mcp-proxies/:id

type OrganizationHandler

type OrganizationHandler struct {
	// contains filtered or unexported fields
}

func NewOrganizationHandler

func NewOrganizationHandler(orgService *service.OrganizationService, identity *service.IdentityService, slogger *slog.Logger) *OrganizationHandler

func (*OrganizationHandler) GetOrganizationByID

func (h *OrganizationHandler) GetOrganizationByID(w http.ResponseWriter, r *http.Request) error

GetOrganizationByID handles GET /api/v0.9/organizations/{organizationId}

func (*OrganizationHandler) HeadOrganization

func (h *OrganizationHandler) HeadOrganization(w http.ResponseWriter, r *http.Request) error

HeadOrganization handles HEAD /api/v0.9/organizations/{organizationId}

func (*OrganizationHandler) ListOrganizations

func (h *OrganizationHandler) ListOrganizations(w http.ResponseWriter, r *http.Request) error

ListOrganizations handles GET /api/v0.9/organizations

func (*OrganizationHandler) RegisterOrganization

func (h *OrganizationHandler) RegisterOrganization(w http.ResponseWriter, r *http.Request) error

RegisterOrganization handles POST /api/v0.9/organizations

func (*OrganizationHandler) RegisterRoutes

func (h *OrganizationHandler) RegisterRoutes(mux *http.ServeMux)

type ProjectHandler

type ProjectHandler struct {
	// contains filtered or unexported fields
}

func NewProjectHandler

func NewProjectHandler(projectService *service.ProjectService, identity *service.IdentityService, slogger *slog.Logger) *ProjectHandler

func (*ProjectHandler) CreateProject

func (h *ProjectHandler) CreateProject(w http.ResponseWriter, r *http.Request) error

CreateProject handles POST /api/v0.9/projects

func (*ProjectHandler) DeleteProject

func (h *ProjectHandler) DeleteProject(w http.ResponseWriter, r *http.Request) error

DeleteProject handles DELETE /api/v0.9/projects/:projectId

func (*ProjectHandler) GetProject

func (h *ProjectHandler) GetProject(w http.ResponseWriter, r *http.Request) error

GetProject handles GET /api/v0.9/projects/:projectId

func (*ProjectHandler) ListProjects

func (h *ProjectHandler) ListProjects(w http.ResponseWriter, r *http.Request) error

ListProjects handles GET /api/v0.9/projects

func (*ProjectHandler) RegisterRoutes

func (h *ProjectHandler) RegisterRoutes(mux *http.ServeMux)

func (*ProjectHandler) UpdateProject

func (h *ProjectHandler) UpdateProject(w http.ResponseWriter, r *http.Request) error

UpdateProject handles PUT /api/v0.9/projects/:projectId

type SecretHandler

type SecretHandler struct {
	// contains filtered or unexported fields
}

func NewSecretHandler

func NewSecretHandler(secretService *service.SecretService, identity *service.IdentityService, slogger *slog.Logger) *SecretHandler

func (*SecretHandler) CreateSecret

func (h *SecretHandler) CreateSecret(w http.ResponseWriter, r *http.Request) error

func (*SecretHandler) DeleteSecret

func (h *SecretHandler) DeleteSecret(w http.ResponseWriter, r *http.Request) error

func (*SecretHandler) GetSecret

func (h *SecretHandler) GetSecret(w http.ResponseWriter, r *http.Request) error

func (*SecretHandler) ListSecrets

func (h *SecretHandler) ListSecrets(w http.ResponseWriter, r *http.Request) error

func (*SecretHandler) RegisterRoutes

func (h *SecretHandler) RegisterRoutes(mux *http.ServeMux)

func (*SecretHandler) UpdateSecret

func (h *SecretHandler) UpdateSecret(w http.ResponseWriter, r *http.Request) error

type SubscriptionHandler

type SubscriptionHandler struct {
	// contains filtered or unexported fields
}

SubscriptionHandler handles application-level subscription CRUD

func NewSubscriptionHandler

func NewSubscriptionHandler(subscriptionService *service.SubscriptionService, subscriptionPlanService *service.SubscriptionPlanService, identity *service.IdentityService, slogger *slog.Logger) *SubscriptionHandler

NewSubscriptionHandler creates a new subscription handler

func (*SubscriptionHandler) CreateSubscription

func (h *SubscriptionHandler) CreateSubscription(w http.ResponseWriter, r *http.Request) error

CreateSubscription handles POST /api/v0.9/subscriptions

func (*SubscriptionHandler) DeleteSubscription

func (h *SubscriptionHandler) DeleteSubscription(w http.ResponseWriter, r *http.Request) error

DeleteSubscription handles DELETE /api/v0.9/subscriptions/:subscriptionId

func (*SubscriptionHandler) GetSubscription

func (h *SubscriptionHandler) GetSubscription(w http.ResponseWriter, r *http.Request) error

GetSubscription handles GET /api/v0.9/subscriptions/:subscriptionId

func (*SubscriptionHandler) ListSubscriptions

func (h *SubscriptionHandler) ListSubscriptions(w http.ResponseWriter, r *http.Request) error

ListSubscriptions handles GET /api/v0.9/subscriptions

func (*SubscriptionHandler) RegisterRoutes

func (h *SubscriptionHandler) RegisterRoutes(mux *http.ServeMux)

func (*SubscriptionHandler) UpdateSubscription

func (h *SubscriptionHandler) UpdateSubscription(w http.ResponseWriter, r *http.Request) error

UpdateSubscription handles PUT /api/v0.9/subscriptions/:subscriptionId

type SubscriptionPlanHandler

type SubscriptionPlanHandler struct {
	// contains filtered or unexported fields
}

SubscriptionPlanHandler handles subscription plan CRUD

func NewSubscriptionPlanHandler

func NewSubscriptionPlanHandler(planService *service.SubscriptionPlanService, identity *service.IdentityService, slogger *slog.Logger) *SubscriptionPlanHandler

NewSubscriptionPlanHandler creates a new subscription plan handler

func (*SubscriptionPlanHandler) CreateSubscriptionPlan

func (h *SubscriptionPlanHandler) CreateSubscriptionPlan(w http.ResponseWriter, r *http.Request) error

CreateSubscriptionPlan handles POST /api/v0.9/subscription-plans

func (*SubscriptionPlanHandler) DeleteSubscriptionPlan

func (h *SubscriptionPlanHandler) DeleteSubscriptionPlan(w http.ResponseWriter, r *http.Request) error

DeleteSubscriptionPlan handles DELETE /api/v0.9/subscription-plans/:planId

func (*SubscriptionPlanHandler) GetSubscriptionPlan

func (h *SubscriptionPlanHandler) GetSubscriptionPlan(w http.ResponseWriter, r *http.Request) error

GetSubscriptionPlan handles GET /api/v0.9/subscription-plans/:planId

func (*SubscriptionPlanHandler) ListSubscriptionPlans

func (h *SubscriptionPlanHandler) ListSubscriptionPlans(w http.ResponseWriter, r *http.Request) error

ListSubscriptionPlans handles GET /api/v0.9/subscription-plans

func (*SubscriptionPlanHandler) RegisterRoutes

func (h *SubscriptionPlanHandler) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers subscription plan routes

func (*SubscriptionPlanHandler) UpdateSubscriptionPlan

func (h *SubscriptionPlanHandler) UpdateSubscriptionPlan(w http.ResponseWriter, r *http.Request) error

UpdateSubscriptionPlan handles PUT /api/v0.9/subscription-plans/:planId

type SubscriptionPlanLimitRequest

type SubscriptionPlanLimitRequest struct {
	LimitType        string `json:"limitType,omitempty"`
	TimeUnit         string `json:"timeUnit"`
	TimeAmount       int    `json:"timeAmount,omitempty"`
	LimitCount       int    `json:"limitCount"`
	LimitCountUnit   string `json:"limitCountUnit,omitempty"`
	StopOnQuotaReach *bool  `json:"stopOnQuotaReach,omitempty"`
}

SubscriptionPlanLimitRequest is a single throttling limit entry within a subscription plan create/update request.

NOTE: SINGLE-LIMIT ASSUMPTION. subscription_plan_limits supports multiple limits per plan, but the platform-api currently only persists and enforces the first entry of the limits array on a request; any further entries are accepted but silently ignored. This must be improved to write/enforce all submitted limits.

type WebSocketHandler

type WebSocketHandler struct {
	// contains filtered or unexported fields
}

WebSocketHandler handles WebSocket connection upgrades and lifecycle

func NewWebSocketHandler

func NewWebSocketHandler(manager *ws.Manager, gatewayService *service.GatewayService, deploymentService *service.DeploymentService, rateLimitCount int, slogger *slog.Logger) *WebSocketHandler

NewWebSocketHandler creates a new WebSocket handler

func (*WebSocketHandler) Connect

Connect handles WebSocket upgrade requests at /api/internal/v1/ws/gateways/connect This is the entry point for gateway connections.

func (*WebSocketHandler) RegisterRoutes

func (h *WebSocketHandler) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers WebSocket routes with the mux.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL