Documentation
¶
Index ¶
- Constants
- func AddClient(id string, caCert string, clientCert string, clientKey string)
- func BindParamsFromBody(c *gin.Context, obj any) (err error)
- func BindParamsFromQuery(c *gin.Context, obj any) (err error)
- func DoDelete(client *http.Client, url string, output any, token string) error
- func DoGet(client *http.Client, url string, output any, token string) error
- func DoPost(client *http.Client, url string, params any, output any, token string) error
- func DoPut(client *http.Client, url string, params any, output any, token string) error
- func GetClient(id string) *http.Client
- func GetId2FromUrl(c *gin.Context) (uint, error)
- func GetIdFromUrl(c *gin.Context) (uint, error)
- func GetPagingParams(c *gin.Context) (offset int, limit int, errV error)
- func GetParamAsBool(c *gin.Context, name string, defValue bool) (bool, error)
- func GetParamAsInt(c *gin.Context, name string, defValue int) (int, error)
- func GetParamAsString(c *gin.Context, name string, defValue string) string
- func NewBadRequestError(message string, params ...any) error
- func NewForbiddenError(message string, params ...any) error
- func NewNotFoundError(message string, params ...any) error
- func NewServerError(message string, params ...any) error
- func NewServerErrorByError(err error) error
- func ReturnError(c *gin.Context, err error)
- func ReturnForbiddenError(c *gin.Context, message string)
- func ReturnList(c *gin.Context, result any, offset int, limit int, size int) error
- func ReturnUnauthorizedError(c *gin.Context, message string)
- type AppError
Constants ¶
View Source
const MaxQueryLimit = 5000
Variables ¶
This section is empty.
Functions ¶
func GetParamAsBool ¶ added in v1.6.0
func GetParamAsInt ¶ added in v1.6.0
func GetParamAsString ¶ added in v1.7.3
func NewBadRequestError ¶ added in v1.6.0
func NewForbiddenError ¶ added in v1.6.0
func NewNotFoundError ¶ added in v1.6.0
func NewServerError ¶
func NewServerErrorByError ¶
func ReturnError ¶
func ReturnForbiddenError ¶ added in v1.1.0
func ReturnList ¶
func ReturnUnauthorizedError ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.