Documentation ¶
Index ¶
- Variables
- func CORSMiddleware() gin.HandlerFunc
- func CheckCategoryExist(targetCategory int) bool
- func CreateCategory(c *gin.Context)
- func CreateLongEvent(c *gin.Context)
- func CreateShortEvent(c *gin.Context)
- func DeleteCategory(c *gin.Context)
- func DeleteLongEvent(c *gin.Context)
- func DeleteShortEvent(c *gin.Context)
- func EditCategory(c *gin.Context)
- func EditLongEvent(c *gin.Context)
- func EditShortEvent(c *gin.Context)
- func FindCategory(num int) (bool, int)
- func FindLongEvent(targetEvent int) (bool, int)
- func FindShortEvent(targetEvent int) (bool, int)
- func FormatToDate(dateStr string) (error, time.Time)
- func GetAllCategories(c *gin.Context)
- func GetAllEvents(c *gin.Context)
- func GetCategoryEvents(c *gin.Context)
- func GetDayData(c *gin.Context)
- func GetEndDay(t time.Time) time.Time
- func GetLongEvents(c *gin.Context)
- func GetShortEvents(c *gin.Context)
- func GetStartDay(t time.Time) time.Time
- func Start(args []string)
- type Category
- type EditCategoryReq
- type EditLongEventReq
- type EditShortEventReq
- type IDReq
- type LongEvent
- type LongEventExpanded
- type NewCategoryReq
- type NewLongEventReq
- type NewShortEventReq
- type ShortEvent
- type ShortEventExpanded
- type TimeReq
Constants ¶
This section is empty.
Variables ¶
View Source
var AllCategories []Category
View Source
var AllLongEvents []LongEvent
View Source
var AllShortEvents []ShortEvent
View Source
var CurrentCategoryID int = 1
View Source
var CurrentLongEventID int = 1
View Source
var CurrentShortEventID int = 1
Functions ¶
func CORSMiddleware ¶
func CORSMiddleware() gin.HandlerFunc
CORSMiddleware middleware headers for any RESTful requests {{{
func CheckCategoryExist ¶
func CreateCategory ¶
func CreateLongEvent ¶
func CreateShortEvent ¶
func DeleteCategory ¶
func DeleteLongEvent ¶
func DeleteShortEvent ¶
func EditCategory ¶
func EditLongEvent ¶
func EditShortEvent ¶
func FindCategory ¶
func FindLongEvent ¶
func FindShortEvent ¶
func GetAllCategories ¶
func GetAllEvents ¶
func GetCategoryEvents ¶
func GetDayData ¶
func GetLongEvents ¶
func GetShortEvents ¶
Types ¶
type EditCategoryReq ¶
type EditLongEventReq ¶
type EditLongEventReq struct { ID int `form:"id" binding:"required"` Category int `form:"category"` Title string `form:"title" binding:"required"` Description string `form:"description" binding:"required"` StartTime string `form:"start_time" binding:"required"` EndTime string `form:"end_time" binding:"required"` }
type EditShortEventReq ¶
type LongEventExpanded ¶
type LongEventExpanded struct { ID int Category Category Title string Description string StartTime time.Time EndTime time.Time }
func GetLongCategory ¶
func GetLongCategory(event LongEvent) LongEventExpanded
type NewCategoryReq ¶
type NewLongEventReq ¶
type NewShortEventReq ¶
type ShortEvent ¶
type ShortEventExpanded ¶
type ShortEventExpanded struct { ID int Category Category Title string Description string Time time.Time }
func GetShortCategory ¶
func GetShortCategory(event ShortEvent) ShortEventExpanded
Click to show internal directories.
Click to hide internal directories.