gitea源码

assert_interface_test.go 625B

123456789101112131415161718192021222324
  1. // Copyright 2021 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package smtp_test
  4. import (
  5. auth_model "code.gitea.io/gitea/models/auth"
  6. "code.gitea.io/gitea/services/auth"
  7. "code.gitea.io/gitea/services/auth/source/smtp"
  8. )
  9. // This test file exists to assert that our Source exposes the interfaces that we expect
  10. // It tightly binds the interfaces and implementation without breaking go import cycles
  11. type sourceInterface interface {
  12. auth.PasswordAuthenticator
  13. auth_model.Config
  14. auth_model.SkipVerifiable
  15. auth_model.HasTLSer
  16. auth_model.UseTLSer
  17. }
  18. var _ (sourceInterface) = &smtp.Source{}