gcs

package module
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package gcs provides a grub BucketProvider implementation for Google Cloud Storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider implements grub.BucketProvider for Google Cloud Storage.

func New

func New(client *storage.Client, bucket string) *Provider

New creates a GCS provider with the given client and bucket name.

func (*Provider) Delete

func (p *Provider) Delete(ctx context.Context, key string) error

Delete removes the blob at key.

func (*Provider) Exists

func (p *Provider) Exists(ctx context.Context, key string) (bool, error)

Exists checks whether a key exists.

func (*Provider) Get

func (p *Provider) Get(ctx context.Context, key string) ([]byte, *grub.ObjectInfo, error)

Get retrieves the blob at key.

func (*Provider) List

func (p *Provider) List(ctx context.Context, prefix string, limit int) ([]grub.ObjectInfo, error)

List returns object info for keys matching the given prefix.

func (*Provider) Put

func (p *Provider) Put(ctx context.Context, key string, data []byte, info *grub.ObjectInfo) error

Put stores data at key with associated metadata.

Jump to

Keyboard shortcuts

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