const (
Name string = "Dscuss"
Version string = "0.1.0"
DefaultDir string = "~/.dscuss"
AddressListFileName string = "addresses.txt"
)
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()
ByNickname implements sort.Interface for []*peer.Info based on the Nickname field.
type ByNickname []*peer.Info
func (a ByNickname) Len() int
func (a ByNickname) Less(i, j int) bool
func (a ByNickname) Swap(i, j int)
LoginHandle implements API exposed to a logged user.
type LoginHandle struct {
// contains filtered or unexported fields
}
func Login(nickname string) (*LoginHandle, error)
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)
TBD: add offset and limit
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, objectID *entity.ID, ) (*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 struct {
Address string
Port int
AddressProvider string
DHTAddress string
DHTPort int
DHTBootstrap string
MaxInConnCount uint32
MaxOutConnCount uint32
}
| Name | Synopsis |
|---|---|
| .. | |
| address | |
| cmd | |
| dscuss-cli | Command line interface for Dscuss. |
| dscuss-web | Web interface for Dscuss. |
| config | |
| 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. |
| static | |
| view | View presents the controller responds in HTML format. |
| crypto | |
| entity | |
| errors | |
| io | |
| log | log provides logging facilities for Dscuss. |
| owner | Owner is the user which owns the current network node. |
| p2p | |
| connection | |
| peer | |
| packet | |
| sqlite | |
| storage | |
| strings | |
| subs | |
| thread | |