Versions in this module Expand all Collapse all v0 v0.11.2 Jul 10, 2026 Changes in this version + const TemplateManagedByOrganization v0.11.1 Jul 8, 2026 Changes in this version + const APIBasePath + const APIKeyAllowedTargetsAll + const APIKeyStatusActive + const APIKeyStatusRevoked + const APISubTypeAsync + const APISubTypeGraphQL + const APISubTypeHTTP + const APISubTypeSOAP + const APISubTypeWebSocket + const APITypeAsync + const APITypeGraphQL + const APITypeHTTP + const APITypeSOAP + const APITypeSOAPToREST + const APITypeSSE + const APITypeWS + const APITypeWebSub + const APITypeWebhook + const APIVersion + const AdminRole + const AssociationTypeGateway + const DefaultGatewayFunctionalityType + const DeletedUser + const DeploymentLimitBuffer + const GatewayApiVersion + const GatewayApiVersionV1Alpha1 + const GatewayFunctionalityTypeAI + const GatewayFunctionalityTypeEvent + const GatewayFunctionalityTypeRegular + const GatewayTokenStatusActive + const GatewayTokenStatusRevoked + const LLMProvider + const LLMProviderTemplate + const LLMProxy + const LimitTypeBandwidth + const LimitTypeRequestCount + const LimitTypeTotalToken + const MCPProxy + const MetadataKeyEndpointUrl + const MetadataKeyVhostMain + const MetadataKeyVhostSandbox + const OriginCP + const OriginDP + const PolicyManagedByCustomer + const PolicyManagedByWSO2 + const RestApi + const ThrottleLimitUnitDay + const ThrottleLimitUnitHour + const ThrottleLimitUnitMinute + const ThrottleLimitUnitMonth + const VhostGatewayDefault + const WebBrokerApi + const WebSubApi + var ErrAPIAlreadyExists = errors.New("api already exists in project") + var ErrAPIContextVersionConflict = errors.New("api with same context and version already deployed in gateway") + var ErrAPIKeyAlreadyExists = errors.New("api key already exists") + var ErrAPIKeyEventDelivery = errors.New("failed to deliver api key event to gateway") + var ErrAPIKeyForbidden = errors.New("forbidden: only the key creator can perform this action") + var ErrAPIKeyHashingFailed = errors.New("failed to hash api key") + var ErrAPIKeyNotFound = errors.New("api key not found") + var ErrAPINameVersionAlreadyExists = errors.New("api with same name and version already exists") + var ErrAPINoBackendServices = errors.New("API must have at least one backend service attached before deployment") + var ErrAPINotFound = errors.New("api not found") + var ErrAPIProjectNotFound = errors.New("api project not found") + var ErrApplicationExists = errors.New("application already exists in project") + var ErrApplicationNotFound = errors.New("application not found") + var ErrArtifactDeployed = errors.New("artifact is still deployed on a gateway and cannot be deleted") + var ErrArtifactExists = errors.New("artifact already exists") + var ErrArtifactInvalidKind = errors.New("invalid artifact kind") + var ErrArtifactNotFound = errors.New("artifact not found") + var ErrArtifactReadOnly = errors.New("artifact is read-only: it originated from a data-plane gateway") + var ErrArtifactRuntimeImmutable = errors.New(...) + var ErrBaseDeploymentNotFound = errors.New("base deployment not found") + var ErrConfigFileNotFound = errors.New("API Project config file not found") + var ErrCustomPolicyInUse = errors.New("custom policy is in use by one or more APIs") + var ErrCustomPolicyNotFound = errors.New("custom policy not found") + var ErrCustomPolicyVersionMismatch = errors.New("custom policy version does not match") + var ErrDeploymentAlreadyActive = errors.New("deployment is already active") + var ErrDeploymentAlreadyDeployed = errors.New("cannot restore to the currently deployed deployment") + var ErrDeploymentBaseRequired = errors.New("base is required") + var ErrDeploymentGatewayIDRequired = errors.New("gatewayId is required") + var ErrDeploymentIsDeployed = errors.New("cannot delete an active deployment - undeploy it first") + var ErrDeploymentNameRequired = errors.New("deployment name is required") + var ErrDeploymentNotActive = errors.New("no active deployment found for this API on the gateway") + var ErrDeploymentNotFound = errors.New("deployment not found") + var ErrDevPortalNotFound = errors.New("dev portal not found") + var ErrGatewayAlreadyAssociated = errors.New("gateway already associated with API") + var ErrGatewayFunctionalityTypeMismatch = errors.New("gateway functionality type mismatch") + var ErrGatewayHasAssociatedAPIs = errors.New(...) + var ErrGatewayHasDeployments = errors.New(...) + var ErrGatewayIDMismatch = errors.New("gateway ID mismatch: deployment is bound to a different gateway") + var ErrGatewayNotAssociated = errors.New("api is not associated with gateway") + var ErrGatewayNotFound = errors.New("gateway not found") + var ErrGatewayUnavailable = errors.New("gateway unavailable") + var ErrGatewayVersionMismatch = errors.New("gateway version mismatch") + var ErrHandleDoesNotExist = errors.New("handle does not exist") + var ErrHandleEmpty = errors.New("handle cannot be empty") + var ErrHandleExists = errors.New("handle already exists") + var ErrHandleGenerationFailed = errors.New("failed to generate unique handle after maximum retries") + var ErrHandleImmutable = errors.New("id is immutable and cannot be changed") + var ErrHandleSourceEmpty = errors.New("source string cannot be empty for handle generation") + var ErrHandleTooLong = errors.New("handle must be at most 63 characters") + var ErrHandleTooShort = errors.New("handle must be at least 3 characters") + var ErrHmacSecretAlreadyExists = errors.New("hmac secret with this name already exists") + var ErrHmacSecretEncryptionKeyMissing = errors.New("hmac secret encryption key is not configured") + var ErrHmacSecretInvalidValue = errors.New("secret value must be at least 32 characters") + var ErrHmacSecretNotFound = errors.New("hmac secret not found") + var ErrInvalidAPIContext = errors.New("invalid api context format") + var ErrInvalidAPIKey = errors.New("invalid api key") + var ErrInvalidAPIName = errors.New("invalid api name format") + var ErrInvalidAPIProject = errors.New("invalid api project") + var ErrInvalidAPIToken = errors.New("invalid API token") + var ErrInvalidAPIType = errors.New("invalid api type") + var ErrInvalidAPIVersion = errors.New("invalid api version format") + var ErrInvalidApplicationID = errors.New("invalid application ID") + var ErrInvalidApplicationName = errors.New("invalid application name") + var ErrInvalidApplicationType = errors.New("invalid application type") + var ErrInvalidDeployment = errors.New("invalid api deployment") + var ErrInvalidDeploymentRestoreState = errors.New(...) + var ErrInvalidDeploymentStatus = errors.New("invalid deployment status") + var ErrInvalidHandle = errors.New(...) + var ErrInvalidInput = errors.New("invalid input parameters") + var ErrInvalidLifecycleState = errors.New("invalid lifecycle state") + var ErrInvalidPolicyVersion = errors.New("policy version must be major-only, e.g. v1") + var ErrInvalidProjectName = errors.New("invalid project name") + var ErrInvalidSecretType = errors.New("invalid secret type: must be GENERIC or CERTIFICATE") + var ErrInvalidThrottleLimitUnit = errors.New(...) + var ErrInvalidTransport = errors.New("invalid transport protocol") + var ErrInvalidURL = errors.New("invalid URL") + var ErrLLMProviderExists = errors.New("llm provider already exists") + var ErrLLMProviderLimitReached = errors.New("llm provider limit reached for organization") + var ErrLLMProviderNotFound = errors.New("llm provider not found") + var ErrLLMProviderTemplateExists = errors.New("llm provider template already exists") + var ErrLLMProviderTemplateInUse = errors.New("llm provider template is in use by one or more providers") + var ErrLLMProviderTemplateManagedByReserved = errors.New("'wso2' is reserved and cannot be used as managedBy on custom templates") + var ErrLLMProviderTemplateNotFound = errors.New("llm provider template not found") + var ErrLLMProviderTemplateNotToggleable = errors.New("only built-in templates can be enabled or disabled") + var ErrLLMProviderTemplateReadOnly = errors.New("built-in llm provider template is read-only") + var ErrLLMProviderTemplateVersionExists = errors.New("llm provider template version already exists") + var ErrLLMProxyExists = errors.New("llm proxy already exists") + var ErrLLMProxyLimitReached = errors.New("llm proxy limit reached for organization") + var ErrLLMProxyNotFound = errors.New("llm proxy not found") + var ErrMCPProxyExists = errors.New("mcp proxy already exists") + var ErrMCPProxyLimitReached = errors.New("mcp proxy limit reached for organization") + var ErrMCPProxyNotFound = errors.New("mcp proxy not found") + var ErrMCPServerUnauthorized = errors.New("MCP server returned 401 Unauthorized") + var ErrMalformedAPIProject = errors.New("malformed api project") + var ErrMissingAPIKey = errors.New("API key is required") + var ErrMultipleOrganizations = errors.New("multiple organizations found") + var ErrOpenAPIFileNotFound = errors.New("OpenAPI definition file not found") + var ErrOrganizationExists = errors.New("organization already exists with the given UUID") + var ErrOrganizationMustHAveAtLeastOneProject = errors.New("organization must have at least one project") + var ErrOrganizationNotFound = errors.New("organization not found") + var ErrProjectExists = errors.New("project already exists in organization") + var ErrProjectHasAssociatedAPIs = errors.New("project has associated APIs") + var ErrProjectHasAssociatedApplications = errors.New("project has associated applications") + var ErrProjectHasAssociatedMCPProxies = errors.New("project has associated MCP proxies") + var ErrProjectHasAssociatedWebBrokerAPIs = errors.New("project has associated WebBroker APIs") + var ErrProjectHasAssociatedWebSubAPIs = errors.New("project has associated WebSub APIs") + var ErrProjectNotFound = errors.New("project not found") + var ErrSecretAlreadyExists = errors.New("secret already exists for this organization and handle") + var ErrSecretInUse = errors.New("secret is referenced by one or more resources") + var ErrSecretNotFound = errors.New("secret not found") + var ErrSecretRefMissing = errors.New("one or more referenced secrets do not exist") + var ErrSubscriptionAlreadyExists = errors.New("application is already subscribed to this API") + var ErrSubscriptionNotFound = errors.New("subscription not found") + var ErrSubscriptionPlanAlreadyExists = errors.New("subscription plan with this name already exists for the organization") + var ErrSubscriptionPlanNotFound = errors.New("subscription plan not found") + var ErrSubscriptionPlanNotFoundOrInactive = errors.New("subscription plan not found or not active") + var ErrSubscriptionSubscriberMismatch = errors.New("subscriber does not match this subscription") + var ErrURLUnreachable = errors.New("URL is unreachable") + var ErrUnsupportedApplicationType = errors.New("unsupported application type") + var ErrUpstreamRequired = errors.New("upstream configuration is required") + var ErrWSO2ArtifactNotFound = errors.New("WSO2 API artifact not found") + var ErrWebBrokerAPIExists = errors.New("webbroker api already exists") + var ErrWebBrokerAPILimitReached = errors.New("webbroker api limit reached for organization") + var ErrWebBrokerAPINotFound = errors.New("webbroker api not found") + var ErrWebSubAPIExists = errors.New("websub api already exists") + var ErrWebSubAPILimitReached = errors.New("websub api limit reached for organization") + var ErrWebSubAPINotFound = errors.New("websub api not found") + var ErrorInvalidProjectUUID = errors.New("invalid project UUID") + var SecretPlaceholderRe = regexp.MustCompile(`\{\{\s*secret\s+\\?"([^"\\]+)\\?"\s*\}\}`) + var ValidAPIKeyStatuses = map[string]bool + var ValidAPITypes = map[string]bool + var ValidArtifactKinds = map[string]bool + var ValidGatewayFunctionalityType = map[string]bool + var ValidGatewayTokenStatuses = map[string]bool + var ValidLifecycleStates = map[string]bool + var ValidPolicyManagedBy = map[string]bool + var ValidThrottleLimitUnits = map[string]bool + var ValidTransports = map[string]bool v0.11.0-cloud1 Jul 8, 2026