app

package
v0.0.0-...-e006840 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InjectorHTTPSet = wire.NewSet(wire.Struct(new(InjectorHTTP), "*"))
View Source
var InjectorRPCSet = wire.NewSet(wire.Struct(new(InjectorRPC), "*"))
View Source
var InjectorSet = wire.NewSet(wire.Struct(new(Injector), "*"))
View Source
var InjectorWSSet = wire.NewSet(wire.Struct(new(InjectorWS), "*"))

Functions

func Init

func Init(ctx context.Context, optFuncs ...Option) func()

func InitConfig

func InitConfig(opts *options)

func InitHttpServer

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

func InitRpcServer

func InitRpcServer(ctx context.Context, handlerRPC *api.HandlerRPC) func()

func InitWsServer

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

func Launch

func Launch(ctx context.Context, opts ...Option)

Types

type Injector

type Injector struct {
	InjectorHTTP
	InjectorWS
	InjectorRPC
}

func InitInjector

func InitInjector() (*Injector, func(), error)

type InjectorHTTP

type InjectorHTTP struct {
	Engine  *gin.Engine
	Handler *api.Handler
	DB      *gorm.DB
	Redis   *redis.Client
}

type InjectorRPC

type InjectorRPC struct {
	HandlerRPC *api.HandlerRPC
	DB         *gorm.DB
	Redis      *redis.Client
}

type InjectorWS

type InjectorWS struct {
	Engine    *gin.Engine
	HandlerWs *api.HandlerWs
	DB        *gorm.DB
	Redis     *redis.Client
	Pool      *pool.Pool
}

type Option

type Option func(*options)

func SetConfigFile

func SetConfigFile(configFile string) Option

func SetWWWDir

func SetWWWDir(wwwDir string) Option

Jump to

Keyboard shortcuts

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