From b6ee202aee2a31a8a21e174548a39c54e3063f1c Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 23 Aug 2022 14:38:56 +0000 Subject: pkg/gcs: only return paths during listing For download URLs we anyway need extra information. --- pkg/gcs/gcs.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pkg') 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 -- cgit mrf-deployment