Documentation ¶
Index ¶
- type SqliteStore
- func (s *SqliteStore) Close() error
- func (s *SqliteStore) CreateEntry(entry shared.Entry, id string) (*shared.Entry, error)
- func (s *SqliteStore) CreateUser(user models.User) (*models.User, error)
- func (s *SqliteStore) DeleteEntry(id string) error
- func (s *SqliteStore) FindUserByEmail(email string) (*models.User, error)
- func (s *SqliteStore) FindUserByToken(token string) (*models.User, error)
- func (s *SqliteStore) GetEntryByID(id string) (*shared.Entry, error)
- func (s *SqliteStore) GetVisitors(id string) ([]shared.Visitor, error)
- func (s *SqliteStore) IncreaseVisitCounter(link *shared.Entry) error
- func (s *SqliteStore) LinkUpdate(link *shared.Entry) (*shared.Entry, error)
- func (s *SqliteStore) LinksList() ([]*shared.Entry, error)
- func (s *SqliteStore) ListStats() (*int, *int, error)
- func (s *SqliteStore) UserUpdateToken(id uint, token string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SqliteStore ¶
type SqliteStore struct {
// contains filtered or unexported fields
}
BoltStore implements the stores.Storage interface
func New ¶
func New(path string) (*SqliteStore, error)
func (*SqliteStore) CreateEntry ¶
CreateEntry creates an entry by a given ID and returns an error
func (*SqliteStore) CreateUser ¶ added in v0.0.6
func (*SqliteStore) DeleteEntry ¶
func (s *SqliteStore) DeleteEntry(id string) error
DeleteEntry deleted an entry by a given ID and returns an error
func (*SqliteStore) FindUserByEmail ¶ added in v0.0.6
func (s *SqliteStore) FindUserByEmail(email string) (*models.User, error)
func (*SqliteStore) FindUserByToken ¶ added in v0.0.6
func (s *SqliteStore) FindUserByToken(token string) (*models.User, error)
func (*SqliteStore) GetEntryByID ¶
func (s *SqliteStore) GetEntryByID(id string) (*shared.Entry, error)
GetEntryByID returns a entry and an error by the shorted ID
func (*SqliteStore) GetVisitors ¶
func (s *SqliteStore) GetVisitors(id string) ([]shared.Visitor, error)
GetVisitors returns the visitors and an error of an entry
func (*SqliteStore) IncreaseVisitCounter ¶
func (s *SqliteStore) IncreaseVisitCounter(link *shared.Entry) error
IncreaseVisitCounter increases the visit counter and sets the current time as the last visit ones gorm.expr only works on initial 0 dunno why
func (*SqliteStore) LinkUpdate ¶ added in v0.0.6
func (*SqliteStore) LinksList ¶ added in v0.0.6
func (s *SqliteStore) LinksList() ([]*shared.Entry, error)
LinksList returns a List of all available Links formerly "entries"
func (*SqliteStore) ListStats ¶ added in v0.0.13
func (s *SqliteStore) ListStats() (*int, *int, error)
func (*SqliteStore) UserUpdateToken ¶ added in v0.0.6
func (s *SqliteStore) UserUpdateToken(id uint, token string) error
Click to show internal directories.
Click to hide internal directories.