Documentation ¶
Index ¶
- Variables
- type APIKeyStorage
- type LinkStorage
- type Storage
- type StorageInfo
- type Store
- func (s *Store) Close() error
- func (s *Store) Counts() (c *models.Counts, err error)
- func (s *Store) DB() *badger.DB
- func (s *Store) Delete(key uint64) error
- func (s *Store) List() ([]*models.ShortURL, error)
- func (s *Store) Load(key uint64) (string, error)
- func (s *Store) LoadInfo(key uint64) (*models.ShortURL, error)
- func (s *Store) Register(obj *models.APIKey) error
- func (s *Store) Retrieve(clientID string) (*models.APIKey, error)
- func (s *Store) Save(obj *models.ShortURL) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("object not found in database") ErrAlreadyExists = errors.New("object already exists in the database") )
Functions ¶
This section is empty.
Types ¶
type APIKeyStorage ¶ added in v1.1.0
type LinkStorage ¶ added in v1.1.0
type Storage ¶
type Storage interface { io.Closer LinkStorage APIKeyStorage StorageInfo }
type StorageInfo ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.