Versions in this module Expand all Collapse all v0 v0.0.3 Apr 15, 2022 v0.0.1 Apr 15, 2022 Changes in this version + func BuildLogPath(gcsURL string) (string, error) + func GetConsoleURL(gcsURL string) (string, error) + type Client interface + AttrObject func(ctx context.Context, bkt, objPath string) (*storage.ObjectAttrs, error) + CopyObject func(ctx context.Context, srcBkt, srcObjPath, dstBkt, dstObjPath string) error + DeleteObject func(ctx context.Context, bkt, objPath string) error + DeleteStorageBucket func(ctx context.Context, bkt string, force bool) error + Download func(ctx context.Context, bktName, objPath, filePath string) error + Exists func(ctx context.Context, bkt, objPath string) bool + ListChildrenFiles func(ctx context.Context, bkt, dirPath string) ([]string, error) + ListDirectChildren func(ctx context.Context, bkt, dirPath string) ([]string, error) + NewStorageBucket func(ctx context.Context, bkt, project string) error + ReadObject func(ctx context.Context, bkt, objPath string) ([]byte, error) + Upload func(ctx context.Context, bktName, objPath, filePath string) error + WriteObject func(ctx context.Context, bkt, objPath string, content []byte) (int, error) + type GCSClient struct + func NewClient(ctx context.Context, serviceAccount string) (*GCSClient, error) + func (g *GCSClient) AttrObject(ctx context.Context, bucketName, objPath string) (*storage.ObjectAttrs, error) + func (g *GCSClient) CopyObject(ctx context.Context, srcBucketName, srcPath, dstBucketName, dstPath string) error + func (g *GCSClient) DeleteObject(ctx context.Context, bucketName, objPath string) error + func (g *GCSClient) DeleteStorageBucket(ctx context.Context, bucketName string, force bool) error + func (g *GCSClient) Download(ctx context.Context, bucketName, objPath, dstPath string) error + func (g *GCSClient) Exists(ctx context.Context, bucketName, objPath string) bool + func (g *GCSClient) ListChildrenFiles(ctx context.Context, bucketName, dirPath string) ([]string, error) + func (g *GCSClient) ListDirectChildren(ctx context.Context, bucketName, dirPath string) ([]string, error) + func (g *GCSClient) NewReader(ctx context.Context, bucketName, objPath string) (*storage.Reader, error) + func (g *GCSClient) NewStorageBucket(ctx context.Context, bucketName, project string) error + func (g *GCSClient) ReadObject(ctx context.Context, bucketName, objPath string) ([]byte, error) + func (g *GCSClient) ReadURL(ctx context.Context, gcsURL string) ([]byte, error) + func (g *GCSClient) Upload(ctx context.Context, bucketName, objPath, srcPath string) error + func (g *GCSClient) WriteObject(ctx context.Context, bucketName, objPath string, content []byte) (n int, err error)