repository

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: AGPL-3.0 Imports: 4 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 {
	SaveSubscription(sub Subscription) error
	RemoveSubscription(sub Subscription) error
	GetUserSubscriptions(userID int) ([]Subscription, error)
	GetAllSubscriptions() ([]Subscription, error)
	DeleteAllSubscriptions() error

	io.Closer
}

Repository describes a storage to save user subscriptions.

func NewSqliteRepository

func NewSqliteRepository(dsn string) (Repository, error)

NewSqliteRepository returns new Repository instance.

type Subscription

type Subscription struct {
	UserID  int
	Link    string
	AppName string
}

Subscription describes user subscription.

Jump to

Keyboard shortcuts

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