cli
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- Variables
- func BuildLogger(inv *clibase.Invocation, cfg *codersdk.DeploymentValues) (slog.Logger, func(), error)
- func ConfigureHTTPClient(ctx context.Context, clientCertFile, clientKeyFile string, ...) (context.Context, *http.Client, error)
- func ConfigureTraceProvider(ctx context.Context, logger slog.Logger, inv *clibase.Invocation, ...) (trace.TracerProvider, string, func(context.Context) error)
- func ContextWithLogger(ctx context.Context, l slog.Logger) context.Context
- func CurrentOrganization(inv *clibase.Invocation, client *codersdk.Client) (codersdk.Organization, error)
- func DumpHandler(ctx context.Context)
- func IsLocalURL(ctx context.Context, u *url.URL) (bool, error)
- func IsLocalhost(host string) bool
- func LoggerFromContext(ctx context.Context) (slog.Logger, bool)
- func ParseProvisionerTags(rawTags []string) (map[string]string, error)
- func PrintDeprecatedOptions() clibase.MiddlewareFunc
- func PrintLogo(inv *clibase.Invocation, daemonTitle string)
- func ReadGitAuthProvidersFromEnv(environ []string) ([]codersdk.GitAuthConfig, error)
- func ServeHandler(ctx context.Context, logger slog.Logger, handler http.Handler, ...) (closeFunc func())
- func WriteConfigMW(cfg *codersdk.DeploymentValues) clibase.MiddlewareFunc
- type HTTPServers
- type RootCmd
- func (r *RootCmd) AGPL() []*clibase.Cmd
- func (r *RootCmd) Command(subcommands []*clibase.Cmd) (*clibase.Cmd, error)
- func (r *RootCmd) Core() []*clibase.Cmd
- func (r *RootCmd) InitClient(client *codersdk.Client) clibase.MiddlewareFunc
- func (r *RootCmd) RunMain(subcommands []*clibase.Cmd)
- func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.API, io.Closer, error)) *clibase.Cmd
Constants¶
This section is empty.
Variables¶
var (Caret =cliui.DefaultStyles.Prompt.String())
Functions¶
funcBuildLogger¶added inv0.22.1
func BuildLogger(inv *clibase.Invocation, cfg *codersdk.DeploymentValues) (slog.Logger, func(),error)
funcConfigureHTTPClient¶added inv0.22.1
funcConfigureTraceProvider¶added inv0.22.1
func ConfigureTraceProvider(ctxcontext.Context,loggerslog.Logger,inv *clibase.Invocation,cfg *codersdk.DeploymentValues,) (trace.TracerProvider,string, func(context.Context)error)
funcContextWithLogger¶added inv0.18.0
funcCurrentOrganization¶added inv0.12.0
func CurrentOrganization(inv *clibase.Invocation, client *codersdk.Client) (codersdk.Organization,error)
CurrentOrganization returns the currently active organization for the authenticated user.
funcDumpHandler¶added inv0.22.1
DumpHandler provides a custom SIGQUIT and SIGTRAP handler that dumps thestacktrace of all goroutines to stderr and a well-known file in the homedirectory. This is useful for debugging deadlock issues that may occur inproduction in workspaces, since the default Go runtime will only dump tostderr (which is often difficult/impossible to read in a workspace).
SIGQUITs will still cause the program to exit (similarly to the default Goruntime behavior).
A SIGQUIT handler will not be registered if GOTRACEBACK=crash.
On Windows this immediately returns.
funcIsLocalURL¶added inv0.22.1
isLocalURL returns true if the hostname of the provided URL appears toresolve to a loopback address.
funcIsLocalhost¶added inv0.22.1
IsLocalhost returns true if the host points to the local machine. Intended tobe called with `u.Hostname()`.
funcParseProvisionerTags¶added inv0.12.8
funcPrintDeprecatedOptions¶added inv0.22.1
func PrintDeprecatedOptions()clibase.MiddlewareFunc
printDeprecatedOptions loops through all command options, and printsa warning for usage of deprecated options.
funcPrintLogo¶added inv0.22.1
func PrintLogo(inv *clibase.Invocation, daemonTitlestring)
nolint: revive
funcReadGitAuthProvidersFromEnv¶added inv0.19.0
func ReadGitAuthProvidersFromEnv(environ []string) ([]codersdk.GitAuthConfig,error)
ReadGitAuthProvidersFromEnv is provided for compatibility purposes with theviper CLI.DEPRECATED
funcServeHandler¶added inv0.22.1
funcWriteConfigMW¶added inv0.22.1
func WriteConfigMW(cfg *codersdk.DeploymentValues)clibase.MiddlewareFunc
writeConfigMW will prevent the main command from running if the write-configflag is set. Instead, it will marshal the command options to YAML and writethem to stdout.
Types¶
typeHTTPServers¶added inv0.22.1
type HTTPServers struct {HTTPUrl *url.URLHTTPListenernet.Listener// TLSTLSUrl *url.URLTLSListenernet.ListenerTLSConfig *tls.Config}
funcConfigureHTTPServers¶added inv0.22.1
func ConfigureHTTPServers(inv *clibase.Invocation, cfg *codersdk.DeploymentValues) (_ *HTTPServers, errerror)
func (*HTTPServers)Close¶added inv0.22.1
func (s *HTTPServers) Close()
typeRootCmd¶added inv0.21.0
type RootCmd struct {// contains filtered or unexported fields}
RootCmd contains parameters and helpers useful to all commands.
func (*RootCmd)InitClient¶added inv0.21.0
func (r *RootCmd) InitClient(client *codersdk.Client)clibase.MiddlewareFunc
InitClient sets client to a new client.It reads from global configuration files if flags are not set.
Source Files¶
- agent.go
- configssh.go
- configssh_other.go
- constants.go
- create.go
- delete.go
- dotfiles.go
- exp.go
- exp_scaletest.go
- gitaskpass.go
- gitssh.go
- help.go
- list.go
- login.go
- logout.go
- netcheck.go
- parameter.go
- ping.go
- portforward.go
- publickey.go
- remoteforward.go
- rename.go
- resetpassword.go
- restart.go
- root.go
- schedule.go
- server.go
- server_createadminuser.go
- show.go
- signal_unix.go
- speedtest.go
- ssh.go
- ssh_other.go
- start.go
- stat.go
- state.go
- stop.go
- templatecreate.go
- templatedelete.go
- templateedit.go
- templateinit.go
- templatelist.go
- templateplan.go
- templatepull.go
- templatepush.go
- templates.go
- templatevariables.go
- templateversions.go
- tokens.go
- update.go
- usercreate.go
- userlist.go
- users.go
- userstatus.go
- util.go
- version.go
- vscodessh.go