package
1.8.94
Repository: https://github.com/macinnir/dvc.git
Documentation: pkg.go.dev

# Functions

BadRequest returns a bad request status (400).
Created returns a created status (201).
Forbidden returns a forbidden status (403).
HandleError handles errors returned from the service layer and calls a api error handler to return the corresponding HTTP response.
No description provided by the author
HTTPMethodTypeFromString converts a method from a string to its method type.
No description provided by the author
InternalServerError returns a 500 server error response.
JSON Returns an ok status with json-encoded body.
NewRequest is a factory method for a request.
NewResponse returns a new response object.
NoContent returns a noContent status (204).
NotFound returns a not-found status.
NotImplemented shows a text response for not implemented method (501).
OK Returns an ok status.
PrintArgs prints args.
QueryArgInt checks the incoming request `r` for a query argument named `name` and if it exists, attempts to parse it to an integer If the argument does not exist, the value `defaultVal` is returned.
QueryArgInt64 checks the incoming request `r` for a query argument named `name` and if it exists, attempts to parse it to an 64-bit integer If the argument does not exist, the value `defaultVal` is returned.
QueryArgString checks the incoming request `r` for a query argument named `name` and if it exists, returns it Else, it returns `defaultVal`.
Unauthorized returns an unauthorized status (401).
URLParamInt64 returns an int64 value from a url parameter.
URLParamString returns a string url parameter or the default if not found.

# Constants

AuthHeaderKey is the name of the Authorization header.
AuthHeaderValuePrefix is the start of the Authorization string (in the authorization header) used to authorize the request.
No description provided by the author
HTTPMethodDelete is the http method DELETE.
HTTPMethodGet is the http method 'GET'.
HTTPMethodHead is the http method HEAD.
HTTPMethodOptions is the http method OPTIONS.
HTTPMethodPatch is the http method PATCH.
HTTPMethodPost is the http method POST.
HTTPMethodPut is the http method PUT.
HTTPMethodTrace is the http method TRACE.
HTTPMethodUnknown is an unknown method type.
UserLogActionTypeAPI is an API Action Type.
UserLogActionTypeClient is an API Action Type.

# Structs

ErrorResponse is the structure of a response that is an error @model ErrorResponse.
Request is a request object.
Response is the API response handler.

# Interfaces

IResponseLogger outlines methods for handling logging for API Responses.

# Type aliases

HTTPMethodType is the type of a method request.
UserLogActionType is the type of action in the user log.