Skip to content

Commit

Permalink
Updates from storm.
Browse files Browse the repository at this point in the history
Sync
  • Loading branch information
AndersonBargas authored Jan 6, 2024
2 parents e31fc0c + 845e03e commit 585e720
Show file tree
Hide file tree
Showing 35 changed files with 70 additions and 70 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:

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

- name: Check out code into the Go module directory
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Rainstorm

[![GoDoc](https://godoc.org/github.com/AndersonBargas/rainstorm?status.svg)](https://pkg.go.dev/github.com/AndersonBargas/rainstorm/v4?tab=doc) [![Go Report Card](https://goreportcard.com/badge/github.com/AndersonBargas/rainstorm)](https://goreportcard.com/report/github.com/AndersonBargas/rainstorm) ![GoLang](https://github.com/AndersonBargas/rainstorm/workflows/GoLang/badge.svg)
[![GoDoc](https://godoc.org/github.com/AndersonBargas/rainstorm?status.svg)](https://pkg.go.dev/github.com/AndersonBargas/rainstorm/v5?tab=doc) [![Go Report Card](https://goreportcard.com/badge/github.com/AndersonBargas/rainstorm)](https://goreportcard.com/report/github.com/AndersonBargas/rainstorm) ![GoLang](https://github.com/AndersonBargas/rainstorm/workflows/GoLang/badge.svg)

Rainstorm is a simple and powerful toolkit for [BoltDB](https://github.com/coreos/bbolt), forked from the great [Storm](https://github.com/asdine/storm).
Basically, Rainstorm provides indexes, a wide range of methods to store and fetch data, an advanced query system, and much more.
Expand Down Expand Up @@ -49,7 +49,7 @@ In addition to the examples below, see also the [examples in the GoDoc](https://
## Getting Started

```bash
go get -u github.com/AndersonBargas/rainstorm/v4
GO111MODULE=on go get -u github.com/AndersonBargas/rainstorm/v5
```

## Main differences from "storm"
Expand All @@ -65,7 +65,7 @@ To take advantage of the performance changes made after the fork, just use versi
## Import Rainstorm

```go
import "github.com/AndersonBargas/rainstorm/v4"
import "github.com/AndersonBargas/rainstorm/v5"
```

## Open a database
Expand Down Expand Up @@ -487,12 +487,12 @@ These can be used by importing the relevant package and use that codec to config

```go
import (
"github.com/AndersonBargas/rainstorm/v4"
"github.com/AndersonBargas/rainstorm/v4/codec/gob"
"github.com/AndersonBargas/rainstorm/v4/codec/json"
"github.com/AndersonBargas/rainstorm/v4/codec/sereal"
"github.com/AndersonBargas/rainstorm/v4/codec/protobuf"
"github.com/AndersonBargas/rainstorm/v4/codec/msgpack"
"github.com/AndersonBargas/rainstorm/v5"
"github.com/AndersonBargas/rainstorm/v5/codec/gob"
"github.com/AndersonBargas/rainstorm/v5/codec/json"
"github.com/AndersonBargas/rainstorm/v5/codec/sereal"
"github.com/AndersonBargas/rainstorm/v5/codec/protobuf"
"github.com/AndersonBargas/rainstorm/v5/codec/msgpack"
)

var gobDb, _ = rainstorm.Open("gob.db", rainstorm.Codec(gob.Codec))
Expand Down
2 changes: 1 addition & 1 deletion codec/aes/aes.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"io"

"github.com/AndersonBargas/rainstorm/v4/codec"
"github.com/AndersonBargas/rainstorm/v5/codec"
)

const name = "aes-"
Expand Down
4 changes: 2 additions & 2 deletions codec/aes/aes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/stretchr/testify/require"

"github.com/AndersonBargas/rainstorm/v4/codec/internal"
"github.com/AndersonBargas/rainstorm/v4/codec/json"
"github.com/AndersonBargas/rainstorm/v5/codec/internal"
"github.com/AndersonBargas/rainstorm/v5/codec/json"
)

var testKey, _ = base64.StdEncoding.DecodeString("xkBTXc1wn0C/aL31u9SA7g==")
Expand Down
12 changes: 6 additions & 6 deletions codec/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package codec_test
import (
"fmt"

"github.com/AndersonBargas/rainstorm/v4"
"github.com/AndersonBargas/rainstorm/v4/codec/gob"
"github.com/AndersonBargas/rainstorm/v4/codec/json"
"github.com/AndersonBargas/rainstorm/v4/codec/msgpack"
"github.com/AndersonBargas/rainstorm/v4/codec/protobuf"
"github.com/AndersonBargas/rainstorm/v4/codec/sereal"
"github.com/AndersonBargas/rainstorm/v5"
"github.com/AndersonBargas/rainstorm/v5/codec/gob"
"github.com/AndersonBargas/rainstorm/v5/codec/json"
"github.com/AndersonBargas/rainstorm/v5/codec/msgpack"
"github.com/AndersonBargas/rainstorm/v5/codec/protobuf"
"github.com/AndersonBargas/rainstorm/v5/codec/sereal"
)

func Example() {
Expand Down
2 changes: 1 addition & 1 deletion codec/gob/gob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gob
import (
"testing"

"github.com/AndersonBargas/rainstorm/v4/codec/internal"
"github.com/AndersonBargas/rainstorm/v5/codec/internal"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion codec/internal/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"reflect"
"testing"

"github.com/AndersonBargas/rainstorm/v4/codec"
"github.com/AndersonBargas/rainstorm/v5/codec"
)

type testStruct struct {
Expand Down
2 changes: 1 addition & 1 deletion codec/json/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package json
import (
"testing"

"github.com/AndersonBargas/rainstorm/v4/codec/internal"
"github.com/AndersonBargas/rainstorm/v5/codec/internal"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion codec/msgpack/msgpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package msgpack
import (
"testing"

"github.com/AndersonBargas/rainstorm/v4/codec/internal"
"github.com/AndersonBargas/rainstorm/v5/codec/internal"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion codec/protobuf/protobuf.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package protobuf
import (
"errors"

"github.com/AndersonBargas/rainstorm/v4/codec/json"
"github.com/AndersonBargas/rainstorm/v5/codec/json"
"github.com/golang/protobuf/proto"
)

Expand Down
4 changes: 2 additions & 2 deletions codec/protobuf/protobuf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"path/filepath"
"testing"

"github.com/AndersonBargas/rainstorm/v4"
"github.com/AndersonBargas/rainstorm/v4/codec/internal"
"github.com/AndersonBargas/rainstorm/v5"
"github.com/AndersonBargas/rainstorm/v5/codec/internal"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion codec/sereal/sereal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package sereal
import (
"testing"

"github.com/AndersonBargas/rainstorm/v4/codec/internal"
"github.com/AndersonBargas/rainstorm/v5/codec/internal"
"github.com/stretchr/testify/require"
)

Expand Down
4 changes: 2 additions & 2 deletions examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"strings"
"time"

"github.com/AndersonBargas/rainstorm/v4"
"github.com/AndersonBargas/rainstorm/v4/codec/gob"
"github.com/AndersonBargas/rainstorm/v5"
"github.com/AndersonBargas/rainstorm/v5/codec/gob"
bolt "go.etcd.io/bbolt"
)

Expand Down
2 changes: 1 addition & 1 deletion extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"strings"

"github.com/AndersonBargas/rainstorm/v4/index"
"github.com/AndersonBargas/rainstorm/v5/index"
bolt "go.etcd.io/bbolt"
)

Expand Down
4 changes: 2 additions & 2 deletions finder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"reflect"

"github.com/AndersonBargas/rainstorm/v4/index"
"github.com/AndersonBargas/rainstorm/v4/q"
"github.com/AndersonBargas/rainstorm/v5/index"
"github.com/AndersonBargas/rainstorm/v5/q"
bolt "go.etcd.io/bbolt"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/AndersonBargas/rainstorm/v4
module github.com/AndersonBargas/rainstorm/v5

require (
github.com/DataDog/zstd v1.4.1 // indirect
Expand Down
2 changes: 1 addition & 1 deletion index/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package index
import (
"bytes"

"github.com/AndersonBargas/rainstorm/v4/internal"
"github.com/AndersonBargas/rainstorm/v5/internal"
bolt "go.etcd.io/bbolt"
)

Expand Down
6 changes: 3 additions & 3 deletions index/id_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"path/filepath"
"testing"

"github.com/AndersonBargas/rainstorm/v4"
"github.com/AndersonBargas/rainstorm/v4/index"
"github.com/AndersonBargas/rainstorm/v4/q"
"github.com/AndersonBargas/rainstorm/v5"
"github.com/AndersonBargas/rainstorm/v5/index"
"github.com/AndersonBargas/rainstorm/v5/q"
"github.com/stretchr/testify/require"
bolt "go.etcd.io/bbolt"
)
Expand Down
2 changes: 1 addition & 1 deletion index/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package index
import (
"bytes"

"github.com/AndersonBargas/rainstorm/v4/internal"
"github.com/AndersonBargas/rainstorm/v5/internal"
bolt "go.etcd.io/bbolt"
)

Expand Down
6 changes: 3 additions & 3 deletions index/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"path/filepath"
"testing"

"github.com/AndersonBargas/rainstorm/v4"
"github.com/AndersonBargas/rainstorm/v4/codec/gob"
"github.com/AndersonBargas/rainstorm/v4/index"
"github.com/AndersonBargas/rainstorm/v5"
"github.com/AndersonBargas/rainstorm/v5/codec/gob"
"github.com/AndersonBargas/rainstorm/v5/index"
"github.com/stretchr/testify/require"
bolt "go.etcd.io/bbolt"
)
Expand Down
2 changes: 1 addition & 1 deletion index/unique.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package index
import (
"bytes"

"github.com/AndersonBargas/rainstorm/v4/internal"
"github.com/AndersonBargas/rainstorm/v5/internal"
bolt "go.etcd.io/bbolt"
)

Expand Down
6 changes: 3 additions & 3 deletions index/unique_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"path/filepath"
"testing"

"github.com/AndersonBargas/rainstorm/v4"
"github.com/AndersonBargas/rainstorm/v4/codec/gob"
"github.com/AndersonBargas/rainstorm/v4/index"
"github.com/AndersonBargas/rainstorm/v5"
"github.com/AndersonBargas/rainstorm/v5/codec/gob"
"github.com/AndersonBargas/rainstorm/v5/index"
"github.com/stretchr/testify/require"
bolt "go.etcd.io/bbolt"
)
Expand Down
4 changes: 2 additions & 2 deletions kv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"testing"
"time"

"github.com/AndersonBargas/rainstorm/v4/codec/gob"
"github.com/AndersonBargas/rainstorm/v4/codec/json"
"github.com/AndersonBargas/rainstorm/v5/codec/gob"
"github.com/AndersonBargas/rainstorm/v5/codec/json"
"github.com/stretchr/testify/require"
bolt "go.etcd.io/bbolt"
)
Expand Down
2 changes: 1 addition & 1 deletion node.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package rainstorm

import (
"github.com/AndersonBargas/rainstorm/v4/codec"
"github.com/AndersonBargas/rainstorm/v5/codec"
bolt "go.etcd.io/bbolt"
)

Expand Down
4 changes: 2 additions & 2 deletions node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package rainstorm
import (
"testing"

"github.com/AndersonBargas/rainstorm/v4/codec/gob"
"github.com/AndersonBargas/rainstorm/v4/codec/json"
"github.com/AndersonBargas/rainstorm/v5/codec/gob"
"github.com/AndersonBargas/rainstorm/v5/codec/json"
"github.com/stretchr/testify/require"
bolt "go.etcd.io/bbolt"
)
Expand Down
4 changes: 2 additions & 2 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package rainstorm
import (
"os"

"github.com/AndersonBargas/rainstorm/v4/codec"
"github.com/AndersonBargas/rainstorm/v4/index"
"github.com/AndersonBargas/rainstorm/v5/codec"
"github.com/AndersonBargas/rainstorm/v5/index"
bolt "go.etcd.io/bbolt"
)

Expand Down
4 changes: 2 additions & 2 deletions q/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"path/filepath"
"strings"

"github.com/AndersonBargas/rainstorm/v4"
"github.com/AndersonBargas/rainstorm/v4/q"
"github.com/AndersonBargas/rainstorm/v5"
"github.com/AndersonBargas/rainstorm/v5/q"
)

func ExampleRe() {
Expand Down
4 changes: 2 additions & 2 deletions query.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package rainstorm

import (
"github.com/AndersonBargas/rainstorm/v4/internal"
"github.com/AndersonBargas/rainstorm/v4/q"
"github.com/AndersonBargas/rainstorm/v5/internal"
"github.com/AndersonBargas/rainstorm/v5/q"
bolt "go.etcd.io/bbolt"
)

Expand Down
4 changes: 2 additions & 2 deletions query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"testing"

"github.com/AndersonBargas/rainstorm/v4/codec/json"
"github.com/AndersonBargas/rainstorm/v4/q"
"github.com/AndersonBargas/rainstorm/v5/codec/json"
"github.com/AndersonBargas/rainstorm/v5/q"
"github.com/stretchr/testify/require"
)

Expand Down
4 changes: 2 additions & 2 deletions sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"sort"
"time"

"github.com/AndersonBargas/rainstorm/v4/index"
"github.com/AndersonBargas/rainstorm/v4/q"
"github.com/AndersonBargas/rainstorm/v5/index"
"github.com/AndersonBargas/rainstorm/v5/q"
bolt "go.etcd.io/bbolt"
)

Expand Down
4 changes: 2 additions & 2 deletions store.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"bytes"
"reflect"

"github.com/AndersonBargas/rainstorm/v4/index"
"github.com/AndersonBargas/rainstorm/v4/q"
"github.com/AndersonBargas/rainstorm/v5/index"
"github.com/AndersonBargas/rainstorm/v5/q"
bolt "go.etcd.io/bbolt"
)

Expand Down
6 changes: 3 additions & 3 deletions store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"testing"
"time"

"github.com/AndersonBargas/rainstorm/v4/codec/gob"
"github.com/AndersonBargas/rainstorm/v4/codec/json"
"github.com/AndersonBargas/rainstorm/v4/q"
"github.com/AndersonBargas/rainstorm/v5/codec/gob"
"github.com/AndersonBargas/rainstorm/v5/codec/json"
"github.com/AndersonBargas/rainstorm/v5/q"
"github.com/stretchr/testify/require"
bolt "go.etcd.io/bbolt"
)
Expand Down
4 changes: 2 additions & 2 deletions storm.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"encoding/binary"
"time"

"github.com/AndersonBargas/rainstorm/v4/codec"
"github.com/AndersonBargas/rainstorm/v4/codec/json"
"github.com/AndersonBargas/rainstorm/v5/codec"
"github.com/AndersonBargas/rainstorm/v5/codec/json"
bolt "go.etcd.io/bbolt"
)

Expand Down
2 changes: 1 addition & 1 deletion storm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"testing"
"time"

"github.com/AndersonBargas/rainstorm/v4/codec/json"
"github.com/AndersonBargas/rainstorm/v5/codec/json"
"github.com/stretchr/testify/require"
bolt "go.etcd.io/bbolt"
)
Expand Down
Loading

0 comments on commit 585e720

Please sign in to comment.