@@ -15,6 +15,27 @@ const docTemplate = `{
1515 "host": "{{.Host}}",
1616 "basePath": "{{.BasePath}}",
1717 "paths": {
18+ "/health": {
19+ "get": {
20+ "description": "Checks the health status of the application.",
21+ "produces": [
22+ "application/json"
23+ ],
24+ "tags": [
25+ "Health Check"
26+ ],
27+ "summary": "Health Check",
28+ "responses": {
29+ "200": {
30+ "description": "OK",
31+ "schema": {
32+ "type": "object",
33+ "additionalProperties": true
34+ }
35+ }
36+ }
37+ }
38+ },
1839 "/login": {
1940 "get": {
2041 "description": "Authenticates a user using Basic Authentication and returns user information.",
@@ -49,6 +70,138 @@ const docTemplate = `{
4970 }
5071 }
5172 },
73+ "/thumbs": {
74+ "get": {
75+ "description": "Get a list of all thumbnail processes",
76+ "produces": [
77+ "application/json"
78+ ],
79+ "tags": [
80+ "Video Thumbs Processor"
81+ ],
82+ "summary": "List all thumbnail processes",
83+ "responses": {
84+ "200": {
85+ "description": "OK",
86+ "schema": {
87+ "type": "array",
88+ "items": {
89+ "$ref": "#/definitions/handler.ThumbProcessResponse"
90+ }
91+ }
92+ },
93+ "500": {
94+ "description": "Internal Server Error",
95+ "schema": {
96+ "$ref": "#/definitions/handler.ErrorResponse"
97+ }
98+ }
99+ }
100+ },
101+ "post": {
102+ "description": "Start a new asynchronous thumbnail generation process from S3 video URL",
103+ "consumes": [
104+ "application/json"
105+ ],
106+ "produces": [
107+ "application/json"
108+ ],
109+ "tags": [
110+ "Video Thumbs Processor"
111+ ],
112+ "summary": "Create a new thumbnail process",
113+ "parameters": [
114+ {
115+ "description": "Video URL",
116+ "name": "request",
117+ "in": "body",
118+ "required": true,
119+ "schema": {
120+ "$ref": "#/definitions/handler.CreateProcessRequest"
121+ }
122+ }
123+ ],
124+ "responses": {
125+ "202": {
126+ "description": "Process started",
127+ "schema": {
128+ "type": "string"
129+ }
130+ },
131+ "400": {
132+ "description": "Bad Request",
133+ "schema": {
134+ "$ref": "#/definitions/handler.ErrorResponse"
135+ }
136+ },
137+ "500": {
138+ "description": "Internal Server Error",
139+ "schema": {
140+ "$ref": "#/definitions/handler.ErrorResponse"
141+ }
142+ }
143+ }
144+ }
145+ },
146+ "/thumbs/{id}": {
147+ "put": {
148+ "description": "Update the status of an existing thumbnail process",
149+ "consumes": [
150+ "application/json"
151+ ],
152+ "produces": [
153+ "application/json"
154+ ],
155+ "tags": [
156+ "Video Thumbs Processor"
157+ ],
158+ "summary": "Update a thumbnail process",
159+ "parameters": [
160+ {
161+ "type": "string",
162+ "description": "Process ID",
163+ "name": "id",
164+ "in": "path",
165+ "required": true
166+ },
167+ {
168+ "description": "Process update information",
169+ "name": "request",
170+ "in": "body",
171+ "required": true,
172+ "schema": {
173+ "$ref": "#/definitions/handler.UpdateProcessRequest"
174+ }
175+ }
176+ ],
177+ "responses": {
178+ "200": {
179+ "description": "OK",
180+ "schema": {
181+ "$ref": "#/definitions/handler.ThumbProcessResponse"
182+ }
183+ },
184+ "400": {
185+ "description": "Bad Request",
186+ "schema": {
187+ "$ref": "#/definitions/handler.ErrorResponse"
188+ }
189+ },
190+ "404": {
191+ "description": "Not Found",
192+ "schema": {
193+ "$ref": "#/definitions/handler.ErrorResponse"
194+ }
195+ },
196+ "500": {
197+ "description": "Internal Server Error",
198+ "schema": {
199+ "$ref": "#/definitions/handler.ErrorResponse"
200+ }
201+ }
202+ }
203+ }
204+ },
52205 "/user": {
53206 "post": {
54207 "description": "Creates a new user with the provided nickname and password.",
@@ -87,6 +240,17 @@ const docTemplate = `{
87240 }
88241 },
89242 "definitions": {
243+ "handler.CreateProcessRequest": {
244+ "type": "object",
245+ "required": [
246+ "url"
247+ ],
248+ "properties": {
249+ "url": {
250+ "type": "string"
251+ }
252+ }
253+ },
90254 "handler.CreateUserRequest": {
91255 "type": "object",
92256 "required": [
@@ -101,6 +265,54 @@ const docTemplate = `{
101265 "type": "string"
102266 }
103267 }
268+ },
269+ "handler.ErrorResponse": {
270+ "type": "object",
271+ "properties": {
272+ "error": {
273+ "type": "string"
274+ }
275+ }
276+ },
277+ "handler.ThumbProcessResponse": {
278+ "type": "object",
279+ "properties": {
280+ "created_at": {
281+ "type": "string"
282+ },
283+ "error": {
284+ "type": "string"
285+ },
286+ "id": {
287+ "type": "string"
288+ },
289+ "status": {
290+ "type": "string"
291+ },
292+ "thumbnail_path": {
293+ "type": "string"
294+ },
295+ "updated_at": {
296+ "type": "string"
297+ }
298+ }
299+ },
300+ "handler.UpdateProcessRequest": {
301+ "type": "object",
302+ "required": [
303+ "status"
304+ ],
305+ "properties": {
306+ "error": {
307+ "type": "string"
308+ },
309+ "status": {
310+ "type": "string"
311+ },
312+ "thumbnail_path": {
313+ "type": "string"
314+ }
315+ }
104316 }
105317 }
106318}`
0 commit comments