handler.go 742 B

123456789101112131415161718192021
  1. package hhc_mangekyo
  2. import (
  3. "git.swzry.com/zry/go-hhc-cli/hhc_telws"
  4. "git.swzry.com/zry/go-hhc-cli/hhccli"
  5. )
  6. type MangekyoCustomViewPortalCommandDefine struct {
  7. CommandName string
  8. Description string
  9. GetViewNameFunc func(ctx *hhc_telws.TelwsSessionContext) string
  10. GetPromptFunc func(ctx *hhc_telws.TelwsSessionContext) string
  11. GetTitleFunc func(ctx *hhc_telws.TelwsSessionContext) string
  12. }
  13. type MangekyoUserLogicHandler interface {
  14. GetDefaultPromptString(ctx *hhc_telws.TelwsSessionContext) string
  15. GetDefaultTitle(ctx *hhc_telws.TelwsSessionContext) string
  16. GetCustomViewPortalCommands() []MangekyoCustomViewPortalCommandDefine
  17. NewSession(ctx *hhc_telws.TelwsSessionContext, cli *hhccli.TerminalInteractive) error
  18. }