quotes

package
v0.0.0-...-4d27c10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QuoteHandler

type QuoteHandler struct {
	QuoteRepository *repositories.QuoteRepository
	FreteRapido     *freterapido.Service
}

func (*QuoteHandler) CreateQuote

func (q *QuoteHandler) CreateQuote(w http.ResponseWriter, r *http.Request)

@Summary Create quote @Description Uses frete-rapido API to simulate quote and save response at database @Tags Quotes @Accept json @Produce json @Param request body models.CreateQuoteRequest true "Request body" @Success 200 {object} models.CreateQuoteResponse @Failure 400 {object} utils.BadParamError @Failure 500 {object} utils.ErrorResponse @Router /quote [post]

func (*QuoteHandler) GetQuoteMetrics

func (q *QuoteHandler) GetQuoteMetrics(w http.ResponseWriter, r *http.Request)

@Summary Get quote metrics @Description Use stored quote to generate general metrics @Tags Quotes @Accept json @Produce json @Param last_quotes query int false "limit carriers" @Success 200 {object} models.MetricsResponse @Failure 400 {object} utils.BadParamError @Failure 500 {object} utils.ErrorResponse @Router /metrics [get]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL