...
Package utils
Constants
const (
LongHelp = `
CLI program to create helm workloads in sql db from what is in big query.
The cli program can be run like so:
hr --databaseHost=localhost --databaseName=dev0 --databaseUser=postgres --databasePassword=****
--bigQueryTableName='ret-edge-dev0-foreman.ctlfishpubsub.resources' --gcpSA=path
The following flags are required for the cli to run:
databaseHost, databaseName, databaseUser, bigQueryTableName gcpSA
database password is optional and will use iam auth if not provided
The dryRun flag is an optional and defaults to false if not specified. launchdarklyKey is also an optional flag that defaults to using cluster id if not set.`
)
type HRCommand struct {
DBConnection *sql.DB
BQClient clients.BQClient
}
func New() *HRCommand
func (HRCommand) Exec
¶
func (e HRCommand) Exec(name, shortUsage, shortHelp string, bqTableName string, callback func(ctx context.Context, db *sql.DB, BQClient clients.BQClient, bqTableName string, clusterEdgeID string) bool, fs *flag.FlagSet) *ffcli.Command
func (e *HRCommand) SetBQClient(db clients.BQClient) *HRCommand
func (e *HRCommand) SetDBConnection(db *sql.DB) *HRCommand