Documentation ¶
Index ¶
- Constants
- func MakeAddItemEndpoint(service todo.Service) endpoint.Endpoint
- func MakeDeleteItemEndpoint(service todo.Service) endpoint.Endpoint
- func MakeDeleteItemsEndpoint(service todo.Service) endpoint.Endpoint
- func MakeGRPCServer(endpoints Endpoints, options ...kitgrpc.ServerOption) api.TodoListServiceServer
- func MakeGetItemEndpoint(service todo.Service) endpoint.Endpoint
- func MakeGraphQLResolver(endpoints Endpoints, options ...kitxgraphql.ServerOption) graphql.ResolverRoot
- func MakeGraphQLSchema(endpoints Endpoints, options ...kitxgraphql.ServerOption) graphql2.ExecutableSchema
- func MakeHTTPHandler(endpoints Endpoints, options ...kithttp.ServerOption) http.Handler
- func MakeListItemsEndpoint(service todo.Service) endpoint.Endpoint
- func MakeUpdateItemEndpoint(service todo.Service) endpoint.Endpoint
- type AddItemRequest
- type AddItemResponse
- type DeleteItemRequest
- type DeleteItemResponse
- type DeleteItemsRequest
- type DeleteItemsResponse
- type Endpoints
- type GetItemRequest
- type GetItemResponse
- type ListItemsRequest
- type ListItemsResponse
- type UpdateItemRequest
- type UpdateItemResponse
Constants ¶
const (
ContextKeyBaseURL contextKey = iota
)
Variables ¶
This section is empty.
Functions ¶
func MakeAddItemEndpoint ¶
MakeAddItemEndpoint returns an endpoint for the matching method of the underlying service.
func MakeDeleteItemEndpoint ¶
MakeDeleteItemEndpoint returns an endpoint for the matching method of the underlying service.
func MakeDeleteItemsEndpoint ¶
MakeDeleteItemsEndpoint returns an endpoint for the matching method of the underlying service.
func MakeGRPCServer ¶ added in v0.3.0
func MakeGRPCServer(endpoints Endpoints, options ...kitgrpc.ServerOption) api.TodoListServiceServer
MakeGRPCServer makes a set of endpoints available as a gRPC server.
func MakeGetItemEndpoint ¶
MakeGetItemEndpoint returns an endpoint for the matching method of the underlying service.
func MakeGraphQLResolver ¶ added in v0.3.0
func MakeGraphQLResolver(endpoints Endpoints, options ...kitxgraphql.ServerOption) graphql.ResolverRoot
MakeGraphQLResolver mounts all of the service endpoints into a GraphQL resolver.
func MakeGraphQLSchema ¶ added in v0.5.1
func MakeGraphQLSchema(endpoints Endpoints, options ...kitxgraphql.ServerOption) graphql2.ExecutableSchema
MakeGraphQLSchema mounts all of the service endpoints into a GraphQL executable schema.
func MakeHTTPHandler ¶ added in v0.6.1
func MakeHTTPHandler(endpoints Endpoints, options ...kithttp.ServerOption) http.Handler
MakeHTTPHandler mounts all of the service endpoints into an {http.Handler}.
func MakeListItemsEndpoint ¶
MakeListItemsEndpoint returns an endpoint for the matching method of the underlying service.
Types ¶
type AddItemRequest ¶
AddItemRequest is a request struct for AddItem endpoint.
type AddItemResponse ¶
AddItemResponse is a response struct for AddItem endpoint.
func (AddItemResponse) Failed ¶
func (r AddItemResponse) Failed() error
type DeleteItemRequest ¶
type DeleteItemRequest struct {
Id string
}
DeleteItemRequest is a request struct for DeleteItem endpoint.
type DeleteItemResponse ¶
type DeleteItemResponse struct {
Err error
}
DeleteItemResponse is a response struct for DeleteItem endpoint.
func (DeleteItemResponse) Failed ¶
func (r DeleteItemResponse) Failed() error
type DeleteItemsRequest ¶
type DeleteItemsRequest struct{}
DeleteItemsRequest is a request struct for DeleteItems endpoint.
type DeleteItemsResponse ¶
type DeleteItemsResponse struct {
Err error
}
DeleteItemsResponse is a response struct for DeleteItems endpoint.
func (DeleteItemsResponse) Failed ¶
func (r DeleteItemsResponse) Failed() error
type Endpoints ¶
type Endpoints struct { AddItem endpoint.Endpoint DeleteItem endpoint.Endpoint DeleteItems endpoint.Endpoint GetItem endpoint.Endpoint ListItems endpoint.Endpoint UpdateItem endpoint.Endpoint }
Endpoints collects all of the endpoints that compose the underlying service. It's meant to be used as a helper struct, to collect all of the endpoints into a single parameter.
func MakeEndpoints ¶
func MakeEndpoints(service todo.Service, middleware ...endpoint.Middleware) Endpoints
MakeEndpoints returns a(n) Endpoints struct where each endpoint invokes the corresponding method on the provided service.
type GetItemRequest ¶
type GetItemRequest struct {
Id string
}
GetItemRequest is a request struct for GetItem endpoint.
type GetItemResponse ¶
GetItemResponse is a response struct for GetItem endpoint.
func (GetItemResponse) Failed ¶
func (r GetItemResponse) Failed() error
type ListItemsRequest ¶
type ListItemsRequest struct{}
ListItemsRequest is a request struct for ListItems endpoint.
type ListItemsResponse ¶
ListItemsResponse is a response struct for ListItems endpoint.
func (ListItemsResponse) Failed ¶
func (r ListItemsResponse) Failed() error
type UpdateItemRequest ¶
type UpdateItemRequest struct { Id string ItemUpdate todo.ItemUpdate }
UpdateItemRequest is a request struct for UpdateItem endpoint.
type UpdateItemResponse ¶
UpdateItemResponse is a response struct for UpdateItem endpoint.
func (UpdateItemResponse) Failed ¶
func (r UpdateItemResponse) Failed() error