Documentation ¶
Index ¶
- Constants
- func KeyFediAccountLoginCount(accountID int64) []byte
- func KeyFediAccountLoginLast(accountID int64) []byte
- type Client
- func (c *Client) Close(ctx context.Context) db.Error
- func (c *Client) CountFediAccounts(ctx context.Context) (int64, db.Error)
- func (c *Client) CountFediAccountsForInstance(ctx context.Context, instanceID int64) (int64, db.Error)
- func (*Client) CountFediAccountsWithCouncil(_ context.Context) (count int64, err db.Error)
- func (c *Client) CountFediInstances(ctx context.Context) (int64, db.Error)
- func (c *Client) CountTransactions(ctx context.Context) (count int64, err db.Error)
- func (c *Client) CreateFediAccount(ctx context.Context, account *models.FediAccount) db.Error
- func (c *Client) CreateFediInstance(ctx context.Context, instance *models.FediInstance) db.Error
- func (c *Client) CreateTransaction(ctx context.Context, transaction *models.Transaction) (err db.Error)
- func (c *Client) CreateTransactionTX(ctx context.Context, txID db.TxID, transaction *models.Transaction) (err db.Error)
- func (c *Client) DoMigration(ctx context.Context) db.Error
- func (c *Client) IncFediAccountLoginCount(ctx context.Context, account *models.FediAccount) db.Error
- func (c *Client) LoadTestData(_ context.Context) db.Error
- func (c *Client) PageHelper(ctx context.Context, tableName string, index, count int) (int64, error)
- func (*Client) ProcessError(err error) db.Error
- func (c *Client) ReadFediAccount(ctx context.Context, id int64) (*models.FediAccount, db.Error)
- func (c *Client) ReadFediAccountByUsername(ctx context.Context, instanceID int64, username string) (*models.FediAccount, db.Error)
- func (c *Client) ReadFediAccountsPage(ctx context.Context, index, count int) ([]*models.FediAccount, db.Error)
- func (c *Client) ReadFediInstance(ctx context.Context, id int64) (*models.FediInstance, db.Error)
- func (c *Client) ReadFediInstanceByDomain(ctx context.Context, domain string) (*models.FediInstance, db.Error)
- func (c *Client) ReadFediInstancesPage(ctx context.Context, index, count int) ([]*models.FediInstance, db.Error)
- func (c *Client) ReadTransaction(ctx context.Context, id int64) (transaction *models.Transaction, err db.Error)
- func (c *Client) ReadTransactionsPage(ctx context.Context, index, count int) (transactions []*models.Transaction, err db.Error)
- func (c *Client) ResetCache(_ context.Context) db.Error
- func (*Client) TxCommit(ctx context.Context, id db.TxID) db.Error
- func (*Client) TxNew(ctx context.Context) (db.TxID, db.Error)
- func (*Client) TxRollback(ctx context.Context, id db.TxID) db.Error
- func (c *Client) UpdateFediAccount(ctx context.Context, account *models.FediAccount) db.Error
- func (c *Client) UpdateFediInstance(ctx context.Context, instance *models.FediInstance) db.Error
Constants ¶
View Source
const (
KeyNotFoundError = "rpc error: code = Unknown desc = key not found"
)
Variables ¶
This section is empty.
Functions ¶
func KeyFediAccountLoginLast ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a DB interface compatible client for ImmuDB.
func (*Client) CountFediAccounts ¶
func (*Client) CountFediAccountsForInstance ¶
func (*Client) CountFediAccountsWithCouncil ¶
func (*Client) CountFediInstances ¶
func (*Client) CountTransactions ¶
func (*Client) CreateFediAccount ¶
func (*Client) CreateFediInstance ¶
func (*Client) CreateTransaction ¶
func (*Client) CreateTransactionTX ¶
func (*Client) IncFediAccountLoginCount ¶
func (*Client) PageHelper ¶
func (*Client) ProcessError ¶
ProcessError replaces any known values with our own db.Error types.
func (*Client) ReadFediAccount ¶
func (*Client) ReadFediAccountByUsername ¶
func (*Client) ReadFediAccountsPage ¶
func (*Client) ReadFediInstance ¶
func (*Client) ReadFediInstanceByDomain ¶
func (*Client) ReadFediInstancesPage ¶
func (*Client) ReadTransaction ¶
func (*Client) ReadTransactionsPage ¶
func (*Client) UpdateFediAccount ¶
func (*Client) UpdateFediInstance ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.