google

package
v0.0.0-...-34ec42c Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package google contains the implementation for managing storage with Google Cloud Storage

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(config Config, log logger.Logger) (storage.StorageClient, error)

NewClient creates a new storage client with google cloud

Types

type Config

type Config struct {

	// ProjectID is the project's ID s available in Google Cloud
	ProjectID string
}

Config is a structure containing configuration for google cloud storage

type GoogleStorageClient

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

GoogleStorageClient is a structure for handling google cloud storage

func (*GoogleStorageClient) BucketExists

func (sc *GoogleStorageClient) BucketExists(ctx context.Context, bucketName string) (bool, error)

BucketExists checks if a bucket exists

func (*GoogleStorageClient) CreateBucket

func (sc *GoogleStorageClient) CreateBucket(ctx context.Context, bucketName string) error

CreateBucket creates a bucket

func (*GoogleStorageClient) Upload

Upload uploads a new storage item and returns the URL to the stored item

Jump to

Keyboard shortcuts

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