Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
the-real-i9 authored Feb 4, 2025
1 parent b5d5165 commit d8b1437
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions neo4j/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,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 +46,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 +68,8 @@ store := neo4j.New(neo4j.Config{

### Config

> The `neo4j`, `auth`, and `config` package names belong to the neo4j-go-driver package.
```go
// Config defines the config for storage.
type Config struct {
Expand Down

0 comments on commit d8b1437

Please sign in to comment.