You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
715 B

  1. // ================================================================================
  2. // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
  3. // You can delete these comments if you wish manually maintain this interface file.
  4. // ================================================================================
  5. package service
  6. import (
  7. "github.com/gogf/gf/v2/net/ghttp"
  8. )
  9. type (
  10. IMiddleware interface {
  11. CORS(r *ghttp.Request)
  12. }
  13. )
  14. var (
  15. localMiddleware IMiddleware
  16. )
  17. func Middleware() IMiddleware {
  18. if localMiddleware == nil {
  19. panic("implement not found for interface IMiddleware, forgot register?")
  20. }
  21. return localMiddleware
  22. }
  23. func RegisterMiddleware(i IMiddleware) {
  24. localMiddleware = i
  25. }