server

package
v0.0.0-...-b4acfce Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MB = 1 << 20
)

Variables

This section is empty.

Functions

func NewJWT

func NewJWT(claims *CustomClaims) (string, error)

Types

type CustomClaims

type CustomClaims struct {
	jwt.StandardClaims
	User *UserClaim `json:"user"`
}

func NewCustomPayload

func NewCustomPayload(user *UserClaim, expire int64) *CustomClaims

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(db *storage.Database, fb facebook.Interface, courseLogic *service.CourseLogic, logger *logrus.Logger) *Server

func (*Server) Handle

func (srv *Server) Handle() http.Handler

Handle creates an http handler

func (*Server) ParseFormCollection

func (srv *Server) ParseFormCollection(r *http.Request, typeName string) []map[string]string

type TokenCheckMiddleware

type TokenCheckMiddleware struct{}

TokenCheckMiddleware asserts if request allows for asynchronous response

func (TokenCheckMiddleware) ServeHTTP

ServeHTTP handling asynchronous HTTP requests in Open Service Broker Api

type UserClaim

type UserClaim struct {
	ID    uint
	Email string
}

func ParseJWT

func ParseJWT(token string) (*UserClaim, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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