28 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Go
		
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Go
		
	
	
	
| package store
 | |
| 
 | |
| import (
 | |
| 	"github.com/ngoduykhanh/wireguard-ui/model"
 | |
| )
 | |
| 
 | |
| type IStore interface {
 | |
| 	Init() error
 | |
| 	GetUser() (model.User, error)
 | |
| 	SaveUser(user model.User) error
 | |
| 	GetGlobalSettings() (model.GlobalSetting, error)
 | |
| 	GetEmailSettings() (model.EmailSetting, error)
 | |
| 	GetServer() (model.Server, error)
 | |
| 	GetClients(hasQRCode bool) ([]model.ClientData, error)
 | |
| 	GetClientByID(clientID string, qrCode model.QRCodeSettings) (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
 | |
| 	SaveEmailSettings(emailSettings model.EmailSetting) error
 | |
| 	GetWakeOnLanHosts() ([]model.WakeOnLanHost, error)
 | |
| 	GetWakeOnLanHost(macAddress string) (*model.WakeOnLanHost, error)
 | |
| 	DeleteWakeOnHostLanHost(macAddress string) error
 | |
| 	SaveWakeOnLanHost(host model.WakeOnLanHost) error
 | |
| 	DeleteWakeOnHost(host model.WakeOnLanHost) error
 | |
| }
 |