go-web/framework/providers/app/provider.go

31 lines
642 B
Go
Raw Normal View History

2024-09-30 11:42:37 +00:00
package app
import (
"git.vinchent.xyz/vinchent/go-web/framework"
"git.vinchent.xyz/vinchent/go-web/framework/contract"
)
type GoWebAppProvider struct {
2024-09-30 11:42:37 +00:00
BaseFolder string
}
func (goweb *GoWebAppProvider) Register(c framework.Container) framework.NewInstance {
2024-09-30 11:42:37 +00:00
return NewGoWebApp
}
func (goweb *GoWebAppProvider) Init(c framework.Container) error {
2024-09-30 11:42:37 +00:00
return nil
}
func (goweb *GoWebAppProvider) InstantiateLater() bool {
2024-09-30 11:42:37 +00:00
return false
}
func (goweb *GoWebAppProvider) Params(c framework.Container) []interface{} {
2024-09-30 11:42:37 +00:00
return []interface{}{c, goweb.BaseFolder}
}
func (goweb *GoWebAppProvider) Name() string {
2024-09-30 11:42:37 +00:00
return contract.AppName
}