package repository import ( "code.30cm.net/digimon/app-cloudep-permission-server/pkg/domain/entity" "context" ) type RoleRepository interface { Insert(ctx context.Context, role *entity.Role) error Update(ctx context.Context, role *entity.Role) error Delete(ctx context.Context, role *entity.Role) error List() ListAll() Get() GetByUID() } type RoleRepository interface { Page(ctx context.Context, filter PageRoleFilter, page, size int) ([]entity.Role, int64, error) Get(ctx context.Context, id int64) (entity.Role, error) GetByUID(ctx context.Context, uid string) (entity.Role, error) All(ctx context.Context, clientID int) ([]entity.Role, error) IncrementID(ctx context.Context) (int, error) Create(ctx context.Context, role *entity.Role) (int64, error) Update(ctx context.Context, role *entity.Role) error Delete(ctx context.Context, uid string) error } type PageRoleFilter struct { ClientID int UID string Name string Permissions []string Status int } type RolePermissionRepository interface { BindRolePermission() UnBindRolePermission() GetRolePermission() GetByPermissionID() }