utils

package
v0.0.0-...-a9081ec Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package utils contains utils function that are shared by all layers of the application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindData

func BindData(c *gin.Context, log *otelzap.Logger, req interface{}) bool

BindData is helper function, returns false if data is not bound

func BindForm

func BindForm(c *gin.Context, log *otelzap.Logger, req interface{}) bool

BindForm is helper function, returns false if data is not bound

func BindHeader

func BindHeader(c *gin.Context, log *otelzap.Logger, req interface{}) bool

BindHeader is helper function, returns false if data is not bound

func BindQuery

func BindQuery(c *gin.Context, log *otelzap.Logger, req interface{}) bool

BindQuery is helper function, returns false if data is not bound

func BindURI

func BindURI(c *gin.Context, log *otelzap.Logger, req interface{}) bool

BindURI is helper function, returns false if data is not bound

func InitGin

func InitGin(ctx context.Context, logger *otelzap.Logger, conf *configs.Config) *gin.Engine

InitGin init gin router with middleware and cors configuration from config

func InitLogger

func InitLogger(ctx context.Context, cfg *configs.AppInfo) *otelzap.Logger

InitLogger return a new instance of a Zap Logger

func InitSwagger

func InitSwagger(ctx context.Context, logger *otelzap.Logger, router *gin.Engine, conf *configs.Config)

InitSwagger init swagger in the router

Types

This section is empty.

Jump to

Keyboard shortcuts

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