-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: resource groups and domain endpoints * chore: feedback * fix: return proper http codes * feat: store kubefirst pro flag and cluster secret reference creation * chore: go mod tidy * feat: remove resource groups endpoint * chore: remove empty line * chore: fix unrelated linting issues
- Loading branch information
1 parent
ed85444
commit b04a85f
Showing
10 changed files
with
104 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package types | ||
|
||
import "fmt" | ||
|
||
// AzureAuth holds necessary auth credentials for interacting with azure | ||
type AzureAuth struct { | ||
ClientID string `bson:"client_id" json:"client_id"` | ||
ClientSecret string `bson:"client_secret" json:"client_secret"` | ||
TenantID string `bson:"tenant_id" json:"tenant_id"` | ||
SubscriptionID string `bson:"subscription_id" json:"subscription_id"` | ||
} | ||
|
||
func (auth *AzureAuth) ValidateAuthCredentials() error { | ||
if auth.ClientID == "" || | ||
auth.ClientSecret == "" || | ||
auth.SubscriptionID == "" || | ||
auth.TenantID == "" { | ||
return fmt.Errorf("missing authentication credentials in request, please check and try again") | ||
} | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters