base

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Http      = "http"
	Grpc      = "grpc"
	Websocket = "websocket"
)

Variables

View Source
var (
	App    string
	Module string
	Pwd    string
	Mod    string

	BlackCmd = []string{
		"ginctl",
		"version",
	}
)
View Source
var (
	DB *gorm.DB
)
View Source
var (
	TemplateCache sync.Map
)

Functions

func Check

func Check(cmd *cobra.Command) (err error)

func Connect

func Connect(dbConfig gorm.Dialector) (err error)

Connect 连接数据库

func GetTemplateParse

func GetTemplateParse(filePath string) (*template.Template, error)

func SetupDB

func SetupDB()

Types

type AppBase

type AppBase struct {
	App string
}

type Apply

type Apply struct {
	Module string
	Apply  string
}

Jump to

Keyboard shortcuts

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