From 266ff8670244da288aec937320d9eecc7996af35 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 21 Sep 2017 04:13:34 -0500 Subject: remove more global refs (#7480) --- einterfaces/account_migration.go | 10 ---------- einterfaces/cluster.go | 10 ---------- einterfaces/compliance.go | 10 ---------- einterfaces/ldap.go | 10 ---------- einterfaces/metrics.go | 10 ---------- einterfaces/mfa.go | 10 ---------- einterfaces/saml.go | 10 ---------- 7 files changed, 70 deletions(-) (limited to 'einterfaces') diff --git a/einterfaces/account_migration.go b/einterfaces/account_migration.go index 4c76ad712..0db516d75 100644 --- a/einterfaces/account_migration.go +++ b/einterfaces/account_migration.go @@ -8,13 +8,3 @@ import "github.com/mattermost/mattermost-server/model" type AccountMigrationInterface interface { MigrateToLdap(fromAuthService string, forignUserFieldNameToMatch string, force bool) *model.AppError } - -var theAccountMigrationInterface AccountMigrationInterface - -func RegisterAccountMigrationInterface(newInterface AccountMigrationInterface) { - theAccountMigrationInterface = newInterface -} - -func GetAccountMigrationInterface() AccountMigrationInterface { - return theAccountMigrationInterface -} diff --git a/einterfaces/cluster.go b/einterfaces/cluster.go index 8b9ef1a2d..b5ef4772a 100644 --- a/einterfaces/cluster.go +++ b/einterfaces/cluster.go @@ -23,13 +23,3 @@ type ClusterInterface interface { GetLogs(page, perPage int) ([]string, *model.AppError) ConfigChanged(previousConfig *model.Config, newConfig *model.Config, sendToOtherServer bool) *model.AppError } - -var theClusterInterface ClusterInterface - -func RegisterClusterInterface(newInterface ClusterInterface) { - theClusterInterface = newInterface -} - -func GetClusterInterface() ClusterInterface { - return theClusterInterface -} diff --git a/einterfaces/compliance.go b/einterfaces/compliance.go index 0a624b2dc..14927bee4 100644 --- a/einterfaces/compliance.go +++ b/einterfaces/compliance.go @@ -11,13 +11,3 @@ type ComplianceInterface interface { StartComplianceDailyJob() RunComplianceJob(job *model.Compliance) *model.AppError } - -var theComplianceInterface ComplianceInterface - -func RegisterComplianceInterface(newInterface ComplianceInterface) { - theComplianceInterface = newInterface -} - -func GetComplianceInterface() ComplianceInterface { - return theComplianceInterface -} diff --git a/einterfaces/ldap.go b/einterfaces/ldap.go index 929911966..a69f9cbe1 100644 --- a/einterfaces/ldap.go +++ b/einterfaces/ldap.go @@ -20,13 +20,3 @@ type LdapInterface interface { RunTest() *model.AppError GetAllLdapUsers() ([]*model.User, *model.AppError) } - -var theLdapInterface LdapInterface - -func RegisterLdapInterface(newInterface LdapInterface) { - theLdapInterface = newInterface -} - -func GetLdapInterface() LdapInterface { - return theLdapInterface -} diff --git a/einterfaces/metrics.go b/einterfaces/metrics.go index e1ef9c15e..58a803067 100644 --- a/einterfaces/metrics.go +++ b/einterfaces/metrics.go @@ -38,13 +38,3 @@ type MetricsInterface interface { AddMemCacheHitCounter(cacheName string, amount float64) AddMemCacheMissCounter(cacheName string, amount float64) } - -var theMetricsInterface MetricsInterface - -func RegisterMetricsInterface(newInterface MetricsInterface) { - theMetricsInterface = newInterface -} - -func GetMetricsInterface() MetricsInterface { - return theMetricsInterface -} diff --git a/einterfaces/mfa.go b/einterfaces/mfa.go index eb31fb914..3afe961e3 100644 --- a/einterfaces/mfa.go +++ b/einterfaces/mfa.go @@ -13,13 +13,3 @@ type MfaInterface interface { Deactivate(userId string) *model.AppError ValidateToken(secret, token string) (bool, *model.AppError) } - -var theMfaInterface MfaInterface - -func RegisterMfaInterface(newInterface MfaInterface) { - theMfaInterface = newInterface -} - -func GetMfaInterface() MfaInterface { - return theMfaInterface -} diff --git a/einterfaces/saml.go b/einterfaces/saml.go index df9207d67..833a3d43f 100644 --- a/einterfaces/saml.go +++ b/einterfaces/saml.go @@ -13,13 +13,3 @@ type SamlInterface interface { DoLogin(encodedXML string, relayState map[string]string) (*model.User, *model.AppError) GetMetadata() (string, *model.AppError) } - -var theSamlInterface SamlInterface - -func RegisterSamlInterface(newInterface SamlInterface) { - theSamlInterface = newInterface -} - -func GetSamlInterface() SamlInterface { - return theSamlInterface -} -- cgit v1.2.3-1-g7c22