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

Method callHostAuthList

internal/pluginhost/auth_callbacks.go:53–66  ·  view source on GitHub ↗
(ctx context.Context, request []byte)

Source from the content-addressed store, hash-verified

51}
52
53func (h *Host) callHostAuthList(ctx context.Context, request []byte) ([]byte, error) {
54 _ = ctx
55 if len(bytesTrimSpace(request)) > 0 {
56 var req map[string]any
57 if errUnmarshal := json.Unmarshal(request, &req); errUnmarshal != nil {
58 return nil, fmt.Errorf("decode host auth list request: %w", errUnmarshal)
59 }
60 }
61 entries, errList := h.listAuthFiles()
62 if errList != nil {
63 return nil, errList
64 }
65 return marshalRPCResult(rpcHostAuthListResponse{Files: entries})
66}
67
68func (h *Host) callHostAuthGet(ctx context.Context, request []byte) ([]byte, error) {
69 _ = ctx

Callers 1

callFromPluginMethod · 0.95

Calls 3

listAuthFilesMethod · 0.95
bytesTrimSpaceFunction · 0.85
marshalRPCResultFunction · 0.85

Tested by

no test coverage detected