Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoSuchLink = errors.New("no such link")
ErrNoSuchLink is returned when a given Link does not exist.
Functions ¶
This section is empty.
Types ¶
type LinkRepository ¶
type LinkRepository interface {
New(url string) (*Link, error)
Get(id string) (*Link, error)
CountVisit(id string) error
}
A LinkRepository provides all the operations to create and store links.
func NewDiskRepository ¶
func NewDiskRepository(path string) (LinkRepository, error)
NewDiskRepository returns a new LinkRepository that stores data in disk using Badger DB.
Click to show internal directories.
Click to hide internal directories.