added host pull model, made API

This commit is contained in:
0xdcarns
2023-03-22 14:47:13 -04:00
parent d3a7e704f2
commit 63eac1e79c
4 changed files with 67 additions and 7 deletions

View File

@@ -198,6 +198,14 @@ type TrafficKeys struct {
Server []byte `json:"server" bson:"server" yaml:"server"`
}
// HostPull - response of a host's pull
type HostPull struct {
Host Host `json:"host" yaml:"host"`
Peers []wgtypes.PeerConfig `json:"peers" yaml:"peers"`
ServerConfig ServerConfig `json:"server_config" yaml:"server_config"`
PeerIDs PeerMap `json:"peer_ids,omitempty" yaml:"peer_ids,omitempty"`
}
// NodeGet - struct for a single node get response
type NodeGet struct {
Node Node `json:"node" bson:"node" yaml:"node"`