MCPcopy
hub / github.com/larksuite/cli / newTestHandler

Function newTestHandler

sidecar/server-demo/handler_test.go:43–58  ·  view source on GitHub ↗
(key []byte)

Source from the content-addressed store, hash-verified

41}
42
43func newTestHandler(key []byte) *proxyHandler {
44 return &proxyHandler{
45 key: key,
46 logger: discardLogger(),
47 forwardCl: &http.Client{},
48 allowedHosts: map[string]bool{
49 "open.feishu.cn": true,
50 "accounts.feishu.cn": true,
51 "mcp.feishu.cn": true,
52 },
53 allowedIDs: map[string]bool{
54 sidecar.IdentityUser: true,
55 sidecar.IdentityBot: true,
56 },
57 }
58}
59
60// signedReq creates a properly signed request for testing handler logic past
61// HMAC verification. Identity defaults to bot and auth-header to

Calls 1

discardLoggerFunction · 0.70

Tested by

no test coverage detected