frame

package module
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

README

frame

web 框架

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Inject 依赖注入
	Inject *inject
)

Functions

func IGormDB added in v0.0.2

func IGormDB(cfg libs.Config) libs.MultiDB

IGormDB 注入Gorm数据库

func ILogger added in v0.0.2

func ILogger(config libs.Config) libs.Logger

func IRedisDB added in v0.0.2

func IRedisDB(cfg libs.Config) libs.RDB

IRedisDB 注入Redis数据库

func Init added in v0.0.3

func Init(name string, app Route) func()

Init 初始化应用

func InitInject added in v0.0.21

func InitInject()

InitInject 初始化依赖注入

Types

type HttpApi

type HttpApi struct {
	Engine *gin.Engine
}
var (
	Api *HttpApi
)

func (*HttpApi) AddService

func (this *HttpApi) AddService(serviceName string, apiType string, version string, mws ...gin.HandlerFunc) *gin.RouterGroup

AddService 暴露给服务

type Migrate

type Migrate interface {
	AutoMigrate() error
}

Migrate 数据库迁移

type Route

type Route interface {
	HttpRoutes(route *HttpApi) Route
}

Route 路由

type Tasks

type Tasks interface {
	Tasks()
}

Tasks 任务

Directories

Path Synopsis
jwt
stores

Jump to

Keyboard shortcuts

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