Documentation ¶
Index ¶
Constants ¶
View Source
const (
ContextContentType = "UrlSignerContentType" //Values can be Audio, Video
)
Variables ¶
View Source
var ( ErrUrlSign = commonerrors.NewError("Signing Error") ErrInvalidS3Domain = commonerrors.NewError("Invalid S3 Domain Name") ErrInvalidS3Path = commonerrors.NewError("Invalid S3 Path") ErrMD5MisMatch = commonerrors.NewError("MD5 mismatch") )
Functions ¶
Types ¶
type S3Service ¶
type S3Service interface { CreateBucket(bucketName string, region string) (responseFromAws *s3.CreateBucketOutput, err error) ListBucket(ctx context.Context) (responseFromAws *s3.ListBucketsOutput, err error) SimpleFileUploader(bucketName string, fileName string, contentType string, reader io.Reader) (fileUrl string, err error) UploadObjectIfModified(filePath string, s3Path string) (outS3Path string, err error) ListObjects() (*s3.ListObjectsV2Output, error) DownloadFolder(s3Path string, outPath string) (outS3Path string, err error) DeleteObject(name string) (*s3.DeleteObjectOutput, error) DownloadObject(name string) SignUrl(context context.Context, s3Url string) (signedUrl string, err error) BuildS3Url(relativeUrl string) string }
Click to show internal directories.
Click to hide internal directories.