database

package
v0.0.0-...-82fa76c Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEmailDB

func AddEmailDB(userid int, emailAddress string) string

AddEmailDB - Do not call this directly. Use `NewEmail` from `email` instead.

func AddTripDB

func AddTripDB(newTrip structs.IStructs) int

AddTripDB - Adding new trip into the database.

func ConfirmEmailDB

func ConfirmEmailDB(
	id int, userid int, emailAddress string, code string,
) bool

ConfirmEmailDB - Do not call this directly. Use `ConfirmEmail` from `email` instead.

func DeleteEmailDB

func DeleteEmailDB(userid int, emailAddress string) bool

func DeleteEmailsDB

func DeleteEmailsDB(userid int) bool

func DeleteTripDB

func DeleteTripDB(existingTrip structs.IStructs) bool

DeleteTripDB - Delete trip from the database.

func DeleteUserDB

func DeleteUserDB(existingUser structs.IStructs) bool

DeleteUserDB - Delete user from the database.

func DummyTrip

func DummyTrip() wings.Trip

DummyTrip -- Self explanatory, trip that's empty / placeholder

func DummyUser

func DummyUser() wings.User

DummyUser -- Self explanatory, user that's empty / placeholder

func ForceConfirm

func ForceConfirm(uid int) bool

PROD: Remove on prod. Only used for automated testing.

func GetEmailDB

func GetEmailDB(code string) (int, int, string, bool)

func GetEmailWithIDDB

func GetEmailWithIDDB(userid int) string

func GetRecentTrips

func GetRecentTrips() []wings.Trip

func GetTripDB

func GetTripDB(id int, userid int) structs.IStructs

GetTripDB - Retrieve trip information from database with ID.

func GetUserDB

func GetUserDB(id int, viewer int) structs.IStructs

GetUserDB - Retrieve user information from database with ID.

func GetUserPasswordHashDB

func GetUserPasswordHashDB(user wings.NewUser) string

GetUserPasswordHashDB - Retreives and return the password hash of the user account.

func GetUserWithEmailDB

func GetUserWithEmailDB(user wings.NewUser) wings.User

GetUserWithEmailDB - Retrieve user information from database with their email.

func NewUserDB

func NewUserDB(newUser structs.IStructs) int

NewUserDB - Adding new user to the database.

func NotExists

func NotExists(haystack []int, needles []int) []int

NotExists - Return an array of int from haystack that aren't in the needles

func UpdateTripDB

func UpdateTripDB(updatedTrip structs.IStructs) bool

UpdateTripDB - Update trip information back into the database.

func UpdateUserDB

func UpdateUserDB(updatedUser structs.IStructs) bool

UpdateUserDB - Update user information back into the database.

Types

This section is empty.

Jump to

Keyboard shortcuts

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