gcs

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() error

Close closes the GCS client

func DeleteObject

func DeleteObject(objectName string) error

DeleteObject deletes an object from GCS bucket

func GetBucket

func GetBucket() *storage.BucketHandle

GetBucket returns a bucket handle

func GetBucketName

func GetBucketName() string

GetBucketName returns the configured bucket name

func GetClient

func GetClient() *storage.Client

GetClient returns the GCS client instance

func ListObjects

func ListObjects(prefix string) ([]string, error)

ListObjects lists objects in the bucket with the given prefix

func ObjectExists

func ObjectExists(objectName string) (bool, error)

ObjectExists checks if an object exists in the bucket

func ReadObject

func ReadObject(objectName string) ([]byte, error)

ReadObject reads an object from GCS bucket

func ReadObjectAsReader

func ReadObjectAsReader(objectName string) (io.ReadCloser, error)

ReadObjectAsReader returns a reader for an object from GCS bucket

func Setup

func Setup() error

Setup initializes the Google Cloud Storage client

func WriteObject

func WriteObject(objectName string, data []byte, contentType string) error

WriteObject writes data to an object in GCS bucket

Types

This section is empty.

Jump to

Keyboard shortcuts

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