Add Plan page with day planner

This commit is contained in:
Martin Pander
2022-11-26 18:41:39 +01:00
parent d9b92ab4e9
commit 32346e0aa9
48 changed files with 2400 additions and 148 deletions

View File

@ -16,22 +16,47 @@ import (
// DefaultApiRouter defines the required methods for binding the api requests to a responses for the DefaultApi
// The DefaultApiRouter implementation should parse necessary information from the http request,
// pass the data to a DefaultApiServicer to perform the required actions, then write the service results to the http response.
type DefaultApiRouter interface {
// JournalApiRouter defines the required methods for binding the api requests to a responses for the JournalApi
// The JournalApiRouter implementation should parse necessary information from the http request,
// pass the data to a JournalApiServicer to perform the required actions, then write the service results to the http response.
type JournalApiRouter interface {
DeleteJournalEntryForDate(http.ResponseWriter, *http.Request)
GetJournalEntryForDate(http.ResponseWriter, *http.Request)
WriteJournalEntry(http.ResponseWriter, *http.Request)
}
// PlanApiRouter defines the required methods for binding the api requests to a responses for the PlanApi
// The PlanApiRouter implementation should parse necessary information from the http request,
// pass the data to a PlanApiServicer to perform the required actions, then write the service results to the http response.
type PlanApiRouter interface {
GetPlanDayForDate(http.ResponseWriter, *http.Request)
GetPlanMonthForDate(http.ResponseWriter, *http.Request)
GetPlanWeekForDate(http.ResponseWriter, *http.Request)
SavePlanForDay(http.ResponseWriter, *http.Request)
SavePlanForMonth(http.ResponseWriter, *http.Request)
SavePlanForWeek(http.ResponseWriter, *http.Request)
}
// DefaultApiServicer defines the api actions for the DefaultApi service
// JournalApiServicer defines the api actions for the JournalApi service
// This interface intended to stay up to date with the openapi yaml used to generate it,
// while the service implementation can be ignored with the .openapi-generator-ignore file
// and updated with the logic required for the API.
type DefaultApiServicer interface {
type JournalApiServicer interface {
DeleteJournalEntryForDate(context.Context, string) (ImplResponse, error)
GetJournalEntryForDate(context.Context, string) (ImplResponse, error)
WriteJournalEntry(context.Context, JournalEntry) (ImplResponse, error)
}
// PlanApiServicer defines the api actions for the PlanApi service
// This interface intended to stay up to date with the openapi yaml used to generate it,
// while the service implementation can be ignored with the .openapi-generator-ignore file
// and updated with the logic required for the API.
type PlanApiServicer interface {
GetPlanDayForDate(context.Context, string) (ImplResponse, error)
GetPlanMonthForDate(context.Context, string) (ImplResponse, error)
GetPlanWeekForDate(context.Context, string) (ImplResponse, error)
SavePlanForDay(context.Context, PlanDay) (ImplResponse, error)
SavePlanForMonth(context.Context, PlanMonth) (ImplResponse, error)
SavePlanForWeek(context.Context, PlanWeek) (ImplResponse, error)
}