Documentation ¶
Index ¶
- func AddAbilitiesToUser(c *gin.Context, abilities []string, userID string) error
- func BuildTokenFromID(tokenID string) (*authentication.Token, error)
- func CancelUserRegistration(c *gin.Context, userID, registrationKey string) error
- func CreateContact(c *gin.Context, emailAddress, subject, text string) error
- func CreateNewDeleteAccountProcess(c *gin.Context, userID string) (string, string, error)
- func CreateNewDisableAccountProcess(c *gin.Context, userID string) (string, string, error)
- func CreateNewUpdateEmailAddressProcess(c *gin.Context, userID, emailAddress string) (string, string, error)
- func CreateNewUpdatePasswordProcess(c *gin.Context, userID, encryptedPassword string) (string, string, error)
- func CreateNewVerifyEmailAddressProcess(c *gin.Context, userID string) (string, string, error)
- func DeleteAccountPublicImage(c *gin.Context)
- func DeleteForgotPasswordProcess(c *gin.Context, processID string) error
- func DeleteProcessByID(c *gin.Context, processID string) error
- func DeleteTokenByID(c *gin.Context, tokenID string) error
- func DeleteTokenByIDByAdmin(c *gin.Context, tokenID string) error
- func DeleteUserByID(c *gin.Context, userID string) error
- func DeleteUserNotification(c *gin.Context, userID, notificationID string) error
- func DisableUserByID(c *gin.Context, userID string) (authentication.User, error)
- func DoesAccountWithEmailAddressExist(c *gin.Context, emailAddress string) bool
- func DoesAccountWithUsernameExist(c *gin.Context, username string) bool
- func DoesUserWithFacebookUserIDExist(c *gin.Context, userID string) bool
- func DoesUserWithGoogleUserIDExist(c *gin.Context, userID string) bool
- func EnableUserByID(c *gin.Context, userID string) (authentication.User, error)
- func ExtendTokenExpirationDateFromID(tokenID string, ttl time.Duration) error
- func GetContactForAdmin(c *gin.Context, contactID string) (interface{}, error)
- func GetContactsForAdmin(c *gin.Context, offset, limit int) (interface{}, error)
- func GetDisabledUsersForAdmin(c *gin.Context) (interface{}, error)
- func GetEnabledUsersForAdmin(c *gin.Context) (interface{}, error)
- func GetForgotPasswordProcessDetailsByID(c *gin.Context, processID string) (userID, processPrivateKey string, err error)
- func GetLatestVersionOfTermsAcceptedByUser(c *gin.Context, userID string) string
- func GetOwnedAccountDetails(c *gin.Context, userID string) interface{}
- func GetOwnedTokenByID(c *gin.Context, tokenID string) (interface{}, string, error)
- func GetOwnedTokens(c *gin.Context, userID string) (interface{}, error)
- func GetRegistrationDetails(c *gin.Context, userID string) (*authentication.Details, error)
- func GetTokenDetailsByID(c *gin.Context, tokenID string) (authentication.Token, error)
- func GetTokenExpirationDate(c *gin.Context, tokenID string) (time.Time, error)
- func GetTokensForAdmin(c *gin.Context, userID string) (interface{}, error)
- func GetUserAbilities(c *gin.Context, userID string) (bool, []string)
- func GetUserAndLocaleFromAuthToken(token *jwt.Token) (interface{}, string)
- func GetUserDetailsAndEncryptedPasswordByIdentifierFromEnabledUser(c *gin.Context, identifier string) (authentication.User, string, error)
- func GetUserDetailsByFacebookUserID(c *gin.Context, userID string) (authentication.User, error)
- func GetUserDetailsByGoogleUserID(c *gin.Context, userID string) (authentication.User, error)
- func GetUserDetailsByID(c *gin.Context, userID string) (authentication.User, error)
- func GetUserDetailsByIdentifier(c *gin.Context, identifier string) (authentication.User, error)
- func IsValidAuthToken(c *gin.Context, tokenID string) bool
- func NewForgotPasswordProcessForUser(c *gin.Context, userID, processPrivateKey string) (string, error)
- func NotificationReceivedByUser(c *gin.Context, userID, notificationID string) (interface{}, error)
- func NotificationsReceivedByUser(c *gin.Context, userID string) (interface{}, error)
- func NotificationsSubscribedByUser(c *gin.Context, userID string) []string
- func RegisterByEmailAddress(c *gin.Context, ...) error
- func RegisterByThirdPartyToken(c *gin.Context, username string, tokenInfos validator.TokenInfos, ...) error
- func RemoveAbilitiesFromUser(c *gin.Context, abilities []string, userID string) error
- func SaveAuthenticationToken(c *gin.Context, details authentication.Details) (tokenID string, knownIPAddress bool, err error)
- func SaveFacebookUserTokenDetailsToUser(c *gin.Context, userID string, tokenInfos validator.TokenInfos) error
- func SaveGoogleUserTokenDetailsToUser(c *gin.Context, userID string, tokenInfos validator.TokenInfos) error
- func SetAbilitiesToUser(c *gin.Context, abilities []string, userID string) error
- func SubscribeNotificationsToUser(c *gin.Context, userID string, notifications []string) error
- func UnsubscribeNotificationFromUser(c *gin.Context, userID, notification, unsubscribeKey string) error
- func UpdateAccountPublicImage(c *gin.Context)
- func UpdateAccountPublicProfile(c *gin.Context)
- func UpdateContact(c *gin.Context, contactID string, done bool) error
- func UpdateTokenByID(c *gin.Context, tokenID, name string, enableNotifications bool, ...) error
- func UpdateUserDescriptionByAdmin(c *gin.Context, userID, locale, description string) error
- func UpdateUserEmailAddress(c *gin.Context, userID, emailAddress string) error
- func UpdateUserInformationsByAdmin(c *gin.Context, userID, firstName, lastName, emailAddress string, ...) error
- func UpdateUserNotificationNotified(c *gin.Context, userID, notificationID string) error
- func UpdateUserNotificationRead(c *gin.Context, userID, notificationID string) error
- func UpdateUserNotificationsByAdmin(c *gin.Context, userID string, notifications []string) error
- func UpdateUserPassword(c *gin.Context, userID, password string, isPasswordEncrypted bool) error
- func UpdateUserPasswordByAdmin(c *gin.Context, userID, password string) error
- func UpdateUserSettingsByAdmin(c *gin.Context, userID, locale, timezone string) error
- func UpdateUserSocialByAdmin(c *gin.Context, userID, facebook, twitter, instagram string) error
- func UpdateUserSocialNetworks(c *gin.Context, userID, facebook, twitter, instagram string) error
- func UpdateVersionOfTermsAcceptedByUser(c *gin.Context, userID, termsVersion string) error
- func UpdatedAccountInfos(c *gin.Context, userID, firstName, lastName string) error
- func UpdatedAccountSettings(c *gin.Context, userID, locale, timezone string) error
- func UserEmailAddressIsVerified(c *gin.Context, userID string) error
- func ValidateUserRegistration(c *gin.Context, userID, registrationKey string) error
- func VerifyProcess(c *gin.Context, processID, key string) (string, string, error)
- func WrongAccessToForgotPasswordProcess(c *gin.Context, processID string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAbilitiesToUser ¶
AddAbilitiesToUser : adds some abilities to an user.
func BuildTokenFromID ¶
func BuildTokenFromID(tokenID string) (*authentication.Token, error)
BuildTokenFromID : returns the content of an auth token.
func CancelUserRegistration ¶
CancelUserRegistration : cancel the registration of an user.
func CreateContact ¶
CreateContact : creates a contact.
func CreateNewDeleteAccountProcess ¶
CreateNewDeleteAccountProcess : creates a process and returns its unique ID.
func CreateNewDisableAccountProcess ¶
CreateNewDisableAccountProcess : creates a process and returns its unique ID.
func CreateNewUpdateEmailAddressProcess ¶
func CreateNewUpdateEmailAddressProcess(c *gin.Context, userID, emailAddress string) (string, string, error)
CreateNewUpdateEmailAddressProcess : creates a process and returns its unique ID.
func CreateNewUpdatePasswordProcess ¶
func CreateNewUpdatePasswordProcess(c *gin.Context, userID, encryptedPassword string) (string, string, error)
CreateNewUpdatePasswordProcess : creates a process and returns its unique ID.
func CreateNewVerifyEmailAddressProcess ¶
CreateNewVerifyEmailAddressProcess : creates a process and returns its unique ID.
func DeleteAccountPublicImage ¶
DeleteAccountPublicImage : deletes the image of the public profile.
func DeleteForgotPasswordProcess ¶
DeleteForgotPasswordProcess : deletes a forgot password process.
func DeleteProcessByID ¶
DeleteProcessByID : deletes a process by its unique ID.
func DeleteTokenByID ¶
DeleteTokenByID : delete an auth token by its ID.
func DeleteTokenByIDByAdmin ¶
DeleteTokenByIDByAdmin : deletes a user's auth token by an admin.
func DeleteUserByID ¶
DeleteUserByID : deletes an user by its ID.
func DeleteUserNotification ¶
DeleteUserNotification : deletes a notification received by the user.
func DisableUserByID ¶
DisableUserByID : disables an user by its ID.
func DoesAccountWithEmailAddressExist ¶
DoesAccountWithEmailAddressExist : returns true if an account with this email address exists.
func DoesAccountWithUsernameExist ¶
DoesAccountWithUsernameExist : returns true if an account with this username exists.
func DoesUserWithFacebookUserIDExist ¶
DoesUserWithFacebookUserIDExist : returns true if an account with this facebook id exists.
func DoesUserWithGoogleUserIDExist ¶
DoesUserWithGoogleUserIDExist : returns true if an account with this google id exists.
func EnableUserByID ¶
EnableUserByID : enables an user by its ID.
func ExtendTokenExpirationDateFromID ¶
ExtendTokenExpirationDateFromID : extends the expiration date of an auth token.
func GetContactForAdmin ¶
GetContactForAdmin : gets a contact.
func GetContactsForAdmin ¶
GetContactsForAdmin : returns the contacts for the admin panel.
func GetDisabledUsersForAdmin ¶
GetDisabledUsersForAdmin : returns the disabled users for the admin panel.
func GetEnabledUsersForAdmin ¶
GetEnabledUsersForAdmin : returns the enabled users for the admin panel.
func GetForgotPasswordProcessDetailsByID ¶
func GetForgotPasswordProcessDetailsByID(c *gin.Context, processID string) (userID, processPrivateKey string, err error)
GetForgotPasswordProcessDetailsByID : returns the user ID and the private key a forgot passsword process.
func GetLatestVersionOfTermsAcceptedByUser ¶
GetLatestVersionOfTermsAcceptedByUser : returns the latest version of the terms accepted by the user.
func GetOwnedAccountDetails ¶
GetOwnedAccountDetails : returns the details of the user's account.
func GetOwnedTokenByID ¶
GetOwnedTokenByID : returns an auth token by its ID for an user.
func GetOwnedTokens ¶
GetOwnedTokens : returns the auth token for an user.
func GetRegistrationDetails ¶
GetRegistrationDetails : returns the details of the registration of an user.
func GetTokenDetailsByID ¶
GetTokenDetailsByID : returns the details of an auth token.
func GetTokenExpirationDate ¶
GetTokenExpirationDate : returns the expiration date of an auth token.
func GetTokensForAdmin ¶
GetTokensForAdmin : returns the user's auth tokens for the admin panel.
func GetUserAbilities ¶
GetUserAbilities ; returns the abilities of an user.
func GetUserAndLocaleFromAuthToken ¶
GetUserAndLocaleFromAuthToken : returns the user struct and the user's locale.
func GetUserDetailsAndEncryptedPasswordByIdentifierFromEnabledUser ¶
func GetUserDetailsAndEncryptedPasswordByIdentifierFromEnabledUser(c *gin.Context, identifier string) (authentication.User, string, error)
GetUserDetailsAndEncryptedPasswordByIdentifierFromEnabledUser : returns the details of an user and its encrypted password by its identifier (email address or username).
func GetUserDetailsByFacebookUserID ¶
GetUserDetailsByFacebookUserID : returns the details of an user by its unique facebook ID.
func GetUserDetailsByGoogleUserID ¶
GetUserDetailsByGoogleUserID : returns the details of an user by its unique google ID.
func GetUserDetailsByID ¶
GetUserDetailsByID : returns the details of an user by its ID.
func GetUserDetailsByIdentifier ¶
GetUserDetailsByIdentifier : returns the details of an user by its identifier (email address or username).
func IsValidAuthToken ¶
IsValidAuthToken : returns trus if the auth token is valid.
func NewForgotPasswordProcessForUser ¶
func NewForgotPasswordProcessForUser(c *gin.Context, userID, processPrivateKey string) (string, error)
NewForgotPasswordProcessForUser : returns the unique ID of a new forgot passsword process.
func NotificationReceivedByUser ¶
NotificationReceivedByUser : returns a notification received by the user.
func NotificationsReceivedByUser ¶
NotificationsReceivedByUser : returns the latest notifications received by the user.
func NotificationsSubscribedByUser ¶
NotificationsSubscribedByUser : returns the notifications subscribed by the user.
func RegisterByEmailAddress ¶
func RegisterByEmailAddress(c *gin.Context, username, encryptedPassword, emailAddress, locale, termsVersion, registrationCode, privateKey, source, ip string, device authentication.Device) error
RegisterByEmailAddress : saves the registration details of an user.
func RegisterByThirdPartyToken ¶
func RegisterByThirdPartyToken(c *gin.Context, username string, tokenInfos validator.TokenInfos, tokenSource, locale, termsVersion, registrationCode, privateKey, source, ip string, device authentication.Device) error
RegisterByThirdPartyToken : saves the registration details of an user.
func RemoveAbilitiesFromUser ¶
RemoveAbilitiesFromUser : remove some abilities from an user.
func SaveAuthenticationToken ¶
func SaveAuthenticationToken(c *gin.Context, details authentication.Details) (tokenID string, knownIPAddress bool, err error)
SaveAuthenticationToken : saves an auth token.
func SaveFacebookUserTokenDetailsToUser ¶
func SaveFacebookUserTokenDetailsToUser(c *gin.Context, userID string, tokenInfos validator.TokenInfos) error
SaveFacebookUserTokenDetailsToUser : saves the user's facebook details of an user.
func SaveGoogleUserTokenDetailsToUser ¶
func SaveGoogleUserTokenDetailsToUser(c *gin.Context, userID string, tokenInfos validator.TokenInfos) error
SaveGoogleUserTokenDetailsToUser : saves the user's google details of an user.
func SetAbilitiesToUser ¶
SetAbilitiesToUser : sets the abilities to an user.
func SubscribeNotificationsToUser ¶
SubscribeNotificationsToUser : the user subscribes to these notifications.
func UnsubscribeNotificationFromUser ¶
func UnsubscribeNotificationFromUser(c *gin.Context, userID, notification, unsubscribeKey string) error
UnsubscribeNotificationFromUser : the user has unsubscribed from a notification.
func UpdateAccountPublicImage ¶
UpdateAccountPublicImage : updates the image of the public profile.
func UpdateAccountPublicProfile ¶
UpdateAccountPublicProfile : updates the public profile of an account.
func UpdateContact ¶
UpdateContact : updates a contact.
func UpdateTokenByID ¶
func UpdateTokenByID(c *gin.Context, tokenID, name string, enableNotifications bool, notifications []string) error
UpdateTokenByID : updates the details of a token.
func UpdateUserDescriptionByAdmin ¶
UpdateUserDescriptionByAdmin : updates the description of a user by an admin.
func UpdateUserEmailAddress ¶
UpdateUserEmailAddress : update the email address of an user.
func UpdateUserInformationsByAdmin ¶
func UpdateUserInformationsByAdmin(c *gin.Context, userID, firstName, lastName, emailAddress string, validEmailAddress bool) error
UpdateUserInformationsByAdmin : updates the informations of a user by an admin.
func UpdateUserNotificationNotified ¶
UpdateUserNotificationNotified : updates the notified flag of a notification received by the user.
func UpdateUserNotificationRead ¶
UpdateUserNotificationRead : updates the read flag of a notification received by the user.
func UpdateUserNotificationsByAdmin ¶
UpdateUserNotificationsByAdmin : updates the notifications of a user by an admin.
func UpdateUserPassword ¶
UpdateUserPassword : update the password of an user.
func UpdateUserPasswordByAdmin ¶
UpdateUserPasswordByAdmin : updates the password of a user by an admin.
func UpdateUserSettingsByAdmin ¶
UpdateUserSettingsByAdmin : updates the settings of a user by an admin.
func UpdateUserSocialByAdmin ¶
UpdateUserSocialByAdmin : updates the social networks of a user by an admin.
func UpdateUserSocialNetworks ¶
UpdateUserSocialNetworks : update the social network links of an user.
func UpdateVersionOfTermsAcceptedByUser ¶
UpdateVersionOfTermsAcceptedByUser : the user has accepted this version of terms.
func UpdatedAccountInfos ¶
UpdatedAccountInfos : updates the details of an user's account.
func UpdatedAccountSettings ¶
UpdatedAccountSettings : updates the settings of an user's account.
func UserEmailAddressIsVerified ¶
UserEmailAddressIsVerified : the email address of an user is verified.
func ValidateUserRegistration ¶
ValidateUserRegistration : validate the registration of an user.
func VerifyProcess ¶
VerifyProcess : verify a process and returns its unique ID and its stored value.
func WrongAccessToForgotPasswordProcess ¶
WrongAccessToForgotPasswordProcess : actions to execute when a wrong access to a forgot password process occurs.
Types ¶
This section is empty.