Documentation ¶
Index ¶
- type Account
- type FindAccountRow
- type Queries
- func (q *Queries) FindAccountByEmail(ctx context.Context, email string) (*FindAccountRow, error)
- func (q *Queries) FindAccountByID(ctx context.Context, id uuid.UUID) (*FindAccountRow, error)
- func (q *Queries) FindAll(ctx context.Context) ([]*FindAccountRow, error)
- func (q *Queries) FindResumeAccount(ctx context.Context, email string) (*ResumeAccount, error)
- func (q *Queries) SaveAccount(ctx context.Context, params SaveAccountParams) error
- func (q *Queries) SaveTransaction(ctx context.Context, params SaveTransactionParams) error
- func (q *Queries) SetSnapshotTransactions(ctx context.Context, snapshotID uuid.UUID, transactionIDs uuid.UUIDs) error
- func (q *Queries) WithTx(tx *sqlx.Tx) *Queries
- type Query
- type ResumeAccount
- type SaveAccountParams
- type SaveTransactionParams
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ID uuid.UUID `db:"id" json:"id"` AccountType string `db:"account_type" json:"account_type"` CustomerName string `db:"customer_name" json:"customer_name"` DocumentNumber string `db:"document_number" json:"document_number"` Email string `db:"email" json:"email"` PasswordEncoded string `db:"password_encoded" json:"password_encoded"` PhoneNumber string `db:"phone_number" json:"phone_number"` Status string `db:"status" json:"status"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
type FindAccountRow ¶
type FindAccountRow struct { Account Transactions json.RawMessage `db:"transactions"` }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) FindAccountByEmail ¶
func (*Queries) FindAccountByID ¶
func (*Queries) FindResumeAccount ¶
func (*Queries) SaveAccount ¶
func (q *Queries) SaveAccount(ctx context.Context, params SaveAccountParams) error
func (*Queries) SaveTransaction ¶
func (q *Queries) SaveTransaction(ctx context.Context, params SaveTransactionParams) error
func (*Queries) SetSnapshotTransactions ¶
type ResumeAccount ¶
type SaveAccountParams ¶
type SaveAccountParams struct { ID uuid.UUID `db:"id" json:"id"` AccountType string `db:"account_type" json:"account_type"` CustomerName string `db:"customer_name" json:"customer_name"` DocumentNumber string `db:"document_number" json:"document_number"` Email string `db:"email" json:"email"` PasswordEncoded string `db:"password_encoded" json:"password_encoded"` PhoneNumber string `db:"phone_number" json:"phone_number"` Status string `db:"status" json:"status"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
type SaveTransactionParams ¶
type SaveTransactionParams struct { ID uuid.UUID `db:"id" json:"id"` AccountID uuid.UUID `db:"account_id" json:"account_id"` TransactionType string `db:"transaction_type" json:"transaction_type"` Timestamp time.Time `db:"timestamp" json:"timestamp"` Amount int64 `db:"amount" json:"amount"` SnapshotID uuid.NullUUID `db:"snapshot_id" json:"snapshot_id"` }
type Transaction ¶
type Transaction struct { ID uuid.UUID `db:"id" json:"id"` AccountID uuid.UUID `db:"account_type" json:"account_type"` Timestamp time.Time `db:"timestamp" json:"timestamp"` TransactionType string `db:"transaction_type" json:"transaction_type"` Amount int64 `db:"amount" json:"amount"` SnapshotID uuid.NullUUID `db:"snapshot_id" json:"snapshot_id"` }
Click to show internal directories.
Click to hide internal directories.