Documentation
¶
Index ¶
- type Account
- type AccountIndex
- type AccountInvoice
- type AccountPayment
- type AddAccountInvoiceParams
- type BackendType
- type DBTX
- type DeleteAccountPaymentParams
- type GetAccountInvoiceParams
- type GetAccountPaymentParams
- type InsertAccountParams
- type Querier
- type Queries
- func (q *Queries) AddAccountInvoice(ctx context.Context, arg AddAccountInvoiceParams) error
- func (q *Queries) Backend() BackendType
- func (q *Queries) DeleteAccount(ctx context.Context, id int64) error
- func (q *Queries) DeleteAccountPayment(ctx context.Context, arg DeleteAccountPaymentParams) error
- func (q *Queries) GetAccount(ctx context.Context, id int64) (Account, error)
- func (q *Queries) GetAccountByLabel(ctx context.Context, label sql.NullString) (Account, error)
- func (q *Queries) GetAccountIDByAlias(ctx context.Context, alias int64) (int64, error)
- func (q *Queries) GetAccountIndex(ctx context.Context, name string) (int64, error)
- func (q *Queries) GetAccountInvoice(ctx context.Context, arg GetAccountInvoiceParams) (AccountInvoice, error)
- func (q *Queries) GetAccountPayment(ctx context.Context, arg GetAccountPaymentParams) (AccountPayment, error)
- func (q *Queries) InsertAccount(ctx context.Context, arg InsertAccountParams) (int64, error)
- func (q *Queries) ListAccountInvoices(ctx context.Context, accountID int64) ([]AccountInvoice, error)
- func (q *Queries) ListAccountPayments(ctx context.Context, accountID int64) ([]AccountPayment, error)
- func (q *Queries) ListAllAccounts(ctx context.Context) ([]Account, error)
- func (q *Queries) SetAccountIndex(ctx context.Context, arg SetAccountIndexParams) error
- func (q *Queries) UpdateAccountBalance(ctx context.Context, arg UpdateAccountBalanceParams) (int64, error)
- func (q *Queries) UpdateAccountExpiry(ctx context.Context, arg UpdateAccountExpiryParams) (int64, error)
- func (q *Queries) UpdateAccountLastUpdate(ctx context.Context, arg UpdateAccountLastUpdateParams) (int64, error)
- func (q *Queries) UpsertAccountPayment(ctx context.Context, arg UpsertAccountPaymentParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type SetAccountIndexParams
- type UpdateAccountBalanceParams
- type UpdateAccountExpiryParams
- type UpdateAccountLastUpdateParams
- type UpsertAccountPaymentParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountIndex ¶
type AccountInvoice ¶
type AccountPayment ¶
type AddAccountInvoiceParams ¶
type BackendType ¶
type BackendType uint8
BackendType is an enum that represents the type of database backend we're using.
const ( // BackendTypeUnknown indicates we're using an unknown backend. BackendTypeUnknown BackendType = iota // BackendTypeSqlite indicates we're using a SQLite backend. BackendTypeSqlite // BackendTypePostgres indicates we're using a Postgres backend. BackendTypePostgres )
type GetAccountInvoiceParams ¶
type GetAccountPaymentParams ¶
type InsertAccountParams ¶
type Querier ¶
type Querier interface { AddAccountInvoice(ctx context.Context, arg AddAccountInvoiceParams) error DeleteAccount(ctx context.Context, id int64) error DeleteAccountPayment(ctx context.Context, arg DeleteAccountPaymentParams) error GetAccount(ctx context.Context, id int64) (Account, error) GetAccountByLabel(ctx context.Context, label sql.NullString) (Account, error) GetAccountIDByAlias(ctx context.Context, alias int64) (int64, error) GetAccountIndex(ctx context.Context, name string) (int64, error) GetAccountInvoice(ctx context.Context, arg GetAccountInvoiceParams) (AccountInvoice, error) GetAccountPayment(ctx context.Context, arg GetAccountPaymentParams) (AccountPayment, error) InsertAccount(ctx context.Context, arg InsertAccountParams) (int64, error) ListAccountInvoices(ctx context.Context, accountID int64) ([]AccountInvoice, error) ListAccountPayments(ctx context.Context, accountID int64) ([]AccountPayment, error) ListAllAccounts(ctx context.Context) ([]Account, error) SetAccountIndex(ctx context.Context, arg SetAccountIndexParams) error UpdateAccountBalance(ctx context.Context, arg UpdateAccountBalanceParams) (int64, error) UpdateAccountExpiry(ctx context.Context, arg UpdateAccountExpiryParams) (int64, error) UpdateAccountLastUpdate(ctx context.Context, arg UpdateAccountLastUpdateParams) (int64, error) UpsertAccountPayment(ctx context.Context, arg UpsertAccountPaymentParams) error }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func NewPostgres ¶
NewPostgres creates a new Queries instance for a Postgres database.
func (*Queries) AddAccountInvoice ¶
func (q *Queries) AddAccountInvoice(ctx context.Context, arg AddAccountInvoiceParams) error
func (*Queries) Backend ¶
func (q *Queries) Backend() BackendType
Backend returns the type of database backend we're using.
func (*Queries) DeleteAccount ¶
func (*Queries) DeleteAccountPayment ¶
func (q *Queries) DeleteAccountPayment(ctx context.Context, arg DeleteAccountPaymentParams) error
func (*Queries) GetAccount ¶
func (*Queries) GetAccountByLabel ¶
func (*Queries) GetAccountIDByAlias ¶
func (*Queries) GetAccountIndex ¶
func (*Queries) GetAccountInvoice ¶
func (q *Queries) GetAccountInvoice(ctx context.Context, arg GetAccountInvoiceParams) (AccountInvoice, error)
func (*Queries) GetAccountPayment ¶
func (q *Queries) GetAccountPayment(ctx context.Context, arg GetAccountPaymentParams) (AccountPayment, error)
func (*Queries) InsertAccount ¶
func (*Queries) ListAccountInvoices ¶
func (*Queries) ListAccountPayments ¶
func (*Queries) ListAllAccounts ¶
func (*Queries) SetAccountIndex ¶
func (q *Queries) SetAccountIndex(ctx context.Context, arg SetAccountIndexParams) error
func (*Queries) UpdateAccountBalance ¶
func (*Queries) UpdateAccountExpiry ¶
func (*Queries) UpdateAccountLastUpdate ¶
func (*Queries) UpsertAccountPayment ¶
func (q *Queries) UpsertAccountPayment(ctx context.Context, arg UpsertAccountPaymentParams) error
type SetAccountIndexParams ¶
Click to show internal directories.
Click to hide internal directories.