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

Function ToKeyStatus

app/ai-event-handler/status.go:15–34  ·  view source on GitHub ↗
(status string)

Source from the content-addressed store, hash-verified

13)
14
15func ToKeyStatus(status string) ai_key_dto.KeyStatus {
16 switch status {
17 case StatusNormal:
18 return ai_key_dto.KeyNormal
19 case StatusInvalidRequest:
20 return ai_key_dto.KeyNormal
21 case StatusQuotaExhausted:
22 return ai_key_dto.KeyExceed
23 case StatusExpired:
24 return ai_key_dto.KeyExpired
25 case StatusExceeded:
26 return ai_key_dto.KeyNormal
27 case StatusInvalid:
28 return ai_key_dto.KeyError
29 case StatusTimeout:
30 return ai_key_dto.KeyError
31 default:
32 return ai_key_dto.KeyNormal
33 }
34}

Callers 1

HandleMessageMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected