Documentation ¶
Index ¶
- func InitRoutes(router chi.Router, svc example.Example)
- type Controller
- func (c *Controller) GetExample(ctx context.Context, req *RequestGetExample, w http.ResponseWriter) (*apimodel.Example, error)
- func (c *Controller) GetExampleRequest(r *http.Request, w http.ResponseWriter) (*RequestGetExample, error)
- func (c *Controller) GetExampleResponse(ctx context.Context, res *apimodel.Example, w http.ResponseWriter) error
- func (c *Controller) SetExample(ctx context.Context, req *RequestSetExample, w http.ResponseWriter) (*ResponseEmpty, error)
- func (c *Controller) SetExampleRequest(r *http.Request, w http.ResponseWriter) (*RequestSetExample, error)
- func (c *Controller) SetExampleResponse(ctx context.Context, res *ResponseEmpty, w http.ResponseWriter) error
- type RequestGetExample
- type RequestSetExample
- type ResponseEmpty
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRoutes ¶
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func (*Controller) GetExample ¶
func (c *Controller) GetExample(ctx context.Context, req *RequestGetExample, w http.ResponseWriter) (*apimodel.Example, error)
func (*Controller) GetExampleRequest ¶
func (c *Controller) GetExampleRequest(r *http.Request, w http.ResponseWriter) (*RequestGetExample, error)
func (*Controller) GetExampleResponse ¶
func (c *Controller) GetExampleResponse(ctx context.Context, res *apimodel.Example, w http.ResponseWriter) error
func (*Controller) SetExample ¶
func (c *Controller) SetExample(ctx context.Context, req *RequestSetExample, w http.ResponseWriter) (*ResponseEmpty, error)
func (*Controller) SetExampleRequest ¶
func (c *Controller) SetExampleRequest(r *http.Request, w http.ResponseWriter) (*RequestSetExample, error)
func (*Controller) SetExampleResponse ¶
func (c *Controller) SetExampleResponse(ctx context.Context, res *ResponseEmpty, w http.ResponseWriter) error
type RequestGetExample ¶
type RequestGetExample struct {
// contains filtered or unexported fields
}
type RequestSetExample ¶
type RequestSetExample struct {
// contains filtered or unexported fields
}
type ResponseEmpty ¶
type ResponseEmpty struct{}
Click to show internal directories.
Click to hide internal directories.