db

package
v0.0.0-...-6e0db9a Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{}
View Source
var GlobalSessionCache = buildSessionCache()

Functions

func Connect

func Connect(config Config) (conn *pgx.Conn, err error)

func SetupTracing

func SetupTracing()

Types

type Config

type Config struct {
	Host     string
	Port     uint16
	User     string
	Password string
	Database string
}

type SessionCache

type SessionCache struct {
	// contains filtered or unexported fields
}

func (*SessionCache) SessionValid

func (s *SessionCache) SessionValid(key string) (bool, string)

func (*SessionCache) SetSession

func (s *SessionCache) SetSession(key, ID string, duration time.Duration)

type SessionRow

type SessionRow struct {
	Key        string
	UserID     string
	ValidUntil time.Time
}

func (*SessionRow) Expired

func (s *SessionRow) Expired() bool

Jump to

Keyboard shortcuts

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