schedule

package
v0.0.0-...-03efb0c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoScheduleRepoCommand

type AutoScheduleRepoCommand interface {
	SaveAutoSchedule(
		ctx context.Context,
		scheduleID string,
		tasks []ent.TaskWithDetailQuery,
	) error
	InvalidateAutoSchedule(
		ctx context.Context,
		scheduleID string,
	) error
}

type AutoScheduleRepoQuery

type AutoScheduleRepoQuery interface {
	GetAutoSchedule(
		ctx context.Context,
		scheduleID string,
	) ([]ent.TaskWithDetailQuery, error)
}

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 (r *PostgresScheduleRepository) CreateSchedule(
	ctx context.Context,
	name,
	roomID string,
) (string, error)

func (*PostgresScheduleRepository) CreateTask

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 (*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 ScheduleRepoCommand

type ScheduleRepoCommand interface {
	CreateSchedule(
		ctx context.Context,
		name,
		roomID string,
	) (string, error)

	CreateTask(
		ctx context.Context,
		task ent.TaskWithDetailCommand,
	) error

	EditTask(
		ctx context.Context,
		taskID string,
		task ent.TaskWithDetailCommand,
	) error
}

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL