// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.2 // - protoc (unknown) // source: state/v1/audit.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 ( AuditService_ListAudit_FullMethodName = "/state.v1.AuditService/ListAudit" AuditService_GetAuditHead_FullMethodName = "/state.v1.AuditService/GetAuditHead" AuditService_CountAudit_FullMethodName = "/state.v1.AuditService/CountAudit" AuditService_RecordAuditExport_FullMethodName = "/state.v1.AuditService/RecordAuditExport" ) // AuditServiceClient is the client API for AuditService 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. // // The instance audit feed: one org-scoped timeline over the settings trail, // access-policy changes and denials, identity lifecycle events, and runtime // events. The org and the reader's authority come from the authenticated // caller; no request names an org. type AuditServiceClient interface { // ListAudit returns one page of the caller's org feed, newest first. A // cursor reused with different filters is refused. ListAudit(ctx context.Context, in *ListAuditRequest, opts ...grpc.CallOption) (*ListAuditResponse, error) // GetAuditHead returns a cheap token that changes when any trail grows. It // carries no rows and no org data; it is the live tail's signal. GetAuditHead(ctx context.Context, in *GetAuditHeadRequest, opts ...grpc.CallOption) (*GetAuditHeadResponse, error) // CountAudit returns how many entries the filter matches, without a cursor // or a page bound. The export preflights it so an oversized download is // refused before any row is streamed. CountAudit(ctx context.Context, in *CountAuditRequest, opts ...grpc.CallOption) (*CountAuditResponse, error) // RecordAuditExport appends the audit row of one completed export: its // format, the filter fingerprint and the row count, attributed to the // caller. The State Store writes it; the dashboard never does. RecordAuditExport(ctx context.Context, in *RecordAuditExportRequest, opts ...grpc.CallOption) (*RecordAuditExportResponse, error) } type auditServiceClient struct { cc grpc.ClientConnInterface } func NewAuditServiceClient(cc grpc.ClientConnInterface) AuditServiceClient { return &auditServiceClient{cc} } func (c *auditServiceClient) ListAudit(ctx context.Context, in *ListAuditRequest, opts ...grpc.CallOption) (*ListAuditResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListAuditResponse) err := c.cc.Invoke(ctx, AuditService_ListAudit_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *auditServiceClient) GetAuditHead(ctx context.Context, in *GetAuditHeadRequest, opts ...grpc.CallOption) (*GetAuditHeadResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetAuditHeadResponse) err := c.cc.Invoke(ctx, AuditService_GetAuditHead_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *auditServiceClient) CountAudit(ctx context.Context, in *CountAuditRequest, opts ...grpc.CallOption) (*CountAuditResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CountAuditResponse) err := c.cc.Invoke(ctx, AuditService_CountAudit_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *auditServiceClient) RecordAuditExport(ctx context.Context, in *RecordAuditExportRequest, opts ...grpc.CallOption) (*RecordAuditExportResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RecordAuditExportResponse) err := c.cc.Invoke(ctx, AuditService_RecordAuditExport_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // AuditServiceServer is the server API for AuditService service. // All implementations must embed UnimplementedAuditServiceServer // for forward compatibility. // // The instance audit feed: one org-scoped timeline over the settings trail, // access-policy changes and denials, identity lifecycle events, and runtime // events. The org and the reader's authority come from the authenticated // caller; no request names an org. type AuditServiceServer interface { // ListAudit returns one page of the caller's org feed, newest first. A // cursor reused with different filters is refused. ListAudit(context.Context, *ListAuditRequest) (*ListAuditResponse, error) // GetAuditHead returns a cheap token that changes when any trail grows. It // carries no rows and no org data; it is the live tail's signal. GetAuditHead(context.Context, *GetAuditHeadRequest) (*GetAuditHeadResponse, error) // CountAudit returns how many entries the filter matches, without a cursor // or a page bound. The export preflights it so an oversized download is // refused before any row is streamed. CountAudit(context.Context, *CountAuditRequest) (*CountAuditResponse, error) // RecordAuditExport appends the audit row of one completed export: its // format, the filter fingerprint and the row count, attributed to the // caller. The State Store writes it; the dashboard never does. RecordAuditExport(context.Context, *RecordAuditExportRequest) (*RecordAuditExportResponse, error) mustEmbedUnimplementedAuditServiceServer() } // UnimplementedAuditServiceServer 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 UnimplementedAuditServiceServer struct{} func (UnimplementedAuditServiceServer) ListAudit(context.Context, *ListAuditRequest) (*ListAuditResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListAudit not implemented") } func (UnimplementedAuditServiceServer) GetAuditHead(context.Context, *GetAuditHeadRequest) (*GetAuditHeadResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetAuditHead not implemented") } func (UnimplementedAuditServiceServer) CountAudit(context.Context, *CountAuditRequest) (*CountAuditResponse, error) { return nil, status.Error(codes.Unimplemented, "method CountAudit not implemented") } func (UnimplementedAuditServiceServer) RecordAuditExport(context.Context, *RecordAuditExportRequest) (*RecordAuditExportResponse, error) { return nil, status.Error(codes.Unimplemented, "method RecordAuditExport not implemented") } func (UnimplementedAuditServiceServer) mustEmbedUnimplementedAuditServiceServer() {} func (UnimplementedAuditServiceServer) testEmbeddedByValue() {} // UnsafeAuditServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AuditServiceServer will // result in compilation errors. type UnsafeAuditServiceServer interface { mustEmbedUnimplementedAuditServiceServer() } func RegisterAuditServiceServer(s grpc.ServiceRegistrar, srv AuditServiceServer) { // If the following call panics, it indicates UnimplementedAuditServiceServer 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(&AuditService_ServiceDesc, srv) } func _AuditService_ListAudit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListAuditRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AuditServiceServer).ListAudit(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AuditService_ListAudit_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AuditServiceServer).ListAudit(ctx, req.(*ListAuditRequest)) } return interceptor(ctx, in, info, handler) } func _AuditService_GetAuditHead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetAuditHeadRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AuditServiceServer).GetAuditHead(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AuditService_GetAuditHead_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AuditServiceServer).GetAuditHead(ctx, req.(*GetAuditHeadRequest)) } return interceptor(ctx, in, info, handler) } func _AuditService_CountAudit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CountAuditRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AuditServiceServer).CountAudit(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AuditService_CountAudit_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AuditServiceServer).CountAudit(ctx, req.(*CountAuditRequest)) } return interceptor(ctx, in, info, handler) } func _AuditService_RecordAuditExport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RecordAuditExportRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AuditServiceServer).RecordAuditExport(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: AuditService_RecordAuditExport_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AuditServiceServer).RecordAuditExport(ctx, req.(*RecordAuditExportRequest)) } return interceptor(ctx, in, info, handler) } // AuditService_ServiceDesc is the grpc.ServiceDesc for AuditService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var AuditService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "state.v1.AuditService", HandlerType: (*AuditServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListAudit", Handler: _AuditService_ListAudit_Handler, }, { MethodName: "GetAuditHead", Handler: _AuditService_GetAuditHead_Handler, }, { MethodName: "CountAudit", Handler: _AuditService_CountAudit_Handler, }, { MethodName: "RecordAuditExport", Handler: _AuditService_RecordAuditExport_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "state/v1/audit.proto", }