Skip to content

Commit

Permalink
json schema
Browse files Browse the repository at this point in the history
  • Loading branch information
feiin committed Oct 7, 2022
1 parent 9ce6476 commit def2bd5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions captcha.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ type Captcha struct {
}

type CaptchaResult struct {
DrawRects []DrawRect
Text string
ImageBase64 string
DrawRects []DrawRect `json:"draw_rect"`
Text string `json:"text"`
ImageBase64 string `json:"image_base64"`
}

func NewCaptcha(width, height int) *Captcha {
Expand Down
12 changes: 6 additions & 6 deletions point.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package captcha

type Point struct {
X int
Y int
X int `json:"x"`
Y int `json:"y"`
}

type DrawRect struct {
X int
Y int
Width int
Height int
X int `json:"x"`
Y int `json:"y"`
Width int `json:"width"`
Height int `json:"height"`
}

func NewPoint(x int, y int) *Point {
Expand Down

0 comments on commit def2bd5

Please sign in to comment.