Documentation ¶
Index ¶
- Constants
- func RequestTraceMiddleware(next http.Handler) http.Handler
- type RestController
- func (c *RestController) DeleteTicket(w http.ResponseWriter, r *http.Request)
- func (c *RestController) Error(w http.ResponseWriter, status int, message string, errors []error)
- func (c *RestController) GetAllTickets(w http.ResponseWriter, r *http.Request)
- func (c *RestController) GetTicket(w http.ResponseWriter, r *http.Request)
- func (c *RestController) PostTicket(w http.ResponseWriter, r *http.Request)
- func (c *RestController) Routes() *chi.Mux
Constants ¶
View Source
const TRACE_HEADER = "X-Correlation-ID"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RestController ¶
type RestController struct { *render.Render TicketRepo repo.TicketRepository TicketService service.TicketService }
func NewRestController ¶
func NewRestController(ticketRepo repo.TicketRepository, ticketService service.TicketService) *RestController
func (*RestController) DeleteTicket ¶
func (c *RestController) DeleteTicket(w http.ResponseWriter, r *http.Request)
func (*RestController) Error ¶
func (c *RestController) Error(w http.ResponseWriter, status int, message string, errors []error)
func (*RestController) GetAllTickets ¶
func (c *RestController) GetAllTickets(w http.ResponseWriter, r *http.Request)
func (*RestController) GetTicket ¶
func (c *RestController) GetTicket(w http.ResponseWriter, r *http.Request)
func (*RestController) PostTicket ¶
func (c *RestController) PostTicket(w http.ResponseWriter, r *http.Request)
func (*RestController) Routes ¶
func (c *RestController) Routes() *chi.Mux
Click to show internal directories.
Click to hide internal directories.