WIP: Avoid reloads implementing Equals in structs

This commit is contained in:
Manuel de Brito Fontes 2017-06-14 17:33:12 -04:00
parent e9871ffaad
commit 75a4a61254
12 changed files with 701 additions and 11 deletions

View file

@ -51,3 +51,17 @@ type AuthSSLCert struct {
// PemSHA contains the SHA1 hash of the 'tls.crt' value
PemSHA string `json:"pemSha"`
}
func (asslc1 *AuthSSLCert) Equal(assl2 *AuthSSLCert) bool {
if asslc1.Secret != assl2.Secret {
return false
}
if asslc1.CAFileName != assl2.CAFileName {
return false
}
if asslc1.PemSHA != assl2.PemSHA {
return false
}
return true
}