Documentation
¶
Index ¶
- Constants
- type Config
- type FeedItemStorage
- type FeedStorage
- type Plugin
- func (p *Plugin) FeedItemStorage() FeedItemStorage
- func (p *Plugin) FeedStorage() FeedStorage
- func (p *Plugin) Init(cfg config.Configurer, log *zap.Logger, db *mongo.Database) error
- func (p *Plugin) Name() string
- func (p *Plugin) Provides() []any
- func (p *Plugin) RoomStorage() RoomStorage
- func (p *Plugin) Serve() chan error
- func (p *Plugin) Stop() error
- func (p *Plugin) UserStorage() UserStorage
- type RoomStorage
- type UserStorage
Constants ¶
View Source
const PluginName = "storage"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeedItemStorage ¶
type FeedItemStorage interface {
Save(ctx context.Context, model *models.FeedItem) error
Delete(ctx context.Context, id string) error
Count(ctx context.Context, filter any) (int64, error)
Find(ctx context.Context, criteria mongoext.Criteria) ([]models.FeedItem, error)
FindById(ctx context.Context, id string) (models.FeedItem, error)
}
type FeedStorage ¶
type FeedStorage interface {
Save(ctx context.Context, model *models.Feed) error
Delete(ctx context.Context, id string) error
Count(ctx context.Context, filter any) (int64, error)
Find(ctx context.Context, criteria mongoext.Criteria) ([]models.Feed, error)
FindByLink(ctx context.Context, link string) (models.Feed, error)
FindById(ctx context.Context, id string) (models.Feed, error)
}
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) FeedItemStorage ¶
func (p *Plugin) FeedItemStorage() FeedItemStorage
func (*Plugin) FeedStorage ¶
func (p *Plugin) FeedStorage() FeedStorage
func (*Plugin) RoomStorage ¶
func (p *Plugin) RoomStorage() RoomStorage
func (*Plugin) UserStorage ¶
func (p *Plugin) UserStorage() UserStorage
type RoomStorage ¶
type UserStorage ¶
type UserStorage interface {
Find(ctx context.Context, criteria mongoext.Criteria) ([]models.User, error)
FindById(ctx context.Context, id string) (models.User, error)
FindByUsername(ctx context.Context, username string) (models.User, error)
Count(ctx context.Context, filter any) (int64, error)
Save(ctx context.Context, model *models.User) error
Delete(ctx context.Context, id string) error
}
Click to show internal directories.
Click to hide internal directories.