Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DataStorer ¶
type DataStorer interface {
// Get the offline msg from the database which you choosed.
GetOfflineMsg(id string, fin <-chan byte) (<-chan *Msg, <-chan byte)
// Get the muber of the offline msgs.
// GetOfflineCount(id string) (int, error)
// Delete the offline msg.
DelOfflineMsg(id string) error
// Insert a msg to the database.
InsertOfflineMsg(msg *Msg, ip string, etcds []string) error
// Check the ctrl use login.
Ctrl_login(id, auth string) (bool, string)
// Check the user login.
Client_login(id, psw string) bool
// Add a client user.
AddUser(u *User) error
// Del a client user.
DelUser(id string, own string) error
// Check a user wheather belong a ctrl user.
IsUserExist(uid, oid string) bool
// Get the whole of the ctrl's users.
ChanUserID(own string) <-chan string
// Add a sub.
AddSub(sub *Sub) error
// Del a sub.
DelSub(sub_id, id string) error
// Add a user into a sub
AddUserToSub(sm *Sub_map, id string) error
// Del a user from a sub
DelUserFromSub(sm *Sub_map, id string) error
// Check a sub weather exist.
IsSubExist(sub_id, id string) bool
// Get a sub all users
ChanSubUsers(sub_id string) <-chan string
}
var Manager DataStorer
A db manage
Click to show internal directories.
Click to hide internal directories.