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

ir

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package ir is the wire model of a service whose SDK client predates schema-based serde: shapes, members and operations with the names and bindings their protocol puts on the wire.

Index

Constants

View Source
const (
	String    = "string"
	Boolean   = "boolean"
	Byte      = "byte"
	Short     = "short"
	Integer   = "integer"
	Long      = "long"
	Float     = "float"
	Double    = "double"
	Timestamp = "timestamp"
	Blob      = "blob"
	Document  = "document"
)

Scalar target names a Member may reference without a Shapes entry.

View Source
const (
	Struct = "struct"
	List   = "list"
	Map    = "map"
	Union  = "union"
)

Shape kinds besides the scalars.

Variables

This section is empty.

Functions

This section is empty.

Types

type Member

type Member struct {
	// Name is the Go field name, which Step Functions parameters use.
	Name string `json:"field,omitempty"`
	// Target is a scalar constant or a Shapes key.
	Target string `json:"to"`
	// Ser and De are the wire names when serializing and deserializing, if
	// not Name.
	Ser string `json:"ser,omitempty"`
	De  string `json:"de,omitempty"`
	// Loc is where the member travels when not in the body: "label", "query",
	// "header" or "prefix", named LocName.
	Loc     string `json:"loc,omitempty"`
	LocName string `json:"locName,omitempty"`
	// Flat marks a list or map with no wrapper element.
	Flat bool `json:"flat,omitempty"`
}

Member is a struct member, list item, or map key or value.

type Model

type Model struct {
	Shapes   map[string]*Shape `json:"shapes"`
	Ops      map[string]*Op    `json:"ops"`
	Protocol string            `json:"protocol"`
	Version  string            `json:"version"`
	// Target is the service name the protocol puts on the wire, when it does.
	Target string `json:"target,omitempty"`
	// Namespace is the xmlns the service puts on request roots (restXml).
	Namespace string `json:"namespace,omitempty"`
}

Model is one service.

type Op

type Op struct {
	In     string `json:"in,omitempty"`
	Out    string `json:"out,omitempty"`
	Method string `json:"method,omitempty"`
	URI    string `json:"uri,omitempty"`
	// Token is the idempotency-token member the SDK fills when absent.
	Token string `json:"token,omitempty"`
	// Root is the request body's root element (restXml).
	Root string `json:"root,omitempty"`
	// Sanitize names the input members the SDK cuts down to their last
	// path segment before sending.
	Sanitize []string `json:"sanitize,omitempty"`
}

Op is one operation.

type Shape

type Shape struct {
	Item    *Member  `json:"item,omitempty"`
	Key     *Member  `json:"key,omitempty"`
	Value   *Member  `json:"value,omitempty"`
	Type    string   `json:"type"`
	Members []Member `json:"members,omitempty"`
}

Shape is a struct, union, list or map.

Jump to

Keyboard shortcuts

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