Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GqlRequest ¶
type GqlRequest struct {
gqlengine.IsGraphQLArguments
Name string `json:"name" gqlDesc:"human name" gqlRequired:"true"`
Unit int `json:"unit" gqlDesc:"height unit" gqlDefault:"1" gqlRequired:"true"`
}
type GqlResult ¶
type GqlResult struct {
gqlengine.IsGraphQLObject `gqlDesc:"gqlresult"` // gqlDesc用于生成描述信息
Code int
Msg string
Total int
Unit int
Name string
MyStringField string // 定义一个字段,gqlengine会根据golang的基本类型自动匹配到graphql类型
MyIntField int `gqlRequired:"true"` // gqlRequired用于标记该字段是必备非空字段
Records string
}
GqlResult 定义了业务的数据结构
func NewMyGqlResult ¶
func NewMyGqlResult() *GqlResult
Click to show internal directories.
Click to hide internal directories.