forked from etcinit/gonduit
-
Notifications
You must be signed in to change notification settings - Fork 11
/
harbormaster.go
33 lines (29 loc) · 1.21 KB
/
harbormaster.go
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
package gonduit
import (
"github.com/thought-machine/gonduit/requests"
"github.com/thought-machine/gonduit/responses"
)
// HarbormasterCreateArtifact performs a call to harbormaster.createartifact.
func (c *Conn) HarbormasterCreateArtifact(req requests.HarbormasterCreateArtifactRequest) (*responses.HarbormasterCreateArtifactResponse, error) {
var res responses.HarbormasterCreateArtifactResponse
if err := c.Call("harbormaster.createartifact", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// HarbormasterSendMessage performs a call to harbormaster.sendmessage.
func (c *Conn) HarbormasterSendMessage(req requests.HarbormasterSendMessageRequest) (*responses.HarbormasterSendMessageResponse, error) {
var res responses.HarbormasterSendMessageResponse
if err := c.Call("harbormaster.sendmessage", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// HarbormasterBuildableSearch performs a call to harbormaster.buildable.search.
func (c *Conn) HarbormasterBuildableSearch(req requests.SearchRequest) (*responses.SearchResponse, error) {
var res responses.SearchResponse
if err := c.Call("harbormaster.buildable.search", &req, &res); err != nil {
return nil, err
}
return &res, nil
}