0
I’m trying to create an API in golang
This will return the read data from a file in AWS (S3)
For example, in c# I do this way to read the data:
GetObjectRequest request = new GetObjectRequest{
BucketName = "<Bucket>",
Key = "<key>.json"
};
using (GetObjectResponse response = _s3Client.GetObject (request)){
using (StreamReader reader = new StreamReader (response.ResponseStream){
var json = reader.ReadToEnd ();
}
}
That way I have the contents of the file
Suppose I have a file in Bucket "ABC" with Key "123/file.json"
and that this file contains:
{
"glossary": {
"title": "example glossary"
}
}
When I run the method in the API I want it to return this json