middleware

package
v0.0.0-...-7f21696 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auther

func Auther() macaron.Handler

Auther checks jwt authentication

func Contexter

func Contexter() macaron.Handler

Contexter initializes a classic context for a request.

func Datasource

func Datasource() macaron.Handler

Types

type Context

type Context struct {
	*macaron.Context
	User        *models.User
	IsAdmin     bool
	IsSigned    bool
	IsBasicAuth bool

	DataSource datasource.DataSource

	Provider string
}

func (*Context) Broadcast

func (*Context) Broadcast(r string, d interface{})

Broadcast sends message via WebSocket to all subscribed to r users

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL