mirror of
https://github.com/number571/hes.git
synced 2026-09-13 18:45:45 +05:00
37 lines
509 B
Go
37 lines
509 B
Go
package main
|
|
|
|
import (
|
|
"database/sql"
|
|
"sync"
|
|
|
|
_ "github.com/mattn/go-sqlite3"
|
|
cr "github.com/number571/go-peer/crypto"
|
|
)
|
|
|
|
type DB struct {
|
|
ptr *sql.DB
|
|
mtx sync.Mutex
|
|
}
|
|
|
|
type Sessions struct {
|
|
mpn map[string]*sessionData
|
|
mtx sync.Mutex
|
|
}
|
|
|
|
type User struct {
|
|
Id int
|
|
Name string
|
|
Pasw []byte
|
|
Priv cr.PrivKey
|
|
}
|
|
|
|
type Email struct {
|
|
Id int
|
|
SenderName string
|
|
SenderPubl string
|
|
Head string
|
|
Body string
|
|
Hash string
|
|
Time string
|
|
}
|