appInit

package
v0.0.0-...-3910e7f Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MIT Imports: 52 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Ctx       context.Context
	Cfg       *config.Config
	Router    *httprouter.Router
	WebServer webController.Server

	// db
	CacheDB *redis.Client
	SqlDB   *pgxpool.Pool

	// cache
	AppCacheService  *appCacheService.Service
	UserCacheService *userCacheService.Service

	// services
	Services *Services

	// usaCase
	CurrencyUseCase *currencyUsecase.UseCase
	ProductUseCase  *productUsecase.UseCase

	// api controllers
	ProductController *productServire.ProductServiceServer
	// contains filtered or unexported fields
}

func NewAppInit

func NewAppInit(ctx context.Context, cfg *config.Config) *App

func (*App) AppCacheServiceInit

func (a *App) AppCacheServiceInit() (err error)

AppCacheServiceInit - appCacheService initialization

func (*App) CurrencyUseCaseInit

func (a *App) CurrencyUseCaseInit() error

func (*App) ProductControllerGetterInit

func (a *App) ProductControllerGetterInit() (err error)

func (*App) ProductControllerGetterRun

func (a *App) ProductControllerGetterRun(ctx context.Context) (err error)

func (*App) ProductUseCaseInit

func (a *App) ProductUseCaseInit() error

func (*App) ServicesInit

func (a *App) ServicesInit(cfg *config.Config) error

func (*App) SqlDBInit

func (a *App) SqlDBInit() (err error)

SqlDBInit - sql database initialization

func (*App) UserCacheServiceInit

func (a *App) UserCacheServiceInit() (err error)

UserCacheServiceInit - userCacheService initialization

type AppInit

type AppInit interface {
	AppCacheServiceInit() (err error)
	UserCacheServiceInit() (err error)
	ProductAPIInit() (err error)
}

Jump to

Keyboard shortcuts

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