series

package
v0.0.0-...-53cc070 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteEventSeries

func DeleteEventSeries(db *gorm.DB, seriesID uuid.UUID) error

func EventSeries

func EventSeries(eventParams types.RouteParams)

func GetEventSeries

func GetEventSeries(db *gorm.DB, seriesID uuid.UUID) ([]models.Event, error)

Types

type CreateEventSeriesRequestBody

type CreateEventSeriesRequestBody struct {
	events.CreateEventRequestBody
	Recurrence  protos.StringRecurrence `json:"recurrence" validate:"required"`
	Termination time.Time               `json:"termination" validate:"required"`
}

func (*CreateEventSeriesRequestBody) Validate

type EventSeriesController

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

func NewEventSeriesController

func NewEventSeriesController(eventSeriesService EventSeriesServiceInterface) *EventSeriesController

func (*EventSeriesController) CreateEventSeries

func (e *EventSeriesController) CreateEventSeries(c *fiber.Ctx) error

func (*EventSeriesController) DeleteEventSeries

func (e *EventSeriesController) DeleteEventSeries(c *fiber.Ctx) error

func (*EventSeriesController) GetEventSeries

func (e *EventSeriesController) GetEventSeries(c *fiber.Ctx) error

type EventSeriesService

type EventSeriesService struct {
	types.ServiceParams
}

func (*EventSeriesService) CreateEventSeries

func (e *EventSeriesService) CreateEventSeries(body CreateEventSeriesRequestBody) (*Series, error)

func (*EventSeriesService) DeleteEventSeries

func (e *EventSeriesService) DeleteEventSeries(seriesID string) error

func (*EventSeriesService) GetEventSeries

func (e *EventSeriesService) GetEventSeries(seriesID string) ([]models.Event, error)

type EventSeriesServiceInterface

type EventSeriesServiceInterface interface {
	CreateEventSeries(body CreateEventSeriesRequestBody) (*Series, error)
	GetEventSeries(seriesID string) ([]models.Event, error)
	DeleteEventSeries(seriesID string) error
}

func NewEventSeriesService

func NewEventSeriesService(serviceParams types.ServiceParams) EventSeriesServiceInterface

type Series

type Series struct {
	models.Model
	Events []models.Event `gorm:"foreignKey:SeriesID" json:"events"`
}

func CreateEventSeries

func CreateEventSeries(db *gorm.DB, seriesID uuid.UUID, events []models.Event) (*Series, error)

type ValidatedCreateEventSeriesRequestBody

type ValidatedCreateEventSeriesRequestBody struct {
	events.CreateEventRequestBody
	Recurrence  protos.Recurrence `json:"recurrence"`
	Termination time.Time         `json:"termination"`
}

func (*ValidatedCreateEventSeriesRequestBody) Into

Jump to

Keyboard shortcuts

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