diff --git a/pkg/cron_workflow_types.go b/pkg/cron_workflow_types.go index e4bd04d..01d7934 100644 --- a/pkg/cron_workflow_types.go +++ b/pkg/cron_workflow_types.go @@ -80,6 +80,7 @@ func (cw *CronWorkflow) GetParametersFromWorkflowSpecJson() ([]byte, error) { return parametersJson, nil } +// AddToManifestSpec updates the CronWorkflow's manifest by setting the input manifest under the specified key func (cw *CronWorkflow) AddToManifestSpec(key, manifest string) error { currentManifestMapping, err := mapping.NewFromYamlString(cw.Manifest) if err != nil { diff --git a/pkg/database.go b/pkg/database.go index 5bac1c5..998ed0c 100644 --- a/pkg/database.go +++ b/pkg/database.go @@ -5,10 +5,12 @@ import ( "github.com/jmoiron/sqlx" ) +// DB represents a database connection. It wraps a sqlx.DB to provide convenience methods. type DB struct { sqlx.DB } +// NewDB creates a new DB using an existing sqlx.DB connection. func NewDB(db *sqlx.DB) *DB { return &DB{ *db,