databases

package
v0.0.0-...-fc827b4 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidMysqlClient = errors.New("invalid mysql client")
	ErrInvalidCookieStore = errors.New("invalid cookie store")
)

Functions

This section is empty.

Types

type DatabaseManager

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

func NewDatabaseManager

func NewDatabaseManager(
	mysqlDsn string,
	sessionName string,
	sessionSecret string,
	sshClient *ssh.Client,
) *DatabaseManager

func (*DatabaseManager) MustGetMysqlClient

func (m *DatabaseManager) MustGetMysqlClient() *sql.DB

func (*DatabaseManager) MustGetSessionStore

func (m *DatabaseManager) MustGetSessionStore() *SessionStore

type SessionStore

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

func NewSessionStore

func NewSessionStore(sessionName string, sessionSecret string) *SessionStore

func (*SessionStore) Session

func (ss *SessionStore) Session(r *http.Request) (*sessions.Session, error)

Jump to

Keyboard shortcuts

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