mirror of
https://github.com/grafana/grafana.git
synced 2025-01-09 23:53:25 -06:00
31 lines
608 B
Go
31 lines
608 B
Go
package azcredentials
|
|
|
|
const (
|
|
AzureAuthManagedIdentity = "msi"
|
|
AzureAuthClientSecret = "clientsecret"
|
|
)
|
|
|
|
type AzureCredentials interface {
|
|
AzureAuthType() string
|
|
}
|
|
|
|
type AzureManagedIdentityCredentials struct {
|
|
ClientId string
|
|
}
|
|
|
|
type AzureClientSecretCredentials struct {
|
|
AzureCloud string
|
|
Authority string
|
|
TenantId string
|
|
ClientId string
|
|
ClientSecret string
|
|
}
|
|
|
|
func (credentials *AzureManagedIdentityCredentials) AzureAuthType() string {
|
|
return AzureAuthManagedIdentity
|
|
}
|
|
|
|
func (credentials *AzureClientSecretCredentials) AzureAuthType() string {
|
|
return AzureAuthClientSecret
|
|
}
|