storage

package module
v0.0.0-...-9c0ecef Latest Latest
Warning

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

Go to latest
Published: May 5, 2017 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

storage

A cross-platform storage library in Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StorageCollection

type StorageCollection struct {
	Name string
	// contains filtered or unexported fields
}

StorageCollection contains all of the storage interfaces that we need in the application. You should only need one StorageCollection in your application.

func New

func New(name string) *StorageCollection

New creates a new StorageCollection.

func (*StorageCollection) GetStore

func (sc *StorageCollection) GetStore(folder string) *Store

GetStore returns the store for the folder/directory given.

func (*StorageCollection) NewStorage

func (sc *StorageCollection) NewStorage(folder string) *Store

NewStorage creates a new store and adds it to the StorageCollection and returns it. If the folder/directory store already exists in the collection, nothing will be created, but it will return the existing Store.

type Store

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

Store is one part of a larger StorageCollection. We can have as many Stores as we need. When creating a Store, it should be added into the main StorageCollection.

func (*Store) GetCachePath

func (s *Store) GetCachePath() string

GetCachePath returns the cache path of the directory of the Store. Cache can be deleted at any time on the OS, and should only be used for actual caching objects instead of important data.

func (*Store) GetPath

func (s *Store) GetPath() string

GetPath returns the path of the directory of the Store.

Jump to

Keyboard shortcuts

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