pqstore

package
v1.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

README

SessionStore implementation with PostgreSQL

Usage

import "github.com/go-osin/session/pqstore"
import "github.com/go-osin/session"

	var smgr session.Manager
	var store session.Store

	store = pqstore.NewStoreOptions(&pqstore.StoreOptions{
		DSN: "host=localhost dbname=ssotest user=sso sslmode=disable" // or "postgresql://sso@localhost/ssotest?sslmode=disable"
	})
	smgr = session.NewCookieManagerOptions(store, &session.CookieMngrOptions{
		SessIDCookieName: SessionIDCookieName,
		AllowHTTP:        true,
	})


Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStore

func NewStore() session.Store

NewStore return instance with default Option

func NewStoreOptions

func NewStoreOptions(o *StoreOptions) session.Store

NewStoreOptions return instance with special option

Types

type StoreOptions

type StoreOptions struct {
	DSN   string
	Codec *codec.Codec
}

StoreOptions ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL