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

awswire

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: 17 Imported by: 0

Documentation

Overview

Package awswire is a small AWS SDK-shaped client over services/stepfunctions/sdkwire: typed requests go out through the Smithy protocol codecs with SigV4 signing and the SDK's standard retries, so callers need no generated service client. The per-service packages under this directory are written by cmd/ccwiregen.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoEndpoint = errors.New("no endpoint configured")

ErrNoEndpoint is returned when a service has no endpoint rules here and no base endpoint is configured.

View Source
var ErrNoMorePages = errors.New("no more pages available")

ErrNoMorePages is returned by NextPage once the last page was read.

Functions

func Do

func Do[O any](ctx context.Context, c *Core, op string, in any) (*O, error)

Do sends in (a JSON-shaped struct or map) as op and decodes the response into O.

func FIPSRegion

func FIPSRegion(region string) (string, bool)

FIPSRegion strips the legacy fips marker from region, as the SDK does when it resolves the region.

Types

type Core

type Core struct {
	// contains filtered or unexported fields
}

Core sends the operations of one service.

func New

func New(key string, cfg aws.Config, optFns []func(*Options)) *Core

New builds the Core for sdkwire service key from cfg; a bad key surfaces as the error of every call.

func (*Core) Call

func (c *Core) Call(ctx context.Context, op string, params map[string]any) (any, error)

Call sends params as op, retrying like the SDK's standard retryer, and returns the JSON-shaped response.

type Options

type Options struct {
	BaseEndpoint *string
	Credentials  aws.CredentialsProvider
	HTTPClient   aws.HTTPClient
	Retryer      func() aws.Retryer
	Region       string
}

Options are the per-client settings a caller may override after the config is applied.

type Paginator

type Paginator[In, Out any] struct {
	// contains filtered or unexported fields
}

Paginator walks a list operation by its continuation token, as the SDK paginators do.

func NewPaginator

func NewPaginator[In, Out any](
	in *In,
	call func(context.Context, *In) (*Out, error),
	setToken func(*In, *string),
	nextToken func(*Out) *string,
) *Paginator[In, Out]

NewPaginator pages call over in; setToken stores the continuation token in a request copy and nextToken reads it from a response.

func (*Paginator[In, Out]) HasMorePages

func (p *Paginator[In, Out]) HasMorePages() bool

HasMorePages reports whether NextPage has another page to return.

func (*Paginator[In, Out]) NextPage

func (p *Paginator[In, Out]) NextPage(ctx context.Context) (*Out, error)

NextPage fetches the next page.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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