Documentation ¶
Index ¶
- func CreateAllCollections()
- func CreateAllDefaultDocuments(environment, version string)
- func CreateAllIndexes()
- func CreateCollections(collections []CollectionToCreate)
- func CreateDefaultDocuments(environment, version string, f func(string, string, *mgo.Database))
- func CreateIndexes(indexes []IndexToCreate)
- func DeleteExpiredTokens() uint
- func DeleteUserByID(...) func(userID string) map[string]time.Time
- func DisableUserByID(...) func(userID string) map[string]time.Time
- func EnableUserByID(...) func(userID string)
- func GetInactiveAccounts(intervalInMonths uint) []string
- func GetNeverUsedAccounts(intervalInDays uint) []string
- func GetNotificationTargetsByUserAndType(userID, notificationType string) []notifications.Target
- func IsEmailAddressValid(emailAddress string) bool
- func RemoveCollections(collections []string)
- func RemoveDefaultDocuments(environment, version string, f func(string, string, *mgo.Database))
- func RemoveIndexes(indexes []IndexToDelete)
- func RemoveUnusedCollections()
- func RemoveUnusedDefaultDocuments(environment, version string)
- func RemoveUnusedIndexes()
- func SaveIPAddressDetails(IPAddress, tokenID string, ...)
- func UpdateAllDefaultDocuments(environment, version string)
- func UpdateDefaultDocuments(environment, version string, f func(string, string, *mgo.Database))
- func UpdateUserSocialNetworksByID(...) func(userID string)
- type CollectionToCreate
- type IndexToCreate
- type IndexToDelete
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAllCollections ¶
func CreateAllCollections()
CreateAllCollections : creates the collections.
func CreateAllDefaultDocuments ¶
func CreateAllDefaultDocuments(environment, version string)
CreateAllDefaultDocuments : populates the database with the initial documents.
func CreateAllIndexes ¶
func CreateAllIndexes()
CreateAllIndexes : checks the indexes of the collections.
func CreateCollections ¶
func CreateCollections(collections []CollectionToCreate)
CreateCollections : creates the collections.
func CreateDefaultDocuments ¶
CreateDefaultDocuments : populates the database with the initial documents.
func CreateIndexes ¶
func CreateIndexes(indexes []IndexToCreate)
CreateIndexes : creates the indexes of the collections.
func DeleteExpiredTokens ¶
func DeleteExpiredTokens() uint
DeleteExpiredTokens : delete the expired tokens.
func DeleteUserByID ¶
func DeleteUserByID(updateDocumentsReferencingToDeletedUser func(userID string, mongoSession *mgo.Database)) func(userID string) map[string]time.Time
DeleteUserByID : deletes an user and all its bound documents.
func DisableUserByID ¶
func DisableUserByID(updateDocumentsReferencingToDisabledUser func(userID string, mongoSession *mgo.Database)) func(userID string) map[string]time.Time
DisableUserByID : disables an user and all its bound documents.
func EnableUserByID ¶
func EnableUserByID(updateDocumentsReferencingToEnabledUser func(userID string, mongoSession *mgo.Database)) func(userID string)
EnableUserByID : enables an user and all its bound documents.
func GetInactiveAccounts ¶
GetInactiveAccounts : returns the count of inactive accounts deleted.
func GetNeverUsedAccounts ¶
GetNeverUsedAccounts : returns the count of unused accounts deleted (never logged in).
func GetNotificationTargetsByUserAndType ¶
func GetNotificationTargetsByUserAndType(userID, notificationType string) []notifications.Target
GetNotificationTargetsByUserAndType : gets the targets of a notification sent to an user.
func IsEmailAddressValid ¶
IsEmailAddressValid : returns true if the email address is valid and messages can be sent it.
func RemoveCollections ¶
func RemoveCollections(collections []string)
RemoveCollections : removes the collections.
func RemoveDefaultDocuments ¶
RemoveDefaultDocuments : removes some unused documents from the database.
func RemoveIndexes ¶
func RemoveIndexes(indexes []IndexToDelete)
RemoveIndexes : removes indexes from the collections.
func RemoveUnusedCollections ¶
func RemoveUnusedCollections()
RemoveUnusedCollections : removes the unused collections.
func RemoveUnusedDefaultDocuments ¶
func RemoveUnusedDefaultDocuments(environment, version string)
RemoveUnusedDefaultDocuments : removes some unused documents from the database.
func RemoveUnusedIndexes ¶
func RemoveUnusedIndexes()
RemoveUnusedIndexes : removes some indexes from the collections.
func SaveIPAddressDetails ¶
func SaveIPAddressDetails(IPAddress, tokenID string, getIPAddressDetailsFunc func(IPAddress string) *location.IPAddressDetails)
SaveIPAddressDetails : save the IP address details.
func UpdateAllDefaultDocuments ¶
func UpdateAllDefaultDocuments(environment, version string)
UpdateAllDefaultDocuments : updates some default documents from the database.
func UpdateDefaultDocuments ¶
UpdateDefaultDocuments : updates some default documents from the database.
Types ¶
type CollectionToCreate ¶
type CollectionToCreate struct { Name string Info mgo.CollectionInfo }
CollectionToCreate : struct representing a collection.
type IndexToCreate ¶
IndexToCreate : struct representing the index of a collection.
type IndexToDelete ¶
IndexToDelete : struct representing the index of a collection.