diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2022-08-23 14:38:56 +0000 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2022-08-24 12:05:06 +0200 |
| commit | b6ee202aee2a31a8a21e174548a39c54e3063f1c (patch) | |
| tree | 533af4e64ae130a45b2235376c1147cf8eee683e /pkg | |
| parent | c8ec6a8ea75003778256058ea90c16eec23e5cea (diff) | |
pkg/gcs: only return paths during listing
For download URLs we anyway need extra information.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/gcs/gcs.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/gcs/gcs.go b/pkg/gcs/gcs.go index f87e54cab..2776927d4 100644 --- a/pkg/gcs/gcs.go +++ b/pkg/gcs/gcs.go @@ -158,8 +158,8 @@ func (client *Client) GetDownloadURL(gcsFile string, publicURL bool) string { } type Object struct { - DownloadURL string - CreatedAt time.Time + Path string + CreatedAt time.Time } func (client *Client) ListObjects(bucket string) ([]*Object, error) { @@ -175,8 +175,8 @@ func (client *Client) ListObjects(bucket string) ([]*Object, error) { return nil, fmt.Errorf("failed to query GCS objects: %w", err) } ret = append(ret, &Object{ - DownloadURL: objAttrs.MediaLink, - CreatedAt: objAttrs.Created, + Path: objAttrs.Name, + CreatedAt: objAttrs.Created, }) } return ret, nil |
