v1

package
v0.0.0-...-9d33de4 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

wire依赖

3.使用wire为NewUserApi注入依赖

Functions

func NewBoardRouter

func NewBoardRouter(router *gin.Engine)

路由

func NewCommentRouter

func NewCommentRouter(router *gin.Engine)

路由函数

func NewPostRouter

func NewPostRouter(router *gin.Engine)

func NewUserRouter

func NewUserRouter(router *gin.Engine)

路由

Types

type BoardApi

type BoardApi struct {
}

func NewBoardApi

func NewBoardApi(service2 service.BoardService) (*BoardApi, error)

注入

type CommentApi

type CommentApi struct {
}

评论API注入结构体

func NewCommentService

func NewCommentService(comment service.CommentService) (*CommentApi, error)

依赖注入函数

type PostApi

type PostApi struct {
}

func NewPostApi

func NewPostApi(service2 service.PostService) (*PostApi, error)

type UserApi

type UserApi struct {
}

用户API依赖注入结构体

func NewUserApi

func NewUserApi(service2 service.UserService) (*UserApi, error)

2.为userService注入依赖

Directories

Path Synopsis
* @Package dto * @Author Quan Chen * @Date 2020/3/19 * @Description * * @Package dto * @Author Quan Chen * @Date 2020/3/19 * @Description 公共的数据传输结构体 * * @Package dto * @Author Quan Chen * @Date 2020/3/19 * @Description 用户相关数据传输结构体 *
* @Package dto * @Author Quan Chen * @Date 2020/3/19 * @Description * * @Package dto * @Author Quan Chen * @Date 2020/3/19 * @Description 公共的数据传输结构体 * * @Package dto * @Author Quan Chen * @Date 2020/3/19 * @Description 用户相关数据传输结构体 *
* @Package vo * @Author Quan Chen * @Date 2020/3/19 * @Description *
* @Package vo * @Author Quan Chen * @Date 2020/3/19 * @Description *

Jump to

Keyboard shortcuts

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