Init: lab4 done

This commit is contained in:
2025-11-07 05:26:09 +08:00
commit b55f254d82
23 changed files with 1140 additions and 0 deletions

61
docs/swagger.yaml Normal file
View File

@@ -0,0 +1,61 @@
basePath: /
definitions:
handlers.PostUrlInput:
properties:
url:
type: string
type: object
models.UrlState:
properties:
isSuccess:
type: boolean
latency:
type: integer
url:
type: string
type: object
info:
contact: {}
license:
name: 0BSD
termsOfService: http://swagger.io/terms
title: Golang Lab4
version: 0.0.1-rc1
paths:
/url:
delete:
parameters:
- description: url
in: query
name: url
required: true
type: string
responses:
"200":
description: OK
get:
parameters:
- description: url
in: query
name: url
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.UrlState'
post:
consumes:
- application/json
parameters:
- description: query params
in: body
name: request
required: true
schema:
$ref: '#/definitions/handlers.PostUrlInput'
responses:
"200":
description: OK
swagger: "2.0"