Help us shape the future of Go! Take the 2026 Go Developer Survey

platformapi

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 35 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseURL

func BaseURL(topo *runtime.Topology) (string, error)

BaseURL resolves the control-plane URL for steps implemented in another product package.

func InternalBaseURL

func InternalBaseURL(topo *runtime.Topology) (string, error)

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 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 SubscriptionPlanUUID

func SubscriptionPlanUUID(ctx context.Context, topo *runtime.Topology, client *httpx.Client, handle string) (string, error)

SubscriptionPlanUUID returns the control-plane identifier needed by API Portal's plan link.

Types

type Steps

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

Steps holds what the control-plane steps need.

Jump to

Keyboard shortcuts

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