🌱🏠🧑‍💻 command line greenhouse client application: an interface to the greenhouse daemon https://greenhouse.server.garden/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

69 lines
2.2 KiB

package main
import "time"
// These come from the greenhouse daemon. they must match the entities in the greenhouse daemon.
type ChildProcessStatus struct {
Enabled bool `json:"enabled"`
PID int `json:"pid"`
Started time.Time `json:"started"`
CrashLoop bool `json:"crash_loop"`
Healthy bool `json:"healthy"`
}
type DaemonStatus struct {
NeedsAPIToken bool `json:"needs_api_token"`
HashedToken string `json:"hashed_api_token"`
Threshold *ChildProcessStatus `json:"threshold"`
Caddy *ChildProcessStatus `json:"caddy"`
ApplyConfigStatuses []string `json:"apply_config_statuses"`
ApplyConfigStatusIndex int `json:"apply_config_status_index"`
ApplyConfigStatusError string `json:"apply_config_status_error"`
TenantInfo *TenantInfo `json:"tenant_info"`
ServerName string `json:"server_name"`
GUITunnels []GUITunnel `json:"tunnels"`
UpdateTenantInfoMessage string `json:"update_tenant_info_message"`
}
type TenantInfo struct {
ThresholdServers []string
ClientStates map[string]ThresholdClientState
Listeners []ThresholdTunnel
AuthorizedDomains []string
PortStart int
PortEnd int
EmailAddress string
}
type GUITunnel struct {
Protocol string `json:"protocol"`
HasSubdomain bool `json:"has_subdomain"`
Subdomain string `json:"subdomain"`
Domain string `json:"domain"`
PublicPort int `json:"public_port"`
DestinationType string `json:"destination_type"`
DestinationHostname string `json:"destination_hostname"`
DestinationPort int `json:"destination_port"`
DestinationFolderPath string `json:"destination_folder_path"`
}
type ThresholdTunnel struct {
ClientId string
ListenPort int
ListenAddress string
ListenHostnameGlob string
BackEndService string
HaProxyProxyProtocol bool
}
type ThresholdClientState struct {
CurrentState string
LastState string
}
type LogEntity struct {
Timestamp int64
Line string
Stderr bool
}