weedfs

package
v0.0.0-...-1a51cf5 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Config *BackendConfig
}

Backend object

func NewWeedFsBackend

func NewWeedFsBackend(config map[string]interface{}) (weedFs *Backend)

NewWeedFsBackend instantiate a new WeedFS Data Backend from configuration passed as argument

func (*Backend) AddFile

func (weedFs *Backend) AddFile(ctx *juliet.Context, upload *common.Upload, file *common.File, fileReader io.Reader) (backendDetails map[string]interface{}, err error)

AddFile implementation for WeedFS Data Backend

func (*Backend) GetFile

func (weedFs *Backend) GetFile(ctx *juliet.Context, upload *common.Upload, id string) (reader io.ReadCloser, err error)

GetFile implementation for WeedFS Data Backend

func (*Backend) RemoveFile

func (weedFs *Backend) RemoveFile(ctx *juliet.Context, upload *common.Upload, id string) (err error)

RemoveFile implementation for WeedFS Data Backend

func (*Backend) RemoveUpload

func (weedFs *Backend) RemoveUpload(ctx *juliet.Context, upload *common.Upload) (err error)

RemoveUpload implementation for WeedFS Data Backend Iterates on every file and call RemoveFile

type BackendConfig

type BackendConfig struct {
	MasterURL          string
	ReplicationPattern string
}

BackendConfig describes configuration for WeedFS data backend

func NewWeedFsBackendConfig

func NewWeedFsBackendConfig(config map[string]interface{}) (bc *BackendConfig)

NewWeedFsBackendConfig instantiate a new default configuration and override it with configuration passed as argument

Jump to

Keyboard shortcuts

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