server

package
v0.0.0-...-d6956c3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package server 服务注入

Package server 业务

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(
	New,
)

ProviderSet is server providers.

Functions

This section is empty.

Types

type GetExampleReq

type GetExampleReq struct {
	// Id
	Id int64 `form:"id" binding:"required,gte=1"`
	// 名称
	Name string `form:"name" binding:"required" label:"名称"`
}

GetExampleReq Example请求

type GetExampleResp

type GetExampleResp struct {
	// Id
	Id int64
	// 名称
	Name string
}

GetExampleResp Example返回值

type IServer

type IServer interface {
	GetExample(gtx *gin.Context)
	PostExample(gtx *gin.Context)
}

IServer 服务标准

func New

func New(cf config.IConfig, log los.ILogger, svr example.IService) IServer

New 创建

type PostExampleReq

type PostExampleReq struct {
	// Id
	Id int64 `json:"id" binding:"required,gte=1"`
	// 名称
	Name string `json:"name" binding:"omitempty,gte=2"`
}

PostExampleReq Example请求

type PostExampleResp

type PostExampleResp struct {
	// Id
	Id int64
	// 名称
	Name string
}

PostExampleResp Example返回值

Jump to

Keyboard shortcuts

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