storage

package
v0.0.0-...-bc19bdb Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AferoConfig

type AferoConfig struct {
	FileLimit int    `json:"fileLimit"`
	BasePath  string `json:"basePath"`
}

type Configs

type Configs struct {
	Disk *AferoConfig `json:"disk"`
}

type Fs

type Fs interface {
	Configure(interface{}) error
	List(basePath string) (*Node, error)
}

Fs provides a common file-system API

type Node

type Node struct {
	Name     string
	Size     int64
	Modified time.Time
	Children []*Node
}

type Storage

type Storage struct {
	FileLimit   int
	FileSystems map[string]Fs
}

func New

func New() *Storage

func (*Storage) Configure

func (s *Storage) Configure(c Configs) error

func (*Storage) Get

func (s *Storage) Get(id string) (Fs, bool)

Jump to

Keyboard shortcuts

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