filesystem

package
v0.9.0-beta Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDiskStore

func NewDiskStore(opts Opts) (media.Store, error)

NewDiskStore initialises store for Filesystem provider.

Types

type Client

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

Client implements `media.Store`

func (*Client) Delete

func (c *Client) Delete(file string) error

Delete accepts a filename and removes it from disk.

func (*Client) Get

func (c *Client) Get(name string) string

Get accepts a filename and retrieves the full path from disk.

func (*Client) Put

func (c *Client) Put(filename string, cType string, src io.ReadSeeker) (string, error)

Put accepts the filename, the content type and file object itself and stores the file in disk.

type Opts

type Opts struct {
	UploadPath string `koanf:"upload_path"`
	UploadURI  string `koanf:"upload_uri"`
	RootURL    string `koanf:"root_url"`
}

Opts represents filesystem params

Jump to

Keyboard shortcuts

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