Documentation ¶
Index ¶
- func CredentialsFromClient(ctx context.Context, clientID, clientSecret, token string) (*credentials.Credentials, error)
- func CredentialsFromSharedProfile(ctx context.Context, filename, profile string) (*credentials.Credentials, error)
- type Config
- func (c *Config) DisableSSL(disable bool) *Config
- func (c *Config) ForcePathStyle(force bool) *Config
- func (c *Config) SetBucket(bucket string) *Config
- func (c *Config) SetBucketProto(proto string) *Config
- func (c *Config) SetBucketURL(url string) *Config
- func (c *Config) SetEndpoint(endpoint string) *Config
- func (c *Config) SetRegion(region string) *Config
- type S3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CredentialsFromClient ¶
func CredentialsFromClient(ctx context.Context, clientID, clientSecret, token string) (*credentials.Credentials, error)
CredentialsFromClient is a helper function with clientID and clientSecret provided from client
func CredentialsFromSharedProfile ¶
func CredentialsFromSharedProfile(ctx context.Context, filename, profile string) (*credentials.Credentials, error)
CredentialsFromSharedProfile is a helper function to load credentials from a profile file usually the profile file located at $HOME/.aws/profile
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config of S3
func NewConfig ¶
func NewConfig(ctx context.Context, creds *credentials.Credentials) (*Config, error)
NewConfig return new configuration for s3
func (*Config) DisableSSL ¶
DisableSSL to disable SSL when connecting to s3
func (*Config) ForcePathStyle ¶
ForcePathStyle when get/put object from s3
func (*Config) SetBucketProto ¶
SetBucketProto to set the proto when connecting to s3 bucket
func (*Config) SetEndpoint ¶
SetEndpoint to set s3 endpoint
type S3 ¶
type S3 struct {
// contains filtered or unexported fields
}
S3 struct
func (*S3) BucketName ¶
BucketName return name of bucket used for objectstorage
Click to show internal directories.
Click to hide internal directories.