controller

package
v0.0.50 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AdminResources = &controller.Controllers{
	Base: "/openapi/admin",
	Handlers: []gin.HandlerFunc{
		security.HandleTokenVerify(),
		permission.NeedAdmin(),
		permission.CheckUserPermissions(),
	},
	Controllers: []controller.Controller{},
}
View Source
var ApiResources = &controller.Controllers{
	Base: "/api",
	Handlers: []gin.HandlerFunc{
		security.HandleTokenVerify(),
	},
	Controllers: []controller.Controller{},
}
View Source
var PublicResources = &controller.Controllers{
	Base: "/openapi/public",
	Handlers: []gin.HandlerFunc{
		security.CheckTokenVerify(),
	},
	Controllers: []controller.Controller{},
}
View Source
var Resources = map[string]*controller.Controllers{
	"/api":            ApiResources,
	"/mapi":           MApiResources,
	"/openapi":        OpenApiResources,
	"/openapi/public": PublicResources,
	"/openapi/user":   UserResources,
	"/openapi/admin":  AdminResources,
}
View Source
var UserResources = &controller.Controllers{
	Base: "/openapi/user",
	Handlers: []gin.HandlerFunc{
		security.HandleTokenVerify(),
		permission.CheckUserPermissions(),
	},
	Controllers: []controller.Controller{},
}

Functions

func AddController added in v0.0.37

func AddController(c controller.Controller)

func AddControllers added in v0.0.37

func AddControllers(cs ...controller.Controller)

func AddSchemaControllers added in v0.0.37

func AddSchemaControllers(schema string, cs ...controller.Controller)

func Init

func Init()

Auto Initialize entrypoint

func Start

func Start()

Autostart entrypoint

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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