api

package
v0.0.0-...-a52508d Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServerCmd = &cobra.Command{
	Use:   "server",
	Short: "start http api server",
	Args: func(cmd *cobra.Command, args []string) error {
		return nil
	},
	PreRun: func(cmd *cobra.Command, args []string) {
		mysql.Init()

		if config.GetString("app.mode") == "release" {
			gin.SetMode(gin.ReleaseMode)
		}

		binding.Validator = validate.GinValidator()
	},
	Run: func(cmd *cobra.Command, args []string) {
		api.Run()
	},
}

ServerCmd http server

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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