aws

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWS

type AWS interface {
	Bucket() awsbck.Bucket
	Group() awsgrp.Group
	Object() awsobj.Object
	Policy() awspol.Policy
	Role() awsrol.Role
	User() awsusr.User

	Config() Config
	HTTPCli() libhtc.HttpClient
	Clone(ctx context.Context) (AWS, error)
	NewForConfig(ctx context.Context, cfg Config) (AWS, error)
	ForcePathStyle(ctx context.Context, enabled bool) error
	ForceSignerOptions(ctx context.Context, fct ...func(signer *sdksv4.SignerOptions)) error

	GetBucketName() string
	SetBucketName(bucket string)
	SetHTTPTimeout(dur time.Duration) error
	GetHTTPTimeout() time.Duration
	GetClientS3() *sdksss.Client
	SetClientS3(aws *sdksss.Client)
	GetClientIam() *sdkiam.Client
	SetClientIam(aws *sdkiam.Client)
}

func New

func New(ctx context.Context, cfg Config, httpClient libhtc.HttpClient) (AWS, error)

type Config

type Config interface {
	Check(ctx context.Context) error
	Validate() error

	GetAccessKey() string
	GetSecretKey() string
	SetCredentials(accessKey, secretKey string)
	ResetRegionEndpoint()
	RegisterRegionEndpoint(region string, endpoint *url.URL) error
	RegisterRegionAws(endpoint *url.URL) error
	SetRegion(region string)
	GetRegion() string
	SetEndpoint(endpoint *url.URL)
	GetEndpoint() *url.URL

	IsHTTPs() bool
	ResolveEndpoint(service, region string) (sdkaws.Endpoint, error)
	ResolveEndpointWithOptions(service, region string, options ...interface{}) (sdkaws.Endpoint, error)
	GetDisableHTTPS() bool
	GetResolvedRegion() string
	SetRetryer(retryer func() sdkaws.Retryer)

	GetConfig(ctx context.Context, cli libhtc.HttpClient) (*sdkaws.Config, error)
	JSON() ([]byte, error)
	Clone() Config

	GetBucketName() string
	SetBucketName(bucket string)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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