Package dscuss
Dscuss package implements root API exposed to the user.
- 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 LoginHandle
- func Login(nickname string) (*LoginHandle, error)
- func (lh *LoginHandle) GetLoggedUser() *entity.User
- func (lh *LoginHandle) GetUser(id *entity.ID) (*entity.User, error)
- 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() string
- 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) Logout()
- func (lh *LoginHandle) MakeModerator(id *entity.ID) error
- 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, parent *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) RemoveModerator(id *entity.ID) error
- func (lh *LoginHandle) Subscribe(topic subs.Topic) error
- func (lh *LoginHandle) Unsubscribe(topic subs.Topic) error
- type NetworkConfig
Package files
config.go
dscuss.go
In the call graph viewer below, each node
is a function belonging to this package
and its children are the functions it
calls—perhaps dynamically.
The root nodes are the entry points of the
package: functions that may be called from
outside the package.
There may be non-exported or anonymous
functions among them if they are called
dynamically from another package.
Click a node to visit that function's source code.
From there you can visit its callers by
clicking its declaring func
token.
Functions may be omitted if they were
determined to be unreachable in the
particular programs or tests that were
analyzed.
Constants
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()
LoginHandle implements API exposed to a logged user.
type LoginHandle struct {
}
func Login(nickname string) (*LoginHandle, error)
func (lh *LoginHandle) GetLoggedUser() *entity.User
func (*LoginHandle) GetUser
¶
func (lh *LoginHandle) GetUser(id *entity.ID) (*entity.User, error)
func (*LoginHandle) ListBoard
¶
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 (*LoginHandle) ListPeers
¶
func (lh *LoginHandle) ListPeers() []*peer.Info
func (lh *LoginHandle) ListSubscriptions() string
func (lh *LoginHandle) ListThread(id *entity.ID) (*thread.Node, error)
TBD: add offset and limit
func (*LoginHandle) ListTopic
¶
func (lh *LoginHandle) ListTopic(topic subs.Topic, offset, limit int) ([]*entity.Message, error)
func (*LoginHandle) Logout
¶
func (lh *LoginHandle) Logout()
func (lh *LoginHandle) MakeModerator(id *entity.ID) error
func (lh *LoginHandle) NewOperation(
typ entity.OperationType,
reason entity.OperationReason,
comment string,
objectID *entity.ID,
) (*entity.Operation, error)
func (*LoginHandle) NewReply
¶
func (lh *LoginHandle) NewReply(subj, text string, parent *entity.ID) (*entity.Message, error)
func (*LoginHandle) NewThread
¶
func (lh *LoginHandle) NewThread(subj, text string, topic subs.Topic) (*entity.Message, error)
func (lh *LoginHandle) PostEntity(e entity.Entity) error
func (lh *LoginHandle) RemoveModerator(id *entity.ID) error
func (*LoginHandle) Subscribe
¶
func (lh *LoginHandle) Subscribe(topic subs.Topic) error
func (lh *LoginHandle) Unsubscribe(topic subs.Topic) error
type NetworkConfig struct {
HostPort string
AddressProvider string
MaxInConnCount uint32
MaxOutConnCount uint32
}
Subdirectories