Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileStore ¶
type FileStore interface { Add(string, []byte) (string, error) // Add creates a file with name & content to the storage, returns id Remove(string) bool // Remove deletes a file by id Get(string) file.File // Get file by id, nil if not exists List() []string // List return all file ids }
FileStore defines interface to store file
func NewFileLocalStore ¶
NewFileLocalStore create new local file store
func NewFileMemoryStore ¶
func NewFileMemoryStore() FileStore
NewFileMemoryStore create new memory file store
Click to show internal directories.
Click to hide internal directories.