Documentation ¶
Overview ¶
This is the core library for tagbbs, which will be used across different servers.
Index ¶
- Constants
- Variables
- type BBS
- type Capability
- type FrontMatter
- type Index
- type ParsedQuery
- type Post
- type Session
- type SessionManager
- func (s SessionManager) Get(sid string) (session Session, err error)
- func (s SessionManager) List(user string) (ss map[string]Session, err error)
- func (s SessionManager) Request(ss Session) (sid string, err error)
- func (s SessionManager) Revoke(sid string) (err error)
- func (s SessionManager) SetCapability(sid string, capability Capability) error
Constants ¶
View Source
const (
SuperUser = "sysop"
)
Variables ¶
View Source
var (
ErrAccessDenied = errors.New("Access Denied")
)
View Source
var ErrSessionNotExist = errors.New("Session Not Exist")
Functions ¶
This section is empty.
Types ¶
type BBS ¶
type BBS struct { Storage rkv.S Index Auth auth.AuthenticationList SessionManager }
func NewBBSFromConfig ¶
func (*BBS) NewPostKey ¶
Atomically obtain the next available key for post.
type Capability ¶
type Capability int64
const ( CapRead Capability = 1 << iota CapPost CapNotification CapChat )
type FrontMatter ¶
type ParsedQuery ¶
type Post ¶
func (*Post) FrontMatter ¶
func (p *Post) FrontMatter() *FrontMatter
func (*Post) UnmarshalTo ¶
type SessionManager ¶
func (SessionManager) List ¶
func (s SessionManager) List(user string) (ss map[string]Session, err error)
func (SessionManager) Revoke ¶
func (s SessionManager) Revoke(sid string) (err error)
func (SessionManager) SetCapability ¶
func (s SessionManager) SetCapability(sid string, capability Capability) error
Click to show internal directories.
Click to hide internal directories.