core/blocks/registry.go
2026-05-03 08:36:08 +08:00

13 lines
433 B
Go

package blocks
import "io/fs"
// BlockRegistry is the interface that plugins use to register blocks.
type BlockRegistry interface {
Register(meta BlockMeta, fn BlockFunc)
RegisterTemplateOverride(templateKey, blockKey string, fn BlockFunc)
RegisterTemplateOverrideWithSource(templateKey, blockKey, source string, fn BlockFunc)
LoadSchemasFromFS(fsys fs.FS) error
LoadSchemasFromFSWithPrefix(fsys fs.FS, prefix string) error
}