module_index.go 550 B

123456789101112131415161718192021222324252627
  1. package modules
  2. import (
  3. "fmt"
  4. "golang-fave/engine/wrapper"
  5. )
  6. func (this *Modules) RegisterModule_index() *Module {
  7. return this.newModule(false, "Pages", func(wrap *wrapper.Wrapper) {
  8. fmt.Printf("FrontEnd func call\n")
  9. }, func(wrap *wrapper.Wrapper) {
  10. fmt.Printf("BackEnd func call\n")
  11. })
  12. }
  13. func (this *Modules) RegisterAction_mysql() *Action {
  14. return this.newAction(false, func(wrap *wrapper.Wrapper) {
  15. fmt.Printf("ActFunc func call\n")
  16. })
  17. }
  18. // All actions here...
  19. // MySQL install
  20. // MySQL first user
  21. // User login
  22. // User logout