fs

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Paste

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

Paste is a struct containing a paste

func NewStorage

func NewStorage(dirname string) (*Paste, error)

NewStorage creates a file system storage

func (Paste) Flush

func (p Paste) Flush() error

Flush the storage

func (Paste) Get

func (p Paste) Get(URI string) (title string, date string, lang string, content []byte, err error)

Get will get a paste from the filesystem

func (Paste) Put

func (p Paste) Put(title, date, lang string, content []byte, destDir string) (string, error)

Put will write a paste to the file system

Jump to

Keyboard shortcuts

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