mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
OpenAPI: minor changes
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
package sftpd
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -39,10 +40,15 @@ type HostKey struct {
|
||||
type ServiceStatus struct {
|
||||
IsActive bool `json:"is_active"`
|
||||
Bindings []Binding `json:"bindings"`
|
||||
SSHCommands string `json:"ssh_commands"`
|
||||
SSHCommands []string `json:"ssh_commands"`
|
||||
HostKeys []HostKey `json:"host_keys"`
|
||||
}
|
||||
|
||||
// GetSSHCommandsAsString returns enabled SSH commands as comma separated string
|
||||
func (s ServiceStatus) GetSSHCommandsAsString() string {
|
||||
return strings.Join(s.SSHCommands, ", ")
|
||||
}
|
||||
|
||||
// GetStatus returns the server status
|
||||
func GetStatus() ServiceStatus {
|
||||
return serviceStatus
|
||||
|
||||
Reference in New Issue
Block a user