serverutils

package
v0.0.0-...-4167201 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchUserDataWithNumber

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

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

func GetFirebaseClient

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

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

func LookupUserNumber

func LookupUserNumber(ctx context.Context, fbClient *firestore.Client, 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, fbClient *firestore.Client, 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 SendText

func SendText(client *http.Client, number, message string) (response *http.Response, err 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