storage

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Local

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

Local implements Storage interface operating with the local filesystem (possibly mounted to the container)

func NewLocal

func NewLocal(filesPath string, publicPath string) (*Local, error)

NewLocal creates new Local storage

func (l *Local) BuildLink(fileName string) string

BuildLink builds public-accessible link to file

func (*Local) BuildPath

func (l *Local) BuildPath(fileName string) string

BuildPath builds local path to file

func (*Local) CreateFile

func (l *Local) CreateFile(fileName string, body []byte) (string, error)

CreateFile creates file in `filesPath` directory with a given name and body

func (*Local) FileExists

func (l *Local) FileExists(fileName string) (bool, error)

FileExists checks if file exists in `filesPath` directory

Jump to

Keyboard shortcuts

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