Documentation ¶
Index ¶
- Variables
- func RdbCreateApiStore()
- func RdbCreateBlockUserStore()
- func RdbCreateDeviceStore()
- func RdbCreateMessageStore()
- func RdbCreateRoomStore()
- func RdbCreateRoomUserStore()
- func RdbCreateSubscriptionStore()
- func RdbCreateUserStore()
- func RdbStoreInstance() *rdbStore
- type ApiStore
- type BlockUserStore
- type DeviceStore
- type MessageStore
- type Provider
- type RoomStore
- type RoomUserStore
- type StoreChannel
- type StoreResult
- func RdbDeleteAndInsertRoomUsers(roomUsers []*models.RoomUser) StoreResult
- func RdbDeleteBlockUser(userId string, blockUserIds []string) StoreResult
- func RdbDeleteDevice(userId string, platform int) StoreResult
- func RdbDeleteRoomUser(roomId string, userIds []string) StoreResult
- func RdbDeleteSubscription(subscription *models.Subscription) StoreResult
- func RdbInsertApi(name string) StoreResult
- func RdbInsertBlockUsers(blockUsers []*models.BlockUser) StoreResult
- func RdbInsertDevice(device *models.Device) StoreResult
- func RdbInsertMessage(message *models.Message) StoreResult
- func RdbInsertRoom(room *models.Room) StoreResult
- func RdbInsertRoomUsers(roomUsers []*models.RoomUser) StoreResult
- func RdbInsertSubscription(subscription *models.Subscription) StoreResult
- func RdbInsertUser(user *models.User) StoreResult
- func RdbSelectBlockUser(userId, blockUserId string) StoreResult
- func RdbSelectBlockUsersByUserId(userId string) StoreResult
- func RdbSelectContacts(userId string) StoreResult
- func RdbSelectCountMessagesByRoomId(roomId string) StoreResult
- func RdbSelectCountRooms() StoreResult
- func RdbSelectDeletedSubscriptionsByRoomId(roomId string) StoreResult
- func RdbSelectDeletedSubscriptionsByUserId(userId string) StoreResult
- func RdbSelectDeletedSubscriptionsByUserIdAndPlatform(userId string, platform int) StoreResult
- func RdbSelectDevice(userId string, platform int) StoreResult
- func RdbSelectDevices(userId string) StoreResult
- func RdbSelectDevicesByToken(token string) StoreResult
- func RdbSelectDevicesByUserId(userId string) StoreResult
- func RdbSelectLatestApi(name string) StoreResult
- func RdbSelectMessage(messageId string) StoreResult
- func RdbSelectMessages(roomId string, limit, offset int, order string) StoreResult
- func RdbSelectRoom(roomId string) StoreResult
- func RdbSelectRoomUser(roomId, userId string) StoreResult
- func RdbSelectRoomUserOfOneOnOne(myUserId, opponentUserId string) StoreResult
- func RdbSelectRoomUsersByRoomId(roomId string) StoreResult
- func RdbSelectRoomUsersByRoomIdAndUserIds(roomId *string, userIds []string) StoreResult
- func RdbSelectRoomUsersByUserId(userId string) StoreResult
- func RdbSelectRooms() StoreResult
- func RdbSelectSubscription(roomId, userId string, platform int) StoreResult
- func RdbSelectUser(userId string, isWithRooms, isWithDevices, isWithBlocks bool) StoreResult
- func RdbSelectUserByUserIdAndAccessToken(userId, accessToken string) StoreResult
- func RdbSelectUserIdsByUserIds(userIds []string) StoreResult
- func RdbSelectUsers() StoreResult
- func RdbSelectUsersForRoom(roomId string) StoreResult
- func RdbUpdateDevice(device *models.Device) StoreResult
- func RdbUpdateMessage(message *models.Message) StoreResult
- func RdbUpdateRoom(room *models.Room) StoreResult
- func RdbUpdateRoomDeleted(roomId string) StoreResult
- func RdbUpdateRoomUser(roomUser *models.RoomUser) StoreResult
- func RdbUpdateUser(user *models.User) StoreResult
- func RdbUpdateUserDeleted(userId string) StoreResult
- type SubscriptionStore
- type UserStore
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TABLE_NAME_API = utils.Cfg.Datastore.TableNamePrefix + "api" TABLE_NAME_USER = utils.Cfg.Datastore.TableNamePrefix + "user" TABLE_NAME_BLOCK_USER = utils.Cfg.Datastore.TableNamePrefix + "block_user" TABLE_NAME_ROOM = utils.Cfg.Datastore.TableNamePrefix + "room" TABLE_NAME_ROOM_USER = utils.Cfg.Datastore.TableNamePrefix + "room_user" TABLE_NAME_MESSAGE = utils.Cfg.Datastore.TableNamePrefix + "message" TABLE_NAME_DEVICE = utils.Cfg.Datastore.TableNamePrefix + "device" TABLE_NAME_SUBSCRIPTION = utils.Cfg.Datastore.TableNamePrefix + "subscription" )
Functions ¶
func RdbCreateApiStore ¶ added in v0.6.0
func RdbCreateApiStore()
func RdbCreateBlockUserStore ¶ added in v0.7.0
func RdbCreateBlockUserStore()
func RdbCreateDeviceStore ¶ added in v0.2.0
func RdbCreateDeviceStore()
func RdbCreateMessageStore ¶
func RdbCreateMessageStore()
func RdbCreateRoomStore ¶ added in v0.2.0
func RdbCreateRoomStore()
func RdbCreateRoomUserStore ¶ added in v0.2.0
func RdbCreateRoomUserStore()
func RdbCreateSubscriptionStore ¶ added in v0.2.0
func RdbCreateSubscriptionStore()
func RdbCreateUserStore ¶ added in v0.2.0
func RdbCreateUserStore()
func RdbStoreInstance ¶ added in v0.9.0
func RdbStoreInstance() *rdbStore
Types ¶
type ApiStore ¶ added in v0.6.0
type ApiStore interface { CreateApiStore() InsertApi(name string) StoreResult SelectLatestApi(name string) StoreResult }
type BlockUserStore ¶ added in v0.7.0
type BlockUserStore interface { CreateBlockUserStore() InsertBlockUsers(blockUsers []*models.BlockUser) StoreResult SelectBlockUser(userId, blockUserId string) StoreResult SelectBlockUsersByUserId(userId string) StoreResult DeleteBlockUser(userId string, blockUserIds []string) StoreResult }
type DeviceStore ¶ added in v0.2.0
type DeviceStore interface { CreateDeviceStore() InsertDevice(device *models.Device) StoreResult SelectDevices(userId string) StoreResult SelectDevice(userId string, platform int) StoreResult SelectDevicesByUserId(userId string) StoreResult SelectDevicesByToken(token string) StoreResult UpdateDevice(device *models.Device) StoreResult DeleteDevice(userId string, platform int) StoreResult }
type MessageStore ¶
type MessageStore interface { CreateMessageStore() InsertMessage(message *models.Message) StoreResult SelectMessage(messageId string) StoreResult SelectMessages(roomId string, limit, offset int, order string) StoreResult SelectCountMessagesByRoomId(roomId string) StoreResult UpdateMessage(message *models.Message) StoreResult }
type Provider ¶
type Provider interface { Connect() error Init() DropDatabase() error ApiStore UserStore BlockUserStore RoomStore RoomUserStore MessageStore DeviceStore SubscriptionStore }
func GetProvider ¶
func GetProvider() Provider
type RoomStore ¶
type RoomStore interface { CreateRoomStore() InsertRoom(room *models.Room) StoreResult SelectRoom(roomId string) StoreResult SelectRooms() StoreResult SelectUsersForRoom(roomId string) StoreResult SelectCountRooms() StoreResult UpdateRoom(room *models.Room) StoreResult UpdateRoomDeleted(roomId string) StoreResult }
type RoomUserStore ¶
type RoomUserStore interface { CreateRoomUserStore() DeleteAndInsertRoomUsers(roomUsers []*models.RoomUser) StoreResult InsertRoomUsers(roomUsers []*models.RoomUser) StoreResult SelectRoomUser(roomId, userId string) StoreResult SelectRoomUserOfOneOnOne(myUserId, opponentUserId string) StoreResult SelectRoomUsersByRoomId(roomId string) StoreResult SelectRoomUsersByUserId(userId string) StoreResult SelectRoomUsersByRoomIdAndUserIds(roomId *string, userIds []string) StoreResult UpdateRoomUser(*models.RoomUser) StoreResult DeleteRoomUser(roomId string, userIds []string) StoreResult }
type StoreChannel ¶
type StoreChannel chan StoreResult
type StoreResult ¶
type StoreResult struct { Data interface{} ProblemDetail *models.ProblemDetail }
func RdbDeleteAndInsertRoomUsers ¶ added in v0.2.0
func RdbDeleteAndInsertRoomUsers(roomUsers []*models.RoomUser) StoreResult
func RdbDeleteBlockUser ¶ added in v0.7.0
func RdbDeleteBlockUser(userId string, blockUserIds []string) StoreResult
func RdbDeleteDevice ¶ added in v0.2.0
func RdbDeleteDevice(userId string, platform int) StoreResult
func RdbDeleteRoomUser ¶ added in v0.2.0
func RdbDeleteRoomUser(roomId string, userIds []string) StoreResult
func RdbDeleteSubscription ¶ added in v0.2.0
func RdbDeleteSubscription(subscription *models.Subscription) StoreResult
func RdbInsertApi ¶ added in v0.6.0
func RdbInsertApi(name string) StoreResult
func RdbInsertBlockUsers ¶ added in v0.7.0
func RdbInsertBlockUsers(blockUsers []*models.BlockUser) StoreResult
func RdbInsertDevice ¶ added in v0.2.0
func RdbInsertDevice(device *models.Device) StoreResult
func RdbInsertMessage ¶ added in v0.2.0
func RdbInsertMessage(message *models.Message) StoreResult
func RdbInsertRoom ¶ added in v0.2.0
func RdbInsertRoom(room *models.Room) StoreResult
func RdbInsertRoomUsers ¶ added in v0.2.0
func RdbInsertRoomUsers(roomUsers []*models.RoomUser) StoreResult
func RdbInsertSubscription ¶ added in v0.2.0
func RdbInsertSubscription(subscription *models.Subscription) StoreResult
func RdbInsertUser ¶ added in v0.2.0
func RdbInsertUser(user *models.User) StoreResult
func RdbSelectBlockUser ¶ added in v0.7.0
func RdbSelectBlockUser(userId, blockUserId string) StoreResult
func RdbSelectBlockUsersByUserId ¶ added in v0.7.0
func RdbSelectBlockUsersByUserId(userId string) StoreResult
func RdbSelectContacts ¶ added in v0.7.0
func RdbSelectContacts(userId string) StoreResult
func RdbSelectCountMessagesByRoomId ¶ added in v0.2.0
func RdbSelectCountMessagesByRoomId(roomId string) StoreResult
func RdbSelectCountRooms ¶ added in v0.2.0
func RdbSelectCountRooms() StoreResult
func RdbSelectDeletedSubscriptionsByRoomId ¶ added in v0.7.1
func RdbSelectDeletedSubscriptionsByRoomId(roomId string) StoreResult
func RdbSelectDeletedSubscriptionsByUserId ¶ added in v0.7.1
func RdbSelectDeletedSubscriptionsByUserId(userId string) StoreResult
func RdbSelectDeletedSubscriptionsByUserIdAndPlatform ¶ added in v0.7.1
func RdbSelectDeletedSubscriptionsByUserIdAndPlatform(userId string, platform int) StoreResult
func RdbSelectDevice ¶ added in v0.2.0
func RdbSelectDevice(userId string, platform int) StoreResult
func RdbSelectDevices ¶ added in v0.2.0
func RdbSelectDevices(userId string) StoreResult
func RdbSelectDevicesByToken ¶ added in v0.7.1
func RdbSelectDevicesByToken(token string) StoreResult
func RdbSelectDevicesByUserId ¶ added in v0.2.0
func RdbSelectDevicesByUserId(userId string) StoreResult
func RdbSelectLatestApi ¶ added in v0.6.0
func RdbSelectLatestApi(name string) StoreResult
func RdbSelectMessage ¶ added in v0.2.0
func RdbSelectMessage(messageId string) StoreResult
func RdbSelectMessages ¶ added in v0.2.0
func RdbSelectMessages(roomId string, limit, offset int, order string) StoreResult
func RdbSelectRoom ¶ added in v0.2.0
func RdbSelectRoom(roomId string) StoreResult
func RdbSelectRoomUser ¶ added in v0.2.0
func RdbSelectRoomUser(roomId, userId string) StoreResult
func RdbSelectRoomUserOfOneOnOne ¶ added in v0.8.0
func RdbSelectRoomUserOfOneOnOne(myUserId, opponentUserId string) StoreResult
func RdbSelectRoomUsersByRoomId ¶ added in v0.2.0
func RdbSelectRoomUsersByRoomId(roomId string) StoreResult
func RdbSelectRoomUsersByRoomIdAndUserIds ¶ added in v0.2.0
func RdbSelectRoomUsersByRoomIdAndUserIds(roomId *string, userIds []string) StoreResult
func RdbSelectRoomUsersByUserId ¶ added in v0.2.0
func RdbSelectRoomUsersByUserId(userId string) StoreResult
func RdbSelectRooms ¶ added in v0.2.0
func RdbSelectRooms() StoreResult
func RdbSelectSubscription ¶ added in v0.2.0
func RdbSelectSubscription(roomId, userId string, platform int) StoreResult
func RdbSelectUser ¶ added in v0.2.0
func RdbSelectUser(userId string, isWithRooms, isWithDevices, isWithBlocks bool) StoreResult
func RdbSelectUserByUserIdAndAccessToken ¶ added in v0.5.0
func RdbSelectUserByUserIdAndAccessToken(userId, accessToken string) StoreResult
func RdbSelectUserIdsByUserIds ¶ added in v0.2.0
func RdbSelectUserIdsByUserIds(userIds []string) StoreResult
func RdbSelectUsers ¶ added in v0.2.0
func RdbSelectUsers() StoreResult
func RdbSelectUsersForRoom ¶ added in v0.2.0
func RdbSelectUsersForRoom(roomId string) StoreResult
func RdbUpdateDevice ¶ added in v0.2.0
func RdbUpdateDevice(device *models.Device) StoreResult
func RdbUpdateMessage ¶ added in v0.2.0
func RdbUpdateMessage(message *models.Message) StoreResult
func RdbUpdateRoom ¶ added in v0.2.0
func RdbUpdateRoom(room *models.Room) StoreResult
func RdbUpdateRoomDeleted ¶ added in v0.2.0
func RdbUpdateRoomDeleted(roomId string) StoreResult
func RdbUpdateRoomUser ¶ added in v0.2.0
func RdbUpdateRoomUser(roomUser *models.RoomUser) StoreResult
func RdbUpdateUser ¶ added in v0.2.0
func RdbUpdateUser(user *models.User) StoreResult
func RdbUpdateUserDeleted ¶ added in v0.2.0
func RdbUpdateUserDeleted(userId string) StoreResult
type SubscriptionStore ¶ added in v0.2.0
type SubscriptionStore interface { CreateSubscriptionStore() InsertSubscription(subscription *models.Subscription) StoreResult SelectSubscription(roomId, userId string, platform int) StoreResult SelectDeletedSubscriptionsByRoomId(roomId string) StoreResult SelectDeletedSubscriptionsByUserId(userId string) StoreResult SelectDeletedSubscriptionsByUserIdAndPlatform(userId string, platform int) StoreResult DeleteSubscription(subscription *models.Subscription) StoreResult }
type UserStore ¶
type UserStore interface { CreateUserStore() InsertUser(user *models.User) StoreResult SelectUser(userId string, isWithRooms, isWithDevices, isWithBlocks bool) StoreResult SelectUserByUserIdAndAccessToken(userId, accessToken string) StoreResult SelectUsers() StoreResult SelectUserIdsByUserIds(userIds []string) StoreResult UpdateUser(user *models.User) StoreResult UpdateUserDeleted(userId string) StoreResult SelectContacts(userId string) StoreResult }
Source Files ¶
- apiStore.go
- blockUserStore.go
- deviceStore.go
- gcpSqlApiStore.go
- gcpSqlBlockUserStore.go
- gcpSqlDeviceStore.go
- gcpSqlMessageStore.go
- gcpSqlProvider.go
- gcpSqlRoomStore.go
- gcpSqlRoomUserStore.go
- gcpSqlSubscriptionStore.go
- gcpSqlUserStore.go
- messageStore.go
- mysqlApiStore.go
- mysqlBlockUserStore.go
- mysqlDeviceStore.go
- mysqlMessageStore.go
- mysqlProvider.go
- mysqlRoomStore.go
- mysqlRoomUserStore.go
- mysqlSubscriptionStore.go
- mysqlUserStore.go
- provider.go
- rdbApiStore.go
- rdbBlockUserStore.go
- rdbDeviceStore.go
- rdbMessageStore.go
- rdbRoomStore.go
- rdbRoomUserStore.go
- rdbStore.go
- rdbSubscriptionStore.go
- rdbUserStore.go
- roomStore.go
- roomUserStore.go
- sqliteApiStore.go
- sqliteBlockUserStore.go
- sqliteDeviceStore.go
- sqliteMessageStore.go
- sqliteProvider.go
- sqliteRoomStore.go
- sqliteRoomUserStore.go
- sqliteSubscriptionStore.go
- sqliteUserStore.go
- subscriptionStore.go
- userStore.go
Click to show internal directories.
Click to hide internal directories.