Documentation ¶
Index ¶
- type DB
- func (d *DB) BlockHeight() (height uint32, err error)
- func (d *DB) FindInscriptionsByPage(page, size int) (list []*tables.InscriptionId, err error)
- func (d *DB) FindInscriptionsInBlock(height uint32) (list []*model.OutPoint, err error)
- func (d *DB) FindInscriptionsInBlockPage(height, page, size int) (list []*model.OutPoint, err error)
- func (d *DB) FirstInscriptionByOwner(owner string) (firts tables.Inscriptions, err error)
- func (d *DB) GetInscriptionById(inscriptionId *tables.InscriptionId) (ins tables.Inscriptions, err error)
- func (d *DB) GetInscriptionByInscriptionNum(inscriptionNum int64) (ins tables.Inscriptions, err error)
- func (d *DB) GetInscriptionByOutpoint(outpoint *model.OutPoint) (list []*tables.InscriptionId, err error)
- func (d *DB) GetInscriptionBySequenceNum(sequenceNum int64) (ins tables.Inscriptions, err error)
- func (d *DB) InscriptionsNum() (total int64, err error)
- func (d *DB) InscriptionsStoredData() (total uint64, err error)
- func (d *DB) InscriptionsTotalFees() (total uint64, err error)
- func (d *DB) NextSequenceNumber() (num int64, err error)
- func (d *DB) SearchInscriptions(params *FindProtocolsParams) (list []*tables.Inscriptions, total int64, err error)
- func (d *DB) Transaction(fn func(tx *DB) error) error
- type DBOption
- type DBOptions
- type FindProtocolsParams
- type GormLogger
- func (g *GormLogger) Error(ctx context.Context, msg string, data ...interface{})
- func (g *GormLogger) Info(ctx context.Context, msg string, data ...interface{})
- func (g *GormLogger) LogMode(level logger.LogLevel) logger.Interface
- func (g *GormLogger) Print(data ...interface{})
- func (g *GormLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (g *GormLogger) Warn(ctx context.Context, msg string, data ...interface{})
- type Inscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
DB is a struct that embeds gorm.DB to provide additional database functionality.
func (*DB) BlockHeight ¶
BlockHeight retrieves the height of the last block in the database.
func (*DB) FindInscriptionsByPage ¶
func (d *DB) FindInscriptionsByPage(page, size int) (list []*tables.InscriptionId, err error)
FindInscriptionsByPage retrieves a page of inscription IDs. It returns a list of inscription IDs and any error encountered.
func (*DB) FindInscriptionsInBlock ¶
func (*DB) FindInscriptionsInBlockPage ¶
func (d *DB) FindInscriptionsInBlockPage(height, page, size int) (list []*model.OutPoint, err error)
FindInscriptionsInBlockPage retrieves a page of inscription IDs in a block. It returns a list of inscription IDs and any error encountered.
func (*DB) FirstInscriptionByOwner ¶
func (d *DB) FirstInscriptionByOwner(owner string) (firts tables.Inscriptions, err error)
func (*DB) GetInscriptionById ¶
func (d *DB) GetInscriptionById(inscriptionId *tables.InscriptionId) (ins tables.Inscriptions, err error)
GetInscriptionById retrieves an inscription by its outpoint. It returns the inscription and any error encountered.
func (*DB) GetInscriptionByInscriptionNum ¶
func (d *DB) GetInscriptionByInscriptionNum(inscriptionNum int64) (ins tables.Inscriptions, err error)
GetInscriptionByInscriptionNum retrieves an inscription by its sequence number. It returns the inscription and any error encountered.
func (*DB) GetInscriptionByOutpoint ¶
func (d *DB) GetInscriptionByOutpoint(outpoint *model.OutPoint) (list []*tables.InscriptionId, err error)
GetInscriptionByOutpoint retrieves an inscription by its outpoint.
func (*DB) GetInscriptionBySequenceNum ¶
func (d *DB) GetInscriptionBySequenceNum(sequenceNum int64) (ins tables.Inscriptions, err error)
GetInscriptionBySequenceNum retrieves an inscription by its sequence number. It returns the inscription and any error encountered.
func (*DB) InscriptionsNum ¶
func (*DB) InscriptionsStoredData ¶
func (*DB) InscriptionsTotalFees ¶
func (*DB) NextSequenceNumber ¶
NextSequenceNumber retrieves the next sequence number for inscriptions. It returns the next sequence number as an uint64 and any error encountered.
func (*DB) SearchInscriptions ¶
func (d *DB) SearchInscriptions(params *FindProtocolsParams) (list []*tables.Inscriptions, total int64, err error)
type DBOption ¶
type DBOption func(*DBOptions)
DBOption is a function type that modifies DBOptions.
func WithAutoMigrateTables ¶
func WithAutoMigrateTables(tables ...interface{}) DBOption
WithAutoMigrateTables returns a DBOption that sets the tables to be auto migrated in the database.
func WithDBName ¶
WithDBName returns a DBOption that sets the name of the database.
func WithPassword ¶
WithPassword returns a DBOption that sets the password of the database.
type DBOptions ¶
type DBOptions struct {
// contains filtered or unexported fields
}
DBOptions is a struct that holds the configuration options for the database.
type FindProtocolsParams ¶
type GormLogger ¶
GormLogger is a struct that embeds btclog.Logger to provide additional logging functionality.
func (*GormLogger) Error ¶
func (g *GormLogger) Error(ctx context.Context, msg string, data ...interface{})
Error is a method on GormLogger that logs an error message.
func (*GormLogger) Info ¶
func (g *GormLogger) Info(ctx context.Context, msg string, data ...interface{})
Info is a method on GormLogger that logs an informational message.
func (*GormLogger) LogMode ¶
func (g *GormLogger) LogMode(level logger.LogLevel) logger.Interface
LogMode is a method on GormLogger that sets the log level.
func (*GormLogger) Print ¶
func (g *GormLogger) Print(data ...interface{})
type Inscription ¶
type Inscription struct { *tables.Inscriptions *tables.SatPointToSequenceNum }
Inscription is a struct that embeds tables.Inscriptions and util.SatPoint.