Documentation ¶
Overview ¶
Package api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterAdminHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extApi.AdminClient) error
- func RegisterAdminHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAdminHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extApi.AdminServer) error
- func RegisterForumHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterForumHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extApi.ForumClient) error
- func RegisterForumHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterForumHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extApi.ForumServer) error
- func RegisterPostHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPostHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extApi.PostClient) error
- func RegisterPostHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPostHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extApi.PostServer) error
- func RegisterThreadHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterThreadHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extApi.ThreadClient) error
- func RegisterThreadHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterThreadHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extApi.ThreadServer) error
- func RegisterUserHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extApi.UserClient) error
- func RegisterUserHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extApi.UserServer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAdminHandler ¶
RegisterAdminHandler registers the http handlers for service Admin to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAdminHandlerClient ¶
func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extApi.AdminClient) error
RegisterAdminHandlerClient registers the http handlers for service Admin to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "extApi.AdminClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "extApi.AdminClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "extApi.AdminClient" to call the correct interceptors.
func RegisterAdminHandlerFromEndpoint ¶
func RegisterAdminHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAdminHandlerFromEndpoint is same as RegisterAdminHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAdminHandlerServer ¶
func RegisterAdminHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extApi.AdminServer) error
RegisterAdminHandlerServer registers the http handlers for service Admin to "mux". UnaryRPC :call AdminServer 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 RegisterAdminHandlerFromEndpoint instead.
func RegisterForumHandler ¶
RegisterForumHandler registers the http handlers for service Forum to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterForumHandlerClient ¶
func RegisterForumHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extApi.ForumClient) error
RegisterForumHandlerClient registers the http handlers for service Forum to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "extApi.ForumClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "extApi.ForumClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "extApi.ForumClient" to call the correct interceptors.
func RegisterForumHandlerFromEndpoint ¶
func RegisterForumHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterForumHandlerFromEndpoint is same as RegisterForumHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterForumHandlerServer ¶
func RegisterForumHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extApi.ForumServer) error
RegisterForumHandlerServer registers the http handlers for service Forum to "mux". UnaryRPC :call ForumServer 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 RegisterForumHandlerFromEndpoint instead.
func RegisterPostHandler ¶
RegisterPostHandler registers the http handlers for service Post to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPostHandlerClient ¶
func RegisterPostHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extApi.PostClient) error
RegisterPostHandlerClient registers the http handlers for service Post to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "extApi.PostClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "extApi.PostClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "extApi.PostClient" to call the correct interceptors.
func RegisterPostHandlerFromEndpoint ¶
func RegisterPostHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPostHandlerFromEndpoint is same as RegisterPostHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPostHandlerServer ¶
func RegisterPostHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extApi.PostServer) error
RegisterPostHandlerServer registers the http handlers for service Post to "mux". UnaryRPC :call PostServer 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 RegisterPostHandlerFromEndpoint instead.
func RegisterThreadHandler ¶
RegisterThreadHandler registers the http handlers for service Thread to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterThreadHandlerClient ¶
func RegisterThreadHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extApi.ThreadClient) error
RegisterThreadHandlerClient registers the http handlers for service Thread to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "extApi.ThreadClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "extApi.ThreadClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "extApi.ThreadClient" to call the correct interceptors.
func RegisterThreadHandlerFromEndpoint ¶
func RegisterThreadHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterThreadHandlerFromEndpoint is same as RegisterThreadHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterThreadHandlerServer ¶
func RegisterThreadHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extApi.ThreadServer) error
RegisterThreadHandlerServer registers the http handlers for service Thread to "mux". UnaryRPC :call ThreadServer 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 RegisterThreadHandlerFromEndpoint instead.
func RegisterUserHandler ¶
RegisterUserHandler registers the http handlers for service User to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUserHandlerClient ¶
func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extApi.UserClient) error
RegisterUserHandlerClient registers the http handlers for service User to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "extApi.UserClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "extApi.UserClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "extApi.UserClient" to call the correct interceptors.
func RegisterUserHandlerFromEndpoint ¶
func RegisterUserHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUserHandlerFromEndpoint is same as RegisterUserHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUserHandlerServer ¶
func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extApi.UserServer) error
RegisterUserHandlerServer registers the http handlers for service User to "mux". UnaryRPC :call UserServer 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 RegisterUserHandlerFromEndpoint instead.
Types ¶
This section is empty.