api

package
v0.0.0-...-c0a108e Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(key string, authenticator func(c *gin.Context) (*models.User, error)) *jwt.GinJWTMiddleware

AuthMiddleware : ...

Types

type Server

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

func NewServer

func NewServer(g *gin.Engine, userSvc *services.User, config *config.Config) *Server

NewServer : userSvc

func (*Server) Authenticate

func (s *Server) Authenticate(c *gin.Context) (*models.User, error)

Authenticate : login by email and password

func (*Server) DefaultWelcome

func (s *Server) DefaultWelcome(c *gin.Context)

DefaultWelcome : ...

func (*Server) Register

func (s *Server) Register(c *gin.Context)

Register : ...

func (*Server) Routes

func (s *Server) Routes(authMw *jwt.GinJWTMiddleware)

Routes : ...

func (*Server) Subscribe

func (s *Server) Subscribe(c *gin.Context)

Subscribe : ...

func (*Server) Welcome

func (s *Server) Welcome(c *gin.Context)

Welcome : ...

Jump to

Keyboard shortcuts

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