From add44e9b08e227658080c693531596289a0c1324 Mon Sep 17 00:00:00 2001 From: GuoYL Date: Wed, 11 Mar 2020 11:29:09 +0800 Subject: [PATCH] #79 do not modify --- pkg/common/common.go | 4 ++-- server/resource/v1/doc_struct.go | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/common/common.go b/pkg/common/common.go index 9dad60a1..4f2f34af 100644 --- a/pkg/common/common.go +++ b/pkg/common/common.go @@ -27,8 +27,8 @@ const ( QueryParamRev = "revision" QueryParamMatch = "match" QueryParamKeyID = "kv_id" - QueryPageNum = "pageNum" - QueryPageSize = "pageSize" + QueryLimit = "limit" + QueryOffset = "offset" ) //http headers diff --git a/server/resource/v1/doc_struct.go b/server/resource/v1/doc_struct.go index e8756bb0..b8de013b 100644 --- a/server/resource/v1/doc_struct.go +++ b/server/resource/v1/doc_struct.go @@ -89,17 +89,17 @@ var ( ParamType: goRestful.QueryParameterKind, Desc: "label pairs,for example &label=service:order&label=version:1.0.0", } - DocQueryPageNumParameters = &restful.Parameters{ + DocQueryLimitParameters = &restful.Parameters{ DataType: "string", - Name: common.QueryPageNum, + Name: common.QueryLimit, ParamType: goRestful.QueryParameterKind, - Desc: "pageNum,for example &pageNum=10", + Desc: "limit,for example &limit=10", } - DocQueryPageSizeParameters = &restful.Parameters{ + DocQueryOffsetParameters = &restful.Parameters{ DataType: "string", - Name: common.QueryPageSize, + Name: common.QueryOffset, ParamType: goRestful.QueryParameterKind, - Desc: "PageSize,for example &pageSize=10", + Desc: "offset,for example &offset=10", } )