cmd

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ImportApiRouteCmd = &command.Command{
	Use:          "lakego-admin:import-apiroute",
	Short:        "lakego-admin import apiroute'info.",
	Example:      "{execfile} lakego-admin:import-apiroute",
	SilenceUsage: true,
	PreRun: func(cmd *command.Command, args []string) {

	},
	Run: func(cmd *command.Command, args []string) {
		ImportApiRoute()
	},
}

*

  • 导入 swagger api路由信息 *
  • > ./main lakego-admin:import-apiroute
  • > main.exe lakego-admin:import-apiroute
  • > go run main.go lakego-admin:import-apiroute *
  • @create 2021-9-26
  • @author deatil
View Source
var ImportRouteCmd = &command.Command{
	Use:          "lakego-admin:import-route",
	Short:        "lakego-admin import route'info.",
	Example:      "{execfile} lakego-admin:import-route",
	SilenceUsage: true,
	PreRun: func(cmd *command.Command, args []string) {

	},
	Run: func(cmd *command.Command, args []string) {
		ImportRoute()
	},
}

*

  • 导入路由信息 *
  • > ./main lakego-admin:import-route
  • > main.exe lakego-admin:import-route
  • > go run main.go lakego-admin:import-route *
  • @create 2021-9-26
  • @author deatil
View Source
var InstallCmd = &command.Command{
	Use:          "lakego-admin:install",
	Short:        "Install the lakego-admin.",
	Example:      "{execfile} lakego-admin:install",
	SilenceUsage: true,
	PreRun: func(cmd *command.Command, args []string) {

	},
	Run: func(cmd *command.Command, args []string) {

		runInsatll()
	},
}

*

  • 安装脚本 *
  • > ./main lakego-admin:install
  • > main.exe lakego-admin:install
  • > go run main.go lakego-admin:install *
  • @create 2021-8-15
  • @author deatil
View Source
var PassportLogoutCmd = &command.Command{
	Use:          "lakego-admin:passport-logout",
	Short:        "lakego-admin passport-logout.",
	Example:      "{execfile} lakego-admin:passport-logout",
	SilenceUsage: true,
	PreRun: func(cmd *command.Command, args []string) {

	},
	Run: func(cmd *command.Command, args []string) {
		PassportLogout()
	},
}

*

  • 强制将 jwt 的 refreshToken 放入黑名单 *
  • > ./main lakego-admin:passport-logout --refreshToken=[token]
  • > main.exe lakego-admin:passport-logout --refreshToken=[token]
  • > go run main.go lakego-admin:passport-logout --refreshToken=[token] *
  • @create 2021-9-26
  • @author deatil
View Source
var ResetPasswordCmd = &command.Command{
	Use:          "lakego-admin:reset-password",
	Short:        "lakego-admin reset-password.",
	Example:      "{execfile} lakego-admin:reset-password --name=[name] --password=[password]",
	SilenceUsage: true,
	PreRun: func(cmd *command.Command, args []string) {

	},
	Run: func(cmd *command.Command, args []string) {
		ResetPassword()
	},
}

*

  • 重置账号密码 *
  • > ./main lakego-admin:reset-password --name=[name] --password=[password]
  • > main.exe lakego-admin:reset-password --name=[name] --password=[password]
  • > go run main.go lakego-admin:reset-password --name=[name] --password=[password] *
  • > go run main.go lakego-admin:reset-password --name=admin --password=123456 *
  • @create 2021-9-26
  • @author deatil
View Source
var ResetPermissionCmd = &command.Command{
	Use:          "lakego-admin:reset-permission",
	Short:        "lakego-admin reset enforcer'permission.",
	Example:      "{execfile} lakego-admin:reset-permission",
	SilenceUsage: true,
	PreRun: func(cmd *command.Command, args []string) {

	},
	Run: func(cmd *command.Command, args []string) {
		ResetPermission()
	},
}

*

  • 重设权限 *
  • > ./main lakego-admin:reset-permission
  • > main.exe lakego-admin:reset-permission
  • > go run main.go lakego-admin:reset-permission *
  • @create 2021-9-25
  • @author deatil
View Source
var StopCmd = &command.Command{
	Use:   "lakego-admin:stop",
	Short: "停止 admin 系统服务",
	Run: func(cmd *command.Command, args []string) {
		Stop()
	},
}

*

  • 停止 admin 系统服务 *
  • > ./main lakego-admin:stop [--pid=12345]
  • > main.exe lakego-admin:stop [--pid=12345]
  • > go run main.go lakego-admin:stop [--pid=12345] *
  • @create 2022-2-13
  • @author deatil
View Source
var VersionCmd = &command.Command{
	Use:          "lakego-admin:version",
	Short:        "lakego-admin show version.",
	Example:      "{execfile} lakego-admin:version",
	SilenceUsage: true,
	PreRun: func(cmd *command.Command, args []string) {

	},
	Run: func(cmd *command.Command, args []string) {
		ShowVersion()
	},
}

*

  • 系统信息 *
  • > ./main lakego-admin:version
  • > main.exe lakego-admin:version
  • > go run main.go lakego-admin:version *
  • @create 2021-11-16
  • @author deatil

Functions

func ImportApiRoute

func ImportApiRoute()

导入路由信息

func ImportRoute

func ImportRoute()

导入路由信息

func PassportLogout

func PassportLogout()

强制将 jwt 的 refreshToken 放入黑名单

func ResetPassword

func ResetPassword()

重设权限

func ResetPermission

func ResetPermission()

重设权限

func ShowVersion

func ShowVersion()

显示系统详情

func Stop

func Stop()

停止 admin 系统服务

Types

This section is empty.

Jump to

Keyboard shortcuts

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