Documentation
¶
Index ¶
- type AccessLog
- type Api
- type ApiBackendConfig
- type BackendParameter
- type CreateApi
- type CreateRevision
- type DebugApi
- type DebugReturnMessage
- type Deploy
- type Deployment
- type EncryptInput
- type GenerateInfo
- type HufuApi
- type ImportApi
- type IsEncryptDataInput
- type Parameter
- type RevisionList
- type UpdateRevision
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct {
/* apiId (Optional) */
ApiId string `json:"apiId"`
/* 分组ID (Optional) */
ApiGroupId string `json:"apiGroupId"`
/* 名称 (Optional) */
ApiName string `json:"apiName"`
/* 动作 (Optional) */
Action string `json:"action"`
/* 请求路径 (Optional) */
Path string `json:"path"`
/* 匹配模式:1."absolute"(绝对匹配); 2."prefix"(前缀匹配); (Optional) */
MatchType string `json:"matchType"`
/* 后端类型,为空或null时前端显示未设置 (Optional) */
BackServiceType string `json:"backServiceType"`
/* 描述 (Optional) */
Description string `json:"description"`
/* 请求参数列表 (Optional) */
ReqParams []Parameter `json:"reqParams"`
/* 请求格式 (Optional) */
ReqBody string `json:"reqBody"`
/* 返回格式 (Optional) */
ResBody string `json:"resBody"`
/* 请求格式类型,1:application/json,2:text/xml,3:其他 (Optional) */
ReqBodyType int `json:"reqBodyType"`
/* 返回格式类型,1:application/json,2:text/xml,3:其他 (Optional) */
ResBodyType int `json:"resBodyType"`
/* api后端配置 (Optional) */
ApiBackendConfig ApiBackendConfig `json:"apiBackendConfig"`
/* 应用类型ID,云鼎业务线专用 (Optional) */
HufuAppTypeId int `json:"hufuAppTypeId"`
/* 当前分组版本,发布的环境信息 (Optional) */
DeploymentEnvironment []string `json:"deploymentEnvironment"`
/* 请求格式类型,当reqBodyType等于3时,使用该请求格式类型 (Optional) */
EditableReqBodyType string `json:"editableReqBodyType"`
/* 响应格式类型,当resBodyType等于3时,使用该响应格式类型 (Optional) */
EditableResBodyType string `json:"editableResBodyType"`
/* waf状态,如:observe,deny,off (Optional) */
WafStatus string `json:"wafStatus"`
/* 请求体格式类型,1代表jsonschema,2代表swagger,默认为1 (Optional) */
ReqBodyFormatType int `json:"reqBodyFormatType"`
/* 返回体格式类型,1代表jsonschema,2代表swagger,默认为1 (Optional) */
ResBodyFormatType int `json:"resBodyFormatType"`
}
type ApiBackendConfig ¶
type ApiBackendConfig struct {
/* 后端路径 (Optional) */
BackendPath string `json:"backendPath"`
/* 后端请求方式 (Optional) */
BackendAction string `json:"backendAction"`
/* 后端参数列表 (Optional) */
BackendParams []BackendParameter `json:"backendParams"`
/* 后端常量参数列表 (Optional) */
BackendConstParams []Parameter `json:"backendConstParams"`
}
type BackendParameter ¶
type BackendParameter struct {
/* 后端名称 (Optional) */
BackendName string `json:"backendName"`
/* 后端参数位置 (Optional) */
BackendParamLocation string `json:"backendParamLocation"`
/* 入参名称 (Optional) */
Name string `json:"name"`
/* 入参位置 (Optional) */
ParamLocation string `json:"paramLocation"`
/* 入参类型 (Optional) */
ParamType string `json:"paramType"`
}
type CreateApi ¶
type CreateApi struct {
/* 分组ID */
ApiGroupId string `json:"apiGroupId"`
/* 名称 */
ApiName string `json:"apiName"`
/* 动作 */
Action string `json:"action"`
/* 请求路径 */
Path string `json:"path"`
/* 匹配模式:"absolute"(绝对匹配); "prefix"(前缀匹配); */
MatchType string `json:"matchType"`
/* 描述 (Optional) */
Description string `json:"description"`
/* 请求参数列表 (Optional) */
ReqParams []Parameter `json:"reqParams"`
/* 请求格式 (Optional) */
ReqBody string `json:"reqBody"`
/* 返回格式 (Optional) */
ResBody string `json:"resBody"`
/* 请求格式类型,1:application/json,2:text/xml,3:其他 */
ReqBodyType int `json:"reqBodyType"`
/* 返回格式类型,1:application/json,2:text/xml,3:其他 (Optional) */
ResBodyType int `json:"resBodyType"`
/* api后端配置 (Optional) */
ApiBackendConfig ApiBackendConfig `json:"apiBackendConfig"`
/* 后端服务类型,如HTTP/HTTPS,mock,funcion等 (Optional) */
BackServiceType string `json:"backServiceType"`
/* 后端服务地址,如后端服务地址,funtion路径等 (Optional) */
BackServicePath string `json:"backServicePath"`
/* 后端服务ID,如函数ID等 (Optional) */
BackServiceId string `json:"backServiceId"`
/* 后端服务名称,如函数名称 (Optional) */
BackServiceName string `json:"backServiceName"`
/* 后端地址 (Optional) */
BackUrl string `json:"backUrl"`
/* 后端服务配置,为true时,采用与分组统一的配置,初始创建api时请设置为True。 */
BackServiceConfig bool `json:"backServiceConfig"`
/* 后端服务版本,如函数版本名称 (Optional) */
BackServiceVersion string `json:"backServiceVersion"`
/* 应用类型ID,云鼎业务线专用 (Optional) */
HufuAppTypeId int `json:"hufuAppTypeId"`
/* 请求格式类型,当reqBodyType等于3时,使用该请求格式类型 (Optional) */
EditableReqBodyType string `json:"editableReqBodyType"`
/* 响应格式类型,当resBodyType等于3时,使用该响应格式类型 (Optional) */
EditableResBodyType string `json:"editableResBodyType"`
/* 请求体格式类型,1代表jsonschema,2代表swagger,默认为1 (Optional) */
ReqBodyFormatType int `json:"reqBodyFormatType"`
/* 返回提格式类型,1代表jsonschema,2代表swagger,默认为1 (Optional) */
ResBodyFormatType int `json:"resBodyFormatType"`
}
type CreateRevision ¶
type DebugApi ¶
type DebugApi struct {
/* assessKey:京东云用户、API调用者、订阅密钥key (Optional) */
AssessKey string `json:"assessKey"`
/* secretKey:京东云用户、API调用者 (Optional) */
SecretKey string `json:"secretKey"`
/* 请求host */
Host string `json:"host"`
/* 请求uri,分组路径前缀+API请求路径,如:/todo/api/v1/creatApi */
Uri string `json:"uri"`
/* 请求方式 */
Method string `json:"method"`
/* 访问授权方式:None(免鉴权),jd_cloud(京东云用户),jd_apikms(API调用者),jd_subscription_key(订阅密钥) */
AuthType string `json:"authType"`
/* api所属region */
Region string `json:"region"`
/* query参数,用&分隔,如:id=1&version=v1 (Optional) */
QueryString string `json:"queryString"`
/* body参数,传json字符串的base64编码,例如body的值为:{"title":"desk","desc":"cheap"},应传值为:"eyJ0aXRsZSI6ImRlc2siLCJkZXNjIjoiY2hlYXAifQ==" (Optional) */
Body string `json:"body"`
/* 请求格式类型,1:application/json,2:text/xml,3:其他 */
ReqBodyType string `json:"reqBodyType"`
/* 请求格式类型,当reqBodyType等于3时,使用该请求格式类型 (Optional) */
EditableReqBodyType string `json:"editableReqBodyType"`
/* header参数,传json字符串 (Optional) */
HeaderString string `json:"headerString"`
}
type DebugReturnMessage ¶
type DebugReturnMessage struct {
/* 请求地址 (Optional) */
RequestUrl string `json:"requestUrl"`
/* request中header信息 (Optional) */
RequestHeader string `json:"requestHeader"`
/* request中body信息 (Optional) */
RequestBody string `json:"requestBody"`
/* 响应状态码 (Optional) */
ResponseCodeStatus string `json:"responseCodeStatus"`
/* header返回值 (Optional) */
ResponseHeaderValue string `json:"responseHeaderValue"`
/* body返回值 (Optional) */
ResponseBody string `json:"responseBody"`
}
type Deploy ¶ added in v1.33.0
type Deploy struct {
/* 发布的修订版本号 */
Revision string `json:"revision"`
/* 环境:test、preview、online */
Environment string `json:"environment"`
/* 后端服务类型:mock、unique、vpc (Optional) */
BackendServiceType string `json:"backendServiceType"`
/* 后端地址 (Optional) */
BackendUrl string `json:"backendUrl"`
/* 描述 (Optional) */
Description string `json:"description"`
/* 微服务网关名称 (Optional) */
JdsfName string `json:"jdsfName"`
/* 微服务注册中心ID (Optional) */
JdsfRegistryName string `json:"jdsfRegistryName"`
/* 微服务ID (Optional) */
JdsfId string `json:"jdsfId"`
}
type Deployment ¶
type Deployment struct {
/* 部署ID (Optional) */
DeploymentId string `json:"deploymentId"`
/* 发布的修订版本号 (Optional) */
Revision string `json:"revision"`
/* 路径 (Optional) */
Path string `json:"path"`
/* 环境:test、preview、online (Optional) */
Environment string `json:"environment"`
/* 后端服务类型:mock、unique、vpc (Optional) */
BackendServiceType string `json:"backendServiceType"`
/* 后端地址 (Optional) */
BackendUrl string `json:"backendUrl"`
/* 描述 (Optional) */
Description string `json:"description"`
/* 发布日期,格式为毫秒级时间戳 (Optional) */
CreateTime int64 `json:"createTime"`
/* 微服务网关名称 (Optional) */
JdsfName string `json:"jdsfName"`
/* 微服务注册中心ID (Optional) */
JdsfRegistryName string `json:"jdsfRegistryName"`
/* 微服务ID (Optional) */
JdsfId string `json:"jdsfId"`
}
type EncryptInput ¶
type EncryptInput struct {
/* 明文 (Optional) */
Plaintext string `json:"plaintext"`
}
type GenerateInfo ¶
type HufuApi ¶
type HufuApi struct {
/* API ID (Optional) */
ApiId string `json:"apiId"`
/* 分组ID (Optional) */
ApiGroupId string `json:"apiGroupId"`
/* api状态 (Optional) */
ApiStatus string `json:"apiStatus"`
/* 名称 (Optional) */
ApiName string `json:"apiName"`
/* 描述 (Optional) */
Description string `json:"description"`
/* 应用类型ID,云鼎业务线专用 (Optional) */
HufuAppTypeId int `json:"hufuAppTypeId"`
}
type IsEncryptDataInput ¶ added in v1.33.0
type IsEncryptDataInput struct {
/* 密文 (Optional) */
Cipher string `json:"cipher"`
}
type Parameter ¶
type Parameter struct {
/* 名称 (Optional) */
Name string `json:"name"`
/* 描述 (Optional) */
Description string `json:"description"`
/* 参数位置 (Optional) */
ParamLocation string `json:"paramLocation"`
/* 参数类型 (Optional) */
ParamType string `json:"paramType"`
/* 默认值 (Optional) */
DefaultValue string `json:"defaultValue"`
/* 默认值 (Optional) */
IsRequired bool `json:"isRequired"`
}
type RevisionList ¶
type RevisionList struct {
/* 版本Id (Optional) */
RevisionId string `json:"revisionId"`
/* 修订版本号 (Optional) */
Revision string `json:"revision"`
/* 基于此版本 (Optional) */
BaseRevision string `json:"baseRevision"`
/* 发布环境 (Optional) */
Environment string `json:"environment"`
/* 修订日期 (Optional) */
CreatedAt string `json:"createdAt"`
/* 修订备注 (Optional) */
RevisionNote string `json:"revisionNote"`
}
type UpdateRevision ¶
type UpdateRevision struct {
/* 修订备注 (Optional) */
RevisionNote string `json:"revisionNote"`
}
Click to show internal directories.
Click to hide internal directories.