Documentation
¶
Index ¶
- func NewInfoRouter(conf *fastapi.Config, prefix ...string) fastapi.GroupRouter
- type WrapperInfoRouter
- func (r *WrapperInfoRouter) GetDescription(c *fastapi.Context) (string, error)
- func (r *WrapperInfoRouter) GetHeartbeat(c *fastapi.Context) (string, error)
- func (r *WrapperInfoRouter) GetTitle(c *fastapi.Context) (string, error)
- func (r *WrapperInfoRouter) GetVersion(c *fastapi.Context) (string, error)
- func (r *WrapperInfoRouter) PathSchema() pathschema.RoutePathSchema
- func (r *WrapperInfoRouter) Prefix() string
- func (r *WrapperInfoRouter) Summary() map[string]string
- func (r *WrapperInfoRouter) Tags() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInfoRouter ¶
func NewInfoRouter(conf *fastapi.Config, prefix ...string) fastapi.GroupRouter
NewInfoRouter 用于获取后端服务基本信息的路由组
# Usage
router := NewInfoRouter(Config{})
app.IncludeRouter(router)
Types ¶
type WrapperInfoRouter ¶
type WrapperInfoRouter struct {
fastapi.BaseGroupRouter
Title string
Version string
Desc string
Tag []string
// contains filtered or unexported fields
}
func (*WrapperInfoRouter) GetDescription ¶
func (r *WrapperInfoRouter) GetDescription(c *fastapi.Context) (string, error)
func (*WrapperInfoRouter) GetHeartbeat ¶
func (r *WrapperInfoRouter) GetHeartbeat(c *fastapi.Context) (string, error)
func (*WrapperInfoRouter) GetTitle ¶
func (r *WrapperInfoRouter) GetTitle(c *fastapi.Context) (string, error)
func (*WrapperInfoRouter) GetVersion ¶
func (r *WrapperInfoRouter) GetVersion(c *fastapi.Context) (string, error)
func (*WrapperInfoRouter) PathSchema ¶
func (r *WrapperInfoRouter) PathSchema() pathschema.RoutePathSchema
func (*WrapperInfoRouter) Prefix ¶
func (r *WrapperInfoRouter) Prefix() string
func (*WrapperInfoRouter) Summary ¶
func (r *WrapperInfoRouter) Summary() map[string]string
func (*WrapperInfoRouter) Tags ¶
func (r *WrapperInfoRouter) Tags() []string
Click to show internal directories.
Click to hide internal directories.