Skip to content

Commit

Permalink
style(validator): move validator to gin
Browse files Browse the repository at this point in the history
  • Loading branch information
Aoi-hosizora committed Jul 31, 2020
1 parent c97658e commit 05ec88f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

+ xtime
+ **xgin**
+ xvalidator (`validator.v9`)
+ **xgorm**
+ xredis (`redigo/redis`)
+ xneo4j
Expand Down
9 changes: 9 additions & 0 deletions xgin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@
+ `BuildBasicErrorDto(err interface{}, c *gin.Context) *xdto.ErrorDto`
+ `BuildErrorDto(err interface{}, c *gin.Context, skip int, print bool) *xdto.ErrorDto`
+ `LoggerWithLogrus(logger *logrus.Logger, start time.Time, c *gin.Context)`

### Validator Functions

+ `SetupRegexBinding()`
+ `SetupSpecificRegexpBinding(tag string, re string)`
+ `SetupDateTimeLocBinding(tag string, layout string, loc *time.Location)`
+ `SetupDateTimeBinding(tag string, layout string)`
+ `SetupBinding(tag string, valFunc func(fl validator.FieldLevel) bool)`
+ `IsValidationFormatError(err error) bool`
2 changes: 1 addition & 1 deletion xvalidator/validator.go → xgin/validator.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package xvalidator
package xgin

import (
"github.com/gin-gonic/gin/binding"
Expand Down
10 changes: 0 additions & 10 deletions xvalidator/README.md

This file was deleted.

0 comments on commit 05ec88f

Please sign in to comment.