Documentation ¶
Index ¶
- func GetS3Secrets(vault_key string) (string, string)
- func GetS3SecretsEnv() (string, string)
- func KeyExists(key string, s3Client *s3.S3) bool
- func ReadObject(key string, s3Client *s3.S3) (*s3.GetObjectOutput, error)
- func S3FileReader(key string, s3Client *s3.S3) (io.ReadCloser, error)
- func Upload(fh *multipart.FileHeader, s3Client *s3.S3) (string, error)
- func WriteToS3(src io.ReadSeeker, s3Client *s3.S3) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetS3Secrets ¶
GetS3Secrets returns 2 values: (S3_ACCESS_KEY, S3_SECRET_KEY)
func GetS3SecretsEnv ¶
func ReadObject ¶
func ReadObject(key string, s3Client *s3.S3) ([]byte, error) {
func S3FileReader ¶
s3FileReader converts an S3Path into an io.ReadCloser
func Upload ¶
Upload puts a file into my S3 storage
fh *multipart.FileHeader https://godoc.org/mime/multipart#FileHeader
Returns a key of a newly created object.
- error is not nil when failed to execute s3Client.PutObject()
- key is empty is an error happened
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.