Documentation
¶
Index ¶
- func GetBucketName(config cfg.Config, settings BucketNameSettingsAware) (string, error)
- func NewClient(ctx context.Context, config cfg.Config, logger log.Logger, name string, ...) (*s3.Client, error)
- func NewPresignClient(ctx context.Context, config cfg.Config, logger log.Logger, name string, ...) (*s3.PresignClient, error)
- func ProvideClient(ctx context.Context, config cfg.Config, logger log.Logger, name string, ...) (*s3.Client, error)
- func ProvidePresignClient(ctx context.Context, config cfg.Config, logger log.Logger, name string, ...) (*s3.PresignClient, error)
- func ResolveEndpoint(config cfg.Config, name string, optFns ...ClientOption) (string, error)
- type BucketNameSettings
- type BucketNameSettingsAware
- type BucketNamingSettings
- type Client
- type ClientConfig
- type ClientOption
- type ClientSettings
- type PresignClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBucketName ¶ added in v0.56.0
func GetBucketName(config cfg.Config, settings BucketNameSettingsAware) (string, error)
func NewPresignClient ¶ added in v0.47.0
func ProvideClient ¶
func ProvidePresignClient ¶ added in v0.47.0
func ResolveEndpoint ¶
Types ¶
type BucketNameSettings ¶ added in v0.56.0
func (BucketNameSettings) GetBucketId ¶ added in v0.56.0
func (s BucketNameSettings) GetBucketId() string
func (BucketNameSettings) GetClientName ¶ added in v0.56.0
func (s BucketNameSettings) GetClientName() string
func (BucketNameSettings) GetIdentity ¶ added in v0.56.0
func (s BucketNameSettings) GetIdentity() cfg.Identity
type BucketNameSettingsAware ¶ added in v0.56.0
type BucketNamingSettings ¶ added in v0.56.0
type Client ¶
type Client interface {
AbortMultipartUpload(context.Context, *s3.AbortMultipartUploadInput, ...func(*s3.Options)) (*s3.AbortMultipartUploadOutput, error)
CompleteMultipartUpload(context.Context, *s3.CompleteMultipartUploadInput, ...func(*s3.Options)) (*s3.CompleteMultipartUploadOutput, error)
CopyObject(ctx context.Context, params *s3.CopyObjectInput, optFns ...func(*s3.Options)) (*s3.CopyObjectOutput, error)
CreateBucket(ctx context.Context, params *s3.CreateBucketInput, optFns ...func(*s3.Options)) (*s3.CreateBucketOutput, error)
CreateMultipartUpload(context.Context, *s3.CreateMultipartUploadInput, ...func(*s3.Options)) (*s3.CreateMultipartUploadOutput, error)
DeleteBucket(ctx context.Context, params *s3.DeleteBucketInput, optFns ...func(*s3.Options)) (*s3.DeleteBucketOutput, error)
DeleteObject(ctx context.Context, params *s3.DeleteObjectInput, optFns ...func(*s3.Options)) (*s3.DeleteObjectOutput, error)
DeleteObjects(ctx context.Context, params *s3.DeleteObjectsInput, optFns ...func(*s3.Options)) (*s3.DeleteObjectsOutput, error)
GetObject(ctx context.Context, params *s3.GetObjectInput, optFns ...func(options *s3.Options)) (*s3.GetObjectOutput, error)
HeadBucket(ctx context.Context, params *s3.HeadBucketInput, optFns ...func(options *s3.Options)) (*s3.HeadBucketOutput, error)
HeadObject(ctx context.Context, params *s3.HeadObjectInput, optFns ...func(*s3.Options)) (*s3.HeadObjectOutput, error)
ListObjects(ctx context.Context, params *s3.ListObjectsInput, optFns ...func(*s3.Options)) (*s3.ListObjectsOutput, error)
ListObjectsV2(ctx context.Context, params *s3.ListObjectsV2Input, optFns ...func(*s3.Options)) (*s3.ListObjectsV2Output, error)
PutObject(ctx context.Context, params *s3.PutObjectInput, optFns ...func(*s3.Options)) (*s3.PutObjectOutput, error)
PutObjectTagging(ctx context.Context, params *s3.PutObjectTaggingInput, optFns ...func(*s3.Options)) (*s3.PutObjectTaggingOutput, error)
UploadPart(context.Context, *s3.UploadPartInput, ...func(*s3.Options)) (*s3.UploadPartOutput, error)
}
type ClientConfig ¶
type ClientConfig struct {
Settings ClientSettings
LoadOptions []func(options *awsCfg.LoadOptions) error
}
func GetClientConfig ¶
func GetClientConfig(config cfg.Config, name string, optFns ...ClientOption) (*ClientConfig, error)
func (ClientConfig) GetLoadOptions ¶
func (c ClientConfig) GetLoadOptions() []func(options *awsCfg.LoadOptions) error
func (ClientConfig) GetRetryOptions ¶
func (c ClientConfig) GetRetryOptions() []func(*retry.StandardOptions)
func (ClientConfig) GetSettings ¶
func (c ClientConfig) GetSettings() gosoAws.ClientSettings
type ClientOption ¶
type ClientOption func(cfg *ClientConfig)
type ClientSettings ¶
type ClientSettings struct {
gosoAws.ClientSettings
// Allows you to enable the client to use path-style addressing, i.e.,
// https://s3.amazonaws.com/BUCKET/KEY . By default, the S3 client will use virtual
// hosted bucket addressing when possible( https://BUCKET.s3.amazonaws.com/KEY ).
UsePathStyle bool `cfg:"usePathStyle" default:"true"`
}
type PresignClient ¶ added in v0.47.0
type PresignClient interface {
PresignGetObject(ctx context.Context, params *s3.GetObjectInput, optFns ...func(*s3.PresignOptions)) (*v4.PresignedHTTPRequest, error)
}
Click to show internal directories.
Click to hide internal directories.