Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
pgstore
✓ github.com/antonlindstrom/pgstore
Use PostgreSQL as a session store for Gorilla sessions.
package main
import (
"github.com/antonlindstrom/pgstore"
"net/http"
)
func main() {
store, _ := pgstore.NewPGStore("postgres://user:pass@localhost/dbname", []byte("secret-key"))
defer store.Close()
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
session, _ := store.Get(r, "session-name")
session.Values["foo"] = "bar"
session.Save(r, w)
})
http.ListenAndServe(":8080", nil)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20220421113606-e3a6e3fed12alatest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.