db

package
v0.0.0-...-7623c65 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	AddImgToDB(imgID, tok uuid.UUID) error
	QueryPics(tok uuid.UUID) ([]Picture, error)
	UpdateClicks(imgID uuid.UUID, amount int) error
	Init() error
}

Database represents a database connection with methods used for handling Pictures

func New

func New() Database

New returns the current implementation of a Database

type Picture

type Picture interface {
	Timestamp() time.Time
	UserToken() uuid.UUID
	PictureID() uuid.UUID
	PictureClicks() int
}

Picture represents an Interface of the Pictures as saved in the database

Jump to

Keyboard shortcuts

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