platformapi

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 29 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)

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.

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