@@ -32,34 +32,71 @@ var doc = `{
3232 "basePath": "{{.BasePath}}",
3333 "paths": {
3434 "/work_api/api/v1/service": {
35- "put": {
36- "description": "更新服务全部参数接口",
37- "consumes": [
38- "application/json"
39- ],
35+ "get": {
36+ "description": "获取服务列表接口",
4037 "produces": [
4138 "application/json"
4239 ],
4340 "tags": [
4441 "服务相关接口"
4542 ],
46- "summary": "更新服务全部参数接口 ",
43+ "summary": "获取服务列表接口 ",
4744 "parameters": [
4845 {
49- "description": "请求参数",
50- "name": "data",
51- "in": "body",
52- "required": true,
53- "schema": {
54- "$ref": "#/definitions/logics.CUServiceReq"
55- }
46+ "type": "string",
47+ "description": "服务负责人",
48+ "name": "author_email",
49+ "in": "query"
50+ },
51+ {
52+ "type": "string",
53+ "name": "create_time",
54+ "in": "query"
55+ },
56+ {
57+ "type": "integer",
58+ "name": "id",
59+ "in": "query"
60+ },
61+ {
62+ "type": "integer",
63+ "name": "page_num",
64+ "in": "query"
65+ },
66+ {
67+ "type": "integer",
68+ "name": "page_size",
69+ "in": "query"
70+ },
71+ {
72+ "type": "string",
73+ "description": "服务端口",
74+ "name": "ports",
75+ "in": "query"
76+ },
77+ {
78+ "type": "string",
79+ "description": "服务名称",
80+ "name": "svc_name",
81+ "in": "query"
82+ },
83+ {
84+ "type": "string",
85+ "description": "服务类型",
86+ "name": "svc_type",
87+ "in": "query"
88+ },
89+ {
90+ "type": "string",
91+ "name": "update_time",
92+ "in": "query"
5693 }
5794 ],
5895 "responses": {
5996 "200": {
60- "description": "更新成功返回结果 ",
97+ "description": "服务列表返回结果 ",
6198 "schema": {
62- "$ref": "#/definitions/models.Service "
99+ "$ref": "#/definitions/logics.ServiceRes "
63100 }
64101 }
65102 }
@@ -95,62 +132,69 @@ var doc = `{
95132 }
96133 }
97134 }
98- },
99- "patch": {
100- "description": "更新服务部分参数接口",
101- "consumes": [
102- "application/json"
103- ],
135+ }
136+ },
137+ "/work_api/api/v1/service/{id}": {
138+ "get": {
139+ "description": "获取单个服务接口",
104140 "produces": [
105141 "application/json"
106142 ],
107143 "tags": [
108144 "服务相关接口"
109145 ],
110- "summary": "更新服务部分参数接口 ",
146+ "summary": "获取单个服务接口 ",
111147 "parameters": [
112148 {
113- "description": "请求参数",
114- "name": "data",
115- "in": "body",
116- "required": true,
117- "schema": {
118- "$ref": "#/definitions/logics.ServiceReq"
119- }
149+ "type": "integer",
150+ "description": "id",
151+ "name": "id",
152+ "in": "path",
153+ "required": true
120154 }
121155 ],
122156 "responses": {
123157 "200": {
124- "description": "更新成功返回结果 ",
158+ "description": "服务返回结果 ",
125159 "schema": {
126160 "$ref": "#/definitions/models.Service"
127161 }
128162 }
129163 }
130- }
131- },
132- "/work_api/api/v1/service/{id}": {
133- "get": {
134- "description": "获取单个服务接口",
164+ },
165+ "put": {
166+ "description": "更新服务全部参数接口",
167+ "consumes": [
168+ "application/json"
169+ ],
135170 "produces": [
136171 "application/json"
137172 ],
138173 "tags": [
139174 "服务相关接口"
140175 ],
141- "summary": "获取单个服务接口 ",
176+ "summary": "更新服务全部参数接口 ",
142177 "parameters": [
143178 {
144179 "type": "integer",
145180 "description": "id",
146181 "name": "id",
147182 "in": "path",
148183 "required": true
184+ },
185+ {
186+ "description": "请求参数",
187+ "name": "data",
188+ "in": "body",
189+ "required": true,
190+ "schema": {
191+ "$ref": "#/definitions/logics.CUServiceReq"
192+ }
149193 }
150194 ],
151195 "responses": {
152196 "200": {
153- "description": "服务返回结果 ",
197+ "description": "更新成功返回结果 ",
154198 "schema": {
155199 "$ref": "#/definitions/models.Service"
156200 }
@@ -180,74 +224,42 @@ var doc = `{
180224 "description": ""
181225 }
182226 }
183- }
184- },
185- "/work_api/api/v1/services": {
186- "get": {
187- "description": "获取服务列表接口",
227+ },
228+ "patch": {
229+ "description": "更新服务部分参数接口",
230+ "consumes": [
231+ "application/json"
232+ ],
188233 "produces": [
189234 "application/json"
190235 ],
191236 "tags": [
192237 "服务相关接口"
193238 ],
194- "summary": "获取服务列表接口 ",
239+ "summary": "更新服务部分参数接口 ",
195240 "parameters": [
196- {
197- "type": "string",
198- "description": "服务负责人",
199- "name": "author_email",
200- "in": "query"
201- },
202- {
203- "type": "string",
204- "name": "create_time",
205- "in": "query"
206- },
207241 {
208242 "type": "integer",
243+ "description": "id",
209244 "name": "id",
210- "in": "query"
211- },
212- {
213- "type": "integer",
214- "name": "page_num",
215- "in": "query"
216- },
217- {
218- "type": "integer",
219- "name": "page_size",
220- "in": "query"
221- },
222- {
223- "type": "string",
224- "description": "服务端口",
225- "name": "ports",
226- "in": "query"
227- },
228- {
229- "type": "string",
230- "description": "服务名称",
231- "name": "svc_name",
232- "in": "query"
233- },
234- {
235- "type": "string",
236- "description": "服务类型",
237- "name": "svc_type",
238- "in": "query"
245+ "in": "path",
246+ "required": true
239247 },
240248 {
241- "type": "string",
242- "name": "update_time",
243- "in": "query"
249+ "description": "请求参数",
250+ "name": "data",
251+ "in": "body",
252+ "required": true,
253+ "schema": {
254+ "$ref": "#/definitions/logics.ServiceReq"
255+ }
244256 }
245257 ],
246258 "responses": {
247259 "200": {
248- "description": "服务列表返回结果 ",
260+ "description": "更新成功返回结果 ",
249261 "schema": {
250- "$ref": "#/definitions/logics.ServiceRes "
262+ "$ref": "#/definitions/models.Service "
251263 }
252264 }
253265 }
@@ -379,7 +391,7 @@ type swaggerInfo struct {
379391// SwaggerInfo holds exported Swagger Info so clients can modify it
380392var SwaggerInfo = swaggerInfo {
381393 Version : "1.0" ,
382- Host : "work-api.xxx.com" ,
394+ Host : "work-api.xxx.com:2345 " ,
383395 BasePath : "/" ,
384396 Schemes : []string {},
385397 Title : "work_api" ,
0 commit comments