Documentation
¶
Index ¶
- type MongoStorage
- func (m *MongoStorage) CheckMultiple(link string, i int) (bool, error)
- func (m *MongoStorage) FindHash(hash string) (string, error)
- func (m *MongoStorage) FindLink(link string) (string, error)
- func (m *MongoStorage) GetAll() ([]data.LinkData, error)
- func (m *MongoStorage) Remove(hash string) error
- func (m *MongoStorage) Save(linkData *data.LinkData) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoStorage ¶
MongoStorage is the interface of CRUD methods
func (*MongoStorage) CheckMultiple ¶
func (m *MongoStorage) CheckMultiple(link string, i int) (bool, error)
CheckMultiple uses mongo to findout If a link was inserted twice
func (*MongoStorage) FindHash ¶
func (m *MongoStorage) FindHash(hash string) (string, error)
FindHash finds an specific hash Stored on Mongo
func (*MongoStorage) FindLink ¶
func (m *MongoStorage) FindLink(link string) (string, error)
FindLink searches for an specific link inside Mongo
func (*MongoStorage) GetAll ¶
func (m *MongoStorage) GetAll() ([]data.LinkData, error)
GetAll queries for all entries
func (*MongoStorage) Remove ¶
func (m *MongoStorage) Remove(hash string) error
Remove removes a link from Mongo
Click to show internal directories.
Click to hide internal directories.