Documentation
¶
Index ¶
- Constants
- Variables
- type Adele
- func (a *Adele) BoootstrapMailer() mailer.Mail
- func (a *Adele) BoostrapFilesystem()
- func (a *Adele) BootstrapCache(rootPath string) error
- func (a *Adele) BootstrapDatabase()
- func (a *Adele) BootstrapHelpers() *helpers.Helpers
- func (a *Adele) BootstrapJetEngine() *jet.Set
- func (a *Adele) BootstrapMiddleware()
- func (a *Adele) BootstrapMux(rootPath string) (http.Handler, error)
- func (a *Adele) BootstrapRender() *render.Render
- func (a *Adele) BootstrapScheduler()
- func (a *Adele) BootstrapSessionManager() (*scs.SessionManager, error)
- func (a *Adele) CreateDirectories(rootPath string, directories []string) error
- func (a *Adele) CreateEnvironmentFile(rootPath string) error
- func (a *Adele) New(rootPath string) error
Constants ¶
const Version = "v1.0.4"
Variables ¶
var Helpers = &helpers.Helpers{}
Create a global helper instance for the package— provides access to all helper methods in sub-packages.
Functions ¶
This section is empty.
Types ¶
type Adele ¶
type Adele struct {
AppName string
Cache cache.Cache
DB *database.Database
Debug bool
FileSystem map[string]interface{}
Helpers *helpers.Helpers
JetViews *jet.Set
Log *logrus.Logger
Mail mailer.Mail
MaintenanceMode bool
Provider *provider.Provider
Render *render.Render
Routes *mux.Mux
RootPath string
RPCListener *net.Listener
Scheduler *cron.Cron
Session *scs.SessionManager
Version string
ViewsTemplateDir string
// contains filtered or unexported fields
}
func (*Adele) BoootstrapMailer ¶
Configure the mailer for the application by initializing mailer struct. The mailer values are populated by the environemnt variables parsed from the .env file at the root of the application.
func (*Adele) BoostrapFilesystem ¶
func (a *Adele) BoostrapFilesystem()
Initializes the file system auto-configuration method for the framework by detecting and initializes available file storage systems based on environment variables during application startup.
func (*Adele) BootstrapCache ¶
Cache initialization method that automatically detects and configures the appropriate caching system during application startup based on environment variables.
func (*Adele) BootstrapDatabase ¶
func (a *Adele) BootstrapDatabase()
Initializes and sets up a database connection for the application—establishes a database connection during application startup and stores it in the Adele struct.
func (*Adele) BootstrapHelpers ¶
Creates and returns a helper utilities object for the Adele framework— a collection of utility functions that can be used throughout the application.
func (*Adele) BootstrapJetEngine ¶
Setup This code is setting up the Jet template engine for your Adele framework with different configurations based on whether the application is in debug/development mode or production mode—enables features that help during development but would hurt performance in production (like not caching templates and reloading them on every request).
func (*Adele) BootstrapMiddleware ¶
func (a *Adele) BootstrapMiddleware()
Configure the middleware for the application by initializing a middleware struct, populating its values using the application configuration.
func (*Adele) BootstrapMux ¶
Setup up and configures an HTTP router using the adele mux package. This function returns an http.Handler which represents a chain of middleware and eventually, the handlers for specific routes.
func (*Adele) BootstrapRender ¶
Setup and configuring a render engine- initializes a rendering system that handles template rendering for web responses (HTML pages, emails, etc.). The render system handles Rendering HTML templates for web pages, passing session data to templates, and, managing template inheritance and layouts.
func (*Adele) BootstrapScheduler ¶
func (a *Adele) BootstrapScheduler()
Initializes a cron job scheduler for the Adele framework. Sets up task scheduling capabilities during application startup for framework-wide access.
func (*Adele) BootstrapSessionManager ¶
func (a *Adele) BootstrapSessionManager() (*scs.SessionManager, error)
Configure and create the session manager by initializing a session struct, populating its cookie fields by retrieving values from environment variables.
func (*Adele) CreateDirectories ¶
Create all nonexistent parent directories
func (*Adele) CreateEnvironmentFile ¶
Ensure that a environment file at a specific path exists, creating it if it's missing, and returning any errors that may arise.
Directories
¶
| Path | Synopsis |
|---|---|
|
cli
|
|
|
adele
command
|
|
|
migrations
Package migrations provides database migration utilities built on top of golang-migrate.
|
Package migrations provides database migration utilities built on top of golang-migrate. |