| 433 | } |
| 434 | |
| 435 | func (i *imlDynamicModule) get(ctx context.Context, module string, id string) (*dynamic_module.DynamicModule, error) { |
| 436 | info, err := i.dynamicModuleService.Get(ctx, id) |
| 437 | if err != nil { |
| 438 | return nil, err |
| 439 | } |
| 440 | |
| 441 | if info.Module != module { |
| 442 | return nil, fmt.Errorf("module not match") |
| 443 | } |
| 444 | return info, nil |
| 445 | } |
| 446 | |
| 447 | func (i *imlDynamicModule) List(ctx context.Context, module string, keyword string, page int, pageSize int) ([]map[string]interface{}, int64, error) { |
| 448 | d, has := driver.Get(module) |