Documentation ¶
Index ¶
- func InstrumentingMiddleware(duration metrics.Histogram) endpoint.Middleware
- func LoggingMiddleware(logger log.Logger) endpoint.Middleware
- func MakeCheckHomeEndpoint(s service.Service) endpoint.Endpoint
- func MakeCreateCrimeEndpoint(s service.Service) endpoint.Endpoint
- func MakeCreateHomeEndpoint(s service.Service) endpoint.Endpoint
- func MakeDeleteCrimeEndpoint(s service.Service) endpoint.Endpoint
- func MakeDeleteHomeEndpoint(s service.Service) endpoint.Endpoint
- func MakeGetCrimeEndpoint(s service.Service) endpoint.Endpoint
- func MakeGetCrimesEndpoint(s service.Service) endpoint.Endpoint
- func MakeGetHomeEndpoint(s service.Service) endpoint.Endpoint
- func MakeUpdateCrimeEndpoint(s service.Service) endpoint.Endpoint
- type CheckHomeRequest
- type CheckHomeResponse
- type CreateCrimeRequest
- type CreateHomeRequest
- type CreateHomeResponse
- type DeleteCrimeRequest
- type DeleteHomeRequest
- type DeleteHomeResponse
- type Endpoints
- type GetCrimeRequest
- type GetCrimeResponse
- type GetCrimesRequest
- type GetCrimesResponse
- type GetHomeRequest
- type GetHomeResponse
- type UpdateCrimeRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstrumentingMiddleware ¶
func InstrumentingMiddleware(duration metrics.Histogram) endpoint.Middleware
InstrumentingMiddleware returns an endpoint middleware that records the duration of each invocation to the passed histogram. The middleware adds a single field: "success", which is "true" if no error is returned, and "false" otherwise.
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) endpoint.Middleware
LoggingMiddleware returns an endpoint middleware that logs the duration of each invocation, and the resulting error, if any.
Types ¶
type CheckHomeRequest ¶
type CheckHomeRequest struct {
ID int64
}
type CheckHomeResponse ¶
type CreateCrimeRequest ¶
type CreateHomeRequest ¶
type CreateHomeResponse ¶
type DeleteCrimeRequest ¶
type DeleteCrimeRequest struct {
ID int64
}
type DeleteHomeRequest ¶
type DeleteHomeRequest struct {
ID int64
}
type DeleteHomeResponse ¶
type DeleteHomeResponse struct{}
type Endpoints ¶
type GetCrimeRequest ¶
type GetCrimeRequest struct {
ID int64
}
type GetCrimeResponse ¶
type GetCrimesRequest ¶
type GetCrimesRequest struct { }
type GetCrimesResponse ¶
type GetHomeRequest ¶
type GetHomeRequest struct {
ID int64
}
type GetHomeResponse ¶
type UpdateCrimeRequest ¶
Click to show internal directories.
Click to hide internal directories.