utils

package
v0.0.0-...-e9e2542 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONST_COL_SESSION = "sessions"
	CONST_COL_OTP     = "otp"
	CONST_COL_USER    = "users"
)

Variables

This section is empty.

Functions

func CreateSessionSecret

func CreateSessionSecret(app *common.App, otp *models.OTP) (string, int64, error)

func DebugGetOTP

func DebugGetOTP(app *common.App, r *http.Request) (*models.OTP, error)

GetOTP gets OTP record from firestore

func GetOTP

func GetOTP(app *common.App, r *http.Request) (*models.OTP, error)

GetOTP gets OTP record from firestore

func GetSessionUser

func GetSessionUser(app *common.App, r *http.Request) (*models.User, error)

func GetUser

func GetUser(app *common.App, ref models.UserRef) (*models.User, error)

func GetUserByEmail

func GetUserByEmail(app *common.App, email string) (*models.User, error)

func GetUserByID

func GetUserByID(app *common.App, id string) (*models.User, error)

func RegionCollection

func RegionCollection(app *common.App, user *models.User, collectionID string) *firestore.CollectionRef

RegionCollection abstracts the handling of subdata to within the country/region

func UserCollection

func UserCollection(app *common.App, user *models.User, collectionID string) *firestore.CollectionRef

UserCollection abstracts the handling of subdata to within the user object

func UserRefCollection

func UserRefCollection(app *common.App, userRef models.UserRef, collectionID string) *firestore.CollectionRef

Types

This section is empty.

Jump to

Keyboard shortcuts

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