Documentation
¶
Index ¶
- Constants
- Variables
- func AddBlockHook(hookPoint boil.HookPoint, blockHook BlockHook)
- func AddMempoolTransactionHook(hookPoint boil.HookPoint, mempoolTransactionHook MempoolTransactionHook)
- func AddTransactionAuditlogHook(hookPoint boil.HookPoint, transactionAuditlogHook TransactionAuditlogHook)
- func AddUtxoHook(hookPoint boil.HookPoint, utxoHook UtxoHook)
- func BlockExists(ctx context.Context, exec boil.ContextExecutor, rowid int) (bool, error)
- func Blocks(mods ...qm.QueryMod) blockQuery
- func MempoolTransactionExists(ctx context.Context, exec boil.ContextExecutor, rowid int) (bool, error)
- func MempoolTransactions(mods ...qm.QueryMod) mempoolTransactionQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func TransactionAuditlogExists(ctx context.Context, exec boil.ContextExecutor, rowid int) (bool, error)
- func TransactionAuditlogs(mods ...qm.QueryMod) transactionAuditlogQuery
- func UtxoExists(ctx context.Context, exec boil.ContextExecutor, rowid int) (bool, error)
- func Utxos(mods ...qm.QueryMod) utxoQuery
- type Block
- func (o *Block) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Block) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Block) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Block) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Block) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type BlockHook
- type BlockSlice
- type M
- type MempoolTransaction
- func (o *MempoolTransaction) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *MempoolTransaction) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *MempoolTransaction) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *MempoolTransaction) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *MempoolTransaction) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type MempoolTransactionHook
- type MempoolTransactionSlice
- func (o MempoolTransactionSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *MempoolTransactionSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o MempoolTransactionSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
- type TransactionAuditlog
- func (o *TransactionAuditlog) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *TransactionAuditlog) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *TransactionAuditlog) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *TransactionAuditlog) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *TransactionAuditlog) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type TransactionAuditlogHook
- type TransactionAuditlogSlice
- func (o TransactionAuditlogSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *TransactionAuditlogSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o TransactionAuditlogSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
- type Utxo
- func (o *Utxo) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Utxo) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Utxo) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Utxo) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Utxo) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type UtxoHook
- type UtxoSlice
Constants ¶
const ( TransactionStatusPending = "pending" TransactionStatusMined = "mined" TransactionStatusRejected = "rejected" )
Enum values for transaction_status
Variables ¶
var BlockColumns = struct { Rowid string Height string BlockID string ParentID string Raw string }{ Rowid: "rowid", Height: "height", BlockID: "block_id", ParentID: "parent_id", Raw: "raw", }
var BlockRels = struct {
}{}
BlockRels is where relationship names are stored.
var BlockWhere = struct { Rowid whereHelperint Height whereHelperint BlockID whereHelper__byte ParentID whereHelpernull_Bytes Raw whereHelper__byte }{ Rowid: whereHelperint{/* contains filtered or unexported fields */}, Height: whereHelperint{/* contains filtered or unexported fields */}, BlockID: whereHelper__byte{/* contains filtered or unexported fields */}, ParentID: whereHelpernull_Bytes{/* contains filtered or unexported fields */}, Raw: whereHelper__byte{/* contains filtered or unexported fields */}, }
var ErrSyncFail = errors.New("models: failed to synchronize data after insert")
ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.
var MempoolTransactionColumns = struct { Rowid string Txid string Raw string }{ Rowid: "rowid", Txid: "txid", Raw: "raw", }
var MempoolTransactionRels = struct {
}{}
MempoolTransactionRels is where relationship names are stored.
var MempoolTransactionWhere = struct { Rowid whereHelperint Txid whereHelpertypes_BytesArray Raw whereHelper__byte }{ Rowid: whereHelperint{/* contains filtered or unexported fields */}, Txid: whereHelpertypes_BytesArray{/* contains filtered or unexported fields */}, Raw: whereHelper__byte{/* contains filtered or unexported fields */}, }
var TableNames = struct { Block string MempoolTransaction string TransactionAuditlog string Utxo string }{ Block: "block", MempoolTransaction: "mempool_transaction", TransactionAuditlog: "transaction_auditlog", Utxo: "utxo", }
var TransactionAuditlogColumns = struct { Rowid string Txid string Raw string Status string }{ Rowid: "rowid", Txid: "txid", Raw: "raw", Status: "status", }
var TransactionAuditlogRels = struct {
}{}
TransactionAuditlogRels is where relationship names are stored.
var TransactionAuditlogWhere = struct { Rowid whereHelperint Txid whereHelpertypes_BytesArray Raw whereHelper__byte Status whereHelperstring }{ Rowid: whereHelperint{/* contains filtered or unexported fields */}, Txid: whereHelpertypes_BytesArray{/* contains filtered or unexported fields */}, Raw: whereHelper__byte{/* contains filtered or unexported fields */}, Status: whereHelperstring{/* contains filtered or unexported fields */}, }
var UtxoColumns = struct { Rowid string Txid string OutputIdx string Value string ScriptPubkey string }{ Rowid: "rowid", Txid: "txid", OutputIdx: "output_idx", Value: "value", ScriptPubkey: "script_pubkey", }
var UtxoRels = struct {
}{}
UtxoRels is where relationship names are stored.
var UtxoWhere = struct { Rowid whereHelperint Txid whereHelpertypes_BytesArray OutputIdx whereHelperint Value whereHelperint ScriptPubkey whereHelper__byte }{ Rowid: whereHelperint{/* contains filtered or unexported fields */}, Txid: whereHelpertypes_BytesArray{/* contains filtered or unexported fields */}, OutputIdx: whereHelperint{/* contains filtered or unexported fields */}, Value: whereHelperint{/* contains filtered or unexported fields */}, ScriptPubkey: whereHelper__byte{/* contains filtered or unexported fields */}, }
Functions ¶
func AddBlockHook ¶
AddBlockHook registers your hook function for all future operations.
func AddMempoolTransactionHook ¶
func AddMempoolTransactionHook(hookPoint boil.HookPoint, mempoolTransactionHook MempoolTransactionHook)
AddMempoolTransactionHook registers your hook function for all future operations.
func AddTransactionAuditlogHook ¶
func AddTransactionAuditlogHook(hookPoint boil.HookPoint, transactionAuditlogHook TransactionAuditlogHook)
AddTransactionAuditlogHook registers your hook function for all future operations.
func AddUtxoHook ¶
AddUtxoHook registers your hook function for all future operations.
func BlockExists ¶
BlockExists checks if the Block row exists.
func MempoolTransactionExists ¶
func MempoolTransactionExists(ctx context.Context, exec boil.ContextExecutor, rowid int) (bool, error)
MempoolTransactionExists checks if the MempoolTransaction row exists.
func MempoolTransactions ¶
MempoolTransactions retrieves all the records using an executor.
func TransactionAuditlogExists ¶
func TransactionAuditlogExists(ctx context.Context, exec boil.ContextExecutor, rowid int) (bool, error)
TransactionAuditlogExists checks if the TransactionAuditlog row exists.
func TransactionAuditlogs ¶
TransactionAuditlogs retrieves all the records using an executor.
func UtxoExists ¶
UtxoExists checks if the Utxo row exists.
Types ¶
type Block ¶
type Block struct { Rowid int `boil:"rowid" json:"rowid" toml:"rowid" yaml:"rowid"` Height int `boil:"height" json:"height" toml:"height" yaml:"height"` BlockID []byte `boil:"block_id" json:"block_id" toml:"block_id" yaml:"block_id"` ParentID null.Bytes `boil:"parent_id" json:"parent_id,omitempty" toml:"parent_id" yaml:"parent_id,omitempty"` Raw []byte `boil:"raw" json:"raw" toml:"raw" yaml:"raw"` R *blockR `boil:"-" json:"-" toml:"-" yaml:"-"` L blockL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Block is an object representing the database table.
func FindBlock ¶
func FindBlock(ctx context.Context, exec boil.ContextExecutor, rowid int, selectCols ...string) (*Block, error)
FindBlock retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Block) Delete ¶
Delete deletes a single Block record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Block) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Block) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Block) Update ¶
func (o *Block) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Block. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*Block) Upsert ¶
func (o *Block) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type BlockSlice ¶
type BlockSlice []*Block
BlockSlice is an alias for a slice of pointers to Block. This should generally be used opposed to []Block.
func (BlockSlice) DeleteAll ¶
func (o BlockSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*BlockSlice) ReloadAll ¶
func (o *BlockSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (BlockSlice) UpdateAll ¶
func (o BlockSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type MempoolTransaction ¶
type MempoolTransaction struct { Rowid int `boil:"rowid" json:"rowid" toml:"rowid" yaml:"rowid"` Txid types.BytesArray `boil:"txid" json:"txid" toml:"txid" yaml:"txid"` Raw []byte `boil:"raw" json:"raw" toml:"raw" yaml:"raw"` R *mempoolTransactionR `boil:"-" json:"-" toml:"-" yaml:"-"` L mempoolTransactionL `boil:"-" json:"-" toml:"-" yaml:"-"` }
MempoolTransaction is an object representing the database table.
func FindMempoolTransaction ¶
func FindMempoolTransaction(ctx context.Context, exec boil.ContextExecutor, rowid int, selectCols ...string) (*MempoolTransaction, error)
FindMempoolTransaction retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*MempoolTransaction) Delete ¶
func (o *MempoolTransaction) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single MempoolTransaction record with an executor. Delete will match against the primary key column to find the record to delete.
func (*MempoolTransaction) Insert ¶
func (o *MempoolTransaction) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*MempoolTransaction) Reload ¶
func (o *MempoolTransaction) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*MempoolTransaction) Update ¶
func (o *MempoolTransaction) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the MempoolTransaction. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*MempoolTransaction) Upsert ¶
func (o *MempoolTransaction) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type MempoolTransactionHook ¶
type MempoolTransactionHook func(context.Context, boil.ContextExecutor, *MempoolTransaction) error
MempoolTransactionHook is the signature for custom MempoolTransaction hook methods
type MempoolTransactionSlice ¶
type MempoolTransactionSlice []*MempoolTransaction
MempoolTransactionSlice is an alias for a slice of pointers to MempoolTransaction. This should generally be used opposed to []MempoolTransaction.
func (MempoolTransactionSlice) DeleteAll ¶
func (o MempoolTransactionSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*MempoolTransactionSlice) ReloadAll ¶
func (o *MempoolTransactionSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (MempoolTransactionSlice) UpdateAll ¶
func (o MempoolTransactionSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type TransactionAuditlog ¶
type TransactionAuditlog struct { Rowid int `boil:"rowid" json:"rowid" toml:"rowid" yaml:"rowid"` Txid types.BytesArray `boil:"txid" json:"txid" toml:"txid" yaml:"txid"` Raw []byte `boil:"raw" json:"raw" toml:"raw" yaml:"raw"` Status string `boil:"status" json:"status" toml:"status" yaml:"status"` R *transactionAuditlogR `boil:"-" json:"-" toml:"-" yaml:"-"` L transactionAuditlogL `boil:"-" json:"-" toml:"-" yaml:"-"` }
TransactionAuditlog is an object representing the database table.
func FindTransactionAuditlog ¶
func FindTransactionAuditlog(ctx context.Context, exec boil.ContextExecutor, rowid int, selectCols ...string) (*TransactionAuditlog, error)
FindTransactionAuditlog retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*TransactionAuditlog) Delete ¶
func (o *TransactionAuditlog) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single TransactionAuditlog record with an executor. Delete will match against the primary key column to find the record to delete.
func (*TransactionAuditlog) Insert ¶
func (o *TransactionAuditlog) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*TransactionAuditlog) Reload ¶
func (o *TransactionAuditlog) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*TransactionAuditlog) Update ¶
func (o *TransactionAuditlog) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the TransactionAuditlog. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*TransactionAuditlog) Upsert ¶
func (o *TransactionAuditlog) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type TransactionAuditlogHook ¶
type TransactionAuditlogHook func(context.Context, boil.ContextExecutor, *TransactionAuditlog) error
TransactionAuditlogHook is the signature for custom TransactionAuditlog hook methods
type TransactionAuditlogSlice ¶
type TransactionAuditlogSlice []*TransactionAuditlog
TransactionAuditlogSlice is an alias for a slice of pointers to TransactionAuditlog. This should generally be used opposed to []TransactionAuditlog.
func (TransactionAuditlogSlice) DeleteAll ¶
func (o TransactionAuditlogSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*TransactionAuditlogSlice) ReloadAll ¶
func (o *TransactionAuditlogSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (TransactionAuditlogSlice) UpdateAll ¶
func (o TransactionAuditlogSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Utxo ¶
type Utxo struct { Rowid int `boil:"rowid" json:"rowid" toml:"rowid" yaml:"rowid"` Txid types.BytesArray `boil:"txid" json:"txid" toml:"txid" yaml:"txid"` OutputIdx int `boil:"output_idx" json:"output_idx" toml:"output_idx" yaml:"output_idx"` Value int `boil:"value" json:"value" toml:"value" yaml:"value"` ScriptPubkey []byte `boil:"script_pubkey" json:"script_pubkey" toml:"script_pubkey" yaml:"script_pubkey"` R *utxoR `boil:"-" json:"-" toml:"-" yaml:"-"` L utxoL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Utxo is an object representing the database table.
func FindUtxo ¶
func FindUtxo(ctx context.Context, exec boil.ContextExecutor, rowid int, selectCols ...string) (*Utxo, error)
FindUtxo retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Utxo) Delete ¶
Delete deletes a single Utxo record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Utxo) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Utxo) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Utxo) Update ¶
func (o *Utxo) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Utxo. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*Utxo) Upsert ¶
func (o *Utxo) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type UtxoSlice ¶
type UtxoSlice []*Utxo
UtxoSlice is an alias for a slice of pointers to Utxo. This should generally be used opposed to []Utxo.