storage

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package storage defines the interface to talk to the storage backends

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

type Meta struct {
	ContentType  string
	LastCached   time.Time
	LastModified time.Time
}

Meta contains the metadata to be written / read

type Storage

type Storage interface {
	GetFile(ctx context.Context, cachePath string) (io.ReadSeekCloser, error)
	LoadMeta(ctx context.Context, cachePath string) (*Meta, error)
	StoreFile(ctx context.Context, cachePath string, metadata *Meta, data io.Reader) error
}

Storage is the interface to implement when building a storage backend

Directories

Path Synopsis
Package gcs implements a storage backend saving files in GCS
Package gcs implements a storage backend saving files in GCS
Package local implements a storage.Storage backend for local file storage
Package local implements a storage.Storage backend for local file storage

Jump to

Keyboard shortcuts

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