Documentation ¶
Index ¶
- Variables
- type AppointmentRepository
- func (r *AppointmentRepository) Create(calID uint, m Model) error
- func (r *AppointmentRepository) DeleteItem(calID, uid uint) error
- func (r *AppointmentRepository) DeleteRecurrence(itemID uint, date time.Time) error
- func (r *AppointmentRepository) FindBetweenDates(calID uint, start, finish time.Time) ([]Model, error)
- func (r *AppointmentRepository) FindByID(calID, uid uint) (model.Appointment, error)
- func (r *AppointmentRepository) Model() Model
- func (r *AppointmentRepository) Update(calID, itemID uint, new Model) error
- type CalendarRepository
- type ItemRepository
- type Model
- type NoteRepository
- func (r *NoteRepository) Create(calID uint, m Model) error
- func (r *NoteRepository) DeleteItem(calID, uid uint) error
- func (r *NoteRepository) DeleteRecurrence(itemID uint, date time.Time) error
- func (r *NoteRepository) FindBetweenDates(calID uint, start, finish time.Time) ([]Model, error)
- func (r *NoteRepository) FindByID(calID, uid uint) (model.Note, error)
- func (r *NoteRepository) Model() Model
- func (r *NoteRepository) Update(calID, itemID uint, new Model) error
- type OptionsRepository
- type Repository
Constants ¶
This section is empty.
Variables ¶
View Source
var (
InvalidAppointmentAssertionError = errors.New("invalid appointment type")
)
Functions ¶
This section is empty.
Types ¶
type AppointmentRepository ¶
type AppointmentRepository struct { Repository // contains filtered or unexported fields }
func NewAppointmentRepository ¶
func NewAppointmentRepository(db *gorm.DB) *AppointmentRepository
func (*AppointmentRepository) Create ¶
func (r *AppointmentRepository) Create(calID uint, m Model) error
func (*AppointmentRepository) DeleteItem ¶
func (r *AppointmentRepository) DeleteItem(calID, uid uint) error
func (*AppointmentRepository) DeleteRecurrence ¶
func (r *AppointmentRepository) DeleteRecurrence(itemID uint, date time.Time) error
func (*AppointmentRepository) FindBetweenDates ¶
func (*AppointmentRepository) FindByID ¶
func (r *AppointmentRepository) FindByID(calID, uid uint) (model.Appointment, error)
func (*AppointmentRepository) Model ¶
func (r *AppointmentRepository) Model() Model
type CalendarRepository ¶
type CalendarRepository interface { FindByID(uid uint) (*model.Calendar, error) FindOrCreateForDeletedID(uid uint) (*model.Calendar, error) AllCalendars() ([]model.Calendar, error) }
func NewCalendarRepository ¶
func NewCalendarRepository(db *gorm.DB) CalendarRepository
type ItemRepository ¶
type ItemRepository interface { // Create an item Create(calID uint, m Model) error // Model gives a new instance of the model that is used in the repository // e.g. Note or Appointment Model() Model // Find Items between two given dates. FindBetweenDates(calID uint, start, finish time.Time) ([]Model, error) // Delete an entire Item, recurrences and all DeleteItem(calID uint, id uint) error // Delete a single recurrence from an item (create a DeletedDate) DeleteRecurrence(itemID uint, date time.Time) error // Update an item given by its ID by the values in "new" Update(calID uint, itemID uint, new Model) error }
type NoteRepository ¶
type NoteRepository struct {
Repository
}
func NewNoteRepository ¶
func NewNoteRepository(db *gorm.DB) *NoteRepository
func (*NoteRepository) DeleteItem ¶
func (r *NoteRepository) DeleteItem(calID, uid uint) error
func (*NoteRepository) DeleteRecurrence ¶
func (r *NoteRepository) DeleteRecurrence(itemID uint, date time.Time) error
func (*NoteRepository) FindBetweenDates ¶
func (*NoteRepository) FindByID ¶
func (r *NoteRepository) FindByID(calID, uid uint) (model.Note, error)
func (*NoteRepository) Model ¶
func (r *NoteRepository) Model() Model
type OptionsRepository ¶
type OptionsRepository interface { FindByCalendarID(uid uint, create bool) (*model.CalendarOptions, error) Update(calID uint, new *model.CalendarOptions) error }
func NewOptionsRepository ¶
func NewOptionsRepository(db *gorm.DB) OptionsRepository
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.