gitea源码

assert_interface_test.go 593B

12345678910111213141516171819202122
  1. // Copyright 2021 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package oauth2_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/oauth2"
  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_model.Config
  13. auth_model.RegisterableSource
  14. auth.PasswordAuthenticator
  15. }
  16. var _ (sourceInterface) = &oauth2.Source{}