filestore

package
v0.0.0-...-5767ed4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeHashDirs

func MakeHashDirs(hash []byte) string

func MakeObjectPath

func MakeObjectPath(group string, hash []byte, suffix string) string

func MakePath

func MakePath(group string, hash []byte) string

Types

type Error

type Error error

Error represents a database specific error.

var (
	// ErrNotFound is returned when the file value is not found.
	ErrNotFound Error = fmt.Errorf("not found")
)

type FileStore

type FileStore interface {
	http.Module

	GetFile(ctx context.Context, group string, hash []byte, suffix string) ([]byte, Error)
	GetPresignedURL(ctx context.Context, group string, hash []byte, suffix string) (*url.URL, Error)
	PutFile(ctx context.Context, group string, hash []byte, suffix string, data []byte) Error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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