Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bind ¶
Changed the c.MustBindWith() -> c.ShouldBindWith(). I don't want to auto return 400 when error happened. origin function is here: https://github.com/gin-gonic/gin/blob/master/context.go
func GenAuthTokens ¶
func GenRandomString ¶
func SetupValidatorOptions ¶
func SetupValidatorOptions()
Types ¶
type CommonError ¶
type CommonError struct { StatusCode int `json:"-"` Message string `json:"message"` Description string `json:"description,omitempty"` }
func NewError ¶
func NewError(statusCode int, errMsg string, descriptionStrings ...string) *CommonError
func (*CommonError) Error ¶
func (ce *CommonError) Error() string
func (*CommonError) H ¶
func (ce *CommonError) H() (int, *CommonError)
type CommonValidationError ¶
func NewValidatorError ¶
func NewValidatorError(err error) CommonValidationError
Click to show internal directories.
Click to hide internal directories.