Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadFileToObject ¶
Load file to struct
func WriteObjectToFile ¶
Store struct to file
Types ¶
type BlobStore ¶
type BlobStore interface { Store(key string, object interface{}) error // Ugly way to abstract the return type, as in Go you can't cast []interface{} to a // specific type. Users will have to assume the interface{} is a array type of // objects created by the factory func. // Factory is the function to create a per typed interface object LoadAll(factory func() interface{}) (interface{}, error) Load(key string, object interface{}) error Delete(key string) error }
func NewBlobStore ¶
func NewBlobStore(name string, config BlobStoreConfig) (BlobStore, error)
type BlobStoreConfig ¶
type DatastoreDB ¶
type DatastoreDB struct { Name string DomainName string ProjectId string Config BlobStoreConfig // contains filtered or unexported fields }
func NewDatastoreDB ¶
func NewDatastoreDB(name string, config BlobStoreConfig) (*DatastoreDB, error)
func (*DatastoreDB) Delete ¶
func (db *DatastoreDB) Delete(key string) error
func (*DatastoreDB) Load ¶
func (db *DatastoreDB) Load(key string, object interface{}) error
func (*DatastoreDB) LoadAll ¶
func (db *DatastoreDB) LoadAll(f func() interface{}) (interface{}, error)
func (*DatastoreDB) Store ¶
func (db *DatastoreDB) Store(key string, object interface{}) error
type FileStore ¶
File store saves each key value as a seperate file in the folder that's specified in the Path This is meant to be used only for local testing and usage.
type SimpleDB ¶
type SimpleDB struct { Name string Region string Config BlobStoreConfig // contains filtered or unexported fields }
func NewSimpleDB ¶
func NewSimpleDB(name string, config BlobStoreConfig) (*SimpleDB, error)
Click to show internal directories.
Click to hide internal directories.