Documentation
¶
Index ¶
- func AbortBadRequest(c *gin.Context, err error)
- func AbortForbidden(c *gin.Context)
- func AbortInternalServerError(c *gin.Context, err error)
- func AbortNotFound(c *gin.Context)
- func AbortUnauthorized(c *gin.Context)
- func BearerToken(ctx *gin.Context) (string, error)
- func GetClaims(ctx *gin.Context) jwt.MapClaims
- func GetIntegrationId(ctx *gin.Context) string
- func GetLocaleCode(ctx *gin.Context) string
- func GetMemberId(ctx *gin.Context) string
- func GetOrigin(ctx *gin.Context) string
- func GetPlanId(ctx *gin.Context) string
- func GetPlanName(ctx *gin.Context) string
- func GetTrustFundId(ctx *gin.Context) intdeprecated
- func HandleError(c *gin.Context, err striveexceptions.Exception)
- func NoContentResponse(c *gin.Context)
- func OkResponse(c *gin.Context, data interface{})
- func ReadFileFromRequest(req *http.Request, formKey string) ([]byte, string, error)
- func Realm(ctx *gin.Context) string
- func SetClaims(ctx *gin.Context, claims jwt.MapClaims)
- func SetIntegrationId(ctx *gin.Context, integrationId string)
- func SetLocaleCode(ctx *gin.Context, localeCode string)
- func SetPlanId(ctx *gin.Context, planId string)
- func SetPlanName(ctx *gin.Context, planName string)
- func SetTrustFundId(ctx *gin.Context, trustFundId int)deprecated
- func UserId(ctx *gin.Context) string
- func Username(ctx *gin.Context) string
- type Api
- type ApiError
- type ApiResponse
- type ApiRoute
- type EventHandlerError
- type EventHandlerFunc
- type EventRoute
- type MethodType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbortBadRequest ¶
func AbortForbidden ¶
func AbortNotFound ¶
func AbortUnauthorized ¶
func GetIntegrationId ¶
func GetLocaleCode ¶
func GetMemberId ¶
func GetPlanName ¶
func GetTrustFundId
deprecated
func HandleError ¶
func HandleError(c *gin.Context, err striveexceptions.Exception)
func NoContentResponse ¶
func OkResponse ¶
func ReadFileFromRequest ¶
func SetIntegrationId ¶
func SetLocaleCode ¶
func SetPlanName ¶
func SetTrustFundId
deprecated
Types ¶
type ApiError ¶
type ApiError struct { Message string `json:"message"` Path string `json:"path"` Code int `json:"code"` Detail interface{} `json:"detail"` }
func NewErrorCode ¶
type ApiResponse ¶
type ApiResponse struct { Data interface{} `json:"data"` Error *ApiError `json:"error"` }
func (ApiResponse) Serialize ¶
func (r ApiResponse) Serialize() (*string, *string)
func (ApiResponse) ToString ¶
func (r ApiResponse) ToString() string
type ApiRoute ¶
type ApiRoute struct { MethodType MethodType Anonymous bool // Deprecated: Use SkipPlanCheck instead SkipTrustFundCheck bool SkipPlanCheck bool SkipIntegrationCheck bool Path string Handler gin.HandlerFunc }
func (ApiRoute) ShouldCheckPlanId ¶
type EventHandlerError ¶
func FatalEventError ¶
func FatalEventError(err error) *EventHandlerError
func RetriableEventError ¶
func RetriableEventError(err error) *EventHandlerError
type EventHandlerFunc ¶
type EventHandlerFunc func(e event.Event) *EventHandlerError
type EventRoute ¶
type EventRoute struct { AlwaysAck bool Handler EventHandlerFunc Subscription subscribe.Subscription }
Click to show internal directories.
Click to hide internal directories.