aws

package
v1.10.9 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: MIT Imports: 16 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() *http.Client
	Clone(ctx context.Context) (AWS, liberr.Error)
	NewForConfig(ctx context.Context, cfg Config) (AWS, liberr.Error)
	ForcePathStyle(ctx context.Context, enabled bool) liberr.Error
	ForceSignerOptions(ctx context.Context, fct ...func(signer *sdksv4.SignerOptions)) liberr.Error

	GetBucketName() string
	SetBucketName(bucket string)

	GetClientS3() *sdksss.Client
	SetClientS3(aws *sdksss.Client)
	GetClientIam() *sdkiam.Client
	SetClientIam(aws *sdkiam.Client)
}

func New

func New(ctx context.Context, cfg Config, httpClient *http.Client) (AWS, liberr.Error)

type Config

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

	GetAccessKey() string
	SetCredentials(accessKey, secretKey string)
	ResetRegionEndpoint()
	RegisterRegionEndpoint(region string, endpoint *url.URL) liberr.Error
	RegisterRegionAws(endpoint *url.URL) liberr.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 *http.Client) (*sdkaws.Config, liberr.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