sqlite

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CalendarRepository

type CalendarRepository struct {
	// contains filtered or unexported fields
}

CalendarRepository implements domain.CalendarRepository for SQLite

func NewCalendarRepository

func NewCalendarRepository(db *sql.DB) *CalendarRepository

NewCalendarRepository creates a new SQLite calendar repository

func (*CalendarRepository) Create

func (r *CalendarRepository) Create(calendar *domain.Calendar) error

Create creates a new calendar

func (*CalendarRepository) Delete

func (r *CalendarRepository) Delete(id int64) error

Delete deletes a calendar

func (*CalendarRepository) GetAll

func (r *CalendarRepository) GetAll() ([]*domain.Calendar, error)

GetAll retrieves all calendars (for sharing operations)

func (*CalendarRepository) GetByID

func (r *CalendarRepository) GetByID(id int64) (*domain.Calendar, error)

GetByID retrieves a calendar by ID

func (*CalendarRepository) GetByUserAndName

func (r *CalendarRepository) GetByUserAndName(userID int64, name string) (*domain.Calendar, error)

GetByUserAndName retrieves a calendar by user ID and name

func (*CalendarRepository) GetByUserID

func (r *CalendarRepository) GetByUserID(userID int64) ([]*domain.Calendar, error)

GetByUserID retrieves all calendars for a user

func (*CalendarRepository) Update

func (r *CalendarRepository) Update(calendar *domain.Calendar) error

Update updates an existing calendar

func (*CalendarRepository) UpdateSyncToken

func (r *CalendarRepository) UpdateSyncToken(id int64, token string) error

UpdateSyncToken updates the sync token for a calendar

type EventRepository

type EventRepository struct {
	// contains filtered or unexported fields
}

EventRepository implements domain.EventRepository for SQLite

func NewEventRepository

func NewEventRepository(db *sql.DB) *EventRepository

NewEventRepository creates a new SQLite event repository

func (*EventRepository) Create

func (r *EventRepository) Create(event *domain.Event) error

Create creates a new event

func (*EventRepository) Delete

func (r *EventRepository) Delete(id int64) error

Delete deletes an event

func (*EventRepository) GetByCalendar

func (r *EventRepository) GetByCalendar(calendarID int64) ([]*domain.Event, error)

GetByCalendar retrieves all events for a calendar

func (*EventRepository) GetByID

func (r *EventRepository) GetByID(id int64) (*domain.Event, error)

GetByID retrieves an event by ID

func (*EventRepository) GetByTimeRange

func (r *EventRepository) GetByTimeRange(calendarID int64, start, end time.Time) ([]*domain.Event, error)

GetByTimeRange retrieves events within a time range

func (*EventRepository) GetByUID

func (r *EventRepository) GetByUID(calendarID int64, uid string) (*domain.Event, error)

GetByUID retrieves an event by UID and calendar ID

func (*EventRepository) Update

func (r *EventRepository) Update(event *domain.Event) error

Update updates an existing event

func (*EventRepository) UpdateETag

func (r *EventRepository) UpdateETag(id int64, etag string) error

UpdateETag updates the ETag for an event

type TaskRepository

type TaskRepository struct {
	// contains filtered or unexported fields
}

TaskRepository implements domain.TaskRepository for SQLite

func NewTaskRepository

func NewTaskRepository(db *sql.DB) *TaskRepository

NewTaskRepository creates a new SQLite task repository

func (*TaskRepository) Create

func (r *TaskRepository) Create(task *domain.Task) error

Create creates a new task

func (*TaskRepository) Delete

func (r *TaskRepository) Delete(id int64) error

Delete deletes a task

func (*TaskRepository) GetByCalendar

func (r *TaskRepository) GetByCalendar(calendarID int64) ([]*domain.Task, error)

GetByCalendar retrieves all tasks for a calendar

func (*TaskRepository) GetByID

func (r *TaskRepository) GetByID(id int64) (*domain.Task, error)

GetByID retrieves a task by ID

func (*TaskRepository) GetByStatus

func (r *TaskRepository) GetByStatus(calendarID int64, status string) ([]*domain.Task, error)

GetByStatus retrieves tasks by status

func (*TaskRepository) GetByUID

func (r *TaskRepository) GetByUID(calendarID int64, uid string) (*domain.Task, error)

GetByUID retrieves a task by UID and calendar ID

func (*TaskRepository) GetOverdue

func (r *TaskRepository) GetOverdue(calendarID int64) ([]*domain.Task, error)

GetOverdue retrieves overdue tasks

func (*TaskRepository) Update

func (r *TaskRepository) Update(task *domain.Task) error

Update updates an existing task

func (*TaskRepository) UpdateETag

func (r *TaskRepository) UpdateETag(id int64, etag string) error

UpdateETag updates the ETag for a task

Jump to

Keyboard shortcuts

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