Documentation
¶
Overview ¶
Package postgres has a storage provider that uses a PostgreSQL database table.
The database table is expected to have the following structure:
create table <table_name>( id character varying(255) primary key, version integer null, expires_at timestamp with time zone null, format character varying null, data bytea null )
Index ¶
- type Provider
- func (db *Provider) CreateTable() error
- func (db *Provider) Delete(ctx context.Context, id string) error
- func (db *Provider) DropTable() error
- func (db *Provider) Fetch(ctx context.Context, id string) (*storage.Record, error)
- func (db *Provider) Purge(ctx context.Context) error
- func (db *Provider) Save(ctx context.Context, rec *storage.Record, oldVersion int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider provides storage for sessions using a PostgreSQL table. It implements the storage.Provider interface.
The structure of the SQL table is described in the package comment.
func (*Provider) CreateTable ¶
CreateTable creates the dynamodb table.
Click to show internal directories.
Click to hide internal directories.