mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-23 19:42:57 +03:00
Abstracts database storage & Status page UI (#88)
This commit is contained in:
parent
7bb80c0c2e
commit
b7c0990dcb
14 changed files with 456 additions and 256 deletions
19
store/store.go
Normal file
19
store/store.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package store
|
||||
|
||||
import (
|
||||
"github.com/ngoduykhanh/wireguard-ui/model"
|
||||
)
|
||||
|
||||
type IStore interface {
|
||||
Init() error
|
||||
GetUser() (model.User, error)
|
||||
GetGlobalSettings() (model.GlobalSetting, error)
|
||||
GetServer() (model.Server, error)
|
||||
GetClients(hasQRCode bool) ([]model.ClientData, error)
|
||||
GetClientByID(clientID string, hasQRCode bool) (model.ClientData, error)
|
||||
SaveClient(client model.Client) error
|
||||
DeleteClient(clientID string) error
|
||||
SaveServerInterface(serverInterface model.ServerInterface) error
|
||||
SaveServerKeyPair(serverKeyPair model.ServerKeypair) error
|
||||
SaveGlobalSettings(globalSettings model.GlobalSetting) error
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue