MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / buildErrorEventAuthStatus

Function buildErrorEventAuthStatus

sdk/cliproxy/auth/error_events.go:87–100  ·  view source on GitHub ↗
(model string, authSnapshot *Auth)

Source from the content-addressed store, hash-verified

85}
86
87func buildErrorEventAuthStatus(model string, authSnapshot *Auth) errorEventAuthStatus {
88 status := errorEventAuthStatus{
89 Status: authSnapshot.Status,
90 StatusMessage: strings.TrimSpace(authSnapshot.StatusMessage),
91 Disabled: authSnapshot.Disabled,
92 Unavailable: authSnapshot.Unavailable,
93 NextRetryAfter: timePtrIfSet(authSnapshot.NextRetryAfter),
94 Quota: errorEventQuotaStatusFrom(authSnapshot.Quota),
95 }
96 if modelState := errorEventModelStatusFrom(model, authSnapshot); modelState != nil {
97 status.Model = modelState
98 }
99 return status
100}
101
102func errorEventModelStatusFrom(model string, authSnapshot *Auth) *errorEventModelStatus {
103 model = strings.TrimSpace(model)

Callers 1

buildErrorEventPayloadFunction · 0.85

Calls 3

timePtrIfSetFunction · 0.85

Tested by

no test coverage detected