register

package
v0.6.0-beta Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Controllers will handle all Go-Web controller
	// Here is where you've to register your custom controller
	// If you create a new controller with Alfred it will be auto-registered
	Controllers = register.ControllerRegister{
		List: []interface{}{
			&controller.UserController{},
			&controller.AuthController{},
			&controller.HomeController{},
		},
	}
	// Models will handle all application models
	// Here is where you've to register your custom models
	// If you create a new model with Alfred it will be auto-registered
	Models = register.ModelRegister{
		List: []interface{}{
			model.User{},
			model.FailedJob{},
		},
	}
	// Services will handle all app IOC services
	// Every service needs to be registered in the following list
	Services = register.ServiceRegister{
		List: []interface{}{
			app.Configuration,
			service.ConnectDB,
			service.ConnectElastic,
			service.ConnectMongo,
			service.ConnectRedis,
		},
	}
	// SingletonServices represent all IOC services that have to be initialized only once.
	// Every service needs to be registered in the following list
	SingletonServices = register.ServiceRegister{
		List: []interface{}{},
	}
	CommandServices = register.ServiceRegister{
		List: []interface{}{
			service.ConnectDB,
			service.ConnectElastic,
			service.ConnectMongo,
			service.ConnectRedis,
		},
	}
	// Commands configuration represent all Go-Web application conf
	// Every command needs to be registered in the following list
	Commands = register.CommandRegister{
		List: map[string]interface{}{
			"queue:failed": &console.QueueFailed{},
			"queue:run":    &console.QueueRun{},
		},
	}
)

Functions

func BaseEntities

func BaseEntities() foundation.BaseEntities

BaseEntities returns a struct that contains Go-Web base entities

Types

This section is empty.

Jump to

Keyboard shortcuts

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