MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / Int

Method Int

module/ai-key/dto/enum.go:17–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15}
16
17func (s KeyStatus) Int() int {
18 switch s {
19 case KeyDisable:
20 return 0
21 case KeyNormal:
22 return 1
23 case KeyError:
24 return 2
25 case KeyExceed:
26 return 3
27 case KeyExpired:
28 return 4
29 default:
30 return 0
31 }
32}
33
34func ToKeyStatus(status int) KeyStatus {
35 switch status {

Callers 4

CreateMethod · 0.45
EditMethod · 0.45
ListMethod · 0.45
UpdateKeyStatusMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected