http

package
v0.0.0-...-0c44e78 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OkMessage      = "success"
	ErrInvalidJSON = "invalid json"
	ErrInternal    = "internal error"
)

Functions

func NewEngine

func NewEngine(config config.HTTP) *gin.Engine

Types

type Router

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

func NewRouter

func NewRouter(authSvc app.AuthService, customerSvc app.CustomerService) *Router

func (*Router) GetCustomerDeliveryInfo

func (r *Router) GetCustomerDeliveryInfo(c *gin.Context)

func (*Router) GetCustomerPersonalInfo

func (r *Router) GetCustomerPersonalInfo(c *gin.Context)

func (*Router) Login

func (r *Router) Login(c *gin.Context)

func (*Router) RefreshToken

func (r *Router) RefreshToken(c *gin.Context)

func (*Router) Register

func (r *Router) Register(c *gin.Context)

func (*Router) UpdateCustomerDeliveryInfo

func (r *Router) UpdateCustomerDeliveryInfo(c *gin.Context)

func (*Router) UpdateCustomerPersonalInfo

func (r *Router) UpdateCustomerPersonalInfo(c *gin.Context)

type Server

type Server struct {
	Engine *gin.Engine
	Router *Router
	// contains filtered or unexported fields
}

func NewHTTPServer

func NewHTTPServer(config config.HTTP, logger logger.Logger, engine *gin.Engine, router *Router) *Server

func (*Server) GracefulStop

func (srv *Server) GracefulStop(ctx context.Context) error

func (*Server) InitRoutes

func (srv *Server) InitRoutes()

func (*Server) Run

func (srv *Server) Run() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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