Skip to content

Commit

Permalink
Merge pull request #22 from mindstand/state_update
Browse files Browse the repository at this point in the history
State update
  • Loading branch information
nikitawootten authored Dec 5, 2019
2 parents b6e0bf4 + 82f9750 commit c4e55ec
Show file tree
Hide file tree
Showing 45 changed files with 3,213 additions and 1,665 deletions.
29 changes: 29 additions & 0 deletions .github/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (c) 2019 MindStand Technologies, Inc
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

version: "3.6"
services:
neo:
image: neo4j:enterprise
environment:
- NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
- NEO4J_AUTH=neo4j/password
ports:
- "7474:7474"
- "7687:7687"
39 changes: 33 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# Copyright (c) 2019 MindStand Technologies, Inc
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

name: Go
on: [push]
jobs:
Expand All @@ -6,25 +25,33 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Test
run: go test ./...

- name: Build
run: go build -v .
- name: Run Unit Tests
run: go test ./... -short
- name: Start Neo4j Docker
run: |
docker-compose -f .github/docker-compose.yaml up -d
- name: Wait for neo4j to be ready
run: |
sleep 5
- name: Run Integration Test
run: go test ./... -run Integration
- name: Stop Neo4j Docker
run: |
docker-compose -f .github/docker-compose.yaml down
36 changes: 30 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/mindstand/gogm)](https://goreportcard.com/report/github.com/mindstand/gogm)
[![Actions Status](https://github.com/mindstand/gogm/workflows/Go/badge.svg)](https://github.com/mindstand/gogm/actions)
[![](https://godoc.org/github.com/nathany/looper?status.svg)](http://godoc.org/github.com/mindstand/gogm)
# GoGM Golang Object Graph Mapper

```
Expand All @@ -15,6 +16,7 @@ go get -u github.com/mindstand/gogm
- Support for HA Clusters using `bolt+routing` through [MindStand's fork](https://github.com/mindstand/golang-neo4j-bolt-driver) of [@johnnadratowski's golang bolt driver](https://github.com/johnnadratowski/golang-neo4j-bolt-driver)
- Custom queries in addition to built in functionality
- Builder pattern cypher queries using [MindStand's cypher dsl package](https://github.com/mindstand/go-cypherdsl)
- CLI to generate link and unlink functions for gogm structs.

## Usage

Expand Down Expand Up @@ -160,20 +162,42 @@ func main(){

```

### GoGM CLI

## CLI Installation
```
go get -u github.com/mindstand/gogm/cli/gogmcli
```

## CLI Usage
```
NAME:
gogmcli - used for neo4j operations from gogm schema
USAGE:
gogmcli [global options] command [command options] [arguments...]
VERSION:
1.0.0
COMMANDS:
generate, g, gen to generate link and unlink functions for nodes
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--debug, -d execute in debug mode (default: false)
--help, -h show help (default: false)
--version, -v print the version (default: false)
```

## Inspiration
Inspiration came from the Java OGM implementation by Neo4j.

## Road Map
- More validation (refer to issues #2, #8)
- Schema Migration
- Generation CLI for link functions
- Errors overhaul using go 1.13 error wrapping
- TLS Support
- Documentation (obviously)
- More to come as we find more bugs!

## Credits
- [adam hannah's arrayOperations](https://github.com/adam-hanna/arrayOperations)

## How you can help
- Report Bugs
Expand Down
Loading

0 comments on commit c4e55ec

Please sign in to comment.