Documentation
ΒΆ
Overview ΒΆ
Package gostack acts as the global wrapper and convenience entry point for application initialization.
Index ΒΆ
Constants ΒΆ
This section is empty.
Variables ΒΆ
var Auth *auth.AuthManager
Auth coordinates authentication strategies globally.
var DB contract.Database
DB holds the initialized global state application database driver adapter connection.
var Mail contract.Mailer
Mail is the global mailer facade. Initialise it with InitMail before sending.
Functions ΒΆ
func InitAuth ΒΆ
func InitAuth(defaultGuard string, userProvider contract.UserProvider)
InitAuth provisions and initializes the authentication system, registering default session and token guards.
func InitDatabase ΒΆ
InitDatabase provisions and activates the target relational database driver infrastructure.
Parameters:
- driver: The database identifier string ("postgres" or "mysql").
- dsn: The Data Source Name string configuration mapping host, credentials, and target database.
Returns:
- An error if the driver registration is missing or connection handshake protocols fail.
func InitMail ΒΆ
InitMail provisions the global Mail facade from the given SMTP configuration.
Call this once at application boot, typically after InitConfig:
gostack.InitMail(mail.Config{
Host: gostack.Config.Get("MAIL_HOST"),
Port: 587,
Username: gostack.Config.Get("MAIL_USERNAME"),
Password: gostack.Config.Get("MAIL_PASSWORD"),
FromAddress: gostack.Config.Get("MAIL_FROM_ADDRESS"),
FromName: gostack.Config.Get("MAIL_FROM_NAME"),
})
func Table ΒΆ
func Table(name string) *database.QueryBuilder
Table provisions a fluent, decoupled instance of the QueryBuilder pipeline mapping a target table.
Why this exists: It hooks the global active database connection context into the builder framework, providing developers with an expressive data management interface from anywhere in the application scope.
Parameters:
- name: The target schema table name string to initiate query expressions against.
Types ΒΆ
This section is empty.
Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
_examples
|
|
|
app
command
Package main serves as the primary operational entry point for the GoStack framework application.
|
Package main serves as the primary operational entry point for the GoStack framework application. |
|
cmd
|
|
|
app
command
Package main serves as the primary operational entry point for the GoStack framework application.
|
Package main serves as the primary operational entry point for the GoStack framework application. |
|
gostack
command
Purpose: This file is the project-local command-line entrypoint for the GoStack framework.
|
Purpose: This file is the project-local command-line entrypoint for the GoStack framework. |
|
framework
|
|
|
auth
Purpose: This file implements Cross-Site Request Forgery (CSRF) protection middleware for GoStack.
|
Purpose: This file implements Cross-Site Request Forgery (CSRF) protection middleware for GoStack. |
|
config
Purpose: This file implements the GoCon environment configuration system.
|
Purpose: This file implements the GoCon environment configuration system. |
|
console
Purpose: This file implements the `make:migration` and `make:controller` CLI code generation commands.
|
Purpose: This file implements the `make:migration` and `make:controller` CLI code generation commands. |
|
contract
Purpose: This file defines the abstract contract interfaces for the GoStack framework.
|
Purpose: This file defines the abstract contract interfaces for the GoStack framework. |
|
database
Purpose: This file implements the Traveller database migration registry and runner.
|
Purpose: This file implements the Traveller database migration registry and runner. |
|
events
Purpose: This file implements the Spark EventDispatcher subsystem for the GoStack framework.
|
Purpose: This file implements the Spark EventDispatcher subsystem for the GoStack framework. |
|
foundation
Package foundation (Citadel) serves as the core booting and structural bedrock of the GoStack framework, managing low-level application lifecycles and diagnostics.
|
Package foundation (Citadel) serves as the core booting and structural bedrock of the GoStack framework, managing low-level application lifecycles and diagnostics. |
|
http
Package http (Navigator, Bridge, Tempose, and Glide) houses the core HTTP request-response lifecycle management.
|
Package http (Navigator, Bridge, Tempose, and Glide) houses the core HTTP request-response lifecycle management. |
|
mail
Purpose: This file implements the GoMail email sending component.
|
Purpose: This file implements the GoMail email sending component. |
|
storage
Purpose: This file implements the LocalStorage driver for the Vault storage subsystem of GoStack.
|
Purpose: This file implements the LocalStorage driver for the Vault storage subsystem of GoStack. |
|
ui
Purpose: This file implements the Tempose Ahead-of-Time (AOT) component compilation engine.
|
Purpose: This file implements the Tempose Ahead-of-Time (AOT) component compilation engine. |
|
internal
|
|