Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheStorage ¶
type CacheStorage interface { Connect(c context.Context, host, userName, userPw, database string) error Close(context.Context) error GetCacheStorageClient() (CacheStorageGetter, CacheStorageSetter) }
type CacheStorageError ¶
type CacheStorageGetter ¶
type CacheStorageGetter interface { GetById(c context.Context, collectionName string, id string, ver string, dest interface{}) CacheStorageError GetManyByIds(c context.Context, collectionName string, ids []string, ver string, dest interface{}) CacheStorageError GetAll(c context.Context, collectionName string, ver string, dest interface{}) CacheStorageError GetLatestVersions(c context.Context) ([]CacheVersion, CacheStorageError) GetLatestCollectionVersion(c context.Context, collection string) (CacheVersion, CacheStorageError) /*TODO: move to persistent storage*/ GetArrayBySingleId(c context.Context, collectionName string, id string, ver string, dest interface{}) CacheStorageError }
type CacheStorageGetterMiddleware ¶
type CacheStorageGetterMiddleware func(cacheStorageGetter CacheStorageGetter) CacheStorageGetter
type CacheStorageGetterWrapper ¶
type CacheStorageGetterWrapper interface { CacheStorageGetter }
type CacheStorageSetter ¶
type CacheStorageSetter interface { Insert(c context.Context, collectionName string, id string, ver string, item interface{}) CacheStorageError InsertMany(c context.Context, collectionName string, ver string, items map[string]interface{}) CacheStorageError InsertOrUpdate(c context.Context, collectionName string, id string, ver string, item interface{}) CacheStorageError Update(c context.Context, collectionName string, id string, ver string, item interface{}) CacheStorageError Remove(c context.Context, collectionName string, id string, ver string) CacheStorageError RemoveAll(c context.Context, collectionName string, ver string) CacheStorageError /*TODO: move to persistent storage*/ GetAndLockById(c context.Context, collectionName string, id string, dest interface{}) CacheStorageError ReleaseLockedById(c context.Context, collectionName string, id string) CacheStorageError }
type CacheStorageSetterMiddleware ¶
type CacheStorageSetterMiddleware func(setter CacheStorageSetter) CacheStorageSetter
type CacheStorageSetterWrapper ¶
type CacheStorageSetterWrapper interface { CacheStorageSetter }
type CacheVersion ¶
Click to show internal directories.
Click to hide internal directories.