Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
implement delete host

See merge request enix/dothill-api-go!9
  • Loading branch information
arcln committed Jun 19, 2019
2 parents 8e26c8c + a1fcc06 commit deb7d96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ func (client *Client) DeleteVolume(name string) (*Response, *ResponseStatus, err
return client.Request(fmt.Sprintf("/delete/volumes/\"%s\"", name))
}

// DeleteHost : deletes a hotst by its ID or nickname
func (client *Client) DeleteHost(name string) (*Response, *ResponseStatus, error) {
return client.Request(fmt.Sprintf("/delete/host/\"%s\"", name))
}

// ShowHostMaps : list the volume mappings for given host
// If host is an empty string, mapping for all hosts is shown
func (client *Client) ShowHostMaps(host string) ([]Volume, *ResponseStatus, error) {
Expand Down
1 change: 0 additions & 1 deletion request.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ func (req *Request) execute(client *Client) ([]byte, int, error) {
return nil, 0, err
}

fmt.Println(client.sessionKey)
httpReq.Header.Set("sessionKey", client.sessionKey)
res, err := client.HTTPClient.Do(httpReq)
if err != nil {
Expand Down

0 comments on commit deb7d96

Please sign in to comment.