wirex

package
v0.0.0-...-65546df Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessLogger

func AccessLogger() gin.HandlerFunc

AccessLogger return access logger middleware

func GlobalMiddlewares

func GlobalMiddlewares(injector types.Injector) []gin.HandlerFunc

GlobalMiddlewares initialize all needed global middlewares, order is important.

func Inject

func Inject(injector types.Injector) (modules.Modules, error)

func NewEmailSender

func NewEmailSender(ctx context.Context, emailConf conf.Email) (*email.Sender, error)

func NewEntDB

func NewEntDB(ctx context.Context, dbConf conf.DB, logger *logx.Logger) (*ent.Client, error)

NewEntDB initialize database with ent

func NewHttpServer

func NewHttpServer(ctx context.Context, appConf *conf.App, injector types.Injector) (*ginx.Server, error)

NewHttpServer return new http server with given configuration

func NewRedisClient

func NewRedisClient(ctx context.Context, redisConf conf.Redis) (*redis.Client, error)

NewRedisClient initialize redis connection

func NewTokenResolver

func NewTokenResolver(ctx context.Context, jwtconf conf.Jwt, client *redis.Client) (*token.Resolver, error)

func Recovery

func Recovery() gin.HandlerFunc

Recovery return recovery middleware

func RequestCache

func RequestCache(injector types.Injector) gin.HandlerFunc

RequestCache return Cache middleware

func RequestID

func RequestID() gin.HandlerFunc

RequestID returns request-id middleware

func TokenVerify

func TokenVerify(injector types.Injector) gin.HandlerFunc

TokenVerify return jwt token authenticate middleware

Types

This section is empty.

Jump to

Keyboard shortcuts

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