package
0.0.0-20220207195759-2f4042cffa22
Repository: https://github.com/ep4sh/hzpaste.git
Documentation: pkg.go.dev
# Functions
AddPasteH godoc @Summary add a paste @Description add new paste @Accept json @Produce json @Success 200 {object} paste.Paste "new_paste" @Router /pastes [post] AddPasteH returns a handler that validates the body of a request to create a new paste.
GetPasteH godoc @Summary finds a single paste identified by an ID in the request URL.
KillPastesH godoc @Summary purges all pastes @Description returns empty slice for Pastes @Produce json @Success 200 {array} paste.Paste "pastes" @Router /pastes [delete] KillPastesH returns a handler that pugres all pastes by clearing the pastes list.
ListPastesH godoc @Summary shows all pastes @Description get pastes list @Accept json @Produce json @Success 200 {array} paste.Paste "pastes" @Router /pastes [get] ListPastesH returns a handler that shows all pastes.
PGCH godoc @Summary triggers obsolete data collection and removes it @Description returns count of the removed data @Produce json @Success 200 {array} int "gc" @Router /gc [get] PGCH returns a handler that triggers obsolete data collection.
PingH godoc @Summary provides health checks @Description provides health checks @Accept json @Produce json @Success 200 {object} bool "OK" @Router /ping [get] GetPasteH returns a handler that provides health check.
SchedulePGCCron schedules PGCRun() as cron job according to the GCSchedule.