apiv2

package
v0.43.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BadDefaultsAssignment = map[string]map[string]bool{
	"AWSS3ControlServiceV20180820": {
		"BlockPublicAcls":       true,
		"IgnorePublicAcls":      true,
		"BlockPublicPolicy":     true,
		"RestrictPublicBuckets": true,
	},
	"Evidently": {
		"ResultsPeriod": true,
	},
	"AmplifyUIBuilder": {
		"MaxResults":                  true,
		"PlaceIndexSearchResultLimit": true,
	},
	"PaymentCryptographyDataPlane": {
		"IntegerRangeBetween4And12": true,
	},
	"AwsToledoWebService": {
		"WorkerCounts": true,
	},
	"imagebuilder": {
		"setDefaultVersion": true,
	},
}

BadDefaultsAssignment stores the Service Models that have members with defaultValues (considered non pointers) but still have pointers. This list was retrieved from aws-sdk-go-v2, link below https://github.com/aws/aws-sdk-go-v2/blob/4ad9d5996fd752f0756be2dbbdd4f8a4841fe362/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/RemoveDefaults.java#L19-L39

Functions

func LoadAPI

func LoadAPI(modelPath string) (map[string]*awssdkmodel.API, error)

LoadAPI loads the V2 api model file, and later translates that structure into the v1 API structure.

Types

type API

type API struct {
	Shapes map[string]Shape `json:"shapes"`
}

API holds all the shapes defined in the <service>.json api model file provided by aws-sdk-go-v2

type Shape

type Shape struct {
	Type       string
	Traits     map[string]interface{}
	MemberRefs map[string]*ShapeRef `json:"members"`
	MemberRef  *ShapeRef            `json:"member"`
	KeyRef     ShapeRef             `json:"key"`
	ValueRef   ShapeRef             `json:"value"`
	InputRef   ShapeRef             `json:"input"`
	OutputRef  ShapeRef             `json:"output"`
	ErrorRefs  []ShapeRef           `json:"errors"`
}

Shape contains the definition of a resource, field, operation, service, etc.

type ShapeRef

type ShapeRef struct {
	ShapeName string `json:"target"`
	Traits    map[string]interface{}
}

ShapeRef defines the usage of a shape within the API

Jump to

Keyboard shortcuts

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