Documentation ¶
Overview ¶
Package ext the extension manager
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get(typ ExtensionType) map[string]*Extension
Get returns all extensions of the specified type.
func Register ¶
func Register(name string, typ ExtensionType, mod any)
Register a new extension with the given name and type. This function will panic if an unsupported extension type is provided, or if an extension of the same type and name is already registered.
Types ¶
type Extension ¶
type Extension struct {
Name, Path, Version string
Type ExtensionType
Module any
}
Extension a generic container.
func GetName ¶
func GetName(typ ExtensionType, name string) (ext *Extension, ok bool)
GetName returns extension of the specified type and name.
func (Extension) MarshalJSON ¶
MarshalJSON encodes to JSON
type ExtensionType ¶
type ExtensionType uint
ExtensionType The type of extension
const ( // JSExtension The modules.Module JSExtension ExtensionType = iota + 1 // ParserExtension The parser.Parser. ParserExtension )
func (ExtensionType) String ¶
func (e ExtensionType) String() string
Click to show internal directories.
Click to hide internal directories.