Documentation ¶
Index ¶
- func AutoMonthlyStatCreate(w http.ResponseWriter, r *http.Request)
- func AutoNewMonthlyStat(archive_date ...string)
- func CreateMoneysTable()
- func ForceMonthlyStatCreate(w http.ResponseWriter, r *http.Request)
- func InitRoutes()
- func Launcher()
- func MoneysCreate(w http.ResponseWriter, r *http.Request)
- func MoneysIndex(w http.ResponseWriter, r *http.Request)
- func MoneysShowByLabel(w http.ResponseWriter, r *http.Request)
- func MonthlyStatShowByDate(w http.ResponseWriter, r *http.Request)
- func MonthlyStatsIndex(w http.ResponseWriter, r *http.Request)
- func NewMoney(mon *Money)
- func NewMonthlyStat(stat *Money_Stat)
- func Specimen()
- func TheDb() *sql.DB
- func TheLogger() *logger.Logger
- func TheRouter() *mux.Router
- func TheSecureRouter() *mux.Router
- func UpdateMonthlyStat(stat *Money_Stat)
- type Money
- type Money_Stat
- type Money_Stats
- type Moneys
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 CreateMoneysTable ¶
func CreateMoneysTable()
func ForceMonthlyStatCreate ¶
func ForceMonthlyStatCreate(w http.ResponseWriter, r *http.Request)
func InitRoutes ¶
func InitRoutes()
func MoneysCreate ¶
func MoneysCreate(w http.ResponseWriter, r *http.Request)
func MoneysIndex ¶
func MoneysIndex(w http.ResponseWriter, r *http.Request)
func MoneysShowByLabel ¶
func MoneysShowByLabel(w http.ResponseWriter, r *http.Request)
func MonthlyStatShowByDate ¶
func MonthlyStatShowByDate(w http.ResponseWriter, r *http.Request)
func MonthlyStatsIndex ¶
func MonthlyStatsIndex(w http.ResponseWriter, r *http.Request)
func NewMonthlyStat ¶
func NewMonthlyStat(stat *Money_Stat)
func TheSecureRouter ¶
func UpdateMonthlyStat ¶
func UpdateMonthlyStat(stat *Money_Stat)
Types ¶
type Money ¶
type Money struct { // Id of the entry // in: int // read only: true Id int `json:"id"` // Label of the operation // in: string // example: event // required: true Label string `json:"label"` // Price of the operation // in: float // example: 1.5 // required: true Price float64 `json:"price"` // Payment type of the operation // in: string // example: cash // required: true PaymentType string `json:"payment_type"` // Payment date of the operation // in: string // example: 2023-01-23 // required: true PaymentDate string `json:"payment_date"` // CreatedAt date of the operation // in: time.Time // read only: true CreatedAt time.Time `json:"created_at"` }
swagger:model Money
type Money_Stat ¶
type Money_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 each label // in: json // example: {"event": 12, "esncard": 4} // read only: true NbPerLabel json.RawMessage `json:"nb_per_label"` // Average prices per type of label // in: json // example: {"adhesion": 12.5, "esncard": 5} // read only: true AvgPrices json.RawMessage `json:"avg_prices"` // Min prices per type of label // in: json // example: {"adhesion": 1, "esncard": 5} // read only: true MinPrices json.RawMessage `json:"min_prices"` // Max prices per type of label // in: json // example: {"adhesion": 20, "esncard": 5} // read only: true MaxPrices json.RawMessage `json:"max_prices"` // Number of Payments type // in: json // example: {"cash": 12, "cb": 5} // read only: true NbPaymentTypes json.RawMessage `json:"nb_payments_type"` // CreatedAt date of the operation // in: time.Time // read only: true CreatedAt time.Time `json:"created_at"` // UpdatedAt date of the operation // in: time.Time // read only: true UpdatedAt time.Time `json:"updated_at"` }
swagger:model Money_Stats
func FindMonthlyStatByDate ¶
func FindMonthlyStatByDate(archive_date string) *Money_Stat
type Money_Stats ¶
type Money_Stats []Money_Stat
func AllMonthlyStats ¶
func AllMonthlyStats() *Money_Stats
Click to show internal directories.
Click to hide internal directories.