Documentation ¶
Index ¶
- func GetInstance(index string) interface{}
- func Inject(instance interface{})
- func InjectConf(conf interface{})
- func InjectView(name string, fs *assetfs.AssetFS)
- func Load()
- func RequestDataHandlerFunc(ctx *gin.Context)
- func StartHTTP()
- type ApplicationContainer
- type ApplicationContainer_HttpServerConf
- type ApplicationContainer_HttpServerConf_Cross
- type ApplicationContainer_Route
- type RouteConf
- type RouteConf_Middleware
- type RouteConf_Middlewares
- type RouteType
- type ServerConf
- type ServerConf_HttpServer
- type ServerConf_HttpServer_Cross
- type ServerContainer
- type ViewsContainer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInstance ¶
func GetInstance(index string) interface{}
func InjectConf ¶ added in v0.0.52
func InjectConf(conf interface{})
func InjectView ¶ added in v0.0.52
func RequestDataHandlerFunc ¶ added in v0.0.9
Types ¶
type ApplicationContainer ¶
type ApplicationContainer struct { ExitChannel chan os.Signal HttpServer *http.Server HttpServerConf *ApplicationContainer_HttpServerConf Routes []*ApplicationContainer_Route }
func (ApplicationContainer) ListenExitChannel ¶
func (app ApplicationContainer) ListenExitChannel()
type ApplicationContainer_HttpServerConf_Cross ¶ added in v0.0.52
type ApplicationContainer_Route ¶
type ApplicationContainer_Route struct { Path string `json:"path"` Method []string `json:"method"` File string `json:"file"` Dir string `json:"dir"` Type RouteType `json:"type"` View *assetfs.AssetFS `json:"-"` Handler gin.HandlerFunc `json:"-"` PrefixMiddlewares []gin.HandlerFunc `json:"-"` SurfixMiddlewares []gin.HandlerFunc `json:"-"` }
func Routes ¶ added in v0.0.52
func Routes() []*ApplicationContainer_Route
type RouteConf ¶
type RouteConf struct { Path string `json:"path"` Method []string `json:"method"` File string `json:"file"` Dir string `json:"dir"` View string `json:"view"` App string `json:"app"` Controller string `json:"controller"` Function string `json:"function"` Middlewares *RouteConf_Middlewares `json:"middlewares"` Routes []*RouteConf `json:"routes"` }
func GetRouteConf ¶ added in v0.0.52
func GetRouteConf() *RouteConf
func (*RouteConf) ConfigName ¶
type RouteConf_Middleware ¶
type RouteConf_Middlewares ¶ added in v0.0.7
type RouteConf_Middlewares struct { Prefix []*RouteConf_Middleware `json:"prefix"` Surfix []*RouteConf_Middleware `json:"surfix"` }
type ServerConf ¶
type ServerConf struct { GoMod string `json:"go_mod"` HttpServer *ServerConf_HttpServer `json:"http_server"` }
func GetServerConf ¶ added in v0.0.52
func GetServerConf() *ServerConf
func (*ServerConf) ConfigName ¶
func (i *ServerConf) ConfigName() string
type ServerConf_HttpServer ¶
type ServerConf_HttpServer struct { Enable bool `json:"enable"` Debug bool `json:"debug"` Port int `json:"port"` ReadTimeout int `json:"read_timeout"` WriteTimeout int `json:"write_timeout"` ExitTimeout int `json:"exit_timeout"` MaxHeaderBytes int `json:"max_header_bytes"` BasicAuthEnable bool `json:"basic_auth_enable"` BasicAuthUsers map[string]string `json:"basic_auth_users"` Cross *ServerConf_HttpServer_Cross `json:"cross"` }
type ServerConf_HttpServer_Cross ¶ added in v0.0.52
type ServerConf_HttpServer_Cross struct { Enable bool `json:"enable"` AllowOrigins []string `json:"allow_origins"` AllowMethods []string `json:"allow_methods"` AllowHeaders []string `json:"allow_headers"` AllowCredentials bool `json:"allow_credentials"` AllowWebSockets bool `json:"allow_websockets"` MaxAge int64 `json:"max_age"` }
type ServerContainer ¶
func (*ServerContainer) Clear ¶
func (i *ServerContainer) Clear()
func (*ServerContainer) Get ¶
func (i *ServerContainer) Get(index string) interface{}
func (*ServerContainer) Remove ¶
func (i *ServerContainer) Remove(instance interface{})
func (*ServerContainer) Save ¶
func (i *ServerContainer) Save(instance interface{})
type ViewsContainer ¶ added in v0.0.52
Click to show internal directories.
Click to hide internal directories.