cli

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.2.0"

Version is the current framework version.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute runs the root command. Called from main().

func NewApp

func NewApp(mode service.Mode) *app.App

NewApp creates and boots a RapidGo application configured for the given mode. Used by commands that need the application lifecycle (serve, migrate, etc.).

func RootCmd

func RootCmd() *cobra.Command

RootCmd returns the root Cobra command, allowing plugins to add subcommands.

func SetBootstrap

func SetBootstrap(fn BootstrapFunc)

SetBootstrap sets the function that registers service providers during app initialization.

func SetJobRegistrar

func SetJobRegistrar(fn JobRegistrar)

SetJobRegistrar sets the function that registers background job handlers.

func SetModelRegistry

func SetModelRegistry(fn ModelRegistryFunc)

SetModelRegistry sets the function that returns all model structs for AutoMigrate.

func SetRoutes

func SetRoutes(fn RouteRegistrar)

SetRoutes sets the function that registers routes on the router.

func SetScheduleRegistrar

func SetScheduleRegistrar(fn ScheduleRegistrar)

SetScheduleRegistrar sets the function that registers scheduled tasks.

func SetSeeder

func SetSeeder(fn SeederFunc)

SetSeeder sets the function that runs database seeders.

Types

type BootstrapFunc

type BootstrapFunc func(a *app.App, mode service.Mode)

BootstrapFunc registers service providers on the application for the given mode.

type JobRegistrar

type JobRegistrar func()

JobRegistrar registers application job handlers with the queue dispatcher.

type ModelRegistryFunc

type ModelRegistryFunc func() []interface{}

ModelRegistryFunc returns all model structs for AutoMigrate.

type RouteRegistrar

type RouteRegistrar func(r *router.Router, c *container.Container, mode service.Mode)

RouteRegistrar registers routes on the router for a given mode.

type ScheduleRegistrar

type ScheduleRegistrar func(s *scheduler.Scheduler, a *app.App)

ScheduleRegistrar registers scheduled tasks on the scheduler.

type SeederFunc

type SeederFunc func(db *gorm.DB, name string) error

SeederFunc runs database seeders. If name is empty, runs all seeders.

Jump to

Keyboard shortcuts

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