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: pms.go
    path of file: ./repos/clickvisual/api/internal/service/permission/pmsplugin
    
    the code of the file until where you have to start completion: package pmsplugin

import (
	"context"
	"fmt"
	"strconv"
	"strings"
	"sync"

	"github.com/casbin/casbin/v2"
	"github.com/casbin/casbin/v2/persist"
	gormadapter "github.com/casbin/gorm-adapter/v3"
	rediswatcher "github.com/clickvisual/casbin-redis-watcher"
	"github.com/ego-component/egorm"
	"github.com/gotomicro/ego/core/econf"
	"github.com/gotomicro/ego/core/elog"
	"github.com/pkg/errors"
	"go.uber.org/zap"
	"gorm.io/gorm"

	"github.com/clickvisual/clickvisual/api/internal/invoker"
	db2 "github.com/clickvisual/clickvisual/api/internal/pkg/model/db"
	"github.com/clickvisual/clickvisual/api/internal/pkg/model/view"
)

var (
	enforcer     *casbin.Enforcer
	enforcerLock = &
    
func GetPmsCommonInfo(iid int) view.ResPmsCommonInfo {
	var rulesInfo, prefixesInfo, allActsInfo, normalActsInfo, appSubResrcInfo, configRsrcResrcInfo []view.InfoItem
	for rName, rDesc := range PermittedRuleTypes {
		rulesInfo = append(rulesInfo, view.InfoItem{
			Name: rName,
			Desc: rDesc,
		})
	}
	for name, desc := range PermittedPrefixMap {
		prefixesInfo = append(prefixesInfo, view.InfoItem{
			Name: name,
			Desc: desc,
		})
	}

	for _, name := range PermittedActLst {
		allActsInfo = append(allActsInfo, view.InfoItem{
			Name: name,
			Desc: PermittedActMap[name],
		})
	}

	for _, name := range NormalAct {
		normalActsInfo = append(normalActsInfo, view.InfoItem{
			Name: name,
			Desc: GetActCnName(name),
		})
	}

	for _, name := range PermittedSubResourceList {
		appSubResrcInfo = append(appSubResrcInfo, view.InfoItem{
			Name: name,
			Desc: PermittedSubResource[name],
		})
	}

	for name, desc := range PermittedConfigRsrcSubResource {
		configRsrcResrcInfo = append(configRsrcResrcInfo, view.InfoItem{
			Name: name,
			Desc: desc,
		})
	}

	return view.ResPmsCommonInfo{
		RulesInfo:                  rulesInfo,
		PrefixesInfo:               prefixesInfo,
		AllActsInfo:                allActsInfo,
		NormalActsInfo:             normalActsInfo,
		AppSubResourcesInfo:        appSubResrcInfo,
		ConfigRsrcSubResourcesInfo: configRsrcResrcInfo,
		DomainCascader:             GetDomainCascaderOptions(iid),
	}
}