diff --git a/cmd/main.go b/cmd/main.go index d0ce2c0..a36f0fd 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -16,9 +16,9 @@ package main import ( "context" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal" "github.com/echovault/echovault/internal/config" - "github.com/echovault/echovault/pkg/echovault" "log" "os" "os/signal" diff --git a/pkg/constants/const.go b/constants/const.go similarity index 100% rename from pkg/constants/const.go rename to constants/const.go diff --git a/pkg/echovault/api_acl.go b/echovault/api_acl.go similarity index 100% rename from pkg/echovault/api_acl.go rename to echovault/api_acl.go diff --git a/pkg/echovault/api_admin.go b/echovault/api_admin.go similarity index 99% rename from pkg/echovault/api_admin.go rename to echovault/api_admin.go index beaf867..bc1d14e 100644 --- a/pkg/echovault/api_admin.go +++ b/echovault/api_admin.go @@ -17,7 +17,7 @@ package echovault import ( "fmt" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/types" + "github.com/echovault/echovault/types" "strings" ) diff --git a/pkg/echovault/api_connection.go b/echovault/api_connection.go similarity index 100% rename from pkg/echovault/api_connection.go rename to echovault/api_connection.go diff --git a/pkg/echovault/api_generic.go b/echovault/api_generic.go similarity index 100% rename from pkg/echovault/api_generic.go rename to echovault/api_generic.go diff --git a/pkg/echovault/api_hash.go b/echovault/api_hash.go similarity index 100% rename from pkg/echovault/api_hash.go rename to echovault/api_hash.go diff --git a/pkg/echovault/api_list.go b/echovault/api_list.go similarity index 100% rename from pkg/echovault/api_list.go rename to echovault/api_list.go diff --git a/pkg/echovault/api_pubsub.go b/echovault/api_pubsub.go similarity index 100% rename from pkg/echovault/api_pubsub.go rename to echovault/api_pubsub.go diff --git a/pkg/echovault/api_set.go b/echovault/api_set.go similarity index 100% rename from pkg/echovault/api_set.go rename to echovault/api_set.go diff --git a/pkg/echovault/api_sorted_set.go b/echovault/api_sorted_set.go similarity index 100% rename from pkg/echovault/api_sorted_set.go rename to echovault/api_sorted_set.go diff --git a/pkg/echovault/api_string.go b/echovault/api_string.go similarity index 100% rename from pkg/echovault/api_string.go rename to echovault/api_string.go diff --git a/pkg/echovault/cluster.go b/echovault/cluster.go similarity index 100% rename from pkg/echovault/cluster.go rename to echovault/cluster.go diff --git a/pkg/echovault/echovault.go b/echovault/echovault.go similarity index 98% rename from pkg/echovault/echovault.go rename to echovault/echovault.go index b5b1ba3..efd15cc 100644 --- a/pkg/echovault/echovault.go +++ b/echovault/echovault.go @@ -20,6 +20,7 @@ import ( "crypto/x509" "errors" "fmt" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" "github.com/echovault/echovault/internal/aof" "github.com/echovault/echovault/internal/clock" @@ -38,7 +39,6 @@ import ( str "github.com/echovault/echovault/internal/modules/string" "github.com/echovault/echovault/internal/raft" "github.com/echovault/echovault/internal/snapshot" - "github.com/echovault/echovault/pkg/constants" "io" "log" "net" @@ -185,6 +185,10 @@ func NewEchoVault(options ...func(echovault *EchoVault)) (*EchoVault, error) { Config: echovault.config, EchoVault: echovault, GetCommand: echovault.getCommand, + CreateKeyAndLock: echovault.CreateKeyAndLock, + SetValue: echovault.SetValue, + SetExpiry: echovault.SetExpiry, + KeyUnlock: echovault.KeyUnlock, DeleteKey: echovault.DeleteKey, StartSnapshot: echovault.startSnapshot, FinishSnapshot: echovault.finishSnapshot, diff --git a/pkg/echovault/keyspace.go b/echovault/keyspace.go similarity index 99% rename from pkg/echovault/keyspace.go rename to echovault/keyspace.go index 1ba9d54..ef08a63 100644 --- a/pkg/echovault/keyspace.go +++ b/echovault/keyspace.go @@ -18,8 +18,8 @@ import ( "context" "errors" "fmt" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" "log" "math/rand" "runtime" diff --git a/pkg/echovault/modules.go b/echovault/modules.go similarity index 98% rename from pkg/echovault/modules.go rename to echovault/modules.go index f228b37..e42f10c 100644 --- a/pkg/echovault/modules.go +++ b/echovault/modules.go @@ -18,8 +18,8 @@ import ( "context" "errors" "fmt" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" "net" "strings" ) diff --git a/internal/config/config.go b/internal/config/config.go index 82d8c56..3f817ba 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -19,8 +19,8 @@ import ( "errors" "flag" "fmt" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" "log" "os" "path" diff --git a/internal/config/default.go b/internal/config/default.go index 7daf435..bfe4fd7 100644 --- a/internal/config/default.go +++ b/internal/config/default.go @@ -1,7 +1,7 @@ package config import ( - "github.com/echovault/echovault/pkg/constants" + "github.com/echovault/echovault/constants" "time" ) diff --git a/internal/modules/acl/acl.go b/internal/modules/acl/acl.go index f2e158e..227d256 100644 --- a/internal/modules/acl/acl.go +++ b/internal/modules/acl/acl.go @@ -20,9 +20,9 @@ import ( "encoding/json" "errors" "fmt" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" "github.com/echovault/echovault/internal/config" - "github.com/echovault/echovault/pkg/constants" "github.com/gobwas/glob" "gopkg.in/yaml.v3" "log" diff --git a/internal/modules/acl/commands.go b/internal/modules/acl/commands.go index 64cb5c3..cc32c0c 100644 --- a/internal/modules/acl/commands.go +++ b/internal/modules/acl/commands.go @@ -18,8 +18,8 @@ import ( "encoding/json" "errors" "fmt" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" "gopkg.in/yaml.v3" "log" "os" diff --git a/internal/modules/admin/commands.go b/internal/modules/admin/commands.go index 26b87dc..94869e2 100644 --- a/internal/modules/admin/commands.go +++ b/internal/modules/admin/commands.go @@ -17,8 +17,8 @@ package admin import ( "errors" "fmt" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" "github.com/gobwas/glob" "slices" "strings" diff --git a/internal/modules/connection/commands.go b/internal/modules/connection/commands.go index d3ddf33..3ad2ffc 100644 --- a/internal/modules/connection/commands.go +++ b/internal/modules/connection/commands.go @@ -17,8 +17,8 @@ package connection import ( "errors" "fmt" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" ) func handlePing(params internal.HandlerFuncParams) ([]byte, error) { diff --git a/internal/modules/generic/commands.go b/internal/modules/generic/commands.go index 49c0bbb..a40fb5d 100644 --- a/internal/modules/generic/commands.go +++ b/internal/modules/generic/commands.go @@ -17,8 +17,8 @@ package generic import ( "errors" "fmt" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" "log" "strconv" "strings" diff --git a/internal/modules/generic/key_funcs.go b/internal/modules/generic/key_funcs.go index e9a42d9..318073c 100644 --- a/internal/modules/generic/key_funcs.go +++ b/internal/modules/generic/key_funcs.go @@ -16,8 +16,8 @@ package generic import ( "errors" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" ) func setKeyFunc(cmd []string) (internal.AccessKeys, error) { diff --git a/internal/modules/hash/commands.go b/internal/modules/hash/commands.go index 5a679d2..60fe793 100644 --- a/internal/modules/hash/commands.go +++ b/internal/modules/hash/commands.go @@ -17,8 +17,8 @@ package hash import ( "errors" "fmt" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" "math/rand" "slices" "strconv" diff --git a/internal/modules/hash/key_funcs.go b/internal/modules/hash/key_funcs.go index 847ea9c..9b2cfac 100644 --- a/internal/modules/hash/key_funcs.go +++ b/internal/modules/hash/key_funcs.go @@ -16,8 +16,8 @@ package hash import ( "errors" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" ) func hsetKeyFunc(cmd []string) (internal.AccessKeys, error) { diff --git a/internal/modules/list/commands.go b/internal/modules/list/commands.go index 448f341..9a4aac0 100644 --- a/internal/modules/list/commands.go +++ b/internal/modules/list/commands.go @@ -17,8 +17,8 @@ package list import ( "errors" "fmt" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" "math" "slices" "strings" diff --git a/internal/modules/list/key_funcs.go b/internal/modules/list/key_funcs.go index 2025d03..d9762c7 100644 --- a/internal/modules/list/key_funcs.go +++ b/internal/modules/list/key_funcs.go @@ -16,8 +16,8 @@ package list import ( "errors" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" ) func lpushKeyFunc(cmd []string) (internal.AccessKeys, error) { diff --git a/internal/modules/pubsub/commands.go b/internal/modules/pubsub/commands.go index 81a60a3..da69ce5 100644 --- a/internal/modules/pubsub/commands.go +++ b/internal/modules/pubsub/commands.go @@ -17,8 +17,8 @@ package pubsub import ( "errors" "fmt" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" "strings" ) diff --git a/internal/modules/set/commands.go b/internal/modules/set/commands.go index fd77af8..52591ae 100644 --- a/internal/modules/set/commands.go +++ b/internal/modules/set/commands.go @@ -17,8 +17,8 @@ package set import ( "errors" "fmt" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" "slices" "strings" ) diff --git a/internal/modules/set/key_funcs.go b/internal/modules/set/key_funcs.go index 3e703c4..6c37bd4 100644 --- a/internal/modules/set/key_funcs.go +++ b/internal/modules/set/key_funcs.go @@ -16,8 +16,8 @@ package set import ( "errors" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" "slices" "strings" ) diff --git a/internal/modules/sorted_set/commands.go b/internal/modules/sorted_set/commands.go index 5e3fd6e..e43a5b4 100644 --- a/internal/modules/sorted_set/commands.go +++ b/internal/modules/sorted_set/commands.go @@ -18,8 +18,8 @@ import ( "cmp" "errors" "fmt" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" "math" "slices" "strconv" diff --git a/internal/modules/sorted_set/key_funcs.go b/internal/modules/sorted_set/key_funcs.go index 42e8988..06d2f19 100644 --- a/internal/modules/sorted_set/key_funcs.go +++ b/internal/modules/sorted_set/key_funcs.go @@ -16,8 +16,8 @@ package sorted_set import ( "errors" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" "slices" "strings" ) diff --git a/internal/modules/string/commands.go b/internal/modules/string/commands.go index ce3ce90..a70c36f 100644 --- a/internal/modules/string/commands.go +++ b/internal/modules/string/commands.go @@ -17,8 +17,8 @@ package str import ( "errors" "fmt" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" ) func handleSetRange(params internal.HandlerFuncParams) ([]byte, error) { diff --git a/internal/modules/string/key_funcs.go b/internal/modules/string/key_funcs.go index 95ee5b5..d824cc9 100644 --- a/internal/modules/string/key_funcs.go +++ b/internal/modules/string/key_funcs.go @@ -16,8 +16,8 @@ package str import ( "errors" + "github.com/echovault/echovault/constants" "github.com/echovault/echovault/internal" - "github.com/echovault/echovault/pkg/constants" ) func setRangeKeyFunc(cmd []string) (internal.AccessKeys, error) { diff --git a/internal/raft/fsm.go b/internal/raft/fsm.go index 8f7aa2e..201e8a9 100644 --- a/internal/raft/fsm.go +++ b/internal/raft/fsm.go @@ -20,19 +20,22 @@ import ( "fmt" "github.com/echovault/echovault/internal" "github.com/echovault/echovault/internal/config" - "github.com/echovault/echovault/pkg/types" "github.com/hashicorp/raft" "io" "log" "net" "strings" + "time" ) type FSMOpts struct { Config config.Config - EchoVault types.EchoVault GetState func() map[string]internal.KeyData GetCommand func(command string) (internal.Command, error) + CreateKeyAndLock func(ctx context.Context, key string) (bool, error) + SetValue func(ctx context.Context, key string, value interface{}) error + SetExpiry func(ctx context.Context, key string, expire time.Time, touch bool) + KeyUnlock func(ctx context.Context, key string) DeleteKey func(ctx context.Context, key string) error StartSnapshot func() FinishSnapshot func() @@ -154,14 +157,14 @@ func (fsm *FSM) Restore(snapshot io.ReadCloser) error { // Set state ctx := context.Background() for k, v := range internal.FilterExpiredKeys(data.State) { - if _, err = fsm.options.EchoVault.CreateKeyAndLock(ctx, k); err != nil { + if _, err = fsm.options.CreateKeyAndLock(ctx, k); err != nil { log.Fatal(err) } - if err = fsm.options.EchoVault.SetValue(ctx, k, v.Value); err != nil { + if err = fsm.options.SetValue(ctx, k, v.Value); err != nil { log.Fatal(err) } - fsm.options.EchoVault.SetExpiry(ctx, k, v.ExpireAt, false) - fsm.options.EchoVault.KeyUnlock(ctx, k) + fsm.options.SetExpiry(ctx, k, v.ExpireAt, false) + fsm.options.KeyUnlock(ctx, k) } // Set latest snapshot milliseconds fsm.options.SetLatestSnapshotTime(data.LatestSnapshotMilliseconds) diff --git a/internal/raft/raft.go b/internal/raft/raft.go index f74532a..29ca20d 100644 --- a/internal/raft/raft.go +++ b/internal/raft/raft.go @@ -27,7 +27,7 @@ import ( "path/filepath" "time" - "github.com/echovault/echovault/pkg/types" + "github.com/echovault/echovault/types" "github.com/hashicorp/raft" raftboltdb "github.com/hashicorp/raft-boltdb" ) @@ -35,6 +35,10 @@ import ( type Opts struct { Config config.Config EchoVault types.EchoVault + CreateKeyAndLock func(ctx context.Context, key string) (bool, error) + SetValue func(ctx context.Context, key string, value interface{}) error + SetExpiry func(ctx context.Context, key string, expire time.Time, touch bool) + KeyUnlock func(ctx context.Context, key string) GetState func() map[string]internal.KeyData GetCommand func(command string) (internal.Command, error) DeleteKey func(ctx context.Context, key string) error @@ -114,9 +118,12 @@ func (r *Raft) RaftInit(ctx context.Context) { raftConfig, NewFSM(FSMOpts{ Config: r.options.Config, - EchoVault: r.options.EchoVault, GetState: r.options.GetState, GetCommand: r.options.GetCommand, + CreateKeyAndLock: r.options.CreateKeyAndLock, + SetValue: r.options.SetValue, + SetExpiry: r.options.SetExpiry, + KeyUnlock: r.options.KeyUnlock, DeleteKey: r.options.DeleteKey, StartSnapshot: r.options.StartSnapshot, FinishSnapshot: r.options.FinishSnapshot, diff --git a/internal/utils.go b/internal/utils.go index f27b015..ad5d32b 100644 --- a/internal/utils.go +++ b/internal/utils.go @@ -20,7 +20,7 @@ import ( "cmp" "errors" "fmt" - "github.com/echovault/echovault/pkg/constants" + "github.com/echovault/echovault/constants" "io" "log" "math/big" diff --git a/pkg/config/config.go b/pkg/config/config.go deleted file mode 100644 index 07c7754..0000000 --- a/pkg/config/config.go +++ /dev/null @@ -1,11 +0,0 @@ -package config - -import ( - "github.com/echovault/echovault/internal/config" -) - -// DefaultConfig returns the default configuration. -// This should be used when using EchoVault as an embedded library. -func DefaultConfig() config.Config { - return config.DefaultConfig() -} diff --git a/test/modules/acl/commands_test.go b/test/modules/acl/commands_test.go index bbc2b3e..50e6471 100644 --- a/test/modules/acl/commands_test.go +++ b/test/modules/acl/commands_test.go @@ -17,10 +17,10 @@ package acl import ( "crypto/sha256" "fmt" + "github.com/echovault/echovault/constants" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal/config" "github.com/echovault/echovault/internal/modules/acl" - "github.com/echovault/echovault/pkg/constants" - "github.com/echovault/echovault/pkg/echovault" "github.com/tidwall/resp" "net" "reflect" diff --git a/test/modules/admin/commands_test.go b/test/modules/admin/commands_test.go index fd6ea31..2e57792 100644 --- a/test/modules/admin/commands_test.go +++ b/test/modules/admin/commands_test.go @@ -18,10 +18,10 @@ import ( "bytes" "context" "fmt" + "github.com/echovault/echovault/constants" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal" "github.com/echovault/echovault/internal/config" - "github.com/echovault/echovault/pkg/constants" - "github.com/echovault/echovault/pkg/echovault" "github.com/tidwall/resp" "net" "reflect" diff --git a/test/modules/connection/commands_test.go b/test/modules/connection/commands_test.go index 6e3a05b..5d05d6b 100644 --- a/test/modules/connection/commands_test.go +++ b/test/modules/connection/commands_test.go @@ -18,10 +18,10 @@ import ( "bytes" "context" "errors" + "github.com/echovault/echovault/constants" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal" "github.com/echovault/echovault/internal/config" - "github.com/echovault/echovault/pkg/constants" - "github.com/echovault/echovault/pkg/echovault" "github.com/tidwall/resp" "net" "reflect" diff --git a/test/modules/generic/api_test.go b/test/modules/generic/api_test.go index b18281b..dbba557 100644 --- a/test/modules/generic/api_test.go +++ b/test/modules/generic/api_test.go @@ -16,10 +16,10 @@ package generic import ( "context" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal" "github.com/echovault/echovault/internal/clock" "github.com/echovault/echovault/internal/config" - "github.com/echovault/echovault/pkg/echovault" "reflect" "slices" "strings" diff --git a/test/modules/generic/commands_test.go b/test/modules/generic/commands_test.go index 9598de0..0118593 100644 --- a/test/modules/generic/commands_test.go +++ b/test/modules/generic/commands_test.go @@ -19,11 +19,11 @@ import ( "context" "errors" "fmt" + "github.com/echovault/echovault/constants" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal" "github.com/echovault/echovault/internal/clock" "github.com/echovault/echovault/internal/config" - "github.com/echovault/echovault/pkg/constants" - "github.com/echovault/echovault/pkg/echovault" "github.com/tidwall/resp" "net" "reflect" diff --git a/test/modules/hash/api_test.go b/test/modules/hash/api_test.go index 6ef4db5..9168499 100644 --- a/test/modules/hash/api_test.go +++ b/test/modules/hash/api_test.go @@ -16,8 +16,8 @@ package hash import ( "context" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal/config" - "github.com/echovault/echovault/pkg/echovault" "reflect" "slices" "testing" diff --git a/test/modules/hash/commands_test.go b/test/modules/hash/commands_test.go index 27a0589..7ca7dc6 100644 --- a/test/modules/hash/commands_test.go +++ b/test/modules/hash/commands_test.go @@ -19,10 +19,10 @@ import ( "context" "errors" "fmt" + "github.com/echovault/echovault/constants" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal" "github.com/echovault/echovault/internal/config" - "github.com/echovault/echovault/pkg/constants" - "github.com/echovault/echovault/pkg/echovault" "github.com/tidwall/resp" "net" "reflect" diff --git a/test/modules/list/api_test.go b/test/modules/list/api_test.go index 44e8552..cce6f51 100644 --- a/test/modules/list/api_test.go +++ b/test/modules/list/api_test.go @@ -16,8 +16,8 @@ package list import ( "context" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal/config" - "github.com/echovault/echovault/pkg/echovault" "reflect" "testing" ) diff --git a/test/modules/list/commands_test.go b/test/modules/list/commands_test.go index a2272d2..8133b11 100644 --- a/test/modules/list/commands_test.go +++ b/test/modules/list/commands_test.go @@ -19,10 +19,10 @@ import ( "context" "errors" "fmt" + "github.com/echovault/echovault/constants" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal" "github.com/echovault/echovault/internal/config" - "github.com/echovault/echovault/pkg/constants" - "github.com/echovault/echovault/pkg/echovault" "github.com/tidwall/resp" "net" "reflect" diff --git a/test/modules/pubsub/commands_test.go b/test/modules/pubsub/commands_test.go index 4774c8c..e78530c 100644 --- a/test/modules/pubsub/commands_test.go +++ b/test/modules/pubsub/commands_test.go @@ -18,11 +18,11 @@ import ( "bytes" "context" "fmt" + "github.com/echovault/echovault/constants" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal" "github.com/echovault/echovault/internal/config" "github.com/echovault/echovault/internal/modules/pubsub" - "github.com/echovault/echovault/pkg/constants" - "github.com/echovault/echovault/pkg/echovault" "github.com/tidwall/resp" "net" "reflect" diff --git a/test/modules/set/api_test.go b/test/modules/set/api_test.go index 6c085b8..4fb1bfd 100644 --- a/test/modules/set/api_test.go +++ b/test/modules/set/api_test.go @@ -16,9 +16,9 @@ package set import ( "context" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal/config" "github.com/echovault/echovault/internal/modules/set" - "github.com/echovault/echovault/pkg/echovault" "reflect" "slices" "testing" diff --git a/test/modules/set/commands_test.go b/test/modules/set/commands_test.go index 5a107ab..0b449d9 100644 --- a/test/modules/set/commands_test.go +++ b/test/modules/set/commands_test.go @@ -19,11 +19,11 @@ import ( "context" "errors" "fmt" + "github.com/echovault/echovault/constants" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal" "github.com/echovault/echovault/internal/config" "github.com/echovault/echovault/internal/modules/set" - "github.com/echovault/echovault/pkg/constants" - "github.com/echovault/echovault/pkg/echovault" "github.com/tidwall/resp" "net" "reflect" diff --git a/test/modules/sorted_set/api_test.go b/test/modules/sorted_set/api_test.go index 8dcd57f..c9e61d1 100644 --- a/test/modules/sorted_set/api_test.go +++ b/test/modules/sorted_set/api_test.go @@ -16,10 +16,10 @@ package sorted_set import ( "context" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal" "github.com/echovault/echovault/internal/config" ss "github.com/echovault/echovault/internal/modules/sorted_set" - "github.com/echovault/echovault/pkg/echovault" "math" "reflect" "strconv" diff --git a/test/modules/sorted_set/commands_test.go b/test/modules/sorted_set/commands_test.go index bdf233e..5255b04 100644 --- a/test/modules/sorted_set/commands_test.go +++ b/test/modules/sorted_set/commands_test.go @@ -19,11 +19,11 @@ import ( "context" "errors" "fmt" + "github.com/echovault/echovault/constants" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal" "github.com/echovault/echovault/internal/config" "github.com/echovault/echovault/internal/modules/sorted_set" - "github.com/echovault/echovault/pkg/constants" - "github.com/echovault/echovault/pkg/echovault" "github.com/tidwall/resp" "math" "net" diff --git a/test/modules/string/api_test.go b/test/modules/string/api_test.go index 6bb96f4..9b32359 100644 --- a/test/modules/string/api_test.go +++ b/test/modules/string/api_test.go @@ -16,8 +16,8 @@ package str import ( "context" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal/config" - "github.com/echovault/echovault/pkg/echovault" "testing" ) diff --git a/test/modules/string/commands_test.go b/test/modules/string/commands_test.go index 5eac829..4560179 100644 --- a/test/modules/string/commands_test.go +++ b/test/modules/string/commands_test.go @@ -19,10 +19,10 @@ import ( "context" "errors" "fmt" + "github.com/echovault/echovault/constants" + "github.com/echovault/echovault/echovault" "github.com/echovault/echovault/internal" "github.com/echovault/echovault/internal/config" - "github.com/echovault/echovault/pkg/constants" - "github.com/echovault/echovault/pkg/echovault" "github.com/tidwall/resp" "net" "reflect" diff --git a/pkg/types/types.go b/types/types.go similarity index 100% rename from pkg/types/types.go rename to types/types.go