MCPcopy Create free account
hub / github.com/bytebase/bytebase / newProvider

Function newProvider

backend/plugin/webhook/wecom/app.go:35–47  ·  view source on GitHub ↗
(corpID, agentID, secret string)

Source from the content-addressed store, hash-verified

33}
34
35func newProvider(corpID, agentID, secret string) (*provider, error) {
36 agentIDInt, err := strconv.Atoi(agentID)
37 if err != nil {
38 return nil, errors.Wrapf(err, "failed to convert agentID %s to int", agentID)
39 }
40 return &provider{
41 c: &http.Client{},
42 corpID: corpID,
43 agentID: agentIDInt,
44 secret: secret,
45 token: "",
46 }, nil
47}
48
49func Validate(ctx context.Context, corpID, agentID, secret string) error {
50 p, err := newProvider(corpID, agentID, secret)

Callers 2

sendDirectMessageMethod · 0.70
ValidateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected