router.go 433 B

1234567891011121314151617181920212223
  1. package global
  2. import "github.com/gin-gonic/gin"
  3. func RegisterRouter(group *gin.RouterGroup, iCore ContextInterface) {
  4. iCore.Register(group.Group(iCore.Route()))
  5. }
  6. type ContextInterface interface {
  7. Route() string
  8. Register(group *gin.RouterGroup)
  9. }
  10. type CommonHandler struct {
  11. }
  12. func (c CommonHandler) Route() string {
  13. panic("implement me")
  14. }
  15. func (CommonHandler) Register(group *gin.RouterGroup) {
  16. panic("implement me")
  17. }