endpoint

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Resource = "CMDB"

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "endpoint",
	Short: "ecmdb endpoint",
	Long:  "注册所有路由信息到 Endpoint 中,用于动态菜单API鉴权中使用",
	RunE: func(cmd *cobra.Command, args []string) error {
		app, err := ioc.InitApp()
		if err != nil {
			panic(err)
		}

		ctx, cancel := context.WithTimeout(context.Background(), time.Second*30)
		defer cancel()
		err = initEndpoint(ctx, app.Web, app.Svc)
		if err != nil {
			panic(err)
		}
		fmt.Println("端点初始化完成")
		return nil
	},
}

Functions

This section is empty.

Types

type RouteMiddlewareStatus added in v1.9.3

type RouteMiddlewareStatus struct {
	IsAuth       bool // 是否需要登录
	IsAudit      bool // 是否需要审计
	IsPermission bool // 是否需要权限验证
}

RouteMiddlewareStatus 路由中间件状态

Jump to

Keyboard shortcuts

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