storage

package
v0.0.0-...-026650a Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: ISC Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

ErrNotFound denotes that the object does not exists.

Functions

This section is empty.

Types

type File

type File struct {
	io.ReadSeekCloser

	Size         int64
	ContentType  string
	ETag         string
	LastModified time.Time
}

File contents and info.

type Store

type Store interface {
	Store(ctx context.Context, bucket, name string, data []byte, opts ...func(*StoreOpts)) (err error)
	Open(ctx context.Context, bucket, name string) (f *File, err error)
	Delete(ctx context.Context, bucket, name string) (err error)
}

Store interface.

type StoreOpt

type StoreOpt func(*StoreOpts)

StoreOpt type.

func StoreWithCacheControl

func StoreWithCacheControl(s string) StoreOpt

StoreWithCacheControl option.

func StoreWithContentEncoding

func StoreWithContentEncoding(s string) StoreOpt

StoreWithContentEncoding option.

func StoreWithContentType

func StoreWithContentType(s string) StoreOpt

StoreWithContentType option.

type StoreOpts

type StoreOpts struct {
	ContentType     string
	ContentEncoding string
	CacheControl    string
}

StoreOpts to set while storing.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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