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 BuildResponse(res *http.Response, err error, output any) error
- func DoDelete(client *http.Client, url string, params any, output any, token string) error
- func DoDeleteBehalfOf(client *http.Client, url string, params any, output any, token string, ...) error
- func DoGet(client *http.Client, url string, output any, token string) error
- func DoGetOnBehalfOf(client *http.Client, url string, output any, token string, onBehalfOf string) error
- func DoPost(client *http.Client, url string, params any, output any, token string) error
- func DoPostOnBehalfOf(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 DoPutBehalfOf(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 NewServiceUnavailableError(message string, params ...any) error
- func NewUnprocessableEntityError(message string, params ...any) 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 ( ApplicationJson = "application/json" OnBehalfOf = "OnBehalfOf" )
View Source
const MaxQueryLimit = 5000
Variables ¶
This section is empty.
Functions ¶
func DoDeleteBehalfOf ¶
func DoGetOnBehalfOf ¶
func DoPostOnBehalfOf ¶
func DoPutBehalfOf ¶
func NewBadRequestError ¶
func NewForbiddenError ¶
func NewNotFoundError ¶
func NewServerError ¶
func NewServerErrorByError ¶
func ReturnError ¶
func ReturnForbiddenError ¶
func ReturnList ¶
func ReturnUnauthorizedError ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.