comparison auth/persistent.go @ 190:3457a60fb12d

Added stub for a persistent session store.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 20 Jul 2018 17:11:57 +0200
parents
children 1585c334e8a7
comparison
equal deleted inserted replaced
189:96bb671cdd98 190:3457a60fb12d
1 package auth
2
3 import (
4 "database/sql"
5 "log"
6 )
7
8 type PersistentConnectionPool struct {
9 filename string
10 }
11
12 func NewPersistentConnectionPool(filename string) (*PersistentConnectionPool, error) {
13
14 log.Println("NewInMemoryConnectionPool: Not implemented, yet.")
15 pcp := &PersistentConnectionPool{
16 filename: filename,
17 }
18 return pcp, nil
19 }
20
21 func (pcp *PersistentConnectionPool) Delete(token string) bool {
22 log.Println("Delete: Not implemented, yet.")
23 return false
24 }
25
26 func (pcp *PersistentConnectionPool) Add(token string, session *Session) *Connection {
27 log.Println("Add: Not implemented, yet.")
28 return nil
29 }
30
31 func (pcp *PersistentConnectionPool) Renew(token string) (string, error) {
32 log.Println("Renew: Not implemented, yet.")
33 return "", nil
34 }
35
36 func (pcp *PersistentConnectionPool) Do(token string, fn func(*sql.DB) error) error {
37 log.Println("Do: Not implemented, yet.")
38 return nil
39 }
40
41 func (pcp *PersistentConnectionPool) Session(token string) *Session {
42 log.Println("Session: Not implemented, yet.")
43 return nil
44 }
45
46 func (pcp *PersistentConnectionPool) Shutdown() error {
47 log.Println("Shutdown: Not implemented, yet.")
48 return nil
49 }