Documentation ¶
Index ¶
- func NewV2(rootPath string) (s.BasicStorage, error)
- type Storage
- func (s *Storage) Delete(key string) (bool, error)
- func (s *Storage) Exist(key string) (bool, error)
- func (s *Storage) Load(key string) (io.ReadCloser, error)
- func (s *Storage) LoadStr(key string) (string, error)
- func (s *Storage) Save(key string, value io.Reader) error
- func (s *Storage) SaveAndUpdate(key string, value io.Reader) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Storage ¶
type Storage struct {
RootPath string
}
Storage stores files locally
func New ¶
New creates Storage with given configuration(local path) returns error if any mistake occured, and process should cease
func (*Storage) Load ¶
func (s *Storage) Load(key string) (io.ReadCloser, error)
Load retrieves a target from local
Click to show internal directories.
Click to hide internal directories.