pg_data_auth_service.go
829 字节
package domainService
import (
"fmt"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/domain"
pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
)
// PgDataAuthService 数据权限验证服务
type PgDataAuthService struct {
transactionContext *pgTransaction.TransactionContext
}
// DataAuth 数据权限验证
//
// options 数据参数
// data 需要验证权限的数据
func (ptr *PgDataAuthService) DataAuth(options domain.OperateInfo, data domain.AuthedData) error {
return nil
}
func NewPgDataAuthService(transactionContext *pgTransaction.TransactionContext) (*PgDataAuthService, error) {
if transactionContext == nil {
return nil, fmt.Errorf("transactionContext参数不能为nil")
} else {
return &PgDataAuthService{
transactionContext: transactionContext,
}, nil
}
}