event

package
v0.0.0-...-405e10b Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEvent

func CreateEvent(event *HldEvent) error

Types

type EventDTO

type EventDTO struct {
	Id          uint         `json:"id"`
	Title       uint         `json:"title"`
	Description string       `json:"description"`
	Date        time.Time    `json:"date"`
	Enable      bool         `json:"enable"`
	Poster      string       `json:"poster"`
	Presenter   PresenterDTO `json:"presenter"`
	Sponsor     SponsorDTO   `json:"sponsor"`
}

func MapEventDTO

func MapEventDTO(event *HldEvent, presenter *PresenterDTO, sponsor *SponsorDTO) (*EventDTO, error)

type EventManager

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

func InitManager

func InitManager() *EventManager

func (*EventManager) AddEvent

func (manager *EventManager) AddEvent(eventDto *EventDTO) error

func (*EventManager) ArchiveEvent

func (manager *EventManager) ArchiveEvent(EventId uint) error

func (*EventManager) DeleteEvent

func (manager *EventManager) DeleteEvent(EventId uint) error

func (EventManager) Event

func (manager EventManager) Event(Id uint) (*EventDTO, error)

func (*EventManager) Events

func (manager *EventManager) Events() ([]*EventDTO, error)

func (*EventManager) GetEventParticipants

func (manager *EventManager) GetEventParticipants(EventId uint) []string

func (*EventManager) ModifyEvent

func (manager *EventManager) ModifyEvent(*EventDTO) error

func (*EventManager) PublishEvent

func (manager *EventManager) PublishEvent(EventId uint) error

func (*EventManager) Register

func (manager *EventManager) Register()

func (*EventManager) SingleSubjectRegister

func (manager *EventManager) SingleSubjectRegister(regDTO *RegisterDTO) error

type Event_Status

type Event_Status string
const (
	INACTIVE Event_Status = "inactive"
	OPEN     Event_Status = "open"
	ARCHIVED Event_Status = "archived"
)

type HldEvent

type HldEvent struct {
	Id           uint
	Title        uint
	Event_Status Event_Status
	Start        time.Time
	End          time.Time
	Description  string
	Poster       string
	Archived_at  time.Time
	Created_at   time.Time
	Updated_at   time.Time
}

func MapEvent

func MapEvent(dto *EventDTO) (*HldEvent, error)

func ReadEvent

func ReadEvent(Id uint) (*HldEvent, error)

func ReadEvents

func ReadEvents() ([]*HldEvent, error)

type HldPresentation

type HldPresentation struct {
	Id                uint
	EventId           uint
	Title             uint
	PresentationType  PresentationType
	SessionStatus     SessionStatus
	Capacity          uint
	ParticipantNumber uint
	Start             time.Time
	End               time.Time
	Archived_at       time.Time
	Created_at        time.Time
	Updated_at        time.Time
}

type PresentationDTO

type PresentationDTO struct {
	ID uint
}

func Presentation

func Presentation(ID uint) (*PresentationDTO, error)

func Presentations

func Presentations() ([]*PresentationDTO, error)

func PresentationsByEvent

func PresentationsByEvent(eventID uint) ([]*PresentationDTO, error)

type PresentationType

type PresentationType string
const (
	Workshop PresentationType = "workshop"
	Talk     PresentationType = "talk"
)

type PresenterDTO

type PresenterDTO struct {
	Name        string `json:"name"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Image       string `json:"image"`
}

type RegisterDTO

type RegisterDTO struct {
	EventID       uint   `json:"event_id"`
	UserID        uint   `json:"user_id"`
	Presentations []uint `json:"presentations"`
}

type SessionStatus

type SessionStatus string
const (
	ClosedToJoin    SessionStatus = "closed_to_join"
	OpenToJoin      SessionStatus = "open_to_join"
	ArchivedSession SessionStatus = "archived"
)

type SponsorDTO

type SponsorDTO struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

Jump to

Keyboard shortcuts

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