module_index.go 715 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package modules
  2. import (
  3. "fmt"
  4. "golang-fave/engine/wrapper"
  5. )
  6. func (this *Modules) RegisterModule_index() *Module {
  7. return &Module{
  8. Id: "index",
  9. Name: "Pages",
  10. FrontEnd: func(mod *Modules, wrap *wrapper.Wrapper) {
  11. fmt.Printf("FrontEnd func call\n")
  12. },
  13. BackEnd: func(mod *Modules, wrap *wrapper.Wrapper) {
  14. fmt.Printf("BackEnd func call\n")
  15. },
  16. }
  17. }
  18. func (this *Modules) RegisterAction_test() *Action {
  19. return &Action{
  20. Id: "test",
  21. ActFunc: func(mod *Modules, wrap *wrapper.Wrapper) {
  22. fmt.Printf("ActFunc func call\n")
  23. },
  24. }
  25. }
  26. /*
  27. func (this *Modules) module_index_frontend(wrap *wrapper.Wrapper) {
  28. //
  29. }
  30. func (this *Modules) module_index_backend(wrap *wrapper.Wrapper) {
  31. //
  32. }
  33. */