event

package
v0.0.0-...-9bfc92b Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttendeesCreate

func AttendeesCreate(w http.ResponseWriter, r *http.Request)

func AttendeesDelete

func AttendeesDelete(w http.ResponseWriter, r *http.Request)

func AttendeesIndex

func AttendeesIndex(w http.ResponseWriter, r *http.Request)

func AttendeesShowByIdAdherent

func AttendeesShowByIdAdherent(w http.ResponseWriter, r *http.Request)

func AttendeesShowByIdEvent

func AttendeesShowByIdEvent(w http.ResponseWriter, r *http.Request)

func AttendeesUpdate

func AttendeesUpdate(w http.ResponseWriter, r *http.Request)

func AutoMonthlyStatCreate

func AutoMonthlyStatCreate(w http.ResponseWriter, r *http.Request)

func AutoNewMonthlyStat

func AutoNewMonthlyStat(archive_date ...string)

func CreateEventsTable

func CreateEventsTable()

func DeleteAttendeeById

func DeleteAttendeeById(id int) error

func DeleteEventById

func DeleteEventById(id int) error

func DeleteStaffById

func DeleteStaffById(id int) error

func EventsCreate

func EventsCreate(w http.ResponseWriter, r *http.Request)

func EventsDelete

func EventsDelete(w http.ResponseWriter, r *http.Request)

func EventsIndex

func EventsIndex(w http.ResponseWriter, r *http.Request)

func EventsShow

func EventsShow(w http.ResponseWriter, r *http.Request)

func EventsUpdate

func EventsUpdate(w http.ResponseWriter, r *http.Request)

func ForceMonthlyStatCreate

func ForceMonthlyStatCreate(w http.ResponseWriter, r *http.Request)

func InitRoutes

func InitRoutes()

func Launcher

func Launcher()

func MonthlyStatShowByDate

func MonthlyStatShowByDate(w http.ResponseWriter, r *http.Request)

func MonthlyStatsIndex

func MonthlyStatsIndex(w http.ResponseWriter, r *http.Request)

func NewAttendee

func NewAttendee(att *Attendee)

func NewEvent

func NewEvent(eve *Event)

func NewMonthlyStat

func NewMonthlyStat(stat *Event_Stat)

func NewStaff

func NewStaff(sta *Staff)

func Specimen

func Specimen()

func StaffsCreate

func StaffsCreate(w http.ResponseWriter, r *http.Request)

func StaffsDelete

func StaffsDelete(w http.ResponseWriter, r *http.Request)

func StaffsIndex

func StaffsIndex(w http.ResponseWriter, r *http.Request)

func StaffsShowByIdEvent

func StaffsShowByIdEvent(w http.ResponseWriter, r *http.Request)

func StaffsShowByIdVolunteer

func StaffsShowByIdVolunteer(w http.ResponseWriter, r *http.Request)

func StaffsUpdate

func StaffsUpdate(w http.ResponseWriter, r *http.Request)

func TheDb

func TheDb() *sql.DB

func TheLogger

func TheLogger() *logger.Logger

func TheRouter

func TheRouter() *mux.Router

func TheSecureRouter

func TheSecureRouter() *mux.Router

func UpdateAttendee

func UpdateAttendee(att *Attendee)

func UpdateEvent

func UpdateEvent(eve *Event)

func UpdateMonthlyStat

func UpdateMonthlyStat(stat *Event_Stat)

func UpdateSpotsTakenEvent

func UpdateSpotsTakenEvent(eve *Event)

func UpdateStaff

func UpdateStaff(sta *Staff)

Types

type Attendee

type Attendee struct {
	// Id of the attendee
	// in: int64
	// read only: true
	Id int `json:"id"`
	// Id of the event
	// in: int64
	// required: true
	// example: 2
	Id_event int `json:"id_event"`
	// Id of the adherent
	// in: int64
	// required: true
	// example: 1
	Id_adherent int `json:"id_adherent"`
}

swagger:model Event_Attendee

func FindAttendeeById

func FindAttendeeById(id int) *Attendee

type Attendees

type Attendees []Attendee

func AllAttendees

func AllAttendees() *Attendees

func FindAttendeeByAdherentId

func FindAttendeeByAdherentId(id_adherent int) *Attendees

func FindAttendeeByEventId

func FindAttendeeByEventId(id_event int) *Attendees

type Event

type Event struct {
	// Id of the event
	// in: int64
	// read only: true
	Id int `json:"id"`
	// Name of the event
	// in: string
	// required: true
	// example: Conseil des 4
	Name string `json:"name"`
	// Date of the event
	// in: string
	// required: true
	// example: 2023-05-23
	Date string `json:"date"`
	// Location of the event
	// in: string
	// required: true
	// example: Plateau indigo, Kanto
	Location string `json:"location"`
	// Number Spots Max of the event
	// in: int
	// required: true
	// example: 30
	NbSpotsMax int `json:"nb_spots_max"`
	// Number Spots Taken of the event
	// in: int
	// required: true
	// example: 30
	NbSpotsTaken int `json:"nb_spots_taken"`
	// Type of the event
	// in: string
	// required: true
	// example: sport
	Type string `json:"type"`
	// Price of the event
	// in: float
	// required: true
	// example: 0
	Price float64 `json:"price"`
	// Url of the event
	// in: string
	// required: true
	// example: https://facebook.com/ligue
	Url string `json:"url_facebook"`
	// Status of the event
	// in: bool
	// required: true
	// example: true
	Actif bool `json:"actif"`
}

swagger:model Event

func FindEventById

func FindEventById(id int) *Event

type Event_Stat

type Event_Stat struct {
	// Id of the entry
	// in: int
	// read only: true
	Id int `json:"id"`
	// Archive date of the stat
	// in: string
	// example: 2023-01
	// required: true
	ArchiveDate string `json:"archive_date"`
	// Number of event by location
	// in: json
	// example: {"MDE": 12, "MDEL": 4}
	// read only: true
	NbPerLocation json.RawMessage `json:"nb_per_location"`
	// Number of event by type
	// in: json
	// example: {"NEM": 12, "Gala": 4}
	// read only: true
	NbPerType json.RawMessage `json:"nb_per_type"`
	// Number of event by price
	// in: json
	// example: {"10": 2, "5": 4, "0": 1}
	// read only: true
	NbPerPrice json.RawMessage `json:"nb_per_price"`
	// Number of event cancel
	// in: int
	// example: 12
	// read only: true
	NbCancel int `json:"nb_cancel"`
	// Number of event total
	// in: int
	// example: 12
	// read only: true
	NbTotal int `json:"nb_total"`
	// Average fulfill per type of event
	// in: json
	// example: {"NEM": 99.9, "gala": 80}
	// read only: true
	FulfillAvgPerType json.RawMessage `json:"tx_avg_fulfill_per_type"`
	// Average attendee per type of event
	// in: json
	// example: {"NEM": 12.5, "gala": 5}
	// read only: true
	AvgAttPerType json.RawMessage `json:"nb_avg_att_per_type"`
	// Average staff per type of event
	// in: json
	// example: {"NEM": 12.5, "gala": 5}
	// read only: true
	AvgStaPerType json.RawMessage `json:"nb_avg_sta_per_type"`
	// Number of event attendees total
	// in: int
	// example: 12
	// read only: true
	NbAttTotal int `json:"nb_att_total"`
	// Number of event staffs total
	// in: int
	// example: 12
	// read only: true
	NbStaTotal int `json:"nb_sta_total"`
	// CreatedAt date of the stat
	// in: time.Time
	// read only: true
	CreatedAt time.Time `json:"created_at"`
	// UpdatedAt date of the stat
	// in: time.Time
	// read only: true
	UpdatedAt time.Time `json:"updated_at"`
}

swagger:model Event_Stat

func FindMonthlyStatByDate

func FindMonthlyStatByDate(archive_date string) *Event_Stat

type Event_Stats

type Event_Stats []Event_Stat

func AllMonthlyStats

func AllMonthlyStats() *Event_Stats

type Events

type Events []Event

func AllEvents

func AllEvents() *Events

func FindEventsByDate

func FindEventsByDate(date string) *Events

type Staff

type Staff struct {
	// Id of the staff
	// in: int64
	// read only: true
	Id int `json:"id"`
	// Id of the event
	// in: int
	// required: true
	// example: 2
	Id_event int `json:"id_event"`
	// Id of the volunteer
	// in: int
	// required: true
	// example: 1
	Id_volunteer int `json:"id_volunteer"`
}

swagger:model Event_Staff

func FindStaffById

func FindStaffById(id int) *Staff

type Staffs

type Staffs []Staff

func AllStaffs

func AllStaffs() *Staffs

func FindStaffByEventId

func FindStaffByEventId(id_event int) *Staffs

func FindStaffByVolunteerId

func FindStaffByVolunteerId(id_volunteer int) *Staffs

Jump to

Keyboard shortcuts

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