app

package
v8.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InjectorSet = wire.NewSet(wire.Struct(new(Injector), "*"))

Functions

func Init

func Init(ctx context.Context, opts ...Option) (func(), error)

func InitAuth

func InitAuth() (auth.Auther, func(), error)

func InitCaptcha

func InitCaptcha()

func InitCasbin

func InitCasbin(adapter persist.Adapter) (*casbin.SyncedEnforcer, func(), error)

func InitGinEngine

func InitGinEngine(r router.IRouter) *gin.Engine

func InitGormDB

func InitGormDB() (*gorm.DB, func(), error)

func InitHTTPServer

func InitHTTPServer(ctx context.Context, handler http.Handler) func()

func InitLogger

func InitLogger() (func(), error)

func InitMonitor

func InitMonitor(ctx context.Context) func()

func NewGormDB

func NewGormDB() (*gorm.DB, error)

func Run

func Run(ctx context.Context, opts ...Option) error

Types

type Injector

type Injector struct {
	Engine         *gin.Engine
	Auth           auth.Auther
	CasbinEnforcer *casbin.SyncedEnforcer
	MenuSrv        *service.MenuSrv
}

func BuildInjector

func BuildInjector() (*Injector, func(), error)

type Option

type Option func(*options)

func SetConfigFile

func SetConfigFile(s string) Option

func SetMenuFile

func SetMenuFile(s string) Option

func SetModelFile

func SetModelFile(s string) Option

func SetVersion

func SetVersion(s string) Option

func SetWWWDir

func SetWWWDir(s string) Option

Directories

Path Synopsis
api
dao
module

Jump to

Keyboard shortcuts

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