wirex

package
v10.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAuth

func InitAuth(ctx context.Context) (jwtx.Auther, func(), error)

func InitCacher

func InitCacher(ctx context.Context) (cachex.Cacher, func(), error)

It returns a cachex.Cacher instance, a function to close the cache, and an error

func InitDB

func InitDB(ctx context.Context) (*gorm.DB, func(), error)

It creates a new database connection, and returns a function that closes the connection

Types

type Injector

type Injector struct {
	DB    *gorm.DB
	Cache cachex.Cacher
	Auth  jwtx.Auther
	M     *mods.Mods
}

func BuildInjector

func BuildInjector(ctx context.Context) (*Injector, func(), error)

Jump to

Keyboard shortcuts

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