db

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyConfigured = errors.New("already configured")
View Source
var ErrLinkNotFound = errors.New("url(s) not found")
View Source
var ErrMultipleRowAffected = errors.New("multiple rows affected")
View Source
var ErrNoRowsAffected = errors.New("no rows affected")
View Source
var ErrNotConfigured = errors.New("not configured")
View Source
var ErrWrongPassword = errors.New("wrong password")
View Source
var ErrWrongUsername = errors.New("wrong username")

Functions

func AuthUser

func AuthUser(configData *models.ConfigureUserData) error

func Configure

func Configure(configData *models.ConfigureUserData) (err error)
func DeleteLink(id string) error
func GetLink(id string) (link models.CachedLink, err error)
func GetLinks(limit, offset int) (links []models.LinkWithStats, count int, err error)

func InsertClick

func InsertClick(click *models.Click) (err error)

func IsConfigured

func IsConfigured() bool
func SaveLink(link models.CachedLink) error
func UpdateLink(oldID string, link models.CachedLink) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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