actionrepo

package
v0.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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

func UseRemoveCalendarCode(rlog log.Ext1FieldLogger, tx *sqlx.Tx, code string) error

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

func VerifyMail(rlog log.Ext1FieldLogger, tx *sqlx.Tx, code string) (verified bool, err error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL