package
0.0.0-20241027210334-41bbf5e38139
Repository: https://github.com/axmdv/go-url-shortener.git
Documentation: pkg.go.dev

# Packages

Package mocks is a generated GoMock package.

# Functions

NewDBRepository returns new DBRepository.
NewDuplicateError return new AddURLError.
NewFileRepository returns new FileRepository.
NewNoContentError returns new NoContentError.
NewRAMRepository returns new RAMRepository.
NewRepository returns repository, that implements Repository interface.
NewURLFileSaver returns new URLFileSaver.
NewURLReader returns new URLFileReader.

# Variables

ErrDuplicate is duplicate error.
ErrNoContent is error when there is no wanted data.

# Structs

AddURLError is duplicating error.
DBRepository is a postgres-based repository.
DeleteBatch is struct to delete batch of urls.
FileRepository is a file-based and in-memory-based repository.
FormedURL is data of an url.
NoContentError is error when there is no wanted data.
RAMRepository is in-memory repository.
URLFileReader is object that provides reading urls data from file.
URLFileSaver is object that provides writing urls data to file.

# Interfaces

Closer is an interface that can close DB.
Pinger is an interface that pings DB.
Repository is the interface that stores urls.