(fn string)
| 78 | } |
| 79 | |
| 80 | func (s *S3Input) openS3File(fn string) (io.ReadCloser, int64, time.Time, *url.URL, error) { |
| 81 | _, s3Bucket, s3Key, err := s.choosePathComponents(fn) |
| 82 | if err != nil { |
| 83 | return nil, 0, time.Time{}, nil, err |
| 84 | } |
| 85 | |
| 86 | resp, err := s.svc.GetObject(&s3.GetObjectInput{ |
| 87 | Bucket: aws.String(s3Bucket), |
| 88 | Key: aws.String(s3Key), |
| 89 | }) |
| 90 | if err != nil { |
| 91 | return nil, 0, time.Time{}, nil, err |
| 92 | } |
| 93 | |
| 94 | urlObject, err := url.Parse(fn) |
| 95 | if err != nil { |
| 96 | return nil, 0, time.Time{}, nil, err |
| 97 | } |
| 98 | |
| 99 | return resp.Body, *resp.ContentLength, *resp.LastModified, urlObject, nil |
| 100 | } |
| 101 | |
| 102 | func (s *S3Input) sizeS3File(fn string) (int64, error) { |
| 103 | _, s3Bucket, s3Key, err := s.choosePathComponents(fn) |
nothing calls this directly
no test coverage detected