Documentation ¶
Index ¶
- type API
- func (a *API) CreateTodo(ctx *app.Context, w http.ResponseWriter, r *http.Request) error
- func (a *API) CreateUser(ctx *app.Context, w http.ResponseWriter, r *http.Request) error
- func (a *API) DeleteTodoById(ctx *app.Context, w http.ResponseWriter, r *http.Request) error
- func (a *API) GetTodoById(ctx *app.Context, w http.ResponseWriter, r *http.Request) error
- func (a *API) GetTodos(ctx *app.Context, w http.ResponseWriter, r *http.Request) error
- func (a *API) IPAddressForRequest(r *http.Request) string
- func (a *API) Init(r *mux.Router)
- func (a *API) UpdateTodoById(ctx *app.Context, w http.ResponseWriter, r *http.Request) error
- type Config
- type CreateTodoInput
- type CreateTodoResponse
- type UpdateTodoInput
- type UserInput
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
func (*API) CreateTodo ¶
func (*API) CreateUser ¶
func (*API) DeleteTodoById ¶
func (*API) GetTodoById ¶
func (*API) UpdateTodoById ¶
type Config ¶
type Config struct { // The port to bind the web application server to Port int // The number of proxies positioned in front of the API. This is used to interpret // X-Forwarded-For headers. ProxyCount int }
func InitConfig ¶
type CreateTodoInput ¶
type CreateTodoResponse ¶
type CreateTodoResponse struct {
Id uint `json:"id"`
}
type UpdateTodoInput ¶
type UserResponse ¶
type UserResponse struct {
Id uint `json:"id"`
}
Click to show internal directories.
Click to hide internal directories.