Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Neo4j README updates #1567

Merged
merged 3 commits into from
Feb 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions neo4j/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ id: neo4j
title: Neo4j
---

![Release](https://img.shields.io/github/v/tag/gofiber/storage?filter=neo4j*)
[![Discord](https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7)](https://gofiber.io/discord)
![Test](https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-neo4j.yml?label=Tests)
![Security](https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security)
![Linter](https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter)

A Neo4j storage driver using [neo4j/neo4j-go-driver](https://github.com/neo4j/neo4j-go-driver).

> **Note: Requires latest two releases of Golang**
Expand All @@ -18,7 +24,7 @@ A Neo4j storage driver using [neo4j/neo4j-go-driver](https://github.com/neo4j/ne
### Signatures

```go
func New(config ...Config) Storage
func New(config ...Config) *Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
Expand Down Expand Up @@ -46,11 +52,13 @@ go get github.com/gofiber/storage/neo4j
Import the storage package.

```go
import neo4jstore "github.com/gofiber/storage/neo4j"
import "github.com/gofiber/storage/neo4j"
```

You can use the following possibilities to create a storage:

> The `neo4j` package name used in this example is the package name (and default import name) for this storage driver. Feel free import it with a custom name to avoid confusing it with the neo4j-go-driver package which also uses `neo4j` as package name (and default import name).

```go
// Initialize default config
store := neo4j.New()
Expand All @@ -66,6 +74,8 @@ store := neo4j.New(neo4j.Config{

### Config

> The `neo4j`, `auth`, and `config` package names used here belong to the neo4j-go-driver package.

```go
// Config defines the config for storage.
type Config struct {
Expand Down