oldbolt

package
v0.0.0-...-5dcd16a Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dedupe

func Dedupe(names [][]byte) [][]byte

Types

type Articledb

type Articledb struct {
	DB      *bolt.DB
	Stamper posting.Stamper
	Caps    Caps
}

func (*Articledb) AdmAddGroup

func (a *Articledb) AdmAddGroup(group, descr []byte) error

func (*Articledb) AdmGroupChangeState

func (a *Articledb) AdmGroupChangeState(group []byte, state byte) error

func (*Articledb) Initialize

func (a *Articledb) Initialize()

type Caps

type Caps struct {
	Stamper          posting.Stamper
	GroupHeadDB      newspolyglot.GroupHeadDB
	GroupHeadCache   newspolyglot.GroupHeadCache
	ArticlePostingDB newspolyglot.ArticlePostingDB
	ArticleDirectDB  newspolyglot.ArticleDirectDB
	ArticleGroupDB   newspolyglot.ArticleGroupDB
	GroupRealtimeDB  newspolyglot.GroupRealtimeDB
	GroupStaticDB    newspolyglot.GroupStaticDB
}

func (*Caps) CheckPost

func (a *Caps) CheckPost() (possible bool)

func (*Caps) CheckPostId

func (a *Caps) CheckPostId(id []byte) (wanted bool, possible bool)

func (*Caps) CursorMoveGroup

func (a *Caps) CursorMoveGroup(g *fastnntp.Group, i int64, backward bool, id_buf []byte) (ni int64, id []byte, ok bool)

func (*Caps) GetArticle

func (a *Caps) GetArticle(ar *fastnntp.Article, head, body bool) func(w *fastnntp.DotWriter)

func (*Caps) GetGroup

func (a *Caps) GetGroup(g *fastnntp.Group) bool

func (*Caps) ListGroup

func (a *Caps) ListGroup(g *fastnntp.Group, w *fastnntp.DotWriter, first, last int64)

func (*Caps) ListGroups

func (a *Caps) ListGroups(wm *fastnntp.WildMat, ila fastnntp.IListActive) bool

func (*Caps) PerformPost

func (a *Caps) PerformPost(id []byte, r *fastnntp.DotReader) (rejected bool, failed bool)

func (*Caps) StatArticle

func (a *Caps) StatArticle(ar *fastnntp.Article) bool

func (*Caps) WriteOverview

func (a *Caps) WriteOverview(ar *fastnntp.ArticleRange) func(w fastnntp.IOverview)

type Wrapper

type Wrapper struct {
	*Articledb
}

Utility to implement third party Interfaces

func (*Wrapper) ArticleDirectGet

func (a *Wrapper) ArticleDirectGet(id []byte, head, body bool) *newspolyglot.ArticleObject

func (*Wrapper) ArticleDirectOverview

func (a *Wrapper) ArticleDirectOverview(id []byte) *newspolyglot.ArticleOverview

func (*Wrapper) ArticleDirectStat

func (a *Wrapper) ArticleDirectStat(id []byte) bool

func (*Wrapper) ArticleGroupGet

func (a *Wrapper) ArticleGroupGet(group []byte, num int64, head, body bool, id_buf []byte) (id []byte, article *newspolyglot.ArticleObject)

func (*Wrapper) ArticleGroupList

func (a *Wrapper) ArticleGroupList(group []byte, first, last int64, targ func(int64))

func (*Wrapper) ArticleGroupMove

func (a *Wrapper) ArticleGroupMove(group []byte, i int64, backward bool, id_buf []byte) (ni int64, id []byte, ok bool)

func (*Wrapper) ArticleGroupOverview

func (a *Wrapper) ArticleGroupOverview(group []byte, first, last int64, targ func(int64, *newspolyglot.ArticleOverview))

func (*Wrapper) ArticleGroupStat

func (a *Wrapper) ArticleGroupStat(group []byte, num int64, id_buf []byte) (id []byte, dostat bool)

func (*Wrapper) ArticlePostingCheckPost

func (a *Wrapper) ArticlePostingCheckPost() (possible bool)

func (*Wrapper) ArticlePostingCheckPostId

func (a *Wrapper) ArticlePostingCheckPostId(id []byte) (wanted bool, possible bool)

func (*Wrapper) ArticlePostingPost

func (a *Wrapper) ArticlePostingPost(headp *posting.HeadInfo, body []byte, ngs [][]byte, numbs []int64) (rejected bool, failed bool, err error)

func (*Wrapper) GroupHeadFilter

func (a *Wrapper) GroupHeadFilter(groups [][]byte) ([][]byte, error)

func (*Wrapper) GroupHeadInsert

func (a *Wrapper) GroupHeadInsert(ngs [][]byte, buf []int64) ([]int64, error)

func (*Wrapper) GroupHeadRevert

func (a *Wrapper) GroupHeadRevert(ngs [][]byte, numbs []int64) error

func (*Wrapper) GroupRealtimeList

func (a *Wrapper) GroupRealtimeList(targ func(group []byte, high, low int64, status byte)) (ok bool)

func (*Wrapper) GroupRealtimeQuery

func (a *Wrapper) GroupRealtimeQuery(group []byte) (number int64, low int64, high int64, ok bool)

func (*Wrapper) GroupStaticList

func (a *Wrapper) GroupStaticList(targ func(group []byte, descr []byte)) (ok bool)

Jump to

Keyboard shortcuts

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