repository

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo struct {
	Db *gorm.DB
}

func (*Repo) CreateWatcher

func (r *Repo) CreateWatcher(watcher *models.Watcher) (*models.Watcher, error)

func (*Repo) DeleteWatcher

func (r *Repo) DeleteWatcher(watcherID string) error

func (*Repo) FindWatcherByID

func (r *Repo) FindWatcherByID(watcherID string) (*models.Watcher, error)

func (*Repo) FindWatcherByName

func (r *Repo) FindWatcherByName(watcherName string) (*models.Watcher, error)

func (*Repo) FindWatchers

func (r *Repo) FindWatchers() ([]*models.Watcher, error)

func (*Repo) UpdateWatcher

func (r *Repo) UpdateWatcher(watcher *models.Watcher) (*models.Watcher, error)

type Repository

type Repository interface {
	CreateWatcher(watcher *models.Watcher) (*models.Watcher, error)
	FindWatchers() ([]*models.Watcher, error)
	FindWatcherByID(watcherID string) (*models.Watcher, error)
	FindWatcherByName(watcherName string) (*models.Watcher, error)
	UpdateWatcher(watcher *models.Watcher) (*models.Watcher, error)
	DeleteWatcher(watcherID string) error
}

func New

func New(db *gorm.DB) Repository

Jump to

Keyboard shortcuts

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