adherent

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdherentsCreate

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

func AdherentsDelete

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

func AdherentsIndex

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

func AdherentsShow

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

func AdherentsUpdate

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

func AutoMonthlyStatCreate

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

func AutoNewMonthlyStat

func AutoNewMonthlyStat(archive_date ...string)

func CreateAdherentsTable

func CreateAdherentsTable()

func DeleteAdherentById

func DeleteAdherentById(id int) error

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 NewAdherent

func NewAdherent(adh *Adherent)

func NewMonthlyStat

func NewMonthlyStat(stat *Adherent_Stat)

func Specimen

func Specimen()

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 UpdateAdherent

func UpdateAdherent(adh *Adherent)

func UpdateMonthlyStat

func UpdateMonthlyStat(stat *Adherent_Stat)

Types

type Adherent

type Adherent struct {
	// Id of the adherent
	// in: int
	// read only: true
	Id int `json:"id"`
	// Firstname of the adherent
	// in: string
	// required: true
	// example: Pichu
	Firstname string `json:"firstname"`
	// Lastname of the adherent
	// in: string
	// required: true
	// example: Ketchum
	Lastname string `json:"lastname"`
	// Email of the adherent
	// in: string
	// required: true
	// example: pichu@kanto.kt
	Email string `json:"email"`
	// Dateofbirth of the adherent
	// in: string
	// required: true
	// example: 2000-05-22
	Dateofbirth string `json:"dateofbirth"`
	// Situation status of the adherent
	// in: string
	// required: true
	// example: student
	Situation string `json:"situation"`
	// University of the adherent
	// in: string
	// required: true
	// example: Indigo
	University string `json:"university"`
	// Homeland of the adherent
	// in: string
	// required: true
	// example: Kanto
	Homeland string `json:"homeland"`
	// Speakabout of the adherent
	// in: string
	// required: true
	// example: Twitter
	Speakabout string `json:"speakabout"`
	// Newsletter status of the adherent
	// in: bool
	// required: true
	// example: true
	Newsletter bool `json:"newsletter"`
	// AdhesionDate date of the adhesion
	// in: string
	// required: true
	// example: 2022-05-22
	AdhesionDate string `json:"adhesion_date"`
	// CreatedAt date of the adherent
	// in: time.Time
	// read only: true
	CreatedAt time.Time `json:"created_at"`
	// UpdatedAt date of the adherent
	// in: time.Time
	// read only: true
	UpdatedAt time.Time `json:"updated_at"`
}

swagger:model Adherent

func FindAdherentById

func FindAdherentById(id int) *Adherent

func FindAdherentByName

func FindAdherentByName(firstname string, lastname string) *Adherent

type Adherent_Stat

type Adherent_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 adherent by country
	// in: json
	// example: {"Poland": 12, "Belgium": 4}
	// read only: true
	NbPerCountry json.RawMessage `json:"nb_per_country"`
	// Number of adherent by university
	// in: json
	// example: {"Lumiere": 1, "SciencePo": 4}
	// read only: true
	NbPerUniversity json.RawMessage `json:"nb_per_university"`
	// Number of adherent by situation
	// in: json
	// example: {"student": 12, "worker": 4}
	// read only: true
	NbPerSituation json.RawMessage `json:"nb_per_situation"`
	// Number of adherent total
	// in: int
	// example: 12
	// read only: true
	NbTotal int `json:"nb_total"`
	// Number of how adherent heared about us per type
	// in: json
	// example: {"twitter": 12, "facebook": 4}
	// read only: true
	AboutusPerType json.RawMessage `json:"aboutus_per_type"`
	// 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 Adherent_Stat

func FindMonthlyStatByDate

func FindMonthlyStatByDate(archive_date string) *Adherent_Stat

type Adherent_Stats

type Adherent_Stats []Adherent_Stat

func AllMonthlyStats

func AllMonthlyStats() *Adherent_Stats

type Adherents

type Adherents []Adherent

func AllAdherents

func AllAdherents() *Adherents

func FindAdherentsByDate

func FindAdherentsByDate(adhesion_date string) *Adherents

Jump to

Keyboard shortcuts

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