Documentation ¶
Index ¶
- Constants
- func ClearNamespace(c context.Context, kind string) error
- func ClearNamespaceAndMemcache(c context.Context, kind string) error
- func CountQueryWithFilter(c context.Context, kind string, filterStr string, filterValue interface{}) int
- func DeleteFromBlobstore(c context.Context, blobkey appengine.BlobKey) error
- func DeleteFromDatastoreFull(c context.Context, kind, stringID string, intID int64, parent *datastore.Key) error
- func DeleteFromDatastoreSimple(c context.Context, kind, stringID string) error
- func DeleteFromDatastoreSimpleAndMemcache(c context.Context, kind, stringID, memcacheID string) error
- func DeleteFromMemcache(c context.Context, memcacheID string)
- func FlushMemcache(c context.Context) error
- func GetFromBlobstore(c context.Context, blobkey appengine.BlobKey, dst interface{}) (interface{}, error)
- func GetFromDatastoreFull(c context.Context, kind, stringID string, intID int64, parent *datastore.Key, ...) error
- func GetFromDatastoreOrSetDefaultFull(c context.Context, kind, stringID string, intID int64, parent *datastore.Key, ...) error
- func GetFromDatastoreOrSetDefaultSimple(c context.Context, kind, stringID string, dst interface{}, def interface{}) error
- func GetFromDatastoreSimple(c context.Context, kind, stringID string, dst interface{}) error
- func GetFromDatastoreSimpleOrMemcache(c context.Context, kind, stringID, memcacheID string, dst interface{}) error
- func GetFromDatastoreSimpleWithParent(c context.Context, kind, stringID string, parent *datastore.Key, ...) error
- func GetFromFakeBlobstore(c context.Context, kind, stringID string, dst interface{}) error
- func GetFromMemcache(c context.Context, key string, dst interface{}) interface{}
- func IsVariableInDatastoreSimple(c context.Context, kind, stringID string, dst interface{}) bool
- func IsVariableInDatastoreSimpleOrMemcache(c context.Context, kind, stringID, memcacheID string, dst interface{}) bool
- func KeysToStringIDs(keys []*datastore.Key) []string
- func PutInDatastore(c context.Context, kind string, variable interface{}) (*datastore.Key, error)
- func PutInDatastoreFull(c context.Context, kind, stringID string, intID int64, parent *datastore.Key, ...) (*datastore.Key, error)
- func PutInDatastoreSimple(c context.Context, kind, stringID string, variable interface{}) (*datastore.Key, error)
- func PutInDatastoreSimpleAndMemcache(c context.Context, kind, stringID, memcacheID string, variable interface{}) (*datastore.Key, error)
- func PutInDatastoreSimpleWithParent(c context.Context, kind, stringID string, parent *datastore.Key, ...) (*datastore.Key, error)
- func PutInFakeBlobstore(c context.Context, kind, stringID string, toStore interface{}) error
- func PutInMemcache(c context.Context, key string, toStore interface{}) error
- func QueryGetAll(c context.Context, kind string, dst interface{}) ([]*datastore.Key, error)
- func QueryGetAllKeys(c context.Context, kind string, dst interface{}) ([]*datastore.Key, error)
- func QueryGetAllKeysWithFilter(c context.Context, kind string, filterStr string, filterValue interface{}, ...) []*datastore.Key
- func QueryGetAllKeysWithFilterAndLimit(c context.Context, kind string, filterStr string, filterValue interface{}, ...) []*datastore.Key
- func QueryGetAllKeysWithFilterAndOrder(c context.Context, kind string, filterStr string, filterValue interface{}, ...) ([]*datastore.Key, error)
- func QueryGetAllKeysWithFilterLimitAndOrder(c context.Context, kind string, filterStr string, filterValue interface{}, ...) ([]*datastore.Key, error)
- func QueryGetAllKeysWithFilterLimitOffsetAndOrder(c context.Context, kind string, filterStr string, filterValue interface{}, ...) ([]*datastore.Key, error)
- func QueryGetAllWithFilter(c context.Context, kind string, filterStr string, filterValue interface{}, ...) ([]*datastore.Key, error)
- func QueryGetAllWithFilterAndLimit(c context.Context, kind string, filterStr string, filterValue interface{}, ...) ([]*datastore.Key, error)
- func QueryGetAllWithLimit(c context.Context, kind string, limit int, dst interface{}) ([]*datastore.Key, error)
- func QueryGetFirstBy(c context.Context, kind string, order string, limit int, dst interface{}) ([]*datastore.Key, error)
- func QueryGetFirstKeysBy(c context.Context, kind string, order string, limit int, dst interface{}) ([]*datastore.Key, error)
- func TestMemcache(c context.Context)
- type FakeBlobstoreData
Constants ¶
View Source
const FakeBlobstoreBucket = "FakeBlobstore"
View Source
const MaxDataToStore int = 1000000 //<2**20 to fit into datastore
Variables ¶
This section is empty.
Functions ¶
func CountQueryWithFilter ¶
func DeleteFromBlobstore ¶
func DeleteFromDatastoreFull ¶
func DeleteFromMemcache ¶
func FlushMemcache ¶
func GetFromBlobstore ¶
func GetFromBlobstore(c context.Context, blobkey appengine.BlobKey, dst interface{}) (interface{}, error)
//TODO: fix
func PutInBlobstore(c context.Context, toStore interface{}) (appengine.BlobKey, error) { //TODO: check capabilities var k appengine.BlobKey var data bytes.Buffer enc := gob.NewEncoder(&data) err := enc.Encode(toStore) if err != nil { Log.Errorf(c, "PutInBlobstore - %s", err) return k, err } w, err := blobstore.Create(c, "application/octet-stream") if err != nil { Log.Errorf(c, "PutInBlobstore - %s", err) return k, err } _, err = w.Write(data.Bytes()) if err != nil { Log.Errorf(c, "PutInBlobstore - %s", err) return k, err } err = w.Close() if err != nil { Log.Errorf(c, "PutInBlobstore - %s", err) return k, err } k, err = w.Key() if err != nil { Log.Errorf(c, "PutInBlobstore - %s", err) } return k, err }
func GetFromDatastoreFull ¶
func GetFromDatastoreOrSetDefaultFull ¶
func GetFromDatastoreOrSetDefaultFull(c context.Context, kind, stringID string, intID int64, parent *datastore.Key, dst interface{}, def interface{}) error
A function that either loads a variable from datastore, or if it is not present, sets it and then loads it
func GetFromDatastoreSimple ¶
func GetFromFakeBlobstore ¶
func GetFromMemcache ¶
func KeysToStringIDs ¶
func PutInDatastore ¶
func PutInDatastoreFull ¶
func PutInDatastoreSimple ¶
func PutInFakeBlobstore ¶
func QueryGetAll ¶
func QueryGetAllKeys ¶
func QueryGetAllWithFilter ¶
func QueryGetAllWithLimit ¶
func QueryGetFirstBy ¶
func QueryGetFirstKeysBy ¶
func TestMemcache ¶
Types ¶
type FakeBlobstoreData ¶
type FakeBlobstoreData struct {
Data []byte `datastore:",noindex"`
}
Click to show internal directories.
Click to hide internal directories.