Skip to content

Commit

Permalink
feat: Merging in 1.1.0 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
krotik committed Nov 30, 2020
1 parent 6522720 commit bda3548
Show file tree
Hide file tree
Showing 44 changed files with 590 additions and 5,867 deletions.
28 changes: 17 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
.cache
.cover
.eliasdb_console_history
coverage.txt
coverage.out
coverage.html
test
/.cache
/.cover
/.eliasdb_console_history
/coverage.txt
/coverage.out
/coverage.html
/test
/dist
build
eliasdb
examples/tutorial/run/
examples/chat/run/
/build
/eliasdb
/examples/tutorial/run/
/examples/chat/run/
/examples/chat/res/chat/*.lock
/examples/chat/res/chat/*-lock.json
/examples/chat/res/chat/node_modules
/examples/data-mining/docker-images/eliasdb/eliasdb
/examples/data-mining/docker-images/frontend/app/node_modules
/examples/data-mining/docker-images/frontend/app/graphiql
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.1.0](https://devt.de///compare/v1.0.5...v1.1.0) (2020-11-30)


### Features

* Removing old integrations ([3fe1577](https://devt.de///commit/3fe157712ff41243dd325a876d8fed70cb038b34))


### Bug Fixes

* Upgrade to latest common version ([9df7dec](https://devt.de///commit/9df7decab6a2b623705c7b80dfd6d81fe699638c))

### [1.0.5](https://devt.de///compare/v1.0.4...v1.0.5) (2020-06-28)

### [1.0.4](https://devt.de///compare/v1.0.3...v1.0.4) (2020-05-24)


### Bug Fixes

* Allow mass deleteion via GraphQL ([1adf80f](https://devt.de///commit/1adf80fdcc1b0b9858627d9628c11c9f6aa038d2))

### [1.0.3](https://devt.de///compare/v1.0.2...v1.0.3) (2020-03-08)


Expand Down
22 changes: 20 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,21 @@ vet:
go vet ./...

build: clean mod fmt vet
go build -o $(NAME) cli/eliasdb.go
go build -ldflags "-s -w" -o $(NAME) cli/eliasdb.go

build-mac: clean mod fmt vet
GOOS=darwin GOARCH=amd64 go build -o $(NAME).mac cli/eliasdb.go

build-win: clean mod fmt vet
GOOS=windows GOARCH=amd64 go build -o $(NAME).exe cli/eliasdb.go

dist: build build-win build-mac
build-arm7: clean mod fmt vet
GOOS=linux GOARCH=arm GOARM=7 go build -o $(NAME).arm7 cli/eliasdb.go

build-arm8: clean mod fmt vet
GOOS=linux GOARCH=arm64 go build -o $(NAME).arm8 cli/eliasdb.go

dist: build build-win build-mac build-arm7 build-arm8
rm -fR dist

mkdir -p dist/$(NAME)_linux_amd64
Expand All @@ -52,4 +58,16 @@ dist: build build-win build-mac
cp NOTICE dist/$(NAME)_windows_amd64
tar --directory=dist -cz $(NAME)_windows_amd64 > dist/$(NAME)_$(TAG)_windows_amd64.tar.gz

mkdir -p dist/$(NAME)_arm7
mv $(NAME).arm7 dist/$(NAME)_arm7
cp LICENSE dist/$(NAME)_arm7
cp NOTICE dist/$(NAME)_arm7
tar --directory=dist -cz $(NAME)_arm7 > dist/$(NAME)_$(TAG)_arm7.tar.gz

mkdir -p dist/$(NAME)_arm8
mv $(NAME).arm8 dist/$(NAME)_arm8
cp LICENSE dist/$(NAME)_arm8
cp NOTICE dist/$(NAME)_arm8
tar --directory=dist -cz $(NAME)_arm8 > dist/$(NAME)_$(TAG)_arm8.tar.gz

sh -c 'cd dist; sha256sum *.tar.gz' > dist/checksums.txt
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
EliasDB
=======

<p align="center">
<img height="300px" style="height:300px;" src="logo.png">
</p>

EliasDB is a graph-based database which aims to provide a lightweight solution for projects which want to store their data as a graph.

<p>
Expand Down
2 changes: 1 addition & 1 deletion api/v1/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestClusterStorage(t *testing.T) {

// Insert some data

st, _, res = sendTestRequest(graphURL+"i41health/n", "POST", []byte(`
sendTestRequest(graphURL+"i41health/n", "POST", []byte(`
[{
"key":"3",
"kind":"Upload",
Expand Down
76 changes: 76 additions & 0 deletions api/v1/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,44 @@ func (ge *graphEndpoint) SwaggerDefs(s map[string]interface{}) {
"default": defaultError,
},
},
"put": map[string]interface{}{
"summary": "Data can be send by using PUT requests.",
"description": "A whole graph can be send. " +
"PUT will store data in the datastore and update existing data.",
"consumes": []string{
"application/json",
},
"produces": []string{
"text/plain",
"application/json",
},
"parameters": append(partitionParams, graphPost...),
"responses": map[string]interface{}{
"200": map[string]interface{}{
"description": "No data is returned when data is created.",
},
"default": defaultError,
},
},
"delete": map[string]interface{}{
"summary": "Data can be send by using DELETE requests.",
"description": "A whole graph can be send. " +
"DELETE will delete data in the datastore - only key and kind are required.",
"consumes": []string{
"application/json",
},
"produces": []string{
"text/plain",
"application/json",
},
"parameters": append(partitionParams, graphPost...),
"responses": map[string]interface{}{
"200": map[string]interface{}{
"description": "No data is returned when data is created.",
},
"default": defaultError,
},
},
}

// Add endpoint to insert nodes / edges
Expand All @@ -563,6 +601,44 @@ func (ge *graphEndpoint) SwaggerDefs(s map[string]interface{}) {
"default": defaultError,
},
},
"put": map[string]interface{}{
"summary": "Data can be send by using PUT requests.",
"description": "A list of nodes / edges can be send. " +
"PUT will store data in the datastore and update existing data.",
"consumes": []string{
"application/json",
},
"produces": []string{
"text/plain",
"application/json",
},
"parameters": append(append(partitionParams, entityParams...), entitiesPost...),
"responses": map[string]interface{}{
"200": map[string]interface{}{
"description": "No data is returned when data is created.",
},
"default": defaultError,
},
},
"delete": map[string]interface{}{
"summary": "Data can be send by using DELETE requests.",
"description": "A list of nodes / edges can be send. " +
"DELETE will delete data in the datastore - only key and kind are required.",
"consumes": []string{
"application/json",
},
"produces": []string{
"text/plain",
"application/json",
},
"parameters": append(append(partitionParams, entityParams...), entitiesPost...),
"responses": map[string]interface{}{
"200": map[string]interface{}{
"description": "No data is returned when data is created.",
},
"default": defaultError,
},
},
}

// Add endpoint to query nodes for a specific node kind
Expand Down
2 changes: 1 addition & 1 deletion cluster/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ msmap is a map of all know memory-only memberStorages.
var msmap = make(map[*DistributedStorage]*memberStorage)

/*
Clear the current map of known memory-only memberStorages.
ClearMSMap clears the current map of known memory-only memberStorages.
*/
func ClearMSMap() {
msmap = make(map[*DistributedStorage]*memberStorage)
Expand Down
18 changes: 18 additions & 0 deletions compress_binary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

# Simple script to produce a self-extracting compressed binary

export compressed_binary=eliasdb_compressed

echo "cat \$0 | sed '1,/#### Binary ####/d' | gzip -d > ./__e" > $compressed_binary
echo "chmod ugo+x ./__e" >> $compressed_binary
echo "mv ./__e ./\$0" >> $compressed_binary
echo "./\$0" >> $compressed_binary
echo "exit 0" >> $compressed_binary
echo "This is a simple shell script trying to unpack the binary data" >> $compressed_binary
echo "after the marker below. Unpack manually by deleting all lines" >> $compressed_binary
echo "up to and including the marker line and do a gzip -d on the" >> $compressed_binary
echo "binary data" >> $compressed_binary
echo "#### Binary ####" >> $compressed_binary
gzip -c eliasdb >> $compressed_binary
chmod ugo+x $compressed_binary
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
/*
ProductVersion is the current version of EliasDB
*/
const ProductVersion = "1.0.3"
const ProductVersion = "1.1.0"

/*
DefaultConfigFile is the default config file which will be used to configure EliasDB
Expand Down
2 changes: 1 addition & 1 deletion console/cmd_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Run executes the command.
*/
func (c *CmdVer) Run(args []string, capi CommandConsoleAPI) error {

fmt.Fprintln(capi.Out(), fmt.Sprintf("Connected to: %v", capi.Url()))
fmt.Fprintln(capi.Out(), fmt.Sprintf("Connected to: %v", capi.URL()))

res, err := capi.Req(api.EndpointAbout, "GET", nil)

Expand Down
8 changes: 4 additions & 4 deletions console/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ type CommandConsoleAPI interface {
Authenticate(force bool)

/*
Url returns the current connection URL.
URL returns the current connection URL.
*/
Url() string
URL() string

/*
Partition returns the current partition.
Expand Down Expand Up @@ -217,9 +217,9 @@ type EliasDBConsole struct {
}

/*
Url returns the current connected server URL.
URL returns the current connected server URL.
*/
func (c *EliasDBConsole) Url() string {
func (c *EliasDBConsole) URL() string {
return c.url
}

Expand Down
13 changes: 2 additions & 11 deletions examples/chat/res/chat/dist/chat.js

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions examples/chat/res/chat/dist/chat.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*!
*
* EliasDB - Chat example
*
* Copyright 2019 Matthias Ladkau. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*/
28 changes: 14 additions & 14 deletions examples/chat/res/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
"author": "Matthias Ladkau",
"license": "ISC",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^1.13.0",
"@typescript-eslint/parser": "^1.13.0",
"css-loader": "^3.1.0",
"eslint": "^6.1.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-prettier": "^3.1.0",
"prettier": "^1.18.2",
"ts-loader": "^6.0.4",
"typescript": "^3.5.3",
"vue": "^2.6.10",
"vue-loader": "^15.7.1",
"vue-template-compiler": "^2.6.10",
"webpack": "^4.39.1",
"webpack-cli": "^3.3.6"
"@typescript-eslint/eslint-plugin": "^4.8.2",
"@typescript-eslint/parser": "^4.8.2",
"css-loader": "^5.0.1",
"eslint": "^7.14.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-prettier": "^3.1.4",
"prettier": "^2.2.1",
"ts-loader": "^8.0.11",
"typescript": "^4.1.2",
"vue": "^2.6.12",
"vue-loader": "^15.9.5",
"vue-template-compiler": "^2.6.12",
"webpack": "^5.9.0",
"webpack-cli": "^4.2.0"
}
}
2 changes: 1 addition & 1 deletion examples/chat/res/chat/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ module.exports = {
performance: {
hints: false
},
devtool: '#eval-source-map',
devtool: 'eval-source-map',
plugins: [
// make sure to include the plugin for the magic
new VueLoaderPlugin(),
Expand Down
Loading

0 comments on commit bda3548

Please sign in to comment.