Rename package and update documentation
This commit is contained in:
parent
272018cf22
commit
cb19905ec5
|
@ -1,7 +1,9 @@
|
||||||
# pgstore
|
# pgstorex
|
||||||
|
|
||||||
A session store backend for [gorilla/sessions](http://www.gorillatoolkit.org/pkg/sessions) - [src](https://github.com/gorilla/sessions).
|
A session store backend for [gorilla/sessions](http://www.gorillatoolkit.org/pkg/sessions) - [src](https://github.com/gorilla/sessions).
|
||||||
|
|
||||||
|
100% based on pgstore
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
make get-deps
|
make get-deps
|
||||||
|
@ -23,13 +25,13 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/antonlindstrom/pgstore"
|
"gitto.work/shortcut/pgstorex"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ExampleHandler is an example that displays the usage of PGStore.
|
// ExampleHandler is an example that displays the usage of PGStore.
|
||||||
func ExampleHandler(w http.ResponseWriter, r *http.Request) {
|
func ExampleHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
// Fetch new store.
|
// Fetch new store.
|
||||||
store, err := pgstore.NewPGStore("postgres://user:password@127.0.0.1:5432/database?sslmode=verify-full", []byte("secret-key"))
|
store, err := pgstorex.NewPGStore("postgres://user:password@127.0.0.1:5432/database?sslmode=verify-full", []byte("secret-key"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf(err.Error())
|
log.Fatalf(err.Error())
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,13 +5,13 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/antonlindstrom/pgstore"
|
"gitto.work/shortcut/pgstorex"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ExampleHandler is an example that displays the usage of PGStore.
|
// ExampleHandler is an example that displays the usage of PGStore.
|
||||||
func ExampleHandler(w http.ResponseWriter, r *http.Request) {
|
func ExampleHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
// Fetch new store.
|
// Fetch new store.
|
||||||
store, err := pgstore.NewPGStore("postgres://user:password@127.0.0.1:5432/database?sslmode=verify-full", []byte("secret-key"))
|
store, err := pgstorex.NewPGStore("postgres://user:password@127.0.0.1:5432/database?sslmode=verify-full", []byte("secret-key"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf(err.Error())
|
log.Fatalf(err.Error())
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package pgstore
|
package pgstorex
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package pgstore
|
package pgstorex
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
|
Loading…
Reference in New Issue