Documentation ¶
Index ¶
- Variables
- func CheckFieldName(fd string) bool
- func CheckLevel(lv string) bool
- func GenerateGroupId(groups []*chattypes.ServerGroup) (string, error)
- func GetName() string
- func Init(name string, cfg *types.Chain33Config, sub []byte)
- func InitExecType()
- func NewChat() drivers.Driver
- func NowMillionSecond() int64
- type Action
- func (action *Action) UpdateBlackList(send *chattypes.UpdateBlackList) (*types.Receipt, error)
- func (action *Action) UpdateFriend(send *chattypes.UpdateFriends) (*types.Receipt, error)
- func (action *Action) UpdateServerGroup(send *chattypes.UpdateServerGroups) (*types.Receipt, error)
- func (action *Action) UpdateUser(send *chattypes.UpdateFields) (*types.Receipt, error)
- type ByIdGroup
- type Chat
- func (c *Chat) ExecDelLocal(tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error)
- func (c *Chat) ExecLocal_Black(payload *chattypes.UpdateBlackList, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (c *Chat) ExecLocal_Update(payload *chattypes.UpdateFriends, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (c *Chat) ExecLocal_UpdateServerGroup(payload *chattypes.UpdateServerGroups, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (c *Chat) ExecLocal_UpdateUser(payload *chattypes.UpdateFields, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (c *Chat) Exec_Black(payload *chattypes.UpdateBlackList, tx *types.Transaction, index int) (*types.Receipt, error)
- func (c *Chat) Exec_Update(payload *chattypes.UpdateFriends, tx *types.Transaction, index int) (*types.Receipt, error)
- func (c *Chat) Exec_UpdateServerGroup(payload *chattypes.UpdateServerGroups, tx *types.Transaction, index int) (*types.Receipt, error)
- func (c *Chat) Exec_UpdateUser(payload *chattypes.UpdateFields, tx *types.Transaction, index int) (*types.Receipt, error)
- func (c *Chat) GetDriverName() string
- func (r *Chat) Query_GetBlackList(in *chattypes.ReqGetBlackList) (types.Message, error)
- func (r *Chat) Query_GetFriends(in *chattypes.ReqGetFriends) (types.Message, error)
- func (r *Chat) Query_GetServerGroup(in *chattypes.ReqGetServerGroup) (types.Message, error)
- func (r *Chat) Query_GetUser(in *chattypes.ReqGetUser) (types.Message, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //KeyPrefixStateDB state db key必须前缀 KeyPrefixStateDB = "mavl-chat-" //KeyPrefixLocalDB local db的key必须前缀 KeyPrefixLocalDB = "LODB-chat-" )
Functions ¶
func CheckFieldName ¶
func CheckLevel ¶
func GenerateGroupId ¶
func GenerateGroupId(groups []*chattypes.ServerGroup) (string, error)
func NowMillionSecond ¶
func NowMillionSecond() int64
Types ¶
type Action ¶
type Action struct {
// contains filtered or unexported fields
}
Action 具体动作执行
func NewAction ¶
func NewAction(Chat *Chat, tx *types.Transaction, index int) *Action
NewAction 生成Action对象
func (*Action) UpdateBlackList ¶
UpdateBlackList 更新黑名单信息
func (*Action) UpdateFriend ¶
UpdateFriend 更新好友信息
func (*Action) UpdateServerGroup ¶
UpdateBlackList 更新黑名单信息
func (*Action) UpdateUser ¶
UpdateFriend 更新好友信息
type ByIdGroup ¶
type ByIdGroup []*chattypes.ServerGroup
type Chat ¶
type Chat struct {
drivers.DriverBase
}
func (*Chat) ExecDelLocal ¶
func (c *Chat) ExecDelLocal(tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal 回退自动删除,重写基类
func (*Chat) ExecLocal_Black ¶
func (c *Chat) ExecLocal_Black(payload *chattypes.UpdateBlackList, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
func (*Chat) ExecLocal_Update ¶
func (c *Chat) ExecLocal_Update(payload *chattypes.UpdateFriends, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
func (*Chat) ExecLocal_UpdateServerGroup ¶
func (c *Chat) ExecLocal_UpdateServerGroup(payload *chattypes.UpdateServerGroups, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
func (*Chat) ExecLocal_UpdateUser ¶
func (c *Chat) ExecLocal_UpdateUser(payload *chattypes.UpdateFields, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
func (*Chat) Exec_Black ¶
func (c *Chat) Exec_Black(payload *chattypes.UpdateBlackList, tx *types.Transaction, index int) (*types.Receipt, error)
func (*Chat) Exec_Update ¶
func (c *Chat) Exec_Update(payload *chattypes.UpdateFriends, tx *types.Transaction, index int) (*types.Receipt, error)
func (*Chat) Exec_UpdateServerGroup ¶
func (c *Chat) Exec_UpdateServerGroup(payload *chattypes.UpdateServerGroups, tx *types.Transaction, index int) (*types.Receipt, error)
func (*Chat) Exec_UpdateUser ¶
func (c *Chat) Exec_UpdateUser(payload *chattypes.UpdateFields, tx *types.Transaction, index int) (*types.Receipt, error)
func (*Chat) GetDriverName ¶
func (*Chat) Query_GetBlackList ¶
Query_GetBlackList 查询黑名单列表
func (*Chat) Query_GetFriends ¶
Query_GetFriends 查询好友列表
func (*Chat) Query_GetServerGroup ¶
Query_GetServerGroup 查询服务分组列表
func (*Chat) Query_GetUser ¶
Query_GetUser 查询用户信息
Source Files ¶
Click to show internal directories.
Click to hide internal directories.