Documentation
¶
Index ¶
- func New(_ context.Context, d db.DB) (db.DB, error)
- type CacheMem
- func (c CacheMem) Close(ctx context.Context) db.Error
- func (c CacheMem) CountAccounts(ctx context.Context) (int64, db.Error)
- func (c CacheMem) CountAccountsForInstance(ctx context.Context, instanceID int64) (int64, db.Error)
- func (c CacheMem) CountBlocks(ctx context.Context) (count int64, err db.Error)
- func (c CacheMem) CountInstances(ctx context.Context) (count int64, err db.Error)
- func (c CacheMem) CountLogEntries(ctx context.Context) (count int64, err db.Error)
- func (c CacheMem) CreateAccount(ctx context.Context, account *models.Account) db.Error
- func (c CacheMem) CreateBlockTX(ctx context.Context, txID db.TxID, blocks ...*models.Block) (err db.Error)
- func (c CacheMem) CreateConfigTX(ctx context.Context, txID db.TxID, configs ...*models.Config) (err db.Error)
- func (c CacheMem) CreateInstance(ctx context.Context, instance *models.Instance) (err db.Error)
- func (c CacheMem) CreateLogEntryTX(ctx context.Context, txID db.TxID, logEntries ...*models.LogEntry) (err db.Error)
- func (c CacheMem) DeleteBlock(ctx context.Context, blocks ...*models.Block) (err db.Error)
- func (c CacheMem) DeleteConfigTX(ctx context.Context, txID db.TxID, configs ...*models.Config) (err db.Error)
- func (c CacheMem) DoMigration(ctx context.Context) db.Error
- func (c CacheMem) IncAccountLoginCount(ctx context.Context, account *models.Account) db.Error
- func (c CacheMem) ReadAccount(ctx context.Context, id int64) (*models.Account, db.Error)
- func (c CacheMem) ReadAccountByUsername(ctx context.Context, instanceID int64, username string) (*models.Account, db.Error)
- func (c CacheMem) ReadAccountsPage(ctx context.Context, index, count int) ([]*models.Account, db.Error)
- func (c CacheMem) ReadBlock(ctx context.Context, id int64) (block *models.Block, err db.Error)
- func (c CacheMem) ReadBlockByDomain(ctx context.Context, domain string) (block *models.Block, err db.Error)
- func (c CacheMem) ReadBlocks(ctx context.Context) (blocks []*models.Block, err db.Error)
- func (c CacheMem) ReadBlocksPage(ctx context.Context, index, count int) (blocks []*models.Block, err db.Error)
- func (c CacheMem) ReadConfig(ctx context.Context, id int64) (config *models.Config, err db.Error)
- func (c CacheMem) ReadConfigByKey(ctx context.Context, key models.ConfigKey) (config *models.Config, err db.Error)
- func (c CacheMem) ReadConfigsForAccountForKeys(ctx context.Context, accountID int64, keys ...models.ConfigKey) (configs []*models.Config, err db.Error)
- func (c CacheMem) ReadConfigsForKeysSystem(ctx context.Context, keys ...models.ConfigKey) (configs []*models.Config, err db.Error)
- func (c CacheMem) ReadConfigsForKeysUser(ctx context.Context, keys ...models.ConfigKey) (configs []*models.Config, err db.Error)
- func (c CacheMem) ReadInstance(ctx context.Context, id int64) (instance *models.Instance, err db.Error)
- func (c CacheMem) ReadInstanceByActorIRI(ctx context.Context, actorIRI string) (instance *models.Instance, err db.Error)
- func (c CacheMem) ReadInstanceByDomain(ctx context.Context, domain string) (instance *models.Instance, err db.Error)
- func (c CacheMem) ReadInstanceByServerHostname(ctx context.Context, serverHostname string) (instance *models.Instance, err db.Error)
- func (c CacheMem) ReadInstances(ctx context.Context, ids ...int64) (instances []*models.Instance, err db.Error)
- func (c CacheMem) ReadInstancesPage(ctx context.Context, index, count int) (instances []*models.Instance, err db.Error)
- func (c CacheMem) ReadInstancesWhereFollowing(ctx context.Context) (instances []*models.Instance, err db.Error)
- func (c CacheMem) ReadInstancesWithBlockID(ctx context.Context, blockID int64) (instances []*models.Instance, err db.Error)
- func (c CacheMem) ReadInstancesWithDomainSuffix(ctx context.Context, domainSuffix string) (instances []*models.Instance, err db.Error)
- func (c CacheMem) ReadLogEntriesPage(ctx context.Context, index, count int, asc bool) (instances []*models.LogEntry, err db.Error)
- func (c CacheMem) TxCommit(ctx context.Context, id db.TxID) db.Error
- func (c CacheMem) TxNew(ctx context.Context) (db.TxID, db.Error)
- func (c CacheMem) TxRollback(ctx context.Context, id db.TxID) db.Error
- func (c CacheMem) UpdateAccount(ctx context.Context, account *models.Account) db.Error
- func (c CacheMem) UpdateBlockTX(ctx context.Context, txID db.TxID, blocks ...*models.Block) (err db.Error)
- func (c CacheMem) UpdateConfigTX(ctx context.Context, txID db.TxID, configs ...*models.Config) (err db.Error)
- func (c CacheMem) UpdateInstance(ctx context.Context, instance *models.Instance) (err db.Error)
- func (c CacheMem) UpdateInstanceTX(ctx context.Context, txID db.TxID, instance *models.Instance) (err db.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheMem ¶
type CacheMem struct {
// contains filtered or unexported fields
}
CacheMem is an in memory caching middleware for our db interface.
func (CacheMem) CountAccounts ¶
func (CacheMem) CountAccountsForInstance ¶
func (CacheMem) CountBlocks ¶
func (CacheMem) CountInstances ¶
func (CacheMem) CountLogEntries ¶
func (CacheMem) CreateAccount ¶
func (CacheMem) CreateBlockTX ¶
func (CacheMem) CreateConfigTX ¶
func (CacheMem) CreateInstance ¶
func (CacheMem) CreateLogEntryTX ¶
func (CacheMem) DeleteBlock ¶
func (CacheMem) DeleteConfigTX ¶
func (CacheMem) IncAccountLoginCount ¶
func (CacheMem) ReadAccount ¶
func (CacheMem) ReadAccountByUsername ¶
func (CacheMem) ReadAccountsPage ¶
func (CacheMem) ReadBlockByDomain ¶
func (CacheMem) ReadBlocks ¶
func (CacheMem) ReadBlocksPage ¶
func (CacheMem) ReadConfig ¶
func (CacheMem) ReadConfigByKey ¶
func (CacheMem) ReadConfigsForAccountForKeys ¶
func (CacheMem) ReadConfigsForKeysSystem ¶
func (CacheMem) ReadConfigsForKeysUser ¶
func (CacheMem) ReadInstance ¶
func (CacheMem) ReadInstanceByActorIRI ¶
func (CacheMem) ReadInstanceByDomain ¶
func (CacheMem) ReadInstanceByServerHostname ¶
func (CacheMem) ReadInstances ¶
func (CacheMem) ReadInstancesPage ¶
func (CacheMem) ReadInstancesWhereFollowing ¶
func (CacheMem) ReadInstancesWithBlockID ¶
func (CacheMem) ReadInstancesWithDomainSuffix ¶
func (CacheMem) ReadLogEntriesPage ¶
func (CacheMem) UpdateAccount ¶
func (CacheMem) UpdateBlockTX ¶
func (CacheMem) UpdateConfigTX ¶
func (CacheMem) UpdateInstance ¶
Click to show internal directories.
Click to hide internal directories.