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

card

package
v0.6.1 Latest Latest
Warning

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

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

Documentation

Overview

Package card fetches and classifies A2A v1.0 Agent Cards without applying gateway credential policy.

Index

Constants

View Source
const GatewayBearerScheme a2a.SecuritySchemeName = "gatewayBearer"
View Source
const MaxBytes int64 = 1 << 20

Variables

This section is empty.

Functions

func PublicTemplate

func PublicTemplate(remote *a2a.AgentCard, name, description string) (*a2a.AgentCard, error)

PublicTemplate returns a deep-cloned, route-neutral gateway-owned Card. Remote interfaces, authentication, signatures, and per-skill authentication are intentionally removed because the gateway replaces all of them.

func RewritePublicCard

func RewritePublicCard(template *a2a.AgentCard, publicURL, tenant string, requireBearer bool) (*a2a.AgentCard, error)

RewritePublicCard materializes one route-specific Card from a public template. publicURL and tenant come from the caller; this package does not infer deployment topology or VirtualKey policy.

Types

type SecurityAlternative

type SecurityAlternative struct {
	Kind       SecurityKind
	SchemeName string
	Reason     string
}

type SecurityKind

type SecurityKind string
const (
	SecurityAnonymous   SecurityKind = "anonymous"
	SecurityBearer      SecurityKind = "single_http_bearer"
	SecurityUnsupported SecurityKind = "unsupported"
)

type Snapshot

type Snapshot struct {
	Card         *a2a.AgentCard
	Interfaces   []a2a.AgentInterface
	Security     []SecurityAlternative
	ETag         string
	LastModified string
}

func Fetch

func Fetch(ctx context.Context, base *http.Client, cardURL string, validators Validators) (*Snapshot, bool, error)

Fetch gets one public Card without redirects, compression, or authentication.

type Validators

type Validators struct {
	ETag         string
	LastModified string
}

Jump to

Keyboard shortcuts

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