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 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
Click to show internal directories.
Click to hide internal directories.