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

Method fetchData

internal/tui/dashboard.go:46–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44}
45
46func (m dashboardModel) fetchData() tea.Msg {
47 cfg, cfgErr := m.client.GetConfig()
48 authFiles, authErr := m.client.GetAuthFiles()
49 apiKeys, keysErr := m.client.GetAPIKeys()
50
51 var err error
52 for _, e := range []error{cfgErr, authErr, keysErr} {
53 if e != nil {
54 err = e
55 break
56 }
57 }
58 return dashboardDataMsg{config: cfg, authFiles: authFiles, apiKeys: apiKeys, err: err}
59}
60
61func (m dashboardModel) Update(msg tea.Msg) (dashboardModel, tea.Cmd) {
62 switch msg := msg.(type) {

Callers

nothing calls this directly

Calls 3

GetAuthFilesMethod · 0.80
GetConfigMethod · 0.45
GetAPIKeysMethod · 0.45

Tested by

no test coverage detected