31 lines
624 B
Go
31 lines
624 B
Go
|
package app
|
||
|
|
||
|
import (
|
||
|
"git.vinchent.xyz/vinchent/go-web/framework"
|
||
|
"git.vinchent.xyz/vinchent/go-web/framework/contract"
|
||
|
)
|
||
|
|
||
|
type GoWebProvider struct {
|
||
|
BaseFolder string
|
||
|
}
|
||
|
|
||
|
func (goweb *GoWebProvider) Register(c framework.Container) framework.NewInstance {
|
||
|
return NewGoWebApp
|
||
|
}
|
||
|
|
||
|
func (goweb *GoWebProvider) Init(c framework.Container) error {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (goweb *GoWebProvider) InstantiateLater() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
func (goweb *GoWebProvider) Params(c framework.Container) []interface{} {
|
||
|
return []interface{}{c, goweb.BaseFolder}
|
||
|
}
|
||
|
|
||
|
func (goweb *GoWebProvider) Name() string {
|
||
|
return contract.AppName
|
||
|
}
|