v2

package
v0.0.0-...-580f6f5 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsActive

func IsActive(ctx context.Context, db *gorm.DB) (bool, error)

Types

type DIDTableEntry

type DIDTableEntry struct {
	DID string `gorm:"column:did;primarykey"`

	Log EntryLog `gorm:"type:JSONB[]"`
}

func (DIDTableEntry) TableName

func (DIDTableEntry) TableName() string

type Database

type Database struct {
	// contains filtered or unexported fields
}

func New

func New(db *gorm.DB) *Database

func (*Database) AppendEntries

func (d *Database) AppendEntries(ctx context.Context, entries []plc.OperationLogEntry) error

func (*Database) AutoMigrate

func (d *Database) AutoMigrate() error

func (*Database) HeadTimestamp

func (d *Database) HeadTimestamp(ctx context.Context) (string, error)

func (*Database) LastOperationForDID

func (d *Database) LastOperationForDID(ctx context.Context, did string) (*plc.OperationLogEntry, error)

type EntryLog

type EntryLog []plc.OperationLogEntry

func (EntryLog) GormValue

func (e EntryLog) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (*EntryLog) Scan

func (e *EntryLog) Scan(src any) error

type HeadTimestamp

type HeadTimestamp struct {
	Timestamp string
}

func (HeadTimestamp) TableName

func (HeadTimestamp) TableName() string

Jump to

Keyboard shortcuts

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