mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 06:57:35 +08:00
support scheduled transaction (#2)
This commit is contained in:
+11
-1
@@ -26,7 +26,7 @@ func (s *ServiceUsingDB) TokenDB(uid int64) *datastore.Database {
|
||||
return s.container.TokenStore.Choose(uid)
|
||||
}
|
||||
|
||||
// TokenDBByIndex returns the datastore by index
|
||||
// TokenDBByIndex returns the datastore which contains user token by index
|
||||
func (s *ServiceUsingDB) TokenDBByIndex(index int) *datastore.Database {
|
||||
return s.container.TokenStore.Get(index)
|
||||
}
|
||||
@@ -41,6 +41,16 @@ func (s *ServiceUsingDB) UserDataDB(uid int64) *datastore.Database {
|
||||
return s.container.UserDataStore.Choose(uid)
|
||||
}
|
||||
|
||||
// UserDataDBByIndex returns the datastore which contains user data by index
|
||||
func (s *ServiceUsingDB) UserDataDBByIndex(index int) *datastore.Database {
|
||||
return s.container.UserDataStore.Get(index)
|
||||
}
|
||||
|
||||
// UserDataDBCount returns the count of datastores which contains user data
|
||||
func (s *ServiceUsingDB) UserDataDBCount() int {
|
||||
return s.container.UserDataStore.Count()
|
||||
}
|
||||
|
||||
// ServiceUsingConfig represents a service that need to use config
|
||||
type ServiceUsingConfig struct {
|
||||
container *settings.ConfigContainer
|
||||
|
||||
Reference in New Issue
Block a user