diff --git a/apps/provider-scaffold/template/provider/provider.go.template b/apps/provider-scaffold/template/provider/provider.go.template index 7ae5c80d56..c62e8ed90a 100644 --- a/apps/provider-scaffold/template/provider/provider.go.template +++ b/apps/provider-scaffold/template/provider/provider.go.template @@ -4,7 +4,7 @@ import ( "errors" "strconv" - "google.golang.org/protobuf/types/known/emptypb" + "google.golang.org/protobuf/types/known/emptypb" "go.mondoo.com/cnquery/llx" "go.mondoo.com/cnquery/providers-sdk/v1/inventory" "go.mondoo.com/cnquery/providers-sdk/v1/plugin" @@ -70,6 +70,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/arista/provider/provider.go b/providers/arista/provider/provider.go index 06144b26e4..f1f2cdc097 100644 --- a/providers/arista/provider/provider.go +++ b/providers/arista/provider/provider.go @@ -110,6 +110,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/azure/provider/provider.go b/providers/azure/provider/provider.go index 7b25dd2cb2..10bead66bc 100644 --- a/providers/azure/provider/provider.go +++ b/providers/azure/provider/provider.go @@ -132,6 +132,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/core/provider/provider.go b/providers/core/provider/provider.go index de7b495683..7bc0376494 100644 --- a/providers/core/provider/provider.go +++ b/providers/core/provider/provider.go @@ -70,6 +70,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/equinix/provider/provider.go b/providers/equinix/provider/provider.go index 4fc7b50cbb..e28341713b 100644 --- a/providers/equinix/provider/provider.go +++ b/providers/equinix/provider/provider.go @@ -102,6 +102,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/gcp/provider/provider.go b/providers/gcp/provider/provider.go index 986ac80d93..62d3c334df 100644 --- a/providers/gcp/provider/provider.go +++ b/providers/gcp/provider/provider.go @@ -161,6 +161,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/github/provider/provider.go b/providers/github/provider/provider.go index 53a82f932f..cbb3382fff 100644 --- a/providers/github/provider/provider.go +++ b/providers/github/provider/provider.go @@ -100,6 +100,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/gitlab/provider/provider.go b/providers/gitlab/provider/provider.go index a1be28e0fe..5eb3e3af19 100644 --- a/providers/gitlab/provider/provider.go +++ b/providers/gitlab/provider/provider.go @@ -97,6 +97,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/google-workspace/provider/provider.go b/providers/google-workspace/provider/provider.go index d23f873be7..b114bae7fe 100644 --- a/providers/google-workspace/provider/provider.go +++ b/providers/google-workspace/provider/provider.go @@ -153,6 +153,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/ipmi/provider/provider.go b/providers/ipmi/provider/provider.go index 02c5a582cf..c824255c62 100644 --- a/providers/ipmi/provider/provider.go +++ b/providers/ipmi/provider/provider.go @@ -111,6 +111,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/k8s/provider/provider.go b/providers/k8s/provider/provider.go index 04861dc945..1fb132e4b9 100644 --- a/providers/k8s/provider/provider.go +++ b/providers/k8s/provider/provider.go @@ -125,6 +125,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/ms365/provider/provider.go b/providers/ms365/provider/provider.go index b1e0003da0..d2e9ba8cf7 100644 --- a/providers/ms365/provider/provider.go +++ b/providers/ms365/provider/provider.go @@ -104,6 +104,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/network/provider/provider.go b/providers/network/provider/provider.go index 2139f4d184..a100a6e503 100644 --- a/providers/network/provider/provider.go +++ b/providers/network/provider/provider.go @@ -111,6 +111,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/oci/provider/provider.go b/providers/oci/provider/provider.go index 0c0601367b..7382020327 100644 --- a/providers/oci/provider/provider.go +++ b/providers/oci/provider/provider.go @@ -130,6 +130,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/okta/provider/provider.go b/providers/okta/provider/provider.go index 224e326bf3..d6161da186 100644 --- a/providers/okta/provider/provider.go +++ b/providers/okta/provider/provider.go @@ -110,6 +110,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/opcua/provider/provider.go b/providers/opcua/provider/provider.go index 27311c81d8..b04a7acad5 100644 --- a/providers/opcua/provider/provider.go +++ b/providers/opcua/provider/provider.go @@ -86,6 +86,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/os/provider/provider.go b/providers/os/provider/provider.go index 40cf08b850..18a4b504a8 100644 --- a/providers/os/provider/provider.go +++ b/providers/os/provider/provider.go @@ -223,6 +223,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/slack/provider/provider.go b/providers/slack/provider/provider.go index 07fd1e2018..8bee2aa605 100644 --- a/providers/slack/provider/provider.go +++ b/providers/slack/provider/provider.go @@ -87,6 +87,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/terraform/provider/provider.go b/providers/terraform/provider/provider.go index cc07652805..21eba3a435 100644 --- a/providers/terraform/provider/provider.go +++ b/providers/terraform/provider/provider.go @@ -117,6 +117,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/vcd/provider/provider.go b/providers/vcd/provider/provider.go index 1dfa6b47b9..184c47cd2b 100644 --- a/providers/vcd/provider/provider.go +++ b/providers/vcd/provider/provider.go @@ -100,6 +100,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil } diff --git a/providers/vsphere/provider/provider.go b/providers/vsphere/provider/provider.go index a6eec2dff6..c0817eaea6 100644 --- a/providers/vsphere/provider/provider.go +++ b/providers/vsphere/provider/provider.go @@ -113,6 +113,9 @@ func (s *Service) Connect(req *plugin.ConnectReq, callback plugin.ProviderCallba }, nil } +// Disconnect is automatically called when the shell closes. +// It is not necessary to implement this method. +// If you want to do some cleanup, you can do it here. func (s *Service) Disconnect(req *emptypb.Empty) error { return nil }