-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.go
32 lines (26 loc) · 857 Bytes
/
server.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
package gopyload
// Errored on me
func (p *Pyload) GetServices() (any, error) {
return GeneralPostEndpoint[any](p, getServicesEndpoint, nil)
}
func (p *Pyload) Kill() error {
_, err := GeneralPostEndpoint[any](p, killEndpoint, nil)
return err
}
func (p *Pyload) PauseServer() error {
_, err := GeneralPostEndpoint[any](p, pauseServerEndpoint, nil)
return err
}
// make sure to have session id or else you would be unauthorized
func (p *Pyload) UnpauseServer() error {
_, err := GeneralPostEndpoint[any](p, unpauseServerEndpoint, nil)
return err
}
func (p *Pyload) Restart() error {
_, err := GeneralPostEndpoint[any](p, restartEndpoint, nil)
return err
}
// i don't know what it does but it does something weird so don't use it
func (p *Pyload) RestartFailed() (any, error) {
return GeneralPostEndpoint[any](p, restartFailedEndpoint, nil)
}