Giter Site home page Giter Site logo

structy / structbase Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 4.0 8.88 MB

Free REST API Data Storage with audit logging, all updated key/node is generated historical in Audit Table

License: MIT License

Shell 2.35% Go 58.81% PLpgSQL 32.49% Dockerfile 6.36%
prest api-rest api-server golang

structbase's People

Contributors

avelino avatar fabriziomello avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

structbase's Issues

Error when running 'docker-compose up'

Hi all,

I'm trying to use structbase to start contributing but after clone repo and try 'docker-compose up' I got the following error:

$ docker-compose up
Building go
Step 1/8 : FROM golang:alpine
 ---> c283ac5a8f78
Step 2/8 : LABEL mantainer "[email protected]"
 ---> Using cache
 ---> f71a14777f65
Step 3/8 : RUN apk --no-cache add git wget
 ---> Using cache
 ---> 72a3004838f4
Step 4/8 : WORKDIR /go/src/github.com/structy/structbase
 ---> Using cache
 ---> 9d65a00b547a
Step 5/8 : COPY . /go/src/github.com/structy/structbase
 ---> Using cache
 ---> 6a67163f79cf
Step 6/8 : RUN go get -u github.com/golang/dep/... &&     dep ensure &&     go install &&     wget https://raw.githubusercontent.com/nuveo/tcp-port-wait/master/tcp-port-wait.sh &&     chmod +x tcp-port-wait.sh
 ---> Running in 89df38ba7a98
go get: warning: modules disabled by GO111MODULE=auto in GOPATH/src;
	ignoring go.mod;
	see 'go help modules'
package github.com/golang/dep/...: github.com/golang/dep/...: invalid import path: malformed import path "github.com/golang/dep/...": double dot
ERROR: Service 'go' failed to build: The command '/bin/sh -c go get -u github.com/golang/dep/... &&     dep ensure &&     go install &&     wget https://raw.githubusercontent.com/nuveo/tcp-port-wait/master/tcp-port-wait.sh &&     chmod +x tcp-port-wait.sh' returned a non-zero code: 1

$ docker --version
Docker version 17.03.2-ce, build f5ec1e2

$ docker-compose --version
docker-compose version 1.23.1, build b02f1306

If I'm correct the error is related to this issue: golang/go#29241

Object relationship in the JSON structure

In key/value database we have the "problem" having a large object inside the body and consequently many duplicate data.
Proposal this feature would be to support the relationship structure within JSON and an endpoint remount the object (JSON) tree altogether.

We'll have an annotation inside the object (JSON) _KEY and _NODE that will be responsible for reassembling the structure when accessing by the endpoint bring full result

Proposal

IMDB Info

  • KEY: imdb
  • NODE: tt6743832
{
  "plot":"With unique and unprecedented access to one of the world's oldest social networking societies this series asks who are the Freemasons and what do they do?",
  "genre":"Documentary, Reality-TV",
  "votes":"10",
  "awards":"N/A",
  "imdbid":"tt6743832",
  "rating":"7.8",
  "country":"UK",
  "runtime":"N/A",
  "language":"English",
  "metascore":"N/A"
}

Object relationship

{
  ...
  "nfinfo":{
    "type":"series",
    "title":"Inside The Freemasons",
    "image1":"https://occ-0-1490-1489.1.nflxso.net/art/69b67/62f10bf294eef9dc69a6df144a7d56c187669b67.jpg",
    "image2":"https://occ-0-1490-1489.1.nflxso.net/art/69b67/62f10bf294eef9dc69a6df144a7d56c187669b67.jpg",
    "runtime":"na",
    "updated":"2018-09-15 12:08:17",
    "download":"0",
    "matlabel":"Suitable for age 6 or older.",
    "matlevel":"",
    "released":"2017",
    "synopsis":"Explore the history and future of the Freemasons, a fraternal order steeped in both secrecy and tradition.",
    "avgrating":"0",
    "netflixid":"80240816",
    "unogsdate":"2018-09-15 01:55:53"
  },
  "imdbinfo":{
    "_key":"imdb",
    "_node":"tt6743832",
  }
  ...

full json (result)

{
  "mgname":[
    "British TV Shows",
    "Docuseries",
    "Documentaries",
    "TV Shows"
  ],
  "nfinfo":{
    "type":"series",
    "title":"Inside The Freemasons",
    "image1":"https://occ-0-1490-1489.1.nflxso.net/art/69b67/62f10bf294eef9dc69a6df144a7d56c187669b67.jpg",
    "image2":"https://occ-0-1490-1489.1.nflxso.net/art/69b67/62f10bf294eef9dc69a6df144a7d56c187669b67.jpg",
    "runtime":"na",
    "updated":"2018-09-15 12:08:17",
    "download":"0",
    "matlabel":"Suitable for age 6 or older.",
    "matlevel":"",
    "released":"2017",
    "synopsis":"Explore the history and future of the Freemasons, a fraternal order steeped in both secrecy and tradition.",
    "avgrating":"0",
    "netflixid":"80240816",
    "unogsdate":"2018-09-15 01:55:53"
  },
  "people":[

  ],
  "Genreid":[
    "52117",
    "10105",
    "6839",
    "83"
  ],
  "country":[
    {
      "cid":"23",
      "new":"2018-09-15",
      "subs":[
        "Simplified Chinese",
        "English",
        "Italian",
        "Traditional Chinese",
        "Greek"
      ],
      "audio":[
        "British English",
        "French",
        "German",
        "Spanish"
      ],
      "ccode":"au",
      "islive":"yes",
      "country":"Australia ",
      "expires":"",
      "seasons":"1 seasons",
      "seasondet":[
        "1(5)"
      ]
    },
    {
      "cid":"29",
      "new":"2018-09-15",
      "subs":[
        "English",
        "Italian",
        "German",
        "French",
        "Brazilian Portuguese"
      ],
      "audio":[
        "British English",
        "French",
        "Brazilian Portuguese",
        "German",
        "Spanish"
      ],
      "ccode":"br",
      "islive":"yes",
      "country":"Brazil ",
      "expires":"",
      "seasons":"1 seasons",
      "seasondet":[
        "1(5)"
      ]
    },
    {
      "cid":"33",
      "new":"2018-09-15",
      "subs":[
        "Spanish",
        "English",
        "Italian",
        "German",
        "French"
      ],
      "audio":[
        "British English",
        "French",
        "Brazilian Portuguese",
        "German",
        "Spanish"
      ],
      "ccode":"ca",
      "islive":"yes",
      "country":"Canada ",
      "expires":"",
      "seasons":"1 seasons",
      "seasondet":[
        "1(5)"
      ]
    },
    {
      "cid":"307",
      "new":"2018-09-15",
      "subs":[
        "Polish",
        "English",
        "German"
      ],
      "audio":[
        "British English",
        "German"
      ],
      "ccode":"cz",
      "islive":"yes",
      "country":"Czech Republic ",
      "expires":"",
      "seasons":"1 seasons",
      "seasondet":[
        "1(5)"
      ]
    },
    {
      "cid":"45",
      "new":"2018-09-15",
      "subs":[
        "English",
        "Arabic",
        "German",
        "European Spanish",
        "French"
      ],
      "audio":[
        "British English",
        "French",
        "Brazilian Portuguese",
        "German",
        "Spanish"
      ],
      "ccode":"fr",
      "islive":"yes",
      "country":"France ",
      "expires":"",
      "seasons":"1 seasons",
      "seasondet":[
        "1(5)"
      ]
    },
    {
      "cid":"39",
      "new":"2018-09-15",
      "subs":[
        "English",
        "Dutch",
        "German",
        "French",
        "Turkish"
      ],
      "audio":[
        "British English",
        "French",
        "German",
        "Spanish"
      ],
      "ccode":"de",
      "islive":"yes",
      "country":"Germany ",
      "expires":"",
      "seasons":"1 seasons",
      "seasondet":[
        "1(5)"
      ]
    },
    {
      "cid":"334",
      "new":"2018-09-15",
      "subs":[
        "English",
        "Romanian",
        "German"
      ],
      "audio":[
        "British English",
        "German"
      ],
      "ccode":"hu",
      "islive":"yes",
      "country":"Hungary ",
      "expires":"",
      "seasons":"1 seasons",
      "seasondet":[
        "1(5)"
      ]
    },
    {
      "cid":"337",
      "new":"2018-09-15",
      "subs":[
        "English"
      ],
      "audio":[
        "British English"
      ],
      "ccode":"in",
      "islive":"yes",
      "country":"India ",
      "expires":"",
      "seasons":"1 seasons",
      "seasondet":[
        "1(5)"
      ]
    },
    {
      "cid":"357",
      "new":"2018-09-15",
      "subs":[
        "English"
      ],
      "audio":[
        "British English"
      ],
      "ccode":"lt",
      "islive":"yes",
      "country":"Lithuania ",
      "expires":"",
      "seasons":"1 seasons",
      "seasondet":[
        "1(5)"
      ]
    },
    {
      "cid":"67",
      "new":"2018-09-15",
      "subs":[
        "English",
        "Dutch",
        "German",
        "European Spanish",
        "French"
      ],
      "audio":[
        "British English",
        "French",
        "German",
        "Spanish"
      ],
      "ccode":"nl",
      "islive":"yes",
      "country":"Netherlands ",
      "expires":"",
      "seasons":"1 seasons",
      "seasondet":[
        "1(5)"
      ]
    },
    {
      "cid":"392",
      "new":"2018-09-15",
      "subs":[
        "Polish",
        "English",
        "German"
      ],
      "audio":[
        "British English",
        "German"
      ],
      "ccode":"pl",
      "islive":"yes",
      "country":"Poland ",
      "expires":"",
      "seasons":"1 seasons",
      "seasondet":[
        "1(5)"
      ]
    },
    {
      "cid":"402",
      "new":"2018-09-15",
      "subs":[
        "English",
        "Finnish"
      ],
      "audio":[
        "British English"
      ],
      "ccode":"ru",
      "islive":"yes",
      "country":"Russia",
      "expires":"",
      "seasons":"1 seasons",
      "seasondet":[
        "1(5)"
      ]
    },
    {
      "cid":"408",
      "new":"2018-09-15",
      "subs":[
        "Simplified Chinese",
        "English",
        "Traditional Chinese"
      ],
      "audio":[
        "British English"
      ],
      "ccode":"sg",
      "islive":"yes",
      "country":"Singapore ",
      "expires":"",
      "seasons":"1 seasons",
      "seasondet":[
        "1(5)"
      ]
    },
    {
      "cid":"412",
      "new":"2018-09-15",
      "subs":[
        "Polish",
        "English",
        "German"
      ],
      "audio":[
        "British English",
        "German"
      ],
      "ccode":"sk",
      "islive":"yes",
      "country":"Slovakia ",
      "expires":"",
      "seasons":"1 seasons",
      "seasondet":[
        "1(5)"
      ]
    },
    {
      "cid":"270",
      "new":"2018-09-15",
      "subs":[
        "English",
        "Romanian",
        "Arabic",
        "European Spanish",
        "French"
      ],
      "audio":[
        "British English",
        "French",
        "Brazilian Portuguese",
        "German",
        "Spanish"
      ],
      "ccode":"es",
      "islive":"yes",
      "country":"Spain ",
      "expires":"",
      "seasons":"1 seasons",
      "seasondet":[
        "1(5)"
      ]
    },
    {
      "cid":"73",
      "new":"2018-09-15",
      "subs":[
        "Norwegian",
        "English",
        "Swedish",
        "Finnish",
        "German"
      ],
      "audio":[
        "British English",
        "French",
        "German"
      ],
      "ccode":"se",
      "islive":"yes",
      "country":"Sweden ",
      "expires":"",
      "seasons":"1 seasons",
      "seasondet":[
        "1(5)"
      ]
    }
  ],
  "imdbinfo":{
    "plot":"With unique and unprecedented access to one of the world's oldest social networking societies this series asks who are the Freemasons and what do they do?",
    "genre":"Documentary, Reality-TV",
    "votes":"10",
    "awards":"N/A",
    "imdbid":"tt6743832",
    "rating":"7.8",
    "country":"UK",
    "runtime":"N/A",
    "language":"English",
    "metascore":"N/A"
  }
}

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.