Documentation
¶
Index ¶
- func Create(ctx context.Context, req *model.ModelMappingCreateRequest) (*model.ModelMapping, error)
- func Delete(ctx context.Context, id int) error
- func Get(ctx context.Context, id int) (*model.ModelMapping, error)
- func InitCache(ctx context.Context) error
- func List(ctx context.Context) ([]*model.ModelMapping, error)
- func Resolve(ctx context.Context, requestModel string, groupID int) string
- func Update(ctx context.Context, id int, req *model.ModelMappingUpdateRequest) (*model.ModelMapping, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(ctx context.Context, req *model.ModelMappingCreateRequest) (*model.ModelMapping, error)
Create inserts a new model mapping and refreshes the cache.
func List ¶
func List(ctx context.Context) ([]*model.ModelMapping, error)
List returns all model mappings.
func Resolve ¶
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 ¶
func Update(ctx context.Context, id int, req *model.ModelMappingUpdateRequest) (*model.ModelMapping, error)
Update modifies an existing model mapping and refreshes the cache.
Types ¶
This section is empty.