mirror of
https://github.com/kataras/iris.git
synced 2026-03-02 14:35:58 +00:00
obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository
We have to do the same on iris-contrib/examples, iris-contrib/middleware and e.t.c. Former-commit-id: 0860688158f374bc137bc934b81b26dcd0e10964
This commit is contained in:
6
cache/browser.go
vendored
6
cache/browser.go
vendored
@@ -4,8 +4,8 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/kataras/iris/cache/client"
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/iris/v12/cache/client"
|
||||
"github.com/kataras/iris/v12/context"
|
||||
)
|
||||
|
||||
// CacheControlHeaderValue is the header value of the
|
||||
@@ -111,7 +111,7 @@ var ETag = func(ctx context.Context) {
|
||||
// Cache304 sends a `StatusNotModified` (304) whenever
|
||||
// the "If-Modified-Since" request header (time) is before the
|
||||
// time.Now() + expiresEvery (always compared to their UTC values).
|
||||
// Use this `cache#Cache304` instead of the "github.com/kataras/iris/cache" or iris.Cache
|
||||
// Use this `cache#Cache304` instead of the "github.com/kataras/iris/v12/cache" or iris.Cache
|
||||
// for better performance.
|
||||
// Clients that are compatible with the http RCF (all browsers are and tools like postman)
|
||||
// will handle the caching.
|
||||
|
||||
8
cache/browser_test.go
vendored
8
cache/browser_test.go
vendored
@@ -5,11 +5,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/kataras/iris/cache"
|
||||
"github.com/kataras/iris/v12/cache"
|
||||
|
||||
"github.com/kataras/iris"
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/iris/httptest"
|
||||
"github.com/kataras/iris/v12"
|
||||
"github.com/kataras/iris/v12/context"
|
||||
"github.com/kataras/iris/v12/httptest"
|
||||
)
|
||||
|
||||
func TestNoCache(t *testing.T) {
|
||||
|
||||
8
cache/cache.go
vendored
8
cache/cache.go
vendored
@@ -9,8 +9,8 @@ Example code:
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/kataras/iris"
|
||||
"github.com/kataras/iris/cache"
|
||||
"github.com/kataras/iris/v12"
|
||||
"github.com/kataras/iris/v12/cache"
|
||||
)
|
||||
|
||||
func main(){
|
||||
@@ -30,8 +30,8 @@ package cache
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/kataras/iris/cache/client"
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/iris/v12/cache/client"
|
||||
"github.com/kataras/iris/v12/context"
|
||||
)
|
||||
|
||||
// Cache accepts the cache expiration duration.
|
||||
|
||||
12
cache/cache_test.go
vendored
12
cache/cache_test.go
vendored
@@ -7,15 +7,15 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/kataras/iris/cache"
|
||||
"github.com/kataras/iris/cache/client"
|
||||
"github.com/kataras/iris/cache/client/rule"
|
||||
"github.com/kataras/iris/v12/cache"
|
||||
"github.com/kataras/iris/v12/cache/client"
|
||||
"github.com/kataras/iris/v12/cache/client/rule"
|
||||
|
||||
"github.com/kataras/iris"
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/iris/v12"
|
||||
"github.com/kataras/iris/v12/context"
|
||||
|
||||
"github.com/gavv/httpexpect"
|
||||
"github.com/kataras/iris/httptest"
|
||||
"github.com/kataras/iris/v12/httptest"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
8
cache/client/client.go
vendored
8
cache/client/client.go
vendored
@@ -6,10 +6,10 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/kataras/iris/cache/cfg"
|
||||
"github.com/kataras/iris/cache/client/rule"
|
||||
"github.com/kataras/iris/cache/uri"
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/iris/v12/cache/cfg"
|
||||
"github.com/kataras/iris/v12/cache/client/rule"
|
||||
"github.com/kataras/iris/v12/cache/uri"
|
||||
"github.com/kataras/iris/v12/context"
|
||||
)
|
||||
|
||||
// ClientHandler is the client-side handler
|
||||
|
||||
6
cache/client/handler.go
vendored
6
cache/client/handler.go
vendored
@@ -4,9 +4,9 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/kataras/iris/cache/client/rule"
|
||||
"github.com/kataras/iris/cache/entry"
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/iris/v12/cache/client/rule"
|
||||
"github.com/kataras/iris/v12/cache/entry"
|
||||
"github.com/kataras/iris/v12/context"
|
||||
)
|
||||
|
||||
// Handler the local cache service handler contains
|
||||
|
||||
2
cache/client/rule/chained.go
vendored
2
cache/client/rule/chained.go
vendored
@@ -1,7 +1,7 @@
|
||||
package rule
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/iris/v12/context"
|
||||
)
|
||||
|
||||
// chainedRule is a Rule with next Rule
|
||||
|
||||
2
cache/client/rule/conditional.go
vendored
2
cache/client/rule/conditional.go
vendored
@@ -1,7 +1,7 @@
|
||||
package rule
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/iris/v12/context"
|
||||
)
|
||||
|
||||
// Conditional is a Rule witch adds a predicate in order to its methods to execute
|
||||
|
||||
4
cache/client/rule/header.go
vendored
4
cache/client/rule/header.go
vendored
@@ -1,9 +1,9 @@
|
||||
package rule
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/iris/v12/context"
|
||||
|
||||
"github.com/kataras/iris/cache/ruleset"
|
||||
"github.com/kataras/iris/v12/cache/ruleset"
|
||||
)
|
||||
|
||||
// The HeaderPredicate should be alived on each of $package/rule BUT GOLANG DOESN'T SUPPORT type alias and I don't want to have so many copies around
|
||||
|
||||
2
cache/client/rule/not_satisfied.go
vendored
2
cache/client/rule/not_satisfied.go
vendored
@@ -1,7 +1,7 @@
|
||||
package rule
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/iris/v12/context"
|
||||
)
|
||||
|
||||
type notSatisfiedRule struct{}
|
||||
|
||||
2
cache/client/rule/rule.go
vendored
2
cache/client/rule/rule.go
vendored
@@ -1,7 +1,7 @@
|
||||
package rule
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/iris/v12/context"
|
||||
)
|
||||
|
||||
// Rule a superset of validators
|
||||
|
||||
2
cache/client/rule/satisfied.go
vendored
2
cache/client/rule/satisfied.go
vendored
@@ -1,7 +1,7 @@
|
||||
package rule
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/iris/v12/context"
|
||||
)
|
||||
|
||||
type satisfiedRule struct{}
|
||||
|
||||
2
cache/client/rule/validator.go
vendored
2
cache/client/rule/validator.go
vendored
@@ -1,7 +1,7 @@
|
||||
package rule
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/iris/v12/context"
|
||||
)
|
||||
|
||||
// Validators are introduced to implement the RFC about cache (https://tools.ietf.org/html/rfc7234#section-1.1).
|
||||
|
||||
8
cache/client/ruleset.go
vendored
8
cache/client/ruleset.go
vendored
@@ -1,10 +1,10 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris/cache/cfg"
|
||||
"github.com/kataras/iris/cache/client/rule"
|
||||
"github.com/kataras/iris/cache/ruleset"
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/iris/v12/cache/cfg"
|
||||
"github.com/kataras/iris/v12/cache/client/rule"
|
||||
"github.com/kataras/iris/v12/cache/ruleset"
|
||||
"github.com/kataras/iris/v12/context"
|
||||
)
|
||||
|
||||
// DefaultRuleSet is a list of the default pre-cache validators
|
||||
|
||||
2
cache/entry/entry.go
vendored
2
cache/entry/entry.go
vendored
@@ -3,7 +3,7 @@ package entry
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/kataras/iris/cache/cfg"
|
||||
"github.com/kataras/iris/v12/cache/cfg"
|
||||
)
|
||||
|
||||
// Entry is the cache entry
|
||||
|
||||
2
cache/uri/uribuilder.go
vendored
2
cache/uri/uribuilder.go
vendored
@@ -6,7 +6,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/kataras/iris/cache/cfg"
|
||||
"github.com/kataras/iris/v12/cache/cfg"
|
||||
)
|
||||
|
||||
// URIBuilder is the requested url builder
|
||||
|
||||
Reference in New Issue
Block a user