cmd

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const PresharedKeyFlag = "grpc-preshared-key"

Variables

This section is empty.

Functions

func BoldBlue added in v0.0.3

func BoldBlue(name string) string

func DeprecatedRunE

func DeprecatedRunE(fn cobrautil.CobraRunFunc, newCmd string) cobrautil.CobraRunFunc

DeprecatedRunE wraps the RunFunc with a warning log statement.

func HeadRevision

func HeadRevision(engine string) (string, error)

HeadRevision returns the latest migration revision for a given engine

func NewDatastoreCommand

func NewDatastoreCommand(programName string) (*cobra.Command, error)

func NewDevtoolsCommand

func NewDevtoolsCommand(programName string) *cobra.Command

func NewGCDatastoreCommand

func NewGCDatastoreCommand(programName string, cfg *datastore.Config) *cobra.Command

func NewHeadCommand

func NewHeadCommand(programName string) *cobra.Command

func NewLSPCommand

func NewLSPCommand(programName string, config *LSPConfig) *cobra.Command

func NewMigrateCommand

func NewMigrateCommand(programName string) *cobra.Command

func NewRepairDatastoreCommand

func NewRepairDatastoreCommand(programName string, cfg *datastore.Config) *cobra.Command

func NewRootCommand

func NewRootCommand(programName string) *cobra.Command

func NewServeCommand

func NewServeCommand(programName string, config *server.Config) *cobra.Command

func NewTestingCommand

func NewTestingCommand(programName string, config *testserver.Config) *cobra.Command

func NewVersionCommand

func NewVersionCommand(programName string) *cobra.Command

func RegisterDatastoreRootFlags

func RegisterDatastoreRootFlags(_ *cobra.Command)

func RegisterDevtoolsFlags

func RegisterDevtoolsFlags(cmd *cobra.Command)

func RegisterHeadFlags

func RegisterHeadFlags(cmd *cobra.Command)

func RegisterLSPFlags

func RegisterLSPFlags(cmd *cobra.Command, config *LSPConfig) error

func RegisterMigrateFlags

func RegisterMigrateFlags(cmd *cobra.Command)

func RegisterRootFlags

func RegisterRootFlags(cmd *cobra.Command) error

func RegisterServeFlags

func RegisterServeFlags(cmd *cobra.Command, config *server.Config) error

func RegisterTestingFlags

func RegisterTestingFlags(cmd *cobra.Command, config *testserver.Config)

func RegisterVersionFlags

func RegisterVersionFlags(cmd *cobra.Command)

func SignalContextWithGracePeriod

func SignalContextWithGracePeriod(ctx context.Context, gracePeriod time.Duration) context.Context

SignalContextWithGracePeriod creates a new context that will be cancelled when an interrupt/SIGTERM signal is received and the provided grace period subsequently finishes.

Types

type LSPConfig

type LSPConfig struct {
	// Addr is the address to listen on to serve the language server protocol.
	Addr string

	Stdio bool
}

LSPConfig is the configuration for the LSP command.

func (*LSPConfig) Complete

func (c *LSPConfig) Complete(ctx context.Context) (*lsp.Server, error)

Complete adapts the LSPConfig into a usable LSP server.

Directories

Path Synopsis
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL