Documentation ¶
Index ¶
- type DynamoConn
- func (d *DynamoConn) AddContact(userID string, contact *models.Contact) error
- func (d *DynamoConn) Create(sess *session.Session) error
- func (d *DynamoConn) CreateUser(user *models.User) (*dynamodb.PutItemOutput, error)
- func (d *DynamoConn) GetEmergencyNumbers(countryCode string) (*models.EmergencyInfo, error)
- func (d *DynamoConn) GetSettings(uid string) (*models.Settings, error)
- func (d *DynamoConn) GetUser(uid string) (*models.User, error)
- func (d *DynamoConn) MustGetGMapsKey() string
- func (d *DynamoConn) MustGetMapsKey() string
- func (d *DynamoConn) UpdateLocation(userID string, location []float64) error
- func (d *DynamoConn) UpdateProfile(profile *models.User) error
- func (d *DynamoConn) UpdateSettings(settings *models.Settings) error
- func (d *DynamoConn) UpdateTier(userID string, phoneNumber string, tier common.AlertTier) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamoConn ¶
DynamoConn encapsulates data and methods necessary for communicating with DynamoDB
func (*DynamoConn) AddContact ¶
func (d *DynamoConn) AddContact(userID string, contact *models.Contact) error
AddContact associates an additional contact to the given user
func (*DynamoConn) Create ¶
func (d *DynamoConn) Create(sess *session.Session) error
Create creates a new, private DynamoDB session
func (*DynamoConn) CreateUser ¶
func (d *DynamoConn) CreateUser(user *models.User) (*dynamodb.PutItemOutput, error)
CreateUser will create a user for the application
func (*DynamoConn) GetEmergencyNumbers ¶
func (d *DynamoConn) GetEmergencyNumbers(countryCode string) (*models.EmergencyInfo, error)
GetEmergencyNumbers retrieves police, fire, and ambulance numbers, given a country code
func (*DynamoConn) GetSettings ¶
func (d *DynamoConn) GetSettings(uid string) (*models.Settings, error)
GetSettings retrieves a user's settings from the Settings table
func (*DynamoConn) GetUser ¶
func (d *DynamoConn) GetUser(uid string) (*models.User, error)
GetUser will retrieve a user from the database
func (*DynamoConn) MustGetGMapsKey ¶
func (d *DynamoConn) MustGetGMapsKey() string
MustGetGMapsKey retrives the Google Maps API
func (*DynamoConn) MustGetMapsKey ¶
func (d *DynamoConn) MustGetMapsKey() string
MustGetMapsKey retrives the MapQuest API key from the database
func (*DynamoConn) UpdateLocation ¶
func (d *DynamoConn) UpdateLocation(userID string, location []float64) error
UpdateLocation updates the location of a user when a location poll is invoked
func (*DynamoConn) UpdateProfile ¶
func (d *DynamoConn) UpdateProfile(profile *models.User) error
UpdateProfile updates an existing user's profile
func (*DynamoConn) UpdateSettings ¶
func (d *DynamoConn) UpdateSettings(settings *models.Settings) error
UpdateSettings updates an existing user's settings
func (*DynamoConn) UpdateTier ¶
UpdateTier updates an existing contact's tier