routers

package
v0.2.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

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 (*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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL