Giter VIP home page Giter VIP logo

bouncer's Introduction

Bouncer

It's called that because it check ids.

  • Bouncer is a database API server that receives an array of id's and checks for their presence in a database, leveraging the speed and efficiency of a MySQL/Postgres server.
  • Written with Go, Echo (v2.2.0) and Postgres.

11/23/16

  • Figure out why test is panicking
    • Seems to be related to the call to db.Query() when the database connection object is embedded in the struct.

11/28/16

  • The test seems like it was panicking because database/sql needed a db connection.
  • Had to switch over to the testing tools provided by the Echo team.
  • Have web.go instantiate a PGConn struct that has a live PG connection to query with as an attribute

11/29/16

  • How do we get the Post handler function to gain access to the db connection without having to make multiple connections to PG?
  • Test if the request is actually being made in the test by making a dead simple Post handler

11/30/16

  • rec.Body response from the http recorder is returning some weird nonsense string and not the json object that we expect. eyJtYXRjaGVkQ291bnQiOjEsIm1hdGNoZWRJZHMiOlsxLDJdfQ==
  • Check this out

12/1/16

  • It seems like the issue was that I was marshaling JSON and ctx.json was marshaling it again.
  • Why is the main() function immediately returning?
    • Something seems broken about how I'm providing the database url, it seems like it was working when it was directly placed into the sql.Open
  • Deploy this to Heroku

bouncer's People

Watchers

 avatar  avatar

Forkers

nowk

bouncer's Issues

Write test for `POST` handler

  • Write db querying into an interface so that we can control the result?
  • Refactor code with tests in place
  • Write the PGSend#QuerySend() method to execute the SQL and return the final aggregated info as a hash
  • Write test for expected behavior of POST handler

Test cases

  • Missing POST body in request returns an error
  • Missing ids key in request body returns an error

Refactor spots

  • Refactor the calls to echo into a Web package/file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.