driver

package
v0.0.0-...-e4e5e88 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAll

CreateAll initializes the necessary API providers for Lambda handlers

func CreateEmergencyMessage

func CreateEmergencyMessage(emergency common.EmergencyType, user *models.User, mapsKey string, location []float64) (string, error)

CreateEmergencyMessage generates a message given a user's information and their severity Should not used with the CHECKIN emergency type

func CreatePollMessage

func CreatePollMessage(user *models.User, mapsKey string, location []float64, tier common.AlertTier) (string, error)

CreatePollMessage creates the

func CreateTwilMLXML

func CreateTwilMLXML(user *models.User, lastLocation string) ([]byte, error)

CreateTwilMLXML creates the XML necessary for the gotwilio.NewCallbackParameters invocation in notification.SendVoiceCall

func ErrorResponse

func ErrorResponse(status int, errs ...error) events.APIGatewayProxyResponse

ErrorResponse simplifies the sending of errors to the client from the API

func GetAddress

func GetAddress(latlng []float64, key string, useTier bool, tier common.AlertTier) (string, error)

GetAddress is used to ReverseGeocode a latlng combination into a precise address If `useTier` is passed as true then address information will be filtered based on the tier provided in `tier`. AlertTier.FIRST will receive all data, this is equivalent to not providing checkTier AlertTier.SECOND will not receive street information AlrtTier.THIRD will only receive state, postalcode, and country code

func GetCountryCode

func GetCountryCode(latlng []float64, key string) (string, error)

GetCountryCode retrives a country code associated with a latitude and longitude for the ESGetEmergencyInfo Lambda function

func GetEmergencyServices

func GetEmergencyServices(location []float64, db *database.DynamoConn) (string, error)

GetEmergencyServices retrives hospitals and pharmacies within a 10 mile radius of the given location

func SuccessfulResponse

func SuccessfulResponse(bodyContent string) events.APIGatewayProxyResponse

SuccessfulResponse prepares and sends a successful server response for the calling Lambda function

func UploadTwilMLXML

func UploadTwilMLXML(twilML []byte, sess *session.Session) (string, error)

UploadTwilMLXML uploads the XML generated in CreateTwilMLXML and returns the URL for the object

Types

This section is empty.

Jump to

Keyboard shortcuts

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