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

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