Documentation
¶
Index ¶
- func NewAPIRepo(log logger.Logger, db *DB) domain.APIRepo
- func NewDeviceRepo(log logger.Logger, db *DB) domain.DeviceRepo
- func NewMangaDataRepo(log logger.Logger, db *DB) domain.MangaDataRepo
- func NewNotificationRepo(log logger.Logger, db *DB) domain.NotificationRepo
- func NewSyncRepo(log logger.Logger, db *DB) domain.SyncRepo
- func NewUserRepo(log logger.Logger, db *DB) domain.UserRepo
- type APIRepo
- type DB
- type DeviceRepo
- func (r DeviceRepo) Delete(ctx context.Context, id int) error
- func (r DeviceRepo) GetDeviceByApiKey(ctx context.Context, device *domain.Device) (*domain.Device, error)
- func (r DeviceRepo) GetDeviceByDeviceId(ctx context.Context, device *domain.Device) (*domain.Device, error)
- func (r DeviceRepo) ListDevices(ctx context.Context, apikey string) ([]domain.Device, error)
- func (r DeviceRepo) Store(ctx context.Context, device *domain.Device) (*domain.Device, error)
- type ILikeDynamic
- type MangaRepo
- func (m MangaRepo) Delete(ctx context.Context, id int) error
- func (m MangaRepo) GetMangaDataByApiKey(ctx context.Context, apiKey string) (*domain.MangaData, error)
- func (m MangaRepo) ListMangaData(ctx context.Context, apiKey string) ([]domain.MangaData, error)
- func (m MangaRepo) Store(ctx context.Context, mdata *domain.MangaData) (*domain.MangaData, error)
- func (m MangaRepo) Update(ctx context.Context, mdata *domain.MangaData) (*domain.MangaData, error)
- type NotificationRepo
- func (r *NotificationRepo) Delete(ctx context.Context, notificationID int) error
- func (r *NotificationRepo) Find(ctx context.Context, params domain.NotificationQueryParams) ([]domain.Notification, int, error)
- func (r *NotificationRepo) FindByID(ctx context.Context, id int) (*domain.Notification, error)
- func (r *NotificationRepo) List(ctx context.Context) ([]domain.Notification, error)
- func (r *NotificationRepo) Store(ctx context.Context, notification domain.Notification) (*domain.Notification, error)
- func (r *NotificationRepo) Update(ctx context.Context, notification domain.Notification) (*domain.Notification, error)
- type SyncRepo
- func (r SyncRepo) Delete(ctx context.Context, id int) error
- func (r SyncRepo) GetSyncByApiKey(ctx context.Context, apiKey string) (*domain.Sync, error)
- func (r SyncRepo) GetSyncByDeviceID(ctx context.Context, deviceID int) (*domain.Sync, error)
- func (r SyncRepo) ListSyncs(ctx context.Context, apiKey string) ([]domain.Sync, error)
- func (r SyncRepo) Store(ctx context.Context, sync *domain.Sync) (*domain.Sync, error)
- func (r SyncRepo) SyncData(ctx context.Context, sync *domain.SyncData) (*domain.SyncData, error)
- func (r SyncRepo) Update(ctx context.Context, sync *domain.Sync) (*domain.Sync, error)
- type Tx
- type UserRepo
- func (r *UserRepo) FindByUsername(ctx context.Context, username string) (*domain.User, error)
- func (r *UserRepo) GetUserCount(ctx context.Context) (int, error)
- func (r *UserRepo) Store(ctx context.Context, user domain.User) error
- func (r *UserRepo) Update(ctx context.Context, user domain.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDeviceRepo ¶
func NewDeviceRepo(log logger.Logger, db *DB) domain.DeviceRepo
func NewMangaDataRepo ¶
func NewMangaDataRepo(log logger.Logger, db *DB) domain.MangaDataRepo
func NewNotificationRepo ¶
func NewNotificationRepo(log logger.Logger, db *DB) domain.NotificationRepo
Types ¶
type DeviceRepo ¶
type DeviceRepo struct {
// contains filtered or unexported fields
}
func (DeviceRepo) GetDeviceByApiKey ¶
func (DeviceRepo) GetDeviceByDeviceId ¶
func (DeviceRepo) ListDevices ¶
type ILikeDynamic ¶
func ILike ¶
func ILike(col string, val string) ILikeDynamic
ILike is a wrapper for sq.Like and sq.ILike SQLite does not support ILike but postgres does so this checks what database is being used
type MangaRepo ¶
type MangaRepo struct {
// contains filtered or unexported fields
}
func (MangaRepo) GetMangaDataByApiKey ¶
func (MangaRepo) ListMangaData ¶
type NotificationRepo ¶
type NotificationRepo struct {
// contains filtered or unexported fields
}
func (*NotificationRepo) Delete ¶
func (r *NotificationRepo) Delete(ctx context.Context, notificationID int) error
func (*NotificationRepo) Find ¶
func (r *NotificationRepo) Find(ctx context.Context, params domain.NotificationQueryParams) ([]domain.Notification, int, error)
func (*NotificationRepo) FindByID ¶
func (r *NotificationRepo) FindByID(ctx context.Context, id int) (*domain.Notification, error)
func (*NotificationRepo) List ¶
func (r *NotificationRepo) List(ctx context.Context) ([]domain.Notification, error)
func (*NotificationRepo) Store ¶
func (r *NotificationRepo) Store(ctx context.Context, notification domain.Notification) (*domain.Notification, error)
func (*NotificationRepo) Update ¶
func (r *NotificationRepo) Update(ctx context.Context, notification domain.Notification) (*domain.Notification, error)
type SyncRepo ¶
type SyncRepo struct {
// contains filtered or unexported fields
}
func (SyncRepo) GetSyncByApiKey ¶
func (SyncRepo) GetSyncByDeviceID ¶
type UserRepo ¶
type UserRepo struct {
// contains filtered or unexported fields
}
func (*UserRepo) FindByUsername ¶
Click to show internal directories.
Click to hide internal directories.