Documentation
¶
Index ¶
Constants ¶
View Source
const Slug = "admin"
Variables ¶
This section is empty.
Functions ¶
func ServeCommand ¶ added in v1.4.14
ServeCommand creates an API-only server command, independently of compat mode.
Types ¶
type AdminConnection ¶
type AdminConnection struct {
Name string `json:"name"`
Host string `json:"host"`
User string `json:"user"`
Port int `json:"port"`
LocalPort int `json:"local_port"`
RemotePort int `json:"remote_port"`
}
AdminConnection represents a saved remote admin connection.
type AdminProject ¶
type AdminProject struct {
ID string `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
Host string `json:"host"`
SSHUser string `json:"ssh_user"`
URL string `json:"url"`
}
AdminProject represents a project in the multi-project config.
type Deps ¶
type Deps struct {
LoadHealthConfig func() (*config.Config, string, error)
OpenBrowserCmd func(context.Context, string) *exec.Cmd
ResolveEnvFile func(string) (string, error)
SetEnvKeyInFile func(string, string, string) error
ShouldOpenBrowser func() bool
}
Deps carries the command package helpers used by the admin family.
type ServeDeps ¶ added in v1.4.14
type ServeDeps struct {
// Registry supplies the command snapshot used by the server.
Registry func() (*cmdregistry.Registry, error)
// DataSchema provides committed command data schemas for OpenAPI.
DataSchema func(string) ([]byte, bool)
// ProjectDir resolves the invocation working directory.
ProjectDir func() (string, error)
// Listen binds the listener before announcing readiness; nil uses net.Listen.
Listen func(network, address string) (net.Listener, error)
}
ServeDeps supplies composition-root providers without importing commands.
Click to show internal directories.
Click to hide internal directories.