filestore

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: AGPL-3.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssetURL

func AssetURL(baseURL string, key string) (string, error)

func CleanKey

func CleanKey(key string) (string, error)

func NormalizeBaseURL

func NormalizeBaseURL(baseURL string) string

func SignTestfile

func SignTestfile(sha256Hex string, expiresUnix int64, signingKey []byte) string

func SignedTestfileURL

func SignedTestfileURL(baseURL string, sha256Hex string, signingKey []byte, expires time.Time) string

func ValidTestfileSignature

func ValidTestfileSignature(sha256Hex string, expiresUnix int64, signature string, signingKey []byte, now time.Time) bool

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(root string) (*Store, error)

func (*Store) Delete

func (s *Store) Delete(key string) error

func (*Store) Download

func (s *Store) Download(key string) ([]byte, error)

func (*Store) Exists

func (s *Store) Exists(key string) (bool, error)

func (*Store) Open

func (s *Store) Open(key string) (io.ReadCloser, error)

func (*Store) Path

func (s *Store) Path(key string) (string, error)

func (*Store) Root

func (s *Store) Root() string

func (*Store) ServeHTTP

func (s *Store) ServeHTTP(w http.ResponseWriter, r *http.Request, key string) error

func (*Store) Upload

func (s *Store) Upload(content []byte, key string, mediaType string) (string, error)

Jump to

Keyboard shortcuts

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