diff --git a/drone-go/drone/client.go b/drone-go/drone/client.go index ded2095bb..3326c0b64 100644 --- a/drone-go/drone/client.go +++ b/drone-go/drone/client.go @@ -35,11 +35,6 @@ const ( pathUsers = "%s/api/users" pathUser = "%s/api/users/%s" pathBuildQueue = "%s/api/builds" - pathServers = "%s/api/servers" - pathServer = "%s/api/servers/%s" - pathScalerPause = "%s/api/pause" - pathScalerResume = "%s/api/resume" - pathVarz = "%s/varz" pathVersion = "%s/version" ) @@ -359,56 +354,6 @@ func (c *client) SecretDelete(owner, name, secret string) error { return c.delete(uri) } -// Server returns the named servers details. -func (c *client) Server(name string) (*Server, error) { - out := new(Server) - uri := fmt.Sprintf(pathServer, c.addr, name) - err := c.get(uri, &out) - return out, err -} - -// ServerList returns a list of all active build servers. -func (c *client) ServerList() ([]*Server, error) { - var out []*Server - uri := fmt.Sprintf(pathServers, c.addr) - err := c.get(uri, &out) - return out, err -} - -// ServerCreate creates a new server. -func (c *client) ServerCreate() (*Server, error) { - out := new(Server) - uri := fmt.Sprintf(pathServers, c.addr) - err := c.post(uri, nil, out) - return out, err -} - -// ServerDelete terminates a server. -func (c *client) ServerDelete(name string) error { - uri := fmt.Sprintf(pathServer, c.addr, name) - return c.delete(uri) -} - -// AutoscalePause pauses the autoscaler. -func (c *client) AutoscalePause() error { - uri := fmt.Sprintf(pathScalerPause, c.addr) - return c.post(uri, nil, nil) -} - -// AutoscaleResume resumes the autoscaler. -func (c *client) AutoscaleResume() error { - uri := fmt.Sprintf(pathScalerResume, c.addr) - return c.post(uri, nil, nil) -} - -// AutoscaleVersion resumes the autoscaler. -func (c *client) AutoscaleVersion() (*Version, error) { - out := new(Version) - uri := fmt.Sprintf(pathVersion, c.addr) - err := c.get(uri, out) - return out, err -} - // // http request helper functions // diff --git a/drone-go/drone/interface.go b/drone-go/drone/interface.go index 0b24d7f10..10dd0034f 100644 --- a/drone-go/drone/interface.go +++ b/drone-go/drone/interface.go @@ -122,25 +122,4 @@ type Client interface { // SecretDelete deletes a secret. SecretDelete(owner, name, secret string) error - - // Server returns the named servers details. - Server(name string) (*Server, error) - - // ServerList returns a list of all active build servers. - ServerList() ([]*Server, error) - - // ServerCreate creates a new server. - ServerCreate() (*Server, error) - - // ServerDelete terminates a server. - ServerDelete(name string) error - - // AutoscalePause pauses the autoscaler. - AutoscalePause() error - - // AutoscaleResume resumes the autoscaler. - AutoscaleResume() error - - // AutoscaleVersion returns the autoscaler version. - AutoscaleVersion() (*Version, error) } diff --git a/drone-go/drone/types.go b/drone-go/drone/types.go index b8050008b..8bbc76e43 100644 --- a/drone-go/drone/types.go +++ b/drone-go/drone/types.go @@ -140,29 +140,6 @@ type ( Email string `json:"author_email,omitempty"` } - // Server represents a server node. - Server struct { - ID string `json:"id"` - Provider string `json:"provider"` - State string `json:"state"` - Name string `json:"name"` - Image string `json:"image"` - Region string `json:"region"` - Size string `json:"size"` - Address string `json:"address"` - Capacity int `json:"capacity"` - Secret string `json:"secret"` - Error string `json:"error"` - CAKey []byte `json:"ca_key"` - CACert []byte `json:"ca_cert"` - TLSKey []byte `json:"tls_key"` - TLSCert []byte `json:"tls_cert"` - Created int64 `json:"created"` - Updated int64 `json:"updated"` - Started int64 `json:"started"` - Stopped int64 `json:"stopped"` - } - // Version provides system version details. Version struct { Source string `json:"source,omitempty"`