modelregistry

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 3 Imported by: 1 module, 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

func GetModelByName

func GetModelByName(name string) (interface{}, error)

GetModelByName retrieves a model from the default global registry by name

func GetModels

func GetModels() []interface{}

GetModels returns a list of all models in the default global registry

func IterateModels

func IterateModels(fn func(name string, model interface{}))

IterateModels iterates over all models in the default global registry

func RegisterModel

func RegisterModel(model interface{}, name string) error

RegisterModel registers a model with the default global registry

Types

type DefaultModelRegistry

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

DefaultModelRegistry implements ModelRegistry interface

func NewModelRegistry

func NewModelRegistry() *DefaultModelRegistry

NewModelRegistry creates a new model registry

func (*DefaultModelRegistry) GetAllModels

func (r *DefaultModelRegistry) GetAllModels() map[string]interface{}

func (*DefaultModelRegistry) GetModel

func (r *DefaultModelRegistry) GetModel(name string) (interface{}, error)

func (*DefaultModelRegistry) GetModelByEntity

func (r *DefaultModelRegistry) GetModelByEntity(schema, entity string) (interface{}, error)

func (*DefaultModelRegistry) RegisterModel

func (r *DefaultModelRegistry) RegisterModel(name string, model interface{}) error

Jump to

Keyboard shortcuts

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