MCPcopy Create free account
hub / github.com/Xenov-X/csbot / executeSetNote

Method executeSetNote

workflow/executor_config.go:62–73  ·  view source on GitHub ↗

executeSetNote assigns a note to the beacon

(ctx context.Context, client *csclient.Client, beaconID string, action Action)

Source from the content-addressed store, hash-verified

60
61// executeSetNote assigns a note to the beacon
62func (e *Executor) executeSetNote(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) {
63 note, ok := action.Parameters["note"].(string)
64 if !ok {
65 return "", fmt.Errorf("note parameter required for set_note")
66 }
67
68 resp, err := client.SetNote(ctx, beaconID, note)
69 if err != nil {
70 return "", err
71 }
72 return e.fireAndForget(resp.TaskID, "set note")
73}
74
75// executeEnableBeaconGate enables beacon gate for the specified beacon
76func (e *Executor) executeEnableBeaconGate(ctx context.Context, client *csclient.Client, beaconID string) (string, error) {

Callers 1

executeActionMethod · 0.95

Calls 1

fireAndForgetMethod · 0.95

Tested by

no test coverage detected