Documentation
¶
Overview ¶
Package platformapi holds steps for both directions of the platform-api <-> gateway relationship: control_plane.go asserts against artifacts a gateway-controller pushes up to the control plane, and secret_deploy.go creates and deploys artifacts through the control plane's own REST API for the gateway to pull down.
Index ¶
- func BaseURL(topo *runtime.Topology) (string, error)
- func InternalBaseURL(topo *runtime.Topology) (string, error)
- func Register(sc *godog.ScenarioContext, topo *runtime.Topology, funnel *httpx.Funnel, ...)
- func RegisterAPIVersions(sc *godog.ScenarioContext, s *Steps)
- func RegisterAgentProxy(sc *godog.ScenarioContext, s *Steps)
- func RegisterCreatedArtifact(ctx context.Context, topo *runtime.Topology, funnel *httpx.Funnel, ...) error
- func RegisterDeploy(sc *godog.ScenarioContext, s *Steps)
- func RegisterMCPServer(sc *godog.ScenarioContext, s *Steps)
- func RegisterPortalEvents(sc *godog.ScenarioContext, s *Steps)
- func RegisterPublication(sc *godog.ScenarioContext, s *Steps)
- func RegisterPublicationContent(sc *godog.ScenarioContext, s *Steps)
- func RegisterServiceAccount(sc *godog.ScenarioContext, s *Steps)
- func RegisterUserToken(sc *godog.ScenarioContext, s *Steps)
- func SubscriptionPlanUUID(ctx context.Context, topo *runtime.Topology, client *httpx.Client, ...) (string, error)
- type Steps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseURL ¶
BaseURL resolves the control-plane URL for steps implemented in another product package.
func InternalBaseURL ¶
InternalBaseURL resolves the control-plane URL as reachable from a container on this block's network.
func Register ¶
func Register(sc *godog.ScenarioContext, topo *runtime.Topology, funnel *httpx.Funnel, featureRoot string, trackPortalPlan func(ctx context.Context, handle string) error)
Register binds the control-plane steps. Requests go through the suite's shared funnel: steps whose response an assertion reads publish through it, and intermediate lookups use its underlying client rather than a step-owned http.Client. featureRoot resolves canonical resource templates. trackPortalPlan removes a plan from the API Portal when the scenario ends; the portal steps provide it.
func RegisterAPIVersions ¶ added in v0.4.0
func RegisterAPIVersions(sc *godog.ScenarioContext, s *Steps)
RegisterAPIVersions binds the two creation steps GET /rest-apis/versions needs. secret_deploy.go's "I create a REST API ..." steps derive the handle from the display name and hardcode version v1, so two of them collide; here both are separate arguments, letting one display name carry several versions. The lookup itself and every assertion use the suite's shared vocabulary.
func RegisterAgentProxy ¶
func RegisterAgentProxy(sc *godog.ScenarioContext, s *Steps)
RegisterAgentProxy binds the steps that drive the Agent proxy control-plane surface: a response-publishing request funnel for the publisher API, canonical-template authoring, deployment, the gateway-internal API, the Agent Card fixture and deployment archives.
Every control-plane request goes through one funnel that publishes its response for the shared assertions and records what it created: a 201 naming an Agent proxy, a deployment or an API key is registered for cleanup immediately, including one a negative scenario did not expect to succeed, and a 204 delete deregisters what it removed.
func RegisterCreatedArtifact ¶
func RegisterCreatedArtifact(ctx context.Context, topo *runtime.Topology, funnel *httpx.Funnel, kind, id string) error
RegisterCreatedArtifact registers cleanup for a control-plane artifact that another step package created, such as one published by the ap CLI. kind is the gateway artifact kind (LlmProvider, LlmProxy or Mcp); the artifact is deleted as the administrator once its scenario finishes.
func RegisterDeploy ¶
func RegisterDeploy(sc *godog.ScenarioContext, s *Steps)
RegisterDeploy binds the steps that create and deploy an artifact THROUGH platform-api's own REST API, as opposed to control_plane.go's steps, which only ever assert against artifacts a gateway pushed up. Requests go through the same shared client every other suite request funnels through.
func RegisterMCPServer ¶ added in v0.4.3
func RegisterMCPServer(sc *godog.ScenarioContext, s *Steps)
RegisterMCPServer binds the steps that call the Platform API's MCP tools as a signed-in user.
Each call is one stateless request through the control-plane funnel, so the answer is published for the shared assertions. A resource a tool creates is registered for cleanup from the tool's result, because an MCP call answers 200 with no Location header.
func RegisterPortalEvents ¶ added in v0.4.3
func RegisterPortalEvents(sc *godog.ScenarioContext, s *Steps)
RegisterPortalEvents binds the step that plays the API Portal: it sends platform-api a signed event, as the portal's webhook delivery does, and publishes platform-api's answer.
func RegisterPublication ¶ added in v0.4.1
func RegisterPublication(sc *godog.ScenarioContext, s *Steps)
RegisterPublication binds the steps that register an API Portal with the control plane and publish an API to it.
func RegisterPublicationContent ¶ added in v0.4.1
func RegisterPublicationContent(sc *godog.ScenarioContext, s *Steps)
RegisterPublicationContent binds the steps that attach documents, a landing page and a thumbnail to a publication.
func RegisterServiceAccount ¶ added in v0.4.3
func RegisterServiceAccount(sc *godog.ScenarioContext, s *Steps)
RegisterServiceAccount binds the service-account steps: creating and updating an account from a template, the client-credentials exchange, requests made without signing in, and claim checks on an issued token. Every request goes through the control-plane funnel, so the shared assertions read its response.
func RegisterUserToken ¶ added in v0.4.3
func RegisterUserToken(sc *godog.ScenarioContext, s *Steps)
RegisterUserToken binds the step that mints a control-plane token for a user other than the suite's file-mode actors, such as an IdP user identified by a UUID sub, with or without a display-name claim. Requests carry it with the control-plane request step's `with token`.