Documentation ¶
Index ¶
- func CreateCommentEndpoint(svc usersvc.UserService) endpoint.Endpoint
- func CreateUserEndpoint(svc usersvc.UserService) endpoint.Endpoint
- func FindUsersEndpoint(svc usersvc.UserService) endpoint.Endpoint
- func GetCommentEndpoint(svc usersvc.UserService) endpoint.Endpoint
- func GetUserCommentsEndpoint(svc usersvc.UserService) endpoint.Endpoint
- func GetUserEndpoint(svc usersvc.UserService) endpoint.Endpoint
- func LatencyMiddleware(dur metrics.Histogram, methodName string) endpoint.Middleware
- func RequestFrequencyMiddleware(freq metrics.Gauge, methodName string) endpoint.Middleware
- func UpdateUserEndpoint(svc usersvc.UserService) endpoint.Endpoint
- type CreateCommentRequest
- type CreateCommentResponse
- type CreateUserRequest
- type CreateUserResponse
- type EndpointsSet
- func Endpoints(svc usersvc.UserService) EndpointsSet
- func InstrumentingEndpoints(endpoints EndpointsSet, tracer opentracinggo.Tracer) EndpointsSet
- func TraceClientEndpoints(endpoints EndpointsSet, tracer opentracinggo.Tracer) EndpointsSet
- func TraceServerEndpoints(endpoints EndpointsSet, tracer opentracinggo.Tracer) EndpointsSet
- func (set EndpointsSet) CreateComment(arg0 context.Context, arg1 usersvc.Comment) (res0 string, res1 error)
- func (set EndpointsSet) CreateUser(arg0 context.Context, arg1 usersvc.User) (res0 string, res1 error)
- func (set EndpointsSet) FindUsers(arg0 context.Context) (res0 map[string]usersvc.User, res1 error)
- func (set EndpointsSet) GetComment(arg0 context.Context, arg1 string) (res0 usersvc.Comment, res1 error)
- func (set EndpointsSet) GetUser(arg0 context.Context, arg1 string) (res0 usersvc.User, res1 error)
- func (set EndpointsSet) GetUserComments(arg0 context.Context, arg1 string) (res0 []usersvc.Comment, res1 error)
- func (set EndpointsSet) UpdateUser(arg0 context.Context, arg1 usersvc.User) (res0 error)
- type FindUsersRequest
- type FindUsersResponse
- type GetCommentRequest
- type GetCommentResponse
- type GetUserCommentsRequest
- type GetUserCommentsResponse
- type GetUserRequest
- type GetUserResponse
- type UpdateUserRequest
- type UpdateUserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCommentEndpoint ¶
func CreateCommentEndpoint(svc usersvc.UserService) endpoint.Endpoint
func CreateUserEndpoint ¶
func CreateUserEndpoint(svc usersvc.UserService) endpoint.Endpoint
func FindUsersEndpoint ¶
func FindUsersEndpoint(svc usersvc.UserService) endpoint.Endpoint
func GetCommentEndpoint ¶
func GetCommentEndpoint(svc usersvc.UserService) endpoint.Endpoint
func GetUserCommentsEndpoint ¶
func GetUserCommentsEndpoint(svc usersvc.UserService) endpoint.Endpoint
func GetUserEndpoint ¶
func GetUserEndpoint(svc usersvc.UserService) endpoint.Endpoint
func LatencyMiddleware ¶
func LatencyMiddleware(dur metrics.Histogram, methodName string) endpoint.Middleware
func RequestFrequencyMiddleware ¶
func RequestFrequencyMiddleware(freq metrics.Gauge, methodName string) endpoint.Middleware
func UpdateUserEndpoint ¶
func UpdateUserEndpoint(svc usersvc.UserService) endpoint.Endpoint
Types ¶
type CreateCommentRequest ¶
type CreateCommentResponse ¶
type CreateCommentResponse struct {
Id string `json:"id"`
}
type CreateUserRequest ¶
type CreateUserResponse ¶
type CreateUserResponse struct {
Id string `json:"id"`
}
type EndpointsSet ¶
type EndpointsSet struct { CreateUserEndpoint endpoint.Endpoint UpdateUserEndpoint endpoint.Endpoint GetUserEndpoint endpoint.Endpoint FindUsersEndpoint endpoint.Endpoint CreateCommentEndpoint endpoint.Endpoint GetCommentEndpoint endpoint.Endpoint GetUserCommentsEndpoint endpoint.Endpoint }
EndpointsSet implements UserService API and used for transport purposes.
func Endpoints ¶
func Endpoints(svc usersvc.UserService) EndpointsSet
func InstrumentingEndpoints ¶
func InstrumentingEndpoints(endpoints EndpointsSet, tracer opentracinggo.Tracer) EndpointsSet
func TraceClientEndpoints ¶
func TraceClientEndpoints(endpoints EndpointsSet, tracer opentracinggo.Tracer) EndpointsSet
TraceClientEndpoints is used for tracing endpoints on client side.
func TraceServerEndpoints ¶
func TraceServerEndpoints(endpoints EndpointsSet, tracer opentracinggo.Tracer) EndpointsSet
TraceServerEndpoints is used for tracing endpoints on server side.
func (EndpointsSet) CreateComment ¶
func (EndpointsSet) CreateUser ¶
func (EndpointsSet) GetComment ¶
func (EndpointsSet) GetUserComments ¶
func (EndpointsSet) UpdateUser ¶
type FindUsersResponse ¶
type GetCommentRequest ¶
type GetCommentRequest struct {
Id string `json:"id"`
}
type GetCommentResponse ¶
type GetUserCommentsRequest ¶
type GetUserCommentsRequest struct {
UserId string `json:"user_id"`
}
type GetUserCommentsResponse ¶
type GetUserRequest ¶
type GetUserRequest struct {
Id string `json:"id"`
}
type GetUserResponse ¶
type UpdateUserRequest ¶
type UpdateUserResponse ¶
type UpdateUserResponse struct{}
Formal exchange type, please do not delete.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.