aboutsummaryrefslogtreecommitdiff
path: root/schedule.go
blob: eea13e17f5448b993d4a550574b77d253526015f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* schedule.go
* GoHue library for Philips Hue
* Copyright (C) 2016 Collin Guarino (Collinux) collin.guarino@gmail.com
* License: GPL version 2 or higher http://www.gnu.org/licenses/gpl.html
*/

package hue

import (
    //"fmt"
)

type Timer struct {
    Index       int
    Name        string      `json:"name",omitempty`
    Description string      `json:"description",omitempty`
    Command     CommandInfo `json:"command",omitempty`
    Time        string      `json:"time",omitempty`
    Created     string      `json:"created",omitempty`
    Status      string      `json:"status",omitempty`
    AutoDelete  bool        `json:"autodelete",omitempty`
    StartTime   string      `json:"starttime",omitempty`
}

type Alarm struct {
    Index       string
    Name        string      `json:"name",omitempty`
    Description string      `json:"description",omitempty`
    Command     CommandInfo `json:"command",omitempty`
    LocalTime   string      `json:"localtime",omitempty`
    Time        string      `json:"time",omitempty`
    Created     string      `json:"created",omitempty`
    Status      string      `json:"status",omitempty`
    AutoDelete  bool        `json:"autodelete",omitempty`
}

type CommandInfo struct {
    Address     string      `json:"address",omitempty`
    Body        string      `json:"body",omitempty` // TODO: may be diff type
    Method      string      `json:"method",omitempty`
}

// func (bridge *Bridge) GetSchedules() ([]interface{}, error) {
//     return []interface{}, nil
// }
//
// func (bridge *Bridge) CreateSchedule(schedule interface{}) error {
//     return nil
// }
//
// func (bridge *Bridge) GetSchedule(index int) (interface{}, error) {
//     return []interface{}, nil
// }
//
// func (bridge *Bridge) SetSchedule(index int, schedule interface{}) error {
//     return nil
// }
//
// func (bridge *Bridge) DeleteSchedule(index int) error {
//     return nil
// }