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

Function createEntityHandler

service/ai-key/iml.go:222–237  ·  view source on GitHub ↗
(i *Create)

Source from the content-addressed store, hash-verified

220 return []map[string]interface{}{{"uuid": i.ID}}
221}
222func createEntityHandler(i *Create) *ai.Key {
223 now := time.Now()
224 return &ai.Key{
225 Uuid: i.ID,
226 Name: i.Name,
227 Config: i.Config,
228 Provider: i.Provider,
229 Status: i.Status,
230 ExpireTime: i.ExpireTime,
231 Sort: i.Priority,
232 UseToken: 0,
233 CreateAt: now,
234 UpdateAt: now,
235 Default: i.Default,
236 }
237}
238func updateHandler(e *ai.Key, i *Edit) {
239 if i.Name != nil {
240 e.Name = *i.Name

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected