app

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name   string
	Router *router.Router

	Logger *slog.Logger
	// contains filtered or unexported fields
}

func New

func New(name string) *App

func (*App) AppMigrations

func (a *App) AppMigrations(m ...plugin.Migration)

func (*App) AutoPluginMigrationsFromStorage

func (a *App) AutoPluginMigrationsFromStorage()

func (*App) AutoPluginSettingsFromStorage

func (a *App) AutoPluginSettingsFromStorage()

func (*App) Cache

func (a *App) Cache(c cache.Cache)

func (*App) CacheStore

func (a *App) CacheStore() cache.Cache

func (*App) Callback

func (a *App) Callback(pattern string, h middleware.Handler)

func (*App) Command

func (a *App) Command(name string, h middleware.Handler)

func (*App) CoreMigrations

func (a *App) CoreMigrations(m ...plugin.Migration)

func (*App) Dispatch

func (a *App) Dispatch(ctx context.Context, ev event.Event) error

func (*App) FSM

func (a *App) FSM(manager *fsm.Manager) *fsm.Manager

FSM injects centralized FSM manager middleware for all handlers. If manager is nil, a default in-memory user-scoped manager is created.

func (*App) Fallback

func (a *App) Fallback(h middleware.Handler)

func (*App) Group

func (a *App) Group(m ...middleware.Middleware) *Group

func (*App) Match

func (a *App) Match(re *regexp.Regexp, h middleware.Handler)

func (*App) Message

func (a *App) Message(h middleware.Handler)

func (*App) MigrateDown

func (a *App) MigrateDown(ctx context.Context, steps int) (int, error)

func (*App) MigrateUp

func (a *App) MigrateUp(ctx context.Context) (MigrationReport, error)

func (*App) MigrationPlan

func (a *App) MigrationPlan() []RuntimeMigration

func (*App) MigrationStatus

func (a *App) MigrationStatus(ctx context.Context) ([]MigrationStatus, error)

func (*App) Platform

func (a *App) Platform(p platform.Platform)

func (*App) Plugin

func (a *App) Plugin(p plugin.Plugin) error

func (*App) PluginMigrations

func (a *App) PluginMigrations(store plugin.MigrationStateStore)

func (*App) PluginSettings

func (a *App) PluginSettings(store plugin.SettingsStateStore)

func (*App) Plugins

func (a *App) Plugins() *plugin.Registry

func (*App) RateLimit

func (a *App) RateLimit(rule ratelimit.Rule)

RateLimit adds a centralized rate-limit rule. The first call initializes and injects a shared limiter middleware.

func (*App) Start

func (a *App) Start(ctx context.Context) error

func (*App) Storage

func (a *App) Storage(store storage.Store)

func (*App) Store

func (a *App) Store() storage.Store

func (*App) Text

func (a *App) Text(text string, h middleware.Handler)

func (*App) Use

func (a *App) Use(m middleware.Middleware)

type Group

type Group struct {
	// contains filtered or unexported fields
}

func (*Group) Callback

func (g *Group) Callback(pattern string, h middleware.Handler)

func (*Group) Command

func (g *Group) Command(name string, h middleware.Handler)

func (*Group) Fallback

func (g *Group) Fallback(h middleware.Handler)

func (*Group) Match

func (g *Group) Match(re *regexp.Regexp, h middleware.Handler)

func (*Group) Message

func (g *Group) Message(h middleware.Handler)

func (*Group) Text

func (g *Group) Text(text string, h middleware.Handler)

func (*Group) Use

func (g *Group) Use(m middleware.Middleware)

type MigrationReport

type MigrationReport struct {
	Applied int
	Skipped int
}

type MigrationStatus

type MigrationStatus struct {
	Namespace string
	ID        string
	Name      string
	Applied   bool
	AppliedAt *time.Time
}

type RuntimeMigration

type RuntimeMigration struct {
	Namespace string
	Migration plugin.Migration
}

Jump to

Keyboard shortcuts

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