Documentation ¶
Index ¶
- Constants
- Variables
- func BuildURI(host, port string) string
- func CopyMap[T1 comparable, T2 any](m map[T1]T2) map[T1]T2
- func CouchBaseMissingRequiredOptions(cmd *cobra.Command) []string
- func ExecuteCommand(cmd *cobra.Command, args ...string) (output string, err error)
- func FlattenFlags(flags []flag.Flag) []flag.Flag
- func GetCBFlags() []flag.Flag
- func GetCommonFlags() []flag.Flag
- func GetDebugFlag() flag.Flag
- func NewCommand(name Command, alias []string, examples []Example, short string, long string, ...) *cobra.Command
- func ParesCouchbaseOptions(cmd *cobra.Command, collection string) (*option.Options, error)
- func ReqFieldsError(missingFields []string) error
- func ReqFieldsValidation(cmd *cobra.Command, flags []string) error
- func SetVersion(version string)
- func SplitHostArg(connString string) ([]string, string)
- func ValidateMustAllOrNotFlag(cmd *cobra.Command, flags ...string) error
- type Command
- type Example
Constants ¶
View Source
const ( Mongo = "mongo" CBMigrate = "cbmigrate" )
View Source
const ( CBCluster = "cb-cluster" CBUsername = "cb-username" CBPassword = "cb-password" CBClientCert = "cb-client-cert" CBClientCertPassword = "cb-client-cert-password" CBClientKey = "cb-client-key" CBClientKeyPassword = "cb-client-key-password" CBGenerateKey = "cb-generate-key" CBCACert = "cb-cacert" CBNoSSLVerify = "cb-no-ssl-verify" CBBucket = "cb-bucket" CBScope = "cb-scope" CBCollection = "cb-collection" CBBatchSize = "cb-batch-size" CopyIndexes = "copy-indexes" BufferSize = "buffer-size" )
View Source
const (
Debug = "debug"
)
Variables ¶
View Source
var BetaCommands = []Command{ Mongo, }
View Source
var Version string
Functions ¶
func BuildURI ¶
BuildURI assembles a URI from host and port arguments, including a possible replica set name on the host part
func CopyMap ¶
func CopyMap[T1 comparable, T2 any](m map[T1]T2) map[T1]T2
func ExecuteCommand ¶
ExecuteCommand function to run the test cases
func FlattenFlags ¶
FlattenFlags takes a slice of Flag interfaces and returns a deduplicated slice
func GetCBFlags ¶
func GetCommonFlags ¶
func GetDebugFlag ¶
func NewCommand ¶
func NewCommand(name Command, alias []string, examples []Example, short string, long string, flags []flag.Flag) *cobra.Command
NewCommand command constructor
func ParesCouchbaseOptions ¶
func ReqFieldsError ¶
func SetVersion ¶
func SetVersion(version string)
func SplitHostArg ¶
Extract the replica set name and the list of hosts from the connection string
Types ¶
Click to show internal directories.
Click to hide internal directories.