sqlite

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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) Close

func (s *SqliteStore) Close() error

Close closes the bolt database

func (*SqliteStore) CreateEntry

func (s *SqliteStore) CreateEntry(entry shared.Entry, id string) error

CreateEntry creates an entry by a given ID and returns an error

func (*SqliteStore) DeleteEntry

func (s *SqliteStore) DeleteEntry(id string) error

DeleteEntry deleted an entry by a given ID and returns an 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(id string) error

IncreaseVisitCounter increases the visit counter and sets the current time as the last visit ones

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL