add connect / disconnect to adapters.

This commit is contained in:
Miroslav Šedivý
2020-12-06 18:11:11 +01:00
parent 6ca1e27f01
commit 35cd0f5270
6 changed files with 87 additions and 42 deletions

View File

@ -15,10 +15,13 @@ type MemberProfile struct {
}
type MembersDatabase interface {
Connect() error
Disconnect() error
Insert(id string, profile MemberProfile) error
Update(id string, profile MemberProfile) error
Delete(id string) error
Select() map[string]MemberProfile
Select() (map[string]MemberProfile, error)
}
type Session interface {
@ -48,6 +51,9 @@ type Session interface {
}
type SessionManager interface {
Connect() error
Disconnect() error
Create(id string, profile MemberProfile) (Session, error)
Update(id string, profile MemberProfile) error
Get(id string) (Session, bool)