business

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListQuerySvcCont

type ListQuerySvcCont struct {
	Pagination PaginationIn `json:"Pagination"`
}

ListQuerySvcCont 标准清单查询接口 包含分页 等内容 以后会包含筛选功能

type PaginationIn

type PaginationIn struct {
	PageSize    int `json:"PageSize"`    // 一页显示条数
	CurrentPage int `json:"CurrentPage"` // 当前页码
}

PaginationIn 分页入参

type PaginationOut

type PaginationOut struct {
	TotalCount  int `json:"TotalCount"`  // 总记录数
	PageCount   int `json:"PageCount"`   // 分页数
	CurrentPage int `json:"CurrentPage"` // 当前页码
}

PaginationOut 分页出参

type QuerySvcCont

type QuerySvcCont struct {
	ID int `json:"id"`
}

QuerySvcCont使用id查对象详情的入参

type ReqContract

type ReqContract struct {
	ContractRoot ReqContractRoot `json:"ContractRoot"`
}

ReqContract 标准请求的顶级节点

type ReqContractRoot

type ReqContractRoot struct {
	TcpCont TcpCont `json:"TcpCont"`
	SvcCont SvcCont `json:"SvcCont"`
}

ReqContractRoot 请求协议中第二层节点 包括协议级通用返回节点和业务节点

type ResContract

type ResContract struct {
	ContractRoot ResContractRoot `json:"ContractRoot"`
}

ResContract 返回协议的顶级节点

func ErrorResContract

func ErrorResContract(svcCont SvcCont) (t ResContract)
初始化返回错误标准头部信息

ErrorResContract 初始化返回标准信息为错误的函数 没有分类的通用错误, 不推荐使用,建议自行定义错误信息

func NewResContract

func NewResContract(svcCont SvcCont) (t ResContract)

NewResContract 初始化返回标准头部信息的函数 使用这个初始化返回的成功

type ResContractOldRoot

type ResContractOldRoot struct {
	TcpCont ResOldTcpCont `json:"TcpCont"`
	SvcCont SvcCont       `json:"SvcCont"`
}

type ResContractRoot

type ResContractRoot struct {
	TcpCont RspTcpCont `json:"TcpCont"`
	SvcCont SvcCont    `json:"SvcCont"`
}

ResContractRoot 返回协议的数据返回层

type ResOldContract

type ResOldContract struct {
	ContractRoot ResContractOldRoot `json:"ContractRoot"`
}

旧的返回头

type ResOldTcpCont

type ResOldTcpCont struct {
	ActionCode    string      `json:"ActionCode"`
	Response      RspResponse `json:"Response"`
	RspTime       int         `json:"RspTime"`
	TransactionID string      `json:"TransactionID"`
	Sessionid     int         `json:"sessionid"`
	Identity      string      `json:"_identity"`
}

type RspResponse

type RspResponse struct {
	RspType string `json:"RspType"`
	RspCode string `json:"RspCode"`
	RspDesc string `json:"RspDesc"`
}

RspResponse 返回协议中的业务代码 和业务返回信息

type RspTcpCont

type RspTcpCont struct {
	ActionCode string      `json:"ActionCode"`
	ReqTime    string      `json:"ReqTime"`
	RspTime    string      `json:"RspTime"`
	Response   RspResponse `json:"Response"`
}

RspTcpCont 返回协议的通用协议层返回节点

type SvcCont

type SvcCont interface {
}

SvcCont 业务返回节点 这个由具体的业务自行定义

type TcpCont

type TcpCont struct {
	AppKey        string `json:"AppKey"`
	Method        string `json:"Method"`
	TransactionID string `json:"TransactionID"`
	ReqTime       string `json:"ReqTime"`
	Version       string `json:"Version"`
	Sign          string `json:"Sign"`
}

TcpCont 请求协议的 通用协议层返回节点

Jump to

Keyboard shortcuts

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