func (r *RebuildConfig) OutputUsage() {
	cconfig.OutputUsage(r, rebuildEnvVarPrefix, rebuildEnvVarPrefix)
}
OutputUsage prints the usage string to os.Stdout
package utils
import (
	"errors"
	cconfig "github.com/joincivil/go-common/pkg/config"
	"github.com/kelseyhightower/envconfig"
)
const (
	rebuildEnvVarPrefix = "rebuild"
)
type RebuildConfig struct {
	PersisterType            cconfig.PersisterType `ignored:"true"`
	PersisterPostgresAddress string                `split_words:"true" required:"true" desc:"If persister type is Postgresql, sets the address"`
	PersisterPostgresPort    int                   `split_words:"true" required:"true" desc:"If persister type is Postgresql, sets the port"`
	PersisterPostgresDbname  string                `split_words:"true" required:"true" desc:"If persister type is Postgresql, sets the database name"`
	PersisterPostgresUser    string                `split_words:"true" required:"true" desc:"If persister type is Postgresql, sets the database user"`
	PersisterPostgresPw      string                `split_words:"true" required:"true" desc:"If persister type is Postgresql, sets the database password"`
}
func (r *RebuildConfig) PopulateFromEnv() error {
	err := envconfig.Process(rebuildEnvVarPrefix, r)
	if err != nil {
		return err
	}
	r.populatePersisterType()
	return r.validatePersister()
}
func (r *RebuildConfig) populatePersisterType() {
	r.PersisterType = cconfig.PersisterTypePostgresql
}
func (r *RebuildConfig) validatePersister() error {
	return r.validatePostgresqlPersister()
}