2021-08-28 15:10:30 +02:00
|
|
|
package store
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/ngoduykhanh/wireguard-ui/model"
|
|
|
|
)
|
|
|
|
|
|
|
|
type IStore interface {
|
|
|
|
Init() error
|
|
|
|
GetUser() (model.User, error)
|
2022-12-21 21:52:00 +01:00
|
|
|
SaveUser(user model.User) error
|
2021-08-28 15:10:30 +02:00
|
|
|
GetGlobalSettings() (model.GlobalSetting, error)
|
|
|
|
GetServer() (model.Server, error)
|
|
|
|
GetClients(hasQRCode bool) ([]model.ClientData, error)
|
2022-12-02 23:40:29 +01:00
|
|
|
GetClientByID(clientID string, qrCode model.QRCodeSettings) (model.ClientData, error)
|
2021-08-28 15:10:30 +02:00
|
|
|
SaveClient(client model.Client) error
|
|
|
|
DeleteClient(clientID string) error
|
|
|
|
SaveServerInterface(serverInterface model.ServerInterface) error
|
|
|
|
SaveServerKeyPair(serverKeyPair model.ServerKeypair) error
|
|
|
|
SaveGlobalSettings(globalSettings model.GlobalSetting) error
|
2022-03-20 10:03:27 +01:00
|
|
|
GetWakeOnLanHosts() ([]model.WakeOnLanHost, error)
|
|
|
|
GetWakeOnLanHost(macAddress string) (*model.WakeOnLanHost, error)
|
|
|
|
DeleteWakeOnHostLanHost(macAddress string) error
|
|
|
|
SaveWakeOnLanHost(host model.WakeOnLanHost) error
|
|
|
|
DeleteWakeOnHost(host model.WakeOnLanHost) error
|
2021-08-28 15:10:30 +02:00
|
|
|
}
|