Movatterモバイル変換


[0]ホーム

URL:


Alert GO-2024-3228: Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect') in github.com/coder/coder
Notice  The highest tagged major version isv2.

cli

package
v0.27.3Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2023 License:AGPL-3.0Imports:150Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (Caret =cliui.DefaultStyles.Prompt.String())

Functions

funcBuildLoggeradded inv0.22.1

func BuildLogger(inv *clibase.Invocation, cfg *codersdk.DeploymentValues) (slog.Logger, func(),error)

funcConfigureHTTPClientadded inv0.22.1

func ConfigureHTTPClient(ctxcontext.Context, clientCertFile, clientKeyFilestring, tlsClientCAFilestring) (context.Context, *http.Client,error)

funcConfigureTraceProvideradded inv0.22.1

funcContextWithLoggeradded inv0.18.0

func ContextWithLogger(ctxcontext.Context, lslog.Logger)context.Context

funcCurrentOrganizationadded inv0.12.0

func CurrentOrganization(inv *clibase.Invocation, client *codersdk.Client) (codersdk.Organization,error)

CurrentOrganization returns the currently active organization for the authenticated user.

funcDumpHandleradded inv0.22.1

func DumpHandler(ctxcontext.Context)

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.

funcIsLocalURLadded inv0.22.1

func IsLocalURL(ctxcontext.Context, u *url.URL) (bool,error)

isLocalURL returns true if the hostname of the provided URL appears toresolve to a loopback address.

funcIsLocalhostadded inv0.22.1

func IsLocalhost(hoststring)bool

IsLocalhost returns true if the host points to the local machine. Intended tobe called with `u.Hostname()`.

funcLoggerFromContextadded inv0.18.0

func LoggerFromContext(ctxcontext.Context) (slog.Logger,bool)

funcParseProvisionerTagsadded inv0.12.8

func ParseProvisionerTags(rawTags []string) (map[string]string,error)

funcPrintDeprecatedOptionsadded inv0.22.1

func PrintDeprecatedOptions()clibase.MiddlewareFunc

printDeprecatedOptions loops through all command options, and printsa warning for usage of deprecated options.

funcPrintLogoadded inv0.22.1

func PrintLogo(inv *clibase.Invocation, daemonTitlestring)

nolint: revive

funcReadGitAuthProvidersFromEnvadded inv0.19.0

func ReadGitAuthProvidersFromEnv(environ []string) ([]codersdk.GitAuthConfig,error)

ReadGitAuthProvidersFromEnv is provided for compatibility purposes with theviper CLI.DEPRECATED

funcServeHandleradded inv0.22.1

func ServeHandler(ctxcontext.Context, loggerslog.Logger, handlerhttp.Handler, addr, namestring) (closeFunc func())

funcWriteConfigMWadded inv0.22.1

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

typeHTTPServersadded inv0.22.1

type HTTPServers struct {HTTPUrl      *url.URLHTTPListenernet.Listener// TLSTLSUrl      *url.URLTLSListenernet.ListenerTLSConfig   *tls.Config}

funcConfigureHTTPServersadded inv0.22.1

func ConfigureHTTPServers(inv *clibase.Invocation, cfg *codersdk.DeploymentValues) (_ *HTTPServers, errerror)

func (*HTTPServers)Closeadded inv0.22.1

func (s *HTTPServers) Close()

func (*HTTPServers)Serveadded inv0.22.1

func (s *HTTPServers) Serve(srv *http.Server)error

Serve acts just like http.Serve. It is a blocking call until the serveris closed, and an error is returned if any underlying Serve call fails.

typeRootCmdadded inv0.21.0

type RootCmd struct {// contains filtered or unexported fields}

RootCmd contains parameters and helpers useful to all commands.

func (*RootCmd)AGPLadded inv0.21.0

func (r *RootCmd) AGPL() []*clibase.Cmd

func (*RootCmd)Commandadded inv0.21.0

func (r *RootCmd) Command(subcommands []*clibase.Cmd) (*clibase.Cmd,error)

func (*RootCmd)Coreadded inv0.21.0

func (r *RootCmd) Core() []*clibase.Cmd

func (*RootCmd)InitClientadded 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.

func (*RootCmd)RunMainadded inv0.21.0

func (r *RootCmd) RunMain(subcommands []*clibase.Cmd)

Main is the entrypoint for the Coder CLI.

func (*RootCmd)Serveradded inv0.21.0

func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.API,io.Closer,error)) *clibase.Cmd

nolint:gocyclo

Source Files

View all Source files

Directories

PathSynopsis
Package clibase offers an all-in-one solution for a highly configurable CLI application.
Package clibase offers an all-in-one solution for a highly configurable CLI application.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp