mvc

package
v1.10.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2025 License: MulanPSL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = struct {
	Mvc struct {
		Enabled bool
		Port    string
		Cors    struct {
			Enabled bool
		}
		Swagger struct {
			Enabled bool
			Https   bool
			BaseUrl string
		}
	}
}{}

Functions

func Init added in v1.9.13

func Init()

func RegController added in v0.5.1

func RegController(controllers ...IController)

func RegHandler added in v1.10.3

func RegHandler(handlers ...IHandler)

func RegRequest added in v1.9.18

func RegRequest(method string, uri string, handlers []gin.HandlerFunc)

func RegTplPath added in v1.10.5

func RegTplPath(pattern string)

Types

type IController added in v1.9.18

type IController interface {
	Handlers() []gin.HandlerFunc
	Method() string
	Uri() string
	Request() gin.HandlerFunc
}

type IHandler added in v1.10.3

type IHandler func() (method string, uri string, handlers []gin.HandlerFunc)

type MvcService

type MvcService struct {
	// contains filtered or unexported fields
}

func (*MvcService) RegisterTemplatePath added in v1.10.5

func (svc *MvcService) RegisterTemplatePath(pattern string)

func (*MvcService) Start

func (svc *MvcService) Start(wg *sync.WaitGroup)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL