package
0.0.0-20220224164949-4382370ed515
Repository: https://github.com/lexgalante/go.iris.git
Documentation: pkg.go.dev

# Functions

Accepted -> 202.
BadRequest -> stop with 400.
Conflict -> stop with 409.
Created -> 201.
DeleteVehicle -> DELETE /v1/vehicles/{id}.
Forbidden -> stop with 403.
GetCurrentUserFromContext -> retrive user data from context.
GetUser -> GET /v1/users.
GetUserVehicles -> GET /v1/users/{id}/vehicles.
GetVehicle -> GET /v1/vehicles.
GetVehicleByID -> GET /v1/vehicles/{id}.
InternalServerError -> stop with 500.
Login -> POST /auth/login.
MakeValidationError -> mapping validator to json.
MakeValidationErrors -> mapping validator to json.
NoContent -> 204.
NotFound -> stop with 404.
Ok -> 200.
PaginateTraces -> GET /vehicles/{id}/traces?page=1&page_size=50.
PatchUser -> GET /v1/users/{id}/active | /v1/users/{id}/inactive.
PatchVehicle -> PATCH /v1/vehicles/{id}/active | /v1/vehicles/{id}/active.
PostTrace -> /vehicles/{id}/traces.
PostTraceFromCSV -> /vehicles/{id}/traces/upload.
PostVehicle -> POST /v1/vehicles.
PutVehicle -> PUT /v1/vehicles/{id}.
Register -> POST /auth/register.
Unauthorized -> stop with 401.
UnprocessableEntity -> stop with 422.

# Constants

ErrorInsufficientPermission -> INSUFFICIENT_PERMISSION.
ErrorInvalidCredentials -> INVALID_CREDENTIALS.
ErrorInvalidField -> INVALID_FIELD.
ErrorInvalidParameter -> INVALID_PARAMETER.
ErrorInvalidPayload -> INVALID_JSON.
ErrorInvalidRequest -> INVALID_REQUEST.
ErrorNotFound -> NOT_FOUND.
ErrorUnexpectedError -> UNEXPECTED_ERROR.

# Structs

ValidationError -> represent error.