filestore

package
v0.0.0-...-1388524 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package filestore handles storing and reading arbitrary binary files.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidURL = errors.New("the file storage URL could not be recognized")

ErrInvalidURL is returned when retreiving files with an invalid URL.

Functions

func GetFile

func GetFile(url []byte) ([]byte, error)

GetFile retrieves the contents of a file given a URL generated by StoreFile.

func StoreFile

func StoreFile(contents []byte) (string, []byte, error)

StoreFile stores the given byte strings, returning a hash and URL where the file can be loaded from using GetFile.

Types

This section is empty.

Jump to

Keyboard shortcuts

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