previews

package
v0.0.0-...-f828163 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventPreviews

func EventPreviews(eventParams types.RouteParams)

Types

type Common

type Common struct {
	ID        uuid.UUID        `json:"id"`
	Name      string           `json:"name"`
	EventType models.EventType `json:"event_type"`
	Location  string           `json:"location"`
	Link      string           `json:"link"`
	StartTime time.Time        `json:"start_time"`
	EndTime   time.Time        `json:"end_time"`
}

type Controller

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

func NewController

func NewController(service Service) *Controller

func (*Controller) GetEventPreviews

func (e *Controller) GetEventPreviews(c *fiber.Ctx) error

type EventPreview

type EventPreview struct {
	Common
	Tags     []models.Tag `json:"tags"`
	HostName string       `json:"host_name"`
}

func GetEventPreviews

func GetEventPreviews(db *gorm.DB, pageInfo *fiberpaginate.PageInfo) ([]EventPreview, error)

func GetEventPreviewsByTime

func GetEventPreviewsByTime(db *gorm.DB, pageInfo *fiberpaginate.PageInfo, startTime, endTime *time.Time) ([]EventPreview, error)

type EventStub

type EventStub struct {
	Common
	Host uuid.UUID `json:"host"`
}

func (*EventStub) Into

func (es *EventStub) Into(tags []models.Tag, hostName string, hostLogo string) *EventPreview

func (EventStub) TableName

func (es EventStub) TableName() string

type Handler

type Handler struct {
	types.ServiceParams
}

func (*Handler) GetEventPreviews

func (h *Handler) GetEventPreviews(pageInfo *fiberpaginate.PageInfo, start string, end string) ([]EventPreview, error)

type Service

type Service interface {
	GetEventPreviews(pageInfo *fiberpaginate.PageInfo, start string, end string) ([]EventPreview, error)
}

func NewService

func NewService(serviceParams types.ServiceParams) Service

Jump to

Keyboard shortcuts

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