esncard

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoMonthlyStatCreate

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

func AutoNewMonthlyStat

func AutoNewMonthlyStat(archive_date ...string)

func CreateESNcardsTable

func CreateESNcardsTable()

func DeleteESNcardById

func DeleteESNcardById(id int) error

func ESNcardsCreate

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

func ESNcardsDelete

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

func ESNcardsIndex

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

func ESNcardsShowByESNcard

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

func ESNcardsShowByIdAdherent

func ESNcardsShowByIdAdherent(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 NewESNcard

func NewESNcard(card *ESNcard)

func NewMonthlyStat

func NewMonthlyStat(stat *ESNcard_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 UpdateMonthlyStat

func UpdateMonthlyStat(stat *ESNcard_Stat)

Types

type ESNcard

type ESNcard struct {
	// Id of the esncard
	// in: int
	// read only: true
	Id int `json:"id"`
	// Id of the adherent
	// in: int64
	// required: true
	// example: 2
	Id_adherent int `json:"id_adherent"`
	// Code of the esncard
	// in: string
	// required: true
	// example: aVeryTooLongCode
	Esncard string `json:"esncard"`
	// CreatedAt date of the esncard
	// in: time.Time
	// read only: true
	CreatedAt time.Time `json:"created_at"`
}

swagger:model ESNcard

func FindESNcardByESNcard

func FindESNcardByESNcard(esncard string) *ESNcard

func FindESNcardByIdadherent

func FindESNcardByIdadherent(id_adherent int) *ESNcard

type ESNcard_Stat

type ESNcard_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 esncard sold
	// in: int
	// example: 12
	// read only: true
	NbESNcardSold int `json:"nb_esncard_sold"`
	// 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 ESNcard_Stat

func FindMonthlyStatByDate

func FindMonthlyStatByDate(archive_date string) *ESNcard_Stat

type ESNcard_Stats

type ESNcard_Stats []ESNcard_Stat

func AllMonthlyStats

func AllMonthlyStats() *ESNcard_Stats

type ESNcards

type ESNcards []ESNcard

func AllESNcards

func AllESNcards() *ESNcards

func FindESNcardsByDate

func FindESNcardsByDate(created_at string) *ESNcards

Jump to

Keyboard shortcuts

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