From 4fdc455bc72cac7af2c7521272a8969611e1069c Mon Sep 17 00:00:00 2001 From: Michel Wohlert Date: Tue, 20 Aug 2019 03:22:19 +0200 Subject: [PATCH] Added connection delete --- Connection.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Connection.go b/Connection.go index 692def0..d43bf72 100644 --- a/Connection.go +++ b/Connection.go @@ -10,6 +10,8 @@ const ( ConnectionInterface = SettingsInterface + ".Connection" ConnectionGetSettings = ConnectionInterface + ".GetSettings" + + ConnectionDelete = ConnectionInterface + ".Delete" ) //type ConnectionSettings map[string]map[string]interface{} @@ -24,6 +26,9 @@ type Connection interface { // separately using the GetSecrets() call. GetSettings() ConnectionSettings + // Delete will delete the connection + Delete() + MarshalJSON() ([]byte, error) } @@ -57,6 +62,10 @@ func (c *connection) GetSettings() ConnectionSettings { return rv } +func (c *connection) Delete() { + c.call(c.GetPath(), ConnectionDelete) +} + func (c *connection) MarshalJSON() ([]byte, error) { return json.Marshal(c.GetSettings()) }