Documentation ¶
Index ¶
- Variables
- func AuthAdminMiddleware(ctx *gin.Context)
- func AuthRoom(Authorization string) (*op.UserEntry, *op.RoomEntry, error)
- func AuthRoomAdminMiddleware(ctx *gin.Context)
- func AuthRoomCreatorMiddleware(ctx *gin.Context)
- func AuthRoomMiddleware(ctx *gin.Context)
- func AuthRootMiddleware(ctx *gin.Context)
- func AuthUser(Authorization string) (*op.UserEntry, error)
- func AuthUserMiddleware(ctx *gin.Context)
- func GetAuthorizationTokenFromContext(ctx *gin.Context) (string, error)
- func Init(e *gin.Engine)
- func NewAuthRoomToken(user *op.User, room *op.Room) (string, error)
- func NewAuthUserToken(user *op.User) (string, error)
- func NewCors() gin.HandlerFunc
- func NewDistCacheControl(prefix string) gin.HandlerFunc
- func NewLimiter(Period time.Duration, Limit int64, options ...limiter.Option) gin.HandlerFunc
- func NewLog(l *logrus.Logger) gin.HandlerFunc
- func NewQuic() gin.HandlerFunc
- type AuthClaims
- type AuthRoomClaims
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAuthFailed = errors.New("auth failed") ErrAuthExpired = errors.New("auth expired") )
Functions ¶
func AuthAdminMiddleware ¶ added in v0.3.0
func AuthRoomAdminMiddleware ¶ added in v0.5.0
func AuthRoomCreatorMiddleware ¶ added in v0.5.0
func AuthRoomMiddleware ¶ added in v0.3.0
func AuthRootMiddleware ¶ added in v0.3.0
func AuthUserMiddleware ¶ added in v0.3.0
func GetAuthorizationTokenFromContext ¶ added in v0.3.5
func NewAuthRoomToken ¶ added in v0.3.0
func NewCors ¶
func NewCors() gin.HandlerFunc
func NewDistCacheControl ¶ added in v0.3.0
func NewDistCacheControl(prefix string) gin.HandlerFunc
func NewLimiter ¶ added in v0.3.0
func NewQuic ¶
func NewQuic() gin.HandlerFunc
Types ¶
type AuthClaims ¶ added in v0.2.4
type AuthRoomClaims ¶ added in v0.3.0
type AuthRoomClaims struct { AuthClaims RoomId string `json:"r"` RoomVersion uint32 `json:"rv"` }
Click to show internal directories.
Click to hide internal directories.