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.
426 lines
18 KiB
Go
426 lines
18 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/binding.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 (
|
|
BindingService_InsertBinding_FullMethodName = "/state.v1.BindingService/InsertBinding"
|
|
BindingService_GetBinding_FullMethodName = "/state.v1.BindingService/GetBinding"
|
|
BindingService_ListBindings_FullMethodName = "/state.v1.BindingService/ListBindings"
|
|
BindingService_UpdateBinding_FullMethodName = "/state.v1.BindingService/UpdateBinding"
|
|
BindingService_DeleteBinding_FullMethodName = "/state.v1.BindingService/DeleteBinding"
|
|
BindingService_ApproveBinding_FullMethodName = "/state.v1.BindingService/ApproveBinding"
|
|
BindingService_PauseBinding_FullMethodName = "/state.v1.BindingService/PauseBinding"
|
|
BindingService_ResumeBinding_FullMethodName = "/state.v1.BindingService/ResumeBinding"
|
|
BindingService_ArmedBindingsForSource_FullMethodName = "/state.v1.BindingService/ArmedBindingsForSource"
|
|
)
|
|
|
|
// BindingServiceClient is the client API for BindingService 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 BindingServiceClient interface {
|
|
InsertBinding(ctx context.Context, in *InsertBindingRequest, opts ...grpc.CallOption) (*InsertBindingResponse, error)
|
|
GetBinding(ctx context.Context, in *GetBindingRequest, opts ...grpc.CallOption) (*GetBindingResponse, error)
|
|
ListBindings(ctx context.Context, in *ListBindingsRequest, opts ...grpc.CallOption) (*ListBindingsResponse, error)
|
|
UpdateBinding(ctx context.Context, in *UpdateBindingRequest, opts ...grpc.CallOption) (*UpdateBindingResponse, error)
|
|
DeleteBinding(ctx context.Context, in *DeleteBindingRequest, opts ...grpc.CallOption) (*DeleteBindingResponse, error)
|
|
ApproveBinding(ctx context.Context, in *ApproveBindingRequest, opts ...grpc.CallOption) (*ApproveBindingResponse, error)
|
|
PauseBinding(ctx context.Context, in *PauseBindingRequest, opts ...grpc.CallOption) (*PauseBindingResponse, error)
|
|
ResumeBinding(ctx context.Context, in *ResumeBindingRequest, opts ...grpc.CallOption) (*ResumeBindingResponse, error)
|
|
ArmedBindingsForSource(ctx context.Context, in *ArmedBindingsForSourceRequest, opts ...grpc.CallOption) (*ArmedBindingsForSourceResponse, error)
|
|
}
|
|
|
|
type bindingServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewBindingServiceClient(cc grpc.ClientConnInterface) BindingServiceClient {
|
|
return &bindingServiceClient{cc}
|
|
}
|
|
|
|
func (c *bindingServiceClient) InsertBinding(ctx context.Context, in *InsertBindingRequest, opts ...grpc.CallOption) (*InsertBindingResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(InsertBindingResponse)
|
|
err := c.cc.Invoke(ctx, BindingService_InsertBinding_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *bindingServiceClient) GetBinding(ctx context.Context, in *GetBindingRequest, opts ...grpc.CallOption) (*GetBindingResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetBindingResponse)
|
|
err := c.cc.Invoke(ctx, BindingService_GetBinding_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *bindingServiceClient) ListBindings(ctx context.Context, in *ListBindingsRequest, opts ...grpc.CallOption) (*ListBindingsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListBindingsResponse)
|
|
err := c.cc.Invoke(ctx, BindingService_ListBindings_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *bindingServiceClient) UpdateBinding(ctx context.Context, in *UpdateBindingRequest, opts ...grpc.CallOption) (*UpdateBindingResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UpdateBindingResponse)
|
|
err := c.cc.Invoke(ctx, BindingService_UpdateBinding_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *bindingServiceClient) DeleteBinding(ctx context.Context, in *DeleteBindingRequest, opts ...grpc.CallOption) (*DeleteBindingResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(DeleteBindingResponse)
|
|
err := c.cc.Invoke(ctx, BindingService_DeleteBinding_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *bindingServiceClient) ApproveBinding(ctx context.Context, in *ApproveBindingRequest, opts ...grpc.CallOption) (*ApproveBindingResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ApproveBindingResponse)
|
|
err := c.cc.Invoke(ctx, BindingService_ApproveBinding_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *bindingServiceClient) PauseBinding(ctx context.Context, in *PauseBindingRequest, opts ...grpc.CallOption) (*PauseBindingResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(PauseBindingResponse)
|
|
err := c.cc.Invoke(ctx, BindingService_PauseBinding_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *bindingServiceClient) ResumeBinding(ctx context.Context, in *ResumeBindingRequest, opts ...grpc.CallOption) (*ResumeBindingResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ResumeBindingResponse)
|
|
err := c.cc.Invoke(ctx, BindingService_ResumeBinding_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *bindingServiceClient) ArmedBindingsForSource(ctx context.Context, in *ArmedBindingsForSourceRequest, opts ...grpc.CallOption) (*ArmedBindingsForSourceResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ArmedBindingsForSourceResponse)
|
|
err := c.cc.Invoke(ctx, BindingService_ArmedBindingsForSource_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// BindingServiceServer is the server API for BindingService service.
|
|
// All implementations must embed UnimplementedBindingServiceServer
|
|
// for forward compatibility.
|
|
type BindingServiceServer interface {
|
|
InsertBinding(context.Context, *InsertBindingRequest) (*InsertBindingResponse, error)
|
|
GetBinding(context.Context, *GetBindingRequest) (*GetBindingResponse, error)
|
|
ListBindings(context.Context, *ListBindingsRequest) (*ListBindingsResponse, error)
|
|
UpdateBinding(context.Context, *UpdateBindingRequest) (*UpdateBindingResponse, error)
|
|
DeleteBinding(context.Context, *DeleteBindingRequest) (*DeleteBindingResponse, error)
|
|
ApproveBinding(context.Context, *ApproveBindingRequest) (*ApproveBindingResponse, error)
|
|
PauseBinding(context.Context, *PauseBindingRequest) (*PauseBindingResponse, error)
|
|
ResumeBinding(context.Context, *ResumeBindingRequest) (*ResumeBindingResponse, error)
|
|
ArmedBindingsForSource(context.Context, *ArmedBindingsForSourceRequest) (*ArmedBindingsForSourceResponse, error)
|
|
mustEmbedUnimplementedBindingServiceServer()
|
|
}
|
|
|
|
// UnimplementedBindingServiceServer 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 UnimplementedBindingServiceServer struct{}
|
|
|
|
func (UnimplementedBindingServiceServer) InsertBinding(context.Context, *InsertBindingRequest) (*InsertBindingResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method InsertBinding not implemented")
|
|
}
|
|
func (UnimplementedBindingServiceServer) GetBinding(context.Context, *GetBindingRequest) (*GetBindingResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetBinding not implemented")
|
|
}
|
|
func (UnimplementedBindingServiceServer) ListBindings(context.Context, *ListBindingsRequest) (*ListBindingsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListBindings not implemented")
|
|
}
|
|
func (UnimplementedBindingServiceServer) UpdateBinding(context.Context, *UpdateBindingRequest) (*UpdateBindingResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method UpdateBinding not implemented")
|
|
}
|
|
func (UnimplementedBindingServiceServer) DeleteBinding(context.Context, *DeleteBindingRequest) (*DeleteBindingResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method DeleteBinding not implemented")
|
|
}
|
|
func (UnimplementedBindingServiceServer) ApproveBinding(context.Context, *ApproveBindingRequest) (*ApproveBindingResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ApproveBinding not implemented")
|
|
}
|
|
func (UnimplementedBindingServiceServer) PauseBinding(context.Context, *PauseBindingRequest) (*PauseBindingResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method PauseBinding not implemented")
|
|
}
|
|
func (UnimplementedBindingServiceServer) ResumeBinding(context.Context, *ResumeBindingRequest) (*ResumeBindingResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ResumeBinding not implemented")
|
|
}
|
|
func (UnimplementedBindingServiceServer) ArmedBindingsForSource(context.Context, *ArmedBindingsForSourceRequest) (*ArmedBindingsForSourceResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ArmedBindingsForSource not implemented")
|
|
}
|
|
func (UnimplementedBindingServiceServer) mustEmbedUnimplementedBindingServiceServer() {}
|
|
func (UnimplementedBindingServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeBindingServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to BindingServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeBindingServiceServer interface {
|
|
mustEmbedUnimplementedBindingServiceServer()
|
|
}
|
|
|
|
func RegisterBindingServiceServer(s grpc.ServiceRegistrar, srv BindingServiceServer) {
|
|
// If the following call panics, it indicates UnimplementedBindingServiceServer 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(&BindingService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _BindingService_InsertBinding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(InsertBindingRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BindingServiceServer).InsertBinding(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BindingService_InsertBinding_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BindingServiceServer).InsertBinding(ctx, req.(*InsertBindingRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BindingService_GetBinding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetBindingRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BindingServiceServer).GetBinding(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BindingService_GetBinding_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BindingServiceServer).GetBinding(ctx, req.(*GetBindingRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BindingService_ListBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListBindingsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BindingServiceServer).ListBindings(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BindingService_ListBindings_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BindingServiceServer).ListBindings(ctx, req.(*ListBindingsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BindingService_UpdateBinding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateBindingRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BindingServiceServer).UpdateBinding(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BindingService_UpdateBinding_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BindingServiceServer).UpdateBinding(ctx, req.(*UpdateBindingRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BindingService_DeleteBinding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteBindingRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BindingServiceServer).DeleteBinding(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BindingService_DeleteBinding_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BindingServiceServer).DeleteBinding(ctx, req.(*DeleteBindingRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BindingService_ApproveBinding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ApproveBindingRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BindingServiceServer).ApproveBinding(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BindingService_ApproveBinding_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BindingServiceServer).ApproveBinding(ctx, req.(*ApproveBindingRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BindingService_PauseBinding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PauseBindingRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BindingServiceServer).PauseBinding(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BindingService_PauseBinding_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BindingServiceServer).PauseBinding(ctx, req.(*PauseBindingRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BindingService_ResumeBinding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ResumeBindingRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BindingServiceServer).ResumeBinding(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BindingService_ResumeBinding_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BindingServiceServer).ResumeBinding(ctx, req.(*ResumeBindingRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BindingService_ArmedBindingsForSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ArmedBindingsForSourceRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BindingServiceServer).ArmedBindingsForSource(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BindingService_ArmedBindingsForSource_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BindingServiceServer).ArmedBindingsForSource(ctx, req.(*ArmedBindingsForSourceRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// BindingService_ServiceDesc is the grpc.ServiceDesc for BindingService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var BindingService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "state.v1.BindingService",
|
|
HandlerType: (*BindingServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "InsertBinding",
|
|
Handler: _BindingService_InsertBinding_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetBinding",
|
|
Handler: _BindingService_GetBinding_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListBindings",
|
|
Handler: _BindingService_ListBindings_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateBinding",
|
|
Handler: _BindingService_UpdateBinding_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteBinding",
|
|
Handler: _BindingService_DeleteBinding_Handler,
|
|
},
|
|
{
|
|
MethodName: "ApproveBinding",
|
|
Handler: _BindingService_ApproveBinding_Handler,
|
|
},
|
|
{
|
|
MethodName: "PauseBinding",
|
|
Handler: _BindingService_PauseBinding_Handler,
|
|
},
|
|
{
|
|
MethodName: "ResumeBinding",
|
|
Handler: _BindingService_ResumeBinding_Handler,
|
|
},
|
|
{
|
|
MethodName: "ArmedBindingsForSource",
|
|
Handler: _BindingService_ArmedBindingsForSource_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "state/v1/binding.proto",
|
|
}
|