storage

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package storage wraps GCS bucket / object enumeration for cloudlist and bucket-check.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	Client   *api.Client
	Projects []string
}

func (*Driver) AuditBucketACL

func (d *Driver) AuditBucketACL(ctx context.Context, container string) ([]schema.BucketACLEntry, error)

AuditBucketACL returns the public-access posture of each bucket.

func (*Driver) ExposeBucket

func (d *Driver) ExposeBucket(ctx context.Context, container, level string) (string, error)

ExposeBucket grants `allUsers:objectViewer` on the bucket — the GCS equivalent of "public-read".

func (*Driver) GetBuckets

func (d *Driver) GetBuckets(ctx context.Context) ([]schema.Storage, error)

GetBuckets lists GCS buckets across the configured projects.

func (*Driver) ListObjects

func (d *Driver) ListObjects(ctx context.Context, infos map[string]string) ([]schema.BucketResult, error)

ListObjects walks objects in `infos` (bucket → "" since GCS is global).

func (*Driver) UnexposeBucket

func (d *Driver) UnexposeBucket(ctx context.Context, container string) error

UnexposeBucket removes `allUsers` from any role granting public read access.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL