Documentation
¶
Index ¶
- func CORS() gin.HandlerFunc
- func CallerMiddleware(jwtSecret string, database *gorm.DB) gin.HandlerFunc
- func ClientUpdateMiddleware(cfg *config.ClientUpdateConfig) gin.HandlerFunc
- func CompareVersions(left string, right string) int
- func Logger(whitelist ...string) gin.HandlerFunc
- func StaticAuth(staticAPIKey, jwtSecret string, db *gorm.DB) gin.HandlerFunc
- type ClientUpdateRequiredResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CORS ¶
func CORS() gin.HandlerFunc
func CallerMiddleware ¶
func CallerMiddleware(jwtSecret string, database *gorm.DB) gin.HandlerFunc
CallerMiddleware .
func ClientUpdateMiddleware ¶ added in v0.1.13
func ClientUpdateMiddleware(cfg *config.ClientUpdateConfig) gin.HandlerFunc
ClientUpdateMiddleware blocks business APIs when a known client app is below the minimum supported version.
func CompareVersions ¶ added in v0.1.13
CompareVersions compares two dotted semantic versions.
func StaticAuth ¶ added in v0.1.4
func StaticAuth(staticAPIKey, jwtSecret string, db *gorm.DB) gin.HandlerFunc
Types ¶
type ClientUpdateRequiredResponse ¶ added in v0.1.13
type ClientUpdateRequiredResponse struct {
ForceUpdate bool `json:"force_update"`
App string `json:"app,omitempty"`
CurrentVersion string `json:"current_version,omitempty"`
MinSupportedVersion string `json:"min_supported_version,omitempty"`
LatestVersion string `json:"latest_version,omitempty"`
UpdateURL string `json:"update_url,omitempty"`
Message string `json:"message"`
}
ClientUpdateRequiredResponse describes why a client must update before continuing.
Click to show internal directories.
Click to hide internal directories.