MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / NewEdit

Function NewEdit

service/universally/edit.go:25–29  ·  view source on GitHub ↗
(st store.ISearchStore[E], updateHandler func(e *E, model *INPUT), labels ...func(model *E) []string)

Source from the content-addressed store, hash-verified

23}
24
25func NewEdit[INPUT any, E any](st store.ISearchStore[E], updateHandler func(e *E, model *INPUT), labels ...func(model *E) []string) IServiceEdit[INPUT] {
26 assert(new(E))
27
28 return &imlServiceEdit[INPUT, E]{store: st, updateHandler: updateHandler, labelHandler: labels}
29}
30
31func (p *imlServiceEdit[INPUT, E]) Save(ctx context.Context, id string, model *INPUT, appendLabels ...string) error {
32 operator := utils.UserId(ctx)

Callers 15

OnCompleteMethod · 0.92
OnCompleteMethod · 0.92
OnCompleteMethod · 0.92
OnCompleteMethod · 0.92
OnCompleteMethod · 0.92
OnCompleteMethod · 0.92
OnCompleteMethod · 0.92
OnCompleteMethod · 0.92
OnCompleteMethod · 0.92
OnCompleteMethod · 0.92
OnCompleteMethod · 0.92
OnCompleteMethod · 0.92

Calls 1

assertFunction · 0.85

Tested by

no test coverage detected