Web users may only CRUD their own records, operators stay in assigned branches, and admin/manager/superadmin keep full access. Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
482 B
Go
13 lines
482 B
Go
package backup
|
|
|
|
import "context"
|
|
|
|
type Repository interface {
|
|
List(ctx context.Context, filter ListFilter) (ListBackupDTO, error)
|
|
GetByID(ctx context.Context, id int64) (BackupDTO, error)
|
|
Create(ctx context.Context, dto CreateBackupDTO) (BackupDTO, error)
|
|
Finish(ctx context.Context, id int64, sizeBytes int64, status string, errMsg *string) (BackupDTO, error)
|
|
Delete(ctx context.Context, id int64) error
|
|
CountByFilePrefix(ctx context.Context, prefix string) (int64, error)
|
|
}
|