Documentation ¶
Overview ¶
#### References: - https://us-east-1.console.aws.amazon.com/console/home?region=us-east-1 - https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html - https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html - https://docs.aws.amazon.com/code-samples/latest/catalog/go-s3-s3_copy_object.go.html - https://snyk.io/advisor/npm-package/@aws-sdk/client-s3/example - https://github.com/awsdocs/aws-doc-sdk-examples/blob/0f49111e99d1bd7d3ac11103051d731ee3eb519b/javascript/example_code/nodegetstarted/sampleV3.js
Index ¶
- Constants
- func ConfigDemo() string
- type S3Client
- func (client *S3Client) BucketUrl() string
- func (client *S3Client) Copy(ctx context.Context, source, target string, opts ...request.Option) (code string, err error)
- func (client *S3Client) Delete(ctx context.Context, source string, opts ...request.Option) (err error)
- func (client *S3Client) Get(ctx context.Context, source, target string, opts ...request.Option) (code string, err error)
- func (client *S3Client) GetSts(ctx context.Context, sessionName string) (result *StsResult, err error)
- func (client *S3Client) StsUploadLocal(ctx context.Context, sessionName, source, target string) (link string, err error)
- func (client *S3Client) Upload(ctx context.Context, source, target string) (link string, err error)
- func (client *S3Client) UploadDir(ctx context.Context, source, target string) (link string, err error)
- func (client *S3Client) UploadFromUrl(ctx context.Context, source, target string) (link string, err error)
- func (client *S3Client) UploadLocal(ctx context.Context, source, target string) (link string, err error)
- type S3Config
- type StsResult
Constants ¶
View Source
const ( AWS_Domain = "amazonaws.com" CODE_NoSuchKey = "NoSuchKey" )
Variables ¶
This section is empty.
Functions ¶
func ConfigDemo ¶
func ConfigDemo() string
Types ¶
type S3Client ¶
func NewS3Client ¶
func (*S3Client) StsUploadLocal ¶
func (*S3Client) UploadFromUrl ¶
type S3Config ¶
type S3Config struct { AccessKeyId string `mapstructure:"access_key_id" json:"accessKeyId,omitempty"` SecretAccessKey string `mapstructure:"secrete_access_key" json:"secreteAccessKey,omitempty"` Region string `mapstructure:"region" json:"region,omitempty"` Bucket string `mapstructure:"bucket" json:"bucket,omitempty"` AssumeArn string `mapstructure:"assume_arn" json:"assumeArn,omitempty"` DurationSeconds int64 `mapstructure:"duration_seconds" json:"site,omitempty"` // contains filtered or unexported fields }
func NewS3Config ¶
Click to show internal directories.
Click to hide internal directories.