gcs

package
v0.0.0-...-900be4e Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package gcs provides an image uploader for GCS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Uploader

type Uploader struct {
	KeyFile string
	Bucket  string
	// contains filtered or unexported fields
}

Uploader supports uploading images to GCS.

func NewUploader

func NewUploader(keyFile, bucket, path string, enableSignedURLs bool, signedURLExpiration time.Duration) (*Uploader, error)

NewUploader returns a new Uploader.

func (*Uploader) Upload

func (u *Uploader) Upload(ctx context.Context, imageDiskPath string) (string, error)

Upload uploads an image to GCS.

Jump to

Keyboard shortcuts

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