From a808fd72348d98eb67ab7027d536a8e65b74726b Mon Sep 17 00:00:00 2001 From: Simon Lukasik Date: Sat, 2 Oct 2021 14:55:57 +0200 Subject: [PATCH] Allow CloudType to be easily converted to string --- falcon/cloud.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/falcon/cloud.go b/falcon/cloud.go index 77b6ad0f..67783681 100644 --- a/falcon/cloud.go +++ b/falcon/cloud.go @@ -53,3 +53,18 @@ func (c CloudType) Host() string { return "api.laggar.gcw.crowdstrike.com" } } + +func (c CloudType) String() string { + switch c { + case CloudUs1: + return "us-1" + case CloudUs2: + return "us-2" + case CloudEu1: + return "eu-1" + case CloudUsGov1: + return "us-gov-1" + default: + return "UNKNOWN FALCON CLOUD REGION" + } +}