Documentation ¶
Index ¶
- func AccessLogger() gin.HandlerFunc
- func GlobalMiddlewares(injector types.Injector) []gin.HandlerFunc
- func Inject(injector types.Injector) (modules.Modules, error)
- func NewEmailSender(ctx context.Context, emailConf conf.Email) (*email.Sender, error)
- func NewEntDB(ctx context.Context, dbConf conf.DB, logger *logx.Logger) (*ent.Client, error)
- func NewHttpServer(ctx context.Context, appConf *conf.App, injector types.Injector) (*ginx.Server, error)
- func NewRedisClient(ctx context.Context, redisConf conf.Redis) (*redis.Client, error)
- func NewTokenResolver(ctx context.Context, jwtconf conf.Jwt, client *redis.Client) (*token.Resolver, error)
- func Recovery() gin.HandlerFunc
- func RequestCache(injector types.Injector) gin.HandlerFunc
- func RequestID() gin.HandlerFunc
- func TokenVerify(injector types.Injector) gin.HandlerFunc
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 NewEmailSender ¶
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 ¶
NewRedisClient initialize redis connection
func NewTokenResolver ¶
func RequestCache ¶
func RequestCache(injector types.Injector) gin.HandlerFunc
RequestCache return Cache middleware
func TokenVerify ¶
func TokenVerify(injector types.Injector) gin.HandlerFunc
TokenVerify return jwt token authenticate middleware
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.