Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)
```