Versions in this module Expand all Collapse all v0 v0.6.1 Apr 10, 2023 v0.6.0 Nov 24, 2021 Changes in this version + var ErrTypeAssertionError = errors.New("unable to assert type") + func AssertAddTodoItemRequestRequired(obj AddTodoItemRequest) error + func AssertErrorRequired(obj Error) error + func AssertRecurseAddTodoItemRequestRequired(objSlice interface{}) error + func AssertRecurseErrorRequired(objSlice interface{}) error + func AssertRecurseInterfaceRequired(obj interface{}, callback func(interface{}) error) error + func AssertRecurseTodoItemRequired(objSlice interface{}) error + func AssertRecurseUpdateTodoItemRequestRequired(objSlice interface{}) error + func AssertRecurseValueRequired(value reflect.Value, callback func(interface{}) error) error + func AssertTodoItemRequired(obj TodoItem) error + func AssertUpdateTodoItemRequestRequired(obj UpdateTodoItemRequest) error + func DefaultErrorHandler(w http.ResponseWriter, r *http.Request, err error, result *ImplResponse) + func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error + func IsZeroValue(val interface{}) bool + func Logger(inner http.Handler, name string) http.Handler + func NewRouter(routers ...Router) *mux.Router + func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error) + func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error) + type AddTodoItemRequest struct + Order int32 + Title string + type Error struct + Detail string + Instance string + Status int32 + Title string + Type string + type ErrorHandler func(w http.ResponseWriter, r *http.Request, err error, result *ImplResponse) + type ImplResponse struct + Body interface{} + Code int + func Response(code int, body interface{}) ImplResponse + type ParsingError struct + Err error + func (e *ParsingError) Error() string + func (e *ParsingError) Unwrap() error + type RequiredError struct + Field string + func (e *RequiredError) Error() string + type Route struct + HandlerFunc http.HandlerFunc + Method string + Name string + Pattern string + type Router interface + Routes func() Routes + func NewTodoListApiController(s TodoListApiServicer, opts ...TodoListApiOption) Router + type Routes []Route + type TodoItem struct + Completed bool + Id string + Order int32 + Title string + Url string + type TodoListApiController struct + func (c *TodoListApiController) AddItem(w http.ResponseWriter, r *http.Request) + func (c *TodoListApiController) DeleteItem(w http.ResponseWriter, r *http.Request) + func (c *TodoListApiController) DeleteItems(w http.ResponseWriter, r *http.Request) + func (c *TodoListApiController) GetItem(w http.ResponseWriter, r *http.Request) + func (c *TodoListApiController) ListItems(w http.ResponseWriter, r *http.Request) + func (c *TodoListApiController) Routes() Routes + func (c *TodoListApiController) UpdateItem(w http.ResponseWriter, r *http.Request) + type TodoListApiOption func(*TodoListApiController) + func WithTodoListApiErrorHandler(h ErrorHandler) TodoListApiOption + type TodoListApiRouter interface + AddItem func(http.ResponseWriter, *http.Request) + DeleteItem func(http.ResponseWriter, *http.Request) + DeleteItems func(http.ResponseWriter, *http.Request) + GetItem func(http.ResponseWriter, *http.Request) + ListItems func(http.ResponseWriter, *http.Request) + UpdateItem func(http.ResponseWriter, *http.Request) + type TodoListApiService struct + func (s *TodoListApiService) AddItem(ctx context.Context, addTodoItemRequest AddTodoItemRequest) (ImplResponse, error) + func (s *TodoListApiService) DeleteItem(ctx context.Context, id string) (ImplResponse, error) + func (s *TodoListApiService) DeleteItems(ctx context.Context) (ImplResponse, error) + func (s *TodoListApiService) GetItem(ctx context.Context, id string) (ImplResponse, error) + func (s *TodoListApiService) ListItems(ctx context.Context) (ImplResponse, error) + func (s *TodoListApiService) UpdateItem(ctx context.Context, id string, updateTodoItemRequest UpdateTodoItemRequest) (ImplResponse, error) + type TodoListApiServicer interface + AddItem func(context.Context, AddTodoItemRequest) (ImplResponse, error) + DeleteItem func(context.Context, string) (ImplResponse, error) + DeleteItems func(context.Context) (ImplResponse, error) + GetItem func(context.Context, string) (ImplResponse, error) + ListItems func(context.Context) (ImplResponse, error) + UpdateItem func(context.Context, string, UpdateTodoItemRequest) (ImplResponse, error) + func NewTodoListApiService() TodoListApiServicer + type UpdateTodoItemRequest struct + Completed *bool + Order *int32 + Title *string