v1

package
v0.0.1-alpha18 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LoginResponse = httptest.Responses{
	{Key: "status", Value: http.StatusOK},
	{Key: "message", Value: "操作成功"},
	{Key: "data",
		Value: httptest.Responses{
			{Key: "accessToken", Value: "", Type: "notempty"},
		},
	},
}
View Source
var LoginUrl = "/api/v1/public/admin/login"
View Source
var LogoutResponse = httptest.Responses{
	{Key: "status", Value: http.StatusOK},
	{Key: "message", Value: "操作成功"},
}
View Source
var LogoutUrl = "/api/v1/public/logout"
View Source
var PartyFunc = func(wi *web_gin.WebServer) {

	err := multi.InitDriver(&multi.Config{DriverType: "jwt", HmacSecret: nil})
	if err != nil {
		zap_server.ZAPLOG.Panic("err")
	}
	Party(wi.GetRouterGroup("/api/v1"))
}

加载模块

View Source
var SeedFunc = func(wi *web_gin.WebServer, mc *migration.MigrationCmd) {
	mc.AddMigration(api.GetMigration(), authority.GetMigration(), admin.GetMigration(), operation.GetMigration())
	routes, _ := wi.GetSources()

	authorityTypes := map[string]int{}
	for _, route := range routes {
		authorityTypes[route["path"]] = multi.AdminAuthority
	}

	mc.AddSeed(api.New(routes, authorityTypes), authority.Source, admin.Source)
}

填充数据

Functions

func Party

func Party(group *gin.RouterGroup)

Party v1 模块

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