Documentation ¶
Index ¶
- func BindPostgresFlags(cmd *cobra.Command)
- func BindRPCFlags(cmd *cobra.Command)
- func DefaultKwilAdminRoot() string
- func DefaultKwildRoot() string
- func DefaultPostgresConnConfig() *pg.ConnConfig
- func ExpandPath(path string) (string, error)
- func GetAdminSvcClient(ctx context.Context, cmd *cobra.Command) (*adminclient.AdminClient, error)
- func GetPostgresFlags(cmd *cobra.Command) (*pg.ConnConfig, error)
- func GetRPCServerFlag(cmd *cobra.Command) (string, error)
- func MergePostgresFlags(conf *pg.ConnConfig, cmd *cobra.Command) (*pg.ConnConfig, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindPostgresFlags ¶ added in v0.9.0
BindPostgresFlags binds flags to connect to a postgres database.
func BindRPCFlags ¶
BindRPCFlags binds the RPC flags to the given command. This includes an rpcserver flag, and the TLS flags. These flags can be used to create an admin service client. The flags will be bound to all subcommands of the given command.
func DefaultKwilAdminRoot ¶
func DefaultKwilAdminRoot() string
func DefaultKwildRoot ¶
func DefaultKwildRoot() string
func DefaultPostgresConnConfig ¶ added in v0.9.0
func DefaultPostgresConnConfig() *pg.ConnConfig
DefaultPostgresConnConfig returns a default connection config for a postgres database.
func ExpandPath ¶ added in v0.9.0
func GetAdminSvcClient ¶
func GetAdminSvcClient(ctx context.Context, cmd *cobra.Command) (*adminclient.AdminClient, error)
GetAdminSvcClient will return an admin service client based on the flags. The flags should be bound using the BindRPCFlags function.
func GetPostgresFlags ¶ added in v0.9.0
func GetPostgresFlags(cmd *cobra.Command) (*pg.ConnConfig, error)
GetPostgresFlags returns the postgres flags from the given command.
func GetRPCServerFlag ¶
GetRPCServerFlag returns the RPC flag from the given command.
func MergePostgresFlags ¶ added in v0.9.0
func MergePostgresFlags(conf *pg.ConnConfig, cmd *cobra.Command) (*pg.ConnConfig, error)
MergePostgresFlags merges the given connection config with the flags from the given command. It only sets the fields that are set in the flags.
Types ¶
This section is empty.