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 item | |
| import ( | |
| "errors" | |
| "reflect" | |
| ) | |
| // Marshal takes an interface and returns an Item compatible with tidedot | |
| func Marshal(o interface{}) map[string]interface{} { | |
| oType := reflect.TypeOf(o) |
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/csv" | |
| "io" | |
| "reflect" | |
| ) | |
| // test holds a structure | |
| type test struct { |
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 createTable(svc *dynamodb.DynamoDB, tableName string) error { | |
| params := &dynamodb.CreateTableInput{ | |
| AttributeDefinitions: []*dynamodb.AttributeDefinition{ // Required | |
| { // Required | |
| AttributeName: aws.String("Key"), // Required | |
| AttributeType: aws.String("S"), // Required | |
| }, | |
| { // Required | |
| AttributeName: aws.String("SortKey"), // Required | |
| AttributeType: aws.String("S"), // Required |
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 ( | |
| "fmt" | |
| "github.com/aws/aws-sdk-go/aws" | |
| "github.com/aws/aws-sdk-go/service/dynamodb" | |
| "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute" | |
| "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
| # -*- coding: utf-8 -*- | |
| """ | |
| pygments.lexers.graphql | |
| ~~~~~~~~~~~~~~~~~~~~ | |
| Lexers for GraphQL formats. | |
| :copyright: Copyright 2017 by Martin Zlámal. | |
| :license: BSD, see LICENSE for details. | |
| """ |
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/gob" | |
| "encoding/json" | |
| "flag" | |
| "log" | |
| "net/http" | |
| "os" | |
| "time" |
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
| window.addEventListener("load", function(evt) { | |
| var output = document.getElementById("output"); | |
| var input = document.getElementById("input"); | |
| var ws; | |
| var print = function(message) { | |
| var d = document.createElement("div"); | |
| d.innerHTML = message; | |
| output.appendChild(d); |
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 ( | |
| "fmt" | |
| "github.com/gorilla/mux" | |
| "github.com/urfave/negroni" | |
| "net/http" | |
| ) | |
| type ping struct { |
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" | |
| "log" | |
| "os" | |
| "time" | |
| ) |
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
| <html> | |
| <head> | |
| </head> | |
| <body> | |
| <div id="player"></div> | |
| <script src="app.js"></script> | |
| </body> | |
| </html> |