handlers

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module(
	"handlers",
	fx.Decorate(func(log *zap.Logger) *zap.Logger {
		return log.Named("handlers")
	}),
	fx.Provide(
		http.AsRootHandler(newRootHandler),
		http.AsApiHandler(newThirdPartyHandler),
		http.AsApiHandler(newMobileHandler),
		http.AsApiHandler(newUpstreamHandler),
	),
	fx.Provide(
		newHealthHandler,
		fx.Private,
	),
)

Functions

This section is empty.

Types

type Config added in v1.7.0

type Config struct {
	GatewayMode GatewayMode
}

type GatewayMode added in v1.7.0

type GatewayMode string
const (
	GatewayModePrivate GatewayMode = "private"
	GatewayModePublic  GatewayMode = "public"
)

type Handler

type Handler struct {
	Logger    *zap.Logger
	Validator *validator.Validate
}

func (*Handler) BodyParserValidator

func (h *Handler) BodyParserValidator(c *fiber.Ctx, out any) error

func (*Handler) ParamsParserValidator

func (h *Handler) ParamsParserValidator(c *fiber.Ctx, out any) error

func (*Handler) QueryParserValidator

func (h *Handler) QueryParserValidator(c *fiber.Ctx, out any) error

type MobileHandlerParams added in v1.6.0

type MobileHandlerParams struct {
	fx.In

	Logger    *zap.Logger
	Validator *validator.Validate

	AuthSvc     *auth.Service
	MessagesSvc *messages.Service
}

type ThirdPartyHandlerParams added in v1.6.0

type ThirdPartyHandlerParams struct {
	fx.In

	HealthHandler *healthHandler

	AuthSvc     *auth.Service
	MessagesSvc *messages.Service
	DevicesSvc  *services.DevicesService

	Logger    *zap.Logger
	Validator *validator.Validate
}

type Validatable added in v1.5.3

type Validatable interface {
	Validate() error
}

Jump to

Keyboard shortcuts

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