Versions in this module Expand all Collapse all v0 v0.2.0 Jan 20, 2023 Changes in this version + var ErrNotDeleted = errors.New("pgx CommandTag is not DELETE") + var ErrNotInserted = errors.New("pgx CommandTag is not INSERT") + type Assignment struct + At time.Time + ChatID int64 + CreatedAt time.Time + ID uuid.UUID + Operator string + type AssignmentRepoData struct + func (asr *AssignmentRepoData) AddAssignment(ctx context.Context, as Assignment) error + func (asr *AssignmentRepoData) DeleteAssignment(ctx context.Context, uid uuid.UUID) error + func (asr *AssignmentRepoData) GetAssignmentByDate(ctx context.Context, date time.Time, chatID int64) (Assignment, error) + func (asr *AssignmentRepoData) GetAssignmentSchedule(ctx context.Context, due time.Time, chatID int64) ([]Assignment, error) + func (asr *AssignmentRepoData) GetAssignmentScheduleAllChats(ctx context.Context, due time.Time) ([]Assignment, error) + func (asr *AssignmentRepoData) GetFreeSlots(ctx context.Context, due time.Time, chatID int64) ([]time.Time, error) + func (asr AssignmentRepoData) Close(ctx context.Context) error + func (asr AssignmentRepoData) GetAllChats(ctx context.Context) ([]int64, error) + type AssignmentRepoer interface + AddAssignment func(ctx context.Context, as Assignment) error + Close func(ctx context.Context) error + DeleteAssignment func(ctx context.Context, id uuid.UUID) error + GetAllChats func(ctx context.Context) ([]int64, error) + GetAssignmentByDate func(ctx context.Context, due time.Time, chatID int64) (Assignment, error) + GetAssignmentSchedule func(ctx context.Context, due time.Time, chatID int64) ([]Assignment, error) + GetAssignmentScheduleAllChats func(ctx context.Context, due time.Time) ([]Assignment, error) + GetFreeSlots func(ctx context.Context, due time.Time, chatID int64) ([]time.Time, error) + var AssignmentRepo AssignmentRepoer + func InitAssignmentRepo(ctx context.Context, dsn string) (AssignmentRepoer, error)