Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Close()
- func (c *Client) CreateBucketIfNotExist(ctx context.Context) error
- func (c *Client) GetConfig() *Config
- func (c *Client) GetObject(ctx context.Context, objectKey string) ([]byte, error)
- func (c *Client) PresignedGetObject(ctx context.Context, objectKey string) (string, error)
- func (c *Client) PresignedPutObject(ctx context.Context, objectKey string) (string, error)
- func (c *Client) PublicGetObject(ctx context.Context, objectKey string) (string, error)
- func (c *Client) PutObject(ctx context.Context, objectKey string, buf []byte) error
- type Config
Constants ¶
View Source
const (
BucketPublicReadPolicy = "public_read"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateBucketIfNotExist ¶
func (*Client) PresignedGetObject ¶
func (*Client) PresignedPutObject ¶
func (*Client) PublicGetObject ¶
type Config ¶
type Config struct { Endpoint string `yaml:"endpoint"` Bucket string `yaml:"bucket"` Policy string `yaml:"policy"` AccessKeyID string `yaml:"access_key_id"` SecretAccessKey string `yaml:"secret_access_key"` PresignedPutExpiry time.Duration `yaml:"presigned_put_expiry"` PresignedGetExpiry time.Duration `yaml:"presigned_get_expiry"` }
func NewDefaultConf ¶
func NewDefaultConf() *Config
Click to show internal directories.
Click to hide internal directories.