This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // An expo push token is used by our server to send push notifications to our mobile app. | |
| // Once a user has authenticated we need to query expo for the token and store (register) it with our backend. | |
| // This code registers an expo token when: | |
| // a) A users authenticates. | |
| // b) A user who has previously denied push notification permissions grants them and then opens the app. | |
| // c) A user who is authenticated and has not registered opens the app. | |
| export const registerExpoTokenOperation = graphql` | |
| mutation ExpoPushTokenRegistrarRaw_RegisterExpoTokenMutation($input: AddExpoPushTokenInput!) { | |
| addExpoPushToken(input: $input) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Notification } from "expo/build/Notifications/Notifications.types"; | |
| import { Notifications } from "expo"; | |
| interface PushNotificationData { | |
| readonly id: string; | |
| readonly actionType: PushNotificationAction; | |
| readonly linkedMeritId: string; | |
| } | |
| const handleNotification = (notification: Notification): void => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Send push notifications | |
| * <p> | |
| * If you don't get an ExpoClientError, you are guaranteed there will be a ticket for each message sent, | |
| * in corresponding order they were passed in. | |
| * @param notificationRequests a Seq of ExpoPushNotificationRequests, one for each push notification you want to send. | |
| * @return Either an ExpoClientError if the request failed, or a list of TicketResponses | |
| * which document the status of each push notification sent | |
| */ | |
| def sendExpoPushNotificationsEff( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Get push notification receipts from Expo for each push notification ticket id. | |
| * <p> | |
| * A push notification receipt contains final information about the status of a push notification, including | |
| * if the push notification sent successsfully or if any errors occurred. | |
| * <p> | |
| * If the ticket id does not exist on the server, it will not show up in the result map | |
| * @param ticketIds | |
| * @return Either an ExpoClientError if the request failed, or a map of ticket ids to ReceiptResponses, | |
| * where each String represents the ticketId and the ReceiptResponse represents |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "math/rand" | |
| "time" | |
| ) | |
| type Animal interface { | |
| isHappy() bool | |
| eat() string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bytes" | |
| "encoding/base64" | |
| "encoding/json" | |
| "fmt" | |
| "html/template" | |
| "io/ioutil" | |
| "log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| databaseChangeLog: | |
| - changeSet: | |
| - id: 2-create-events-and-kiosks-table | |
| author: kevin@gomerits.com | |
| changes: | |
| - createTable: | |
| tableName: events | |
| schemaName: checkin | |
| columns: | |
| - column: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| databaseChangeLog: | |
| - changeSet: | |
| - id: 3-create-join-table | |
| author: kevin@gomerits.com | |
| changes: | |
| - createTable: | |
| tableName: kiosk_events | |
| remarks: A join table between kiosks and events | |
| schemaName: checkin | |
| columns: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package join | |
| import "gorm.io/gorm" | |
| type Event struct { | |
| gorm.Model | |
| Kiosks []Kiosk `gorm:"many2many:kiosk_events"` | |
| Name string | |
| } |
OlderNewer