eventstore

package
v0.0.0-...-40b14aa Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	Find(db *gorm.DB, req *Request) (*nostr.Event, error)
	FindAll(db *gorm.DB, req *Request) ([]*nostr.Event, error)
	FindByID(db *gorm.DB, ID string) (*models.RelayEvent, error)
	Count(db *gorm.DB, req *Request) (*int64, error)
	Insert(db *gorm.DB, req *models.RelayEvent) error
	SoftDelete(db *gorm.DB, req *models.RelayEvent) error
	Delete(db *gorm.DB, req *models.RelayEvent) error
	InsertBlacklist(db *gorm.DB, req *models.Blacklist) error
	FindBlacklists(db *gorm.DB, req *models.Blacklist) ([]*models.Blacklist, error)
}

repository interface

func NewRepository

func NewRepository() Repository

type Request

type Request struct {
	NostrFilter *nostr.Filter
	DoCount     bool
	NoLimit     bool
}

type Service

type Service interface {
	FindAll(c *cctx.Context, req *Request) ([]*nostr.Event, error)
	FindByID(c *cctx.Context, ID string) (*nostr.Event, error)
	Count(c *cctx.Context, req *Request) (*int64, error)
	Insert(c *cctx.Context, req *models.RelayEvent) error
	SoftDelete(c *cctx.Context, req *models.RelayEvent) error
	Delete(c *cctx.Context, req *models.RelayEvent) error
	InsertBlacklist(c *cctx.Context, req *models.Blacklist) error
	FindBlacklists(c *cctx.Context, req *models.Blacklist) ([]*models.Blacklist, error)
	ClearEventsWithBlacklist(c *cctx.Context) error
}

Service service interface

func NewService

func NewService() Service

Jump to

Keyboard shortcuts

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