github.com/caos/orbos@v1.5.14-0.20221103111702-e6cd0cea7ad4/internal/operator/boom/api/v1beta1/grafana/auth/Google/google.go (about)

     1  package google
     2  
     3  import (
     4  	secret2 "github.com/caos/orbos/pkg/secret"
     5  )
     6  
     7  type Auth struct {
     8  	ClientID *secret2.Secret `json:"clientID,omitempty" yaml:"clientID,omitempty"`
     9  	//Existing secret with the clientID
    10  	ExistingClientIDSecret *secret2.Existing `json:"existingClientIDSecret,omitempty" yaml:"existingClientIDSecret,omitempty"`
    11  	ClientSecret           *secret2.Secret   `json:"clientSecret,omitempty" yaml:"clientSecret,omitempty"`
    12  	//Existing secret with the clientSecret
    13  	ExistingClientSecretSecret *secret2.Existing `json:"existingClientSecretSecret,omitempty" yaml:"existingClientSecretSecret,omitempty"`
    14  	//Domains allowed to login
    15  	AllowedDomains []string `json:"allowedDomains,omitempty" yaml:"allowedDomains,omitempty"`
    16  }
    17  
    18  func (a *Auth) IsZero() bool {
    19  	if (a.ClientID == nil || a.ClientID.IsZero()) &&
    20  		(a.ClientSecret == nil || a.ClientSecret.IsZero()) &&
    21  		a.ExistingClientIDSecret == nil &&
    22  		a.ExistingClientSecretSecret == nil &&
    23  		a.AllowedDomains == nil {
    24  		return true
    25  	}
    26  
    27  	return false
    28  }