API directory introduction

[!TIP] This document is machine-translated by Google. If you find grammatical and semantic errors, and the document description is not clear, please PR

  1. .
  2. ├── etc
  3. └── greet-api.yaml // yaml configuration file
  4. ├── go.mod // go module file
  5. ├── greet.api // api interface description language file
  6. ├── greet.go // main function entry
  7. └── internal
  8. ├── config
  9. └── config.go // configuration declaration type
  10. ├── handler // routing and handler forwarding
  11. ├── greethandler.go
  12. └── routes.go
  13. ├── logic // business logic
  14. └── greetlogic.go
  15. ├── middleware // middleware file
  16. └── greetmiddleware.go
  17. ├── svc // the resource pool that logic depends on
  18. └── servicecontext.go
  19. └── types // The struct of request and response is automatically generated according to the api, and editing is not recommended
  20. └── types.go