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