wf

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

README

go-web-frame

go web开发框架

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetComponent

func GetComponent[T core.IComponent](c *core.Context) T

func GetModel

func GetModel[T core.IModel](c *core.Context) T

func GetReNewModel

func GetReNewModel[T core.IModel](db *gorm.DB, c *core.Context) T

func GetRunner

func GetRunner[T core.IRunner](c *core.Context) T

func GetService

func GetService[T core.IService](c *core.Context) T

func LoadAutoConfig

func LoadAutoConfig() *config2.Config

func LoadConfig

func LoadConfig(paths ...string) (*config2.Config, error)

func RunDaemon

func RunDaemon(appService AppService, svcConfig *service.Config)

func UnmarshalConfig

func UnmarshalConfig[T any](key string, c *core.Context) T

Types

type AppDaemon

type AppDaemon struct {
	// contains filtered or unexported fields
}

func (*AppDaemon) Start

func (a *AppDaemon) Start(s service.Service) error

func (*AppDaemon) Stop

func (a *AppDaemon) Stop(s service.Service) error

type AppService

type AppService interface {
	Start() error
	Close() error
}

type WebFrame

type WebFrame struct {
	// contains filtered or unexported fields
}

func New

func New(config config2.IConfig) *WebFrame

func (*WebFrame) AddComponent

func (w *WebFrame) AddComponent(component ...core.IComponent)

func (*WebFrame) AddMiddleware

func (w *WebFrame) AddMiddleware(middlewareFunc ...core.MiddlewareFunc)

func (*WebFrame) AddModel

func (w *WebFrame) AddModel(model ...core.IModel)

func (*WebFrame) AddRest

func (w *WebFrame) AddRest(rest ...core.IRest)

func (*WebFrame) AddRunner

func (w *WebFrame) AddRunner(runner ...core.IRunner)

func (*WebFrame) AddService

func (w *WebFrame) AddService(service ...core.IService)

func (*WebFrame) Authentication

func (w *WebFrame) Authentication(authentication web.Authentication)

func (*WebFrame) Close

func (w *WebFrame) Close() error

func (*WebFrame) Daemon

func (w *WebFrame) Daemon(svcConfig *service.Config)

func (*WebFrame) GetRestGroup

func (w *WebFrame) GetRestGroup(serverConfig *web.ServerConfig) *core.RestGroup

func (*WebFrame) Start

func (w *WebFrame) Start() error

Directories

Path Synopsis
component
localcache module

Jump to

Keyboard shortcuts

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