Documentation ¶
Index ¶
- Constants
- func NewChildServiceHandler(svc ChildServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewParentServiceHandler(svc ParentServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewRelationsServiceHandler(svc RelationsServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type ChildServiceClient
- type ChildServiceHandler
- type ParentServiceClient
- type ParentServiceHandler
- type RelationsServiceClient
- type RelationsServiceHandler
- type UnimplementedChildServiceHandler
- func (UnimplementedChildServiceHandler) CreateChild(context.Context, *connect.Request[crosstest.CreateChildRequest]) (*connect.Response[crosstest.Child], error)
- func (UnimplementedChildServiceHandler) DeleteChild(context.Context, *connect.Request[crosstest.DeleteChildRequest]) (*connect.Response[emptypb.Empty], error)
- func (UnimplementedChildServiceHandler) GetChild(context.Context, *connect.Request[crosstest.GetChildRequest]) (*connect.Response[crosstest.Child], error)
- func (UnimplementedChildServiceHandler) ListChildren(context.Context, *connect.Request[crosstest.ListChildrenRequest]) (*connect.Response[crosstest.ListChildrenResponse], error)
- func (UnimplementedChildServiceHandler) UpdateChild(context.Context, *connect.Request[crosstest.UpdateChildRequest]) (*connect.Response[crosstest.Child], error)
- type UnimplementedParentServiceHandler
- func (UnimplementedParentServiceHandler) CreateParent(context.Context, *connect.Request[crosstest.CreateParentRequest]) (*connect.Response[crosstest.Parent], error)
- func (UnimplementedParentServiceHandler) DeleteParent(context.Context, *connect.Request[crosstest.DeleteParentRequest]) (*connect.Response[emptypb.Empty], error)
- func (UnimplementedParentServiceHandler) GetParent(context.Context, *connect.Request[crosstest.GetParentRequest]) (*connect.Response[crosstest.Parent], error)
- func (UnimplementedParentServiceHandler) ListParents(context.Context, *connect.Request[crosstest.ListParentsRequest]) (*connect.Response[crosstest.ListParentsResponse], error)
- func (UnimplementedParentServiceHandler) UpdateParent(context.Context, *connect.Request[crosstest.UpdateParentRequest]) (*connect.Response[crosstest.Parent], error)
- type UnimplementedRelationsServiceHandler
- func (UnimplementedRelationsServiceHandler) GetChildParent(context.Context, *connect.Request[crosstest.GetChildParentRequest]) (*connect.Response[crosstest.GetChildParentResponse], error)
- func (UnimplementedRelationsServiceHandler) GetParentChildren(context.Context, *connect.Request[crosstest.GetParentChildrenRequest]) (*connect.Response[crosstest.GetParentChildrenResponse], error)
Constants ¶
const ( // ParentServiceName is the fully-qualified name of the ParentService service. ParentServiceName = "buf.knit.crosstest.ParentService" // ChildServiceName is the fully-qualified name of the ChildService service. ChildServiceName = "buf.knit.crosstest.ChildService" // RelationsServiceName is the fully-qualified name of the RelationsService service. RelationsServiceName = "buf.knit.crosstest.RelationsService" )
const ( // ParentServiceListParentsProcedure is the fully-qualified name of the ParentService's ListParents // RPC. ParentServiceListParentsProcedure = "/buf.knit.crosstest.ParentService/ListParents" // ParentServiceGetParentProcedure is the fully-qualified name of the ParentService's GetParent RPC. ParentServiceGetParentProcedure = "/buf.knit.crosstest.ParentService/GetParent" // ParentServiceCreateParentProcedure is the fully-qualified name of the ParentService's // CreateParent RPC. ParentServiceCreateParentProcedure = "/buf.knit.crosstest.ParentService/CreateParent" // ParentServiceUpdateParentProcedure is the fully-qualified name of the ParentService's // UpdateParent RPC. ParentServiceUpdateParentProcedure = "/buf.knit.crosstest.ParentService/UpdateParent" // ParentServiceDeleteParentProcedure is the fully-qualified name of the ParentService's // DeleteParent RPC. ParentServiceDeleteParentProcedure = "/buf.knit.crosstest.ParentService/DeleteParent" // ChildServiceListChildrenProcedure is the fully-qualified name of the ChildService's ListChildren // RPC. ChildServiceListChildrenProcedure = "/buf.knit.crosstest.ChildService/ListChildren" // ChildServiceGetChildProcedure is the fully-qualified name of the ChildService's GetChild RPC. ChildServiceGetChildProcedure = "/buf.knit.crosstest.ChildService/GetChild" // ChildServiceCreateChildProcedure is the fully-qualified name of the ChildService's CreateChild // RPC. ChildServiceCreateChildProcedure = "/buf.knit.crosstest.ChildService/CreateChild" // ChildServiceUpdateChildProcedure is the fully-qualified name of the ChildService's UpdateChild // RPC. ChildServiceUpdateChildProcedure = "/buf.knit.crosstest.ChildService/UpdateChild" // ChildServiceDeleteChildProcedure is the fully-qualified name of the ChildService's DeleteChild // RPC. ChildServiceDeleteChildProcedure = "/buf.knit.crosstest.ChildService/DeleteChild" // RelationsServiceGetChildParentProcedure is the fully-qualified name of the RelationsService's // GetChildParent RPC. RelationsServiceGetChildParentProcedure = "/buf.knit.crosstest.RelationsService/GetChildParent" // RelationsServiceGetParentChildrenProcedure is the fully-qualified name of the RelationsService's // GetParentChildren RPC. RelationsServiceGetParentChildrenProcedure = "/buf.knit.crosstest.RelationsService/GetParentChildren" )
These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
Variables ¶
This section is empty.
Functions ¶
func NewChildServiceHandler ¶
func NewChildServiceHandler(svc ChildServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewChildServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
func NewParentServiceHandler ¶
func NewParentServiceHandler(svc ParentServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewParentServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
func NewRelationsServiceHandler ¶
func NewRelationsServiceHandler(svc RelationsServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewRelationsServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
Types ¶
type ChildServiceClient ¶
type ChildServiceClient interface { ListChildren(context.Context, *connect.Request[crosstest.ListChildrenRequest]) (*connect.Response[crosstest.ListChildrenResponse], error) GetChild(context.Context, *connect.Request[crosstest.GetChildRequest]) (*connect.Response[crosstest.Child], error) CreateChild(context.Context, *connect.Request[crosstest.CreateChildRequest]) (*connect.Response[crosstest.Child], error) UpdateChild(context.Context, *connect.Request[crosstest.UpdateChildRequest]) (*connect.Response[crosstest.Child], error) DeleteChild(context.Context, *connect.Request[crosstest.DeleteChildRequest]) (*connect.Response[emptypb.Empty], error) }
ChildServiceClient is a client for the buf.knit.crosstest.ChildService service.
func NewChildServiceClient ¶
func NewChildServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ChildServiceClient
NewChildServiceClient constructs a client for the buf.knit.crosstest.ChildService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type ChildServiceHandler ¶
type ChildServiceHandler interface { ListChildren(context.Context, *connect.Request[crosstest.ListChildrenRequest]) (*connect.Response[crosstest.ListChildrenResponse], error) GetChild(context.Context, *connect.Request[crosstest.GetChildRequest]) (*connect.Response[crosstest.Child], error) CreateChild(context.Context, *connect.Request[crosstest.CreateChildRequest]) (*connect.Response[crosstest.Child], error) UpdateChild(context.Context, *connect.Request[crosstest.UpdateChildRequest]) (*connect.Response[crosstest.Child], error) DeleteChild(context.Context, *connect.Request[crosstest.DeleteChildRequest]) (*connect.Response[emptypb.Empty], error) }
ChildServiceHandler is an implementation of the buf.knit.crosstest.ChildService service.
type ParentServiceClient ¶
type ParentServiceClient interface { ListParents(context.Context, *connect.Request[crosstest.ListParentsRequest]) (*connect.Response[crosstest.ListParentsResponse], error) GetParent(context.Context, *connect.Request[crosstest.GetParentRequest]) (*connect.Response[crosstest.Parent], error) CreateParent(context.Context, *connect.Request[crosstest.CreateParentRequest]) (*connect.Response[crosstest.Parent], error) UpdateParent(context.Context, *connect.Request[crosstest.UpdateParentRequest]) (*connect.Response[crosstest.Parent], error) DeleteParent(context.Context, *connect.Request[crosstest.DeleteParentRequest]) (*connect.Response[emptypb.Empty], error) }
ParentServiceClient is a client for the buf.knit.crosstest.ParentService service.
func NewParentServiceClient ¶
func NewParentServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ParentServiceClient
NewParentServiceClient constructs a client for the buf.knit.crosstest.ParentService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type ParentServiceHandler ¶
type ParentServiceHandler interface { ListParents(context.Context, *connect.Request[crosstest.ListParentsRequest]) (*connect.Response[crosstest.ListParentsResponse], error) GetParent(context.Context, *connect.Request[crosstest.GetParentRequest]) (*connect.Response[crosstest.Parent], error) CreateParent(context.Context, *connect.Request[crosstest.CreateParentRequest]) (*connect.Response[crosstest.Parent], error) UpdateParent(context.Context, *connect.Request[crosstest.UpdateParentRequest]) (*connect.Response[crosstest.Parent], error) DeleteParent(context.Context, *connect.Request[crosstest.DeleteParentRequest]) (*connect.Response[emptypb.Empty], error) }
ParentServiceHandler is an implementation of the buf.knit.crosstest.ParentService service.
type RelationsServiceClient ¶
type RelationsServiceClient interface { GetChildParent(context.Context, *connect.Request[crosstest.GetChildParentRequest]) (*connect.Response[crosstest.GetChildParentResponse], error) GetParentChildren(context.Context, *connect.Request[crosstest.GetParentChildrenRequest]) (*connect.Response[crosstest.GetParentChildrenResponse], error) }
RelationsServiceClient is a client for the buf.knit.crosstest.RelationsService service.
func NewRelationsServiceClient ¶
func NewRelationsServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) RelationsServiceClient
NewRelationsServiceClient constructs a client for the buf.knit.crosstest.RelationsService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type RelationsServiceHandler ¶
type RelationsServiceHandler interface { GetChildParent(context.Context, *connect.Request[crosstest.GetChildParentRequest]) (*connect.Response[crosstest.GetChildParentResponse], error) GetParentChildren(context.Context, *connect.Request[crosstest.GetParentChildrenRequest]) (*connect.Response[crosstest.GetParentChildrenResponse], error) }
RelationsServiceHandler is an implementation of the buf.knit.crosstest.RelationsService service.
type UnimplementedChildServiceHandler ¶
type UnimplementedChildServiceHandler struct{}
UnimplementedChildServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedChildServiceHandler) CreateChild ¶
func (UnimplementedChildServiceHandler) DeleteChild ¶
func (UnimplementedChildServiceHandler) ListChildren ¶
func (UnimplementedChildServiceHandler) ListChildren(context.Context, *connect.Request[crosstest.ListChildrenRequest]) (*connect.Response[crosstest.ListChildrenResponse], error)
func (UnimplementedChildServiceHandler) UpdateChild ¶
type UnimplementedParentServiceHandler ¶
type UnimplementedParentServiceHandler struct{}
UnimplementedParentServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedParentServiceHandler) CreateParent ¶
func (UnimplementedParentServiceHandler) DeleteParent ¶
func (UnimplementedParentServiceHandler) ListParents ¶
func (UnimplementedParentServiceHandler) ListParents(context.Context, *connect.Request[crosstest.ListParentsRequest]) (*connect.Response[crosstest.ListParentsResponse], error)
func (UnimplementedParentServiceHandler) UpdateParent ¶
type UnimplementedRelationsServiceHandler ¶
type UnimplementedRelationsServiceHandler struct{}
UnimplementedRelationsServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedRelationsServiceHandler) GetChildParent ¶
func (UnimplementedRelationsServiceHandler) GetChildParent(context.Context, *connect.Request[crosstest.GetChildParentRequest]) (*connect.Response[crosstest.GetChildParentResponse], error)
func (UnimplementedRelationsServiceHandler) GetParentChildren ¶
func (UnimplementedRelationsServiceHandler) GetParentChildren(context.Context, *connect.Request[crosstest.GetParentChildrenRequest]) (*connect.Response[crosstest.GetParentChildrenResponse], error)