dao

package
v0.0.0-...-e41513e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 6 Imported by: 16

Documentation

Index

Constants

View Source
const (
	DB_MASTER = "immaster"
	DB_SLAVE  = "imslave"
	CACHE     = "cache"
)

Variables

This section is empty.

Functions

func GetAuthKeysDAO

func GetAuthKeysDAO(dbName string) (dao *mysql_dao.AuthKeysDAO)

func GetAuthPhoneTransactionsDAO

func GetAuthPhoneTransactionsDAO(dbName string) (dao *mysql_dao.AuthPhoneTransactionsDAO)

func GetAuthSeqUpdatesDAO

func GetAuthSeqUpdatesDAO(dbName string) (dao *mysql_dao.AuthSeqUpdatesDAO)

func GetAuthUpdatesStateDAO

func GetAuthUpdatesStateDAO(dbName string) (dao *mysql_dao.AuthUpdatesStateDAO)

func GetAuthUsersDAO

func GetAuthUsersDAO(dbName string) (dao *mysql_dao.AuthUsersDAO)

func GetAuthsDAO

func GetAuthsDAO(dbName string) (dao *mysql_dao.AuthsDAO)

func GetChannelMediaUnreadDAO

func GetChannelMediaUnreadDAO(dbName string) (dao *mysql_dao.ChannelMediaUnreadDAO)

func GetChannelMessageBoxesDAO

func GetChannelMessageBoxesDAO(dbName string) (dao *mysql_dao.ChannelMessageBoxesDAO)

func GetChannelMessagesDAO

func GetChannelMessagesDAO(dbName string) (dao *mysql_dao.ChannelMessagesDAO)

func GetChannelParticipantsDAO

func GetChannelParticipantsDAO(dbName string) (dao *mysql_dao.ChannelParticipantsDAO)

func GetChannelPtsUpdatesDAO

func GetChannelPtsUpdatesDAO(dbName string) (dao *mysql_dao.ChannelPtsUpdatesDAO)

func GetChannelsDAO

func GetChannelsDAO(dbName string) (dao *mysql_dao.ChannelsDAO)

func GetChatParticipantsDAO

func GetChatParticipantsDAO(dbName string) (dao *mysql_dao.ChatParticipantsDAO)

func GetChatsDAO

func GetChatsDAO(dbName string) (dao *mysql_dao.ChatsDAO)

func GetCommonDAO

func GetCommonDAO(dbName string) (dao *mysql_dao.CommonDAO)

func GetDevicesDAO

func GetDevicesDAO(dbName string) (dao *mysql_dao.DevicesDAO)

func GetImportedContactsDAO

func GetImportedContactsDAO(dbName string) (dao *mysql_dao.ImportedContactsDAO)

func GetMessageBoxesDAO

func GetMessageBoxesDAO(dbName string) (dao *mysql_dao.MessageBoxesDAO)

func GetMessageDatasDAO

func GetMessageDatasDAO(dbName string) (dao *mysql_dao.MessageDatasDAO)

func GetMessagesDAO

func GetMessagesDAO(dbName string) (dao *mysql_dao.MessagesDAO)

func GetMysqlDAOListMap

func GetMysqlDAOListMap() map[string]*MysqlDAOList

func GetPhoneCallSessionsDAO

func GetPhoneCallSessionsDAO(dbName string) (dao *mysql_dao.PhoneCallSessionsDAO)

func GetPopularContactsDAO

func GetPopularContactsDAO(dbName string) (dao *mysql_dao.PopularContactsDAO)

func GetRedisDAOListMap

func GetRedisDAOListMap() map[string]*RedisDAOList

func GetReportsDAO

func GetReportsDAO(dbName string) (dao *mysql_dao.ReportsDAO)

func GetSequenceDAO

func GetSequenceDAO(redisName string) (dao *redis_dao.SequenceDAO)

func GetStickerPacksDAO

func GetStickerPacksDAO(dbName string) (dao *mysql_dao.StickerPacksDAO)

func GetStickerSetsDAO

func GetStickerSetsDAO(dbName string) (dao *mysql_dao.StickerSetsDAO)

func GetTmpPasswordsDAO

func GetTmpPasswordsDAO(dbName string) (dao *mysql_dao.TmpPasswordsDAO)

func GetUnregisteredContactsDAO

func GetUnregisteredContactsDAO(dbName string) (dao *mysql_dao.UnregisteredContactsDAO)

func GetUserContactsDAO

func GetUserContactsDAO(dbName string) (dao *mysql_dao.UserContactsDAO)

func GetUserDialogsDAO

func GetUserDialogsDAO(dbName string) (dao *mysql_dao.UserDialogsDAO)

func GetUserNotifySettingsDAO

func GetUserNotifySettingsDAO(dbName string) (dao *mysql_dao.UserNotifySettingsDAO)

func GetUserPasswordsDAO

func GetUserPasswordsDAO(dbName string) (dao *mysql_dao.UserPasswordsDAO)

func GetUserPresencesDAO

func GetUserPresencesDAO(dbName string) (dao *mysql_dao.UserPresencesDAO)

func GetUserPrivacysDAO

func GetUserPrivacysDAO(dbName string) (dao *mysql_dao.UserPrivacysDAO)

func GetUserPtsUpdatesDAO

func GetUserPtsUpdatesDAO(dbName string) (dao *mysql_dao.UserPtsUpdatesDAO)

func GetUserQtsUpdatesDAO

func GetUserQtsUpdatesDAO(dbName string) (dao *mysql_dao.UserQtsUpdatesDAO)

func GetUsernameDAO

func GetUsernameDAO(dbName string) (dao *mysql_dao.UsernameDAO)

func GetUsersDAO

func GetUsersDAO(dbName string) (dao *mysql_dao.UsersDAO)

func GetWallPapersDAO

func GetWallPapersDAO(dbName string) (dao *mysql_dao.WallPapersDAO)

func InstallMysqlDAOManager

func InstallMysqlDAOManager(clients sync.Map)

func InstallRedisDAOManager

func InstallRedisDAOManager(clients map[string]*redis_client.RedisPool)

Types

type MysqlDAOList

type MysqlDAOList struct {
	// common
	CommonDAO *mysql_dao.CommonDAO

	// auth_key
	AuthKeysDAO  *mysql_dao.AuthKeysDAO
	AuthsDAO     *mysql_dao.AuthsDAO
	AuthUsersDAO *mysql_dao.AuthUsersDAO

	// biz
	UsersDAO                 *mysql_dao.UsersDAO
	DevicesDAO               *mysql_dao.DevicesDAO
	AuthPhoneTransactionsDAO *mysql_dao.AuthPhoneTransactionsDAO
	UserDialogsDAO           *mysql_dao.UserDialogsDAO
	UserContactsDAO          *mysql_dao.UserContactsDAO
	MessagesDAO              *mysql_dao.MessagesDAO
	MessageBoxesDAO          *mysql_dao.MessageBoxesDAO
	UserNotifySettingsDAO    *mysql_dao.UserNotifySettingsDAO
	ReportsDAO               *mysql_dao.ReportsDAO
	UserPrivacysDAO          *mysql_dao.UserPrivacysDAO
	TmpPasswordsDAO          *mysql_dao.TmpPasswordsDAO
	ChatsDAO                 *mysql_dao.ChatsDAO
	ChatParticipantsDAO      *mysql_dao.ChatParticipantsDAO
	UserPtsUpdatesDAO        *mysql_dao.UserPtsUpdatesDAO
	UserQtsUpdatesDAO        *mysql_dao.UserQtsUpdatesDAO
	AuthSeqUpdatesDAO        *mysql_dao.AuthSeqUpdatesDAO
	AuthUpdatesStateDAO      *mysql_dao.AuthUpdatesStateDAO
	UserPresencesDAO         *mysql_dao.UserPresencesDAO
	UserPasswordsDAO         *mysql_dao.UserPasswordsDAO
	WallPapersDAO            *mysql_dao.WallPapersDAO
	PhoneCallSessionsDAO     *mysql_dao.PhoneCallSessionsDAO

	StickerSetsDAO  *mysql_dao.StickerSetsDAO
	StickerPacksDAO *mysql_dao.StickerPacksDAO

	ChannelsDAO            *mysql_dao.ChannelsDAO
	ChannelParticipantsDAO *mysql_dao.ChannelParticipantsDAO
	ChannelMessageBoxesDAO *mysql_dao.ChannelMessageBoxesDAO
	ChannelPtsUpdatesDAO   *mysql_dao.ChannelPtsUpdatesDAO
	ChannelMediaUnreadDAO  *mysql_dao.ChannelMediaUnreadDAO
	ChannelMessagesDAO     *mysql_dao.ChannelMessagesDAO
	MessageDatasDAO        *mysql_dao.MessageDatasDAO

	UnregisteredContactsDAO *mysql_dao.UnregisteredContactsDAO
	PopularContactsDAO      *mysql_dao.PopularContactsDAO
	ImportedContactsDAO     *mysql_dao.ImportedContactsDAO

	UsernameDAO *mysql_dao.UsernameDAO
}

func GetMysqlDAOList

func GetMysqlDAOList(dbName string) (daoList *MysqlDAOList)

type MysqlDAOManager

type MysqlDAOManager struct {
	// contains filtered or unexported fields
}

TODO(@benqi): 一主多从

type RedisDAOList

type RedisDAOList struct {
	SequenceDAO *redis_dao.SequenceDAO
}

/////////////////////////////////////////////////////////////////////////////////////////

func GetRedisDAOList

func GetRedisDAOList(redisName string) (daoList *RedisDAOList)

type RedisDAOManager

type RedisDAOManager struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis
TODO(@benqi): 可以使用如下方法来生成seq - 如果运维能保证redis数据可靠性,可移除数据库seq_updates_ngen的存储 - 可使用[seqsvr](https://github.com/nebula-in/seqsvr)服务来生成seq - 可调研艺龙的序列号生成器 - 直接使用etcd或zk
TODO(@benqi): 可以使用如下方法来生成seq - 如果运维能保证redis数据可靠性,可移除数据库seq_updates_ngen的存储 - 可使用[seqsvr](https://github.com/nebula-in/seqsvr)服务来生成seq - 可调研艺龙的序列号生成器 - 直接使用etcd或zk

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL