app

package
v0.0.0-...-10d5746 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Config                Config
	DB                    *database.Database
	Redis                 *redis.Client
	Repo                  *database.Repository
	EventsManager         events.EventsManager
	EmailService          domain.EmailService
	Cron                  *cron.CronManager
	Sso                   authentication.Sso
	Sessions              sessions.Sessions
	AuthenticationService *authentication.AuthenticationService
	TemplateService       *templates.TemplateService
	Service               *domain.Service
	Storage               *storage.FileStorage
	Server                *httpserver.HttpServer
}

func New

func New(config Config) *Application

func (*Application) BootstrapDB

func (a *Application) BootstrapDB() error

func (*Application) BootstrapServer

func (a *Application) BootstrapServer() error

func (*Application) Shutdown

func (a *Application) Shutdown() error

type Config

type Config struct {
	Database   database.Config
	Repository database.RepositoryConfig
	Emails     emails.Config
	Cron       cron.Config
	Http       httpserver.Config
	Sso        authentication.SsoConfig
	Sessions   sessions.Config
	Redis      redis.Config
	Events     events.Config
	Service    domain.Config
	Storage    storage.Config
	Templates  templates.Config
	LogLevel   string  `default:"info"`
	Mode       ModeEnv `default:"prod"`
	EnableSmtp bool    `default:"false"`
}

func LoadConfig

func LoadConfig() Config

type ModeEnv

type ModeEnv string
const (
	ModeDev  ModeEnv = "dev"
	ModeTest ModeEnv = "test"
	ModeProd ModeEnv = "prod"
)

Jump to

Keyboard shortcuts

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