application

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2022 License: MIT Imports: 21 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 {
	Application *fiber.App
	Context     context.Context
	Config      *config.Configuration
	Logger      *logrus.Logger
	DB          *pgx.Conn
	GConfig     *oauth2.Config
	Redis       *redis.Client
	HTTPClient  *http.Client
}

App is an wrapper application instance that contains application context, configuration, logger, etc

func SetupApplication

func SetupApplication(ctx context.Context) (*App, error)

SetupApplication is a function to create application instance

func (*App) Close

func (app *App) Close()

Close is a function to gracefully close the application

type Dependency

type Dependency struct {
	HealthCheckController controller.IHealthCheckController
	AuthController        controller.IAuthController
	TagController         controller.ITagController
	UserController        controller.IUserController
	BlogController        controller.IBlogController
}

Dependency can contain anything that will provide data for controller layer

func SetupDependencyInjection

func SetupDependencyInjection(app *App) *Dependency

SetupDependencyInjection is a function to set up dependencies

Jump to

Keyboard shortcuts

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