block

package
v0.0.0-...-b1b3a06 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	bun.BaseModel `bun:"blocks"`

	ID         int64     `bun:"id,pk,notnull,autoincrement"`
	Hash       string    `bun:"hash,type:text"`
	Timestamp  time.Time `bun:"timestamp,pk,notnull"`
	Level      int64     `bun:"level"`
	ProtocolID int64     `bun:"protocol_id,type:SMALLINT"`

	Protocol protocol.Protocol `bun:",rel:belongs-to"`
}

Block -

func (*Block) GetID

func (b *Block) GetID() int64

GetID -

func (Block) TableName

func (Block) TableName() string

type Repository

type Repository interface {
	Get(ctx context.Context, level int64) (Block, error)
	Last(ctx context.Context) (Block, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL