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
| // Copyright Fauna, Inc. | |
| // SPDX-License-Identifier: MIT-0 | |
| import { IsWidget } from '../src/widget/lib'; | |
| // Test setup, etc. | |
| test('Widgets are identified correctly', async () => { | |
| const result = await faunaClient.query( | |
| Let({ |
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
| # Copyright Fauna, Inc. | |
| # SPDX-License-Identifier: MIT-0 | |
| version: "3.9" | |
| services: | |
| fauna: | |
| image: fauna/faunadb:latest | |
| ports: | |
| - "8443:8443" | |
| - "8444:8444" |
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
| { | |
| "counter": 0 | |
| } |
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
| #!/bin/bash | |
| aws cloudformation delete-stack \ | |
| --stack-name $@ |
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
| #!/bin/bash | |
| aws cloudformation describe-stacks \ | |
| --stack-name $1 \ | |
| --query 'Stacks[].{Name: StackName, Outputs: Outputs}' "${@:2}" |
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
| const ready = true; | |
| exports.readyHandler = () => { return ready; }; | |
| exports.notReadyHandler = () => {return !ready; }; |
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
| func (d *dependencies) handler(request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) { | |
| input := dynamodb.QueryInput{ | |
| ExpressionAttributeValues: map[string]*dynamodb.AttributeValue{ | |
| ":v1": { | |
| S: aws.String(request.PathParameters[PathParameter]), | |
| }, | |
| }, | |
| // hard-coded for proof of concept | |
| IndexName: aws.String("SSN-index"), |
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 ( | |
| "encoding/json" | |
| "fmt" | |
| "net/http" | |
| "os" | |
| "time" | |
| "github.com/aws/aws-lambda-go/events" |
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
| function buildError(statusCode, message) { | |
| const error = { | |
| statusCode: statusCode, | |
| body: JSON.stringify({ | |
| error: message | |
| }) | |
| }; | |
| return error; | |
| }; |
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
| function promisePrototype(event) { | |
| return new Promise(function(resolve, reject) { | |
| if (success) { | |
| resolve(someNewObject); | |
| } else { | |
| reject(buildError(500, "An internal error occured.")); | |
| } | |
| }); | |
| } |
NewerOlder