gcloudstorage

package
v0.8.29 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCloudStorage

type GCloudStorage struct {
	BaseDir    string
	PathPrefix string
	ACL        string
	SafeChars  string
	Expiration time.Duration

	Bucket string
	// contains filtered or unexported fields
}

func New

func New(client *storage.Client, bucket string, options ...Option) *GCloudStorage

func (*GCloudStorage) Get added in v0.8.23

func (s *GCloudStorage) Get(r *http.Request, image string) (imageData *imagor.Bytes, err error)

func (*GCloudStorage) Path

func (s *GCloudStorage) Path(image string) (string, bool)

func (*GCloudStorage) Put added in v0.8.23

func (s *GCloudStorage) Put(ctx context.Context, image string, blob *imagor.Bytes) (err error)

func (*GCloudStorage) Stat added in v0.8.23

func (s *GCloudStorage) Stat(ctx context.Context, image string) (stat *imagor.Stat, err error)

type Option

type Option func(h *GCloudStorage)

func WithACL

func WithACL(acl string) Option

func WithBaseDir

func WithBaseDir(baseDir string) Option

func WithExpiration

func WithExpiration(exp time.Duration) Option

func WithPathPrefix

func WithPathPrefix(prefix string) Option

func WithSafeChars

func WithSafeChars(chars string) Option

Jump to

Keyboard shortcuts

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