You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: loader.go
    path of file: ./repos/cds/engine/api/rbac
    
    the code of the file until where you have to start completion: package rbac

import (
	"context"

	"github.com/go-gorp/gorp"
	"github.com/rockbears/log"

	"github.com/ovh/cds/engine/api/database/gorpmapping"
	"github.com/ovh/cds/sdk"
)

// LoadOptionFunc is used as options to loadProject functions
type LoadOptionFunc func(context.Context, gorp.SqlExecutor, *rbac) error

// LoadOptions provides all options on rbac loads functions
var LoadOptions = struct {
	Default          LoadOptionFunc
	LoadRBACGlobal   LoadOptionFunc
	LoadRBACProject  LoadOptionFunc
	LoadRBACHatchery LoadOptionFunc
	LoadRBACRegion   LoadOptionFunc
	LoadRBACWorkflow LoadOptionFunc
	All              LoadOptionFunc
}{
	Default:          loadDefault,
	LoadRBACGlobal:   loadRBACGlobal,
	LoadRBACProject:  loadRBACProject,
	
    
func loadRBACWorkflow(ctx context.Context, db gorp.SqlExecutor, rbac *rbac) error {
	query := "SELECT * FROM rbac_workflow WHERE rbac_id = $1"
	var rbacWorkflows []rbacWorkflow
	if err := gorpmapping.GetAll(ctx, db, gorpmapping.NewQuery(query).Args(rbac.ID), &rbacWorkflows); err != nil {
		return err
	}
	rbac.Workflows = make([]sdk.RBACWorkflow, 0, len(rbacWorkflows))
	for i := range rbacWorkflows {
		rbacWf := &rbacWorkflows[i]
		isValid, err := gorpmapping.CheckSignature(rbacWf, rbacWf.Signature)
		if err != nil {
			return sdk.WrapError(err, "error when checking signature for rbac_workflow %d", rbacWf.ID)
		}
		if !isValid {
			log.Error(ctx, "rbac_workflow.get> rbac_workflow %d data corrupted", rbacWf.ID)
			continue
		}
		if !rbacWf.AllUsers {
			if err := loadRBACWorkflowUsers(ctx, db, rbacWf); err != nil {
				return err
			}
			if err := loadRBACWorkflowGroups(ctx, db, rbacWf); err != nil {
				return err
			}
		}
		rbac.Workflows = append(rbac.Workflows, rbacWf.RBACWorkflow)
	}
	return nil
}