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"
|
|
|
|
)
|
|
|
|
|
2024-09-30 17:38:16 +00:00
|
|
|
type GoWebAppProvider struct {
|
2024-09-30 11:42:37 +00:00
|
|
|
BaseFolder string
|
|
|
|
}
|
|
|
|
|
2024-09-30 17:38:16 +00:00
|
|
|
func (goweb *GoWebAppProvider) Register(c framework.Container) framework.NewInstance {
|
2024-09-30 11:42:37 +00:00
|
|
|
return NewGoWebApp
|
|
|
|
}
|
|
|
|
|
2024-09-30 17:38:16 +00:00
|
|
|
func (goweb *GoWebAppProvider) Init(c framework.Container) error {
|
2024-09-30 11:42:37 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2024-09-30 17:38:16 +00:00
|
|
|
func (goweb *GoWebAppProvider) InstantiateLater() bool {
|
2024-09-30 11:42:37 +00:00
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2024-09-30 17:38:16 +00:00
|
|
|
func (goweb *GoWebAppProvider) Params(c framework.Container) []interface{} {
|
2024-09-30 11:42:37 +00:00
|
|
|
return []interface{}{c, goweb.BaseFolder}
|
|
|
|
}
|
|
|
|
|
2024-09-30 17:38:16 +00:00
|
|
|
func (goweb *GoWebAppProvider) Name() string {
|
2024-09-30 11:42:37 +00:00
|
|
|
return contract.AppName
|
|
|
|
}
|