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.
394 lines
16 KiB
Go
394 lines
16 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/source.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 (
|
|
SourceService_InsertSource_FullMethodName = "/state.v1.SourceService/InsertSource"
|
|
SourceService_GetSource_FullMethodName = "/state.v1.SourceService/GetSource"
|
|
SourceService_ListSources_FullMethodName = "/state.v1.SourceService/ListSources"
|
|
SourceService_SetSourceSigning_FullMethodName = "/state.v1.SourceService/SetSourceSigning"
|
|
SourceService_SetSourceSecret_FullMethodName = "/state.v1.SourceService/SetSourceSecret"
|
|
SourceService_SetSourceName_FullMethodName = "/state.v1.SourceService/SetSourceName"
|
|
SourceService_SetSourceDeliveryHeader_FullMethodName = "/state.v1.SourceService/SetSourceDeliveryHeader"
|
|
SourceService_DeleteSource_FullMethodName = "/state.v1.SourceService/DeleteSource"
|
|
)
|
|
|
|
// SourceServiceClient is the client API for SourceService 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.
|
|
//
|
|
// Sources: the capture endpoint and its signing setting. Secrets travel in
|
|
// plaintext; the store encrypts at rest.
|
|
type SourceServiceClient interface {
|
|
InsertSource(ctx context.Context, in *InsertSourceRequest, opts ...grpc.CallOption) (*InsertSourceResponse, error)
|
|
GetSource(ctx context.Context, in *GetSourceRequest, opts ...grpc.CallOption) (*GetSourceResponse, error)
|
|
ListSources(ctx context.Context, in *ListSourcesRequest, opts ...grpc.CallOption) (*ListSourcesResponse, error)
|
|
SetSourceSigning(ctx context.Context, in *SetSourceSigningRequest, opts ...grpc.CallOption) (*SetSourceSigningResponse, error)
|
|
SetSourceSecret(ctx context.Context, in *SetSourceSecretRequest, opts ...grpc.CallOption) (*SetSourceSecretResponse, error)
|
|
SetSourceName(ctx context.Context, in *SetSourceNameRequest, opts ...grpc.CallOption) (*SetSourceNameResponse, error)
|
|
SetSourceDeliveryHeader(ctx context.Context, in *SetSourceDeliveryHeaderRequest, opts ...grpc.CallOption) (*SetSourceDeliveryHeaderResponse, error)
|
|
DeleteSource(ctx context.Context, in *DeleteSourceRequest, opts ...grpc.CallOption) (*DeleteSourceResponse, error)
|
|
}
|
|
|
|
type sourceServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewSourceServiceClient(cc grpc.ClientConnInterface) SourceServiceClient {
|
|
return &sourceServiceClient{cc}
|
|
}
|
|
|
|
func (c *sourceServiceClient) InsertSource(ctx context.Context, in *InsertSourceRequest, opts ...grpc.CallOption) (*InsertSourceResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(InsertSourceResponse)
|
|
err := c.cc.Invoke(ctx, SourceService_InsertSource_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *sourceServiceClient) GetSource(ctx context.Context, in *GetSourceRequest, opts ...grpc.CallOption) (*GetSourceResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetSourceResponse)
|
|
err := c.cc.Invoke(ctx, SourceService_GetSource_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *sourceServiceClient) ListSources(ctx context.Context, in *ListSourcesRequest, opts ...grpc.CallOption) (*ListSourcesResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListSourcesResponse)
|
|
err := c.cc.Invoke(ctx, SourceService_ListSources_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *sourceServiceClient) SetSourceSigning(ctx context.Context, in *SetSourceSigningRequest, opts ...grpc.CallOption) (*SetSourceSigningResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SetSourceSigningResponse)
|
|
err := c.cc.Invoke(ctx, SourceService_SetSourceSigning_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *sourceServiceClient) SetSourceSecret(ctx context.Context, in *SetSourceSecretRequest, opts ...grpc.CallOption) (*SetSourceSecretResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SetSourceSecretResponse)
|
|
err := c.cc.Invoke(ctx, SourceService_SetSourceSecret_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *sourceServiceClient) SetSourceName(ctx context.Context, in *SetSourceNameRequest, opts ...grpc.CallOption) (*SetSourceNameResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SetSourceNameResponse)
|
|
err := c.cc.Invoke(ctx, SourceService_SetSourceName_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *sourceServiceClient) SetSourceDeliveryHeader(ctx context.Context, in *SetSourceDeliveryHeaderRequest, opts ...grpc.CallOption) (*SetSourceDeliveryHeaderResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SetSourceDeliveryHeaderResponse)
|
|
err := c.cc.Invoke(ctx, SourceService_SetSourceDeliveryHeader_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *sourceServiceClient) DeleteSource(ctx context.Context, in *DeleteSourceRequest, opts ...grpc.CallOption) (*DeleteSourceResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(DeleteSourceResponse)
|
|
err := c.cc.Invoke(ctx, SourceService_DeleteSource_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// SourceServiceServer is the server API for SourceService service.
|
|
// All implementations must embed UnimplementedSourceServiceServer
|
|
// for forward compatibility.
|
|
//
|
|
// Sources: the capture endpoint and its signing setting. Secrets travel in
|
|
// plaintext; the store encrypts at rest.
|
|
type SourceServiceServer interface {
|
|
InsertSource(context.Context, *InsertSourceRequest) (*InsertSourceResponse, error)
|
|
GetSource(context.Context, *GetSourceRequest) (*GetSourceResponse, error)
|
|
ListSources(context.Context, *ListSourcesRequest) (*ListSourcesResponse, error)
|
|
SetSourceSigning(context.Context, *SetSourceSigningRequest) (*SetSourceSigningResponse, error)
|
|
SetSourceSecret(context.Context, *SetSourceSecretRequest) (*SetSourceSecretResponse, error)
|
|
SetSourceName(context.Context, *SetSourceNameRequest) (*SetSourceNameResponse, error)
|
|
SetSourceDeliveryHeader(context.Context, *SetSourceDeliveryHeaderRequest) (*SetSourceDeliveryHeaderResponse, error)
|
|
DeleteSource(context.Context, *DeleteSourceRequest) (*DeleteSourceResponse, error)
|
|
mustEmbedUnimplementedSourceServiceServer()
|
|
}
|
|
|
|
// UnimplementedSourceServiceServer 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 UnimplementedSourceServiceServer struct{}
|
|
|
|
func (UnimplementedSourceServiceServer) InsertSource(context.Context, *InsertSourceRequest) (*InsertSourceResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method InsertSource not implemented")
|
|
}
|
|
func (UnimplementedSourceServiceServer) GetSource(context.Context, *GetSourceRequest) (*GetSourceResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetSource not implemented")
|
|
}
|
|
func (UnimplementedSourceServiceServer) ListSources(context.Context, *ListSourcesRequest) (*ListSourcesResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListSources not implemented")
|
|
}
|
|
func (UnimplementedSourceServiceServer) SetSourceSigning(context.Context, *SetSourceSigningRequest) (*SetSourceSigningResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SetSourceSigning not implemented")
|
|
}
|
|
func (UnimplementedSourceServiceServer) SetSourceSecret(context.Context, *SetSourceSecretRequest) (*SetSourceSecretResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SetSourceSecret not implemented")
|
|
}
|
|
func (UnimplementedSourceServiceServer) SetSourceName(context.Context, *SetSourceNameRequest) (*SetSourceNameResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SetSourceName not implemented")
|
|
}
|
|
func (UnimplementedSourceServiceServer) SetSourceDeliveryHeader(context.Context, *SetSourceDeliveryHeaderRequest) (*SetSourceDeliveryHeaderResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SetSourceDeliveryHeader not implemented")
|
|
}
|
|
func (UnimplementedSourceServiceServer) DeleteSource(context.Context, *DeleteSourceRequest) (*DeleteSourceResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method DeleteSource not implemented")
|
|
}
|
|
func (UnimplementedSourceServiceServer) mustEmbedUnimplementedSourceServiceServer() {}
|
|
func (UnimplementedSourceServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeSourceServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to SourceServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeSourceServiceServer interface {
|
|
mustEmbedUnimplementedSourceServiceServer()
|
|
}
|
|
|
|
func RegisterSourceServiceServer(s grpc.ServiceRegistrar, srv SourceServiceServer) {
|
|
// If the following call panics, it indicates UnimplementedSourceServiceServer 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(&SourceService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _SourceService_InsertSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(InsertSourceRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SourceServiceServer).InsertSource(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: SourceService_InsertSource_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SourceServiceServer).InsertSource(ctx, req.(*InsertSourceRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SourceService_GetSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetSourceRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SourceServiceServer).GetSource(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: SourceService_GetSource_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SourceServiceServer).GetSource(ctx, req.(*GetSourceRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SourceService_ListSources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListSourcesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SourceServiceServer).ListSources(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: SourceService_ListSources_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SourceServiceServer).ListSources(ctx, req.(*ListSourcesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SourceService_SetSourceSigning_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SetSourceSigningRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SourceServiceServer).SetSourceSigning(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: SourceService_SetSourceSigning_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SourceServiceServer).SetSourceSigning(ctx, req.(*SetSourceSigningRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SourceService_SetSourceSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SetSourceSecretRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SourceServiceServer).SetSourceSecret(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: SourceService_SetSourceSecret_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SourceServiceServer).SetSourceSecret(ctx, req.(*SetSourceSecretRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SourceService_SetSourceName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SetSourceNameRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SourceServiceServer).SetSourceName(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: SourceService_SetSourceName_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SourceServiceServer).SetSourceName(ctx, req.(*SetSourceNameRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SourceService_SetSourceDeliveryHeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SetSourceDeliveryHeaderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SourceServiceServer).SetSourceDeliveryHeader(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: SourceService_SetSourceDeliveryHeader_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SourceServiceServer).SetSourceDeliveryHeader(ctx, req.(*SetSourceDeliveryHeaderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _SourceService_DeleteSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteSourceRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SourceServiceServer).DeleteSource(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: SourceService_DeleteSource_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SourceServiceServer).DeleteSource(ctx, req.(*DeleteSourceRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// SourceService_ServiceDesc is the grpc.ServiceDesc for SourceService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var SourceService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "state.v1.SourceService",
|
|
HandlerType: (*SourceServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "InsertSource",
|
|
Handler: _SourceService_InsertSource_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetSource",
|
|
Handler: _SourceService_GetSource_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListSources",
|
|
Handler: _SourceService_ListSources_Handler,
|
|
},
|
|
{
|
|
MethodName: "SetSourceSigning",
|
|
Handler: _SourceService_SetSourceSigning_Handler,
|
|
},
|
|
{
|
|
MethodName: "SetSourceSecret",
|
|
Handler: _SourceService_SetSourceSecret_Handler,
|
|
},
|
|
{
|
|
MethodName: "SetSourceName",
|
|
Handler: _SourceService_SetSourceName_Handler,
|
|
},
|
|
{
|
|
MethodName: "SetSourceDeliveryHeader",
|
|
Handler: _SourceService_SetSourceDeliveryHeader_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteSource",
|
|
Handler: _SourceService_DeleteSource_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "state/v1/source.proto",
|
|
}
|