awsapi

package
v0.0.1-alpha.30 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Code generated by cmd/awsmodelgen; DO NOT EDIT.

Package awsapi contains shared constants for the AWS Query protocol.

Index

Constants

View Source
const (
	VersionCloudFormation = "2010-05-15"
	VersionCloudWatch     = "2010-08-01"
	VersionEC2            = "2016-11-15"
	VersionRDS            = "2014-10-31"
	VersionElastiCache    = "2015-02-02"
	VersionELBv2          = "2015-12-01"
	VersionAutoScaling    = "2011-01-01"
)

AWS Query-protocol API versions. Each version uniquely identifies a service, which is how the router disambiguates Query-protocol requests that share action names across services (e.g. CloudFormation and SES both have GetTemplate).

Source: https://docs.aws.amazon.com/general/latest/gr/aws-apis.html

View Source
const SourceRevision = "66e973cadf6b6e909b200217d0d6065e49445a9a"

Variables

This section is empty.

Functions

func HasOperation

func HasOperation(service, name string) bool

HasOperation reports whether the immutable model corpus contains an operation for the established Overcast service key. It is intentionally a build-tool validation helper rather than a router lookup: runtime routing uses generated indexes, while capgen uses this complete corpus to catch capability declarations that no longer map to AWS.

func ServiceKey

func ServiceKey(modelService string) string

ServiceKey maps a modeled service identity to Overcast's established key.

func WalkOperations

func WalkOperations(visit func(Operation) bool)

WalkOperations visits immutable copies of every modeled operation. It is intended for build tools such as stub-report; request routing must use the generated indexes instead of scanning this complete corpus.

Types

type Claim

type Claim struct {
	Service      string
	ModelService string
	SigningName  string
	Operation    string
	Protocol     Protocol
	ErrorProfile ErrorProfile
	Ambiguous    bool
}

Claim is immutable routing metadata for one modeled AWS operation. Service uses Overcast's service key where it differs from the modeled SDK identity; ModelService retains that source identity for diagnostics.

type ErrorProfile

type ErrorProfile uint8

ErrorProfile identifies the AWS error envelope an unsupported operation expects. It is derived from the modeled wire protocol, with the router retaining responsibility for writing the response.

const (
	ErrorProfileJSON ErrorProfile = iota + 1
	ErrorProfileQueryXML
	ErrorProfileEC2QueryXML
	ErrorProfileXML
	ErrorProfileRPCV2CBOR
	ErrorProfileRPCV2JSON
)

type Operation

type Operation struct {
	Service      string
	ServiceShape string
	SDKID        string
	APIVersion   string
	Name         string
	Protocol     Protocol
	Protocols    ProtocolSet
	// TargetPrefix is the X-Amz-Target service shape name, including its trailing
	// dot (for example "DynamoDB_20120810."). It is empty for non-AWS JSON APIs.
	TargetPrefix string
	HTTPMethod   string
	URI          string
}

Operation is static routing metadata generated from the pinned AWS Smithy models. It deliberately contains no request or response shapes: service packages remain responsible for implemented behavior. The generated corpus is private so it cannot be mutated outside this package.

type Protocol

type Protocol string

Protocol identifies the wire protocol declared by an AWS Smithy service model.

const (
	ProtocolUnknown   Protocol = ""
	ProtocolAWSJSON10 Protocol = "awsJson1_0"
	ProtocolAWSJSON11 Protocol = "awsJson1_1"
	ProtocolAWSQuery  Protocol = "awsQuery"
	ProtocolEC2Query  Protocol = "ec2Query"
	ProtocolRESTJSON  Protocol = "restJson1"
	ProtocolRESTXML   Protocol = "restXml"
	ProtocolRPCV2CBOR Protocol = "rpcv2Cbor"
	ProtocolRPCV2JSON Protocol = "rpcv2Json"
)

type ProtocolSet

type ProtocolSet uint16

ProtocolSet retains every recognized protocol trait carried by a Smithy service. It is a compact build-time-generated bitset, not runtime model data.

const (
	ProtocolsAWSJSON10 ProtocolSet = 1 << iota
	ProtocolsAWSJSON11
	ProtocolsAWSQuery
	ProtocolsEC2Query
	ProtocolsRESTJSON
	ProtocolsRESTXML
	ProtocolsRPCV2CBOR
	ProtocolsRPCV2JSON
)

type Registry

type Registry struct{}

Registry classifies modeled, non-S3 operations that no service handler has claimed. Its generated indexes are sorted static data, so a lookup performs no model parsing, I/O, startup allocation, or linear manifest scan.

func NewRegistry

func NewRegistry() *Registry

NewRegistry returns the immutable generated operation registry.

func (*Registry) Claim

func (r *Registry) Claim(req *http.Request) (Claim, bool)

Claim classifies the model-backed request forms that can be distinguished without decoding an AWS JSON body. REST bindings are exposed separately via ClaimREST because their late fallback must preserve S3's legitimate paths. For an AWS Query request it calls ParseForm, which consumes the request body; callers must therefore invoke it only where Query form parsing is already intended.

func (*Registry) ClaimQuery

func (r *Registry) ClaimQuery(version, action string) (Claim, bool)

ClaimQuery classifies a fully specified AWS Query operation. Version is required because action names are shared across services.

func (*Registry) ClaimREST

func (r *Registry) ClaimREST(method, path string) (Claim, bool)

ClaimREST classifies a modeled REST JSON or REST XML HTTP binding. Literal edges take precedence over labels, matching Smithy's URI binding semantics. It walks generated static tables only: no model parsing, map construction, or whole-manifest scan occurs on the request path.

func (*Registry) ClaimRESTQuery

func (r *Registry) ClaimRESTQuery(method, path, rawQuery string) (Claim, bool)

ClaimRESTQuery classifies a modeled REST binding including any literal query components declared by Smithy (for example ?operation=tag-resource). Query matching is allocation-free and accepts additional client parameters.

func (*Registry) ClaimRPC

func (r *Registry) ClaimRPC(protocol Protocol, serviceShape, operation string) (Claim, bool)

ClaimRPC classifies a Smithy RPC v2 operation by the explicit service and operation names carried in /service/{service}/operation/{operation}. The index includes additive protocol traits, not only each model's canonical protocol.

func (*Registry) ClaimTarget

func (r *Registry) ClaimTarget(target string) (Claim, bool)

ClaimTarget classifies a full X-Amz-Target value such as "DynamoDB_20120810.ListTables".

Jump to

Keyboard shortcuts

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