Documentation
¶
Overview ¶
Package proto is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterAllHandlers(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAllHandlersFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) error
- func RegisterAllHandlersServer(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterEventServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEventServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventServiceClient) error
- func RegisterEventServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEventServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventServiceServer) error
- func RegisterHouseholdServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterHouseholdServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HouseholdServiceClient) error
- func RegisterHouseholdServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterHouseholdServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HouseholdServiceServer) error
- func RegisterMealServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMealServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MealServiceClient) error
- func RegisterMealServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMealServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MealServiceServer) error
- func RegisterMemberServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMemberServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MemberServiceClient) error
- func RegisterMemberServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMemberServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MemberServiceServer) error
- func SetupGatewayFromEndpoint(grpcEndpoint string, httpPort string) error
- func SetupGatewayWithConnection(conn *grpc.ClientConn, httpPort string) error
- func SetupGatewayWithServers(householdServer HouseholdServiceServer, memberServer MemberServiceServer, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAllHandlers ¶ added in v1.0.42
RegisterAllHandlers registers all service handlers from a gRPC client connection
func RegisterAllHandlersFromEndpoint ¶ added in v1.0.42
func RegisterAllHandlersFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) error
RegisterAllHandlersFromEndpoint registers all service handlers from a gRPC endpoint
func RegisterAllHandlersServer ¶ added in v1.0.42
func RegisterAllHandlersServer(ctx context.Context, mux *runtime.ServeMux, householdServer HouseholdServiceServer, memberServer MemberServiceServer, mealServer MealServiceServer, eventServer EventServiceServer) error
RegisterAllHandlersServer registers all service handlers for direct server calls
func RegisterEventServiceHandler ¶ added in v1.0.40
func RegisterEventServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterEventServiceHandler registers the http handlers for service EventService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEventServiceHandlerClient ¶ added in v1.0.40
func RegisterEventServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventServiceClient) error
RegisterEventServiceHandlerClient registers the http handlers for service EventService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EventServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EventServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EventServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterEventServiceHandlerFromEndpoint ¶ added in v1.0.40
func RegisterEventServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterEventServiceHandlerFromEndpoint is same as RegisterEventServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEventServiceHandlerServer ¶ added in v1.0.40
func RegisterEventServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventServiceServer) error
RegisterEventServiceHandlerServer registers the http handlers for service EventService to "mux". UnaryRPC :call EventServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEventServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterHouseholdServiceHandler ¶ added in v1.0.40
func RegisterHouseholdServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterHouseholdServiceHandler registers the http handlers for service HouseholdService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterHouseholdServiceHandlerClient ¶ added in v1.0.40
func RegisterHouseholdServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HouseholdServiceClient) error
RegisterHouseholdServiceHandlerClient registers the http handlers for service HouseholdService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HouseholdServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HouseholdServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "HouseholdServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterHouseholdServiceHandlerFromEndpoint ¶ added in v1.0.40
func RegisterHouseholdServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterHouseholdServiceHandlerFromEndpoint is same as RegisterHouseholdServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterHouseholdServiceHandlerServer ¶ added in v1.0.40
func RegisterHouseholdServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HouseholdServiceServer) error
RegisterHouseholdServiceHandlerServer registers the http handlers for service HouseholdService to "mux". UnaryRPC :call HouseholdServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterHouseholdServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterMealServiceHandler ¶ added in v1.0.40
func RegisterMealServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMealServiceHandler registers the http handlers for service MealService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMealServiceHandlerClient ¶ added in v1.0.40
func RegisterMealServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MealServiceClient) error
RegisterMealServiceHandlerClient registers the http handlers for service MealService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MealServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MealServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MealServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterMealServiceHandlerFromEndpoint ¶ added in v1.0.40
func RegisterMealServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMealServiceHandlerFromEndpoint is same as RegisterMealServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMealServiceHandlerServer ¶ added in v1.0.40
func RegisterMealServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MealServiceServer) error
RegisterMealServiceHandlerServer registers the http handlers for service MealService to "mux". UnaryRPC :call MealServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMealServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterMemberServiceHandler ¶ added in v1.0.40
func RegisterMemberServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMemberServiceHandler registers the http handlers for service MemberService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMemberServiceHandlerClient ¶ added in v1.0.40
func RegisterMemberServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MemberServiceClient) error
RegisterMemberServiceHandlerClient registers the http handlers for service MemberService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MemberServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MemberServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MemberServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterMemberServiceHandlerFromEndpoint ¶ added in v1.0.40
func RegisterMemberServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMemberServiceHandlerFromEndpoint is same as RegisterMemberServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMemberServiceHandlerServer ¶ added in v1.0.40
func RegisterMemberServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MemberServiceServer) error
RegisterMemberServiceHandlerServer registers the http handlers for service MemberService to "mux". UnaryRPC :call MemberServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMemberServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func SetupGatewayFromEndpoint ¶ added in v1.0.42
SetupGatewayFromEndpoint sets up the gRPC gateway to proxy to a gRPC server endpoint
func SetupGatewayWithConnection ¶ added in v1.0.42
func SetupGatewayWithConnection(conn *grpc.ClientConn, httpPort string) error
SetupGatewayWithConnection sets up the gRPC gateway using an existing gRPC connection
func SetupGatewayWithServers ¶ added in v1.0.42
func SetupGatewayWithServers( householdServer HouseholdServiceServer, memberServer MemberServiceServer, mealServer MealServiceServer, eventServer EventServiceServer, httpPort string) error
SetupGatewayWithServers sets up the gRPC gateway for direct server calls (in-process)
Types ¶
This section is empty.