https://github.com/swithek/sessionup-pgstore
PostgreSQL session store implementation for sessionup
https://github.com/swithek/sessionup-pgstore
Last synced: 5 months ago
JSON representation
PostgreSQL session store implementation for sessionup
- Host: GitHub
- URL: https://github.com/swithek/sessionup-pgstore
- Owner: swithek
- License: mit
- Created: 2019-07-30T07:42:35.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-16T14:59:54.000Z (almost 6 years ago)
- Last Synced: 2024-12-28T15:29:19.736Z (6 months ago)
- Language: Go
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sessionup-pgstore
[](https://travis-ci.org/swithek/sessionup-pgstore)
[](https://goreportcard.com/report/github.com/swithek/sessionup-pgstore)
[](https://godoc.org/github.com/swithek/sessionup-pgstore)PostgreSQL session store implementation for [sessionup](https://github.com/swithek/sessionup)
## Installation
```
go get github.com/swithek/sessionup-pgstore
```## Usage
Create and activate a new PgStore:
```go
db, err := sql.Open("postgres", "...")
if err != nil {
// handle error
}store, err := pgstore.New(db, "sessions", time.Minute * 5)
if err != nil {
// handle error
}manager := sessionup.NewManager(store)
```