Documentation
¶
Overview ¶
Dscuss package implements root API exposed to the user.
Index ¶
- Constants
- func Dir() string
- func FullVersion() string
- func Init(initDir string) error
- func IsLoggedIn() bool
- func Register(nickname, info string, s subs.Subscriptions) error
- func Uninit()
- type ByNickname
- type LoginHandle
- func (lh *LoginHandle) AddModerator(id *entity.ID) error
- func (lh *LoginHandle) GetLoggedUser() *entity.User
- func (lh *LoginHandle) GetMessage(id *entity.ID) (*entity.Message, error)
- func (lh *LoginHandle) GetRootMessage(m *entity.Message) (*entity.Message, error)
- func (lh *LoginHandle) GetUser(id *entity.ID) (*entity.User, error)
- func (lh *LoginHandle) IsValid() bool
- func (lh *LoginHandle) ListBoard(offset, limit int) ([]*entity.Message, error)
- func (lh *LoginHandle) ListModerators() []*entity.ID
- func (lh *LoginHandle) ListOperationsOnMessage(id *entity.ID) ([]*entity.Operation, error)
- func (lh *LoginHandle) ListOperationsOnUser(id *entity.ID) ([]*entity.Operation, error)
- func (lh *LoginHandle) ListPeers() []*peer.Info
- func (lh *LoginHandle) ListSubscriptions() subs.Subscriptions
- func (lh *LoginHandle) ListThread(id *entity.ID) (*thread.Node, error)
- func (lh *LoginHandle) ListTopic(topic subs.Topic, offset, limit int) ([]*entity.Message, error)
- func (lh *LoginHandle) ListUserHistory() []*entity.UserHistory
- func (lh *LoginHandle) Logout()
- func (lh *LoginHandle) NewOperation(typ entity.OperationType, reason entity.OperationReason, comment string, ...) (*entity.Operation, error)
- func (lh *LoginHandle) NewReply(subj, text string, parentID *entity.ID) (*entity.Message, error)
- func (lh *LoginHandle) NewThread(subj, text string, topic subs.Topic) (*entity.Message, error)
- func (lh *LoginHandle) PostEntity(e entity.Entity) error
- func (lh *LoginHandle) Relogin() error
- func (lh *LoginHandle) RemoveModerator(id *entity.ID) error
- func (lh *LoginHandle) Subscribe(topic subs.Topic) error
- func (lh *LoginHandle) Unsubscribe(topic subs.Topic) error
- type NetworkConfig
Constants ¶
View Source
const ( Name string = "Dscuss" Version string = "0.1.0" DefaultDir string = "~/.dscuss" AddressListFileName string = "addresses.txt" )
Variables ¶
This section is empty.
Functions ¶
func FullVersion ¶
func FullVersion() string
func IsLoggedIn ¶
func IsLoggedIn() bool
Types ¶
type ByNickname ¶
ByNickname implements sort.Interface for []*peer.Info based on the Nickname field.
func (ByNickname) Len ¶
func (a ByNickname) Len() int
func (ByNickname) Less ¶
func (a ByNickname) Less(i, j int) bool
func (ByNickname) Swap ¶
func (a ByNickname) Swap(i, j int)
type LoginHandle ¶
type LoginHandle struct {
// contains filtered or unexported fields
}
LoginHandle implements API exposed to a logged user.
func Login ¶
func Login(nickname string) (*LoginHandle, error)
func (*LoginHandle) AddModerator ¶
func (lh *LoginHandle) AddModerator(id *entity.ID) error
func (*LoginHandle) GetLoggedUser ¶
func (lh *LoginHandle) GetLoggedUser() *entity.User
func (*LoginHandle) GetMessage ¶
func (*LoginHandle) GetRootMessage ¶
func (*LoginHandle) IsValid ¶
func (lh *LoginHandle) IsValid() bool
func (*LoginHandle) ListBoard ¶
func (lh *LoginHandle) ListBoard(offset, limit int) ([]*entity.Message, error)
func (*LoginHandle) ListModerators ¶
func (lh *LoginHandle) ListModerators() []*entity.ID
func (*LoginHandle) ListOperationsOnMessage ¶
func (*LoginHandle) ListOperationsOnUser ¶
func (*LoginHandle) ListPeers ¶
func (lh *LoginHandle) ListPeers() []*peer.Info
func (*LoginHandle) ListSubscriptions ¶
func (lh *LoginHandle) ListSubscriptions() subs.Subscriptions
func (*LoginHandle) ListThread ¶
TBD: add offset and limit
func (*LoginHandle) ListUserHistory ¶
func (lh *LoginHandle) ListUserHistory() []*entity.UserHistory
func (*LoginHandle) Logout ¶
func (lh *LoginHandle) Logout()
func (*LoginHandle) NewOperation ¶
func (lh *LoginHandle) NewOperation( typ entity.OperationType, reason entity.OperationReason, comment string, objectID *entity.ID, ) (*entity.Operation, error)
func (*LoginHandle) PostEntity ¶
func (lh *LoginHandle) PostEntity(e entity.Entity) error
func (*LoginHandle) Relogin ¶
func (lh *LoginHandle) Relogin() error
func (*LoginHandle) RemoveModerator ¶
func (lh *LoginHandle) RemoveModerator(id *entity.ID) error
func (*LoginHandle) Unsubscribe ¶
func (lh *LoginHandle) Unsubscribe(topic subs.Topic) error
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
dscuss-cli
command
Command line interface for Dscuss.
|
Command line interface for Dscuss. |
|
dscuss-web
command
Web interface for Dscuss.
|
Web interface for Dscuss. |
|
dscuss-web/controller
controller responds to the user input and performs interactions on the Dscuss data model objects (Users, Messages, Operations, Threads, Subscriptions etc.) via Dscuss API.
|
controller responds to the user input and performs interactions on the Dscuss data model objects (Users, Messages, Operations, Threads, Subscriptions etc.) via Dscuss API. |
|
dscuss-web/view
View presents the controller responds in HTML format.
|
View presents the controller responds in HTML format. |
|
log provides logging facilities for Dscuss.
|
log provides logging facilities for Dscuss. |
|
Owner is the user which owns the current network node.
|
Owner is the user which owns the current network node. |
Click to show internal directories.
Click to hide internal directories.