This commit is contained in:
Martin Pander
2023-12-09 19:34:45 +01:00
parent 32346e0aa9
commit 8addda35ea
144 changed files with 7247 additions and 3268 deletions

View File

@ -16,6 +16,14 @@ import (
// InboxApiRouter defines the required methods for binding the api requests to a responses for the InboxApi
// The InboxApiRouter implementation should parse necessary information from the http request,
// pass the data to a InboxApiServicer to perform the required actions, then write the service results to the http response.
type InboxApiRouter interface {
AddInboxItem(http.ResponseWriter, *http.Request)
DeleteInboxItem(http.ResponseWriter, *http.Request)
GetInboxItems(http.ResponseWriter, *http.Request)
}
// 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.
@ -35,6 +43,25 @@ type PlanApiRouter interface {
SavePlanForMonth(http.ResponseWriter, *http.Request)
SavePlanForWeek(http.ResponseWriter, *http.Request)
}
// TrackingApiRouter defines the required methods for binding the api requests to a responses for the TrackingApi
// The TrackingApiRouter implementation should parse necessary information from the http request,
// pass the data to a TrackingApiServicer to perform the required actions, then write the service results to the http response.
type TrackingApiRouter interface {
GetTrackingCategories(http.ResponseWriter, *http.Request)
GetTrackingEntryForDate(http.ResponseWriter, *http.Request)
WriteTrackingEntry(http.ResponseWriter, *http.Request)
}
// InboxApiServicer defines the api actions for the InboxApi 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 InboxApiServicer interface {
AddInboxItem(context.Context, InboxItem) (ImplResponse, error)
DeleteInboxItem(context.Context, int32) (ImplResponse, error)
GetInboxItems(context.Context) (ImplResponse, error)
}
// JournalApiServicer defines the api actions for the JournalApi service
@ -60,3 +87,14 @@ type PlanApiServicer interface {
SavePlanForMonth(context.Context, PlanMonth) (ImplResponse, error)
SavePlanForWeek(context.Context, PlanWeek) (ImplResponse, error)
}
// TrackingApiServicer defines the api actions for the TrackingApi 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 TrackingApiServicer interface {
GetTrackingCategories(context.Context) (ImplResponse, error)
GetTrackingEntryForDate(context.Context, string) (ImplResponse, error)
WriteTrackingEntry(context.Context, TrackingEntry) (ImplResponse, error)
}