One gRPC service per domain in state.v1 (tasks, executions, accounts, identities, packages, captures, bindings, access, orgs, alerts and so on), each with its own server type in staterpc. RPC and message names and numbers are unchanged.
248 lines
11 KiB
Go
248 lines
11 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.6.2
|
|
// - protoc (unknown)
|
|
// source: state/v1/review.proto
|
|
|
|
package statev1
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
ReviewService_RespondReviewGate_FullMethodName = "/state.v1.ReviewService/RespondReviewGate"
|
|
ReviewService_BeginRemediation_FullMethodName = "/state.v1.ReviewService/BeginRemediation"
|
|
ReviewService_UpdateReviewPayload_FullMethodName = "/state.v1.ReviewService/UpdateReviewPayload"
|
|
ReviewService_SetReviewCursors_FullMethodName = "/state.v1.ReviewService/SetReviewCursors"
|
|
)
|
|
|
|
// ReviewServiceClient is the client API for ReviewService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
type ReviewServiceClient interface {
|
|
// RespondReviewGate is the operator's answer to the review gate
|
|
// (docs/prds/pr-review-operator-response.md, Decision 2): one guarded
|
|
// requeue that records the answer, increments rereview_rounds for a
|
|
// re-review, and refuses a re-review past cap with the ErrRereviewCapReached
|
|
// wire sentinel. Admin-only, like every other operator surface: a
|
|
// task-scoped grant never reaches it.
|
|
RespondReviewGate(ctx context.Context, in *RespondReviewGateRequest, opts ...grpc.CallOption) (*RespondReviewGateResponse, error)
|
|
BeginRemediation(ctx context.Context, in *BeginRemediationRequest, opts ...grpc.CallOption) (*BeginRemediationResponse, error)
|
|
UpdateReviewPayload(ctx context.Context, in *UpdateReviewPayloadRequest, opts ...grpc.CallOption) (*UpdateReviewPayloadResponse, error)
|
|
SetReviewCursors(ctx context.Context, in *SetReviewCursorsRequest, opts ...grpc.CallOption) (*SetReviewCursorsResponse, error)
|
|
}
|
|
|
|
type reviewServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewReviewServiceClient(cc grpc.ClientConnInterface) ReviewServiceClient {
|
|
return &reviewServiceClient{cc}
|
|
}
|
|
|
|
func (c *reviewServiceClient) RespondReviewGate(ctx context.Context, in *RespondReviewGateRequest, opts ...grpc.CallOption) (*RespondReviewGateResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(RespondReviewGateResponse)
|
|
err := c.cc.Invoke(ctx, ReviewService_RespondReviewGate_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *reviewServiceClient) BeginRemediation(ctx context.Context, in *BeginRemediationRequest, opts ...grpc.CallOption) (*BeginRemediationResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(BeginRemediationResponse)
|
|
err := c.cc.Invoke(ctx, ReviewService_BeginRemediation_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *reviewServiceClient) UpdateReviewPayload(ctx context.Context, in *UpdateReviewPayloadRequest, opts ...grpc.CallOption) (*UpdateReviewPayloadResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UpdateReviewPayloadResponse)
|
|
err := c.cc.Invoke(ctx, ReviewService_UpdateReviewPayload_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *reviewServiceClient) SetReviewCursors(ctx context.Context, in *SetReviewCursorsRequest, opts ...grpc.CallOption) (*SetReviewCursorsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SetReviewCursorsResponse)
|
|
err := c.cc.Invoke(ctx, ReviewService_SetReviewCursors_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ReviewServiceServer is the server API for ReviewService service.
|
|
// All implementations must embed UnimplementedReviewServiceServer
|
|
// for forward compatibility.
|
|
type ReviewServiceServer interface {
|
|
// RespondReviewGate is the operator's answer to the review gate
|
|
// (docs/prds/pr-review-operator-response.md, Decision 2): one guarded
|
|
// requeue that records the answer, increments rereview_rounds for a
|
|
// re-review, and refuses a re-review past cap with the ErrRereviewCapReached
|
|
// wire sentinel. Admin-only, like every other operator surface: a
|
|
// task-scoped grant never reaches it.
|
|
RespondReviewGate(context.Context, *RespondReviewGateRequest) (*RespondReviewGateResponse, error)
|
|
BeginRemediation(context.Context, *BeginRemediationRequest) (*BeginRemediationResponse, error)
|
|
UpdateReviewPayload(context.Context, *UpdateReviewPayloadRequest) (*UpdateReviewPayloadResponse, error)
|
|
SetReviewCursors(context.Context, *SetReviewCursorsRequest) (*SetReviewCursorsResponse, error)
|
|
mustEmbedUnimplementedReviewServiceServer()
|
|
}
|
|
|
|
// UnimplementedReviewServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedReviewServiceServer struct{}
|
|
|
|
func (UnimplementedReviewServiceServer) RespondReviewGate(context.Context, *RespondReviewGateRequest) (*RespondReviewGateResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method RespondReviewGate not implemented")
|
|
}
|
|
func (UnimplementedReviewServiceServer) BeginRemediation(context.Context, *BeginRemediationRequest) (*BeginRemediationResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method BeginRemediation not implemented")
|
|
}
|
|
func (UnimplementedReviewServiceServer) UpdateReviewPayload(context.Context, *UpdateReviewPayloadRequest) (*UpdateReviewPayloadResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method UpdateReviewPayload not implemented")
|
|
}
|
|
func (UnimplementedReviewServiceServer) SetReviewCursors(context.Context, *SetReviewCursorsRequest) (*SetReviewCursorsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SetReviewCursors not implemented")
|
|
}
|
|
func (UnimplementedReviewServiceServer) mustEmbedUnimplementedReviewServiceServer() {}
|
|
func (UnimplementedReviewServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeReviewServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ReviewServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeReviewServiceServer interface {
|
|
mustEmbedUnimplementedReviewServiceServer()
|
|
}
|
|
|
|
func RegisterReviewServiceServer(s grpc.ServiceRegistrar, srv ReviewServiceServer) {
|
|
// If the following call panics, it indicates UnimplementedReviewServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&ReviewService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ReviewService_RespondReviewGate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RespondReviewGateRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ReviewServiceServer).RespondReviewGate(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ReviewService_RespondReviewGate_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ReviewServiceServer).RespondReviewGate(ctx, req.(*RespondReviewGateRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ReviewService_BeginRemediation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(BeginRemediationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ReviewServiceServer).BeginRemediation(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ReviewService_BeginRemediation_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ReviewServiceServer).BeginRemediation(ctx, req.(*BeginRemediationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ReviewService_UpdateReviewPayload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateReviewPayloadRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ReviewServiceServer).UpdateReviewPayload(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ReviewService_UpdateReviewPayload_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ReviewServiceServer).UpdateReviewPayload(ctx, req.(*UpdateReviewPayloadRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ReviewService_SetReviewCursors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SetReviewCursorsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ReviewServiceServer).SetReviewCursors(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ReviewService_SetReviewCursors_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ReviewServiceServer).SetReviewCursors(ctx, req.(*SetReviewCursorsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ReviewService_ServiceDesc is the grpc.ServiceDesc for ReviewService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ReviewService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "state.v1.ReviewService",
|
|
HandlerType: (*ReviewServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "RespondReviewGate",
|
|
Handler: _ReviewService_RespondReviewGate_Handler,
|
|
},
|
|
{
|
|
MethodName: "BeginRemediation",
|
|
Handler: _ReviewService_BeginRemediation_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateReviewPayload",
|
|
Handler: _ReviewService_UpdateReviewPayload_Handler,
|
|
},
|
|
{
|
|
MethodName: "SetReviewCursors",
|
|
Handler: _ReviewService_SetReviewCursors_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "state/v1/review.proto",
|
|
}
|