managers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2018 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MailMgr

type MailMgr interface {
	SendMail(to string, subject string, data string) error
}

func NewMailMgrNULL

func NewMailMgrNULL() MailMgr

func NewMailMgrSMTP

func NewMailMgrSMTP(server, user, pass, from string) MailMgr

func NewMailMgrSparkpost

func NewMailMgrSparkpost(key, from string) MailMgr

type Session

type Session struct {
	Id           string    `json:"id" scaneo:"pk"`
	User         string    `json:"user"`
	Agent        string    `json:"agent"`
	RequiresCSRF bool      `json:"csrf_required"`
	LastAccess   time.Time `json:"last_access"`
	StoreToken   string    `json:"-"`
}

type SessionMgr

type SessionMgr interface {
	NewSession(userId string, agent string, csrf bool) (*Session, error)
	UpdateSession(id, agent string) (*Session, error)
	GetSession(id string) (*Session, error)
	DeleteSession(id string) error
	GetAllSessions(userId string) ([]*Session, error)
	DeleteAllSessions(userId string) error
}

func NewSessionMgrDB

func NewSessionMgrDB(dbp *sql.DB) SessionMgr

func NewSessionMgrRedis

func NewSessionMgrRedis(connUrl string, dbId int) (SessionMgr, error)

Jump to

Keyboard shortcuts

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