aws

package
v1.9.11 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 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 AWS

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

	Config() Config
	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
	GetClientIam() *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)
	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