Fix RegisterDevice signature
diff --git a/core/vpn/in_memory_manager.go b/core/vpn/in_memory_manager.go
index ea9e04b..85f9a5b 100644
--- a/core/vpn/in_memory_manager.go
+++ b/core/vpn/in_memory_manager.go
@@ -20,7 +20,7 @@
ipm IPManager
}
-func NewInMemoryManager(ipm IPManager) *InMemoryManager {
+func NewInMemoryManager(ipm IPManager) Manager {
return &InMemoryManager{
devices: make([]*types.DeviceInfo, 0),
keyToDevices: make(map[types.PublicKey]*types.DeviceInfo),
diff --git a/core/vpn/manager.go b/core/vpn/manager.go
index 7919393..a9a1f66 100644
--- a/core/vpn/manager.go
+++ b/core/vpn/manager.go
@@ -9,11 +9,11 @@
// Manager interface manages mesh VPN configuration for all the devices registed by all users.
// It does enforce device to device ACLs but delegates user authorization to the client.
type Manager interface {
- // Registers new device with given public key and name.
+ // Registers new device..
// Returns VPN network configuration on success and error otherwise.
// By default new devices have access to other machines owned by the same user
// and a PCloud entrypoint.
- RegisterDevice(name string, pubKey types.PublicKey) (*types.NetworkMap, error)
+ RegisterDevice(d types.DeviceInfo) (*types.NetworkMap, error)
// Completely removes device with given public key from the network.
RemoveDevice(pubKey types.PublicKey) error
// Returns network configuration for a device with give public key.