modelmapping

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0 modules, 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 Create

Create inserts a new model mapping and refreshes the cache.

func Delete

func Delete(ctx context.Context, id int) error

Delete removes a model mapping and refreshes the cache.

func Get

func Get(ctx context.Context, id int) (*model.ModelMapping, error)

Get retrieves a single model mapping by ID.

func InitCache

func InitCache(ctx context.Context) error

InitCache loads all model mappings from the database into memory.

func List

func List(ctx context.Context) ([]*model.ModelMapping, error)

List returns all model mappings.

func Resolve

func Resolve(ctx context.Context, requestModel string, groupID int) string

Resolve applies model mapping rules to transform a request model name. It checks rules in priority order and returns the first match. If no match is found, returns the original requestModel unchanged.

func Update

Update modifies an existing model mapping and refreshes the cache.

Types

This section is empty.

Jump to

Keyboard shortcuts

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