postgres

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initer

func Initer() session.Initer

Initer returns the session.Initer for the Postgres session store.

Types

type Config

type Config struct {

	// Lifetime is the duration to have no access to a session before being
	// recycled. Default is 3600 seconds.
	Lifetime time.Duration
	// DSN is the database source name to the Postgres.
	DSN string
	// Table is the table name for storing session data. Default is "sessions".
	Table string
	// Encoder is the encoder to encode session data. Default is session.GobEncoder.
	Encoder session.Encoder
	// Decoder is the decoder to decode session data. Default is session.GobDecoder.
	Decoder session.Decoder
	// InitTable indicates whether to create a default session table when not exists automatically.
	InitTable bool
	// contains filtered or unexported fields
}

Config contains options for the Postgres session store.

Jump to

Keyboard shortcuts

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