filestore

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

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