Documentation ¶
Overview ¶
Apache Cassandra based Backend for Article Storage.
Warning: This is not the final version - assume breaking changes.
Index ¶
- func GnvTable(ksp gocassa.KeySpace) gocassa.Table
- func NewStoredArticleTable(ks gocassa.KeySpace) gocassa.Table
- type ArticleOverview
- type ArticleStorage
- func (a *ArticleStorage) ArticleDirectGet(id []byte, head, body bool) *newspolyglot.ArticleObject
- func (a *ArticleStorage) ArticleDirectOverview(id []byte) *newspolyglot.ArticleOverview
- func (a *ArticleStorage) ArticleDirectStat(id []byte) bool
- func (a *ArticleStorage) ArticleGroupGet(group []byte, num int64, head, body bool, id_buf []byte) ([]byte, *newspolyglot.ArticleObject)
- func (a *ArticleStorage) ArticleGroupList(group []byte, first, last int64, targ func(int64))
- func (a *ArticleStorage) ArticleGroupMove(group []byte, i int64, backward bool, id_buf []byte) (ni int64, id []byte, ok bool)
- func (a *ArticleStorage) ArticleGroupOverview(group []byte, first, last int64, ...)
- func (a *ArticleStorage) ArticleGroupStat(group []byte, num int64, id_buf []byte) ([]byte, bool)
- func (a *ArticleStorage) ArticlePostingCheckPost() (possible bool)
- func (a *ArticleStorage) ArticlePostingCheckPostId(id []byte) (wanted bool, possible bool)
- func (a *ArticleStorage) ArticlePostingPost(headp *posting.HeadInfo, body []byte, ngs [][]byte, numbs []int64) (rejected bool, failed bool, err error)
- func (a *ArticleStorage) Initialize()
- type GroupManager
- func (g *GroupManager) AdmAddGroup(group, descr []byte) error
- func (g *GroupManager) AdmGroupChangeState(group []byte, state byte) error
- func (g *GroupManager) GroupHeadFilter(groups [][]byte) ([][]byte, error)
- func (g *GroupManager) GroupHeadInsert(groups [][]byte, buf []int64) ([]int64, error)
- func (g *GroupManager) GroupHeadRevert(groups [][]byte, nums []int64) error
- func (g *GroupManager) GroupRealtimeList(targ func(group []byte, high, low int64, status byte)) bool
- func (g *GroupManager) GroupRealtimeQuery(group []byte) (number int64, low int64, high int64, ok bool)
- func (g *GroupManager) GroupStaticList(targ func(group []byte, descr []byte)) bool
- func (g *GroupManager) Initialize()
- type GroupNumValue
- type GroupRealtime
- type GroupStatic
- type StoredArticle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArticleOverview ¶
func (*ArticleOverview) Convert ¶
func (a *ArticleOverview) Convert() *newspolyglot.ArticleOverview
type ArticleStorage ¶
type ArticleStorage struct {
// contains filtered or unexported fields
}
func NewArticleStorage ¶
func NewArticleStorage(ks gocassa.KeySpace) *ArticleStorage
func (*ArticleStorage) ArticleDirectGet ¶
func (a *ArticleStorage) ArticleDirectGet(id []byte, head, body bool) *newspolyglot.ArticleObject
func (*ArticleStorage) ArticleDirectOverview ¶
func (a *ArticleStorage) ArticleDirectOverview(id []byte) *newspolyglot.ArticleOverview
func (*ArticleStorage) ArticleDirectStat ¶
func (a *ArticleStorage) ArticleDirectStat(id []byte) bool
func (*ArticleStorage) ArticleGroupGet ¶
func (*ArticleStorage) ArticleGroupList ¶
func (a *ArticleStorage) ArticleGroupList(group []byte, first, last int64, targ func(int64))
func (*ArticleStorage) ArticleGroupMove ¶
func (*ArticleStorage) ArticleGroupOverview ¶
func (a *ArticleStorage) ArticleGroupOverview(group []byte, first, last int64, targ func(int64, *newspolyglot.ArticleOverview))
func (*ArticleStorage) ArticleGroupStat ¶
func (*ArticleStorage) ArticlePostingCheckPost ¶
func (a *ArticleStorage) ArticlePostingCheckPost() (possible bool)
func (*ArticleStorage) ArticlePostingCheckPostId ¶
func (a *ArticleStorage) ArticlePostingCheckPostId(id []byte) (wanted bool, possible bool)
func (*ArticleStorage) ArticlePostingPost ¶
func (*ArticleStorage) Initialize ¶
func (a *ArticleStorage) Initialize()
type GroupManager ¶
type GroupManager struct {
// contains filtered or unexported fields
}
This class implements GroupHeadCache, GroupHeadDB, GroupRealtimeDB and GroupStaticDB Most Methods are eighter Brittle or Inefficient.
Warning: it is not recommended to use it as GroupHeadDB, unless it is used from a single node or with serious synchronization mechanisms. Otherwise, a race-condition will occure.
func NewGroupManager ¶
func NewGroupManager(ks gocassa.KeySpace) *GroupManager
func (*GroupManager) AdmAddGroup ¶
func (g *GroupManager) AdmAddGroup(group, descr []byte) error
func (*GroupManager) AdmGroupChangeState ¶
func (g *GroupManager) AdmGroupChangeState(group []byte, state byte) error
func (*GroupManager) GroupHeadFilter ¶
func (g *GroupManager) GroupHeadFilter(groups [][]byte) ([][]byte, error)
func (*GroupManager) GroupHeadInsert ¶
func (g *GroupManager) GroupHeadInsert(groups [][]byte, buf []int64) ([]int64, error)
Warning: it is not recommended to use this Method, unless it is used from a single node or with serious synchronization mechanisms. Otherwise, a race-condition will occure.
func (*GroupManager) GroupHeadRevert ¶
func (g *GroupManager) GroupHeadRevert(groups [][]byte, nums []int64) error
Warning: it is not recommended to use this Method, unless it is used from a single node or with serious synchronization mechanisms. Otherwise, a race-condition will occure.
func (*GroupManager) GroupRealtimeList ¶
func (g *GroupManager) GroupRealtimeList(targ func(group []byte, high, low int64, status byte)) bool
func (*GroupManager) GroupRealtimeQuery ¶
func (*GroupManager) GroupStaticList ¶
func (g *GroupManager) GroupStaticList(targ func(group []byte, descr []byte)) bool
func (*GroupManager) Initialize ¶
func (g *GroupManager) Initialize()
type GroupNumValue ¶
type GroupRealtime ¶
type GroupStatic ¶
type StoredArticle ¶
type StoredArticle struct { ArticleOverview `cql:",squash"` Head, Body []byte }