Versions in this module Expand all Collapse all v1 v1.2.0 Jan 21, 2019 v1.1.0 Jan 6, 2019 Changes in this version + type Accessor interface + Close func() error + Count func(locator store.Locator) (int, error) + Create func(comment store.Comment) (commentID string, err error) + Find func(locator store.Locator, sort string) ([]store.Comment, error) + Get func(locator store.Locator, commentID string) (store.Comment, error) + Info func(locator store.Locator, readonlyAge int) (store.PostInfo, error) + Last func(siteID string, limit int) ([]store.Comment, error) + List func(siteID string, limit int, skip int) ([]store.PostInfo, error) + Put func(locator store.Locator, comment store.Comment) error + User func(siteID, userID string, limit, skip int) ([]store.Comment, error) + UserCount func(siteID, userID string) (int, error) + type Admin interface + Blocked func(siteID string) ([]store.BlockedUser, error) + Delete func(locator store.Locator, commentID string, mode store.DeleteMode) error + DeleteAll func(siteID string) error + DeleteUser func(siteID string, userID string) error + IsBlocked func(siteID string, userID string) bool + IsReadOnly func(locator store.Locator) bool + IsVerified func(siteID string, userID string) bool + SetBlock func(siteID string, userID string, status bool, ttl time.Duration) error + SetReadOnly func(locator store.Locator, status bool) error + SetVerified func(siteID string, userID string, status bool) error + Verified func(siteID string) ([]string, error) + type BoltDB struct + func NewBoltDB(options bolt.Options, sites ...BoltSite) (*BoltDB, error) + func (b *BoltDB) Blocked(siteID string) (users []store.BlockedUser, err error) + func (b *BoltDB) Close() error + func (b *BoltDB) Count(locator store.Locator) (count int, err error) + func (b *BoltDB) Create(comment store.Comment) (commentID string, err error) + func (b *BoltDB) Delete(locator store.Locator, commentID string, mode store.DeleteMode) error + func (b *BoltDB) DeleteAll(siteID string) error + func (b *BoltDB) DeleteUser(siteID string, userID string) error + func (b *BoltDB) Find(locator store.Locator, sortFld string) (comments []store.Comment, err error) + func (b *BoltDB) Get(locator store.Locator, commentID string) (comment store.Comment, err error) + func (b *BoltDB) Info(locator store.Locator, readOnlyAge int) (store.PostInfo, error) + func (b *BoltDB) IsBlocked(siteID string, userID string) (blocked bool) + func (b *BoltDB) IsReadOnly(locator store.Locator) (ro bool) + func (b *BoltDB) IsVerified(siteID string, userID string) (verified bool) + func (b *BoltDB) Last(siteID string, max int) (comments []store.Comment, err error) + func (b *BoltDB) Put(locator store.Locator, comment store.Comment) error + func (b *BoltDB) SetBlock(siteID string, userID string, status bool, ttl time.Duration) error + func (b *BoltDB) SetReadOnly(locator store.Locator, status bool) error + func (b *BoltDB) SetVerified(siteID string, userID string, status bool) error + func (b *BoltDB) User(siteID, userID string, limit, skip int) (comments []store.Comment, err error) + func (b *BoltDB) UserCount(siteID, userID string) (int, error) + func (b *BoltDB) Verified(siteID string) (ids []string, err error) + func (b BoltDB) List(siteID string, limit, skip int) (list []store.PostInfo, err error) + type BoltSite struct + FileName string + SiteID string + type Interface interface + type Mongo struct + func NewMongo(conn *mongo.Connection, bufferSize int, flushDuration time.Duration) (*Mongo, error) + func (m *Mongo) Blocked(siteID string) (users []store.BlockedUser, err error) + func (m *Mongo) Close() error + func (m *Mongo) Count(locator store.Locator) (count int, err error) + func (m *Mongo) Create(comment store.Comment) (commentID string, err error) + func (m *Mongo) Delete(locator store.Locator, commentID string, mode store.DeleteMode) error + func (m *Mongo) DeleteAll(siteID string) error + func (m *Mongo) DeleteUser(siteID string, userID string) error + func (m *Mongo) Find(locator store.Locator, sortFld string) (comments []store.Comment, err error) + func (m *Mongo) Get(locator store.Locator, commentID string) (comment store.Comment, err error) + func (m *Mongo) Info(locator store.Locator, readOnlyAge int) (info store.PostInfo, err error) + func (m *Mongo) IsBlocked(siteID string, userID string) (blocked bool) + func (m *Mongo) IsReadOnly(locator store.Locator) (ro bool) + func (m *Mongo) IsVerified(siteID string, userID string) (verified bool) + func (m *Mongo) Last(siteID string, max int) (comments []store.Comment, err error) + func (m *Mongo) List(siteID string, limit, skip int) (list []store.PostInfo, err error) + func (m *Mongo) Put(locator store.Locator, comment store.Comment) error + func (m *Mongo) SetBlock(siteID string, userID string, status bool, ttl time.Duration) error + func (m *Mongo) SetReadOnly(locator store.Locator, status bool) (err error) + func (m *Mongo) SetVerified(siteID string, userID string, status bool) error + func (m *Mongo) User(siteID, userID string, limit, skip int) (comments []store.Comment, err error) + func (m *Mongo) UserCount(siteID, userID string) (count int, err error) + func (m *Mongo) Verified(siteID string) (ids []string, err error) + type UserRequest struct + Limit int + SiteID string + Skip int + UserID string