From 5f078f9173e163c7eb44b64e129666e770fb4bda Mon Sep 17 00:00:00 2001 From: Eric Solender Date: Tue, 4 Feb 2020 15:09:46 -0500 Subject: [PATCH] added readme --- CODE_OF_CONDUCT.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 12 ++++++++ LICENSE => LICENCE | 4 +-- client_test.go | 2 +- readme.md | 72 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 163 insertions(+), 3 deletions(-) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md rename LICENSE => LICENCE (95%) create mode 100644 readme.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..49a43fa --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at dev@mindstand.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e61e1e4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,12 @@ +# Contributing + +When writing code contributing to go-bolt, please first discuss the change you wish to make via issue, or by emailing the maintainers of this repo: eric@mindstand.com and nikita@mindstand.com. + +Please note we have a code of conduct, please follow it in all your interactions with the project. + +## Pull Request Process + +1. Ensure that your changes have been properly formatted with go format. +2. Update relevant READMEs and go doc comments. +3. Ensure current tests pass, and add new tests as appropriate. +4. Submit a pull request with your changes. \ No newline at end of file diff --git a/LICENSE b/LICENCE similarity index 95% rename from LICENSE rename to LICENCE index aafe714..5b84b4e 100644 --- a/LICENSE +++ b/LICENCE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 MindStand Technologies +Copyright (c) 2019 Mindstand-Technologies Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ 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. +SOFTWARE. \ No newline at end of file diff --git a/client_test.go b/client_test.go index 2eca7c3..a242ca0 100644 --- a/client_test.go +++ b/client_test.go @@ -9,7 +9,7 @@ import ( func TestClient(t *testing.T) { log.SetLevel("trace") log.Info("opening client") - client, err := NewClient(WithBasicAuth("neo4j", "TZU6xiVZLbe5L5UmZaU5"), WithHostPort("0.0.0.0", 7687)) + client, err := NewClient(WithBasicAuth("neo4j", "changeme"), WithHostPort("0.0.0.0", 7687)) if err != nil { t.Log(err) t.FailNow() diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..3adac57 --- /dev/null +++ b/readme.md @@ -0,0 +1,72 @@ +[![Go Report Card](https://goreportcard.com/badge/github.com/mindstand/go-bolt)](https://goreportcard.com/report/github.com/mindstand/go-bolt) +[![Actions Status](https://github.com/mindstand/go-bolt/workflows/Go/badge.svg)](https://github.com/mindstand/go-bolt/actions) +[![GoDoc](https://godoc.org/github.com/mindstand/go-bolt?status.svg)](https://godoc.org/github.com/mindstand/go-bolt) +# Go-Bolt - GoLang Bolt Driver + +Implements Neo4j Bolt Protocol Versions 1-4 + +``` +go get -u github.com/mindstand/go-bolt +``` + +### (Disclaimer) This repository is still a major work in progress + +## Features +- Supports bolt protocol versions 1-4 +- Supports multi db in bolt protocol v4 +- Connection Pooling +- `bolt+routing` for HA clusters +- TLS support + +## Current todo's +#### (Issues will be updated) +- Documentation across entire repository +- Unit/integration testing across the entire repository for all protocol versions +- Support for neo4j bookmarks + +## Long term goals +- Cypher checks preflight +- Benchmark Testing + +## Thanks to: +- [@johnnadratowski](https://github.com/johnnadratowski): for your [original implementation](https://github.com/johnnadratowski/golang-neo4j-bolt-driver) of the bolt driver in go. We used the design as a basis for this driver! + +## Current example +This will be changed, this is the main integration test at the moment + +```go +client, err := NewClient(WithBasicAuth("neo4j", "changme"), WithHostPort("0.0.0.0", 7687)) +if err != nil { + panic(err) +} + +driver, err := client.NewDriver() +if err != nil { + panic(err) +} + +conn, err := driver.Open(bolt_mode.WriteMode) +if err != nil { + panic(err) +} + +rows, err := conn.Query("create (:TestNode{uuid:$id})", map[string]interface{}{ + "id": "random_id", +}) +if err != nil { + panic(err) +} + +all, m, err := rows.All() +log.Tracef("rows: %v, %v, %v", all, m, err) + +err = rows.Close() +if err != nil { + panic(err) +} + +err = conn.Close() +if err != nil { + panic(err) +} +``` \ No newline at end of file