go-admin

module
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT

README

Go Admin

The core github.com/goliatone/go-admin module stays dependency-light and focused on the admin orchestrator. The optional quickstart submodule (github.com/goliatone/go-admin/quickstart) bundles heavier integrations (Fiber, go-dashboard, go-formgen, go-theme) and turnkey bootstrap helpers. Import core packages for minimal deps; import quickstart when you want the defaults and adapters.

  • Quickstart docs: quickstart/README.md
  • Design notes: QUICKBOOT_TDD.md
  • Task plan: QUICKBOOT_TSK.md
  • Export refactor design: EXPORT_REF_TDD.md
  • Export refactor plan: EXPORT_REF_TSK.md

Commands (go-command)

Commands are message-driven: define a message type with a stable Type() string, implement a command.Commander[Msg], and register a message factory for name-based dispatch from HTTP/panels.

type PublishPageMsg struct {
	IDs []string
}

func (PublishPageMsg) Type() string { return "pages.publish" }

type PublishPageCommand struct {
	store *Store
}

func (c *PublishPageCommand) Execute(ctx context.Context, msg PublishPageMsg) error {
	return c.store.Publish(ctx, msg.IDs)
}

adm.Commands().Register(&PublishPageCommand{store: store})
admin.RegisterMessageFactory(adm.Commands(), "pages.publish", func(payload map[string]any, ids []string) (PublishPageMsg, error) {
	return PublishPageMsg{IDs: ids}, nil
})

CLI/cron metadata is optional via command.CLICommand (CLIOptions) and command.CronCommand (CronOptions).

Directories

Path Synopsis
examples
commerce command
web command
web/pkg/activity
Package activity implements the activity-hooks pattern for event emission.
Package activity implements the activity-hooks pattern for event emission.
pkg
admin
Package admin provides the public facade for go-admin.
Package admin provides the public facade for go-admin.
quickstart module

Jump to

Keyboard shortcuts

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