executeSetNote assigns a note to the beacon
(ctx context.Context, client *csclient.Client, beaconID string, action Action)
| 60 | |
| 61 | // executeSetNote assigns a note to the beacon |
| 62 | func (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 |
| 76 | func (e *Executor) executeEnableBeaconGate(ctx context.Context, client *csclient.Client, beaconID string) (string, error) { |
no test coverage detected