Documentation ¶
Index ¶
- type AutoScheduleRepoCommand
- type AutoScheduleRepoQuery
- type PostgresScheduleRepository
- func (r *PostgresScheduleRepository) CreateSchedule(ctx context.Context, name, roomID string) (string, error)
- func (r *PostgresScheduleRepository) CreateTask(ctx context.Context, task ent.TaskWithDetailCommand) error
- func (r *PostgresScheduleRepository) CreateTaskDependency(ctx context.Context, taskDep ent.TaskDependencyCommand) error
- func (r *PostgresScheduleRepository) DeleteTaskDependeny(ctx context.Context, taskDep ent.TaskDependencyCommand) error
- func (r *PostgresScheduleRepository) EditTask(ctx context.Context, taskID string, task ent.TaskWithDetailCommand) error
- func (r *PostgresScheduleRepository) EditTaskDependency(ctx context.Context, taskDep ent.TaskDependencyCommand) error
- func (r *PostgresScheduleRepository) GetListScheduleByRoomID(ctx context.Context, roomID string) ([]ent.ScheduleQuery, error)
- func (r *PostgresScheduleRepository) GetListTaskByScheduleID(ctx context.Context, scheduleID string, queryFilter ent.TaskQueryFilter) ([]ent.TaskQuery, error)
- func (r *PostgresScheduleRepository) GetListTaskWithDetailByScheduleID(ctx context.Context, scheduleID string) ([]ent.TaskWithDetailQuery, error)
- func (r *PostgresScheduleRepository) GetTaskDetail(ctx context.Context, taskID string) (ent.TaskDetailQuery, error)
- type RedisScheduleRepository
- func (r *RedisScheduleRepository) GetAutoSchedule(ctx context.Context, scheduleID string) ([]ent.TaskWithDetailQuery, error)
- func (r *RedisScheduleRepository) InvalidateAutoSchedule(ctx context.Context, scheduleID string) error
- func (r *RedisScheduleRepository) SaveAutoSchedule(ctx context.Context, scheduleID string, tasks []ent.TaskWithDetailQuery) error
- type ScheduleCacheRepo
- type ScheduleRepo
- type ScheduleRepoCommand
- type ScheduleRepoQuery
- type TaskDependencyRepoCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoScheduleRepoCommand ¶
type AutoScheduleRepoQuery ¶
type PostgresScheduleRepository ¶
type PostgresScheduleRepository struct { Postgres *schedulepostgres.Queries // contains filtered or unexported fields }
func NewPostgresScheduleRepository ¶
func NewPostgresScheduleRepository(postgresRepo *database.SqlRepository) *PostgresScheduleRepository
func (*PostgresScheduleRepository) CreateSchedule ¶
func (*PostgresScheduleRepository) CreateTask ¶
func (r *PostgresScheduleRepository) CreateTask( ctx context.Context, task ent.TaskWithDetailCommand, ) error
func (*PostgresScheduleRepository) CreateTaskDependency ¶
func (r *PostgresScheduleRepository) CreateTaskDependency( ctx context.Context, taskDep ent.TaskDependencyCommand, ) error
func (*PostgresScheduleRepository) DeleteTaskDependeny ¶
func (r *PostgresScheduleRepository) DeleteTaskDependeny( ctx context.Context, taskDep ent.TaskDependencyCommand, ) error
func (*PostgresScheduleRepository) EditTask ¶
func (r *PostgresScheduleRepository) EditTask( ctx context.Context, taskID string, task ent.TaskWithDetailCommand, ) error
func (*PostgresScheduleRepository) EditTaskDependency ¶
func (r *PostgresScheduleRepository) EditTaskDependency( ctx context.Context, taskDep ent.TaskDependencyCommand, ) error
func (*PostgresScheduleRepository) GetListScheduleByRoomID ¶
func (r *PostgresScheduleRepository) GetListScheduleByRoomID( ctx context.Context, roomID string, ) ([]ent.ScheduleQuery, error)
func (*PostgresScheduleRepository) GetListTaskByScheduleID ¶
func (r *PostgresScheduleRepository) GetListTaskByScheduleID( ctx context.Context, scheduleID string, queryFilter ent.TaskQueryFilter, ) ([]ent.TaskQuery, error)
func (*PostgresScheduleRepository) GetListTaskWithDetailByScheduleID ¶
func (r *PostgresScheduleRepository) GetListTaskWithDetailByScheduleID( ctx context.Context, scheduleID string, ) ([]ent.TaskWithDetailQuery, error)
func (*PostgresScheduleRepository) GetTaskDetail ¶
func (r *PostgresScheduleRepository) GetTaskDetail( ctx context.Context, taskID string, ) (ent.TaskDetailQuery, error)
type RedisScheduleRepository ¶
type RedisScheduleRepository struct {
// contains filtered or unexported fields
}
func NewRedisScheduleRepository ¶
func NewRedisScheduleRepository(rds *database.RedisRepository) *RedisScheduleRepository
func (*RedisScheduleRepository) GetAutoSchedule ¶
func (r *RedisScheduleRepository) GetAutoSchedule( ctx context.Context, scheduleID string, ) ([]ent.TaskWithDetailQuery, error)
func (*RedisScheduleRepository) InvalidateAutoSchedule ¶
func (r *RedisScheduleRepository) InvalidateAutoSchedule( ctx context.Context, scheduleID string, ) error
func (*RedisScheduleRepository) SaveAutoSchedule ¶
func (r *RedisScheduleRepository) SaveAutoSchedule( ctx context.Context, scheduleID string, tasks []ent.TaskWithDetailQuery, ) error
type ScheduleCacheRepo ¶
type ScheduleCacheRepo interface { AutoScheduleRepoCommand AutoScheduleRepoQuery }
type ScheduleRepo ¶
type ScheduleRepo interface { ScheduleRepoCommand ScheduleRepoQuery TaskDependencyRepoCommand }
type ScheduleRepoCommand ¶
type ScheduleRepoQuery ¶
type ScheduleRepoQuery interface { GetListScheduleByRoomID( ctx context.Context, roomID string, ) ([]ent.ScheduleQuery, error) GetTaskDetail( ctx context.Context, taskID string, ) (ent.TaskDetailQuery, error) GetListTaskByScheduleID( ctx context.Context, scheduleID string, queryFilter ent.TaskQueryFilter, ) ([]ent.TaskQuery, error) GetListTaskWithDetailByScheduleID( ctx context.Context, scheduleID string, ) ([]ent.TaskWithDetailQuery, error) }
type TaskDependencyRepoCommand ¶
type TaskDependencyRepoCommand interface { CreateTaskDependency( ctx context.Context, taskDep ent.TaskDependencyCommand, ) error EditTaskDependency( ctx context.Context, taskDep ent.TaskDependencyCommand, ) error DeleteTaskDependeny( ctx context.Context, taskDep ent.TaskDependencyCommand, ) error }
Click to show internal directories.
Click to hide internal directories.