model

package
v0.0.0-...-2646e84 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 上下文变量存储键名
	ContextKey = "ContextKey"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppInfo

type AppInfo struct {
	AppName       string `json:"appname"`       //应用名
	AppType       string `json:"apptype"`       // 应用密钥托管类型
	CaType        int    `json:"catype"`        // 应用密钥类型,1:托管2:非托用密钥类型
	AlgorithmType int    `json:"algorithmtype"` // 应用密钥算法类型 1:SM22:ECDS城市
	MspId         string `json:"mspid"`         // 城市MspId
	ChannelId     string `json:"channelid"`     //应用链名称
}

type BiosInfo

type BiosInfo struct {
	Vendor          string // 供应商
	Version         string // 版本
	ReleaseDate     string // 发布日期
	Address         string // 地址
	RuntimeSize     string // 运行时大小
	ROMSize         string // 只读随机存储
	Characteristics string // 特性
	BIOSRevision    string // 修订版本
}

Bios信息

type BlcApp

type BlcApp struct {
	Id       uint        `orm:"id,primary" json:"id"`       // 自动编号
	Appcode  string      `orm:"appcode"    json:"appcode"`  // 应用唯一标识
	Usercode string      `orm:"usercode"   json:"usercode"` // 用户唯一标识
	CreateAt *gtime.Time `orm:"create_at"  json:"createAt"` // 创建时间
	UpdateAt *gtime.Time `orm:"update_at"  json:"updateAt"` // 更新时间
}

BlcApp is the golang structure for table blc_app.

type BlcChaincode

type BlcChaincode struct {
	Id         uint        `orm:"id,primary" json:"id"`         // 自动编号
	Name       string      `orm:"name"       json:"name"`       // 链码名称
	Deployname string      `orm:"deployname" json:"deployname"` // 链码部署名称
	CreateAt   *gtime.Time `orm:"create_at"  json:"createAt"`   // 创建时间
	UpdateAt   *gtime.Time `orm:"update_at"  json:"updateAt"`   // 更新时间
}

BlcChaincode is the golang structure for table blc_chaincode.

type BlcChaincodeMethod

type BlcChaincodeMethod struct {
	Id          uint        `orm:"id,primary"   json:"id"`          // 自动编号
	ChaincodeId string      `orm:"chaincode_id" json:"chaincodeId"` // 链码ID
	Name        string      `orm:"name"         json:"name"`        // 功能名称
	Methodname  string      `orm:"methodname"   json:"methodname"`  // 链码Func
	CreateAt    *gtime.Time `orm:"create_at"    json:"createAt"`    // 创建时间
	UpdateAt    *gtime.Time `orm:"update_at"    json:"updateAt"`    // 更新时间
}

BlcChaincodeMethod is the golang structure for table blc_chaincode_method.

type BlcUser

type BlcUser struct {
	Id       uint        `orm:"id,primary" json:"id"`       // 用户ID
	Passport string      `orm:"passport"   json:"passport"` // 用户账号
	Password string      `orm:"password"   json:"password"` // 用户密码
	Nickname string      `orm:"nickname"   json:"nickname"` // 用户昵称
	CreateAt *gtime.Time `orm:"create_at"  json:"createAt"` // 创建时间
	UpdateAt *gtime.Time `orm:"update_at"  json:"updateAt"` // 更新时间
	UserCode string      `orm:"userCode"   json:"userCode"` // 用户唯一标识
}

BlcUser is the golang structure for table blc_user.

type BlockInfo

type BlockInfo struct {
	BlockNumber int64  // 块号
	BlockHash   string // 块哈希
	TxId        string // 交易ID
}

区块信息

type BlockInfoD

type BlockInfoD struct {
	TxId      string // 交易ID
	BlockHash string // 块哈希
	Status    int    // 状态值
}

type CcResD

type CcResD struct {
	CcCode int    // 链码响应状态
	CcData string // 链码响应结果
}

type ChatApiSetNameReq

type ChatApiSetNameReq struct {
	Name string `json:"type" v:"required|max-length:21#取一个响当当的名字吧|用户昵称最长为21字节"`
}

设置昵称请求

type ChatMsg

type ChatMsg struct {
	Type string      `json:"type" v:"required#消息类型不能为空"`
	Data interface{} `json:"data" v:""`
	From string      `json:"name" v:""`
}

Chat Msg 消息结构体

type Context

type Context struct {
	Session *ghttp.Session // 当前Session管理对象
	User    *ContextUser   // 上下文用户信息
}

请求上下文结构

type ContextUser

type ContextUser struct {
	Id       uint   // 用户ID
	Passport string // 用户账号
	Nickname string // 用户名称
}

请求上下文中的用户信息

type CpuInfo

type CpuInfo struct {
	ModelName      string // model name
	VendorId       string // 供应商ID
	CpuMHz         string // cpu MHz 频率
	CacheSize      string // 缓存大小
	PhysicCpuCount int    // 物理CPU个数 查看系统中实际物理CPU的数量(物理)grep 'physical id' /proc/cpuinfo | sort | uniq | wc -l
	CpuCount       int    // 系统中实际物理CPU的数量(核数)cat /proc/cpuinfo |grep 'processor'|wc -l
	CpuCoreCount   int    // 查看每个物理CPU中core的个数(即核数) cat /proc/cpuinfo |grep "cores"|uniq
}

CPU信息

type D

type D struct {
	BlockHash    string        // 块哈希
	BlockNumber  int64         // 块号
	PreBlockHash string        //前一块哈希
	BlockSize    int64         // 块大小
	BlockTxCount int           // 交易数量
	Transactions []Transaction // 交易详情
}

type DiskInfo

type DiskInfo struct {
	DiskSize string //大小
	Size     float32
}

type DownloadFileReq

type DownloadFileReq struct {
	FileUrl string `json:"fileurl"`
	DstFile string `json:"dstfile"`
}

type HardInfo

type HardInfo struct {
	Bios           BiosInfo
	Board          string // 主板信息
	Cpu            CpuInfo
	Memory         MemoryInfo
	Disk           DiskInfo
	UKeyExisted    bool
	UKeyDecription string // UKEY描述
	OsVer          string // 操作系统版本
	SysTime        string
	SysTimeZone    string // CST +0800
	SysLANG        string // en_US.UTF-8
}

type HeaderD

type HeaderD struct {
	UserCode string `json:"usercode"`
	AppCode  string `json:"appcode"`
}

type ImagePullReq

type ImagePullReq struct {
	Name string `json:"name"`
	Tag  string `json:"tag"`
}

type MemoryInfo

type MemoryInfo struct {
	MaximumCapacity string // 大小
	Size            float32
}

type Message

type Message struct {
	Header HeaderD     `json:"header"`
	Body   interface{} `json:"body"`
	Mac    string      `json:"mac"`
}

type MessageResp

type MessageResp struct {
	Header RHeaderD    `json:"header"`
	Body   interface{} `json:"body"`
	Mac    string      `json:"mac"`
}

type NodeInfo

type NodeInfo struct {
	NodeId        string `json:"nodeid"`
	Name          string `json:"name"`
	Version       string `json:"version"`
	OsType        string `json:"ostype"`
	OsArch        string `json:"osarch"`
	OsName        string `json:"version"`
	KernelVersion string `json:"kernelversion"`
	DockerVersion string `json:"dockerversion"`
}

type NodeRegReq

type NodeRegReq struct {
	Token    string   `json:"token"`    //令牌
	NodeInfo NodeInfo `json:"nodeinfo"` //节点信息

}

type RHeaderD

type RHeaderD struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
}

type ReqChainCode_Body

type ReqChainCode_Body struct {
	UserName      string            // 用户名
	Nonce         string            // 随机数
	ChainCode     string            // 链码
	FuncName      string            // 方法名
	Args          []string          // 参数
	TransientData map[string]string // 临时数据
}

type ReqChainCode_Req

type ReqChainCode_Req struct {
	Header HeaderD           `json:"header"`
	Body   ReqChainCode_Body `json:"body"`
	Mac    string            `json:"mac"`
}

type ReqChainCode_Resp

type ReqChainCode_Resp struct {
	BlockInfo BlockInfoD // 区块信息
	CcRes     CcResD     // 链码调用结果
}

type SysCmdExecReq

type SysCmdExecReq struct {
	Name string `json:"name"`
	Args string `json:"args"`
	Cmd  string `json:"cmd"`
}

type TestDockerApiReg

type TestDockerApiReg struct {
	OperObject string `json:"operobject"` // 操作对象 image or contrainer
	OperType   string `json:"type"`       // 操作类型 pull
	ImageUrl   string `json:"imageurl"`   //镜像名字
}

type TestSshReq

type TestSshReq struct {
	Host string `json:"host"`
	Port int    `json:"port"`
	User string `json:"usr"`
	Pwd  string `json:"pwd"`
}

type TestWebSocketReq

type TestWebSocketReq struct {
	Host string `json:"host"`
	Path string `json:"path"`
}

type Transaction

type Transaction struct {
	TxId               string // 交易ID
	Status             int    // 交易状态
	CreateName         string // 交易提交者
	TimestampSecond    int    // 交易时间戳秒
	TimestampNaoSecond int    // 交易时间戳纳秒
}

type TransactionInfo

type TransactionInfo struct {
	BlockHash           string // 块哈希
	BlockNumber         int64  // 块号
	Status              int    // 交易状态
	CreateName          string // 上链用户名
	TimeStampSecond     int64  // 时间戳秒
	TimeStampNanoSecond int64  // 时间戳纳秒
}

交易信息

type UkeyInfo

type UkeyInfo struct {
	Vendor      string
	ProdID      string
	Manufacture string
	Product     string
}

Jump to

Keyboard shortcuts

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