Documentation
ΒΆ
Index ΒΆ
- Variables
- func InitAether(hosts, keyspace string) error
- func InitAuth(defaultGuard string, userProvider contract.UserProvider)
- func InitDatabase(driver, dsn string) error
- func InitMail(cfg mail.Config)
- func InitMongo(uri string) error
- func InitNexus(uri, username, password string) error
- func Table(name string) *database.QueryBuilder
Constants ΒΆ
This section is empty.
Variables ΒΆ
var Auth *auth.AuthManager
Auth coordinates authentication strategies globally.
var Cassandra *gocql.Session
Cassandra is the global Aether facade exposing the official Cassandra session. This is populated when the application is initialized with a Cassandra connection.
var DB contract.Database
DB holds the initialized global state application database driver adapter connection. This is populated for relational SQL databases (MySQL, PostgreSQL, CockroachDB, SQLite).
var Mail contract.Mailer
Mail is the global mailer facade. Initialise it with InitMail before sending.
var Mongo *mongo.Client
Mongo is the global GoMon facade exposing the official MongoDB client. This is populated when the application is initialized with a MongoDB connection.
var Neo4j neo4j.DriverWithContext
Neo4j is the global Nexus facade exposing the official Neo4j graph database driver. This is populated when the application is initialized with a Neo4j connection.
Functions ΒΆ
func InitAether ΒΆ added in v1.0.1
InitAether provisions and activates the Aether Cassandra integration subsystem. It connects to the Cassandra cluster and sets the global gostack.Cassandra facade.
Parameters:
- hosts: A comma-separated string of Cassandra contact points (e.g. "127.0.0.1:9042").
- keyspace: The Cassandra keyspace to bind the session to.
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.
Supported drivers: "mysql", "postgres", "sqlite", "sqlite3", "cockroach", "cockroachdb". For MongoDB, Neo4j, and Cassandra use InitMongo, InitNexus, and InitAether instead.
Parameters:
- driver: The database identifier string (e.g. "mysql", "postgres", "sqlite").
- 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 InitMongo ΒΆ added in v1.0.1
InitMongo provisions and activates the GoMon MongoDB integration subsystem. It connects to MongoDB using the provided URI and sets the global gostack.Mongo facade.
Parameters:
- uri: The MongoDB connection string (e.g. "mongodb://127.0.0.1:27017").
func InitNexus ΒΆ added in v1.0.1
InitNexus provisions and activates the Nexus Neo4j graph database integration subsystem. It connects using the official Neo4j driver and sets the global gostack.Neo4j facade.
Parameters:
- uri: The Neo4j connection URI (e.g. "neo4j://localhost:7687").
- username: The Neo4j username (typically "neo4j").
- password: The Neo4j password.
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. |
|
gost
command
Purpose: This file is the global command-line installer for the GoStack framework.
|
Purpose: This file is the global command-line installer for the GoStack framework. |
|
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
Aether β GoStack Cassandra Wide-Column Database Integration Subsystem.
|
Aether β GoStack Cassandra Wide-Column Database Integration Subsystem. |
|
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
|
|