mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-10-30 15:50:04 -04:00
25 lines
428 B
Go
25 lines
428 B
Go
|
package store
|
||
|
|
||
|
import (
|
||
|
"github.com/aclindsa/moneygo/internal/models"
|
||
|
)
|
||
|
|
||
|
type SessionStore interface {
|
||
|
InsertSession(session *models.Session) error
|
||
|
GetSession(secret string) (*models.Session, error)
|
||
|
SessionExists(secret string) (bool, error)
|
||
|
DeleteSession(session *models.Session) error
|
||
|
}
|
||
|
|
||
|
type Tx interface {
|
||
|
Commit() error
|
||
|
Rollback() error
|
||
|
|
||
|
SessionStore
|
||
|
}
|
||
|
|
||
|
type Store interface {
|
||
|
Begin() (Tx, error)
|
||
|
Close() error
|
||
|
}
|