diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8382b8a --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2019 Vincent Composieux + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 1307b19..1bde555 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ -[![TravisBuildStatus](https://api.travis-ci.org/eko/gache.svg?branch=master)](https://travis-ci.org/eko/gache) -[![GoDoc](https://godoc.org/github.com/eko/gache?status.png)](https://godoc.org/github.com/eko/gache) -[![GoReportCard](https://goreportcard.com/badge/github.com/eko/gache)](https://goreportcard.com/report/github.com/eko/gache) +[![TravisBuildStatus](https://api.travis-ci.org/eko/gocache.svg?branch=master)](https://travis-ci.org/eko/gocache) +[![GoDoc](https://godoc.org/github.com/eko/gocache?status.png)](https://godoc.org/github.com/eko/gocache) +[![GoReportCard](https://goreportcard.com/badge/github.com/eko/gocache)](https://goreportcard.com/report/github.com/eko/gocache) -Go + Cache = Gache -================== +Gocache +======= -An extendable Go cache library that brings you a lot of features for caching data. +Guess what is Gocache? a Go cache library. +This is an extendable cache library that brings you a lot of features for caching data. ## Overview @@ -234,10 +235,10 @@ import ( "time" "github.com/dgraph-io/ristretto" - "github.com/eko/gache/cache" - "github.com/eko/gache/marshaler" - "github.com/eko/gache/metrics" - "github.com/eko/gache/store" + "github.com/eko/gocache/cache" + "github.com/eko/gocache/marshaler" + "github.com/eko/gocache/metrics" + "github.com/eko/gocache/store" "github.com/go-redis/redis/v7" ) diff --git a/cache/cache.go b/cache/cache.go index d4493ad..7ca1906 100644 --- a/cache/cache.go +++ b/cache/cache.go @@ -3,8 +3,8 @@ package cache import ( "strings" - "github.com/eko/gache/codec" - "github.com/eko/gache/store" + "github.com/eko/gocache/codec" + "github.com/eko/gocache/store" ) const ( diff --git a/cache/cache_test.go b/cache/cache_test.go index b63a7c2..5e2dbbb 100644 --- a/cache/cache_test.go +++ b/cache/cache_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/eko/gache/codec" - "github.com/eko/gache/store" - mocksStore "github.com/eko/gache/test/mocks/store" + "github.com/eko/gocache/codec" + "github.com/eko/gocache/store" + mocksStore "github.com/eko/gocache/test/mocks/store" "github.com/stretchr/testify/assert" ) diff --git a/cache/chain.go b/cache/chain.go index 2a26828..1542cf3 100644 --- a/cache/chain.go +++ b/cache/chain.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/eko/gache/store" + "github.com/eko/gocache/store" ) const ( diff --git a/cache/chain_test.go b/cache/chain_test.go index 59c51ad..59bd1ec 100644 --- a/cache/chain_test.go +++ b/cache/chain_test.go @@ -4,10 +4,10 @@ import ( "errors" "testing" - "github.com/eko/gache/store" - mocksCache "github.com/eko/gache/test/mocks/cache" - mocksCodec "github.com/eko/gache/test/mocks/codec" - mocksStore "github.com/eko/gache/test/mocks/store" + "github.com/eko/gocache/store" + mocksCache "github.com/eko/gocache/test/mocks/cache" + mocksCodec "github.com/eko/gocache/test/mocks/codec" + mocksStore "github.com/eko/gocache/test/mocks/store" "github.com/stretchr/testify/assert" ) diff --git a/cache/interface.go b/cache/interface.go index ba3fb3f..80bcbd9 100644 --- a/cache/interface.go +++ b/cache/interface.go @@ -1,8 +1,8 @@ package cache import ( - "github.com/eko/gache/codec" - "github.com/eko/gache/store" + "github.com/eko/gocache/codec" + "github.com/eko/gocache/store" ) // CacheInterface represents the interface for all caches (aggregates, metric, memory, redis, ...) diff --git a/cache/loadable.go b/cache/loadable.go index 65a6744..cf0cdf2 100644 --- a/cache/loadable.go +++ b/cache/loadable.go @@ -2,7 +2,7 @@ package cache import ( "log" - "github.com/eko/gache/store" + "github.com/eko/gocache/store" ) const ( diff --git a/cache/loadable_test.go b/cache/loadable_test.go index 48a4a2e..4756808 100644 --- a/cache/loadable_test.go +++ b/cache/loadable_test.go @@ -4,10 +4,10 @@ import ( "errors" "testing" - "github.com/eko/gache/store" - mocksCache "github.com/eko/gache/test/mocks/cache" - mocksCodec "github.com/eko/gache/test/mocks/codec" - mocksStore "github.com/eko/gache/test/mocks/store" + "github.com/eko/gocache/store" + mocksCache "github.com/eko/gocache/test/mocks/cache" + mocksCodec "github.com/eko/gocache/test/mocks/codec" + mocksStore "github.com/eko/gocache/test/mocks/store" "github.com/stretchr/testify/assert" ) diff --git a/cache/metric.go b/cache/metric.go index 2e80dc2..317924f 100644 --- a/cache/metric.go +++ b/cache/metric.go @@ -1,8 +1,8 @@ package cache import ( - "github.com/eko/gache/metrics" - "github.com/eko/gache/store" + "github.com/eko/gocache/metrics" + "github.com/eko/gocache/store" ) const ( diff --git a/cache/metric_test.go b/cache/metric_test.go index 8061383..54ea335 100644 --- a/cache/metric_test.go +++ b/cache/metric_test.go @@ -3,10 +3,10 @@ package cache import ( "testing" - mocksCache "github.com/eko/gache/test/mocks/cache" - mocksCodec "github.com/eko/gache/test/mocks/codec" - mocksMetrics "github.com/eko/gache/test/mocks/metrics" - mocksStore "github.com/eko/gache/test/mocks/store" + mocksCache "github.com/eko/gocache/test/mocks/cache" + mocksCodec "github.com/eko/gocache/test/mocks/codec" + mocksMetrics "github.com/eko/gocache/test/mocks/metrics" + mocksStore "github.com/eko/gocache/test/mocks/store" "github.com/stretchr/testify/assert" ) diff --git a/codec/codec.go b/codec/codec.go index 26eaaf5..d48c3bc 100644 --- a/codec/codec.go +++ b/codec/codec.go @@ -1,7 +1,7 @@ package codec import ( - "github.com/eko/gache/store" + "github.com/eko/gocache/store" ) // Stats allows to returns some statistics of codec usage diff --git a/codec/codec_test.go b/codec/codec_test.go index 465954b..0371343 100644 --- a/codec/codec_test.go +++ b/codec/codec_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/eko/gache/store" - mocksStore "github.com/eko/gache/test/mocks/store" + "github.com/eko/gocache/store" + mocksStore "github.com/eko/gocache/test/mocks/store" "github.com/stretchr/testify/assert" ) diff --git a/codec/interface.go b/codec/interface.go index c3304af..0f9b954 100644 --- a/codec/interface.go +++ b/codec/interface.go @@ -1,7 +1,7 @@ package codec import ( - "github.com/eko/gache/store" + "github.com/eko/gocache/store" ) // CodecInterface represents an instance of a cache codec diff --git a/go.mod b/go.mod index b4c5cd6..c82e743 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/eko/gache +module github.com/eko/gocache go 1.13 diff --git a/marshaler/marshaler.go b/marshaler/marshaler.go index 379767c..9ea106c 100644 --- a/marshaler/marshaler.go +++ b/marshaler/marshaler.go @@ -1,8 +1,8 @@ package marshaler import ( - "github.com/eko/gache/cache" - "github.com/eko/gache/store" + "github.com/eko/gocache/cache" + "github.com/eko/gocache/store" "github.com/vmihailenco/msgpack" ) diff --git a/marshaler/marshaler_test.go b/marshaler/marshaler_test.go index b18849c..686ce94 100644 --- a/marshaler/marshaler_test.go +++ b/marshaler/marshaler_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/eko/gache/store" - mocksCache "github.com/eko/gache/test/mocks/cache" + "github.com/eko/gocache/store" + mocksCache "github.com/eko/gocache/test/mocks/cache" "github.com/stretchr/testify/assert" "github.com/vmihailenco/msgpack" ) diff --git a/metrics/interface.go b/metrics/interface.go index f17a081..28f1fef 100644 --- a/metrics/interface.go +++ b/metrics/interface.go @@ -1,6 +1,6 @@ package metrics -import "github.com/eko/gache/codec" +import "github.com/eko/gocache/codec" // MetricsInterface represents the metrics interface for all available providers type MetricsInterface interface { diff --git a/metrics/prometheus.go b/metrics/prometheus.go index 2027f44..b327d1f 100644 --- a/metrics/prometheus.go +++ b/metrics/prometheus.go @@ -1,7 +1,7 @@ package metrics import ( - "github.com/eko/gache/codec" + "github.com/eko/gocache/codec" "github.com/prometheus/client_golang/prometheus" ) diff --git a/metrics/prometheus_test.go b/metrics/prometheus_test.go index 876075e..4300a2f 100644 --- a/metrics/prometheus_test.go +++ b/metrics/prometheus_test.go @@ -3,9 +3,9 @@ package metrics import ( "testing" - "github.com/eko/gache/codec" - mocksCodec "github.com/eko/gache/test/mocks/codec" - mocksStore "github.com/eko/gache/test/mocks/store" + "github.com/eko/gocache/codec" + mocksCodec "github.com/eko/gocache/test/mocks/codec" + mocksStore "github.com/eko/gocache/test/mocks/store" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" "github.com/stretchr/testify/assert" diff --git a/test/mocks/cache/cache_interface.go b/test/mocks/cache/cache_interface.go index 296547d..57fdd2b 100644 --- a/test/mocks/cache/cache_interface.go +++ b/test/mocks/cache/cache_interface.go @@ -3,7 +3,7 @@ package mocks import mock "github.com/stretchr/testify/mock" -import store "github.com/eko/gache/store" +import store "github.com/eko/gocache/store" // CacheInterface is an autogenerated mock type for the CacheInterface type type CacheInterface struct { diff --git a/test/mocks/cache/setter_cache_interface.go b/test/mocks/cache/setter_cache_interface.go index 694f2b7..0c20ac7 100644 --- a/test/mocks/cache/setter_cache_interface.go +++ b/test/mocks/cache/setter_cache_interface.go @@ -2,9 +2,9 @@ package mocks -import codec "github.com/eko/gache/codec" +import codec "github.com/eko/gocache/codec" import mock "github.com/stretchr/testify/mock" -import store "github.com/eko/gache/store" +import store "github.com/eko/gocache/store" // SetterCacheInterface is an autogenerated mock type for the SetterCacheInterface type type SetterCacheInterface struct { diff --git a/test/mocks/codec/codec_interface.go b/test/mocks/codec/codec_interface.go index df28541..f7908b8 100644 --- a/test/mocks/codec/codec_interface.go +++ b/test/mocks/codec/codec_interface.go @@ -2,9 +2,9 @@ package mocks -import codec "github.com/eko/gache/codec" +import codec "github.com/eko/gocache/codec" import mock "github.com/stretchr/testify/mock" -import store "github.com/eko/gache/store" +import store "github.com/eko/gocache/store" // CodecInterface is an autogenerated mock type for the CodecInterface type type CodecInterface struct { diff --git a/test/mocks/metrics/metrics_interface.go b/test/mocks/metrics/metrics_interface.go index 79f7cfa..470b3a9 100644 --- a/test/mocks/metrics/metrics_interface.go +++ b/test/mocks/metrics/metrics_interface.go @@ -2,7 +2,7 @@ package mocks -import codec "github.com/eko/gache/codec" +import codec "github.com/eko/gocache/codec" import mock "github.com/stretchr/testify/mock" diff --git a/test/mocks/store/store_interface.go b/test/mocks/store/store_interface.go index 492a85d..fd6f70a 100644 --- a/test/mocks/store/store_interface.go +++ b/test/mocks/store/store_interface.go @@ -3,7 +3,7 @@ package mocks import mock "github.com/stretchr/testify/mock" -import store "github.com/eko/gache/store" +import store "github.com/eko/gocache/store" // StoreInterface is an autogenerated mock type for the StoreInterface type type StoreInterface struct {