awsopt

package
v1.101.6 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package awsopt provides functions to configure common AWS options for the official aws-sdk-go-v2 library.

These common options can be easily used with other AWS-based packages in this library:

  • awssecretcache
  • s3
  • sqs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options []config.LoadOptionsFunc

Options is a set of all AWS options to apply.

func (*Options) LoadDefaultConfig

func (c *Options) LoadDefaultConfig(ctx context.Context) (aws.Config, error)

LoadDefaultConfig populates an AWS Config with the values from the external configurations and set options.

func (*Options) WithAWSOption

func (c *Options) WithAWSOption(opt config.LoadOptionsFunc)

WithAWSOption allows to add an arbitrary AWS option.

func (*Options) WithEndpoint deprecated

func (c *Options) WithEndpoint(url string, isImmutable bool)

WithEndpoint overrides the AWS endpoint for the service.

Deprecated: Use instead the WithEndpointMutable or WithEndpointImmutable in the gosrvlib aws service packages. Ref.: https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config#WithEndpointResolver

func (*Options) WithRegion

func (c *Options) WithRegion(region string)

WithRegion allows to specify the AWS region.

func (*Options) WithRegionFromURL

func (c *Options) WithRegionFromURL(url, defaultRegion string)

WithRegionFromURL allows to specify the AWS region extracted from the provided URL. If the URL does not contain a region, a default one will be returned with the order of precedence:

  • the specified defaultRegion;
  • the AWS_REGION environment variable;
  • the AWS_DEFAULT_REGION environment variable;
  • the region set in the awsDefaultRegion constant.

Jump to

Keyboard shortcuts

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