Files
online-backend/internal/identity/user/storage.go
GuwandykA d1a6fcaadc
Some checks failed
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled
ch some
2026-09-04 19:33:26 +05:00

17 lines
701 B
Go

package user
import "context"
type Repository interface {
List(ctx context.Context, filter ListFilter) (ListUserDTO, error)
ListStaff(ctx context.Context, filter ListFilter) (ListUserDTO, error)
GetByID(ctx context.Context, id int64) (UserDTO, error)
GetByRole(ctx context.Context, role string, filter ListFilter) (ListUserDTO, error)
Create(ctx context.Context, dto CreateUserDTO) (UserDTO, error)
Update(ctx context.Context, id int64, dto UpdateUserDTO) (UserDTO, error)
Delete(ctx context.Context, id int64) error
// RoleGuardName returns the guard_name of the role with the given code,
// or "" if no such role exists.
RoleGuardName(ctx context.Context, code string) (string, error)
}