mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-24 09:20:31 +00:00
Remove enterprise features from lib
This commit is contained in:
parent
567e6b8a18
commit
3534e92775
3 changed files with 0 additions and 99 deletions
|
@ -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
|
||||
//
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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"`
|
||||
|
|
Loading…
Reference in a new issue