Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swithek/sessionup-pgstore
PostgreSQL session store implementation for sessionup
https://github.com/swithek/sessionup-pgstore
Last synced: 6 days 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-16T14:59:54.000Z (about 5 years ago)
- Last Synced: 2023-08-13T08:17:08.505Z (over 1 year 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
[![Build status](https://travis-ci.org/swithek/sessionup-pgstore.svg?branch=master)](https://travis-ci.org/swithek/sessionup-pgstore)
[![Go Report Card](https://goreportcard.com/badge/github.com/swithek/sessionup-pgstore)](https://goreportcard.com/report/github.com/swithek/sessionup-pgstore)
[![GoDoc](https://godoc.org/github.com/swithek/sessionup-pgstore?status.png)](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)
```