genctrl_api_item.go 606 B

12345678910111213141516171819202122
  1. // Copyright GoFrame gf Author(https://goframe.org). All Rights Reserved.
  2. //
  3. // This Source Code Form is subject to the terms of the MIT License.
  4. // If a copy of the MIT was not distributed with this file,
  5. // You can obtain one at https://github.com/gogf/gf.
  6. package genctrl
  7. import "github.com/gogf/gf/v2/text/gstr"
  8. type apiItem struct {
  9. Import string `eg:"demo.com/api/user/v1"`
  10. Module string `eg:"user"`
  11. Version string `eg:"v1"`
  12. MethodName string `eg:"GetList"`
  13. }
  14. func (a apiItem) String() string {
  15. return gstr.Join([]string{
  16. a.Import, a.Module, a.Version, a.MethodName,
  17. }, ",")
  18. }