(st store.ISearchStore[E], name string, createEntityHandler func(i *INPUT) *E, uniquestHandler func(*INPUT) []map[string]any, labelHandler ...func(*E) []string)
| 25 | } |
| 26 | |
| 27 | func NewCreator[INPUT any, E any](st store.ISearchStore[E], name string, createEntityHandler func(i *INPUT) *E, uniquestHandler func(*INPUT) []map[string]any, labelHandler ...func(*E) []string) IServiceCreate[INPUT] { |
| 28 | assert(new(E)) |
| 29 | |
| 30 | return &imlServiceCreate[INPUT, E]{ |
| 31 | store: st, |
| 32 | createEntityHandler: createEntityHandler, |
| 33 | labelHandler: labelHandler, |
| 34 | uniquestHandler: uniquestHandler, |
| 35 | name: name, |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | func (p *imlServiceCreate[INPUT, E]) Create(ctx context.Context, input *INPUT, appendLabels ...string) error { |
| 40 | operator := utils.UserId(ctx) |
no test coverage detected