creator

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateObject

func CreateObject(ctx context.Context, config interface{}) (interface{}, error)

CreateObject creates an object by its config. The config type must be registered through RegisterConfig().

func RegisterConfig

func RegisterConfig(config interface{}, configCreator ConfigCreator) error

RegisterConfig registers a global config creator. The config can be nil but must have a type.

Types

type ConfigCreator

type ConfigCreator func(ctx context.Context, config interface{}) (interface{}, error)

ConfigCreator is a function to create an object by a config.

Jump to

Keyboard shortcuts

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