File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ type reqCall struct {
49
49
// API CALLS
50
50
51
51
// Domains returns all domains and their associated service objects
52
- func (c * Client ) Domains () ([]Domain , error ) {
53
- var response []Domain
52
+ func (c * Client ) Domains () ([]* Domain , error ) {
53
+ var response []* Domain
54
54
if err := c .Do (nil , & response , client .OptPath ("services" )); err != nil {
55
55
return nil , err
56
56
}
@@ -86,14 +86,14 @@ func (c *Client) Services(domain string) ([]*Service, error) {
86
86
// changed while the service was being executed.
87
87
// TODO: This is a placeholder implementation, and requires fields to
88
88
// be passed in the request
89
- func (c * Client ) Call (service , entity string ) ([]State , error ) {
89
+ func (c * Client ) Call (service , entity string ) ([]* State , error ) {
90
90
domain := domainForEntity (entity )
91
91
if domain == "" {
92
92
return nil , ErrBadParameter .Withf ("Invalid entity: %q" , entity )
93
93
}
94
94
95
95
// Call the service
96
- var response []State
96
+ var response []* State
97
97
if payload , err := client .NewJSONRequest (reqCall {
98
98
Entity : entity ,
99
99
}); err != nil {
Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ type State struct {
30
30
// API CALLS
31
31
32
32
// States returns all the entities and their state
33
- func (c * Client ) States () ([]State , error ) {
33
+ func (c * Client ) States () ([]* State , error ) {
34
34
// Return the response
35
- var response []State
35
+ var response []* State
36
36
if err := c .Do (nil , & response , client .OptPath ("states" )); err != nil {
37
37
return nil , err
38
38
}
@@ -42,9 +42,9 @@ func (c *Client) States() ([]State, error) {
42
42
}
43
43
44
44
// State returns a state for a specific entity
45
- func (c * Client ) State (EntityId string ) (State , error ) {
45
+ func (c * Client ) State (EntityId string ) (* State , error ) {
46
46
// Return the response
47
- var response State
47
+ var response * State
48
48
if err := c .Do (nil , & response , client .OptPath ("states" , EntityId )); err != nil {
49
49
return response , err
50
50
}
You can’t perform that action at this time.
0 commit comments