gitea源码

assert_interface_test.go 679B

1234567891011121314151617181920212223242526
  1. // Copyright 2021 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package ldap_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/ldap"
  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.SynchronizableSource
  14. auth_model.SSHKeyProvider
  15. auth_model.Config
  16. auth_model.SkipVerifiable
  17. auth_model.HasTLSer
  18. auth_model.UseTLSer
  19. }
  20. var _ (sourceInterface) = &ldap.Source{}