Skip to content

Commit

Permalink
refactor: conv package to v3 spec
Browse files Browse the repository at this point in the history
  • Loading branch information
vividvilla committed May 29, 2024
1 parent d88ef2e commit 8b64d4a
Show file tree
Hide file tree
Showing 19 changed files with 404 additions and 1,337 deletions.
3 changes: 1 addition & 2 deletions conv/conv.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ var (
// Error codes for store errors. This should match the codes
// defined in the /simplesessions package exactly.
ErrInvalidSession = &Err{code: 1, msg: "invalid session"}
ErrFieldNotFound = &Err{code: 2, msg: "field not found"}
ErrNil = &Err{code: 2, msg: "nil returned"}
ErrAssertType = &Err{code: 3, msg: "assertion failed"}
ErrNil = &Err{code: 4, msg: "nil returned"}
)

type Err struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/fastglue-goredis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ require (
github.com/redis/go-redis/v9 v9.5.1
github.com/valyala/fasthttp v1.52.0
github.com/vividvilla/simplesessions/stores/goredis/v9 v9.0.0
github.com/vividvilla/simplesessions/v2 v2.0.0
github.com/vividvilla/simplesessions/v3 v2.0.0
github.com/zerodha/fastglue v1.8.0
)
2 changes: 1 addition & 1 deletion examples/fastglue-goredis/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/redis/go-redis/v9"
"github.com/valyala/fasthttp"
redisstore "github.com/vividvilla/simplesessions/stores/goredis/v9"
"github.com/vividvilla/simplesessions/v2"
"github.com/vividvilla/simplesessions/v3"
"github.com/zerodha/fastglue"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/fasthttp-redis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/gomodule/redigo v2.0.0+incompatible
github.com/valyala/fasthttp v1.52.0
github.com/vividvilla/simplesessions/stores/redis/v2 v2.0.0
github.com/vividvilla/simplesessions/v2 v2.0.0
github.com/vividvilla/simplesessions/v3 v2.0.0
)

require (
Expand Down
2 changes: 1 addition & 1 deletion examples/fasthttp-redis/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/gomodule/redigo/redis"
"github.com/valyala/fasthttp"
redisstore "github.com/vividvilla/simplesessions/stores/redis/v2"
"github.com/vividvilla/simplesessions/v2"
"github.com/vividvilla/simplesessions/v3"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion examples/nethttp-inmemory/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ go 1.14

require (
github.com/vividvilla/simplesessions/stores/memory/v2 v2.0.0
github.com/vividvilla/simplesessions/v2 v2.0.0
github.com/vividvilla/simplesessions/v3 v2.0.0
)
2 changes: 1 addition & 1 deletion examples/nethttp-inmemory/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"

"github.com/vividvilla/simplesessions/stores/memory/v2"
"github.com/vividvilla/simplesessions/v2"
"github.com/vividvilla/simplesessions/v3"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion examples/nethttp-redis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ go 1.14
require (
github.com/gomodule/redigo v2.0.0+incompatible
github.com/vividvilla/simplesessions/stores/redis/v2 v2.0.0
github.com/vividvilla/simplesessions/v2 v2.0.0
github.com/vividvilla/simplesessions/v3 v2.0.0
)
2 changes: 1 addition & 1 deletion examples/nethttp-redis/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/gomodule/redigo/redis"
redisstore "github.com/vividvilla/simplesessions/stores/redis/v2"
"github.com/vividvilla/simplesessions/v2"
"github.com/vividvilla/simplesessions/v3"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion examples/nethttp-secure-cookie/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.14

require (
github.com/vividvilla/simplesessions/stores/securecookie/v2 v2.0.0
github.com/vividvilla/simplesessions/v2 v2.0.0
github.com/vividvilla/simplesessions/v3 v2.0.0
)

require github.com/gorilla/securecookie v1.1.2 // indirect
2 changes: 1 addition & 1 deletion examples/nethttp-secure-cookie/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"

"github.com/vividvilla/simplesessions/stores/securecookie/v2"
"github.com/vividvilla/simplesessions/v2"
"github.com/vividvilla/simplesessions/v3"
)

var (
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/vividvilla/simplesessions/v2
module github.com/vividvilla/simplesessions/v3

require github.com/stretchr/testify v1.9.0

Expand Down
1 change: 0 additions & 1 deletion go.work
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ go 1.14
use (
.
./conv
./stores/goredis
./stores/memory
./stores/redis
./stores/securecookie
Expand Down
20 changes: 0 additions & 20 deletions stores/goredis/go.mod

This file was deleted.

Loading

0 comments on commit 8b64d4a

Please sign in to comment.