Documentation
¶
Index ¶
- func AddRecreateTokenCode(rlog log.Ext1FieldLogger, tx *sqlx.Tx, mtID mtid.MTID, code string) (err error)
- func AddRemoveFromCalendarCode(rlog log.Ext1FieldLogger, tx *sqlx.Tx, mtID mtid.MTID, ...) (err error)
- func AddScheduleNotificationCode(rlog log.Ext1FieldLogger, tx *sqlx.Tx, mtID mtid.MTID, notificationID uint64, ...) (err error)
- func AddVerifyEmailCode(rlog log.Ext1FieldLogger, tx *sqlx.Tx, mtID mtid.MTID, code string, ...) (err error)
- func GetScheduledNotificationActionCode(rlog log.Ext1FieldLogger, tx *sqlx.Tx, mtID mtid.MTID, nid uint64) (code string, err error)
- func UseRemoveCalendarCode(rlog log.Ext1FieldLogger, tx *sqlx.Tx, code string) error
- func UseUnsubscribeFurtherNotificationsCode(rlog log.Ext1FieldLogger, tx *sqlx.Tx, code string) error
- func VerifyMail(rlog log.Ext1FieldLogger, tx *sqlx.Tx, code string) (verified bool, err error)
- type RecreateData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRecreateTokenCode ¶
func AddRecreateTokenCode( rlog log.Ext1FieldLogger, tx *sqlx.Tx, mtID mtid.MTID, code string, ) (err error)
AddRecreateTokenCode adds a code for token recreation to the database
func AddRemoveFromCalendarCode ¶
func AddRemoveFromCalendarCode( rlog log.Ext1FieldLogger, tx *sqlx.Tx, mtID mtid.MTID, code, calendarName string, ) (err error)
AddRemoveFromCalendarCode adds a code for removing a token from a calendar to the database
func AddScheduleNotificationCode ¶
func AddScheduleNotificationCode( rlog log.Ext1FieldLogger, tx *sqlx.Tx, mtID mtid.MTID, notificationID uint64, code string, ) (err error)
AddScheduleNotificationCode adds a code for un-scheduling scheduled notifications
func AddVerifyEmailCode ¶
func AddVerifyEmailCode( rlog log.Ext1FieldLogger, tx *sqlx.Tx, mtID mtid.MTID, code string, expiresIn int, ) (err error)
AddVerifyEmailCode adds a code for email verification to the database
func GetScheduledNotificationActionCode ¶
func GetScheduledNotificationActionCode(rlog log.Ext1FieldLogger, tx *sqlx.Tx, mtID mtid.MTID, nid uint64) ( code string, err error, )
GetScheduledNotificationActionCode returns the action code for a scheduled notification
func UseRemoveCalendarCode ¶
UseRemoveCalendarCode uses a calendar remove ActionCode to remove a token from a calendar and then deletes the code from the database
func UseUnsubscribeFurtherNotificationsCode ¶
func UseUnsubscribeFurtherNotificationsCode(rlog log.Ext1FieldLogger, tx *sqlx.Tx, code string) error
UseUnsubscribeFurtherNotificationsCode uses the ActionCode to unsubscribe from further scheduled notifications and deletes the code
func VerifyMail ¶
VerifyMail verifies a mail address
Types ¶
type RecreateData ¶
type RecreateData struct { Name db.NullString `db:"name"` Issuer string `db:"issuer"` Restrictions restrictions.Restrictions `db:"restrictions"` Capabilities api.Capabilities `db:"capabilities"` Rotation *api.Rotation `db:"rotation"` Created unixtime.UnixTime `db:"created"` }
RecreateData holds data stored in the database to enable re-creation of mytokens
func GetRecreateData ¶
func GetRecreateData(rlog log.Ext1FieldLogger, tx *sqlx.Tx, code string) (data RecreateData, found bool, err error)
GetRecreateData returns the stored token recreation data linked to the passed code