Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

pgstore

> 数据库
Open source

A Postgres session store backend for gorilla/sessions

100 stars0 likes1 views
WebsiteGitHub

About

A Postgres session store backend for gorilla/sessions

pgstore

A session store backend for gorilla/sessions - src.

Installation

make get-deps

Documentation

Available on godoc.org.

See http://www.gorillatoolkit.org/pkg/sessions for full documentation on underlying interface.

Example

…

Breaking changes

  • 2016-07-19 - NewPGStore and NewPGStoreFromPool now returns (*PGStore, error)

Thanks

I've stolen, borrowed and gotten inspiration from the other backends available:

  • redistore
  • mysqlstore
  • babou dbstore

Thank you all for sharing your code!

What makes this backend different is that it's for PostgreSQL.

We've recently refactored this backend to use the standard database/sql driver instead of Gorp. This removes a dependency and makes this package very lightweight and makes database interactions very transparent. Lastly, from the standpoint of unit testing where you want to mock the database layer instead of requiring a real database, you can now easily use a package like go-SQLMock to do just that.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gogogorillapostgressessions

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库