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

Function createEntityHandler

service/strategy/iml.go:179–196  ·  view source on GitHub ↗
(i *Create)

Source from the content-addressed store, hash-verified

177 return []map[string]interface{}{{"uuid": i.Id}}
178}
179func createEntityHandler(i *Create) *strategy.Strategy {
180 now := time.Now()
181 return &strategy.Strategy{
182 UUID: i.Id,
183 Name: i.Name,
184 Priority: i.Priority,
185 Desc: i.Desc,
186 Filters: i.Filters,
187 Config: i.Config,
188 Driver: i.Driver,
189 Scope: i.Scope,
190 Target: i.Target,
191 CreateAt: now,
192 UpdateAt: now,
193 IsStop: false,
194 IsDelete: false,
195 }
196}
197func updateHandler(e *strategy.Strategy, i *Edit) {
198 if i.Name != nil {
199 e.Name = *i.Name

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected