storage_memory

package
v0.0.0-...-483e9f6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemory

type InMemory struct {
	storage.Storage
	// contains filtered or unexported fields
}

func New

func New(fs billy.Filesystem, rootPath ...string) *InMemory

New creates a new InMemory storage. rootPath is a spread operator because it's optional and it looks nicer.

func (*InMemory) CanReadURI

func (im *InMemory) CanReadURI(uri string) (bool, error)

func (*InMemory) Delete

func (im *InMemory) Delete(object string) error

func (*InMemory) Download

func (im *InMemory) Download(object string, toPath string) error

func (*InMemory) Exists

func (im *InMemory) Exists(object string) (bool, error)

func (*InMemory) Get

func (im *InMemory) Get(object string) ([]byte, error)

func (*InMemory) Put

func (im *InMemory) Put(object string, fromPath string) (*storage.UploadInfo, error)

func (*InMemory) PutBytes

func (im *InMemory) PutBytes(object string, blob []byte) (*storage.UploadInfo, error)

Jump to

Keyboard shortcuts

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