63 lines
2.7 KiB
Go
63 lines
2.7 KiB
Go
/*
|
|
* Dash API
|
|
*
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* API version: 0.1
|
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
*/
|
|
|
|
package dashapi
|
|
|
|
import (
|
|
"context"
|
|
"net/http"
|
|
)
|
|
|
|
|
|
|
|
// 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)
|
|
}
|
|
|
|
|
|
// 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 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)
|
|
}
|