Documentation
¶
Overview ¶
Package api defines the daemon's unix-socket JSON API and a client for it.
Index ¶
- Variables
- type Client
- type DeregisterRequest
- type DownRequest
- type EnvRequest
- type OAuthStateRequest
- type OAuthStateResponse
- type PortRequest
- type PortResponse
- type RegisterRequest
- type RegisterResponse
- type ReplayRequest
- type RequestList
- type ServiceView
- type Status
- type TunnelRequest
- type UpRequest
- type VersionResponse
- type WorktreeView
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDaemonDown = errors.New("wtg daemon is not running")
ErrDaemonDown is returned when nothing listens on the socket.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Socket string
// contains filtered or unexported fields
}
Client talks to the daemon over its unix socket.
type DeregisterRequest ¶
type DownRequest ¶
type EnvRequest ¶
type OAuthStateRequest ¶
type OAuthStateResponse ¶
type PortRequest ¶
type PortResponse ¶
type PortResponse struct {
Port int `json:"port"`
}
type RegisterRequest ¶
type RegisterResponse ¶
type RegisterResponse struct {
Worktree WorktreeView `json:"worktree"`
Service ServiceView `json:"service"`
Evicted []string `json:"evicted,omitempty"`
}
type ReplayRequest ¶
type RequestList ¶
type ServiceView ¶
type ServiceView struct {
Name string `json:"name"`
Status string `json:"status"` // up | down | starting | missing
Upstream string `json:"upstream,omitempty"`
Port int `json:"port,omitempty"`
PID int `json:"pid,omitempty"`
Source string `json:"source,omitempty"`
URLs []string `json:"urls"`
Public []string `json:"public_paths,omitempty"`
Configured bool `json:"configured"`
Conflict string `json:"conflict,omitempty"`
}
type Status ¶
type Status struct {
Version string `json:"version"`
PID int `json:"pid"`
Started time.Time `json:"started"`
StateDir string `json:"state_dir"`
HTTP string `json:"http"`
HTTPS string `json:"https,omitempty"`
Ingress string `json:"ingress"`
Proxy string `json:"proxy"`
ProxyError string `json:"proxy_error,omitempty"`
Tunnel tunnel.Status `json:"tunnel"`
Worktrees []WorktreeView `json:"worktrees"`
}
type TunnelRequest ¶
type TunnelRequest struct {
Provider string `json:"provider,omitempty"`
}
type VersionResponse ¶ added in v0.1.1
type VersionResponse struct {
Version string `json:"version"`
}
type WorktreeView ¶
type WorktreeView struct {
ID string `json:"id"`
Project string `json:"project"`
ProjectDomain string `json:"project_domain"`
Slug string `json:"slug"`
Branch string `json:"branch"`
Path string `json:"path"`
IsMain bool `json:"is_main"`
Parked bool `json:"parked,omitempty"`
PublicURL string `json:"public_url,omitempty"`
ConfigFile string `json:"config_file,omitempty"`
Services []ServiceView `json:"services"`
}
Click to show internal directories.
Click to hide internal directories.