Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Download ¶
Download is the main entry function for the S3 functionality. It parses the dataset parameter from the request and relays the request to the correct S3 function.
func GetBucketLocation ¶
GetBucketLocation respondes to an S3 GetBucketLocation request. This request only contains the AWS region name as XML. https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLocation.html
func GetObject ¶
GetObject respondes to an S3 GetObject request. This request returns S3 objects. This is done by first fetching any file that matches the dataset + filename request from the database and then passing the fileID to the SDA Download function. https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
func ListBuckets ¶
ListBuckets respondes to an S3 ListBuckets request. This request returns the available S3 buckets. We use this to list accessible datasets. https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html
func ListObjects ¶
ListObjects respondes to an S3 ListObjects request. This request lists the contents of an S3 bucket. We use this to return dataset content. https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html
Types ¶
type ListAllMyBucketsResult ¶
type ListBucketResult ¶
type ListBucketResult struct { CommonPrefixes []string `xml:"CommonPrefixes>CommonPrefix"` Contents []Object `xml:"Contents"` Delimiter string `xml:"Delimiter,omitempty"` EncodingType string `xml:"EncodingType,omitempty"` IsTruncated bool `xml:"IsTruncated,omitempty"` Marker string `xml:"Marker,omitempty"` MaxKeys int `xml:"MaxKeys,omitempty"` Name string `xml:"Name"` NextMarker string `xml:"NextMarker,omitempty"` Prefix string `xml:"Prefix,omitempty"` }
type LocationConstraint ¶
type Object ¶
type Object struct { ChecksumAlgorithm []string `xml:"ChecksumAlgorithm,omitempty"` ETag string `xml:"ETag,omitempty"` Key string `xml:"Key"` LastModified string `xml:"LastModified,omitempty"` Owner Owner `xml:"Owner,omitempty"` Size int `xml:"Size,omitempty"` StorageClass string `xml:"StorageClass,omitempty"` }