Documentation ¶
Index ¶
- func FixNameError(err error, ns string) error
- func MarshalED25519PrivateKey(key ed25519.PrivateKey, comment string) []byte
- func NewRootCmd(client *client.Client) *cobra.Command
- func ResolverForOrg(c *agent.Client, org *api.Organization) (*net.Resolver, string, error)
- type BoolFlagOpts
- type Command
- func BuildCommand(parent *Command, fn RunFn, usageText string, shortHelpText string, ...) *Command
- func BuildCommandCobra(parent *Command, fn RunFn, cmd *cobra.Command, client *client.Client, ...) *Command
- func BuildCommandKS(parent *Command, fn RunFn, keystrings docstrings.KeyStrings, ...) *Command
- type Initializer
- type InitializerFn
- type IntFlagOpts
- type Option
- type PeerStatusJson
- type PostgresClusterOption
- type PostgresCmd
- func (pc *PostgresCmd) CreateDatabase(dbName string) (*PostgresCommandResponse, error)
- func (pc *PostgresCmd) CreateUser(userName, pwd string) (*PostgresCommandResponse, error)
- func (pc *PostgresCmd) DbExists(dbName string) (bool, error)
- func (pc *PostgresCmd) DeleteUser(userName string) (*PostgresCommandResponse, error)
- func (pc *PostgresCmd) GrantAccess(dbName, username string) (*PostgresCommandResponse, error)
- func (pc *PostgresCmd) ListDatabases() (*PostgresDatabaseListResponse, error)
- func (pc *PostgresCmd) ListUsers() (*PostgresUserListResponse, error)
- func (pc *PostgresCmd) RevokeAccess(dbName, username string) (*PostgresCommandResponse, error)
- func (pc *PostgresCmd) UserExists(userName string) (bool, error)
- type PostgresCommandResponse
- type PostgresConfiguration
- type PostgresCreateDatabaseRequest
- type PostgresCreateUserRequest
- type PostgresDatabase
- type PostgresDatabaseListResponse
- type PostgresDeleteUserRequest
- type PostgresGrantAccessRequest
- type PostgresRevokeAccessRequest
- type PostgresUser
- type PostgresUserListResponse
- type ProxyParams
- type RunFn
- type SSHParams
- type StartPeerJson
- type StringFlagOpts
- type StringSliceFlagOpts
- type UpdatePeerJson
- Bugs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FixNameError ¶ added in v0.0.254
FixNameOrError cleans up resolver errors; the Go stdlib doesn't notice when you swap out the host its resolver connects to, and prints the resolv.conf resolver in error messages, which is super confusing for users.
func MarshalED25519PrivateKey ¶ added in v0.0.172
func MarshalED25519PrivateKey(key ed25519.PrivateKey, comment string) []byte
stolen from `mikesmitty`, thanks, you are a mikesmitty and a scholar
func ResolverForOrg ¶ added in v0.0.254
ResolverForOrg takes a connection to the wireguard agent and an organization and returns a working net.Resolver for DNS for that organization, along with the address of the nameserver.
Types ¶
type BoolFlagOpts ¶
type BoolFlagOpts struct { Name string Shorthand string Description string Default bool EnvName string Hidden bool }
BoolFlagOpts - options for boolean flags
type Command ¶
Command - Wrapper for a cobra command
func BuildCommand ¶
func BuildCommand(parent *Command, fn RunFn, usageText string, shortHelpText string, longHelpText string, client *client.Client, options ...Option) *Command
BuildCommand - builds a functioning Command using all the initializers
func BuildCommandCobra ¶ added in v0.0.236
func BuildCommandKS ¶ added in v0.0.138
func BuildCommandKS(parent *Command, fn RunFn, keystrings docstrings.KeyStrings, client *client.Client, options ...Option) *Command
BuildCommandKS - A wrapper for BuildCommand which takes the docs.KeyStrings bundle instead of the coder having to manually unwrap it
func (*Command) AddBoolFlag ¶
func (c *Command) AddBoolFlag(options BoolFlagOpts)
AddBoolFlag - Add a boolean flag for a command
func (*Command) AddCommand ¶
AddCommand adds subcommands to this command
func (*Command) AddIntFlag ¶ added in v0.0.121
func (c *Command) AddIntFlag(options IntFlagOpts)
AddIntFlag - Add an integer flag to a command
func (*Command) AddStringFlag ¶
func (c *Command) AddStringFlag(options StringFlagOpts)
AddStringFlag - Add a string flag to a command
func (*Command) AddStringSliceFlag ¶ added in v0.0.84
func (c *Command) AddStringSliceFlag(options StringSliceFlagOpts)
AddStringSliceFlag - add a string slice flag to a command
type Initializer ¶
type Initializer struct { Setup InitializerFn PreRun InitializerFn }
Initializer - Retains Setup and PreRun functions
type InitializerFn ¶
type InitializerFn func(*cmdctx.CmdContext) error
InitializerFn - A wrapper for an Initializer function that takes a command context
type IntFlagOpts ¶ added in v0.0.121
type IntFlagOpts struct { Name string Shorthand string Description string Default int EnvName string Hidden bool }
IntFlagOpts - options for integer flags
type Option ¶ added in v0.0.135
type Option func(*Command) Initializer
Option - A wrapper for an Initializer function that takes a command
type PeerStatusJson ¶ added in v0.0.179
type PostgresClusterOption ¶ added in v0.0.260
type PostgresCmd ¶ added in v0.0.263
type PostgresCmd struct {
// contains filtered or unexported fields
}
func NewPostgresCmd ¶ added in v0.0.263
func NewPostgresCmd(cmdCtx *cmdctx.CmdContext, app *api.App, dialer agent.Dialer) *PostgresCmd
func (*PostgresCmd) CreateDatabase ¶ added in v0.0.263
func (pc *PostgresCmd) CreateDatabase(dbName string) (*PostgresCommandResponse, error)
func (*PostgresCmd) CreateUser ¶ added in v0.0.263
func (pc *PostgresCmd) CreateUser(userName, pwd string) (*PostgresCommandResponse, error)
func (*PostgresCmd) DbExists ¶ added in v0.0.263
func (pc *PostgresCmd) DbExists(dbName string) (bool, error)
func (*PostgresCmd) DeleteUser ¶ added in v0.0.263
func (pc *PostgresCmd) DeleteUser(userName string) (*PostgresCommandResponse, error)
func (*PostgresCmd) GrantAccess ¶ added in v0.0.263
func (pc *PostgresCmd) GrantAccess(dbName, username string) (*PostgresCommandResponse, error)
func (*PostgresCmd) ListDatabases ¶ added in v0.0.270
func (pc *PostgresCmd) ListDatabases() (*PostgresDatabaseListResponse, error)
func (*PostgresCmd) ListUsers ¶ added in v0.0.270
func (pc *PostgresCmd) ListUsers() (*PostgresUserListResponse, error)
func (*PostgresCmd) RevokeAccess ¶ added in v0.0.263
func (pc *PostgresCmd) RevokeAccess(dbName, username string) (*PostgresCommandResponse, error)
func (*PostgresCmd) UserExists ¶ added in v0.0.263
func (pc *PostgresCmd) UserExists(userName string) (bool, error)
type PostgresCommandResponse ¶ added in v0.0.263
type PostgresConfiguration ¶ added in v0.0.260
type PostgresCreateDatabaseRequest ¶ added in v0.0.263
type PostgresCreateDatabaseRequest struct {
Name string `json:"name"`
}
type PostgresCreateUserRequest ¶ added in v0.0.263
type PostgresDatabase ¶ added in v0.0.263
type PostgresDatabaseListResponse ¶ added in v0.0.263
type PostgresDatabaseListResponse struct {
Result []PostgresDatabase
}
type PostgresDeleteUserRequest ¶ added in v0.0.263
type PostgresDeleteUserRequest struct {
Username string `json:"username"`
}
type PostgresGrantAccessRequest ¶ added in v0.0.263
type PostgresRevokeAccessRequest ¶ added in v0.0.263
type PostgresUser ¶ added in v0.0.263
type PostgresUserListResponse ¶ added in v0.0.263
type PostgresUserListResponse struct {
Result []PostgresUser
}
type ProxyParams ¶ added in v0.0.243
type RunFn ¶ added in v0.0.135
type RunFn func(cmdContext *cmdctx.CmdContext) error
RunFn - Run function for commands which takes a command context
type SSHParams ¶ added in v0.0.183
type SSHParams struct { Ctx *cmdctx.CmdContext Org *api.Organization App string Dialer agent.Dialer Cmd string Stdin io.Reader Stdout io.WriteCloser Stderr io.WriteCloser DisableSpinner bool }
type StartPeerJson ¶ added in v0.0.179
type StringFlagOpts ¶
type StringFlagOpts struct { Name string Shorthand string Description string Default string EnvName string Hidden bool }
StringFlagOpts - options for string flags
type StringSliceFlagOpts ¶ added in v0.0.84
type StringSliceFlagOpts struct { Name string Shorthand string Description string Default []string EnvName string }
StringSliceFlagOpts - options a string slice flag
type UpdatePeerJson ¶ added in v0.0.179
type UpdatePeerJson struct {
Pubkey string `json:"pubkey"`
}
Notes ¶
Bugs ¶
do better
can't stay this way
Source Files ¶
- autoscaling.go
- certificates.go
- checks.go
- command.go
- config.go
- dashboard.go
- deploy.go
- dig.go
- dns.go
- domains.go
- fly_agent.go
- image.go
- info.go
- input.go
- ips.go
- launch.go
- list.go
- machine.go
- monitor.go
- postgres.go
- postgres_commands.go
- proxy.go
- regions.go
- root.go
- scale.go
- secrets.go
- ssh.go
- ssh_terminal.go
- turboku.go
- vm.go
- volumes.go
- wireguard.go