gcs

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 14 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