providers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	*services.Container          `inject:""`
	*providers.FrameworkProvider `inject:""`
	*providers.MysqlProvider     `inject:""`
	*providers.RedisProvider     `inject:""`

	*Route    `inject:""`
	*Response `inject:""`
}

App @Bean 系统引导结构体 所有的服务提供者都应该在这里注入(注册)

func (*App) Run

func (a *App) Run(servers []constraint.KernelServer)

type Auth

type Auth struct{}

Auth 授权服务 @Bean

func (*Auth) Init

func (a *Auth) Init()

type Ctx

type Ctx struct {
	*gin.Context
}

func (Ctx) Fail

func (receiver Ctx) Fail(err error)

func (Ctx) Gin

func (receiver Ctx) Gin() *gin.Context

func (Ctx) Id

func (receiver Ctx) Id() uint64

func (Ctx) Success

func (receiver Ctx) Success(data interface{})

func (Ctx) Token

func (receiver Ctx) Token() string

func (Ctx) User

func (receiver Ctx) User() interface{}

type Response

type Response struct{}

Response @Bean 重载框架的输出

func (*Response) Init

func (r *Response) Init()

type Route

type Route struct {
	*providers.RouteProvider `inject:""`
}

Route 路由服务 @Bean

func (*Route) Init

func (a *Route) Init()

Init 设置路由的前缀+中间件 中间件使用http/kernel.go下的分组名称 如果不设置, 默认没有前缀

Jump to

Keyboard shortcuts

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