serverutils

package
v0.0.0-...-de55299 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchUserDataWithNumber

func FetchUserDataWithNumber(ctx context.Context, number string) (map[string]interface{}, string)

FetchUserDataWithNumber check firebase to see if the user exists in our database

func GetFirebaseApp

func GetFirebaseApp(ctx context.Context) (*firebase.App, error)

func GetFirebaseClient

func GetFirebaseClient(ctx context.Context) *firestore.Client

GetFirebaseClient creates and returns a new firebase client, used to interact with the database

func GetUserdata

func GetUserdata(ctx context.Context, useruids []interface{}) ([]*auth.UserRecord, error)

func LookupUserNumber

func LookupUserNumber(ctx context.Context, uid string) (string, error)

LookupUserNumber looks up a user's phone number from their uid

func MakeAtlasDepartmentRequest

func MakeAtlasDepartmentRequest(client *http.Client) (*http.Response, error)

func MakeAtlasSectionRequest

func MakeAtlasSectionRequest(client *http.Client, term, dept, course string) (*http.Response, error)

MakeAtlasSectionRequest makes a request to Atlas for section data in the term, department, and course

func MoveTrackedSection

func MoveTrackedSection(ctx context.Context, crn, uid, term string) error

MoveTrackedSection moves old sections out of the prod area

func ParseDepartmentResponse

func ParseDepartmentResponse(response *http.Response) ([]*models.Department, error)

func ParseSectionResponse

func ParseSectionResponse(response *http.Response, crnToFind string) ([]models.Section, error)

ParseSectionResponse turns the http.Response into a slice of sections

func SendEmail

func SendEmail(userdata []*auth.UserRecord, section models.Section) error

func SendText

func SendText(client *http.Client, number, message string) error

SendText sends a text message to the specified phone number

Types

This section is empty.

Jump to

Keyboard shortcuts

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