| 141 | } |
| 142 | |
| 143 | func (i *imlPluginService) Options(ctx context.Context) []*PluginOption { |
| 144 | list, err := i.defineStore.List(ctx, map[string]interface{}{ |
| 145 | "kind": plugin_model.OpenKind, |
| 146 | }) |
| 147 | if err != nil { |
| 148 | return nil |
| 149 | } |
| 150 | return utils.SliceToSlice(list, func(s *plugin.Define) *PluginOption { |
| 151 | return &PluginOption{ |
| 152 | Cname: s.Cname, |
| 153 | Desc: s.Description, |
| 154 | Name: s.Name, |
| 155 | } |
| 156 | }) |
| 157 | } |
| 158 | |
| 159 | func (i *imlPluginService) SetCluster(ctx context.Context, clusterId string, name string, status plugin_model.Status, config plugin_model.ConfigType) error { |
| 160 | operator := utils.UserId(ctx) |