Documentation
¶
Overview ¶
定义项目 API 的文件 用于描述 HTTP API
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDemoServerV1 ¶
RegisterDemoServerV1 Register the gin route for demo server at v1 version
func RegisterRoot ¶
RegisterRoot Register the gin route for root path
func RegisterServer ¶
RegisterServer Register the gin route
Types ¶
type DemoServer ¶
type DemoServer interface { Ping(ctx context.Context) error // svc: -summary=sayHello -method=get -version=v1 -path=/sayHello SayHello(ctx context.Context, req HelloReq) (resp HelloResp, err error) }
以Server结束的接口,将用作解析API的接口,约定method默认为get,summary和path默认为方法名且首字母小写, 所有指定了version的接口将以/api/{version}作为分组,未指定的将直接使用path DemoServer is the server API for Demo service.
Click to show internal directories.
Click to hide internal directories.