handlers

package
v0.0.0-...-e2dd9e7 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: Unlicense Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const RequestContextKey = "request_context"

Variables

This section is empty.

Functions

func GlobalMiddleware

func GlobalMiddleware() gin.HandlerFunc

func HandlerAPI

func HandlerAPI(mustBeAuthenticate bool, f func(ctx *context.Context, c *gin.Context) error) gin.HandlerFunc

HandlerAPI .

func HandlerPage

func HandlerPage(mustBeAuthenticate bool, f func(ctx *context.Context, c *gin.Context) error) gin.HandlerFunc

HandlerPage provide abstractionn for page handler receive the context of application.

Types

type HTTPHandler

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

HTTPHandler .

func NewHTTPHandler

func NewHTTPHandler(
	authService ports.AuthService,
	stockService ports.StockService,
) *HTTPHandler

NewHTTPHandler new account handler

func (*HTTPHandler) AuthLogin

func (hdl *HTTPHandler) AuthLogin(ctx *context.Context, c *gin.Context) error

func (*HTTPHandler) LoginHandler

func (hdl *HTTPHandler) LoginHandler(ctx *context.Context, c *gin.Context) error

LoginHandler represent endpoint: [GET] /dashboards

func (*HTTPHandler) StockGet

func (hdl *HTTPHandler) StockGet(ctx *context.Context, c *gin.Context) error

Jump to

Keyboard shortcuts

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