2022-01-05 23:05:51 +08:00
|
|
|
package models
|
|
|
|
|
2022-01-16 07:16:44 +08:00
|
|
|
import "golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
|
|
|
|
2022-01-26 11:14:31 +08:00
|
|
|
// PeerUpdate - struct
|
2022-01-05 23:05:51 +08:00
|
|
|
type PeerUpdate struct {
|
2022-05-26 03:21:22 +08:00
|
|
|
Network string `json:"network" bson:"network" yaml:"network"`
|
|
|
|
ServerVersion string `json:"serverversion" bson:"serverversion" yaml:"serverversion"`
|
|
|
|
ServerAddrs []ServerAddr `json:"serveraddrs" bson:"serveraddrs" yaml:"serveraddrs"`
|
|
|
|
Peers []wgtypes.PeerConfig `json:"peers" bson:"peers" yaml:"peers"`
|
|
|
|
DNS string `json:"dns" bson:"dns" yaml:"dns"`
|
2022-09-14 03:25:56 +08:00
|
|
|
PeerIDs PeerMap `json:"peerids" bson:"peerids" yaml:"peerids"`
|
2022-01-05 23:05:51 +08:00
|
|
|
}
|
|
|
|
|
2022-01-26 11:14:31 +08:00
|
|
|
// KeyUpdate - key update struct
|
2022-01-05 23:05:51 +08:00
|
|
|
type KeyUpdate struct {
|
2022-01-26 11:14:31 +08:00
|
|
|
Network string `json:"network" bson:"network"`
|
|
|
|
Interface string `json:"interface" bson:"interface"`
|
2022-01-05 23:05:51 +08:00
|
|
|
}
|