store

package
v0.0.0-...-1889e68 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDb

func GetDb() *sql.DB

Types

type LiteStore

type LiteStore struct {
	LiteDB *sql.DB
}

func NewLiteStore

func NewLiteStore() *LiteStore

you can implement other stores if you want it

func (*LiteStore) Exists

func (ls *LiteStore) Exists(s ...string) bool

func (*LiteStore) GetAll

func (ls *LiteStore) GetAll() []Site

func (*LiteStore) Store

func (ls *LiteStore) Store(author, path string) error

type Site

type Site struct {
	Id      *int64  `json:"id"`
	Author  *string `json:"author"`
	Mapping *string `json:"mapping"`
	Created *int64  `json:"created"`
	Updated *int64  `json:"updated"`
	Time    *string `json:"time"`
}

type SiteStore

type SiteStore interface {
	Store(author, path string) error
	Exists(...string) bool
	GetAll() []Site
}

Jump to

Keyboard shortcuts

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