Documentation
¶
Index ¶
- Constants
- func GenKey(pks [][]byte, gpks [][]byte) string
- func GenKeyByPubKeys(pks [][]byte, owner []byte) string
- type ChatFriends
- type ChatFriendsDb
- func (cf *ChatFriendsDb) AddFriend(ownerPk string, friendPK string) error
- func (cf *ChatFriendsDb) AddGroup(ownerPk string, group string) error
- func (cf *ChatFriendsDb) AgreeFriend(ownerPk string, friendPk string, agree bool) error
- func (cf *ChatFriendsDb) DelFriend(ownerPK string, friendPK string) error
- func (cf *ChatFriendsDb) DelGroup(ownerPK string, group string) error
- func (cf *ChatFriendsDb) Find(ownerPk string) (*ChatFriends, error)
- func (cf *ChatFriendsDb) FindFriend(ownerPk string, friend string) (*Friend, error)
- func (cf *ChatFriendsDb) FindGroup(ownerPk string, grpId string) (string, error)
- func (s *ChatFriendsDb) Iterator()
- func (s *ChatFriendsDb) Next() (key string, meta *ChatFriends, r1 error)
- func (s *ChatFriendsDb) Save()
- type ChatGroupMemberDB
- func (cgm *ChatGroupMemberDB) AddMember(grpId string, mbr string) error
- func (cgm *ChatGroupMemberDB) DelGroupMember(grpId string) error
- func (cgm *ChatGroupMemberDB) DelMember(grpId string, mbr string) error
- func (cgm *ChatGroupMemberDB) Find(grpId string) (*GroupMember, error)
- func (cgm *ChatGroupMemberDB) Insert(grpId string, owner string) error
- func (cgm *ChatGroupMemberDB) Iterator()
- func (cgm *ChatGroupMemberDB) Next() (key string, meta *GroupMember, r1 error)
- type ChatGroupsDB
- func (cg *ChatGroupsDB) DecRefer(grpId string) error
- func (cg *ChatGroupsDB) Find(grpId string) (*Group, error)
- func (cg *ChatGroupsDB) IncRefer(grpId string) error
- func (cg *ChatGroupsDB) Insert(grpID string, alias, owner string) error
- func (s *ChatGroupsDB) Iterator()
- func (s *ChatGroupsDB) Next() (key string, meta *Group, r1 error)
- func (cg *ChatGroupsDB) UpdateAlias(grpId string, alias string) error
- type ChatUser
- type ChatUsersDB
- func (s *ChatUsersDB) Find(pk string) (*ChatUser, error)
- func (s *ChatUsersDB) Insert(alias string, pubkey string, tv int64) error
- func (s *ChatUsersDB) Iterator()
- func (s *ChatUsersDB) Next() (key string, meta *ChatUser, r1 error)
- func (s *ChatUsersDB) Remove(pk string)
- func (s *ChatUsersDB) Save()
- func (s *ChatUsersDB) Update(alias string, pubkey string, tv int64) error
- func (s *ChatUsersDB) UpdateAlias(pubkey string, alias string) error
- func (s *ChatUsersDB) UpdateExpireTime(pubkey string, tv int64) error
- type Friend
- type Group
- type GroupKeys
- type GroupKeysDb
- type GroupMember
- type GroupMsg
- type GroupMsgHDB
- type LabelGroupMsg
- type LabelP2pMsg
- type P2PMsg
- type P2PMsgHDB
- type SecIdx
- type Section
Constants ¶
View Source
const (
MemHistoryCount = 1000
)
View Source
const (
MemHistoryP2PCount = 200
)
Variables ¶
This section is empty.
Functions ¶
func GenKeyByPubKeys ¶
Types ¶
type ChatFriends ¶
type ChatFriendsDb ¶
type ChatFriendsDb struct { db.NbsDbInter // contains filtered or unexported fields }
func GetChatFriendsDB ¶
func GetChatFriendsDB() *ChatFriendsDb
func (*ChatFriendsDb) AddFriend ¶
func (cf *ChatFriendsDb) AddFriend(ownerPk string, friendPK string) error
func (*ChatFriendsDb) AddGroup ¶
func (cf *ChatFriendsDb) AddGroup(ownerPk string, group string) error
func (*ChatFriendsDb) AgreeFriend ¶
func (cf *ChatFriendsDb) AgreeFriend(ownerPk string, friendPk string, agree bool) error
func (*ChatFriendsDb) DelFriend ¶
func (cf *ChatFriendsDb) DelFriend(ownerPK string, friendPK string) error
func (*ChatFriendsDb) DelGroup ¶
func (cf *ChatFriendsDb) DelGroup(ownerPK string, group string) error
func (*ChatFriendsDb) Find ¶
func (cf *ChatFriendsDb) Find(ownerPk string) (*ChatFriends, error)
func (*ChatFriendsDb) FindFriend ¶
func (cf *ChatFriendsDb) FindFriend(ownerPk string, friend string) (*Friend, error)
func (*ChatFriendsDb) FindGroup ¶
func (cf *ChatFriendsDb) FindGroup(ownerPk string, grpId string) (string, error)
func (*ChatFriendsDb) Iterator ¶
func (s *ChatFriendsDb) Iterator()
func (*ChatFriendsDb) Next ¶
func (s *ChatFriendsDb) Next() (key string, meta *ChatFriends, r1 error)
func (*ChatFriendsDb) Save ¶
func (s *ChatFriendsDb) Save()
type ChatGroupMemberDB ¶
type ChatGroupMemberDB struct { db.NbsDbInter // contains filtered or unexported fields }
func GetChatGrpMbrsDB ¶
func GetChatGrpMbrsDB() *ChatGroupMemberDB
func (*ChatGroupMemberDB) AddMember ¶
func (cgm *ChatGroupMemberDB) AddMember(grpId string, mbr string) error
func (*ChatGroupMemberDB) DelGroupMember ¶
func (cgm *ChatGroupMemberDB) DelGroupMember(grpId string) error
func (*ChatGroupMemberDB) DelMember ¶
func (cgm *ChatGroupMemberDB) DelMember(grpId string, mbr string) error
func (*ChatGroupMemberDB) Find ¶
func (cgm *ChatGroupMemberDB) Find(grpId string) (*GroupMember, error)
func (*ChatGroupMemberDB) Insert ¶
func (cgm *ChatGroupMemberDB) Insert(grpId string, owner string) error
func (*ChatGroupMemberDB) Iterator ¶
func (cgm *ChatGroupMemberDB) Iterator()
func (*ChatGroupMemberDB) Next ¶
func (cgm *ChatGroupMemberDB) Next() (key string, meta *GroupMember, r1 error)
type ChatGroupsDB ¶
type ChatGroupsDB struct { db.NbsDbInter // contains filtered or unexported fields }
func GetChatGroupsDB ¶
func GetChatGroupsDB() *ChatGroupsDB
func (*ChatGroupsDB) DecRefer ¶
func (cg *ChatGroupsDB) DecRefer(grpId string) error
func (*ChatGroupsDB) IncRefer ¶
func (cg *ChatGroupsDB) IncRefer(grpId string) error
func (*ChatGroupsDB) Insert ¶
func (cg *ChatGroupsDB) Insert(grpID string, alias, owner string) error
func (*ChatGroupsDB) Iterator ¶
func (s *ChatGroupsDB) Iterator()
func (*ChatGroupsDB) UpdateAlias ¶
func (cg *ChatGroupsDB) UpdateAlias(grpId string, alias string) error
type ChatUsersDB ¶
type ChatUsersDB struct { db.NbsDbInter // contains filtered or unexported fields }
func GetChatUserDB ¶
func GetChatUserDB() *ChatUsersDB
func (*ChatUsersDB) Insert ¶
func (s *ChatUsersDB) Insert(alias string, pubkey string, tv int64) error
func (*ChatUsersDB) Iterator ¶
func (s *ChatUsersDB) Iterator()
func (*ChatUsersDB) Remove ¶
func (s *ChatUsersDB) Remove(pk string)
func (*ChatUsersDB) Save ¶
func (s *ChatUsersDB) Save()
func (*ChatUsersDB) Update ¶
func (s *ChatUsersDB) Update(alias string, pubkey string, tv int64) error
func (*ChatUsersDB) UpdateAlias ¶
func (s *ChatUsersDB) UpdateAlias(pubkey string, alias string) error
func (*ChatUsersDB) UpdateExpireTime ¶
func (s *ChatUsersDB) UpdateExpireTime(pubkey string, tv int64) error
type GroupKeysDb ¶
type GroupKeysDb struct { db.NbsDbInter // contains filtered or unexported fields }
func GetChatGrpKeysDb ¶
func GetChatGrpKeysDb() *GroupKeysDb
func (*GroupKeysDb) Find ¶
func (gkdb *GroupKeysDb) Find(key string) *GroupKeys
type GroupMember ¶
type GroupMsg ¶
type GroupMsg struct { AesKey string `json:"aes_key"` Msg string `json:"msg"` Speek address.ChatAddress `json:"seepk"` }
type GroupMsgHDB ¶
type GroupMsgHDB struct { hdb.HistoryDBIntf // contains filtered or unexported fields }
func GetGMsgDb ¶
func GetGMsgDb() *GroupMsgHDB
func (*GroupMsgHDB) FindMsg ¶
func (gmdb *GroupMsgHDB) FindMsg(id string, begin, n int) (msgs []*LabelGroupMsg)
func (*GroupMsgHDB) FindMsg2 ¶
func (gmdb *GroupMsgHDB) FindMsg2(gid groupid.GrpID, pk string, begin, n int) (msgs []*LabelGroupMsg)
func (*GroupMsgHDB) Insert ¶
func (gmdb *GroupMsgHDB) Insert(gid groupid.GrpID, keyHash string, speek address.ChatAddress, cipherTxt string)
type LabelGroupMsg ¶
type LabelP2pMsg ¶
type P2PMsgHDB ¶
type P2PMsgHDB struct { hdb.HistoryDBIntf // contains filtered or unexported fields }
func GetP2PMsgDb ¶
func GetP2PMsgDb() *P2PMsgHDB
Click to show internal directories.
Click to hide internal directories.