calendar

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupRoutes

func SetupRoutes(router *gin.Engine, database *mongo.Database, amqpService amqpinterfaces.AMQPServiceInterface)

SetupRoutes sets up calendar routes

func SetupRoutesWithMock

func SetupRoutesWithMock(router *gin.Engine, calendarRepo repositories.CalendarRepositoryInterface, amqpService amqpinterfaces.AMQPServiceInterface)

SetupRoutesWithMock sets up routes with mocks for testing

Types

type Controller

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

Controller handles calendar operations

func NewCalendarController

func NewCalendarController(calendarRepo repositories.CalendarRepositoryInterface, amqpService amqpinterfaces.AMQPServiceInterface) *Controller

NewCalendarController creates a new calendar controller

func (*Controller) CreateCalendar

func (c *Controller) CreateCalendar(ctx *gin.Context)

CreateCalendar creates a new calendar

func (*Controller) DeleteCalendar

func (c *Controller) DeleteCalendar(ctx *gin.Context)

DeleteCalendar deletes a calendar

func (*Controller) GetAllCalendars

func (c *Controller) GetAllCalendars(ctx *gin.Context)

GetAllCalendars returns all calendars for the user with pagination

func (*Controller) GetCalendarByID

func (c *Controller) GetCalendarByID(ctx *gin.Context)

GetCalendarByID retrieves a calendar by id

func (*Controller) GetCalendarsSince

func (c *Controller) GetCalendarsSince(ctx *gin.Context)

GetCalendarsSince retrieves calendars updated since a specific date

func (*Controller) UpdateCalendar

func (c *Controller) UpdateCalendar(ctx *gin.Context)

UpdateCalendar updates an existing calendar

type CreateCalendarRequest

type CreateCalendarRequest struct {
	Calendar *models.Calendar `json:"calendar" binding:"required"`
}

CreateCalendarRequest is the request payload for creating a calendar

type PaginatedCalendarResponse

type PaginatedCalendarResponse struct {
	Calendars  []*models.Calendar `json:"calendars"`
	TotalCount int64              `json:"total_count"`
	Page       int64              `json:"page,omitempty"`
	Size       int64              `json:"size,omitempty"`
	TotalPages int64              `json:"total_pages"`
}

PaginatedCalendarResponse represents paginated calendars

type UpdateCalendarRequest

type UpdateCalendarRequest struct {
	Calendar *models.Calendar `json:"calendar" binding:"required"`
}

UpdateCalendarRequest is the payload for updating a calendar

Jump to

Keyboard shortcuts

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