api

package
v0.0.0-...-1225d9a Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HelloServiceApiHandler

type HelloServiceApiHandler struct {
	// 依赖业务控制器
	// 使用ioc注解来从自动加载依赖对象, 等同于手动执行:
	// 	h.svc = ioc.Controller().Get("*impl.HelloService").(helloworld.HelloService)
	Svc helloworld.HelloService `ioc:"autowire=true;namespace=controllers"`

	// 继承自Ioc对象
	ioc.ObjectImpl
	// contains filtered or unexported fields
}

3. 暴露HTTP接口

func (*HelloServiceApiHandler) Hello

func (h *HelloServiceApiHandler) Hello(c *gin.Context)

API接口具体实现

func (*HelloServiceApiHandler) Init

func (h *HelloServiceApiHandler) Init() error

对象自定义初始化

func (*HelloServiceApiHandler) Registry

func (h *HelloServiceApiHandler) Registry(r gin.IRouter)

API路由

Jump to

Keyboard shortcuts

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