dao

package
v0.0.0-...-d9af017 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

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 GetAuthSaltsDAO

func GetAuthSaltsDAO(dbName string) (dao *mysql_dao.AuthSaltsDAO)

func GetAuthUsersDAO

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

func GetAuthsDAO

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

func GetChatUsersDAO

func GetChatUsersDAO(dbName string) (dao *mysql_dao.ChatUsersDAO)

func GetChatsDAO

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

func GetClientUpdatesStateDAO

func GetClientUpdatesStateDAO(dbName string) (dao *mysql_dao.ClientUpdatesStateDAO)

func GetCommonDAO

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

func GetDevicesDAO

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

func GetMessageBoxesDAO

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

func GetMessagesDAO

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

func GetMysqlDAOListMap

func GetMysqlDAOListMap() map[string]*MysqlDAOList

func GetRedisDAOListMap

func GetRedisDAOListMap() map[string]*RedisDAOList

func GetReportsDAO

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

func GetSeqUpdatesNgenDAO

func GetSeqUpdatesNgenDAO(dbName string) (dao *mysql_dao.SeqUpdatesNgenDAO)

func GetSequenceDAO

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

func GetTmpPasswordsDAO

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

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 GetUserPrivacysDAO

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

func GetUsersDAO

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

func InstallMysqlDAOManager

func InstallMysqlDAOManager(clients map[string]*sqlx.DB)

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
	AuthSaltsDAO *mysql_dao.AuthSaltsDAO
	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
	MessageBoxesDAO          *mysql_dao.MessageBoxesDAO
	MessagesDAO              *mysql_dao.MessagesDAO
	SeqUpdatesNgenDAO        *mysql_dao.SeqUpdatesNgenDAO
	ClientUpdatesStateDAO    *mysql_dao.ClientUpdatesStateDAO
	UserNotifySettingsDAO    *mysql_dao.UserNotifySettingsDAO
	ReportsDAO               *mysql_dao.ReportsDAO
	UserPrivacysDAO          *mysql_dao.UserPrivacysDAO
	TmpPasswordsDAO          *mysql_dao.TmpPasswordsDAO
	ChatsDAO                 *mysql_dao.ChatsDAO
	ChatUsersDAO             *mysql_dao.ChatUsersDAO
}

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