aws

package
v1.38.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSConfig

type AWSConfig struct {
	// Region is the region to send requests to.
	Region string `mapstructure:"region"`
	// HTTPClient is the configuration for the HttpClient AWS the SDK's API clients will use to invoke HTTP requests.
	HTTPClient HTTPClient `mapstructure:"http_client"`
}

type AssumeRoleConfig

type AssumeRoleConfig struct {
	// ARN is the ARN of the role to assume.
	ARN string `mapstructure:"arn"`
}

type Builder

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

func NewBuilder

func NewBuilder(c *Config) *Builder

func (*Builder) LoadConfig

func (b *Builder) LoadConfig(
	ctx context.Context, opts ...func(options *awscfg.LoadOptions) error) (aws.Config, error)

func (*Builder) NewS3Service

func (b *Builder) NewS3Service(
	cfg aws.Config, serviceName string, opts ...func(options *s3.Options)) (*s3.Client, error)

func (*Builder) NewSFNService

func (b *Builder) NewSFNService(
	cfg aws.Config,
	serviceName string, opts ...func(options *sfn.Options)) (*sfn.Client, error)

func (*Builder) NewSQSService

func (b *Builder) NewSQSService(
	cfg aws.Config, serviceName string, opts ...func(options *sqs.Options)) (*sqs.Client, error)

func (*Builder) NewSagemakerRuntimeService

func (b *Builder) NewSagemakerRuntimeService(
	cfg aws.Config,
	serviceName string, opts ...func(options *sagemakerruntime.Options)) (*sagemakerruntime.Client, error)

type Config

type Config struct {
	// AWSConfig is the configuration for the AWS SDK.
	AWSConfig AWSConfig `mapstructure:"config"`
	// S3 is the configuration for the S3 clients.
	S3 map[string]S3Config `mapstructure:"s3"`
	// SagemakerRuntime is the configuration for the SagemakerRuntime clients.
	SagemakerRuntime map[string]SagemakerRuntimeConfig `mapstructure:"sagemakerruntime"`
	// SFN is the configuration for the Sfn clients.
	SFN map[string]SFNConfig `mapstructure:"sfn"`
	// SQS is the configuration for the Sqs clients.
	SQS map[string]SQSConfig `mapstructure:"sqs"`
}

func NewConfig

func NewConfig() (*Config, error)

type CredentialsConfig

type CredentialsConfig struct {
	// Static is the configuration for static credentials.
	Static StaticConfig `mapstructure:"static"`
	// AssumeRole is the configuration for assuming a role.
	AssumeRole AssumeRoleConfig `mapstructure:"assume_role"`
}

type HTTPClient

type HTTPClient struct {
	// MaxIdleConns, if non-zero, controls the maximum idle
	// (keep-alive) connections to keep per-host.
	MaxIdleConns int `mapstructure:"max_idle_conns"`
}

type S3Config

type S3Config struct {
	// Region is the region to send requests to.
	Region string `mapstructure:"region"`
	// HTTPClient is the configuration for the HttpClient AWS the SDK's API clients will use to invoke HTTP requests.
	HTTPClient HTTPClient `mapstructure:"http_client"`
	// Credentials is the configuration for the AWS credentials.
	Credentials CredentialsConfig `mapstructure:"credentials"`
}

type SFNConfig

type SFNConfig struct {
	// Region is the region to send requests to.
	Region string `mapstructure:"region"`
	// HTTPClient is the configuration for the HttpClient AWS the SDK's API clients will use to invoke HTTP requests.
	HTTPClient HTTPClient `mapstructure:"http_client"`
	// Credentials is the configuration for the AWS credentials.
	Credentials CredentialsConfig `mapstructure:"credentials"`
}

type SQSConfig

type SQSConfig struct {
	// Region is the region to send requests to.
	Region string `mapstructure:"region"`
	// HTTPClient is the configuration for the HttpClient AWS the SDK's API clients will use to invoke HTTP requests.
	HTTPClient HTTPClient `mapstructure:"http_client"`
	// Credentials is the configuration for the AWS credentials.
	Credentials CredentialsConfig `mapstructure:"credentials"`
}

type SagemakerRuntimeConfig

type SagemakerRuntimeConfig struct {
	// Region is the region to send requests to.
	Region string `mapstructure:"region"`
	// HTTPClient is the configuration for the HttpClient AWS the SDK's API clients will use to invoke HTTP requests.
	HTTPClient HTTPClient `mapstructure:"http_client"`
	// Credentials is the configuration for the AWS credentials.
	Credentials CredentialsConfig `mapstructure:"credentials"`
}

type StaticConfig

type StaticConfig struct {
	// AccessKeyID is the AWS access key ID.
	AccessKeyID string `mapstructure:"access_key_id"`
	// SecretAccessKey is the AWS secret access key.
	SecretAccessKey string `mapstructure:"secret_access_key"`
	// SessionToken is the AWS session token.
	SessionToken string `mapstructure:"session_token"`
}

Jump to

Keyboard shortcuts

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