GithubHelp home page GithubHelp logo

neo-data's Introduction

marcio venancio


Neo data - For data integration

This Project is an example for Data Integration.

The project is an API built on top of Golang programming language which serves endpoints to consume and integrate Companies data information that can be added in two ways

  • Importing CSV files
  • Caling an Endpoint to create a new record.

Further explanation

The API makes use of MongoDB as NoSql database to store the information. The data, after entered, is processed and then, if already exist, the information is merged, otherwise, a new record is added.

Project Structure

marcio venancio

How to run

  1. It is necessary to have set up Golang environment with all the environment variables. Below there is an example of 'go env' command from my Linux environment.

marcio venancio

  1. It is necessary as well to have the NoSql database MongoDb installed. Could be a MongoDb docker image or even a local instance, but it is necessary to run under the default port 27017.

  2. Now, clone the project inside the work folder. For instance, based on the Golang environment variables above, the work folder is $GOPATH/src. After the project is cloned, the path should look like this $GOPATH/src/neo-data

  3. Now, it is possible to run the project. You can install manually the dependencies executing on a terminal instance

  • go get gopkg.in/mgo.v2/bson,

  • go get github.com/gorilla/mux

  • go get github.com/stretchr/testify/assert

    After that, it is possible to run the project with the command "go run main.go", then if everything is ok, the API will be listening in the http port 3000.

    In addition to that, you may want to compile and generate an executable, inside the neo-data folder, execute the command "make all". This will generate an exe inside $GOPATH/bin

Project Structure

There are a couple of automated tests that invoke each end point in order to check if it is up and running.

marcio venancio


Endpoints

  • [POST] Create - "/api/company"

  • Sent Json *

{    
    "name": "TESTCREATE_01",
    "zip": "12345",
    "website": "website"
}

marcio venancio

  • [PUT] - Update - "/api/company/{id}"

Sent json

{
    "id": "5d502bf8cad9901c5d085c04",
    "name": "TESTECREATE_01",
    "zip": "99999",
    "website": "website"
}

marcio venancio

  • [DELETE] - Delete - "/api/company/{id}"

marcio venancio

  • [GET] - Get company by ID - "/api/company/{id}"

Request / Response marcio venancio

  • [GET] - Get company by name - "/api/company/name/{name}"

Request / Response marcio venancio

  • [GET] - Get compay by name and zip code - "/api/company/name/{name}/zip/{zip}"

Request / Response marcio venancio

  • [GET] - Get all companies data - "/api/company"

Request / Response marcio venancio

  • [POST] - Import data (batch) - "/api/company/batch"

Request / Response marcio venancio

neo-data's People

Contributors

mvenanc avatar

Watchers

James Cloos avatar  avatar

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.