Documentation
¶
Index ¶
- type ContentTypeResourceLoader
- type DefaultContentTypeManager
- type DefaultContext
- func (inst *DefaultContext) GetConnectorByName(name string) (libgin.Connector, error)
- func (inst *DefaultContext) GetGroupByName(name string) (libgin.Group, error)
- func (inst *DefaultContext) GetRouterByName(name string) (libgin.Router, error)
- func (inst *DefaultContext) Life() *application.Life
- func (inst *DefaultContext) ListControllersForGroup(wantGroupName string) ([]*libgin.ControllerRegistration, error)
- type DefaultRouter
- type GroupBuilder
- type HTTPConnector
- type HTTPSConnector
- type RESTGroup
- type RESTfulResponder
- type StaticController
- type StaticGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentTypeResourceLoader ¶
type ContentTypeResourceLoader struct {
Context application.Context //starter:inject("context")
TypesProps string //starter:inject("${web.content-types.properties}")
// contains filtered or unexported fields
}
ContentTypeResourceLoader 负责从指定的资源文件中加载类型信息
func (*ContentTypeResourceLoader) ListRegistrations ¶
func (inst *ContentTypeResourceLoader) ListRegistrations() []*libgin.ContentTypeRegistration
ListRegistrations ...
type DefaultContentTypeManager ¶
type DefaultContentTypeManager struct {
All []libgin.ContentTypeRegistry //starter:inject(".")
// contains filtered or unexported fields
}
DefaultContentTypeManager ...
func (*DefaultContentTypeManager) FindTypeBySuffix ¶
func (inst *DefaultContentTypeManager) FindTypeBySuffix(suffix string) (string, error)
FindTypeBySuffix ...
func (*DefaultContentTypeManager) Life ¶
func (inst *DefaultContentTypeManager) Life() *application.Life
Life ...
type DefaultContext ¶
type DefaultContext struct {
Controllers []libgin.Controller //starter:inject(".")
Connectors []libgin.Connector //starter:inject(".")
Routers []libgin.Router //starter:inject(".")
Groups []libgin.Group //starter:inject(".")
DefaultGroupName string //starter:inject("${web.default-group-name}")
// contains filtered or unexported fields
}
DefaultContext ...
func (*DefaultContext) GetConnectorByName ¶
func (inst *DefaultContext) GetConnectorByName(name string) (libgin.Connector, error)
GetConnectorByName ...
func (*DefaultContext) GetGroupByName ¶
func (inst *DefaultContext) GetGroupByName(name string) (libgin.Group, error)
GetGroupByName ...
func (*DefaultContext) GetRouterByName ¶
func (inst *DefaultContext) GetRouterByName(name string) (libgin.Router, error)
GetRouterByName ...
func (*DefaultContext) ListControllersForGroup ¶
func (inst *DefaultContext) ListControllersForGroup(wantGroupName string) ([]*libgin.ControllerRegistration, error)
ListControllersForGroup ...
type DefaultRouter ¶
type DefaultRouter struct {
Context libgin.Context //starter:inject("#")
Name string //starter:inject("${web-router.default.name}")
GroupList string //starter:inject("${web-router.default.groups}")
GinMode string //starter:inject("${gin.mode}")
// contains filtered or unexported fields
}
DefaultRouter 默认路由
func (*DefaultRouter) Registration ¶
func (inst *DefaultRouter) Registration() *libgin.RouterRegistration
Registration ...
type GroupBuilder ¶
GroupBuilder 用于创建 libgin.Group 实例
func (*GroupBuilder) Create ¶
func (inst *GroupBuilder) Create() libgin.Group
Create 创建 libgin.Group 实例
type HTTPConnector ¶
type HTTPConnector struct {
Context libgin.Context //starter:inject("#")
Host string //starter:inject("${server.http.host}")
Port int //starter:inject("${server.http.port}")
Enabled bool //starter:inject("${server.http.enabled}")
// contains filtered or unexported fields
}
HTTPConnector 是默认的 HTTP 连接器
func (*HTTPConnector) Registration ¶
func (inst *HTTPConnector) Registration() *libgin.ConnectorRegistration
Registration ...
type HTTPSConnector ¶
type HTTPSConnector struct {
Context libgin.Context //starter:inject("#")
Enabled bool //starter:inject("${server.https.enabled}")
Host string //starter:inject("${server.https.host}")
Port int //starter:inject("${server.https.port}")
KeyFile string //starter:inject("${server.https.key-file}")
CertFile string //starter:inject("${server.https.certificate-file}")
// contains filtered or unexported fields
}
HTTPSConnector 是默认的 HTTPS 连接器
func (*HTTPSConnector) Registration ¶
func (inst *HTTPSConnector) Registration() *libgin.ConnectorRegistration
Registration ...
func (*HTTPSConnector) SetHandler ¶
func (inst *HTTPSConnector) SetHandler(h http.Handler)
SetHandler ...
type RESTGroup ¶
type RESTGroup struct {
Context libgin.Context //starter:inject("#")
Name string //starter:inject("${web-group.rest.name}")
Path string //starter:inject("${web-group.rest.path}")
// contains filtered or unexported fields
}
RESTGroup 是默认的 RESTful-API 控制器组
func (*RESTGroup) Registration ¶
func (inst *RESTGroup) Registration() *libgin.GroupRegistration
Registration ...
type RESTfulResponder ¶
type RESTfulResponder struct {
// contains filtered or unexported fields
}
RESTfulResponder 默认的 RESTful 响应发送器
type StaticController ¶
type StaticController struct {
Context application.Context //starter:inject("context")
ResPath string //starter:inject("${web-group.static.resources}")
IndexNames string //starter:inject("${web-group.static.index-names}")
Types libgin.ContentTypeManager //starter:inject("#")
// contains filtered or unexported fields
}
StaticController 是静态资源控制器,它负责把静态的web资源注册到 static-group
func (*StaticController) Registration ¶
func (inst *StaticController) Registration() *libgin.ControllerRegistration
Registration ...
type StaticGroup ¶
type StaticGroup struct {
Context libgin.Context //starter:inject("#")
Path string //starter:inject("${web-group.static.path}")
Name string //starter:inject("${web-group.static.name}")
// contains filtered or unexported fields
}
StaticGroup 是默认的静态资源控制器组
func (*StaticGroup) Registration ¶
func (inst *StaticGroup) Registration() *libgin.GroupRegistration
Registration ...