From a971947c3909f3d0b7ec26ee625f727c44890b49 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Sun, 25 Oct 2026 19:54:27 +1100 Subject: [PATCH] refactor(state)!: split StateStoreService into per-domain services 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. --- internal/app/controlplane/definitions.go | 9 +- internal/contracts/state/v1/access.pb.go | 1250 + internal/contracts/state/v1/access_grpc.pb.go | 407 + internal/contracts/state/v1/account.pb.go | 2208 ++ .../contracts/state/v1/account_grpc.pb.go | 809 + internal/contracts/state/v1/alert.pb.go | 1204 + internal/contracts/state/v1/alert_grpc.pb.go | 325 + internal/contracts/state/v1/binding.pb.go | 1158 + .../contracts/state/v1/binding_grpc.pb.go | 425 + internal/contracts/state/v1/capture.pb.go | 835 + .../contracts/state/v1/capture_grpc.pb.go | 290 + internal/contracts/state/v1/dispatch.pb.go | 824 + .../contracts/state/v1/dispatch_grpc.pb.go | 287 + internal/contracts/state/v1/event_type.pb.go | 702 + .../contracts/state/v1/event_type_grpc.pb.go | 239 + internal/contracts/state/v1/execution.pb.go | 1039 + .../contracts/state/v1/execution_grpc.pb.go | 291 + .../contracts/state/v1/harness_secret.pb.go | 402 + .../state/v1/harness_secret_grpc.pb.go | 169 + internal/contracts/state/v1/identity.pb.go | 1286 + .../contracts/state/v1/identity_grpc.pb.go | 473 + internal/contracts/state/v1/mapping.pb.go | 865 + .../contracts/state/v1/mapping_grpc.pb.go | 315 + internal/contracts/state/v1/org.pb.go | 1502 ++ internal/contracts/state/v1/org_grpc.pb.go | 515 + internal/contracts/state/v1/package.pb.go | 1568 ++ .../contracts/state/v1/package_grpc.pb.go | 527 + internal/contracts/state/v1/review.pb.go | 511 + internal/contracts/state/v1/review_grpc.pb.go | 247 + internal/contracts/state/v1/source.pb.go | 975 + internal/contracts/state/v1/source_grpc.pb.go | 393 + internal/contracts/state/v1/state.pb.go | 22005 ---------------- internal/contracts/state/v1/state_grpc.pb.go | 6363 ----- internal/contracts/state/v1/stats.pb.go | 710 + internal/contracts/state/v1/stats_grpc.pb.go | 235 + internal/contracts/state/v1/status.pb.go | 1377 + internal/contracts/state/v1/status_grpc.pb.go | 461 + internal/contracts/state/v1/task.pb.go | 2978 +++ internal/contracts/state/v1/task_event.pb.go | 388 + .../contracts/state/v1/task_event_grpc.pb.go | 197 + internal/contracts/state/v1/task_grant.pb.go | 390 + .../contracts/state/v1/task_grant_grpc.pb.go | 201 + internal/contracts/state/v1/task_grpc.pb.go | 1019 + internal/contracts/state/v1/task_log.pb.go | 566 + .../contracts/state/v1/task_log_grpc.pb.go | 183 + internal/contracts/state/v1/types.pb.go | 927 + internal/infrastructure/staterpc/access.go | 16 +- .../infrastructure/staterpc/access_client.go | 14 +- .../staterpc/account_security.go | 16 +- internal/infrastructure/staterpc/accounts.go | 24 +- .../infrastructure/staterpc/accounts_test.go | 34 +- internal/infrastructure/staterpc/alerts.go | 12 +- .../infrastructure/staterpc/alerts_client.go | 12 +- .../infrastructure/staterpc/alerts_test.go | 4 +- .../infrastructure/staterpc/authentication.go | 24 +- .../infrastructure/staterpc/callers_test.go | 2 +- internal/infrastructure/staterpc/client.go | 225 +- .../infrastructure/staterpc/eventtypes.go | 16 +- .../staterpc/harness_secret_test.go | 10 +- .../infrastructure/staterpc/identities.go | 40 +- .../staterpc/identity_start_test.go | 2 +- internal/infrastructure/staterpc/logs.go | 4 +- internal/infrastructure/staterpc/orgs.go | 20 +- .../infrastructure/staterpc/orgs_client.go | 20 +- internal/infrastructure/staterpc/orgs_test.go | 4 +- internal/infrastructure/staterpc/packages.go | 44 +- .../staterpc/personal_tokens.go | 12 +- .../staterpc/personal_tokens_test.go | 2 +- internal/infrastructure/staterpc/server.go | 307 +- .../staterpc/service_logs_test.go | 2 +- .../infrastructure/staterpc/task_grants.go | 34 +- .../infrastructure/staterpc/task_pin_test.go | 2 +- .../staterpc/usage_grant_test.go | 2 +- .../infrastructure/staterpc/usage_org_test.go | 2 +- .../staterpc/worker_presence_test.go | 2 +- proto/buf.yaml | 15 +- proto/state/v1/access.proto | 91 + proto/state/v1/account.proto | 95 + proto/state/v1/alert.proto | 103 + proto/state/v1/binding.proto | 69 + proto/state/v1/capture.proto | 72 + proto/state/v1/dispatch.proto | 72 + proto/state/v1/event_type.proto | 47 + proto/state/v1/execution.proto | 128 + proto/state/v1/harness_secret.proto | 44 + proto/state/v1/identity.proto | 70 + proto/state/v1/mapping.proto | 57 + proto/state/v1/org.proto | 98 + proto/state/v1/package.proto | 122 + proto/state/v1/review.proto | 50 + proto/state/v1/source.proto | 65 + proto/state/v1/state.proto | 1851 -- proto/state/v1/stats.proto | 44 + proto/state/v1/status.proto | 115 + proto/state/v1/task.proto | 239 + proto/state/v1/task_event.proto | 26 + proto/state/v1/task_grant.proto | 31 + proto/state/v1/task_log.proto | 89 + proto/state/v1/types.proto | 161 + 99 files changed, 34114 insertions(+), 30598 deletions(-) create mode 100644 internal/contracts/state/v1/access.pb.go create mode 100644 internal/contracts/state/v1/access_grpc.pb.go create mode 100644 internal/contracts/state/v1/account.pb.go create mode 100644 internal/contracts/state/v1/account_grpc.pb.go create mode 100644 internal/contracts/state/v1/alert.pb.go create mode 100644 internal/contracts/state/v1/alert_grpc.pb.go create mode 100644 internal/contracts/state/v1/binding.pb.go create mode 100644 internal/contracts/state/v1/binding_grpc.pb.go create mode 100644 internal/contracts/state/v1/capture.pb.go create mode 100644 internal/contracts/state/v1/capture_grpc.pb.go create mode 100644 internal/contracts/state/v1/dispatch.pb.go create mode 100644 internal/contracts/state/v1/dispatch_grpc.pb.go create mode 100644 internal/contracts/state/v1/event_type.pb.go create mode 100644 internal/contracts/state/v1/event_type_grpc.pb.go create mode 100644 internal/contracts/state/v1/execution.pb.go create mode 100644 internal/contracts/state/v1/execution_grpc.pb.go create mode 100644 internal/contracts/state/v1/harness_secret.pb.go create mode 100644 internal/contracts/state/v1/harness_secret_grpc.pb.go create mode 100644 internal/contracts/state/v1/identity.pb.go create mode 100644 internal/contracts/state/v1/identity_grpc.pb.go create mode 100644 internal/contracts/state/v1/mapping.pb.go create mode 100644 internal/contracts/state/v1/mapping_grpc.pb.go create mode 100644 internal/contracts/state/v1/org.pb.go create mode 100644 internal/contracts/state/v1/org_grpc.pb.go create mode 100644 internal/contracts/state/v1/package.pb.go create mode 100644 internal/contracts/state/v1/package_grpc.pb.go create mode 100644 internal/contracts/state/v1/review.pb.go create mode 100644 internal/contracts/state/v1/review_grpc.pb.go create mode 100644 internal/contracts/state/v1/source.pb.go create mode 100644 internal/contracts/state/v1/source_grpc.pb.go delete mode 100644 internal/contracts/state/v1/state.pb.go delete mode 100644 internal/contracts/state/v1/state_grpc.pb.go create mode 100644 internal/contracts/state/v1/stats.pb.go create mode 100644 internal/contracts/state/v1/stats_grpc.pb.go create mode 100644 internal/contracts/state/v1/status.pb.go create mode 100644 internal/contracts/state/v1/status_grpc.pb.go create mode 100644 internal/contracts/state/v1/task.pb.go create mode 100644 internal/contracts/state/v1/task_event.pb.go create mode 100644 internal/contracts/state/v1/task_event_grpc.pb.go create mode 100644 internal/contracts/state/v1/task_grant.pb.go create mode 100644 internal/contracts/state/v1/task_grant_grpc.pb.go create mode 100644 internal/contracts/state/v1/task_grpc.pb.go create mode 100644 internal/contracts/state/v1/task_log.pb.go create mode 100644 internal/contracts/state/v1/task_log_grpc.pb.go create mode 100644 internal/contracts/state/v1/types.pb.go create mode 100644 proto/state/v1/access.proto create mode 100644 proto/state/v1/account.proto create mode 100644 proto/state/v1/alert.proto create mode 100644 proto/state/v1/binding.proto create mode 100644 proto/state/v1/capture.proto create mode 100644 proto/state/v1/dispatch.proto create mode 100644 proto/state/v1/event_type.proto create mode 100644 proto/state/v1/execution.proto create mode 100644 proto/state/v1/harness_secret.proto create mode 100644 proto/state/v1/identity.proto create mode 100644 proto/state/v1/mapping.proto create mode 100644 proto/state/v1/org.proto create mode 100644 proto/state/v1/package.proto create mode 100644 proto/state/v1/review.proto create mode 100644 proto/state/v1/source.proto delete mode 100644 proto/state/v1/state.proto create mode 100644 proto/state/v1/stats.proto create mode 100644 proto/state/v1/status.proto create mode 100644 proto/state/v1/task.proto create mode 100644 proto/state/v1/task_event.proto create mode 100644 proto/state/v1/task_grant.proto create mode 100644 proto/state/v1/task_log.proto create mode 100644 proto/state/v1/types.proto diff --git a/internal/app/controlplane/definitions.go b/internal/app/controlplane/definitions.go index 8901629dc..28fbc6d58 100644 --- a/internal/app/controlplane/definitions.go +++ b/internal/app/controlplane/definitions.go @@ -15,11 +15,10 @@ func builtinDefinitions(steps workflow.StepRegistry, settings map[string]any) [] } func domainManagedDescriptors() []*pb.ResourceDescriptor { - const stateService = "state.v1.StateStoreService" return []*pb.ResourceDescriptor{ - {Kind: "identities", Title: "Identities", ApplyMode: "domain-managed", QueryService: stateService + "/ListIdentities,GetIdentity", CommandService: stateService + "/CreateIdentity,RenameIdentity,SuspendIdentity,ReactivateIdentity,RetireIdentity"}, - {Kind: "capture-events", Title: "Captured events", ApplyMode: "domain-managed", QueryService: stateService + "/StreamCaptures", CommandService: stateService + "/InsertCapture"}, - {Kind: "capture-mappings", Title: "Capture mappings", ApplyMode: "domain-managed", QueryService: stateService + "/ListMappings", CommandService: stateService + "/InsertMapping,UpdateMapping,DeleteMapping"}, - {Kind: "capture-bindings", Title: "Capture bindings", ApplyMode: "domain-managed", QueryService: stateService + "/ListBindings", CommandService: stateService + "/InsertBinding,UpdateBinding,DeleteBinding"}, + {Kind: "identities", Title: "Identities", ApplyMode: "domain-managed", QueryService: "state.v1.IdentityService/ListIdentities,GetIdentity", CommandService: "state.v1.IdentityService/CreateIdentity,RenameIdentity,SuspendIdentity,ReactivateIdentity,RetireIdentity"}, + {Kind: "capture-events", Title: "Captured events", ApplyMode: "domain-managed", QueryService: "state.v1.CaptureService/StreamCaptures", CommandService: "state.v1.CaptureService/InsertCapture"}, + {Kind: "capture-mappings", Title: "Capture mappings", ApplyMode: "domain-managed", QueryService: "state.v1.MappingService/ListMappings", CommandService: "state.v1.MappingService/InsertMapping,UpdateMapping,DeleteMapping"}, + {Kind: "capture-bindings", Title: "Capture bindings", ApplyMode: "domain-managed", QueryService: "state.v1.BindingService/ListBindings", CommandService: "state.v1.BindingService/InsertBinding,UpdateBinding,DeleteBinding"}, } } diff --git a/internal/contracts/state/v1/access.pb.go b/internal/contracts/state/v1/access.pb.go new file mode 100644 index 000000000..6c08babfc --- /dev/null +++ b/internal/contracts/state/v1/access.pb.go @@ -0,0 +1,1250 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/access.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetPrincipalRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + IdentityId string `protobuf:"bytes,1,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPrincipalRequest) Reset() { + *x = GetPrincipalRequest{} + mi := &file_state_v1_access_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPrincipalRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPrincipalRequest) ProtoMessage() {} + +func (x *GetPrincipalRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPrincipalRequest.ProtoReflect.Descriptor instead. +func (*GetPrincipalRequest) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{0} +} + +func (x *GetPrincipalRequest) GetIdentityId() string { + if x != nil { + return x.IdentityId + } + return "" +} + +// PrincipalMembership mirrors org.Membership: an identity's role in an org, +// or in one workspace of it. +type PrincipalMembership struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + WorkspaceId string `protobuf:"bytes,2,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + Role string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PrincipalMembership) Reset() { + *x = PrincipalMembership{} + mi := &file_state_v1_access_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PrincipalMembership) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrincipalMembership) ProtoMessage() {} + +func (x *PrincipalMembership) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrincipalMembership.ProtoReflect.Descriptor instead. +func (*PrincipalMembership) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{1} +} + +func (x *PrincipalMembership) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *PrincipalMembership) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *PrincipalMembership) GetRole() string { + if x != nil { + return x.Role + } + return "" +} + +// PrincipalWorkspace is one workspace of the principal's org, as policies +// read it. +type PrincipalWorkspace struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + Environment string `protobuf:"bytes,2,opt,name=environment,proto3" json:"environment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PrincipalWorkspace) Reset() { + *x = PrincipalWorkspace{} + mi := &file_state_v1_access_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PrincipalWorkspace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrincipalWorkspace) ProtoMessage() {} + +func (x *PrincipalWorkspace) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrincipalWorkspace.ProtoReflect.Descriptor instead. +func (*PrincipalWorkspace) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{2} +} + +func (x *PrincipalWorkspace) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *PrincipalWorkspace) GetEnvironment() string { + if x != nil { + return x.Environment + } + return "" +} + +type AccessPrincipal struct { + state protoimpl.MessageState `protogen:"open.v1"` + IdentityId string `protobuf:"bytes,1,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` + OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Memberships []*PrincipalMembership `protobuf:"bytes,3,rep,name=memberships,proto3" json:"memberships,omitempty"` + // workspaces are the workspaces of org_id. + Workspaces []*PrincipalWorkspace `protobuf:"bytes,4,rep,name=workspaces,proto3" json:"workspaces,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccessPrincipal) Reset() { + *x = AccessPrincipal{} + mi := &file_state_v1_access_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccessPrincipal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessPrincipal) ProtoMessage() {} + +func (x *AccessPrincipal) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessPrincipal.ProtoReflect.Descriptor instead. +func (*AccessPrincipal) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{3} +} + +func (x *AccessPrincipal) GetIdentityId() string { + if x != nil { + return x.IdentityId + } + return "" +} + +func (x *AccessPrincipal) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *AccessPrincipal) GetMemberships() []*PrincipalMembership { + if x != nil { + return x.Memberships + } + return nil +} + +func (x *AccessPrincipal) GetWorkspaces() []*PrincipalWorkspace { + if x != nil { + return x.Workspaces + } + return nil +} + +type GetPrincipalResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Principal *AccessPrincipal `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPrincipalResponse) Reset() { + *x = GetPrincipalResponse{} + mi := &file_state_v1_access_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPrincipalResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPrincipalResponse) ProtoMessage() {} + +func (x *GetPrincipalResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPrincipalResponse.ProtoReflect.Descriptor instead. +func (*GetPrincipalResponse) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{4} +} + +func (x *GetPrincipalResponse) GetPrincipal() *AccessPrincipal { + if x != nil { + return x.Principal + } + return nil +} + +// AccessPolicy mirrors internal/domain/access.Policy: one Cedar policy +// document and the level-scope tuple that places it in the chain. +type AccessPolicy struct { + state protoimpl.MessageState `protogen:"open.v1"` + PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + Level string `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty"` + OrgId string `protobuf:"bytes,3,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + WorkspaceId string `protobuf:"bytes,4,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + ObjectKind string `protobuf:"bytes,5,opt,name=object_kind,json=objectKind,proto3" json:"object_kind,omitempty"` + ObjectId string `protobuf:"bytes,6,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"` + Text string `protobuf:"bytes,7,opt,name=text,proto3" json:"text,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccessPolicy) Reset() { + *x = AccessPolicy{} + mi := &file_state_v1_access_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccessPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessPolicy) ProtoMessage() {} + +func (x *AccessPolicy) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessPolicy.ProtoReflect.Descriptor instead. +func (*AccessPolicy) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{5} +} + +func (x *AccessPolicy) GetPolicyId() string { + if x != nil { + return x.PolicyId + } + return "" +} + +func (x *AccessPolicy) GetLevel() string { + if x != nil { + return x.Level + } + return "" +} + +func (x *AccessPolicy) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *AccessPolicy) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *AccessPolicy) GetObjectKind() string { + if x != nil { + return x.ObjectKind + } + return "" +} + +func (x *AccessPolicy) GetObjectId() string { + if x != nil { + return x.ObjectId + } + return "" +} + +func (x *AccessPolicy) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +type ListPoliciesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPoliciesRequest) Reset() { + *x = ListPoliciesRequest{} + mi := &file_state_v1_access_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPoliciesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPoliciesRequest) ProtoMessage() {} + +func (x *ListPoliciesRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPoliciesRequest.ProtoReflect.Descriptor instead. +func (*ListPoliciesRequest) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{6} +} + +type ListPoliciesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Policies []*AccessPolicy `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPoliciesResponse) Reset() { + *x = ListPoliciesResponse{} + mi := &file_state_v1_access_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPoliciesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPoliciesResponse) ProtoMessage() {} + +func (x *ListPoliciesResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPoliciesResponse.ProtoReflect.Descriptor instead. +func (*ListPoliciesResponse) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{7} +} + +func (x *ListPoliciesResponse) GetPolicies() []*AccessPolicy { + if x != nil { + return x.Policies + } + return nil +} + +type GetPoliciesVersionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPoliciesVersionRequest) Reset() { + *x = GetPoliciesVersionRequest{} + mi := &file_state_v1_access_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPoliciesVersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPoliciesVersionRequest) ProtoMessage() {} + +func (x *GetPoliciesVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPoliciesVersionRequest.ProtoReflect.Descriptor instead. +func (*GetPoliciesVersionRequest) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{8} +} + +type GetPoliciesVersionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPoliciesVersionResponse) Reset() { + *x = GetPoliciesVersionResponse{} + mi := &file_state_v1_access_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPoliciesVersionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPoliciesVersionResponse) ProtoMessage() {} + +func (x *GetPoliciesVersionResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPoliciesVersionResponse.ProtoReflect.Descriptor instead. +func (*GetPoliciesVersionResponse) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{9} +} + +func (x *GetPoliciesVersionResponse) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +type PutPolicyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Policy *AccessPolicy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PutPolicyRequest) Reset() { + *x = PutPolicyRequest{} + mi := &file_state_v1_access_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PutPolicyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutPolicyRequest) ProtoMessage() {} + +func (x *PutPolicyRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutPolicyRequest.ProtoReflect.Descriptor instead. +func (*PutPolicyRequest) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{10} +} + +func (x *PutPolicyRequest) GetPolicy() *AccessPolicy { + if x != nil { + return x.Policy + } + return nil +} + +type PutPolicyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PutPolicyResponse) Reset() { + *x = PutPolicyResponse{} + mi := &file_state_v1_access_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PutPolicyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutPolicyResponse) ProtoMessage() {} + +func (x *PutPolicyResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutPolicyResponse.ProtoReflect.Descriptor instead. +func (*PutPolicyResponse) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{11} +} + +func (x *PutPolicyResponse) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +type DeletePolicyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Policy *AccessPolicy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeletePolicyRequest) Reset() { + *x = DeletePolicyRequest{} + mi := &file_state_v1_access_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeletePolicyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePolicyRequest) ProtoMessage() {} + +func (x *DeletePolicyRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePolicyRequest.ProtoReflect.Descriptor instead. +func (*DeletePolicyRequest) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{12} +} + +func (x *DeletePolicyRequest) GetPolicy() *AccessPolicy { + if x != nil { + return x.Policy + } + return nil +} + +type DeletePolicyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeletePolicyResponse) Reset() { + *x = DeletePolicyResponse{} + mi := &file_state_v1_access_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeletePolicyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePolicyResponse) ProtoMessage() {} + +func (x *DeletePolicyResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePolicyResponse.ProtoReflect.Descriptor instead. +func (*DeletePolicyResponse) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{13} +} + +type EnsureShippedOrgPoliciesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnsureShippedOrgPoliciesRequest) Reset() { + *x = EnsureShippedOrgPoliciesRequest{} + mi := &file_state_v1_access_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnsureShippedOrgPoliciesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnsureShippedOrgPoliciesRequest) ProtoMessage() {} + +func (x *EnsureShippedOrgPoliciesRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnsureShippedOrgPoliciesRequest.ProtoReflect.Descriptor instead. +func (*EnsureShippedOrgPoliciesRequest) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{14} +} + +func (x *EnsureShippedOrgPoliciesRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +type EnsureShippedOrgPoliciesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnsureShippedOrgPoliciesResponse) Reset() { + *x = EnsureShippedOrgPoliciesResponse{} + mi := &file_state_v1_access_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnsureShippedOrgPoliciesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnsureShippedOrgPoliciesResponse) ProtoMessage() {} + +func (x *EnsureShippedOrgPoliciesResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnsureShippedOrgPoliciesResponse.ProtoReflect.Descriptor instead. +func (*EnsureShippedOrgPoliciesResponse) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{15} +} + +// AccessDenial mirrors internal/domain/access.Denial: one refusal with the +// level that decided it and the deciding policies. The store coalesces +// identical denials within a minute into one row with a count. +type AccessDenial struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Principal string `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"` + Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` + ResourceKind string `protobuf:"bytes,4,opt,name=resource_kind,json=resourceKind,proto3" json:"resource_kind,omitempty"` + ResourceId string `protobuf:"bytes,5,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + Level string `protobuf:"bytes,6,opt,name=level,proto3" json:"level,omitempty"` + Policies []string `protobuf:"bytes,7,rep,name=policies,proto3" json:"policies,omitempty"` + Count int64 `protobuf:"varint,8,opt,name=count,proto3" json:"count,omitempty"` + At *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=at,proto3" json:"at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccessDenial) Reset() { + *x = AccessDenial{} + mi := &file_state_v1_access_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccessDenial) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessDenial) ProtoMessage() {} + +func (x *AccessDenial) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessDenial.ProtoReflect.Descriptor instead. +func (*AccessDenial) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{16} +} + +func (x *AccessDenial) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *AccessDenial) GetPrincipal() string { + if x != nil { + return x.Principal + } + return "" +} + +func (x *AccessDenial) GetAction() string { + if x != nil { + return x.Action + } + return "" +} + +func (x *AccessDenial) GetResourceKind() string { + if x != nil { + return x.ResourceKind + } + return "" +} + +func (x *AccessDenial) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +func (x *AccessDenial) GetLevel() string { + if x != nil { + return x.Level + } + return "" +} + +func (x *AccessDenial) GetPolicies() []string { + if x != nil { + return x.Policies + } + return nil +} + +func (x *AccessDenial) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *AccessDenial) GetAt() *timestamppb.Timestamp { + if x != nil { + return x.At + } + return nil +} + +type RecordDenialRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Denial *AccessDenial `protobuf:"bytes,1,opt,name=denial,proto3" json:"denial,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordDenialRequest) Reset() { + *x = RecordDenialRequest{} + mi := &file_state_v1_access_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordDenialRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordDenialRequest) ProtoMessage() {} + +func (x *RecordDenialRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordDenialRequest.ProtoReflect.Descriptor instead. +func (*RecordDenialRequest) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{17} +} + +func (x *RecordDenialRequest) GetDenial() *AccessDenial { + if x != nil { + return x.Denial + } + return nil +} + +type RecordDenialResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordDenialResponse) Reset() { + *x = RecordDenialResponse{} + mi := &file_state_v1_access_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordDenialResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordDenialResponse) ProtoMessage() {} + +func (x *RecordDenialResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordDenialResponse.ProtoReflect.Descriptor instead. +func (*RecordDenialResponse) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{18} +} + +type ListDenialsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListDenialsRequest) Reset() { + *x = ListDenialsRequest{} + mi := &file_state_v1_access_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListDenialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDenialsRequest) ProtoMessage() {} + +func (x *ListDenialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDenialsRequest.ProtoReflect.Descriptor instead. +func (*ListDenialsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{19} +} + +func (x *ListDenialsRequest) GetLimit() int32 { + if x != nil { + return x.Limit + } + return 0 +} + +type ListDenialsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Denials []*AccessDenial `protobuf:"bytes,1,rep,name=denials,proto3" json:"denials,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListDenialsResponse) Reset() { + *x = ListDenialsResponse{} + mi := &file_state_v1_access_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListDenialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDenialsResponse) ProtoMessage() {} + +func (x *ListDenialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_access_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDenialsResponse.ProtoReflect.Descriptor instead. +func (*ListDenialsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_access_proto_rawDescGZIP(), []int{20} +} + +func (x *ListDenialsResponse) GetDenials() []*AccessDenial { + if x != nil { + return x.Denials + } + return nil +} + +var File_state_v1_access_proto protoreflect.FileDescriptor + +const file_state_v1_access_proto_rawDesc = "" + + "\n" + + "\x15state/v1/access.proto\x12\bstate.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"6\n" + + "\x13GetPrincipalRequest\x12\x1f\n" + + "\videntity_id\x18\x01 \x01(\tR\n" + + "identityId\"c\n" + + "\x13PrincipalMembership\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12!\n" + + "\fworkspace_id\x18\x02 \x01(\tR\vworkspaceId\x12\x12\n" + + "\x04role\x18\x03 \x01(\tR\x04role\"Y\n" + + "\x12PrincipalWorkspace\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12 \n" + + "\venvironment\x18\x02 \x01(\tR\venvironment\"\xc8\x01\n" + + "\x0fAccessPrincipal\x12\x1f\n" + + "\videntity_id\x18\x01 \x01(\tR\n" + + "identityId\x12\x15\n" + + "\x06org_id\x18\x02 \x01(\tR\x05orgId\x12?\n" + + "\vmemberships\x18\x03 \x03(\v2\x1d.state.v1.PrincipalMembershipR\vmemberships\x12<\n" + + "\n" + + "workspaces\x18\x04 \x03(\v2\x1c.state.v1.PrincipalWorkspaceR\n" + + "workspaces\"O\n" + + "\x14GetPrincipalResponse\x127\n" + + "\tprincipal\x18\x01 \x01(\v2\x19.state.v1.AccessPrincipalR\tprincipal\"\xcd\x01\n" + + "\fAccessPolicy\x12\x1b\n" + + "\tpolicy_id\x18\x01 \x01(\tR\bpolicyId\x12\x14\n" + + "\x05level\x18\x02 \x01(\tR\x05level\x12\x15\n" + + "\x06org_id\x18\x03 \x01(\tR\x05orgId\x12!\n" + + "\fworkspace_id\x18\x04 \x01(\tR\vworkspaceId\x12\x1f\n" + + "\vobject_kind\x18\x05 \x01(\tR\n" + + "objectKind\x12\x1b\n" + + "\tobject_id\x18\x06 \x01(\tR\bobjectId\x12\x12\n" + + "\x04text\x18\a \x01(\tR\x04text\"\x15\n" + + "\x13ListPoliciesRequest\"J\n" + + "\x14ListPoliciesResponse\x122\n" + + "\bpolicies\x18\x01 \x03(\v2\x16.state.v1.AccessPolicyR\bpolicies\"\x1b\n" + + "\x19GetPoliciesVersionRequest\"6\n" + + "\x1aGetPoliciesVersionResponse\x12\x18\n" + + "\aversion\x18\x01 \x01(\x03R\aversion\"B\n" + + "\x10PutPolicyRequest\x12.\n" + + "\x06policy\x18\x01 \x01(\v2\x16.state.v1.AccessPolicyR\x06policy\"-\n" + + "\x11PutPolicyResponse\x12\x18\n" + + "\aversion\x18\x01 \x01(\x03R\aversion\"E\n" + + "\x13DeletePolicyRequest\x12.\n" + + "\x06policy\x18\x01 \x01(\v2\x16.state.v1.AccessPolicyR\x06policy\"\x16\n" + + "\x14DeletePolicyResponse\"8\n" + + "\x1fEnsureShippedOrgPoliciesRequest\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\"\"\n" + + " EnsureShippedOrgPoliciesResponse\"\x95\x02\n" + + "\fAccessDenial\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x1c\n" + + "\tprincipal\x18\x02 \x01(\tR\tprincipal\x12\x16\n" + + "\x06action\x18\x03 \x01(\tR\x06action\x12#\n" + + "\rresource_kind\x18\x04 \x01(\tR\fresourceKind\x12\x1f\n" + + "\vresource_id\x18\x05 \x01(\tR\n" + + "resourceId\x12\x14\n" + + "\x05level\x18\x06 \x01(\tR\x05level\x12\x1a\n" + + "\bpolicies\x18\a \x03(\tR\bpolicies\x12\x14\n" + + "\x05count\x18\b \x01(\x03R\x05count\x12*\n" + + "\x02at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\x02at\"E\n" + + "\x13RecordDenialRequest\x12.\n" + + "\x06denial\x18\x01 \x01(\v2\x16.state.v1.AccessDenialR\x06denial\"\x16\n" + + "\x14RecordDenialResponse\"8\n" + + "\x12ListDenialsRequest\x12\x14\n" + + "\x05limit\x18\x02 \x01(\x05R\x05limitJ\x04\b\x01\x10\x02R\x06org_id\"G\n" + + "\x13ListDenialsResponse\x120\n" + + "\adenials\x18\x01 \x03(\v2\x16.state.v1.AccessDenialR\adenials2\xb1\x05\n" + + "\rAccessService\x12M\n" + + "\fGetPrincipal\x12\x1d.state.v1.GetPrincipalRequest\x1a\x1e.state.v1.GetPrincipalResponse\x12M\n" + + "\fListPolicies\x12\x1d.state.v1.ListPoliciesRequest\x1a\x1e.state.v1.ListPoliciesResponse\x12_\n" + + "\x12GetPoliciesVersion\x12#.state.v1.GetPoliciesVersionRequest\x1a$.state.v1.GetPoliciesVersionResponse\x12D\n" + + "\tPutPolicy\x12\x1a.state.v1.PutPolicyRequest\x1a\x1b.state.v1.PutPolicyResponse\x12M\n" + + "\fDeletePolicy\x12\x1d.state.v1.DeletePolicyRequest\x1a\x1e.state.v1.DeletePolicyResponse\x12q\n" + + "\x18EnsureShippedOrgPolicies\x12).state.v1.EnsureShippedOrgPoliciesRequest\x1a*.state.v1.EnsureShippedOrgPoliciesResponse\x12M\n" + + "\fRecordDenial\x12\x1d.state.v1.RecordDenialRequest\x1a\x1e.state.v1.RecordDenialResponse\x12J\n" + + "\vListDenials\x12\x1c.state.v1.ListDenialsRequest\x1a\x1d.state.v1.ListDenialsResponseB\xa5\x01\n" + + "\fcom.state.v1B\vAccessProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_access_proto_rawDescOnce sync.Once + file_state_v1_access_proto_rawDescData []byte +) + +func file_state_v1_access_proto_rawDescGZIP() []byte { + file_state_v1_access_proto_rawDescOnce.Do(func() { + file_state_v1_access_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_access_proto_rawDesc), len(file_state_v1_access_proto_rawDesc))) + }) + return file_state_v1_access_proto_rawDescData +} + +var file_state_v1_access_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_state_v1_access_proto_goTypes = []any{ + (*GetPrincipalRequest)(nil), // 0: state.v1.GetPrincipalRequest + (*PrincipalMembership)(nil), // 1: state.v1.PrincipalMembership + (*PrincipalWorkspace)(nil), // 2: state.v1.PrincipalWorkspace + (*AccessPrincipal)(nil), // 3: state.v1.AccessPrincipal + (*GetPrincipalResponse)(nil), // 4: state.v1.GetPrincipalResponse + (*AccessPolicy)(nil), // 5: state.v1.AccessPolicy + (*ListPoliciesRequest)(nil), // 6: state.v1.ListPoliciesRequest + (*ListPoliciesResponse)(nil), // 7: state.v1.ListPoliciesResponse + (*GetPoliciesVersionRequest)(nil), // 8: state.v1.GetPoliciesVersionRequest + (*GetPoliciesVersionResponse)(nil), // 9: state.v1.GetPoliciesVersionResponse + (*PutPolicyRequest)(nil), // 10: state.v1.PutPolicyRequest + (*PutPolicyResponse)(nil), // 11: state.v1.PutPolicyResponse + (*DeletePolicyRequest)(nil), // 12: state.v1.DeletePolicyRequest + (*DeletePolicyResponse)(nil), // 13: state.v1.DeletePolicyResponse + (*EnsureShippedOrgPoliciesRequest)(nil), // 14: state.v1.EnsureShippedOrgPoliciesRequest + (*EnsureShippedOrgPoliciesResponse)(nil), // 15: state.v1.EnsureShippedOrgPoliciesResponse + (*AccessDenial)(nil), // 16: state.v1.AccessDenial + (*RecordDenialRequest)(nil), // 17: state.v1.RecordDenialRequest + (*RecordDenialResponse)(nil), // 18: state.v1.RecordDenialResponse + (*ListDenialsRequest)(nil), // 19: state.v1.ListDenialsRequest + (*ListDenialsResponse)(nil), // 20: state.v1.ListDenialsResponse + (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp +} +var file_state_v1_access_proto_depIdxs = []int32{ + 1, // 0: state.v1.AccessPrincipal.memberships:type_name -> state.v1.PrincipalMembership + 2, // 1: state.v1.AccessPrincipal.workspaces:type_name -> state.v1.PrincipalWorkspace + 3, // 2: state.v1.GetPrincipalResponse.principal:type_name -> state.v1.AccessPrincipal + 5, // 3: state.v1.ListPoliciesResponse.policies:type_name -> state.v1.AccessPolicy + 5, // 4: state.v1.PutPolicyRequest.policy:type_name -> state.v1.AccessPolicy + 5, // 5: state.v1.DeletePolicyRequest.policy:type_name -> state.v1.AccessPolicy + 21, // 6: state.v1.AccessDenial.at:type_name -> google.protobuf.Timestamp + 16, // 7: state.v1.RecordDenialRequest.denial:type_name -> state.v1.AccessDenial + 16, // 8: state.v1.ListDenialsResponse.denials:type_name -> state.v1.AccessDenial + 0, // 9: state.v1.AccessService.GetPrincipal:input_type -> state.v1.GetPrincipalRequest + 6, // 10: state.v1.AccessService.ListPolicies:input_type -> state.v1.ListPoliciesRequest + 8, // 11: state.v1.AccessService.GetPoliciesVersion:input_type -> state.v1.GetPoliciesVersionRequest + 10, // 12: state.v1.AccessService.PutPolicy:input_type -> state.v1.PutPolicyRequest + 12, // 13: state.v1.AccessService.DeletePolicy:input_type -> state.v1.DeletePolicyRequest + 14, // 14: state.v1.AccessService.EnsureShippedOrgPolicies:input_type -> state.v1.EnsureShippedOrgPoliciesRequest + 17, // 15: state.v1.AccessService.RecordDenial:input_type -> state.v1.RecordDenialRequest + 19, // 16: state.v1.AccessService.ListDenials:input_type -> state.v1.ListDenialsRequest + 4, // 17: state.v1.AccessService.GetPrincipal:output_type -> state.v1.GetPrincipalResponse + 7, // 18: state.v1.AccessService.ListPolicies:output_type -> state.v1.ListPoliciesResponse + 9, // 19: state.v1.AccessService.GetPoliciesVersion:output_type -> state.v1.GetPoliciesVersionResponse + 11, // 20: state.v1.AccessService.PutPolicy:output_type -> state.v1.PutPolicyResponse + 13, // 21: state.v1.AccessService.DeletePolicy:output_type -> state.v1.DeletePolicyResponse + 15, // 22: state.v1.AccessService.EnsureShippedOrgPolicies:output_type -> state.v1.EnsureShippedOrgPoliciesResponse + 18, // 23: state.v1.AccessService.RecordDenial:output_type -> state.v1.RecordDenialResponse + 20, // 24: state.v1.AccessService.ListDenials:output_type -> state.v1.ListDenialsResponse + 17, // [17:25] is the sub-list for method output_type + 9, // [9:17] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_state_v1_access_proto_init() } +func file_state_v1_access_proto_init() { + if File_state_v1_access_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_access_proto_rawDesc), len(file_state_v1_access_proto_rawDesc)), + NumEnums: 0, + NumMessages: 21, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_access_proto_goTypes, + DependencyIndexes: file_state_v1_access_proto_depIdxs, + MessageInfos: file_state_v1_access_proto_msgTypes, + }.Build() + File_state_v1_access_proto = out.File + file_state_v1_access_proto_goTypes = nil + file_state_v1_access_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/access_grpc.pb.go b/internal/contracts/state/v1/access_grpc.pb.go new file mode 100644 index 000000000..c1ebd9f88 --- /dev/null +++ b/internal/contracts/state/v1/access_grpc.pb.go @@ -0,0 +1,407 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/access.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 ( + AccessService_GetPrincipal_FullMethodName = "/state.v1.AccessService/GetPrincipal" + AccessService_ListPolicies_FullMethodName = "/state.v1.AccessService/ListPolicies" + AccessService_GetPoliciesVersion_FullMethodName = "/state.v1.AccessService/GetPoliciesVersion" + AccessService_PutPolicy_FullMethodName = "/state.v1.AccessService/PutPolicy" + AccessService_DeletePolicy_FullMethodName = "/state.v1.AccessService/DeletePolicy" + AccessService_EnsureShippedOrgPolicies_FullMethodName = "/state.v1.AccessService/EnsureShippedOrgPolicies" + AccessService_RecordDenial_FullMethodName = "/state.v1.AccessService/RecordDenial" + AccessService_ListDenials_FullMethodName = "/state.v1.AccessService/ListDenials" +) + +// AccessServiceClient is the client API for AccessService 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 stored policy chain and its denial records +// (docs/prds/orgs-and-access.md). ListPolicies is the engine's snapshot; +// the writes are administrative. RecordDenial is the dashboard's and +// dispatch's write path; ListDenials is the operator surface. +type AccessServiceClient interface { + // The principal assembly the Authorizer evaluates: an identity, the org + // it serves, and its memberships (internal/domain/access). + GetPrincipal(ctx context.Context, in *GetPrincipalRequest, opts ...grpc.CallOption) (*GetPrincipalResponse, error) + ListPolicies(ctx context.Context, in *ListPoliciesRequest, opts ...grpc.CallOption) (*ListPoliciesResponse, error) + // GetPoliciesVersion is the instance-wide policy version an authorizer reads + // before each decision to know whether the chain it holds is current. A + // caller must read it before ListPolicies, never after. + GetPoliciesVersion(ctx context.Context, in *GetPoliciesVersionRequest, opts ...grpc.CallOption) (*GetPoliciesVersionResponse, error) + PutPolicy(ctx context.Context, in *PutPolicyRequest, opts ...grpc.CallOption) (*PutPolicyResponse, error) + DeletePolicy(ctx context.Context, in *DeletePolicyRequest, opts ...grpc.CallOption) (*DeletePolicyResponse, error) + EnsureShippedOrgPolicies(ctx context.Context, in *EnsureShippedOrgPoliciesRequest, opts ...grpc.CallOption) (*EnsureShippedOrgPoliciesResponse, error) + RecordDenial(ctx context.Context, in *RecordDenialRequest, opts ...grpc.CallOption) (*RecordDenialResponse, error) + ListDenials(ctx context.Context, in *ListDenialsRequest, opts ...grpc.CallOption) (*ListDenialsResponse, error) +} + +type accessServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAccessServiceClient(cc grpc.ClientConnInterface) AccessServiceClient { + return &accessServiceClient{cc} +} + +func (c *accessServiceClient) GetPrincipal(ctx context.Context, in *GetPrincipalRequest, opts ...grpc.CallOption) (*GetPrincipalResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPrincipalResponse) + err := c.cc.Invoke(ctx, AccessService_GetPrincipal_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accessServiceClient) ListPolicies(ctx context.Context, in *ListPoliciesRequest, opts ...grpc.CallOption) (*ListPoliciesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPoliciesResponse) + err := c.cc.Invoke(ctx, AccessService_ListPolicies_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accessServiceClient) GetPoliciesVersion(ctx context.Context, in *GetPoliciesVersionRequest, opts ...grpc.CallOption) (*GetPoliciesVersionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPoliciesVersionResponse) + err := c.cc.Invoke(ctx, AccessService_GetPoliciesVersion_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accessServiceClient) PutPolicy(ctx context.Context, in *PutPolicyRequest, opts ...grpc.CallOption) (*PutPolicyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PutPolicyResponse) + err := c.cc.Invoke(ctx, AccessService_PutPolicy_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accessServiceClient) DeletePolicy(ctx context.Context, in *DeletePolicyRequest, opts ...grpc.CallOption) (*DeletePolicyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeletePolicyResponse) + err := c.cc.Invoke(ctx, AccessService_DeletePolicy_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accessServiceClient) EnsureShippedOrgPolicies(ctx context.Context, in *EnsureShippedOrgPoliciesRequest, opts ...grpc.CallOption) (*EnsureShippedOrgPoliciesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(EnsureShippedOrgPoliciesResponse) + err := c.cc.Invoke(ctx, AccessService_EnsureShippedOrgPolicies_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accessServiceClient) RecordDenial(ctx context.Context, in *RecordDenialRequest, opts ...grpc.CallOption) (*RecordDenialResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RecordDenialResponse) + err := c.cc.Invoke(ctx, AccessService_RecordDenial_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accessServiceClient) ListDenials(ctx context.Context, in *ListDenialsRequest, opts ...grpc.CallOption) (*ListDenialsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListDenialsResponse) + err := c.cc.Invoke(ctx, AccessService_ListDenials_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AccessServiceServer is the server API for AccessService service. +// All implementations must embed UnimplementedAccessServiceServer +// for forward compatibility. +// +// The stored policy chain and its denial records +// (docs/prds/orgs-and-access.md). ListPolicies is the engine's snapshot; +// the writes are administrative. RecordDenial is the dashboard's and +// dispatch's write path; ListDenials is the operator surface. +type AccessServiceServer interface { + // The principal assembly the Authorizer evaluates: an identity, the org + // it serves, and its memberships (internal/domain/access). + GetPrincipal(context.Context, *GetPrincipalRequest) (*GetPrincipalResponse, error) + ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error) + // GetPoliciesVersion is the instance-wide policy version an authorizer reads + // before each decision to know whether the chain it holds is current. A + // caller must read it before ListPolicies, never after. + GetPoliciesVersion(context.Context, *GetPoliciesVersionRequest) (*GetPoliciesVersionResponse, error) + PutPolicy(context.Context, *PutPolicyRequest) (*PutPolicyResponse, error) + DeletePolicy(context.Context, *DeletePolicyRequest) (*DeletePolicyResponse, error) + EnsureShippedOrgPolicies(context.Context, *EnsureShippedOrgPoliciesRequest) (*EnsureShippedOrgPoliciesResponse, error) + RecordDenial(context.Context, *RecordDenialRequest) (*RecordDenialResponse, error) + ListDenials(context.Context, *ListDenialsRequest) (*ListDenialsResponse, error) + mustEmbedUnimplementedAccessServiceServer() +} + +// UnimplementedAccessServiceServer 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 UnimplementedAccessServiceServer struct{} + +func (UnimplementedAccessServiceServer) GetPrincipal(context.Context, *GetPrincipalRequest) (*GetPrincipalResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetPrincipal not implemented") +} +func (UnimplementedAccessServiceServer) ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListPolicies not implemented") +} +func (UnimplementedAccessServiceServer) GetPoliciesVersion(context.Context, *GetPoliciesVersionRequest) (*GetPoliciesVersionResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetPoliciesVersion not implemented") +} +func (UnimplementedAccessServiceServer) PutPolicy(context.Context, *PutPolicyRequest) (*PutPolicyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method PutPolicy not implemented") +} +func (UnimplementedAccessServiceServer) DeletePolicy(context.Context, *DeletePolicyRequest) (*DeletePolicyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeletePolicy not implemented") +} +func (UnimplementedAccessServiceServer) EnsureShippedOrgPolicies(context.Context, *EnsureShippedOrgPoliciesRequest) (*EnsureShippedOrgPoliciesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method EnsureShippedOrgPolicies not implemented") +} +func (UnimplementedAccessServiceServer) RecordDenial(context.Context, *RecordDenialRequest) (*RecordDenialResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RecordDenial not implemented") +} +func (UnimplementedAccessServiceServer) ListDenials(context.Context, *ListDenialsRequest) (*ListDenialsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListDenials not implemented") +} +func (UnimplementedAccessServiceServer) mustEmbedUnimplementedAccessServiceServer() {} +func (UnimplementedAccessServiceServer) testEmbeddedByValue() {} + +// UnsafeAccessServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AccessServiceServer will +// result in compilation errors. +type UnsafeAccessServiceServer interface { + mustEmbedUnimplementedAccessServiceServer() +} + +func RegisterAccessServiceServer(s grpc.ServiceRegistrar, srv AccessServiceServer) { + // If the following call panics, it indicates UnimplementedAccessServiceServer 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(&AccessService_ServiceDesc, srv) +} + +func _AccessService_GetPrincipal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPrincipalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessServiceServer).GetPrincipal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessService_GetPrincipal_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessServiceServer).GetPrincipal(ctx, req.(*GetPrincipalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccessService_ListPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPoliciesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessServiceServer).ListPolicies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessService_ListPolicies_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessServiceServer).ListPolicies(ctx, req.(*ListPoliciesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccessService_GetPoliciesVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPoliciesVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessServiceServer).GetPoliciesVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessService_GetPoliciesVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessServiceServer).GetPoliciesVersion(ctx, req.(*GetPoliciesVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccessService_PutPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PutPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessServiceServer).PutPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessService_PutPolicy_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessServiceServer).PutPolicy(ctx, req.(*PutPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccessService_DeletePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessServiceServer).DeletePolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessService_DeletePolicy_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessServiceServer).DeletePolicy(ctx, req.(*DeletePolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccessService_EnsureShippedOrgPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EnsureShippedOrgPoliciesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessServiceServer).EnsureShippedOrgPolicies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessService_EnsureShippedOrgPolicies_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessServiceServer).EnsureShippedOrgPolicies(ctx, req.(*EnsureShippedOrgPoliciesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccessService_RecordDenial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RecordDenialRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessServiceServer).RecordDenial(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessService_RecordDenial_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessServiceServer).RecordDenial(ctx, req.(*RecordDenialRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccessService_ListDenials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDenialsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessServiceServer).ListDenials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessService_ListDenials_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessServiceServer).ListDenials(ctx, req.(*ListDenialsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AccessService_ServiceDesc is the grpc.ServiceDesc for AccessService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AccessService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.AccessService", + HandlerType: (*AccessServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetPrincipal", + Handler: _AccessService_GetPrincipal_Handler, + }, + { + MethodName: "ListPolicies", + Handler: _AccessService_ListPolicies_Handler, + }, + { + MethodName: "GetPoliciesVersion", + Handler: _AccessService_GetPoliciesVersion_Handler, + }, + { + MethodName: "PutPolicy", + Handler: _AccessService_PutPolicy_Handler, + }, + { + MethodName: "DeletePolicy", + Handler: _AccessService_DeletePolicy_Handler, + }, + { + MethodName: "EnsureShippedOrgPolicies", + Handler: _AccessService_EnsureShippedOrgPolicies_Handler, + }, + { + MethodName: "RecordDenial", + Handler: _AccessService_RecordDenial_Handler, + }, + { + MethodName: "ListDenials", + Handler: _AccessService_ListDenials_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "state/v1/access.proto", +} diff --git a/internal/contracts/state/v1/account.pb.go b/internal/contracts/state/v1/account.pb.go new file mode 100644 index 000000000..d2cc2864f --- /dev/null +++ b/internal/contracts/state/v1/account.pb.go @@ -0,0 +1,2208 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/account.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// PersonalToken identifies a token by the SHA-256 it binds as; the token +// itself never reaches the State Store. +type PersonalToken struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PersonalToken) Reset() { + *x = PersonalToken{} + mi := &file_state_v1_account_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PersonalToken) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PersonalToken) ProtoMessage() {} + +func (x *PersonalToken) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PersonalToken.ProtoReflect.Descriptor instead. +func (*PersonalToken) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{0} +} + +func (x *PersonalToken) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PersonalToken) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +type AddPersonalTokenRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddPersonalTokenRequest) Reset() { + *x = AddPersonalTokenRequest{} + mi := &file_state_v1_account_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddPersonalTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddPersonalTokenRequest) ProtoMessage() {} + +func (x *AddPersonalTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddPersonalTokenRequest.ProtoReflect.Descriptor instead. +func (*AddPersonalTokenRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{1} +} + +func (x *AddPersonalTokenRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type AddPersonalTokenResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddPersonalTokenResponse) Reset() { + *x = AddPersonalTokenResponse{} + mi := &file_state_v1_account_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddPersonalTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddPersonalTokenResponse) ProtoMessage() {} + +func (x *AddPersonalTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddPersonalTokenResponse.ProtoReflect.Descriptor instead. +func (*AddPersonalTokenResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{2} +} + +type ListPersonalTokensRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPersonalTokensRequest) Reset() { + *x = ListPersonalTokensRequest{} + mi := &file_state_v1_account_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPersonalTokensRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPersonalTokensRequest) ProtoMessage() {} + +func (x *ListPersonalTokensRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPersonalTokensRequest.ProtoReflect.Descriptor instead. +func (*ListPersonalTokensRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{3} +} + +type ListPersonalTokensResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Tokens []*PersonalToken `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPersonalTokensResponse) Reset() { + *x = ListPersonalTokensResponse{} + mi := &file_state_v1_account_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPersonalTokensResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPersonalTokensResponse) ProtoMessage() {} + +func (x *ListPersonalTokensResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPersonalTokensResponse.ProtoReflect.Descriptor instead. +func (*ListPersonalTokensResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{4} +} + +func (x *ListPersonalTokensResponse) GetTokens() []*PersonalToken { + if x != nil { + return x.Tokens + } + return nil +} + +type RevokePersonalTokenRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RevokePersonalTokenRequest) Reset() { + *x = RevokePersonalTokenRequest{} + mi := &file_state_v1_account_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RevokePersonalTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokePersonalTokenRequest) ProtoMessage() {} + +func (x *RevokePersonalTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevokePersonalTokenRequest.ProtoReflect.Descriptor instead. +func (*RevokePersonalTokenRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{5} +} + +func (x *RevokePersonalTokenRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type RevokePersonalTokenResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RevokePersonalTokenResponse) Reset() { + *x = RevokePersonalTokenResponse{} + mi := &file_state_v1_account_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RevokePersonalTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokePersonalTokenResponse) ProtoMessage() {} + +func (x *RevokePersonalTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevokePersonalTokenResponse.ProtoReflect.Descriptor instead. +func (*RevokePersonalTokenResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{6} +} + +type AccountSetupRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountSetupRequest) Reset() { + *x = AccountSetupRequest{} + mi := &file_state_v1_account_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountSetupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountSetupRequest) ProtoMessage() {} + +func (x *AccountSetupRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountSetupRequest.ProtoReflect.Descriptor instead. +func (*AccountSetupRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{7} +} + +type AccountSetupResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Required bool `protobuf:"varint,1,opt,name=required,proto3" json:"required,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountSetupResponse) Reset() { + *x = AccountSetupResponse{} + mi := &file_state_v1_account_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountSetupResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountSetupResponse) ProtoMessage() {} + +func (x *AccountSetupResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountSetupResponse.ProtoReflect.Descriptor instead. +func (*AccountSetupResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{8} +} + +func (x *AccountSetupResponse) GetRequired() bool { + if x != nil { + return x.Required + } + return false +} + +type RegisterAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` + Role string `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"` + Bootstrap bool `protobuf:"varint,5,opt,name=bootstrap,proto3" json:"bootstrap,omitempty"` + OrganisationName string `protobuf:"bytes,6,opt,name=organisation_name,json=organisationName,proto3" json:"organisation_name,omitempty"` + WorkspaceName string `protobuf:"bytes,7,opt,name=workspace_name,json=workspaceName,proto3" json:"workspace_name,omitempty"` + PublicUrl string `protobuf:"bytes,8,opt,name=public_url,json=publicUrl,proto3" json:"public_url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegisterAccountRequest) Reset() { + *x = RegisterAccountRequest{} + mi := &file_state_v1_account_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegisterAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterAccountRequest) ProtoMessage() {} + +func (x *RegisterAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterAccountRequest.ProtoReflect.Descriptor instead. +func (*RegisterAccountRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{9} +} + +func (x *RegisterAccountRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *RegisterAccountRequest) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *RegisterAccountRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *RegisterAccountRequest) GetRole() string { + if x != nil { + return x.Role + } + return "" +} + +func (x *RegisterAccountRequest) GetBootstrap() bool { + if x != nil { + return x.Bootstrap + } + return false +} + +func (x *RegisterAccountRequest) GetOrganisationName() string { + if x != nil { + return x.OrganisationName + } + return "" +} + +func (x *RegisterAccountRequest) GetWorkspaceName() string { + if x != nil { + return x.WorkspaceName + } + return "" +} + +func (x *RegisterAccountRequest) GetPublicUrl() string { + if x != nil { + return x.PublicUrl + } + return "" +} + +type RegisterAccountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegisterAccountResponse) Reset() { + *x = RegisterAccountResponse{} + mi := &file_state_v1_account_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegisterAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterAccountResponse) ProtoMessage() {} + +func (x *RegisterAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterAccountResponse.ProtoReflect.Descriptor instead. +func (*RegisterAccountResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{10} +} + +func (x *RegisterAccountResponse) GetIdentity() *Identity { + if x != nil { + return x.Identity + } + return nil +} + +type SignInAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SignInAccountRequest) Reset() { + *x = SignInAccountRequest{} + mi := &file_state_v1_account_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SignInAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignInAccountRequest) ProtoMessage() {} + +func (x *SignInAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignInAccountRequest.ProtoReflect.Descriptor instead. +func (*SignInAccountRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{11} +} + +func (x *SignInAccountRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *SignInAccountRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +type SignInAccountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SignInAccountResponse) Reset() { + *x = SignInAccountResponse{} + mi := &file_state_v1_account_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SignInAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignInAccountResponse) ProtoMessage() {} + +func (x *SignInAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignInAccountResponse.ProtoReflect.Descriptor instead. +func (*SignInAccountResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{12} +} + +func (x *SignInAccountResponse) GetIdentity() *Identity { + if x != nil { + return x.Identity + } + return nil +} + +func (x *SignInAccountResponse) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *SignInAccountResponse) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +type ResolveAccountSessionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResolveAccountSessionRequest) Reset() { + *x = ResolveAccountSessionRequest{} + mi := &file_state_v1_account_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResolveAccountSessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResolveAccountSessionRequest) ProtoMessage() {} + +func (x *ResolveAccountSessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResolveAccountSessionRequest.ProtoReflect.Descriptor instead. +func (*ResolveAccountSessionRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{13} +} + +func (x *ResolveAccountSessionRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +type ResolveAccountSessionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResolveAccountSessionResponse) Reset() { + *x = ResolveAccountSessionResponse{} + mi := &file_state_v1_account_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResolveAccountSessionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResolveAccountSessionResponse) ProtoMessage() {} + +func (x *ResolveAccountSessionResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResolveAccountSessionResponse.ProtoReflect.Descriptor instead. +func (*ResolveAccountSessionResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{14} +} + +func (x *ResolveAccountSessionResponse) GetIdentity() *Identity { + if x != nil { + return x.Identity + } + return nil +} + +type SignOutAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SignOutAccountRequest) Reset() { + *x = SignOutAccountRequest{} + mi := &file_state_v1_account_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SignOutAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignOutAccountRequest) ProtoMessage() {} + +func (x *SignOutAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignOutAccountRequest.ProtoReflect.Descriptor instead. +func (*SignOutAccountRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{15} +} + +func (x *SignOutAccountRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +type SignOutAccountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SignOutAccountResponse) Reset() { + *x = SignOutAccountResponse{} + mi := &file_state_v1_account_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SignOutAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignOutAccountResponse) ProtoMessage() {} + +func (x *SignOutAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignOutAccountResponse.ProtoReflect.Descriptor instead. +func (*SignOutAccountResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{16} +} + +type ChangeAccountPasswordRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + CurrentPassword string `protobuf:"bytes,1,opt,name=current_password,json=currentPassword,proto3" json:"current_password,omitempty"` + NewPassword string `protobuf:"bytes,2,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChangeAccountPasswordRequest) Reset() { + *x = ChangeAccountPasswordRequest{} + mi := &file_state_v1_account_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChangeAccountPasswordRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeAccountPasswordRequest) ProtoMessage() {} + +func (x *ChangeAccountPasswordRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeAccountPasswordRequest.ProtoReflect.Descriptor instead. +func (*ChangeAccountPasswordRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{17} +} + +func (x *ChangeAccountPasswordRequest) GetCurrentPassword() string { + if x != nil { + return x.CurrentPassword + } + return "" +} + +func (x *ChangeAccountPasswordRequest) GetNewPassword() string { + if x != nil { + return x.NewPassword + } + return "" +} + +type ChangeAccountPasswordResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChangeAccountPasswordResponse) Reset() { + *x = ChangeAccountPasswordResponse{} + mi := &file_state_v1_account_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChangeAccountPasswordResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeAccountPasswordResponse) ProtoMessage() {} + +func (x *ChangeAccountPasswordResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeAccountPasswordResponse.ProtoReflect.Descriptor instead. +func (*ChangeAccountPasswordResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{18} +} + +type AuthenticationSettings struct { + state protoimpl.MessageState `protogen:"open.v1"` + PublicUrl string `protobuf:"bytes,1,opt,name=public_url,json=publicUrl,proto3" json:"public_url,omitempty"` + OidcIssuer string `protobuf:"bytes,2,opt,name=oidc_issuer,json=oidcIssuer,proto3" json:"oidc_issuer,omitempty"` + OidcAudience string `protobuf:"bytes,3,opt,name=oidc_audience,json=oidcAudience,proto3" json:"oidc_audience,omitempty"` + OidcClientId string `protobuf:"bytes,4,opt,name=oidc_client_id,json=oidcClientId,proto3" json:"oidc_client_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AuthenticationSettings) Reset() { + *x = AuthenticationSettings{} + mi := &file_state_v1_account_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuthenticationSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthenticationSettings) ProtoMessage() {} + +func (x *AuthenticationSettings) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthenticationSettings.ProtoReflect.Descriptor instead. +func (*AuthenticationSettings) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{19} +} + +func (x *AuthenticationSettings) GetPublicUrl() string { + if x != nil { + return x.PublicUrl + } + return "" +} + +func (x *AuthenticationSettings) GetOidcIssuer() string { + if x != nil { + return x.OidcIssuer + } + return "" +} + +func (x *AuthenticationSettings) GetOidcAudience() string { + if x != nil { + return x.OidcAudience + } + return "" +} + +func (x *AuthenticationSettings) GetOidcClientId() string { + if x != nil { + return x.OidcClientId + } + return "" +} + +type GetAuthenticationSettingsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAuthenticationSettingsRequest) Reset() { + *x = GetAuthenticationSettingsRequest{} + mi := &file_state_v1_account_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAuthenticationSettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAuthenticationSettingsRequest) ProtoMessage() {} + +func (x *GetAuthenticationSettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAuthenticationSettingsRequest.ProtoReflect.Descriptor instead. +func (*GetAuthenticationSettingsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{20} +} + +type GetAuthenticationSettingsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Settings *AuthenticationSettings `protobuf:"bytes,1,opt,name=settings,proto3" json:"settings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAuthenticationSettingsResponse) Reset() { + *x = GetAuthenticationSettingsResponse{} + mi := &file_state_v1_account_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAuthenticationSettingsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAuthenticationSettingsResponse) ProtoMessage() {} + +func (x *GetAuthenticationSettingsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAuthenticationSettingsResponse.ProtoReflect.Descriptor instead. +func (*GetAuthenticationSettingsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{21} +} + +func (x *GetAuthenticationSettingsResponse) GetSettings() *AuthenticationSettings { + if x != nil { + return x.Settings + } + return nil +} + +type SaveAuthenticationSettingsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Settings *AuthenticationSettings `protobuf:"bytes,1,opt,name=settings,proto3" json:"settings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SaveAuthenticationSettingsRequest) Reset() { + *x = SaveAuthenticationSettingsRequest{} + mi := &file_state_v1_account_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SaveAuthenticationSettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveAuthenticationSettingsRequest) ProtoMessage() {} + +func (x *SaveAuthenticationSettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SaveAuthenticationSettingsRequest.ProtoReflect.Descriptor instead. +func (*SaveAuthenticationSettingsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{22} +} + +func (x *SaveAuthenticationSettingsRequest) GetSettings() *AuthenticationSettings { + if x != nil { + return x.Settings + } + return nil +} + +type SaveAuthenticationSettingsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SaveAuthenticationSettingsResponse) Reset() { + *x = SaveAuthenticationSettingsResponse{} + mi := &file_state_v1_account_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SaveAuthenticationSettingsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveAuthenticationSettingsResponse) ProtoMessage() {} + +func (x *SaveAuthenticationSettingsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SaveAuthenticationSettingsResponse.ProtoReflect.Descriptor instead. +func (*SaveAuthenticationSettingsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{23} +} + +type BeginPasskeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Registration bool `protobuf:"varint,1,opt,name=registration,proto3" json:"registration,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BeginPasskeyRequest) Reset() { + *x = BeginPasskeyRequest{} + mi := &file_state_v1_account_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BeginPasskeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BeginPasskeyRequest) ProtoMessage() {} + +func (x *BeginPasskeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BeginPasskeyRequest.ProtoReflect.Descriptor instead. +func (*BeginPasskeyRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{24} +} + +func (x *BeginPasskeyRequest) GetRegistration() bool { + if x != nil { + return x.Registration + } + return false +} + +type BeginPasskeyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + Options []byte `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BeginPasskeyResponse) Reset() { + *x = BeginPasskeyResponse{} + mi := &file_state_v1_account_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BeginPasskeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BeginPasskeyResponse) ProtoMessage() {} + +func (x *BeginPasskeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BeginPasskeyResponse.ProtoReflect.Descriptor instead. +func (*BeginPasskeyResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{25} +} + +func (x *BeginPasskeyResponse) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *BeginPasskeyResponse) GetOptions() []byte { + if x != nil { + return x.Options + } + return nil +} + +type FinishPasskeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + Credential []byte `protobuf:"bytes,2,opt,name=credential,proto3" json:"credential,omitempty"` + Registration bool `protobuf:"varint,3,opt,name=registration,proto3" json:"registration,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FinishPasskeyRequest) Reset() { + *x = FinishPasskeyRequest{} + mi := &file_state_v1_account_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FinishPasskeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FinishPasskeyRequest) ProtoMessage() {} + +func (x *FinishPasskeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FinishPasskeyRequest.ProtoReflect.Descriptor instead. +func (*FinishPasskeyRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{26} +} + +func (x *FinishPasskeyRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *FinishPasskeyRequest) GetCredential() []byte { + if x != nil { + return x.Credential + } + return nil +} + +func (x *FinishPasskeyRequest) GetRegistration() bool { + if x != nil { + return x.Registration + } + return false +} + +func (x *FinishPasskeyRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type FinishPasskeyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FinishPasskeyResponse) Reset() { + *x = FinishPasskeyResponse{} + mi := &file_state_v1_account_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FinishPasskeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FinishPasskeyResponse) ProtoMessage() {} + +func (x *FinishPasskeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FinishPasskeyResponse.ProtoReflect.Descriptor instead. +func (*FinishPasskeyResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{27} +} + +func (x *FinishPasskeyResponse) GetIdentity() *Identity { + if x != nil { + return x.Identity + } + return nil +} + +func (x *FinishPasskeyResponse) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *FinishPasskeyResponse) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +type Passkey struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Passkey) Reset() { + *x = Passkey{} + mi := &file_state_v1_account_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Passkey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Passkey) ProtoMessage() {} + +func (x *Passkey) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Passkey.ProtoReflect.Descriptor instead. +func (*Passkey) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{28} +} + +func (x *Passkey) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Passkey) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListPasskeysRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPasskeysRequest) Reset() { + *x = ListPasskeysRequest{} + mi := &file_state_v1_account_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPasskeysRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPasskeysRequest) ProtoMessage() {} + +func (x *ListPasskeysRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPasskeysRequest.ProtoReflect.Descriptor instead. +func (*ListPasskeysRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{29} +} + +type ListPasskeysResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Passkeys []*Passkey `protobuf:"bytes,1,rep,name=passkeys,proto3" json:"passkeys,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPasskeysResponse) Reset() { + *x = ListPasskeysResponse{} + mi := &file_state_v1_account_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPasskeysResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPasskeysResponse) ProtoMessage() {} + +func (x *ListPasskeysResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPasskeysResponse.ProtoReflect.Descriptor instead. +func (*ListPasskeysResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{30} +} + +func (x *ListPasskeysResponse) GetPasskeys() []*Passkey { + if x != nil { + return x.Passkeys + } + return nil +} + +type DeletePasskeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeletePasskeyRequest) Reset() { + *x = DeletePasskeyRequest{} + mi := &file_state_v1_account_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeletePasskeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePasskeyRequest) ProtoMessage() {} + +func (x *DeletePasskeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePasskeyRequest.ProtoReflect.Descriptor instead. +func (*DeletePasskeyRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{31} +} + +func (x *DeletePasskeyRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeletePasskeyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeletePasskeyResponse) Reset() { + *x = DeletePasskeyResponse{} + mi := &file_state_v1_account_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeletePasskeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePasskeyResponse) ProtoMessage() {} + +func (x *DeletePasskeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePasskeyResponse.ProtoReflect.Descriptor instead. +func (*DeletePasskeyResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{32} +} + +type OpenAccountSessionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OpenAccountSessionRequest) Reset() { + *x = OpenAccountSessionRequest{} + mi := &file_state_v1_account_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OpenAccountSessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenAccountSessionRequest) ProtoMessage() {} + +func (x *OpenAccountSessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenAccountSessionRequest.ProtoReflect.Descriptor instead. +func (*OpenAccountSessionRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{33} +} + +func (x *OpenAccountSessionRequest) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +type OpenAccountSessionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OpenAccountSessionResponse) Reset() { + *x = OpenAccountSessionResponse{} + mi := &file_state_v1_account_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OpenAccountSessionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenAccountSessionResponse) ProtoMessage() {} + +func (x *OpenAccountSessionResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenAccountSessionResponse.ProtoReflect.Descriptor instead. +func (*OpenAccountSessionResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{34} +} + +func (x *OpenAccountSessionResponse) GetIdentity() *Identity { + if x != nil { + return x.Identity + } + return nil +} + +func (x *OpenAccountSessionResponse) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *OpenAccountSessionResponse) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +type RequireFreshAccountSessionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RequireFreshAccountSessionRequest) Reset() { + *x = RequireFreshAccountSessionRequest{} + mi := &file_state_v1_account_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequireFreshAccountSessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequireFreshAccountSessionRequest) ProtoMessage() {} + +func (x *RequireFreshAccountSessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequireFreshAccountSessionRequest.ProtoReflect.Descriptor instead. +func (*RequireFreshAccountSessionRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{35} +} + +func (x *RequireFreshAccountSessionRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +type RequireFreshAccountSessionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RequireFreshAccountSessionResponse) Reset() { + *x = RequireFreshAccountSessionResponse{} + mi := &file_state_v1_account_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequireFreshAccountSessionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequireFreshAccountSessionResponse) ProtoMessage() {} + +func (x *RequireFreshAccountSessionResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequireFreshAccountSessionResponse.ProtoReflect.Descriptor instead. +func (*RequireFreshAccountSessionResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{36} +} + +type CreateAccountRecoveryRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateAccountRecoveryRequest) Reset() { + *x = CreateAccountRecoveryRequest{} + mi := &file_state_v1_account_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateAccountRecoveryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAccountRecoveryRequest) ProtoMessage() {} + +func (x *CreateAccountRecoveryRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAccountRecoveryRequest.ProtoReflect.Descriptor instead. +func (*CreateAccountRecoveryRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{37} +} + +type CreateAccountRecoveryResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateAccountRecoveryResponse) Reset() { + *x = CreateAccountRecoveryResponse{} + mi := &file_state_v1_account_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateAccountRecoveryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAccountRecoveryResponse) ProtoMessage() {} + +func (x *CreateAccountRecoveryResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAccountRecoveryResponse.ProtoReflect.Descriptor instead. +func (*CreateAccountRecoveryResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{38} +} + +func (x *CreateAccountRecoveryResponse) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +type RecoverAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecoverAccountRequest) Reset() { + *x = RecoverAccountRequest{} + mi := &file_state_v1_account_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecoverAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecoverAccountRequest) ProtoMessage() {} + +func (x *RecoverAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecoverAccountRequest.ProtoReflect.Descriptor instead. +func (*RecoverAccountRequest) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{39} +} + +func (x *RecoverAccountRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *RecoverAccountRequest) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *RecoverAccountRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +type RecoverAccountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecoverAccountResponse) Reset() { + *x = RecoverAccountResponse{} + mi := &file_state_v1_account_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecoverAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecoverAccountResponse) ProtoMessage() {} + +func (x *RecoverAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_account_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecoverAccountResponse.ProtoReflect.Descriptor instead. +func (*RecoverAccountResponse) Descriptor() ([]byte, []int) { + return file_state_v1_account_proto_rawDescGZIP(), []int{40} +} + +var File_state_v1_account_proto protoreflect.FileDescriptor + +const file_state_v1_account_proto_rawDesc = "" + + "\n" + + "\x16state/v1/account.proto\x12\bstate.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x14state/v1/types.proto\"Z\n" + + "\rPersonalToken\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x129\n" + + "\n" + + "created_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\")\n" + + "\x17AddPersonalTokenRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\x1a\n" + + "\x18AddPersonalTokenResponse\"\x1b\n" + + "\x19ListPersonalTokensRequest\"M\n" + + "\x1aListPersonalTokensResponse\x12/\n" + + "\x06tokens\x18\x01 \x03(\v2\x17.state.v1.PersonalTokenR\x06tokens\",\n" + + "\x1aRevokePersonalTokenRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\x1d\n" + + "\x1bRevokePersonalTokenResponse\"\x15\n" + + "\x13AccountSetupRequest\"2\n" + + "\x14AccountSetupResponse\x12\x1a\n" + + "\brequired\x18\x01 \x01(\bR\brequired\"\x92\x02\n" + + "\x16RegisterAccountRequest\x12\x14\n" + + "\x05email\x18\x01 \x01(\tR\x05email\x12!\n" + + "\fdisplay_name\x18\x02 \x01(\tR\vdisplayName\x12\x1a\n" + + "\bpassword\x18\x03 \x01(\tR\bpassword\x12\x12\n" + + "\x04role\x18\x04 \x01(\tR\x04role\x12\x1c\n" + + "\tbootstrap\x18\x05 \x01(\bR\tbootstrap\x12+\n" + + "\x11organisation_name\x18\x06 \x01(\tR\x10organisationName\x12%\n" + + "\x0eworkspace_name\x18\a \x01(\tR\rworkspaceName\x12\x1d\n" + + "\n" + + "public_url\x18\b \x01(\tR\tpublicUrl\"I\n" + + "\x17RegisterAccountResponse\x12.\n" + + "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"H\n" + + "\x14SignInAccountRequest\x12\x14\n" + + "\x05email\x18\x01 \x01(\tR\x05email\x12\x1a\n" + + "\bpassword\x18\x02 \x01(\tR\bpassword\"\x98\x01\n" + + "\x15SignInAccountResponse\x12.\n" + + "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\x12\x14\n" + + "\x05token\x18\x02 \x01(\tR\x05token\x129\n" + + "\n" + + "expires_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\"4\n" + + "\x1cResolveAccountSessionRequest\x12\x14\n" + + "\x05token\x18\x01 \x01(\tR\x05token\"O\n" + + "\x1dResolveAccountSessionResponse\x12.\n" + + "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"-\n" + + "\x15SignOutAccountRequest\x12\x14\n" + + "\x05token\x18\x01 \x01(\tR\x05token\"\x18\n" + + "\x16SignOutAccountResponse\"l\n" + + "\x1cChangeAccountPasswordRequest\x12)\n" + + "\x10current_password\x18\x01 \x01(\tR\x0fcurrentPassword\x12!\n" + + "\fnew_password\x18\x02 \x01(\tR\vnewPassword\"\x1f\n" + + "\x1dChangeAccountPasswordResponse\"\xa3\x01\n" + + "\x16AuthenticationSettings\x12\x1d\n" + + "\n" + + "public_url\x18\x01 \x01(\tR\tpublicUrl\x12\x1f\n" + + "\voidc_issuer\x18\x02 \x01(\tR\n" + + "oidcIssuer\x12#\n" + + "\roidc_audience\x18\x03 \x01(\tR\foidcAudience\x12$\n" + + "\x0eoidc_client_id\x18\x04 \x01(\tR\foidcClientId\"\"\n" + + " GetAuthenticationSettingsRequest\"a\n" + + "!GetAuthenticationSettingsResponse\x12<\n" + + "\bsettings\x18\x01 \x01(\v2 .state.v1.AuthenticationSettingsR\bsettings\"a\n" + + "!SaveAuthenticationSettingsRequest\x12<\n" + + "\bsettings\x18\x01 \x01(\v2 .state.v1.AuthenticationSettingsR\bsettings\"$\n" + + "\"SaveAuthenticationSettingsResponse\"9\n" + + "\x13BeginPasskeyRequest\x12\"\n" + + "\fregistration\x18\x01 \x01(\bR\fregistration\"F\n" + + "\x14BeginPasskeyResponse\x12\x14\n" + + "\x05token\x18\x01 \x01(\tR\x05token\x12\x18\n" + + "\aoptions\x18\x02 \x01(\fR\aoptions\"\x84\x01\n" + + "\x14FinishPasskeyRequest\x12\x14\n" + + "\x05token\x18\x01 \x01(\tR\x05token\x12\x1e\n" + + "\n" + + "credential\x18\x02 \x01(\fR\n" + + "credential\x12\"\n" + + "\fregistration\x18\x03 \x01(\bR\fregistration\x12\x12\n" + + "\x04name\x18\x04 \x01(\tR\x04name\"\x98\x01\n" + + "\x15FinishPasskeyResponse\x12.\n" + + "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\x12\x14\n" + + "\x05token\x18\x02 \x01(\tR\x05token\x129\n" + + "\n" + + "expires_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\"-\n" + + "\aPasskey\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\"\x15\n" + + "\x13ListPasskeysRequest\"E\n" + + "\x14ListPasskeysResponse\x12-\n" + + "\bpasskeys\x18\x01 \x03(\v2\x11.state.v1.PasskeyR\bpasskeys\"&\n" + + "\x14DeletePasskeyRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\x17\n" + + "\x15DeletePasskeyResponse\"V\n" + + "\x19OpenAccountSessionRequest\x129\n" + + "\n" + + "expires_at\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\"\x9d\x01\n" + + "\x1aOpenAccountSessionResponse\x12.\n" + + "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\x12\x14\n" + + "\x05token\x18\x02 \x01(\tR\x05token\x129\n" + + "\n" + + "expires_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\"9\n" + + "!RequireFreshAccountSessionRequest\x12\x14\n" + + "\x05token\x18\x01 \x01(\tR\x05token\"$\n" + + "\"RequireFreshAccountSessionResponse\"\x1e\n" + + "\x1cCreateAccountRecoveryRequest\"3\n" + + "\x1dCreateAccountRecoveryResponse\x12\x12\n" + + "\x04code\x18\x01 \x01(\tR\x04code\"]\n" + + "\x15RecoverAccountRequest\x12\x14\n" + + "\x05email\x18\x01 \x01(\tR\x05email\x12\x12\n" + + "\x04code\x18\x02 \x01(\tR\x04code\x12\x1a\n" + + "\bpassword\x18\x03 \x01(\tR\bpassword\"\x18\n" + + "\x16RecoverAccountResponse2\x9c\x0e\n" + + "\x0eAccountService\x12t\n" + + "\x19GetAuthenticationSettings\x12*.state.v1.GetAuthenticationSettingsRequest\x1a+.state.v1.GetAuthenticationSettingsResponse\x12w\n" + + "\x1aSaveAuthenticationSettings\x12+.state.v1.SaveAuthenticationSettingsRequest\x1a,.state.v1.SaveAuthenticationSettingsResponse\x12M\n" + + "\fBeginPasskey\x12\x1d.state.v1.BeginPasskeyRequest\x1a\x1e.state.v1.BeginPasskeyResponse\x12P\n" + + "\rFinishPasskey\x12\x1e.state.v1.FinishPasskeyRequest\x1a\x1f.state.v1.FinishPasskeyResponse\x12M\n" + + "\fListPasskeys\x12\x1d.state.v1.ListPasskeysRequest\x1a\x1e.state.v1.ListPasskeysResponse\x12P\n" + + "\rDeletePasskey\x12\x1e.state.v1.DeletePasskeyRequest\x1a\x1f.state.v1.DeletePasskeyResponse\x12_\n" + + "\x12OpenAccountSession\x12#.state.v1.OpenAccountSessionRequest\x1a$.state.v1.OpenAccountSessionResponse\x12w\n" + + "\x1aRequireFreshAccountSession\x12+.state.v1.RequireFreshAccountSessionRequest\x1a,.state.v1.RequireFreshAccountSessionResponse\x12h\n" + + "\x15CreateAccountRecovery\x12&.state.v1.CreateAccountRecoveryRequest\x1a'.state.v1.CreateAccountRecoveryResponse\x12S\n" + + "\x0eRecoverAccount\x12\x1f.state.v1.RecoverAccountRequest\x1a .state.v1.RecoverAccountResponse\x12M\n" + + "\fAccountSetup\x12\x1d.state.v1.AccountSetupRequest\x1a\x1e.state.v1.AccountSetupResponse\x12V\n" + + "\x0fRegisterAccount\x12 .state.v1.RegisterAccountRequest\x1a!.state.v1.RegisterAccountResponse\x12P\n" + + "\rSignInAccount\x12\x1e.state.v1.SignInAccountRequest\x1a\x1f.state.v1.SignInAccountResponse\x12h\n" + + "\x15ResolveAccountSession\x12&.state.v1.ResolveAccountSessionRequest\x1a'.state.v1.ResolveAccountSessionResponse\x12S\n" + + "\x0eSignOutAccount\x12\x1f.state.v1.SignOutAccountRequest\x1a .state.v1.SignOutAccountResponse\x12h\n" + + "\x15ChangeAccountPassword\x12&.state.v1.ChangeAccountPasswordRequest\x1a'.state.v1.ChangeAccountPasswordResponse\x12Y\n" + + "\x10AddPersonalToken\x12!.state.v1.AddPersonalTokenRequest\x1a\".state.v1.AddPersonalTokenResponse\x12_\n" + + "\x12ListPersonalTokens\x12#.state.v1.ListPersonalTokensRequest\x1a$.state.v1.ListPersonalTokensResponse\x12b\n" + + "\x13RevokePersonalToken\x12$.state.v1.RevokePersonalTokenRequest\x1a%.state.v1.RevokePersonalTokenResponseB\xa6\x01\n" + + "\fcom.state.v1B\fAccountProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_account_proto_rawDescOnce sync.Once + file_state_v1_account_proto_rawDescData []byte +) + +func file_state_v1_account_proto_rawDescGZIP() []byte { + file_state_v1_account_proto_rawDescOnce.Do(func() { + file_state_v1_account_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_account_proto_rawDesc), len(file_state_v1_account_proto_rawDesc))) + }) + return file_state_v1_account_proto_rawDescData +} + +var file_state_v1_account_proto_msgTypes = make([]protoimpl.MessageInfo, 41) +var file_state_v1_account_proto_goTypes = []any{ + (*PersonalToken)(nil), // 0: state.v1.PersonalToken + (*AddPersonalTokenRequest)(nil), // 1: state.v1.AddPersonalTokenRequest + (*AddPersonalTokenResponse)(nil), // 2: state.v1.AddPersonalTokenResponse + (*ListPersonalTokensRequest)(nil), // 3: state.v1.ListPersonalTokensRequest + (*ListPersonalTokensResponse)(nil), // 4: state.v1.ListPersonalTokensResponse + (*RevokePersonalTokenRequest)(nil), // 5: state.v1.RevokePersonalTokenRequest + (*RevokePersonalTokenResponse)(nil), // 6: state.v1.RevokePersonalTokenResponse + (*AccountSetupRequest)(nil), // 7: state.v1.AccountSetupRequest + (*AccountSetupResponse)(nil), // 8: state.v1.AccountSetupResponse + (*RegisterAccountRequest)(nil), // 9: state.v1.RegisterAccountRequest + (*RegisterAccountResponse)(nil), // 10: state.v1.RegisterAccountResponse + (*SignInAccountRequest)(nil), // 11: state.v1.SignInAccountRequest + (*SignInAccountResponse)(nil), // 12: state.v1.SignInAccountResponse + (*ResolveAccountSessionRequest)(nil), // 13: state.v1.ResolveAccountSessionRequest + (*ResolveAccountSessionResponse)(nil), // 14: state.v1.ResolveAccountSessionResponse + (*SignOutAccountRequest)(nil), // 15: state.v1.SignOutAccountRequest + (*SignOutAccountResponse)(nil), // 16: state.v1.SignOutAccountResponse + (*ChangeAccountPasswordRequest)(nil), // 17: state.v1.ChangeAccountPasswordRequest + (*ChangeAccountPasswordResponse)(nil), // 18: state.v1.ChangeAccountPasswordResponse + (*AuthenticationSettings)(nil), // 19: state.v1.AuthenticationSettings + (*GetAuthenticationSettingsRequest)(nil), // 20: state.v1.GetAuthenticationSettingsRequest + (*GetAuthenticationSettingsResponse)(nil), // 21: state.v1.GetAuthenticationSettingsResponse + (*SaveAuthenticationSettingsRequest)(nil), // 22: state.v1.SaveAuthenticationSettingsRequest + (*SaveAuthenticationSettingsResponse)(nil), // 23: state.v1.SaveAuthenticationSettingsResponse + (*BeginPasskeyRequest)(nil), // 24: state.v1.BeginPasskeyRequest + (*BeginPasskeyResponse)(nil), // 25: state.v1.BeginPasskeyResponse + (*FinishPasskeyRequest)(nil), // 26: state.v1.FinishPasskeyRequest + (*FinishPasskeyResponse)(nil), // 27: state.v1.FinishPasskeyResponse + (*Passkey)(nil), // 28: state.v1.Passkey + (*ListPasskeysRequest)(nil), // 29: state.v1.ListPasskeysRequest + (*ListPasskeysResponse)(nil), // 30: state.v1.ListPasskeysResponse + (*DeletePasskeyRequest)(nil), // 31: state.v1.DeletePasskeyRequest + (*DeletePasskeyResponse)(nil), // 32: state.v1.DeletePasskeyResponse + (*OpenAccountSessionRequest)(nil), // 33: state.v1.OpenAccountSessionRequest + (*OpenAccountSessionResponse)(nil), // 34: state.v1.OpenAccountSessionResponse + (*RequireFreshAccountSessionRequest)(nil), // 35: state.v1.RequireFreshAccountSessionRequest + (*RequireFreshAccountSessionResponse)(nil), // 36: state.v1.RequireFreshAccountSessionResponse + (*CreateAccountRecoveryRequest)(nil), // 37: state.v1.CreateAccountRecoveryRequest + (*CreateAccountRecoveryResponse)(nil), // 38: state.v1.CreateAccountRecoveryResponse + (*RecoverAccountRequest)(nil), // 39: state.v1.RecoverAccountRequest + (*RecoverAccountResponse)(nil), // 40: state.v1.RecoverAccountResponse + (*timestamppb.Timestamp)(nil), // 41: google.protobuf.Timestamp + (*Identity)(nil), // 42: state.v1.Identity +} +var file_state_v1_account_proto_depIdxs = []int32{ + 41, // 0: state.v1.PersonalToken.created_at:type_name -> google.protobuf.Timestamp + 0, // 1: state.v1.ListPersonalTokensResponse.tokens:type_name -> state.v1.PersonalToken + 42, // 2: state.v1.RegisterAccountResponse.identity:type_name -> state.v1.Identity + 42, // 3: state.v1.SignInAccountResponse.identity:type_name -> state.v1.Identity + 41, // 4: state.v1.SignInAccountResponse.expires_at:type_name -> google.protobuf.Timestamp + 42, // 5: state.v1.ResolveAccountSessionResponse.identity:type_name -> state.v1.Identity + 19, // 6: state.v1.GetAuthenticationSettingsResponse.settings:type_name -> state.v1.AuthenticationSettings + 19, // 7: state.v1.SaveAuthenticationSettingsRequest.settings:type_name -> state.v1.AuthenticationSettings + 42, // 8: state.v1.FinishPasskeyResponse.identity:type_name -> state.v1.Identity + 41, // 9: state.v1.FinishPasskeyResponse.expires_at:type_name -> google.protobuf.Timestamp + 28, // 10: state.v1.ListPasskeysResponse.passkeys:type_name -> state.v1.Passkey + 41, // 11: state.v1.OpenAccountSessionRequest.expires_at:type_name -> google.protobuf.Timestamp + 42, // 12: state.v1.OpenAccountSessionResponse.identity:type_name -> state.v1.Identity + 41, // 13: state.v1.OpenAccountSessionResponse.expires_at:type_name -> google.protobuf.Timestamp + 20, // 14: state.v1.AccountService.GetAuthenticationSettings:input_type -> state.v1.GetAuthenticationSettingsRequest + 22, // 15: state.v1.AccountService.SaveAuthenticationSettings:input_type -> state.v1.SaveAuthenticationSettingsRequest + 24, // 16: state.v1.AccountService.BeginPasskey:input_type -> state.v1.BeginPasskeyRequest + 26, // 17: state.v1.AccountService.FinishPasskey:input_type -> state.v1.FinishPasskeyRequest + 29, // 18: state.v1.AccountService.ListPasskeys:input_type -> state.v1.ListPasskeysRequest + 31, // 19: state.v1.AccountService.DeletePasskey:input_type -> state.v1.DeletePasskeyRequest + 33, // 20: state.v1.AccountService.OpenAccountSession:input_type -> state.v1.OpenAccountSessionRequest + 35, // 21: state.v1.AccountService.RequireFreshAccountSession:input_type -> state.v1.RequireFreshAccountSessionRequest + 37, // 22: state.v1.AccountService.CreateAccountRecovery:input_type -> state.v1.CreateAccountRecoveryRequest + 39, // 23: state.v1.AccountService.RecoverAccount:input_type -> state.v1.RecoverAccountRequest + 7, // 24: state.v1.AccountService.AccountSetup:input_type -> state.v1.AccountSetupRequest + 9, // 25: state.v1.AccountService.RegisterAccount:input_type -> state.v1.RegisterAccountRequest + 11, // 26: state.v1.AccountService.SignInAccount:input_type -> state.v1.SignInAccountRequest + 13, // 27: state.v1.AccountService.ResolveAccountSession:input_type -> state.v1.ResolveAccountSessionRequest + 15, // 28: state.v1.AccountService.SignOutAccount:input_type -> state.v1.SignOutAccountRequest + 17, // 29: state.v1.AccountService.ChangeAccountPassword:input_type -> state.v1.ChangeAccountPasswordRequest + 1, // 30: state.v1.AccountService.AddPersonalToken:input_type -> state.v1.AddPersonalTokenRequest + 3, // 31: state.v1.AccountService.ListPersonalTokens:input_type -> state.v1.ListPersonalTokensRequest + 5, // 32: state.v1.AccountService.RevokePersonalToken:input_type -> state.v1.RevokePersonalTokenRequest + 21, // 33: state.v1.AccountService.GetAuthenticationSettings:output_type -> state.v1.GetAuthenticationSettingsResponse + 23, // 34: state.v1.AccountService.SaveAuthenticationSettings:output_type -> state.v1.SaveAuthenticationSettingsResponse + 25, // 35: state.v1.AccountService.BeginPasskey:output_type -> state.v1.BeginPasskeyResponse + 27, // 36: state.v1.AccountService.FinishPasskey:output_type -> state.v1.FinishPasskeyResponse + 30, // 37: state.v1.AccountService.ListPasskeys:output_type -> state.v1.ListPasskeysResponse + 32, // 38: state.v1.AccountService.DeletePasskey:output_type -> state.v1.DeletePasskeyResponse + 34, // 39: state.v1.AccountService.OpenAccountSession:output_type -> state.v1.OpenAccountSessionResponse + 36, // 40: state.v1.AccountService.RequireFreshAccountSession:output_type -> state.v1.RequireFreshAccountSessionResponse + 38, // 41: state.v1.AccountService.CreateAccountRecovery:output_type -> state.v1.CreateAccountRecoveryResponse + 40, // 42: state.v1.AccountService.RecoverAccount:output_type -> state.v1.RecoverAccountResponse + 8, // 43: state.v1.AccountService.AccountSetup:output_type -> state.v1.AccountSetupResponse + 10, // 44: state.v1.AccountService.RegisterAccount:output_type -> state.v1.RegisterAccountResponse + 12, // 45: state.v1.AccountService.SignInAccount:output_type -> state.v1.SignInAccountResponse + 14, // 46: state.v1.AccountService.ResolveAccountSession:output_type -> state.v1.ResolveAccountSessionResponse + 16, // 47: state.v1.AccountService.SignOutAccount:output_type -> state.v1.SignOutAccountResponse + 18, // 48: state.v1.AccountService.ChangeAccountPassword:output_type -> state.v1.ChangeAccountPasswordResponse + 2, // 49: state.v1.AccountService.AddPersonalToken:output_type -> state.v1.AddPersonalTokenResponse + 4, // 50: state.v1.AccountService.ListPersonalTokens:output_type -> state.v1.ListPersonalTokensResponse + 6, // 51: state.v1.AccountService.RevokePersonalToken:output_type -> state.v1.RevokePersonalTokenResponse + 33, // [33:52] is the sub-list for method output_type + 14, // [14:33] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_state_v1_account_proto_init() } +func file_state_v1_account_proto_init() { + if File_state_v1_account_proto != nil { + return + } + file_state_v1_types_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_account_proto_rawDesc), len(file_state_v1_account_proto_rawDesc)), + NumEnums: 0, + NumMessages: 41, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_account_proto_goTypes, + DependencyIndexes: file_state_v1_account_proto_depIdxs, + MessageInfos: file_state_v1_account_proto_msgTypes, + }.Build() + File_state_v1_account_proto = out.File + file_state_v1_account_proto_goTypes = nil + file_state_v1_account_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/account_grpc.pb.go b/internal/contracts/state/v1/account_grpc.pb.go new file mode 100644 index 000000000..86c7f67e0 --- /dev/null +++ b/internal/contracts/state/v1/account_grpc.pb.go @@ -0,0 +1,809 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/account.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 ( + AccountService_GetAuthenticationSettings_FullMethodName = "/state.v1.AccountService/GetAuthenticationSettings" + AccountService_SaveAuthenticationSettings_FullMethodName = "/state.v1.AccountService/SaveAuthenticationSettings" + AccountService_BeginPasskey_FullMethodName = "/state.v1.AccountService/BeginPasskey" + AccountService_FinishPasskey_FullMethodName = "/state.v1.AccountService/FinishPasskey" + AccountService_ListPasskeys_FullMethodName = "/state.v1.AccountService/ListPasskeys" + AccountService_DeletePasskey_FullMethodName = "/state.v1.AccountService/DeletePasskey" + AccountService_OpenAccountSession_FullMethodName = "/state.v1.AccountService/OpenAccountSession" + AccountService_RequireFreshAccountSession_FullMethodName = "/state.v1.AccountService/RequireFreshAccountSession" + AccountService_CreateAccountRecovery_FullMethodName = "/state.v1.AccountService/CreateAccountRecovery" + AccountService_RecoverAccount_FullMethodName = "/state.v1.AccountService/RecoverAccount" + AccountService_AccountSetup_FullMethodName = "/state.v1.AccountService/AccountSetup" + AccountService_RegisterAccount_FullMethodName = "/state.v1.AccountService/RegisterAccount" + AccountService_SignInAccount_FullMethodName = "/state.v1.AccountService/SignInAccount" + AccountService_ResolveAccountSession_FullMethodName = "/state.v1.AccountService/ResolveAccountSession" + AccountService_SignOutAccount_FullMethodName = "/state.v1.AccountService/SignOutAccount" + AccountService_ChangeAccountPassword_FullMethodName = "/state.v1.AccountService/ChangeAccountPassword" + AccountService_AddPersonalToken_FullMethodName = "/state.v1.AccountService/AddPersonalToken" + AccountService_ListPersonalTokens_FullMethodName = "/state.v1.AccountService/ListPersonalTokens" + AccountService_RevokePersonalToken_FullMethodName = "/state.v1.AccountService/RevokePersonalToken" +) + +// AccountServiceClient is the client API for AccountService 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 AccountServiceClient interface { + GetAuthenticationSettings(ctx context.Context, in *GetAuthenticationSettingsRequest, opts ...grpc.CallOption) (*GetAuthenticationSettingsResponse, error) + SaveAuthenticationSettings(ctx context.Context, in *SaveAuthenticationSettingsRequest, opts ...grpc.CallOption) (*SaveAuthenticationSettingsResponse, error) + BeginPasskey(ctx context.Context, in *BeginPasskeyRequest, opts ...grpc.CallOption) (*BeginPasskeyResponse, error) + FinishPasskey(ctx context.Context, in *FinishPasskeyRequest, opts ...grpc.CallOption) (*FinishPasskeyResponse, error) + ListPasskeys(ctx context.Context, in *ListPasskeysRequest, opts ...grpc.CallOption) (*ListPasskeysResponse, error) + DeletePasskey(ctx context.Context, in *DeletePasskeyRequest, opts ...grpc.CallOption) (*DeletePasskeyResponse, error) + OpenAccountSession(ctx context.Context, in *OpenAccountSessionRequest, opts ...grpc.CallOption) (*OpenAccountSessionResponse, error) + RequireFreshAccountSession(ctx context.Context, in *RequireFreshAccountSessionRequest, opts ...grpc.CallOption) (*RequireFreshAccountSessionResponse, error) + CreateAccountRecovery(ctx context.Context, in *CreateAccountRecoveryRequest, opts ...grpc.CallOption) (*CreateAccountRecoveryResponse, error) + RecoverAccount(ctx context.Context, in *RecoverAccountRequest, opts ...grpc.CallOption) (*RecoverAccountResponse, error) + AccountSetup(ctx context.Context, in *AccountSetupRequest, opts ...grpc.CallOption) (*AccountSetupResponse, error) + RegisterAccount(ctx context.Context, in *RegisterAccountRequest, opts ...grpc.CallOption) (*RegisterAccountResponse, error) + SignInAccount(ctx context.Context, in *SignInAccountRequest, opts ...grpc.CallOption) (*SignInAccountResponse, error) + ResolveAccountSession(ctx context.Context, in *ResolveAccountSessionRequest, opts ...grpc.CallOption) (*ResolveAccountSessionResponse, error) + SignOutAccount(ctx context.Context, in *SignOutAccountRequest, opts ...grpc.CallOption) (*SignOutAccountResponse, error) + ChangeAccountPassword(ctx context.Context, in *ChangeAccountPasswordRequest, opts ...grpc.CallOption) (*ChangeAccountPasswordResponse, error) + // Personal API tokens act on the caller's own principal: the State Store + // refuses a call that carries none. + AddPersonalToken(ctx context.Context, in *AddPersonalTokenRequest, opts ...grpc.CallOption) (*AddPersonalTokenResponse, error) + ListPersonalTokens(ctx context.Context, in *ListPersonalTokensRequest, opts ...grpc.CallOption) (*ListPersonalTokensResponse, error) + RevokePersonalToken(ctx context.Context, in *RevokePersonalTokenRequest, opts ...grpc.CallOption) (*RevokePersonalTokenResponse, error) +} + +type accountServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAccountServiceClient(cc grpc.ClientConnInterface) AccountServiceClient { + return &accountServiceClient{cc} +} + +func (c *accountServiceClient) GetAuthenticationSettings(ctx context.Context, in *GetAuthenticationSettingsRequest, opts ...grpc.CallOption) (*GetAuthenticationSettingsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAuthenticationSettingsResponse) + err := c.cc.Invoke(ctx, AccountService_GetAuthenticationSettings_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) SaveAuthenticationSettings(ctx context.Context, in *SaveAuthenticationSettingsRequest, opts ...grpc.CallOption) (*SaveAuthenticationSettingsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SaveAuthenticationSettingsResponse) + err := c.cc.Invoke(ctx, AccountService_SaveAuthenticationSettings_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) BeginPasskey(ctx context.Context, in *BeginPasskeyRequest, opts ...grpc.CallOption) (*BeginPasskeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(BeginPasskeyResponse) + err := c.cc.Invoke(ctx, AccountService_BeginPasskey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) FinishPasskey(ctx context.Context, in *FinishPasskeyRequest, opts ...grpc.CallOption) (*FinishPasskeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FinishPasskeyResponse) + err := c.cc.Invoke(ctx, AccountService_FinishPasskey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) ListPasskeys(ctx context.Context, in *ListPasskeysRequest, opts ...grpc.CallOption) (*ListPasskeysResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPasskeysResponse) + err := c.cc.Invoke(ctx, AccountService_ListPasskeys_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) DeletePasskey(ctx context.Context, in *DeletePasskeyRequest, opts ...grpc.CallOption) (*DeletePasskeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeletePasskeyResponse) + err := c.cc.Invoke(ctx, AccountService_DeletePasskey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) OpenAccountSession(ctx context.Context, in *OpenAccountSessionRequest, opts ...grpc.CallOption) (*OpenAccountSessionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(OpenAccountSessionResponse) + err := c.cc.Invoke(ctx, AccountService_OpenAccountSession_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) RequireFreshAccountSession(ctx context.Context, in *RequireFreshAccountSessionRequest, opts ...grpc.CallOption) (*RequireFreshAccountSessionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RequireFreshAccountSessionResponse) + err := c.cc.Invoke(ctx, AccountService_RequireFreshAccountSession_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) CreateAccountRecovery(ctx context.Context, in *CreateAccountRecoveryRequest, opts ...grpc.CallOption) (*CreateAccountRecoveryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateAccountRecoveryResponse) + err := c.cc.Invoke(ctx, AccountService_CreateAccountRecovery_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) RecoverAccount(ctx context.Context, in *RecoverAccountRequest, opts ...grpc.CallOption) (*RecoverAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RecoverAccountResponse) + err := c.cc.Invoke(ctx, AccountService_RecoverAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) AccountSetup(ctx context.Context, in *AccountSetupRequest, opts ...grpc.CallOption) (*AccountSetupResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AccountSetupResponse) + err := c.cc.Invoke(ctx, AccountService_AccountSetup_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) RegisterAccount(ctx context.Context, in *RegisterAccountRequest, opts ...grpc.CallOption) (*RegisterAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RegisterAccountResponse) + err := c.cc.Invoke(ctx, AccountService_RegisterAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) SignInAccount(ctx context.Context, in *SignInAccountRequest, opts ...grpc.CallOption) (*SignInAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SignInAccountResponse) + err := c.cc.Invoke(ctx, AccountService_SignInAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) ResolveAccountSession(ctx context.Context, in *ResolveAccountSessionRequest, opts ...grpc.CallOption) (*ResolveAccountSessionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ResolveAccountSessionResponse) + err := c.cc.Invoke(ctx, AccountService_ResolveAccountSession_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) SignOutAccount(ctx context.Context, in *SignOutAccountRequest, opts ...grpc.CallOption) (*SignOutAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SignOutAccountResponse) + err := c.cc.Invoke(ctx, AccountService_SignOutAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) ChangeAccountPassword(ctx context.Context, in *ChangeAccountPasswordRequest, opts ...grpc.CallOption) (*ChangeAccountPasswordResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ChangeAccountPasswordResponse) + err := c.cc.Invoke(ctx, AccountService_ChangeAccountPassword_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) AddPersonalToken(ctx context.Context, in *AddPersonalTokenRequest, opts ...grpc.CallOption) (*AddPersonalTokenResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AddPersonalTokenResponse) + err := c.cc.Invoke(ctx, AccountService_AddPersonalToken_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) ListPersonalTokens(ctx context.Context, in *ListPersonalTokensRequest, opts ...grpc.CallOption) (*ListPersonalTokensResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPersonalTokensResponse) + err := c.cc.Invoke(ctx, AccountService_ListPersonalTokens_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) RevokePersonalToken(ctx context.Context, in *RevokePersonalTokenRequest, opts ...grpc.CallOption) (*RevokePersonalTokenResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RevokePersonalTokenResponse) + err := c.cc.Invoke(ctx, AccountService_RevokePersonalToken_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AccountServiceServer is the server API for AccountService service. +// All implementations must embed UnimplementedAccountServiceServer +// for forward compatibility. +type AccountServiceServer interface { + GetAuthenticationSettings(context.Context, *GetAuthenticationSettingsRequest) (*GetAuthenticationSettingsResponse, error) + SaveAuthenticationSettings(context.Context, *SaveAuthenticationSettingsRequest) (*SaveAuthenticationSettingsResponse, error) + BeginPasskey(context.Context, *BeginPasskeyRequest) (*BeginPasskeyResponse, error) + FinishPasskey(context.Context, *FinishPasskeyRequest) (*FinishPasskeyResponse, error) + ListPasskeys(context.Context, *ListPasskeysRequest) (*ListPasskeysResponse, error) + DeletePasskey(context.Context, *DeletePasskeyRequest) (*DeletePasskeyResponse, error) + OpenAccountSession(context.Context, *OpenAccountSessionRequest) (*OpenAccountSessionResponse, error) + RequireFreshAccountSession(context.Context, *RequireFreshAccountSessionRequest) (*RequireFreshAccountSessionResponse, error) + CreateAccountRecovery(context.Context, *CreateAccountRecoveryRequest) (*CreateAccountRecoveryResponse, error) + RecoverAccount(context.Context, *RecoverAccountRequest) (*RecoverAccountResponse, error) + AccountSetup(context.Context, *AccountSetupRequest) (*AccountSetupResponse, error) + RegisterAccount(context.Context, *RegisterAccountRequest) (*RegisterAccountResponse, error) + SignInAccount(context.Context, *SignInAccountRequest) (*SignInAccountResponse, error) + ResolveAccountSession(context.Context, *ResolveAccountSessionRequest) (*ResolveAccountSessionResponse, error) + SignOutAccount(context.Context, *SignOutAccountRequest) (*SignOutAccountResponse, error) + ChangeAccountPassword(context.Context, *ChangeAccountPasswordRequest) (*ChangeAccountPasswordResponse, error) + // Personal API tokens act on the caller's own principal: the State Store + // refuses a call that carries none. + AddPersonalToken(context.Context, *AddPersonalTokenRequest) (*AddPersonalTokenResponse, error) + ListPersonalTokens(context.Context, *ListPersonalTokensRequest) (*ListPersonalTokensResponse, error) + RevokePersonalToken(context.Context, *RevokePersonalTokenRequest) (*RevokePersonalTokenResponse, error) + mustEmbedUnimplementedAccountServiceServer() +} + +// UnimplementedAccountServiceServer 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 UnimplementedAccountServiceServer struct{} + +func (UnimplementedAccountServiceServer) GetAuthenticationSettings(context.Context, *GetAuthenticationSettingsRequest) (*GetAuthenticationSettingsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetAuthenticationSettings not implemented") +} +func (UnimplementedAccountServiceServer) SaveAuthenticationSettings(context.Context, *SaveAuthenticationSettingsRequest) (*SaveAuthenticationSettingsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SaveAuthenticationSettings not implemented") +} +func (UnimplementedAccountServiceServer) BeginPasskey(context.Context, *BeginPasskeyRequest) (*BeginPasskeyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method BeginPasskey not implemented") +} +func (UnimplementedAccountServiceServer) FinishPasskey(context.Context, *FinishPasskeyRequest) (*FinishPasskeyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method FinishPasskey not implemented") +} +func (UnimplementedAccountServiceServer) ListPasskeys(context.Context, *ListPasskeysRequest) (*ListPasskeysResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListPasskeys not implemented") +} +func (UnimplementedAccountServiceServer) DeletePasskey(context.Context, *DeletePasskeyRequest) (*DeletePasskeyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeletePasskey not implemented") +} +func (UnimplementedAccountServiceServer) OpenAccountSession(context.Context, *OpenAccountSessionRequest) (*OpenAccountSessionResponse, error) { + return nil, status.Error(codes.Unimplemented, "method OpenAccountSession not implemented") +} +func (UnimplementedAccountServiceServer) RequireFreshAccountSession(context.Context, *RequireFreshAccountSessionRequest) (*RequireFreshAccountSessionResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RequireFreshAccountSession not implemented") +} +func (UnimplementedAccountServiceServer) CreateAccountRecovery(context.Context, *CreateAccountRecoveryRequest) (*CreateAccountRecoveryResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CreateAccountRecovery not implemented") +} +func (UnimplementedAccountServiceServer) RecoverAccount(context.Context, *RecoverAccountRequest) (*RecoverAccountResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RecoverAccount not implemented") +} +func (UnimplementedAccountServiceServer) AccountSetup(context.Context, *AccountSetupRequest) (*AccountSetupResponse, error) { + return nil, status.Error(codes.Unimplemented, "method AccountSetup not implemented") +} +func (UnimplementedAccountServiceServer) RegisterAccount(context.Context, *RegisterAccountRequest) (*RegisterAccountResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RegisterAccount not implemented") +} +func (UnimplementedAccountServiceServer) SignInAccount(context.Context, *SignInAccountRequest) (*SignInAccountResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SignInAccount not implemented") +} +func (UnimplementedAccountServiceServer) ResolveAccountSession(context.Context, *ResolveAccountSessionRequest) (*ResolveAccountSessionResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ResolveAccountSession not implemented") +} +func (UnimplementedAccountServiceServer) SignOutAccount(context.Context, *SignOutAccountRequest) (*SignOutAccountResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SignOutAccount not implemented") +} +func (UnimplementedAccountServiceServer) ChangeAccountPassword(context.Context, *ChangeAccountPasswordRequest) (*ChangeAccountPasswordResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ChangeAccountPassword not implemented") +} +func (UnimplementedAccountServiceServer) AddPersonalToken(context.Context, *AddPersonalTokenRequest) (*AddPersonalTokenResponse, error) { + return nil, status.Error(codes.Unimplemented, "method AddPersonalToken not implemented") +} +func (UnimplementedAccountServiceServer) ListPersonalTokens(context.Context, *ListPersonalTokensRequest) (*ListPersonalTokensResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListPersonalTokens not implemented") +} +func (UnimplementedAccountServiceServer) RevokePersonalToken(context.Context, *RevokePersonalTokenRequest) (*RevokePersonalTokenResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RevokePersonalToken not implemented") +} +func (UnimplementedAccountServiceServer) mustEmbedUnimplementedAccountServiceServer() {} +func (UnimplementedAccountServiceServer) testEmbeddedByValue() {} + +// UnsafeAccountServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AccountServiceServer will +// result in compilation errors. +type UnsafeAccountServiceServer interface { + mustEmbedUnimplementedAccountServiceServer() +} + +func RegisterAccountServiceServer(s grpc.ServiceRegistrar, srv AccountServiceServer) { + // If the following call panics, it indicates UnimplementedAccountServiceServer 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(&AccountService_ServiceDesc, srv) +} + +func _AccountService_GetAuthenticationSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAuthenticationSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).GetAuthenticationSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_GetAuthenticationSettings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).GetAuthenticationSettings(ctx, req.(*GetAuthenticationSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_SaveAuthenticationSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SaveAuthenticationSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).SaveAuthenticationSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_SaveAuthenticationSettings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).SaveAuthenticationSettings(ctx, req.(*SaveAuthenticationSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_BeginPasskey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BeginPasskeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).BeginPasskey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_BeginPasskey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).BeginPasskey(ctx, req.(*BeginPasskeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_FinishPasskey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FinishPasskeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).FinishPasskey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_FinishPasskey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).FinishPasskey(ctx, req.(*FinishPasskeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_ListPasskeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPasskeysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).ListPasskeys(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_ListPasskeys_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).ListPasskeys(ctx, req.(*ListPasskeysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_DeletePasskey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePasskeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).DeletePasskey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_DeletePasskey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).DeletePasskey(ctx, req.(*DeletePasskeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_OpenAccountSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OpenAccountSessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).OpenAccountSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_OpenAccountSession_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).OpenAccountSession(ctx, req.(*OpenAccountSessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_RequireFreshAccountSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequireFreshAccountSessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).RequireFreshAccountSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_RequireFreshAccountSession_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).RequireFreshAccountSession(ctx, req.(*RequireFreshAccountSessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_CreateAccountRecovery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAccountRecoveryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).CreateAccountRecovery(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_CreateAccountRecovery_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).CreateAccountRecovery(ctx, req.(*CreateAccountRecoveryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_RecoverAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RecoverAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).RecoverAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_RecoverAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).RecoverAccount(ctx, req.(*RecoverAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_AccountSetup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AccountSetupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).AccountSetup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_AccountSetup_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).AccountSetup(ctx, req.(*AccountSetupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_RegisterAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).RegisterAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_RegisterAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).RegisterAccount(ctx, req.(*RegisterAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_SignInAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignInAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).SignInAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_SignInAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).SignInAccount(ctx, req.(*SignInAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_ResolveAccountSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResolveAccountSessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).ResolveAccountSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_ResolveAccountSession_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).ResolveAccountSession(ctx, req.(*ResolveAccountSessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_SignOutAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignOutAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).SignOutAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_SignOutAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).SignOutAccount(ctx, req.(*SignOutAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_ChangeAccountPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ChangeAccountPasswordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).ChangeAccountPassword(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_ChangeAccountPassword_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).ChangeAccountPassword(ctx, req.(*ChangeAccountPasswordRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_AddPersonalToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddPersonalTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).AddPersonalToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_AddPersonalToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).AddPersonalToken(ctx, req.(*AddPersonalTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_ListPersonalTokens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPersonalTokensRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).ListPersonalTokens(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_ListPersonalTokens_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).ListPersonalTokens(ctx, req.(*ListPersonalTokensRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_RevokePersonalToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RevokePersonalTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).RevokePersonalToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_RevokePersonalToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).RevokePersonalToken(ctx, req.(*RevokePersonalTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AccountService_ServiceDesc is the grpc.ServiceDesc for AccountService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AccountService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.AccountService", + HandlerType: (*AccountServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetAuthenticationSettings", + Handler: _AccountService_GetAuthenticationSettings_Handler, + }, + { + MethodName: "SaveAuthenticationSettings", + Handler: _AccountService_SaveAuthenticationSettings_Handler, + }, + { + MethodName: "BeginPasskey", + Handler: _AccountService_BeginPasskey_Handler, + }, + { + MethodName: "FinishPasskey", + Handler: _AccountService_FinishPasskey_Handler, + }, + { + MethodName: "ListPasskeys", + Handler: _AccountService_ListPasskeys_Handler, + }, + { + MethodName: "DeletePasskey", + Handler: _AccountService_DeletePasskey_Handler, + }, + { + MethodName: "OpenAccountSession", + Handler: _AccountService_OpenAccountSession_Handler, + }, + { + MethodName: "RequireFreshAccountSession", + Handler: _AccountService_RequireFreshAccountSession_Handler, + }, + { + MethodName: "CreateAccountRecovery", + Handler: _AccountService_CreateAccountRecovery_Handler, + }, + { + MethodName: "RecoverAccount", + Handler: _AccountService_RecoverAccount_Handler, + }, + { + MethodName: "AccountSetup", + Handler: _AccountService_AccountSetup_Handler, + }, + { + MethodName: "RegisterAccount", + Handler: _AccountService_RegisterAccount_Handler, + }, + { + MethodName: "SignInAccount", + Handler: _AccountService_SignInAccount_Handler, + }, + { + MethodName: "ResolveAccountSession", + Handler: _AccountService_ResolveAccountSession_Handler, + }, + { + MethodName: "SignOutAccount", + Handler: _AccountService_SignOutAccount_Handler, + }, + { + MethodName: "ChangeAccountPassword", + Handler: _AccountService_ChangeAccountPassword_Handler, + }, + { + MethodName: "AddPersonalToken", + Handler: _AccountService_AddPersonalToken_Handler, + }, + { + MethodName: "ListPersonalTokens", + Handler: _AccountService_ListPersonalTokens_Handler, + }, + { + MethodName: "RevokePersonalToken", + Handler: _AccountService_RevokePersonalToken_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "state/v1/account.proto", +} diff --git a/internal/contracts/state/v1/alert.pb.go b/internal/contracts/state/v1/alert.pb.go new file mode 100644 index 000000000..5cddc997f --- /dev/null +++ b/internal/contracts/state/v1/alert.pb.go @@ -0,0 +1,1204 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/alert.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Alert mirrors internal/domain/alert.Alert. Severity is info, warning or +// action; state is open, resolved or dismissed. +type Alert struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Kind string `protobuf:"bytes,3,opt,name=kind,proto3" json:"kind,omitempty"` + Subject string `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` + Severity string `protobuf:"bytes,5,opt,name=severity,proto3" json:"severity,omitempty"` + Title string `protobuf:"bytes,6,opt,name=title,proto3" json:"title,omitempty"` + Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"` + Link string `protobuf:"bytes,8,opt,name=link,proto3" json:"link,omitempty"` + Condition bool `protobuf:"varint,9,opt,name=condition,proto3" json:"condition,omitempty"` + State string `protobuf:"bytes,10,opt,name=state,proto3" json:"state,omitempty"` + FirstRaised *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=first_raised,json=firstRaised,proto3" json:"first_raised,omitempty"` + LastSeen *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen,omitempty"` + Count int64 `protobuf:"varint,13,opt,name=count,proto3" json:"count,omitempty"` + ClosedBy string `protobuf:"bytes,14,opt,name=closed_by,json=closedBy,proto3" json:"closed_by,omitempty"` + ClosedAt *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=closed_at,json=closedAt,proto3" json:"closed_at,omitempty"` + Deliveries []*AlertDelivery `protobuf:"bytes,16,rep,name=deliveries,proto3" json:"deliveries,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Alert) Reset() { + *x = Alert{} + mi := &file_state_v1_alert_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Alert) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Alert) ProtoMessage() {} + +func (x *Alert) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_alert_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Alert.ProtoReflect.Descriptor instead. +func (*Alert) Descriptor() ([]byte, []int) { + return file_state_v1_alert_proto_rawDescGZIP(), []int{0} +} + +func (x *Alert) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Alert) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *Alert) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Alert) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +func (x *Alert) GetSeverity() string { + if x != nil { + return x.Severity + } + return "" +} + +func (x *Alert) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *Alert) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +func (x *Alert) GetLink() string { + if x != nil { + return x.Link + } + return "" +} + +func (x *Alert) GetCondition() bool { + if x != nil { + return x.Condition + } + return false +} + +func (x *Alert) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *Alert) GetFirstRaised() *timestamppb.Timestamp { + if x != nil { + return x.FirstRaised + } + return nil +} + +func (x *Alert) GetLastSeen() *timestamppb.Timestamp { + if x != nil { + return x.LastSeen + } + return nil +} + +func (x *Alert) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *Alert) GetClosedBy() string { + if x != nil { + return x.ClosedBy + } + return "" +} + +func (x *Alert) GetClosedAt() *timestamppb.Timestamp { + if x != nil { + return x.ClosedAt + } + return nil +} + +func (x *Alert) GetDeliveries() []*AlertDelivery { + if x != nil { + return x.Deliveries + } + return nil +} + +// AlertDelivery is one outbound notice an alert owed. Event is raised or +// resolved; state is pending, delivered, failed or skipped. +type AlertDelivery struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Event string `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` + State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + Attempts []*AlertAttempt `protobuf:"bytes,5,rep,name=attempts,proto3" json:"attempts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AlertDelivery) Reset() { + *x = AlertDelivery{} + mi := &file_state_v1_alert_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AlertDelivery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlertDelivery) ProtoMessage() {} + +func (x *AlertDelivery) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_alert_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AlertDelivery.ProtoReflect.Descriptor instead. +func (*AlertDelivery) Descriptor() ([]byte, []int) { + return file_state_v1_alert_proto_rawDescGZIP(), []int{1} +} + +func (x *AlertDelivery) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *AlertDelivery) GetEvent() string { + if x != nil { + return x.Event + } + return "" +} + +func (x *AlertDelivery) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *AlertDelivery) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *AlertDelivery) GetAttempts() []*AlertAttempt { + if x != nil { + return x.Attempts + } + return nil +} + +type AlertAttempt struct { + state protoimpl.MessageState `protogen:"open.v1"` + N int64 `protobuf:"varint,1,opt,name=n,proto3" json:"n,omitempty"` + At *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=at,proto3" json:"at,omitempty"` + StatusCode int64 `protobuf:"varint,3,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` + Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AlertAttempt) Reset() { + *x = AlertAttempt{} + mi := &file_state_v1_alert_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AlertAttempt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlertAttempt) ProtoMessage() {} + +func (x *AlertAttempt) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_alert_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AlertAttempt.ProtoReflect.Descriptor instead. +func (*AlertAttempt) Descriptor() ([]byte, []int) { + return file_state_v1_alert_proto_rawDescGZIP(), []int{2} +} + +func (x *AlertAttempt) GetN() int64 { + if x != nil { + return x.N + } + return 0 +} + +func (x *AlertAttempt) GetAt() *timestamppb.Timestamp { + if x != nil { + return x.At + } + return nil +} + +func (x *AlertAttempt) GetStatusCode() int64 { + if x != nil { + return x.StatusCode + } + return 0 +} + +func (x *AlertAttempt) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +type RaiseAlertRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` + Severity string `protobuf:"bytes,4,opt,name=severity,proto3" json:"severity,omitempty"` + Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` + Body string `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"` + Link string `protobuf:"bytes,7,opt,name=link,proto3" json:"link,omitempty"` + // condition is true when the raiser resolves the alert itself once the + // condition clears; an event alert stays until dismissed. + Condition bool `protobuf:"varint,8,opt,name=condition,proto3" json:"condition,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RaiseAlertRequest) Reset() { + *x = RaiseAlertRequest{} + mi := &file_state_v1_alert_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RaiseAlertRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RaiseAlertRequest) ProtoMessage() {} + +func (x *RaiseAlertRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_alert_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RaiseAlertRequest.ProtoReflect.Descriptor instead. +func (*RaiseAlertRequest) Descriptor() ([]byte, []int) { + return file_state_v1_alert_proto_rawDescGZIP(), []int{3} +} + +func (x *RaiseAlertRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *RaiseAlertRequest) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *RaiseAlertRequest) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +func (x *RaiseAlertRequest) GetSeverity() string { + if x != nil { + return x.Severity + } + return "" +} + +func (x *RaiseAlertRequest) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *RaiseAlertRequest) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +func (x *RaiseAlertRequest) GetLink() string { + if x != nil { + return x.Link + } + return "" +} + +func (x *RaiseAlertRequest) GetCondition() bool { + if x != nil { + return x.Condition + } + return false +} + +type RaiseAlertResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Alert *Alert `protobuf:"bytes,1,opt,name=alert,proto3" json:"alert,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RaiseAlertResponse) Reset() { + *x = RaiseAlertResponse{} + mi := &file_state_v1_alert_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RaiseAlertResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RaiseAlertResponse) ProtoMessage() {} + +func (x *RaiseAlertResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_alert_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RaiseAlertResponse.ProtoReflect.Descriptor instead. +func (*RaiseAlertResponse) Descriptor() ([]byte, []int) { + return file_state_v1_alert_proto_rawDescGZIP(), []int{4} +} + +func (x *RaiseAlertResponse) GetAlert() *Alert { + if x != nil { + return x.Alert + } + return nil +} + +type ResolveAlertRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResolveAlertRequest) Reset() { + *x = ResolveAlertRequest{} + mi := &file_state_v1_alert_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResolveAlertRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResolveAlertRequest) ProtoMessage() {} + +func (x *ResolveAlertRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_alert_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResolveAlertRequest.ProtoReflect.Descriptor instead. +func (*ResolveAlertRequest) Descriptor() ([]byte, []int) { + return file_state_v1_alert_proto_rawDescGZIP(), []int{5} +} + +func (x *ResolveAlertRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *ResolveAlertRequest) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *ResolveAlertRequest) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +type ResolveAlertResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResolveAlertResponse) Reset() { + *x = ResolveAlertResponse{} + mi := &file_state_v1_alert_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResolveAlertResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResolveAlertResponse) ProtoMessage() {} + +func (x *ResolveAlertResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_alert_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResolveAlertResponse.ProtoReflect.Descriptor instead. +func (*ResolveAlertResponse) Descriptor() ([]byte, []int) { + return file_state_v1_alert_proto_rawDescGZIP(), []int{6} +} + +type DismissAlertRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DismissAlertRequest) Reset() { + *x = DismissAlertRequest{} + mi := &file_state_v1_alert_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DismissAlertRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DismissAlertRequest) ProtoMessage() {} + +func (x *DismissAlertRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_alert_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DismissAlertRequest.ProtoReflect.Descriptor instead. +func (*DismissAlertRequest) Descriptor() ([]byte, []int) { + return file_state_v1_alert_proto_rawDescGZIP(), []int{7} +} + +func (x *DismissAlertRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *DismissAlertRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +type DismissAlertResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DismissAlertResponse) Reset() { + *x = DismissAlertResponse{} + mi := &file_state_v1_alert_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DismissAlertResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DismissAlertResponse) ProtoMessage() {} + +func (x *DismissAlertResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_alert_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DismissAlertResponse.ProtoReflect.Descriptor instead. +func (*DismissAlertResponse) Descriptor() ([]byte, []int) { + return file_state_v1_alert_proto_rawDescGZIP(), []int{8} +} + +type ListAlertsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + // states defaults to open. + States []string `protobuf:"bytes,2,rep,name=states,proto3" json:"states,omitempty"` + Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListAlertsRequest) Reset() { + *x = ListAlertsRequest{} + mi := &file_state_v1_alert_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAlertsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAlertsRequest) ProtoMessage() {} + +func (x *ListAlertsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_alert_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAlertsRequest.ProtoReflect.Descriptor instead. +func (*ListAlertsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_alert_proto_rawDescGZIP(), []int{9} +} + +func (x *ListAlertsRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *ListAlertsRequest) GetStates() []string { + if x != nil { + return x.States + } + return nil +} + +func (x *ListAlertsRequest) GetLimit() int32 { + if x != nil { + return x.Limit + } + return 0 +} + +type ListAlertsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Alerts []*Alert `protobuf:"bytes,1,rep,name=alerts,proto3" json:"alerts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListAlertsResponse) Reset() { + *x = ListAlertsResponse{} + mi := &file_state_v1_alert_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAlertsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAlertsResponse) ProtoMessage() {} + +func (x *ListAlertsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_alert_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAlertsResponse.ProtoReflect.Descriptor instead. +func (*ListAlertsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_alert_proto_rawDescGZIP(), []int{10} +} + +func (x *ListAlertsResponse) GetAlerts() []*Alert { + if x != nil { + return x.Alerts + } + return nil +} + +type ClaimAlertDeliveriesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClaimAlertDeliveriesRequest) Reset() { + *x = ClaimAlertDeliveriesRequest{} + mi := &file_state_v1_alert_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClaimAlertDeliveriesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClaimAlertDeliveriesRequest) ProtoMessage() {} + +func (x *ClaimAlertDeliveriesRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_alert_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClaimAlertDeliveriesRequest.ProtoReflect.Descriptor instead. +func (*ClaimAlertDeliveriesRequest) Descriptor() ([]byte, []int) { + return file_state_v1_alert_proto_rawDescGZIP(), []int{11} +} + +func (x *ClaimAlertDeliveriesRequest) GetLimit() int32 { + if x != nil { + return x.Limit + } + return 0 +} + +type DueAlertDelivery struct { + state protoimpl.MessageState `protogen:"open.v1"` + Delivery *AlertDelivery `protobuf:"bytes,1,opt,name=delivery,proto3" json:"delivery,omitempty"` + Alert *Alert `protobuf:"bytes,2,opt,name=alert,proto3" json:"alert,omitempty"` + // attempt is the number of this try, counting from one. + Attempt int64 `protobuf:"varint,3,opt,name=attempt,proto3" json:"attempt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DueAlertDelivery) Reset() { + *x = DueAlertDelivery{} + mi := &file_state_v1_alert_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DueAlertDelivery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DueAlertDelivery) ProtoMessage() {} + +func (x *DueAlertDelivery) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_alert_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DueAlertDelivery.ProtoReflect.Descriptor instead. +func (*DueAlertDelivery) Descriptor() ([]byte, []int) { + return file_state_v1_alert_proto_rawDescGZIP(), []int{12} +} + +func (x *DueAlertDelivery) GetDelivery() *AlertDelivery { + if x != nil { + return x.Delivery + } + return nil +} + +func (x *DueAlertDelivery) GetAlert() *Alert { + if x != nil { + return x.Alert + } + return nil +} + +func (x *DueAlertDelivery) GetAttempt() int64 { + if x != nil { + return x.Attempt + } + return 0 +} + +type ClaimAlertDeliveriesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Due []*DueAlertDelivery `protobuf:"bytes,1,rep,name=due,proto3" json:"due,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClaimAlertDeliveriesResponse) Reset() { + *x = ClaimAlertDeliveriesResponse{} + mi := &file_state_v1_alert_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClaimAlertDeliveriesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClaimAlertDeliveriesResponse) ProtoMessage() {} + +func (x *ClaimAlertDeliveriesResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_alert_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClaimAlertDeliveriesResponse.ProtoReflect.Descriptor instead. +func (*ClaimAlertDeliveriesResponse) Descriptor() ([]byte, []int) { + return file_state_v1_alert_proto_rawDescGZIP(), []int{13} +} + +func (x *ClaimAlertDeliveriesResponse) GetDue() []*DueAlertDelivery { + if x != nil { + return x.Due + } + return nil +} + +type RecordAlertAttemptRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DeliveryId int64 `protobuf:"varint,1,opt,name=delivery_id,json=deliveryId,proto3" json:"delivery_id,omitempty"` + Skipped bool `protobuf:"varint,2,opt,name=skipped,proto3" json:"skipped,omitempty"` + StatusCode int64 `protobuf:"varint,3,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` + // error is empty on success. + Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordAlertAttemptRequest) Reset() { + *x = RecordAlertAttemptRequest{} + mi := &file_state_v1_alert_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordAlertAttemptRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordAlertAttemptRequest) ProtoMessage() {} + +func (x *RecordAlertAttemptRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_alert_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordAlertAttemptRequest.ProtoReflect.Descriptor instead. +func (*RecordAlertAttemptRequest) Descriptor() ([]byte, []int) { + return file_state_v1_alert_proto_rawDescGZIP(), []int{14} +} + +func (x *RecordAlertAttemptRequest) GetDeliveryId() int64 { + if x != nil { + return x.DeliveryId + } + return 0 +} + +func (x *RecordAlertAttemptRequest) GetSkipped() bool { + if x != nil { + return x.Skipped + } + return false +} + +func (x *RecordAlertAttemptRequest) GetStatusCode() int64 { + if x != nil { + return x.StatusCode + } + return 0 +} + +func (x *RecordAlertAttemptRequest) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +type RecordAlertAttemptResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordAlertAttemptResponse) Reset() { + *x = RecordAlertAttemptResponse{} + mi := &file_state_v1_alert_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordAlertAttemptResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordAlertAttemptResponse) ProtoMessage() {} + +func (x *RecordAlertAttemptResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_alert_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordAlertAttemptResponse.ProtoReflect.Descriptor instead. +func (*RecordAlertAttemptResponse) Descriptor() ([]byte, []int) { + return file_state_v1_alert_proto_rawDescGZIP(), []int{15} +} + +var File_state_v1_alert_proto protoreflect.FileDescriptor + +const file_state_v1_alert_proto_rawDesc = "" + + "\n" + + "\x14state/v1/alert.proto\x12\bstate.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x87\x04\n" + + "\x05Alert\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x15\n" + + "\x06org_id\x18\x02 \x01(\tR\x05orgId\x12\x12\n" + + "\x04kind\x18\x03 \x01(\tR\x04kind\x12\x18\n" + + "\asubject\x18\x04 \x01(\tR\asubject\x12\x1a\n" + + "\bseverity\x18\x05 \x01(\tR\bseverity\x12\x14\n" + + "\x05title\x18\x06 \x01(\tR\x05title\x12\x12\n" + + "\x04body\x18\a \x01(\tR\x04body\x12\x12\n" + + "\x04link\x18\b \x01(\tR\x04link\x12\x1c\n" + + "\tcondition\x18\t \x01(\bR\tcondition\x12\x14\n" + + "\x05state\x18\n" + + " \x01(\tR\x05state\x12=\n" + + "\ffirst_raised\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\vfirstRaised\x127\n" + + "\tlast_seen\x18\f \x01(\v2\x1a.google.protobuf.TimestampR\blastSeen\x12\x14\n" + + "\x05count\x18\r \x01(\x03R\x05count\x12\x1b\n" + + "\tclosed_by\x18\x0e \x01(\tR\bclosedBy\x127\n" + + "\tclosed_at\x18\x0f \x01(\v2\x1a.google.protobuf.TimestampR\bclosedAt\x127\n" + + "\n" + + "deliveries\x18\x10 \x03(\v2\x17.state.v1.AlertDeliveryR\n" + + "deliveries\"\xba\x01\n" + + "\rAlertDelivery\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x14\n" + + "\x05event\x18\x02 \x01(\tR\x05event\x12\x14\n" + + "\x05state\x18\x03 \x01(\tR\x05state\x129\n" + + "\n" + + "created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x122\n" + + "\battempts\x18\x05 \x03(\v2\x16.state.v1.AlertAttemptR\battempts\"\x7f\n" + + "\fAlertAttempt\x12\f\n" + + "\x01n\x18\x01 \x01(\x03R\x01n\x12*\n" + + "\x02at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x02at\x12\x1f\n" + + "\vstatus_code\x18\x03 \x01(\x03R\n" + + "statusCode\x12\x14\n" + + "\x05error\x18\x04 \x01(\tR\x05error\"\xd0\x01\n" + + "\x11RaiseAlertRequest\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x12\n" + + "\x04kind\x18\x02 \x01(\tR\x04kind\x12\x18\n" + + "\asubject\x18\x03 \x01(\tR\asubject\x12\x1a\n" + + "\bseverity\x18\x04 \x01(\tR\bseverity\x12\x14\n" + + "\x05title\x18\x05 \x01(\tR\x05title\x12\x12\n" + + "\x04body\x18\x06 \x01(\tR\x04body\x12\x12\n" + + "\x04link\x18\a \x01(\tR\x04link\x12\x1c\n" + + "\tcondition\x18\b \x01(\bR\tcondition\";\n" + + "\x12RaiseAlertResponse\x12%\n" + + "\x05alert\x18\x01 \x01(\v2\x0f.state.v1.AlertR\x05alert\"Z\n" + + "\x13ResolveAlertRequest\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x12\n" + + "\x04kind\x18\x02 \x01(\tR\x04kind\x12\x18\n" + + "\asubject\x18\x03 \x01(\tR\asubject\"\x16\n" + + "\x14ResolveAlertResponse\"<\n" + + "\x13DismissAlertRequest\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x0e\n" + + "\x02id\x18\x02 \x01(\x03R\x02id\"\x16\n" + + "\x14DismissAlertResponse\"X\n" + + "\x11ListAlertsRequest\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x16\n" + + "\x06states\x18\x02 \x03(\tR\x06states\x12\x14\n" + + "\x05limit\x18\x03 \x01(\x05R\x05limit\"=\n" + + "\x12ListAlertsResponse\x12'\n" + + "\x06alerts\x18\x01 \x03(\v2\x0f.state.v1.AlertR\x06alerts\"3\n" + + "\x1bClaimAlertDeliveriesRequest\x12\x14\n" + + "\x05limit\x18\x01 \x01(\x05R\x05limit\"\x88\x01\n" + + "\x10DueAlertDelivery\x123\n" + + "\bdelivery\x18\x01 \x01(\v2\x17.state.v1.AlertDeliveryR\bdelivery\x12%\n" + + "\x05alert\x18\x02 \x01(\v2\x0f.state.v1.AlertR\x05alert\x12\x18\n" + + "\aattempt\x18\x03 \x01(\x03R\aattempt\"L\n" + + "\x1cClaimAlertDeliveriesResponse\x12,\n" + + "\x03due\x18\x01 \x03(\v2\x1a.state.v1.DueAlertDeliveryR\x03due\"\x8d\x01\n" + + "\x19RecordAlertAttemptRequest\x12\x1f\n" + + "\vdelivery_id\x18\x01 \x01(\x03R\n" + + "deliveryId\x12\x18\n" + + "\askipped\x18\x02 \x01(\bR\askipped\x12\x1f\n" + + "\vstatus_code\x18\x03 \x01(\x03R\n" + + "statusCode\x12\x14\n" + + "\x05error\x18\x04 \x01(\tR\x05error\"\x1c\n" + + "\x1aRecordAlertAttemptResponse2\x86\x04\n" + + "\fAlertService\x12G\n" + + "\n" + + "RaiseAlert\x12\x1b.state.v1.RaiseAlertRequest\x1a\x1c.state.v1.RaiseAlertResponse\x12M\n" + + "\fResolveAlert\x12\x1d.state.v1.ResolveAlertRequest\x1a\x1e.state.v1.ResolveAlertResponse\x12M\n" + + "\fDismissAlert\x12\x1d.state.v1.DismissAlertRequest\x1a\x1e.state.v1.DismissAlertResponse\x12G\n" + + "\n" + + "ListAlerts\x12\x1b.state.v1.ListAlertsRequest\x1a\x1c.state.v1.ListAlertsResponse\x12e\n" + + "\x14ClaimAlertDeliveries\x12%.state.v1.ClaimAlertDeliveriesRequest\x1a&.state.v1.ClaimAlertDeliveriesResponse\x12_\n" + + "\x12RecordAlertAttempt\x12#.state.v1.RecordAlertAttemptRequest\x1a$.state.v1.RecordAlertAttemptResponseB\xa4\x01\n" + + "\fcom.state.v1B\n" + + "AlertProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_alert_proto_rawDescOnce sync.Once + file_state_v1_alert_proto_rawDescData []byte +) + +func file_state_v1_alert_proto_rawDescGZIP() []byte { + file_state_v1_alert_proto_rawDescOnce.Do(func() { + file_state_v1_alert_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_alert_proto_rawDesc), len(file_state_v1_alert_proto_rawDesc))) + }) + return file_state_v1_alert_proto_rawDescData +} + +var file_state_v1_alert_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_state_v1_alert_proto_goTypes = []any{ + (*Alert)(nil), // 0: state.v1.Alert + (*AlertDelivery)(nil), // 1: state.v1.AlertDelivery + (*AlertAttempt)(nil), // 2: state.v1.AlertAttempt + (*RaiseAlertRequest)(nil), // 3: state.v1.RaiseAlertRequest + (*RaiseAlertResponse)(nil), // 4: state.v1.RaiseAlertResponse + (*ResolveAlertRequest)(nil), // 5: state.v1.ResolveAlertRequest + (*ResolveAlertResponse)(nil), // 6: state.v1.ResolveAlertResponse + (*DismissAlertRequest)(nil), // 7: state.v1.DismissAlertRequest + (*DismissAlertResponse)(nil), // 8: state.v1.DismissAlertResponse + (*ListAlertsRequest)(nil), // 9: state.v1.ListAlertsRequest + (*ListAlertsResponse)(nil), // 10: state.v1.ListAlertsResponse + (*ClaimAlertDeliveriesRequest)(nil), // 11: state.v1.ClaimAlertDeliveriesRequest + (*DueAlertDelivery)(nil), // 12: state.v1.DueAlertDelivery + (*ClaimAlertDeliveriesResponse)(nil), // 13: state.v1.ClaimAlertDeliveriesResponse + (*RecordAlertAttemptRequest)(nil), // 14: state.v1.RecordAlertAttemptRequest + (*RecordAlertAttemptResponse)(nil), // 15: state.v1.RecordAlertAttemptResponse + (*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp +} +var file_state_v1_alert_proto_depIdxs = []int32{ + 16, // 0: state.v1.Alert.first_raised:type_name -> google.protobuf.Timestamp + 16, // 1: state.v1.Alert.last_seen:type_name -> google.protobuf.Timestamp + 16, // 2: state.v1.Alert.closed_at:type_name -> google.protobuf.Timestamp + 1, // 3: state.v1.Alert.deliveries:type_name -> state.v1.AlertDelivery + 16, // 4: state.v1.AlertDelivery.created_at:type_name -> google.protobuf.Timestamp + 2, // 5: state.v1.AlertDelivery.attempts:type_name -> state.v1.AlertAttempt + 16, // 6: state.v1.AlertAttempt.at:type_name -> google.protobuf.Timestamp + 0, // 7: state.v1.RaiseAlertResponse.alert:type_name -> state.v1.Alert + 0, // 8: state.v1.ListAlertsResponse.alerts:type_name -> state.v1.Alert + 1, // 9: state.v1.DueAlertDelivery.delivery:type_name -> state.v1.AlertDelivery + 0, // 10: state.v1.DueAlertDelivery.alert:type_name -> state.v1.Alert + 12, // 11: state.v1.ClaimAlertDeliveriesResponse.due:type_name -> state.v1.DueAlertDelivery + 3, // 12: state.v1.AlertService.RaiseAlert:input_type -> state.v1.RaiseAlertRequest + 5, // 13: state.v1.AlertService.ResolveAlert:input_type -> state.v1.ResolveAlertRequest + 7, // 14: state.v1.AlertService.DismissAlert:input_type -> state.v1.DismissAlertRequest + 9, // 15: state.v1.AlertService.ListAlerts:input_type -> state.v1.ListAlertsRequest + 11, // 16: state.v1.AlertService.ClaimAlertDeliveries:input_type -> state.v1.ClaimAlertDeliveriesRequest + 14, // 17: state.v1.AlertService.RecordAlertAttempt:input_type -> state.v1.RecordAlertAttemptRequest + 4, // 18: state.v1.AlertService.RaiseAlert:output_type -> state.v1.RaiseAlertResponse + 6, // 19: state.v1.AlertService.ResolveAlert:output_type -> state.v1.ResolveAlertResponse + 8, // 20: state.v1.AlertService.DismissAlert:output_type -> state.v1.DismissAlertResponse + 10, // 21: state.v1.AlertService.ListAlerts:output_type -> state.v1.ListAlertsResponse + 13, // 22: state.v1.AlertService.ClaimAlertDeliveries:output_type -> state.v1.ClaimAlertDeliveriesResponse + 15, // 23: state.v1.AlertService.RecordAlertAttempt:output_type -> state.v1.RecordAlertAttemptResponse + 18, // [18:24] is the sub-list for method output_type + 12, // [12:18] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_state_v1_alert_proto_init() } +func file_state_v1_alert_proto_init() { + if File_state_v1_alert_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_alert_proto_rawDesc), len(file_state_v1_alert_proto_rawDesc)), + NumEnums: 0, + NumMessages: 16, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_alert_proto_goTypes, + DependencyIndexes: file_state_v1_alert_proto_depIdxs, + MessageInfos: file_state_v1_alert_proto_msgTypes, + }.Build() + File_state_v1_alert_proto = out.File + file_state_v1_alert_proto_goTypes = nil + file_state_v1_alert_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/alert_grpc.pb.go b/internal/contracts/state/v1/alert_grpc.pb.go new file mode 100644 index 000000000..04ecea22e --- /dev/null +++ b/internal/contracts/state/v1/alert_grpc.pb.go @@ -0,0 +1,325 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/alert.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 ( + AlertService_RaiseAlert_FullMethodName = "/state.v1.AlertService/RaiseAlert" + AlertService_ResolveAlert_FullMethodName = "/state.v1.AlertService/ResolveAlert" + AlertService_DismissAlert_FullMethodName = "/state.v1.AlertService/DismissAlert" + AlertService_ListAlerts_FullMethodName = "/state.v1.AlertService/ListAlerts" + AlertService_ClaimAlertDeliveries_FullMethodName = "/state.v1.AlertService/ClaimAlertDeliveries" + AlertService_RecordAlertAttempt_FullMethodName = "/state.v1.AlertService/RecordAlertAttempt" +) + +// AlertServiceClient is the client API for AlertService 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. +// +// Operator alerts (internal/domain/alert). A caller acting for a principal +// reads, dismisses and raises only in that principal's org; a request org is +// ignored for it. A service acting for no one names the org itself. +// RaiseAlert and ResolveAlert are idempotent, so a periodic check can call +// them every tick. ClaimAlertDeliveries and RecordAlertAttempt serve the +// outbound webhook and refuse a caller scoped to an org. +type AlertServiceClient interface { + RaiseAlert(ctx context.Context, in *RaiseAlertRequest, opts ...grpc.CallOption) (*RaiseAlertResponse, error) + ResolveAlert(ctx context.Context, in *ResolveAlertRequest, opts ...grpc.CallOption) (*ResolveAlertResponse, error) + DismissAlert(ctx context.Context, in *DismissAlertRequest, opts ...grpc.CallOption) (*DismissAlertResponse, error) + ListAlerts(ctx context.Context, in *ListAlertsRequest, opts ...grpc.CallOption) (*ListAlertsResponse, error) + ClaimAlertDeliveries(ctx context.Context, in *ClaimAlertDeliveriesRequest, opts ...grpc.CallOption) (*ClaimAlertDeliveriesResponse, error) + RecordAlertAttempt(ctx context.Context, in *RecordAlertAttemptRequest, opts ...grpc.CallOption) (*RecordAlertAttemptResponse, error) +} + +type alertServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAlertServiceClient(cc grpc.ClientConnInterface) AlertServiceClient { + return &alertServiceClient{cc} +} + +func (c *alertServiceClient) RaiseAlert(ctx context.Context, in *RaiseAlertRequest, opts ...grpc.CallOption) (*RaiseAlertResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RaiseAlertResponse) + err := c.cc.Invoke(ctx, AlertService_RaiseAlert_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *alertServiceClient) ResolveAlert(ctx context.Context, in *ResolveAlertRequest, opts ...grpc.CallOption) (*ResolveAlertResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ResolveAlertResponse) + err := c.cc.Invoke(ctx, AlertService_ResolveAlert_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *alertServiceClient) DismissAlert(ctx context.Context, in *DismissAlertRequest, opts ...grpc.CallOption) (*DismissAlertResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DismissAlertResponse) + err := c.cc.Invoke(ctx, AlertService_DismissAlert_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *alertServiceClient) ListAlerts(ctx context.Context, in *ListAlertsRequest, opts ...grpc.CallOption) (*ListAlertsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListAlertsResponse) + err := c.cc.Invoke(ctx, AlertService_ListAlerts_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *alertServiceClient) ClaimAlertDeliveries(ctx context.Context, in *ClaimAlertDeliveriesRequest, opts ...grpc.CallOption) (*ClaimAlertDeliveriesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ClaimAlertDeliveriesResponse) + err := c.cc.Invoke(ctx, AlertService_ClaimAlertDeliveries_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *alertServiceClient) RecordAlertAttempt(ctx context.Context, in *RecordAlertAttemptRequest, opts ...grpc.CallOption) (*RecordAlertAttemptResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RecordAlertAttemptResponse) + err := c.cc.Invoke(ctx, AlertService_RecordAlertAttempt_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AlertServiceServer is the server API for AlertService service. +// All implementations must embed UnimplementedAlertServiceServer +// for forward compatibility. +// +// Operator alerts (internal/domain/alert). A caller acting for a principal +// reads, dismisses and raises only in that principal's org; a request org is +// ignored for it. A service acting for no one names the org itself. +// RaiseAlert and ResolveAlert are idempotent, so a periodic check can call +// them every tick. ClaimAlertDeliveries and RecordAlertAttempt serve the +// outbound webhook and refuse a caller scoped to an org. +type AlertServiceServer interface { + RaiseAlert(context.Context, *RaiseAlertRequest) (*RaiseAlertResponse, error) + ResolveAlert(context.Context, *ResolveAlertRequest) (*ResolveAlertResponse, error) + DismissAlert(context.Context, *DismissAlertRequest) (*DismissAlertResponse, error) + ListAlerts(context.Context, *ListAlertsRequest) (*ListAlertsResponse, error) + ClaimAlertDeliveries(context.Context, *ClaimAlertDeliveriesRequest) (*ClaimAlertDeliveriesResponse, error) + RecordAlertAttempt(context.Context, *RecordAlertAttemptRequest) (*RecordAlertAttemptResponse, error) + mustEmbedUnimplementedAlertServiceServer() +} + +// UnimplementedAlertServiceServer 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 UnimplementedAlertServiceServer struct{} + +func (UnimplementedAlertServiceServer) RaiseAlert(context.Context, *RaiseAlertRequest) (*RaiseAlertResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RaiseAlert not implemented") +} +func (UnimplementedAlertServiceServer) ResolveAlert(context.Context, *ResolveAlertRequest) (*ResolveAlertResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ResolveAlert not implemented") +} +func (UnimplementedAlertServiceServer) DismissAlert(context.Context, *DismissAlertRequest) (*DismissAlertResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DismissAlert not implemented") +} +func (UnimplementedAlertServiceServer) ListAlerts(context.Context, *ListAlertsRequest) (*ListAlertsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListAlerts not implemented") +} +func (UnimplementedAlertServiceServer) ClaimAlertDeliveries(context.Context, *ClaimAlertDeliveriesRequest) (*ClaimAlertDeliveriesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ClaimAlertDeliveries not implemented") +} +func (UnimplementedAlertServiceServer) RecordAlertAttempt(context.Context, *RecordAlertAttemptRequest) (*RecordAlertAttemptResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RecordAlertAttempt not implemented") +} +func (UnimplementedAlertServiceServer) mustEmbedUnimplementedAlertServiceServer() {} +func (UnimplementedAlertServiceServer) testEmbeddedByValue() {} + +// UnsafeAlertServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AlertServiceServer will +// result in compilation errors. +type UnsafeAlertServiceServer interface { + mustEmbedUnimplementedAlertServiceServer() +} + +func RegisterAlertServiceServer(s grpc.ServiceRegistrar, srv AlertServiceServer) { + // If the following call panics, it indicates UnimplementedAlertServiceServer 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(&AlertService_ServiceDesc, srv) +} + +func _AlertService_RaiseAlert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RaiseAlertRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AlertServiceServer).RaiseAlert(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AlertService_RaiseAlert_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AlertServiceServer).RaiseAlert(ctx, req.(*RaiseAlertRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AlertService_ResolveAlert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResolveAlertRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AlertServiceServer).ResolveAlert(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AlertService_ResolveAlert_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AlertServiceServer).ResolveAlert(ctx, req.(*ResolveAlertRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AlertService_DismissAlert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DismissAlertRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AlertServiceServer).DismissAlert(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AlertService_DismissAlert_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AlertServiceServer).DismissAlert(ctx, req.(*DismissAlertRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AlertService_ListAlerts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAlertsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AlertServiceServer).ListAlerts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AlertService_ListAlerts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AlertServiceServer).ListAlerts(ctx, req.(*ListAlertsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AlertService_ClaimAlertDeliveries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClaimAlertDeliveriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AlertServiceServer).ClaimAlertDeliveries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AlertService_ClaimAlertDeliveries_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AlertServiceServer).ClaimAlertDeliveries(ctx, req.(*ClaimAlertDeliveriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AlertService_RecordAlertAttempt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RecordAlertAttemptRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AlertServiceServer).RecordAlertAttempt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AlertService_RecordAlertAttempt_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AlertServiceServer).RecordAlertAttempt(ctx, req.(*RecordAlertAttemptRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AlertService_ServiceDesc is the grpc.ServiceDesc for AlertService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AlertService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.AlertService", + HandlerType: (*AlertServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RaiseAlert", + Handler: _AlertService_RaiseAlert_Handler, + }, + { + MethodName: "ResolveAlert", + Handler: _AlertService_ResolveAlert_Handler, + }, + { + MethodName: "DismissAlert", + Handler: _AlertService_DismissAlert_Handler, + }, + { + MethodName: "ListAlerts", + Handler: _AlertService_ListAlerts_Handler, + }, + { + MethodName: "ClaimAlertDeliveries", + Handler: _AlertService_ClaimAlertDeliveries_Handler, + }, + { + MethodName: "RecordAlertAttempt", + Handler: _AlertService_RecordAlertAttempt_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "state/v1/alert.proto", +} diff --git a/internal/contracts/state/v1/binding.pb.go b/internal/contracts/state/v1/binding.pb.go new file mode 100644 index 000000000..6af30ce40 --- /dev/null +++ b/internal/contracts/state/v1/binding.pb.go @@ -0,0 +1,1158 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/binding.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// BindingMatcher mirrors internal/domain/binding.Matcher. +type BindingMatcher struct { + state protoimpl.MessageState `protogen:"open.v1"` + Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BindingMatcher) Reset() { + *x = BindingMatcher{} + mi := &file_state_v1_binding_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BindingMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BindingMatcher) ProtoMessage() {} + +func (x *BindingMatcher) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BindingMatcher.ProtoReflect.Descriptor instead. +func (*BindingMatcher) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{0} +} + +func (x *BindingMatcher) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +// Binding mirrors internal/domain/binding.Binding. +type Binding struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Matcher *BindingMatcher `protobuf:"bytes,3,opt,name=matcher,proto3" json:"matcher,omitempty"` + MappingId string `protobuf:"bytes,4,opt,name=mapping_id,json=mappingId,proto3" json:"mapping_id,omitempty"` + Workflow string `protobuf:"bytes,5,opt,name=workflow,proto3" json:"workflow,omitempty"` + Owner string `protobuf:"bytes,6,opt,name=owner,proto3" json:"owner,omitempty"` + Repo string `protobuf:"bytes,7,opt,name=repo,proto3" json:"repo,omitempty"` + Version int64 `protobuf:"varint,8,opt,name=version,proto3" json:"version,omitempty"` + Status string `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Filter string `protobuf:"bytes,13,opt,name=filter,proto3" json:"filter,omitempty"` + // inputs_json assigns workflow inputs, a JSON object of + // {"param": name} or {"value": constant} per input. + InputsJson string `protobuf:"bytes,14,opt,name=inputs_json,json=inputsJson,proto3" json:"inputs_json,omitempty"` + // repo_param names the mapped parameter holding "owner/name". + RepoParam string `protobuf:"bytes,15,opt,name=repo_param,json=repoParam,proto3" json:"repo_param,omitempty"` + // org_id is the org that owns the binding; it is read-only here. + OrgId string `protobuf:"bytes,16,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + // workspace_id is its source's workspace; read-only here. + WorkspaceId string `protobuf:"bytes,17,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Binding) Reset() { + *x = Binding{} + mi := &file_state_v1_binding_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Binding) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Binding) ProtoMessage() {} + +func (x *Binding) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Binding.ProtoReflect.Descriptor instead. +func (*Binding) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{1} +} + +func (x *Binding) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Binding) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Binding) GetMatcher() *BindingMatcher { + if x != nil { + return x.Matcher + } + return nil +} + +func (x *Binding) GetMappingId() string { + if x != nil { + return x.MappingId + } + return "" +} + +func (x *Binding) GetWorkflow() string { + if x != nil { + return x.Workflow + } + return "" +} + +func (x *Binding) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *Binding) GetRepo() string { + if x != nil { + return x.Repo + } + return "" +} + +func (x *Binding) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *Binding) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *Binding) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Binding) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *Binding) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *Binding) GetInputsJson() string { + if x != nil { + return x.InputsJson + } + return "" +} + +func (x *Binding) GetRepoParam() string { + if x != nil { + return x.RepoParam + } + return "" +} + +func (x *Binding) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *Binding) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +type InsertBindingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Binding *Binding `protobuf:"bytes,1,opt,name=binding,proto3" json:"binding,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InsertBindingRequest) Reset() { + *x = InsertBindingRequest{} + mi := &file_state_v1_binding_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InsertBindingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InsertBindingRequest) ProtoMessage() {} + +func (x *InsertBindingRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InsertBindingRequest.ProtoReflect.Descriptor instead. +func (*InsertBindingRequest) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{2} +} + +func (x *InsertBindingRequest) GetBinding() *Binding { + if x != nil { + return x.Binding + } + return nil +} + +type InsertBindingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InsertBindingResponse) Reset() { + *x = InsertBindingResponse{} + mi := &file_state_v1_binding_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InsertBindingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InsertBindingResponse) ProtoMessage() {} + +func (x *InsertBindingResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InsertBindingResponse.ProtoReflect.Descriptor instead. +func (*InsertBindingResponse) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{3} +} + +func (x *InsertBindingResponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetBindingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBindingRequest) Reset() { + *x = GetBindingRequest{} + mi := &file_state_v1_binding_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBindingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBindingRequest) ProtoMessage() {} + +func (x *GetBindingRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBindingRequest.ProtoReflect.Descriptor instead. +func (*GetBindingRequest) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{4} +} + +func (x *GetBindingRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetBindingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Binding *Binding `protobuf:"bytes,1,opt,name=binding,proto3" json:"binding,omitempty"` + Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBindingResponse) Reset() { + *x = GetBindingResponse{} + mi := &file_state_v1_binding_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBindingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBindingResponse) ProtoMessage() {} + +func (x *GetBindingResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBindingResponse.ProtoReflect.Descriptor instead. +func (*GetBindingResponse) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{5} +} + +func (x *GetBindingResponse) GetBinding() *Binding { + if x != nil { + return x.Binding + } + return nil +} + +func (x *GetBindingResponse) GetFound() bool { + if x != nil { + return x.Found + } + return false +} + +type ListBindingsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListBindingsRequest) Reset() { + *x = ListBindingsRequest{} + mi := &file_state_v1_binding_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListBindingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBindingsRequest) ProtoMessage() {} + +func (x *ListBindingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBindingsRequest.ProtoReflect.Descriptor instead. +func (*ListBindingsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{6} +} + +type ListBindingsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Bindings []*Binding `protobuf:"bytes,1,rep,name=bindings,proto3" json:"bindings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListBindingsResponse) Reset() { + *x = ListBindingsResponse{} + mi := &file_state_v1_binding_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListBindingsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBindingsResponse) ProtoMessage() {} + +func (x *ListBindingsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBindingsResponse.ProtoReflect.Descriptor instead. +func (*ListBindingsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{7} +} + +func (x *ListBindingsResponse) GetBindings() []*Binding { + if x != nil { + return x.Bindings + } + return nil +} + +type UpdateBindingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Binding *Binding `protobuf:"bytes,1,opt,name=binding,proto3" json:"binding,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateBindingRequest) Reset() { + *x = UpdateBindingRequest{} + mi := &file_state_v1_binding_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateBindingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateBindingRequest) ProtoMessage() {} + +func (x *UpdateBindingRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateBindingRequest.ProtoReflect.Descriptor instead. +func (*UpdateBindingRequest) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateBindingRequest) GetBinding() *Binding { + if x != nil { + return x.Binding + } + return nil +} + +type UpdateBindingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateBindingResponse) Reset() { + *x = UpdateBindingResponse{} + mi := &file_state_v1_binding_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateBindingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateBindingResponse) ProtoMessage() {} + +func (x *UpdateBindingResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateBindingResponse.ProtoReflect.Descriptor instead. +func (*UpdateBindingResponse) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{9} +} + +type DeleteBindingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteBindingRequest) Reset() { + *x = DeleteBindingRequest{} + mi := &file_state_v1_binding_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteBindingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteBindingRequest) ProtoMessage() {} + +func (x *DeleteBindingRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteBindingRequest.ProtoReflect.Descriptor instead. +func (*DeleteBindingRequest) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{10} +} + +func (x *DeleteBindingRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteBindingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteBindingResponse) Reset() { + *x = DeleteBindingResponse{} + mi := &file_state_v1_binding_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteBindingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteBindingResponse) ProtoMessage() {} + +func (x *DeleteBindingResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteBindingResponse.ProtoReflect.Descriptor instead. +func (*DeleteBindingResponse) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{11} +} + +type ApproveBindingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ApproveBindingRequest) Reset() { + *x = ApproveBindingRequest{} + mi := &file_state_v1_binding_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApproveBindingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApproveBindingRequest) ProtoMessage() {} + +func (x *ApproveBindingRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApproveBindingRequest.ProtoReflect.Descriptor instead. +func (*ApproveBindingRequest) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{12} +} + +func (x *ApproveBindingRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ApproveBindingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ApproveBindingResponse) Reset() { + *x = ApproveBindingResponse{} + mi := &file_state_v1_binding_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApproveBindingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApproveBindingResponse) ProtoMessage() {} + +func (x *ApproveBindingResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApproveBindingResponse.ProtoReflect.Descriptor instead. +func (*ApproveBindingResponse) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{13} +} + +type PauseBindingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PauseBindingRequest) Reset() { + *x = PauseBindingRequest{} + mi := &file_state_v1_binding_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PauseBindingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PauseBindingRequest) ProtoMessage() {} + +func (x *PauseBindingRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PauseBindingRequest.ProtoReflect.Descriptor instead. +func (*PauseBindingRequest) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{14} +} + +func (x *PauseBindingRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type PauseBindingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PauseBindingResponse) Reset() { + *x = PauseBindingResponse{} + mi := &file_state_v1_binding_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PauseBindingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PauseBindingResponse) ProtoMessage() {} + +func (x *PauseBindingResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PauseBindingResponse.ProtoReflect.Descriptor instead. +func (*PauseBindingResponse) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{15} +} + +type ResumeBindingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResumeBindingRequest) Reset() { + *x = ResumeBindingRequest{} + mi := &file_state_v1_binding_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResumeBindingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResumeBindingRequest) ProtoMessage() {} + +func (x *ResumeBindingRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResumeBindingRequest.ProtoReflect.Descriptor instead. +func (*ResumeBindingRequest) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{16} +} + +func (x *ResumeBindingRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ResumeBindingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResumeBindingResponse) Reset() { + *x = ResumeBindingResponse{} + mi := &file_state_v1_binding_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResumeBindingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResumeBindingResponse) ProtoMessage() {} + +func (x *ResumeBindingResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResumeBindingResponse.ProtoReflect.Descriptor instead. +func (*ResumeBindingResponse) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{17} +} + +type ArmedBindingsForSourceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ArmedBindingsForSourceRequest) Reset() { + *x = ArmedBindingsForSourceRequest{} + mi := &file_state_v1_binding_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ArmedBindingsForSourceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArmedBindingsForSourceRequest) ProtoMessage() {} + +func (x *ArmedBindingsForSourceRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArmedBindingsForSourceRequest.ProtoReflect.Descriptor instead. +func (*ArmedBindingsForSourceRequest) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{18} +} + +func (x *ArmedBindingsForSourceRequest) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +type ArmedBindingsForSourceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Bindings []*Binding `protobuf:"bytes,1,rep,name=bindings,proto3" json:"bindings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ArmedBindingsForSourceResponse) Reset() { + *x = ArmedBindingsForSourceResponse{} + mi := &file_state_v1_binding_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ArmedBindingsForSourceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArmedBindingsForSourceResponse) ProtoMessage() {} + +func (x *ArmedBindingsForSourceResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_binding_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArmedBindingsForSourceResponse.ProtoReflect.Descriptor instead. +func (*ArmedBindingsForSourceResponse) Descriptor() ([]byte, []int) { + return file_state_v1_binding_proto_rawDescGZIP(), []int{19} +} + +func (x *ArmedBindingsForSourceResponse) GetBindings() []*Binding { + if x != nil { + return x.Bindings + } + return nil +} + +var File_state_v1_binding_proto protoreflect.FileDescriptor + +const file_state_v1_binding_proto_rawDesc = "" + + "\n" + + "\x16state/v1/binding.proto\x12\bstate.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"(\n" + + "\x0eBindingMatcher\x12\x16\n" + + "\x06source\x18\x01 \x01(\tR\x06source\"\x8e\x04\n" + + "\aBinding\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x122\n" + + "\amatcher\x18\x03 \x01(\v2\x18.state.v1.BindingMatcherR\amatcher\x12\x1d\n" + + "\n" + + "mapping_id\x18\x04 \x01(\tR\tmappingId\x12\x1a\n" + + "\bworkflow\x18\x05 \x01(\tR\bworkflow\x12\x14\n" + + "\x05owner\x18\x06 \x01(\tR\x05owner\x12\x12\n" + + "\x04repo\x18\a \x01(\tR\x04repo\x12\x18\n" + + "\aversion\x18\b \x01(\x03R\aversion\x12\x16\n" + + "\x06status\x18\t \x01(\tR\x06status\x129\n" + + "\n" + + "created_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\f \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x16\n" + + "\x06filter\x18\r \x01(\tR\x06filter\x12\x1f\n" + + "\vinputs_json\x18\x0e \x01(\tR\n" + + "inputsJson\x12\x1d\n" + + "\n" + + "repo_param\x18\x0f \x01(\tR\trepoParam\x12\x15\n" + + "\x06org_id\x18\x10 \x01(\tR\x05orgId\x12!\n" + + "\fworkspace_id\x18\x11 \x01(\tR\vworkspaceIdJ\x04\b\n" + + "\x10\vR\x06secret\"C\n" + + "\x14InsertBindingRequest\x12+\n" + + "\abinding\x18\x01 \x01(\v2\x11.state.v1.BindingR\abinding\"'\n" + + "\x15InsertBindingResponse\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"#\n" + + "\x11GetBindingRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"W\n" + + "\x12GetBindingResponse\x12+\n" + + "\abinding\x18\x01 \x01(\v2\x11.state.v1.BindingR\abinding\x12\x14\n" + + "\x05found\x18\x02 \x01(\bR\x05found\"\x15\n" + + "\x13ListBindingsRequest\"E\n" + + "\x14ListBindingsResponse\x12-\n" + + "\bbindings\x18\x01 \x03(\v2\x11.state.v1.BindingR\bbindings\"C\n" + + "\x14UpdateBindingRequest\x12+\n" + + "\abinding\x18\x01 \x01(\v2\x11.state.v1.BindingR\abinding\"\x17\n" + + "\x15UpdateBindingResponse\"&\n" + + "\x14DeleteBindingRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\x17\n" + + "\x15DeleteBindingResponse\"'\n" + + "\x15ApproveBindingRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\x18\n" + + "\x16ApproveBindingResponse\"%\n" + + "\x13PauseBindingRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\x16\n" + + "\x14PauseBindingResponse\"&\n" + + "\x14ResumeBindingRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\x17\n" + + "\x15ResumeBindingResponse\"7\n" + + "\x1dArmedBindingsForSourceRequest\x12\x16\n" + + "\x06source\x18\x01 \x01(\tR\x06source\"O\n" + + "\x1eArmedBindingsForSourceResponse\x12-\n" + + "\bbindings\x18\x01 \x03(\v2\x11.state.v1.BindingR\bbindings2\x81\x06\n" + + "\x0eBindingService\x12P\n" + + "\rInsertBinding\x12\x1e.state.v1.InsertBindingRequest\x1a\x1f.state.v1.InsertBindingResponse\x12G\n" + + "\n" + + "GetBinding\x12\x1b.state.v1.GetBindingRequest\x1a\x1c.state.v1.GetBindingResponse\x12M\n" + + "\fListBindings\x12\x1d.state.v1.ListBindingsRequest\x1a\x1e.state.v1.ListBindingsResponse\x12P\n" + + "\rUpdateBinding\x12\x1e.state.v1.UpdateBindingRequest\x1a\x1f.state.v1.UpdateBindingResponse\x12P\n" + + "\rDeleteBinding\x12\x1e.state.v1.DeleteBindingRequest\x1a\x1f.state.v1.DeleteBindingResponse\x12S\n" + + "\x0eApproveBinding\x12\x1f.state.v1.ApproveBindingRequest\x1a .state.v1.ApproveBindingResponse\x12M\n" + + "\fPauseBinding\x12\x1d.state.v1.PauseBindingRequest\x1a\x1e.state.v1.PauseBindingResponse\x12P\n" + + "\rResumeBinding\x12\x1e.state.v1.ResumeBindingRequest\x1a\x1f.state.v1.ResumeBindingResponse\x12k\n" + + "\x16ArmedBindingsForSource\x12'.state.v1.ArmedBindingsForSourceRequest\x1a(.state.v1.ArmedBindingsForSourceResponseB\xa6\x01\n" + + "\fcom.state.v1B\fBindingProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_binding_proto_rawDescOnce sync.Once + file_state_v1_binding_proto_rawDescData []byte +) + +func file_state_v1_binding_proto_rawDescGZIP() []byte { + file_state_v1_binding_proto_rawDescOnce.Do(func() { + file_state_v1_binding_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_binding_proto_rawDesc), len(file_state_v1_binding_proto_rawDesc))) + }) + return file_state_v1_binding_proto_rawDescData +} + +var file_state_v1_binding_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_state_v1_binding_proto_goTypes = []any{ + (*BindingMatcher)(nil), // 0: state.v1.BindingMatcher + (*Binding)(nil), // 1: state.v1.Binding + (*InsertBindingRequest)(nil), // 2: state.v1.InsertBindingRequest + (*InsertBindingResponse)(nil), // 3: state.v1.InsertBindingResponse + (*GetBindingRequest)(nil), // 4: state.v1.GetBindingRequest + (*GetBindingResponse)(nil), // 5: state.v1.GetBindingResponse + (*ListBindingsRequest)(nil), // 6: state.v1.ListBindingsRequest + (*ListBindingsResponse)(nil), // 7: state.v1.ListBindingsResponse + (*UpdateBindingRequest)(nil), // 8: state.v1.UpdateBindingRequest + (*UpdateBindingResponse)(nil), // 9: state.v1.UpdateBindingResponse + (*DeleteBindingRequest)(nil), // 10: state.v1.DeleteBindingRequest + (*DeleteBindingResponse)(nil), // 11: state.v1.DeleteBindingResponse + (*ApproveBindingRequest)(nil), // 12: state.v1.ApproveBindingRequest + (*ApproveBindingResponse)(nil), // 13: state.v1.ApproveBindingResponse + (*PauseBindingRequest)(nil), // 14: state.v1.PauseBindingRequest + (*PauseBindingResponse)(nil), // 15: state.v1.PauseBindingResponse + (*ResumeBindingRequest)(nil), // 16: state.v1.ResumeBindingRequest + (*ResumeBindingResponse)(nil), // 17: state.v1.ResumeBindingResponse + (*ArmedBindingsForSourceRequest)(nil), // 18: state.v1.ArmedBindingsForSourceRequest + (*ArmedBindingsForSourceResponse)(nil), // 19: state.v1.ArmedBindingsForSourceResponse + (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp +} +var file_state_v1_binding_proto_depIdxs = []int32{ + 0, // 0: state.v1.Binding.matcher:type_name -> state.v1.BindingMatcher + 20, // 1: state.v1.Binding.created_at:type_name -> google.protobuf.Timestamp + 20, // 2: state.v1.Binding.updated_at:type_name -> google.protobuf.Timestamp + 1, // 3: state.v1.InsertBindingRequest.binding:type_name -> state.v1.Binding + 1, // 4: state.v1.GetBindingResponse.binding:type_name -> state.v1.Binding + 1, // 5: state.v1.ListBindingsResponse.bindings:type_name -> state.v1.Binding + 1, // 6: state.v1.UpdateBindingRequest.binding:type_name -> state.v1.Binding + 1, // 7: state.v1.ArmedBindingsForSourceResponse.bindings:type_name -> state.v1.Binding + 2, // 8: state.v1.BindingService.InsertBinding:input_type -> state.v1.InsertBindingRequest + 4, // 9: state.v1.BindingService.GetBinding:input_type -> state.v1.GetBindingRequest + 6, // 10: state.v1.BindingService.ListBindings:input_type -> state.v1.ListBindingsRequest + 8, // 11: state.v1.BindingService.UpdateBinding:input_type -> state.v1.UpdateBindingRequest + 10, // 12: state.v1.BindingService.DeleteBinding:input_type -> state.v1.DeleteBindingRequest + 12, // 13: state.v1.BindingService.ApproveBinding:input_type -> state.v1.ApproveBindingRequest + 14, // 14: state.v1.BindingService.PauseBinding:input_type -> state.v1.PauseBindingRequest + 16, // 15: state.v1.BindingService.ResumeBinding:input_type -> state.v1.ResumeBindingRequest + 18, // 16: state.v1.BindingService.ArmedBindingsForSource:input_type -> state.v1.ArmedBindingsForSourceRequest + 3, // 17: state.v1.BindingService.InsertBinding:output_type -> state.v1.InsertBindingResponse + 5, // 18: state.v1.BindingService.GetBinding:output_type -> state.v1.GetBindingResponse + 7, // 19: state.v1.BindingService.ListBindings:output_type -> state.v1.ListBindingsResponse + 9, // 20: state.v1.BindingService.UpdateBinding:output_type -> state.v1.UpdateBindingResponse + 11, // 21: state.v1.BindingService.DeleteBinding:output_type -> state.v1.DeleteBindingResponse + 13, // 22: state.v1.BindingService.ApproveBinding:output_type -> state.v1.ApproveBindingResponse + 15, // 23: state.v1.BindingService.PauseBinding:output_type -> state.v1.PauseBindingResponse + 17, // 24: state.v1.BindingService.ResumeBinding:output_type -> state.v1.ResumeBindingResponse + 19, // 25: state.v1.BindingService.ArmedBindingsForSource:output_type -> state.v1.ArmedBindingsForSourceResponse + 17, // [17:26] is the sub-list for method output_type + 8, // [8:17] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_state_v1_binding_proto_init() } +func file_state_v1_binding_proto_init() { + if File_state_v1_binding_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_binding_proto_rawDesc), len(file_state_v1_binding_proto_rawDesc)), + NumEnums: 0, + NumMessages: 20, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_binding_proto_goTypes, + DependencyIndexes: file_state_v1_binding_proto_depIdxs, + MessageInfos: file_state_v1_binding_proto_msgTypes, + }.Build() + File_state_v1_binding_proto = out.File + file_state_v1_binding_proto_goTypes = nil + file_state_v1_binding_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/binding_grpc.pb.go b/internal/contracts/state/v1/binding_grpc.pb.go new file mode 100644 index 000000000..958b42829 --- /dev/null +++ b/internal/contracts/state/v1/binding_grpc.pb.go @@ -0,0 +1,425 @@ +// 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", +} diff --git a/internal/contracts/state/v1/capture.pb.go b/internal/contracts/state/v1/capture.pb.go new file mode 100644 index 000000000..1c0400679 --- /dev/null +++ b/internal/contracts/state/v1/capture.pb.go @@ -0,0 +1,835 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/capture.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// CapturedEvent mirrors storecontract.CapturedEvent. +type CapturedEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ReceivedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=received_at,json=receivedAt,proto3" json:"received_at,omitempty"` + Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"` + RemoteAddr string `protobuf:"bytes,4,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"` + ContentType string `protobuf:"bytes,5,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` + Headers string `protobuf:"bytes,6,opt,name=headers,proto3" json:"headers,omitempty"` + Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"` + Authenticated bool `protobuf:"varint,8,opt,name=authenticated,proto3" json:"authenticated,omitempty"` + // event_type is the ID of the event type the capture was identified as on + // arrival; empty is unidentified. + EventType string `protobuf:"bytes,9,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` + // unsigned marks an event taken on an approved unsigned source. + Unsigned bool `protobuf:"varint,10,opt,name=unsigned,proto3" json:"unsigned,omitempty"` + // delivery names the sender's delivery; a retry of one delivery shares it. + // Intake sets it from the source's delivery header; empty takes the + // capture ID. + Delivery string `protobuf:"bytes,11,opt,name=delivery,proto3" json:"delivery,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CapturedEvent) Reset() { + *x = CapturedEvent{} + mi := &file_state_v1_capture_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CapturedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CapturedEvent) ProtoMessage() {} + +func (x *CapturedEvent) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_capture_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CapturedEvent.ProtoReflect.Descriptor instead. +func (*CapturedEvent) Descriptor() ([]byte, []int) { + return file_state_v1_capture_proto_rawDescGZIP(), []int{0} +} + +func (x *CapturedEvent) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CapturedEvent) GetReceivedAt() *timestamppb.Timestamp { + if x != nil { + return x.ReceivedAt + } + return nil +} + +func (x *CapturedEvent) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +func (x *CapturedEvent) GetRemoteAddr() string { + if x != nil { + return x.RemoteAddr + } + return "" +} + +func (x *CapturedEvent) GetContentType() string { + if x != nil { + return x.ContentType + } + return "" +} + +func (x *CapturedEvent) GetHeaders() string { + if x != nil { + return x.Headers + } + return "" +} + +func (x *CapturedEvent) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +func (x *CapturedEvent) GetAuthenticated() bool { + if x != nil { + return x.Authenticated + } + return false +} + +func (x *CapturedEvent) GetEventType() string { + if x != nil { + return x.EventType + } + return "" +} + +func (x *CapturedEvent) GetUnsigned() bool { + if x != nil { + return x.Unsigned + } + return false +} + +func (x *CapturedEvent) GetDelivery() string { + if x != nil { + return x.Delivery + } + return "" +} + +type RecordCaptureRefusalRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` + RefusedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=refused_at,json=refusedAt,proto3" json:"refused_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordCaptureRefusalRequest) Reset() { + *x = RecordCaptureRefusalRequest{} + mi := &file_state_v1_capture_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordCaptureRefusalRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordCaptureRefusalRequest) ProtoMessage() {} + +func (x *RecordCaptureRefusalRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_capture_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordCaptureRefusalRequest.ProtoReflect.Descriptor instead. +func (*RecordCaptureRefusalRequest) Descriptor() ([]byte, []int) { + return file_state_v1_capture_proto_rawDescGZIP(), []int{1} +} + +func (x *RecordCaptureRefusalRequest) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +func (x *RecordCaptureRefusalRequest) GetAddr() string { + if x != nil { + return x.Addr + } + return "" +} + +func (x *RecordCaptureRefusalRequest) GetRefusedAt() *timestamppb.Timestamp { + if x != nil { + return x.RefusedAt + } + return nil +} + +type RecordCaptureRefusalResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordCaptureRefusalResponse) Reset() { + *x = RecordCaptureRefusalResponse{} + mi := &file_state_v1_capture_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordCaptureRefusalResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordCaptureRefusalResponse) ProtoMessage() {} + +func (x *RecordCaptureRefusalResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_capture_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordCaptureRefusalResponse.ProtoReflect.Descriptor instead. +func (*RecordCaptureRefusalResponse) Descriptor() ([]byte, []int) { + return file_state_v1_capture_proto_rawDescGZIP(), []int{2} +} + +type ListCaptureRefusalsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Since *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=since,proto3" json:"since,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListCaptureRefusalsRequest) Reset() { + *x = ListCaptureRefusalsRequest{} + mi := &file_state_v1_capture_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListCaptureRefusalsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCaptureRefusalsRequest) ProtoMessage() {} + +func (x *ListCaptureRefusalsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_capture_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCaptureRefusalsRequest.ProtoReflect.Descriptor instead. +func (*ListCaptureRefusalsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_capture_proto_rawDescGZIP(), []int{3} +} + +func (x *ListCaptureRefusalsRequest) GetSince() *timestamppb.Timestamp { + if x != nil { + return x.Since + } + return nil +} + +type CaptureRefusals struct { + state protoimpl.MessageState `protogen:"open.v1"` + Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + Refused int64 `protobuf:"varint,2,opt,name=refused,proto3" json:"refused,omitempty"` + Accepted int64 `protobuf:"varint,3,opt,name=accepted,proto3" json:"accepted,omitempty"` + Addrs []string `protobuf:"bytes,4,rep,name=addrs,proto3" json:"addrs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CaptureRefusals) Reset() { + *x = CaptureRefusals{} + mi := &file_state_v1_capture_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CaptureRefusals) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CaptureRefusals) ProtoMessage() {} + +func (x *CaptureRefusals) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_capture_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CaptureRefusals.ProtoReflect.Descriptor instead. +func (*CaptureRefusals) Descriptor() ([]byte, []int) { + return file_state_v1_capture_proto_rawDescGZIP(), []int{4} +} + +func (x *CaptureRefusals) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +func (x *CaptureRefusals) GetRefused() int64 { + if x != nil { + return x.Refused + } + return 0 +} + +func (x *CaptureRefusals) GetAccepted() int64 { + if x != nil { + return x.Accepted + } + return 0 +} + +func (x *CaptureRefusals) GetAddrs() []string { + if x != nil { + return x.Addrs + } + return nil +} + +type ListCaptureRefusalsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sources []*CaptureRefusals `protobuf:"bytes,1,rep,name=sources,proto3" json:"sources,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListCaptureRefusalsResponse) Reset() { + *x = ListCaptureRefusalsResponse{} + mi := &file_state_v1_capture_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListCaptureRefusalsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCaptureRefusalsResponse) ProtoMessage() {} + +func (x *ListCaptureRefusalsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_capture_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCaptureRefusalsResponse.ProtoReflect.Descriptor instead. +func (*ListCaptureRefusalsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_capture_proto_rawDescGZIP(), []int{5} +} + +func (x *ListCaptureRefusalsResponse) GetSources() []*CaptureRefusals { + if x != nil { + return x.Sources + } + return nil +} + +type InsertCaptureRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Capture *CapturedEvent `protobuf:"bytes,1,opt,name=capture,proto3" json:"capture,omitempty"` + RetentionSeconds int64 `protobuf:"varint,2,opt,name=retention_seconds,json=retentionSeconds,proto3" json:"retention_seconds,omitempty"` + MaxEvents int64 `protobuf:"varint,3,opt,name=max_events,json=maxEvents,proto3" json:"max_events,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InsertCaptureRequest) Reset() { + *x = InsertCaptureRequest{} + mi := &file_state_v1_capture_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InsertCaptureRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InsertCaptureRequest) ProtoMessage() {} + +func (x *InsertCaptureRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_capture_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InsertCaptureRequest.ProtoReflect.Descriptor instead. +func (*InsertCaptureRequest) Descriptor() ([]byte, []int) { + return file_state_v1_capture_proto_rawDescGZIP(), []int{6} +} + +func (x *InsertCaptureRequest) GetCapture() *CapturedEvent { + if x != nil { + return x.Capture + } + return nil +} + +func (x *InsertCaptureRequest) GetRetentionSeconds() int64 { + if x != nil { + return x.RetentionSeconds + } + return 0 +} + +func (x *InsertCaptureRequest) GetMaxEvents() int64 { + if x != nil { + return x.MaxEvents + } + return 0 +} + +type InsertCaptureResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InsertCaptureResponse) Reset() { + *x = InsertCaptureResponse{} + mi := &file_state_v1_capture_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InsertCaptureResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InsertCaptureResponse) ProtoMessage() {} + +func (x *InsertCaptureResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_capture_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InsertCaptureResponse.ProtoReflect.Descriptor instead. +func (*InsertCaptureResponse) Descriptor() ([]byte, []int) { + return file_state_v1_capture_proto_rawDescGZIP(), []int{7} +} + +func (x *InsertCaptureResponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type StreamCapturesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StreamCapturesRequest) Reset() { + *x = StreamCapturesRequest{} + mi := &file_state_v1_capture_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamCapturesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamCapturesRequest) ProtoMessage() {} + +func (x *StreamCapturesRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_capture_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamCapturesRequest.ProtoReflect.Descriptor instead. +func (*StreamCapturesRequest) Descriptor() ([]byte, []int) { + return file_state_v1_capture_proto_rawDescGZIP(), []int{8} +} + +func (x *StreamCapturesRequest) GetLimit() int64 { + if x != nil { + return x.Limit + } + return 0 +} + +// Streamed one capture per message; see StreamCaptures above. +type StreamCapturesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Capture *CapturedEvent `protobuf:"bytes,1,opt,name=capture,proto3" json:"capture,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StreamCapturesResponse) Reset() { + *x = StreamCapturesResponse{} + mi := &file_state_v1_capture_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamCapturesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamCapturesResponse) ProtoMessage() {} + +func (x *StreamCapturesResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_capture_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamCapturesResponse.ProtoReflect.Descriptor instead. +func (*StreamCapturesResponse) Descriptor() ([]byte, []int) { + return file_state_v1_capture_proto_rawDescGZIP(), []int{9} +} + +func (x *StreamCapturesResponse) GetCapture() *CapturedEvent { + if x != nil { + return x.Capture + } + return nil +} + +type StreamUndispatchedCapturesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Bindings are the ids of the armed bindings, on enabled workflows, the + // captures are listed for. + Bindings []string `protobuf:"bytes,3,rep,name=bindings,proto3" json:"bindings,omitempty"` + Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StreamUndispatchedCapturesRequest) Reset() { + *x = StreamUndispatchedCapturesRequest{} + mi := &file_state_v1_capture_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamUndispatchedCapturesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamUndispatchedCapturesRequest) ProtoMessage() {} + +func (x *StreamUndispatchedCapturesRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_capture_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamUndispatchedCapturesRequest.ProtoReflect.Descriptor instead. +func (*StreamUndispatchedCapturesRequest) Descriptor() ([]byte, []int) { + return file_state_v1_capture_proto_rawDescGZIP(), []int{10} +} + +func (x *StreamUndispatchedCapturesRequest) GetBindings() []string { + if x != nil { + return x.Bindings + } + return nil +} + +func (x *StreamUndispatchedCapturesRequest) GetLimit() int64 { + if x != nil { + return x.Limit + } + return 0 +} + +// Streamed one capture per message; see StreamUndispatchedCaptures above. +type StreamUndispatchedCapturesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Capture *CapturedEvent `protobuf:"bytes,1,opt,name=capture,proto3" json:"capture,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StreamUndispatchedCapturesResponse) Reset() { + *x = StreamUndispatchedCapturesResponse{} + mi := &file_state_v1_capture_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamUndispatchedCapturesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamUndispatchedCapturesResponse) ProtoMessage() {} + +func (x *StreamUndispatchedCapturesResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_capture_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamUndispatchedCapturesResponse.ProtoReflect.Descriptor instead. +func (*StreamUndispatchedCapturesResponse) Descriptor() ([]byte, []int) { + return file_state_v1_capture_proto_rawDescGZIP(), []int{11} +} + +func (x *StreamUndispatchedCapturesResponse) GetCapture() *CapturedEvent { + if x != nil { + return x.Capture + } + return nil +} + +var File_state_v1_capture_proto protoreflect.FileDescriptor + +const file_state_v1_capture_proto_rawDesc = "" + + "\n" + + "\x16state/v1/capture.proto\x12\bstate.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe3\x02\n" + + "\rCapturedEvent\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12;\n" + + "\vreceived_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "receivedAt\x12\x16\n" + + "\x06source\x18\x03 \x01(\tR\x06source\x12\x1f\n" + + "\vremote_addr\x18\x04 \x01(\tR\n" + + "remoteAddr\x12!\n" + + "\fcontent_type\x18\x05 \x01(\tR\vcontentType\x12\x18\n" + + "\aheaders\x18\x06 \x01(\tR\aheaders\x12\x12\n" + + "\x04body\x18\a \x01(\tR\x04body\x12$\n" + + "\rauthenticated\x18\b \x01(\bR\rauthenticated\x12\x1d\n" + + "\n" + + "event_type\x18\t \x01(\tR\teventType\x12\x1a\n" + + "\bunsigned\x18\n" + + " \x01(\bR\bunsigned\x12\x1a\n" + + "\bdelivery\x18\v \x01(\tR\bdelivery\"\x84\x01\n" + + "\x1bRecordCaptureRefusalRequest\x12\x16\n" + + "\x06source\x18\x01 \x01(\tR\x06source\x12\x12\n" + + "\x04addr\x18\x02 \x01(\tR\x04addr\x129\n" + + "\n" + + "refused_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\trefusedAt\"\x1e\n" + + "\x1cRecordCaptureRefusalResponse\"N\n" + + "\x1aListCaptureRefusalsRequest\x120\n" + + "\x05since\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x05since\"u\n" + + "\x0fCaptureRefusals\x12\x16\n" + + "\x06source\x18\x01 \x01(\tR\x06source\x12\x18\n" + + "\arefused\x18\x02 \x01(\x03R\arefused\x12\x1a\n" + + "\baccepted\x18\x03 \x01(\x03R\baccepted\x12\x14\n" + + "\x05addrs\x18\x04 \x03(\tR\x05addrs\"R\n" + + "\x1bListCaptureRefusalsResponse\x123\n" + + "\asources\x18\x01 \x03(\v2\x19.state.v1.CaptureRefusalsR\asources\"\x95\x01\n" + + "\x14InsertCaptureRequest\x121\n" + + "\acapture\x18\x01 \x01(\v2\x17.state.v1.CapturedEventR\acapture\x12+\n" + + "\x11retention_seconds\x18\x02 \x01(\x03R\x10retentionSeconds\x12\x1d\n" + + "\n" + + "max_events\x18\x03 \x01(\x03R\tmaxEvents\"'\n" + + "\x15InsertCaptureResponse\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"-\n" + + "\x15StreamCapturesRequest\x12\x14\n" + + "\x05limit\x18\x01 \x01(\x03R\x05limit\"K\n" + + "\x16StreamCapturesResponse\x121\n" + + "\acapture\x18\x01 \x01(\v2\x17.state.v1.CapturedEventR\acapture\"d\n" + + "!StreamUndispatchedCapturesRequest\x12\x1a\n" + + "\bbindings\x18\x03 \x03(\tR\bbindings\x12\x14\n" + + "\x05limit\x18\x02 \x01(\x03R\x05limitJ\x04\b\x01\x10\x02R\asources\"W\n" + + "\"StreamUndispatchedCapturesResponse\x121\n" + + "\acapture\x18\x01 \x01(\v2\x17.state.v1.CapturedEventR\acapture2\xff\x03\n" + + "\x0eCaptureService\x12e\n" + + "\x14RecordCaptureRefusal\x12%.state.v1.RecordCaptureRefusalRequest\x1a&.state.v1.RecordCaptureRefusalResponse\x12b\n" + + "\x13ListCaptureRefusals\x12$.state.v1.ListCaptureRefusalsRequest\x1a%.state.v1.ListCaptureRefusalsResponse\x12P\n" + + "\rInsertCapture\x12\x1e.state.v1.InsertCaptureRequest\x1a\x1f.state.v1.InsertCaptureResponse\x12U\n" + + "\x0eStreamCaptures\x12\x1f.state.v1.StreamCapturesRequest\x1a .state.v1.StreamCapturesResponse0\x01\x12y\n" + + "\x1aStreamUndispatchedCaptures\x12+.state.v1.StreamUndispatchedCapturesRequest\x1a,.state.v1.StreamUndispatchedCapturesResponse0\x01B\xa6\x01\n" + + "\fcom.state.v1B\fCaptureProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_capture_proto_rawDescOnce sync.Once + file_state_v1_capture_proto_rawDescData []byte +) + +func file_state_v1_capture_proto_rawDescGZIP() []byte { + file_state_v1_capture_proto_rawDescOnce.Do(func() { + file_state_v1_capture_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_capture_proto_rawDesc), len(file_state_v1_capture_proto_rawDesc))) + }) + return file_state_v1_capture_proto_rawDescData +} + +var file_state_v1_capture_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_state_v1_capture_proto_goTypes = []any{ + (*CapturedEvent)(nil), // 0: state.v1.CapturedEvent + (*RecordCaptureRefusalRequest)(nil), // 1: state.v1.RecordCaptureRefusalRequest + (*RecordCaptureRefusalResponse)(nil), // 2: state.v1.RecordCaptureRefusalResponse + (*ListCaptureRefusalsRequest)(nil), // 3: state.v1.ListCaptureRefusalsRequest + (*CaptureRefusals)(nil), // 4: state.v1.CaptureRefusals + (*ListCaptureRefusalsResponse)(nil), // 5: state.v1.ListCaptureRefusalsResponse + (*InsertCaptureRequest)(nil), // 6: state.v1.InsertCaptureRequest + (*InsertCaptureResponse)(nil), // 7: state.v1.InsertCaptureResponse + (*StreamCapturesRequest)(nil), // 8: state.v1.StreamCapturesRequest + (*StreamCapturesResponse)(nil), // 9: state.v1.StreamCapturesResponse + (*StreamUndispatchedCapturesRequest)(nil), // 10: state.v1.StreamUndispatchedCapturesRequest + (*StreamUndispatchedCapturesResponse)(nil), // 11: state.v1.StreamUndispatchedCapturesResponse + (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp +} +var file_state_v1_capture_proto_depIdxs = []int32{ + 12, // 0: state.v1.CapturedEvent.received_at:type_name -> google.protobuf.Timestamp + 12, // 1: state.v1.RecordCaptureRefusalRequest.refused_at:type_name -> google.protobuf.Timestamp + 12, // 2: state.v1.ListCaptureRefusalsRequest.since:type_name -> google.protobuf.Timestamp + 4, // 3: state.v1.ListCaptureRefusalsResponse.sources:type_name -> state.v1.CaptureRefusals + 0, // 4: state.v1.InsertCaptureRequest.capture:type_name -> state.v1.CapturedEvent + 0, // 5: state.v1.StreamCapturesResponse.capture:type_name -> state.v1.CapturedEvent + 0, // 6: state.v1.StreamUndispatchedCapturesResponse.capture:type_name -> state.v1.CapturedEvent + 1, // 7: state.v1.CaptureService.RecordCaptureRefusal:input_type -> state.v1.RecordCaptureRefusalRequest + 3, // 8: state.v1.CaptureService.ListCaptureRefusals:input_type -> state.v1.ListCaptureRefusalsRequest + 6, // 9: state.v1.CaptureService.InsertCapture:input_type -> state.v1.InsertCaptureRequest + 8, // 10: state.v1.CaptureService.StreamCaptures:input_type -> state.v1.StreamCapturesRequest + 10, // 11: state.v1.CaptureService.StreamUndispatchedCaptures:input_type -> state.v1.StreamUndispatchedCapturesRequest + 2, // 12: state.v1.CaptureService.RecordCaptureRefusal:output_type -> state.v1.RecordCaptureRefusalResponse + 5, // 13: state.v1.CaptureService.ListCaptureRefusals:output_type -> state.v1.ListCaptureRefusalsResponse + 7, // 14: state.v1.CaptureService.InsertCapture:output_type -> state.v1.InsertCaptureResponse + 9, // 15: state.v1.CaptureService.StreamCaptures:output_type -> state.v1.StreamCapturesResponse + 11, // 16: state.v1.CaptureService.StreamUndispatchedCaptures:output_type -> state.v1.StreamUndispatchedCapturesResponse + 12, // [12:17] is the sub-list for method output_type + 7, // [7:12] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_state_v1_capture_proto_init() } +func file_state_v1_capture_proto_init() { + if File_state_v1_capture_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_capture_proto_rawDesc), len(file_state_v1_capture_proto_rawDesc)), + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_capture_proto_goTypes, + DependencyIndexes: file_state_v1_capture_proto_depIdxs, + MessageInfos: file_state_v1_capture_proto_msgTypes, + }.Build() + File_state_v1_capture_proto = out.File + file_state_v1_capture_proto_goTypes = nil + file_state_v1_capture_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/capture_grpc.pb.go b/internal/contracts/state/v1/capture_grpc.pb.go new file mode 100644 index 000000000..aaee07727 --- /dev/null +++ b/internal/contracts/state/v1/capture_grpc.pb.go @@ -0,0 +1,290 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/capture.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 ( + CaptureService_RecordCaptureRefusal_FullMethodName = "/state.v1.CaptureService/RecordCaptureRefusal" + CaptureService_ListCaptureRefusals_FullMethodName = "/state.v1.CaptureService/ListCaptureRefusals" + CaptureService_InsertCapture_FullMethodName = "/state.v1.CaptureService/InsertCapture" + CaptureService_StreamCaptures_FullMethodName = "/state.v1.CaptureService/StreamCaptures" + CaptureService_StreamUndispatchedCaptures_FullMethodName = "/state.v1.CaptureService/StreamUndispatchedCaptures" +) + +// CaptureServiceClient is the client API for CaptureService 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 CaptureServiceClient interface { + // Capture refusals: events the network rules refused at the receiver, + // counted per source. Administrative. + RecordCaptureRefusal(ctx context.Context, in *RecordCaptureRefusalRequest, opts ...grpc.CallOption) (*RecordCaptureRefusalResponse, error) + ListCaptureRefusals(ctx context.Context, in *ListCaptureRefusalsRequest, opts ...grpc.CallOption) (*ListCaptureRefusalsResponse, error) + InsertCapture(ctx context.Context, in *InsertCaptureRequest, opts ...grpc.CallOption) (*InsertCaptureResponse, error) + // StreamCaptures returns one capture per message: a batch of large capture + // bodies can exceed gRPC's 4MiB unary message cap + // (docs/prds/state-store-contract.md). + StreamCaptures(ctx context.Context, in *StreamCapturesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamCapturesResponse], error) + StreamUndispatchedCaptures(ctx context.Context, in *StreamUndispatchedCapturesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamUndispatchedCapturesResponse], error) +} + +type captureServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewCaptureServiceClient(cc grpc.ClientConnInterface) CaptureServiceClient { + return &captureServiceClient{cc} +} + +func (c *captureServiceClient) RecordCaptureRefusal(ctx context.Context, in *RecordCaptureRefusalRequest, opts ...grpc.CallOption) (*RecordCaptureRefusalResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RecordCaptureRefusalResponse) + err := c.cc.Invoke(ctx, CaptureService_RecordCaptureRefusal_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *captureServiceClient) ListCaptureRefusals(ctx context.Context, in *ListCaptureRefusalsRequest, opts ...grpc.CallOption) (*ListCaptureRefusalsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListCaptureRefusalsResponse) + err := c.cc.Invoke(ctx, CaptureService_ListCaptureRefusals_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *captureServiceClient) InsertCapture(ctx context.Context, in *InsertCaptureRequest, opts ...grpc.CallOption) (*InsertCaptureResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(InsertCaptureResponse) + err := c.cc.Invoke(ctx, CaptureService_InsertCapture_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *captureServiceClient) StreamCaptures(ctx context.Context, in *StreamCapturesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamCapturesResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &CaptureService_ServiceDesc.Streams[0], CaptureService_StreamCaptures_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[StreamCapturesRequest, StreamCapturesResponse]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type CaptureService_StreamCapturesClient = grpc.ServerStreamingClient[StreamCapturesResponse] + +func (c *captureServiceClient) StreamUndispatchedCaptures(ctx context.Context, in *StreamUndispatchedCapturesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamUndispatchedCapturesResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &CaptureService_ServiceDesc.Streams[1], CaptureService_StreamUndispatchedCaptures_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[StreamUndispatchedCapturesRequest, StreamUndispatchedCapturesResponse]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type CaptureService_StreamUndispatchedCapturesClient = grpc.ServerStreamingClient[StreamUndispatchedCapturesResponse] + +// CaptureServiceServer is the server API for CaptureService service. +// All implementations must embed UnimplementedCaptureServiceServer +// for forward compatibility. +type CaptureServiceServer interface { + // Capture refusals: events the network rules refused at the receiver, + // counted per source. Administrative. + RecordCaptureRefusal(context.Context, *RecordCaptureRefusalRequest) (*RecordCaptureRefusalResponse, error) + ListCaptureRefusals(context.Context, *ListCaptureRefusalsRequest) (*ListCaptureRefusalsResponse, error) + InsertCapture(context.Context, *InsertCaptureRequest) (*InsertCaptureResponse, error) + // StreamCaptures returns one capture per message: a batch of large capture + // bodies can exceed gRPC's 4MiB unary message cap + // (docs/prds/state-store-contract.md). + StreamCaptures(*StreamCapturesRequest, grpc.ServerStreamingServer[StreamCapturesResponse]) error + StreamUndispatchedCaptures(*StreamUndispatchedCapturesRequest, grpc.ServerStreamingServer[StreamUndispatchedCapturesResponse]) error + mustEmbedUnimplementedCaptureServiceServer() +} + +// UnimplementedCaptureServiceServer 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 UnimplementedCaptureServiceServer struct{} + +func (UnimplementedCaptureServiceServer) RecordCaptureRefusal(context.Context, *RecordCaptureRefusalRequest) (*RecordCaptureRefusalResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RecordCaptureRefusal not implemented") +} +func (UnimplementedCaptureServiceServer) ListCaptureRefusals(context.Context, *ListCaptureRefusalsRequest) (*ListCaptureRefusalsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListCaptureRefusals not implemented") +} +func (UnimplementedCaptureServiceServer) InsertCapture(context.Context, *InsertCaptureRequest) (*InsertCaptureResponse, error) { + return nil, status.Error(codes.Unimplemented, "method InsertCapture not implemented") +} +func (UnimplementedCaptureServiceServer) StreamCaptures(*StreamCapturesRequest, grpc.ServerStreamingServer[StreamCapturesResponse]) error { + return status.Error(codes.Unimplemented, "method StreamCaptures not implemented") +} +func (UnimplementedCaptureServiceServer) StreamUndispatchedCaptures(*StreamUndispatchedCapturesRequest, grpc.ServerStreamingServer[StreamUndispatchedCapturesResponse]) error { + return status.Error(codes.Unimplemented, "method StreamUndispatchedCaptures not implemented") +} +func (UnimplementedCaptureServiceServer) mustEmbedUnimplementedCaptureServiceServer() {} +func (UnimplementedCaptureServiceServer) testEmbeddedByValue() {} + +// UnsafeCaptureServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CaptureServiceServer will +// result in compilation errors. +type UnsafeCaptureServiceServer interface { + mustEmbedUnimplementedCaptureServiceServer() +} + +func RegisterCaptureServiceServer(s grpc.ServiceRegistrar, srv CaptureServiceServer) { + // If the following call panics, it indicates UnimplementedCaptureServiceServer 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(&CaptureService_ServiceDesc, srv) +} + +func _CaptureService_RecordCaptureRefusal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RecordCaptureRefusalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CaptureServiceServer).RecordCaptureRefusal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CaptureService_RecordCaptureRefusal_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CaptureServiceServer).RecordCaptureRefusal(ctx, req.(*RecordCaptureRefusalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CaptureService_ListCaptureRefusals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListCaptureRefusalsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CaptureServiceServer).ListCaptureRefusals(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CaptureService_ListCaptureRefusals_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CaptureServiceServer).ListCaptureRefusals(ctx, req.(*ListCaptureRefusalsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CaptureService_InsertCapture_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InsertCaptureRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CaptureServiceServer).InsertCapture(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CaptureService_InsertCapture_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CaptureServiceServer).InsertCapture(ctx, req.(*InsertCaptureRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CaptureService_StreamCaptures_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamCapturesRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(CaptureServiceServer).StreamCaptures(m, &grpc.GenericServerStream[StreamCapturesRequest, StreamCapturesResponse]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type CaptureService_StreamCapturesServer = grpc.ServerStreamingServer[StreamCapturesResponse] + +func _CaptureService_StreamUndispatchedCaptures_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamUndispatchedCapturesRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(CaptureServiceServer).StreamUndispatchedCaptures(m, &grpc.GenericServerStream[StreamUndispatchedCapturesRequest, StreamUndispatchedCapturesResponse]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type CaptureService_StreamUndispatchedCapturesServer = grpc.ServerStreamingServer[StreamUndispatchedCapturesResponse] + +// CaptureService_ServiceDesc is the grpc.ServiceDesc for CaptureService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var CaptureService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.CaptureService", + HandlerType: (*CaptureServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RecordCaptureRefusal", + Handler: _CaptureService_RecordCaptureRefusal_Handler, + }, + { + MethodName: "ListCaptureRefusals", + Handler: _CaptureService_ListCaptureRefusals_Handler, + }, + { + MethodName: "InsertCapture", + Handler: _CaptureService_InsertCapture_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamCaptures", + Handler: _CaptureService_StreamCaptures_Handler, + ServerStreams: true, + }, + { + StreamName: "StreamUndispatchedCaptures", + Handler: _CaptureService_StreamUndispatchedCaptures_Handler, + ServerStreams: true, + }, + }, + Metadata: "state/v1/capture.proto", +} diff --git a/internal/contracts/state/v1/dispatch.pb.go b/internal/contracts/state/v1/dispatch.pb.go new file mode 100644 index 000000000..d56c48a29 --- /dev/null +++ b/internal/contracts/state/v1/dispatch.pb.go @@ -0,0 +1,824 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/dispatch.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RecordDispatchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + BindingId string `protobuf:"bytes,1,opt,name=binding_id,json=bindingId,proto3" json:"binding_id,omitempty"` + BindingVersion int64 `protobuf:"varint,2,opt,name=binding_version,json=bindingVersion,proto3" json:"binding_version,omitempty"` + CaptureId string `protobuf:"bytes,3,opt,name=capture_id,json=captureId,proto3" json:"capture_id,omitempty"` + // task_id addresses the tasks table. + TaskId int64 `protobuf:"varint,4,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + // reason is empty for a dispatch and names why an evaluated capture + // started no task. + Reason string `protobuf:"bytes,5,opt,name=reason,proto3" json:"reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordDispatchRequest) Reset() { + *x = RecordDispatchRequest{} + mi := &file_state_v1_dispatch_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordDispatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordDispatchRequest) ProtoMessage() {} + +func (x *RecordDispatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_dispatch_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordDispatchRequest.ProtoReflect.Descriptor instead. +func (*RecordDispatchRequest) Descriptor() ([]byte, []int) { + return file_state_v1_dispatch_proto_rawDescGZIP(), []int{0} +} + +func (x *RecordDispatchRequest) GetBindingId() string { + if x != nil { + return x.BindingId + } + return "" +} + +func (x *RecordDispatchRequest) GetBindingVersion() int64 { + if x != nil { + return x.BindingVersion + } + return 0 +} + +func (x *RecordDispatchRequest) GetCaptureId() string { + if x != nil { + return x.CaptureId + } + return "" +} + +func (x *RecordDispatchRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *RecordDispatchRequest) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +type RecordDispatchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordDispatchResponse) Reset() { + *x = RecordDispatchResponse{} + mi := &file_state_v1_dispatch_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordDispatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordDispatchResponse) ProtoMessage() {} + +func (x *RecordDispatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_dispatch_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordDispatchResponse.ProtoReflect.Descriptor instead. +func (*RecordDispatchResponse) Descriptor() ([]byte, []int) { + return file_state_v1_dispatch_proto_rawDescGZIP(), []int{1} +} + +// ListDispatchesRequest filters the binding dispatch ledger; empty fields +// match any row. +type ListDispatchesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + BindingId string `protobuf:"bytes,1,opt,name=binding_id,json=bindingId,proto3" json:"binding_id,omitempty"` + CaptureId string `protobuf:"bytes,2,opt,name=capture_id,json=captureId,proto3" json:"capture_id,omitempty"` + TaskId int64 `protobuf:"varint,3,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListDispatchesRequest) Reset() { + *x = ListDispatchesRequest{} + mi := &file_state_v1_dispatch_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListDispatchesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDispatchesRequest) ProtoMessage() {} + +func (x *ListDispatchesRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_dispatch_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDispatchesRequest.ProtoReflect.Descriptor instead. +func (*ListDispatchesRequest) Descriptor() ([]byte, []int) { + return file_state_v1_dispatch_proto_rawDescGZIP(), []int{2} +} + +func (x *ListDispatchesRequest) GetBindingId() string { + if x != nil { + return x.BindingId + } + return "" +} + +func (x *ListDispatchesRequest) GetCaptureId() string { + if x != nil { + return x.CaptureId + } + return "" +} + +func (x *ListDispatchesRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *ListDispatchesRequest) GetLimit() int32 { + if x != nil { + return x.Limit + } + return 0 +} + +type Dispatch struct { + state protoimpl.MessageState `protogen:"open.v1"` + BindingId string `protobuf:"bytes,1,opt,name=binding_id,json=bindingId,proto3" json:"binding_id,omitempty"` + BindingVersion int64 `protobuf:"varint,2,opt,name=binding_version,json=bindingVersion,proto3" json:"binding_version,omitempty"` + CaptureId string `protobuf:"bytes,3,opt,name=capture_id,json=captureId,proto3" json:"capture_id,omitempty"` + TaskId int64 `protobuf:"varint,4,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Reason string `protobuf:"bytes,5,opt,name=reason,proto3" json:"reason,omitempty"` + DispatchedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=dispatched_at,json=dispatchedAt,proto3" json:"dispatched_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Dispatch) Reset() { + *x = Dispatch{} + mi := &file_state_v1_dispatch_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Dispatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Dispatch) ProtoMessage() {} + +func (x *Dispatch) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_dispatch_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Dispatch.ProtoReflect.Descriptor instead. +func (*Dispatch) Descriptor() ([]byte, []int) { + return file_state_v1_dispatch_proto_rawDescGZIP(), []int{3} +} + +func (x *Dispatch) GetBindingId() string { + if x != nil { + return x.BindingId + } + return "" +} + +func (x *Dispatch) GetBindingVersion() int64 { + if x != nil { + return x.BindingVersion + } + return 0 +} + +func (x *Dispatch) GetCaptureId() string { + if x != nil { + return x.CaptureId + } + return "" +} + +func (x *Dispatch) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *Dispatch) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *Dispatch) GetDispatchedAt() *timestamppb.Timestamp { + if x != nil { + return x.DispatchedAt + } + return nil +} + +type ListDispatchesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Dispatches []*Dispatch `protobuf:"bytes,1,rep,name=dispatches,proto3" json:"dispatches,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListDispatchesResponse) Reset() { + *x = ListDispatchesResponse{} + mi := &file_state_v1_dispatch_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListDispatchesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDispatchesResponse) ProtoMessage() {} + +func (x *ListDispatchesResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_dispatch_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDispatchesResponse.ProtoReflect.Descriptor instead. +func (*ListDispatchesResponse) Descriptor() ([]byte, []int) { + return file_state_v1_dispatch_proto_rawDescGZIP(), []int{4} +} + +func (x *ListDispatchesResponse) GetDispatches() []*Dispatch { + if x != nil { + return x.Dispatches + } + return nil +} + +type RecordPlaybookDispatchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlaybookId string `protobuf:"bytes,1,opt,name=playbook_id,json=playbookId,proto3" json:"playbook_id,omitempty"` + PlaybookVersion string `protobuf:"bytes,2,opt,name=playbook_version,json=playbookVersion,proto3" json:"playbook_version,omitempty"` + EventId string `protobuf:"bytes,3,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` + ActionId string `protobuf:"bytes,4,opt,name=action_id,json=actionId,proto3" json:"action_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordPlaybookDispatchRequest) Reset() { + *x = RecordPlaybookDispatchRequest{} + mi := &file_state_v1_dispatch_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordPlaybookDispatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordPlaybookDispatchRequest) ProtoMessage() {} + +func (x *RecordPlaybookDispatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_dispatch_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordPlaybookDispatchRequest.ProtoReflect.Descriptor instead. +func (*RecordPlaybookDispatchRequest) Descriptor() ([]byte, []int) { + return file_state_v1_dispatch_proto_rawDescGZIP(), []int{5} +} + +func (x *RecordPlaybookDispatchRequest) GetPlaybookId() string { + if x != nil { + return x.PlaybookId + } + return "" +} + +func (x *RecordPlaybookDispatchRequest) GetPlaybookVersion() string { + if x != nil { + return x.PlaybookVersion + } + return "" +} + +func (x *RecordPlaybookDispatchRequest) GetEventId() string { + if x != nil { + return x.EventId + } + return "" +} + +func (x *RecordPlaybookDispatchRequest) GetActionId() string { + if x != nil { + return x.ActionId + } + return "" +} + +type RecordPlaybookDispatchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordPlaybookDispatchResponse) Reset() { + *x = RecordPlaybookDispatchResponse{} + mi := &file_state_v1_dispatch_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordPlaybookDispatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordPlaybookDispatchResponse) ProtoMessage() {} + +func (x *RecordPlaybookDispatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_dispatch_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordPlaybookDispatchResponse.ProtoReflect.Descriptor instead. +func (*RecordPlaybookDispatchResponse) Descriptor() ([]byte, []int) { + return file_state_v1_dispatch_proto_rawDescGZIP(), []int{6} +} + +type DeletePlaybookDispatchesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlaybookId string `protobuf:"bytes,1,opt,name=playbook_id,json=playbookId,proto3" json:"playbook_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeletePlaybookDispatchesRequest) Reset() { + *x = DeletePlaybookDispatchesRequest{} + mi := &file_state_v1_dispatch_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeletePlaybookDispatchesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePlaybookDispatchesRequest) ProtoMessage() {} + +func (x *DeletePlaybookDispatchesRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_dispatch_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePlaybookDispatchesRequest.ProtoReflect.Descriptor instead. +func (*DeletePlaybookDispatchesRequest) Descriptor() ([]byte, []int) { + return file_state_v1_dispatch_proto_rawDescGZIP(), []int{7} +} + +func (x *DeletePlaybookDispatchesRequest) GetPlaybookId() string { + if x != nil { + return x.PlaybookId + } + return "" +} + +type DeletePlaybookDispatchesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeletePlaybookDispatchesResponse) Reset() { + *x = DeletePlaybookDispatchesResponse{} + mi := &file_state_v1_dispatch_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeletePlaybookDispatchesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePlaybookDispatchesResponse) ProtoMessage() {} + +func (x *DeletePlaybookDispatchesResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_dispatch_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePlaybookDispatchesResponse.ProtoReflect.Descriptor instead. +func (*DeletePlaybookDispatchesResponse) Descriptor() ([]byte, []int) { + return file_state_v1_dispatch_proto_rawDescGZIP(), []int{8} +} + +type EnqueueBindingTaskRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` + Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` + Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` + Workflow string `protobuf:"bytes,5,opt,name=workflow,proto3" json:"workflow,omitempty"` + Identity string `protobuf:"bytes,6,opt,name=identity,proto3" json:"identity,omitempty"` + BindingId string `protobuf:"bytes,7,opt,name=binding_id,json=bindingId,proto3" json:"binding_id,omitempty"` + BindingVersion int64 `protobuf:"varint,8,opt,name=binding_version,json=bindingVersion,proto3" json:"binding_version,omitempty"` + InputsJson string `protobuf:"bytes,9,opt,name=inputs_json,json=inputsJson,proto3" json:"inputs_json,omitempty"` + CaptureId string `protobuf:"bytes,10,opt,name=capture_id,json=captureId,proto3" json:"capture_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnqueueBindingTaskRequest) Reset() { + *x = EnqueueBindingTaskRequest{} + mi := &file_state_v1_dispatch_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnqueueBindingTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnqueueBindingTaskRequest) ProtoMessage() {} + +func (x *EnqueueBindingTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_dispatch_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnqueueBindingTaskRequest.ProtoReflect.Descriptor instead. +func (*EnqueueBindingTaskRequest) Descriptor() ([]byte, []int) { + return file_state_v1_dispatch_proto_rawDescGZIP(), []int{9} +} + +func (x *EnqueueBindingTaskRequest) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *EnqueueBindingTaskRequest) GetRepo() string { + if x != nil { + return x.Repo + } + return "" +} + +func (x *EnqueueBindingTaskRequest) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *EnqueueBindingTaskRequest) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +func (x *EnqueueBindingTaskRequest) GetWorkflow() string { + if x != nil { + return x.Workflow + } + return "" +} + +func (x *EnqueueBindingTaskRequest) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *EnqueueBindingTaskRequest) GetBindingId() string { + if x != nil { + return x.BindingId + } + return "" +} + +func (x *EnqueueBindingTaskRequest) GetBindingVersion() int64 { + if x != nil { + return x.BindingVersion + } + return 0 +} + +func (x *EnqueueBindingTaskRequest) GetInputsJson() string { + if x != nil { + return x.InputsJson + } + return "" +} + +func (x *EnqueueBindingTaskRequest) GetCaptureId() string { + if x != nil { + return x.CaptureId + } + return "" +} + +type EnqueueBindingTaskResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnqueueBindingTaskResponse) Reset() { + *x = EnqueueBindingTaskResponse{} + mi := &file_state_v1_dispatch_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnqueueBindingTaskResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnqueueBindingTaskResponse) ProtoMessage() {} + +func (x *EnqueueBindingTaskResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_dispatch_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnqueueBindingTaskResponse.ProtoReflect.Descriptor instead. +func (*EnqueueBindingTaskResponse) Descriptor() ([]byte, []int) { + return file_state_v1_dispatch_proto_rawDescGZIP(), []int{10} +} + +func (x *EnqueueBindingTaskResponse) GetTask() *Task { + if x != nil { + return x.Task + } + return nil +} + +var File_state_v1_dispatch_proto protoreflect.FileDescriptor + +const file_state_v1_dispatch_proto_rawDesc = "" + + "\n" + + "\x17state/v1/dispatch.proto\x12\bstate.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x14state/v1/types.proto\"\xaf\x01\n" + + "\x15RecordDispatchRequest\x12\x1d\n" + + "\n" + + "binding_id\x18\x01 \x01(\tR\tbindingId\x12'\n" + + "\x0fbinding_version\x18\x02 \x01(\x03R\x0ebindingVersion\x12\x1d\n" + + "\n" + + "capture_id\x18\x03 \x01(\tR\tcaptureId\x12\x17\n" + + "\atask_id\x18\x04 \x01(\x03R\x06taskId\x12\x16\n" + + "\x06reason\x18\x05 \x01(\tR\x06reason\"\x18\n" + + "\x16RecordDispatchResponse\"\x84\x01\n" + + "\x15ListDispatchesRequest\x12\x1d\n" + + "\n" + + "binding_id\x18\x01 \x01(\tR\tbindingId\x12\x1d\n" + + "\n" + + "capture_id\x18\x02 \x01(\tR\tcaptureId\x12\x17\n" + + "\atask_id\x18\x03 \x01(\x03R\x06taskId\x12\x14\n" + + "\x05limit\x18\x04 \x01(\x05R\x05limit\"\xe3\x01\n" + + "\bDispatch\x12\x1d\n" + + "\n" + + "binding_id\x18\x01 \x01(\tR\tbindingId\x12'\n" + + "\x0fbinding_version\x18\x02 \x01(\x03R\x0ebindingVersion\x12\x1d\n" + + "\n" + + "capture_id\x18\x03 \x01(\tR\tcaptureId\x12\x17\n" + + "\atask_id\x18\x04 \x01(\x03R\x06taskId\x12\x16\n" + + "\x06reason\x18\x05 \x01(\tR\x06reason\x12?\n" + + "\rdispatched_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\fdispatchedAt\"L\n" + + "\x16ListDispatchesResponse\x122\n" + + "\n" + + "dispatches\x18\x01 \x03(\v2\x12.state.v1.DispatchR\n" + + "dispatches\"\xa3\x01\n" + + "\x1dRecordPlaybookDispatchRequest\x12\x1f\n" + + "\vplaybook_id\x18\x01 \x01(\tR\n" + + "playbookId\x12)\n" + + "\x10playbook_version\x18\x02 \x01(\tR\x0fplaybookVersion\x12\x19\n" + + "\bevent_id\x18\x03 \x01(\tR\aeventId\x12\x1b\n" + + "\taction_id\x18\x04 \x01(\tR\bactionId\" \n" + + "\x1eRecordPlaybookDispatchResponse\"B\n" + + "\x1fDeletePlaybookDispatchesRequest\x12\x1f\n" + + "\vplaybook_id\x18\x01 \x01(\tR\n" + + "playbookId\"\"\n" + + " DeletePlaybookDispatchesResponse\"\xaf\x02\n" + + "\x19EnqueueBindingTaskRequest\x12\x14\n" + + "\x05owner\x18\x01 \x01(\tR\x05owner\x12\x12\n" + + "\x04repo\x18\x02 \x01(\tR\x04repo\x12\x14\n" + + "\x05title\x18\x03 \x01(\tR\x05title\x12\x12\n" + + "\x04body\x18\x04 \x01(\tR\x04body\x12\x1a\n" + + "\bworkflow\x18\x05 \x01(\tR\bworkflow\x12\x1a\n" + + "\bidentity\x18\x06 \x01(\tR\bidentity\x12\x1d\n" + + "\n" + + "binding_id\x18\a \x01(\tR\tbindingId\x12'\n" + + "\x0fbinding_version\x18\b \x01(\x03R\x0ebindingVersion\x12\x1f\n" + + "\vinputs_json\x18\t \x01(\tR\n" + + "inputsJson\x12\x1d\n" + + "\n" + + "capture_id\x18\n" + + " \x01(\tR\tcaptureId\"@\n" + + "\x1aEnqueueBindingTaskResponse\x12\"\n" + + "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task2\xfc\x03\n" + + "\x0fDispatchService\x12S\n" + + "\x0eListDispatches\x12\x1f.state.v1.ListDispatchesRequest\x1a .state.v1.ListDispatchesResponse\x12S\n" + + "\x0eRecordDispatch\x12\x1f.state.v1.RecordDispatchRequest\x1a .state.v1.RecordDispatchResponse\x12k\n" + + "\x16RecordPlaybookDispatch\x12'.state.v1.RecordPlaybookDispatchRequest\x1a(.state.v1.RecordPlaybookDispatchResponse\x12q\n" + + "\x18DeletePlaybookDispatches\x12).state.v1.DeletePlaybookDispatchesRequest\x1a*.state.v1.DeletePlaybookDispatchesResponse\x12_\n" + + "\x12EnqueueBindingTask\x12#.state.v1.EnqueueBindingTaskRequest\x1a$.state.v1.EnqueueBindingTaskResponseB\xa7\x01\n" + + "\fcom.state.v1B\rDispatchProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_dispatch_proto_rawDescOnce sync.Once + file_state_v1_dispatch_proto_rawDescData []byte +) + +func file_state_v1_dispatch_proto_rawDescGZIP() []byte { + file_state_v1_dispatch_proto_rawDescOnce.Do(func() { + file_state_v1_dispatch_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_dispatch_proto_rawDesc), len(file_state_v1_dispatch_proto_rawDesc))) + }) + return file_state_v1_dispatch_proto_rawDescData +} + +var file_state_v1_dispatch_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_state_v1_dispatch_proto_goTypes = []any{ + (*RecordDispatchRequest)(nil), // 0: state.v1.RecordDispatchRequest + (*RecordDispatchResponse)(nil), // 1: state.v1.RecordDispatchResponse + (*ListDispatchesRequest)(nil), // 2: state.v1.ListDispatchesRequest + (*Dispatch)(nil), // 3: state.v1.Dispatch + (*ListDispatchesResponse)(nil), // 4: state.v1.ListDispatchesResponse + (*RecordPlaybookDispatchRequest)(nil), // 5: state.v1.RecordPlaybookDispatchRequest + (*RecordPlaybookDispatchResponse)(nil), // 6: state.v1.RecordPlaybookDispatchResponse + (*DeletePlaybookDispatchesRequest)(nil), // 7: state.v1.DeletePlaybookDispatchesRequest + (*DeletePlaybookDispatchesResponse)(nil), // 8: state.v1.DeletePlaybookDispatchesResponse + (*EnqueueBindingTaskRequest)(nil), // 9: state.v1.EnqueueBindingTaskRequest + (*EnqueueBindingTaskResponse)(nil), // 10: state.v1.EnqueueBindingTaskResponse + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp + (*Task)(nil), // 12: state.v1.Task +} +var file_state_v1_dispatch_proto_depIdxs = []int32{ + 11, // 0: state.v1.Dispatch.dispatched_at:type_name -> google.protobuf.Timestamp + 3, // 1: state.v1.ListDispatchesResponse.dispatches:type_name -> state.v1.Dispatch + 12, // 2: state.v1.EnqueueBindingTaskResponse.task:type_name -> state.v1.Task + 2, // 3: state.v1.DispatchService.ListDispatches:input_type -> state.v1.ListDispatchesRequest + 0, // 4: state.v1.DispatchService.RecordDispatch:input_type -> state.v1.RecordDispatchRequest + 5, // 5: state.v1.DispatchService.RecordPlaybookDispatch:input_type -> state.v1.RecordPlaybookDispatchRequest + 7, // 6: state.v1.DispatchService.DeletePlaybookDispatches:input_type -> state.v1.DeletePlaybookDispatchesRequest + 9, // 7: state.v1.DispatchService.EnqueueBindingTask:input_type -> state.v1.EnqueueBindingTaskRequest + 4, // 8: state.v1.DispatchService.ListDispatches:output_type -> state.v1.ListDispatchesResponse + 1, // 9: state.v1.DispatchService.RecordDispatch:output_type -> state.v1.RecordDispatchResponse + 6, // 10: state.v1.DispatchService.RecordPlaybookDispatch:output_type -> state.v1.RecordPlaybookDispatchResponse + 8, // 11: state.v1.DispatchService.DeletePlaybookDispatches:output_type -> state.v1.DeletePlaybookDispatchesResponse + 10, // 12: state.v1.DispatchService.EnqueueBindingTask:output_type -> state.v1.EnqueueBindingTaskResponse + 8, // [8:13] is the sub-list for method output_type + 3, // [3:8] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_state_v1_dispatch_proto_init() } +func file_state_v1_dispatch_proto_init() { + if File_state_v1_dispatch_proto != nil { + return + } + file_state_v1_types_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_dispatch_proto_rawDesc), len(file_state_v1_dispatch_proto_rawDesc)), + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_dispatch_proto_goTypes, + DependencyIndexes: file_state_v1_dispatch_proto_depIdxs, + MessageInfos: file_state_v1_dispatch_proto_msgTypes, + }.Build() + File_state_v1_dispatch_proto = out.File + file_state_v1_dispatch_proto_goTypes = nil + file_state_v1_dispatch_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/dispatch_grpc.pb.go b/internal/contracts/state/v1/dispatch_grpc.pb.go new file mode 100644 index 000000000..3cc887a86 --- /dev/null +++ b/internal/contracts/state/v1/dispatch_grpc.pb.go @@ -0,0 +1,287 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/dispatch.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 ( + DispatchService_ListDispatches_FullMethodName = "/state.v1.DispatchService/ListDispatches" + DispatchService_RecordDispatch_FullMethodName = "/state.v1.DispatchService/RecordDispatch" + DispatchService_RecordPlaybookDispatch_FullMethodName = "/state.v1.DispatchService/RecordPlaybookDispatch" + DispatchService_DeletePlaybookDispatches_FullMethodName = "/state.v1.DispatchService/DeletePlaybookDispatches" + DispatchService_EnqueueBindingTask_FullMethodName = "/state.v1.DispatchService/EnqueueBindingTask" +) + +// DispatchServiceClient is the client API for DispatchService 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 DispatchServiceClient interface { + ListDispatches(ctx context.Context, in *ListDispatchesRequest, opts ...grpc.CallOption) (*ListDispatchesResponse, error) + RecordDispatch(ctx context.Context, in *RecordDispatchRequest, opts ...grpc.CallOption) (*RecordDispatchResponse, error) + // Playbook dispatch ledger (eda-playbook-engine.md gap 2): one durable + // at-most-once record per (playbook, version, event, action) for the + // side-effecting positions. Administrative, like RecordDispatch: a + // task-scoped grant cannot reach either (see TaskGrants). + RecordPlaybookDispatch(ctx context.Context, in *RecordPlaybookDispatchRequest, opts ...grpc.CallOption) (*RecordPlaybookDispatchResponse, error) + DeletePlaybookDispatches(ctx context.Context, in *DeletePlaybookDispatchesRequest, opts ...grpc.CallOption) (*DeletePlaybookDispatchesResponse, error) + // BindingTaskCreator: claims the binding's dispatch of a capture and + // enqueues its task in one transaction, so a failure leaves neither and a + // replayed delivery is refused with AlreadyExists. + EnqueueBindingTask(ctx context.Context, in *EnqueueBindingTaskRequest, opts ...grpc.CallOption) (*EnqueueBindingTaskResponse, error) +} + +type dispatchServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewDispatchServiceClient(cc grpc.ClientConnInterface) DispatchServiceClient { + return &dispatchServiceClient{cc} +} + +func (c *dispatchServiceClient) ListDispatches(ctx context.Context, in *ListDispatchesRequest, opts ...grpc.CallOption) (*ListDispatchesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListDispatchesResponse) + err := c.cc.Invoke(ctx, DispatchService_ListDispatches_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dispatchServiceClient) RecordDispatch(ctx context.Context, in *RecordDispatchRequest, opts ...grpc.CallOption) (*RecordDispatchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RecordDispatchResponse) + err := c.cc.Invoke(ctx, DispatchService_RecordDispatch_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dispatchServiceClient) RecordPlaybookDispatch(ctx context.Context, in *RecordPlaybookDispatchRequest, opts ...grpc.CallOption) (*RecordPlaybookDispatchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RecordPlaybookDispatchResponse) + err := c.cc.Invoke(ctx, DispatchService_RecordPlaybookDispatch_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dispatchServiceClient) DeletePlaybookDispatches(ctx context.Context, in *DeletePlaybookDispatchesRequest, opts ...grpc.CallOption) (*DeletePlaybookDispatchesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeletePlaybookDispatchesResponse) + err := c.cc.Invoke(ctx, DispatchService_DeletePlaybookDispatches_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dispatchServiceClient) EnqueueBindingTask(ctx context.Context, in *EnqueueBindingTaskRequest, opts ...grpc.CallOption) (*EnqueueBindingTaskResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(EnqueueBindingTaskResponse) + err := c.cc.Invoke(ctx, DispatchService_EnqueueBindingTask_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DispatchServiceServer is the server API for DispatchService service. +// All implementations must embed UnimplementedDispatchServiceServer +// for forward compatibility. +type DispatchServiceServer interface { + ListDispatches(context.Context, *ListDispatchesRequest) (*ListDispatchesResponse, error) + RecordDispatch(context.Context, *RecordDispatchRequest) (*RecordDispatchResponse, error) + // Playbook dispatch ledger (eda-playbook-engine.md gap 2): one durable + // at-most-once record per (playbook, version, event, action) for the + // side-effecting positions. Administrative, like RecordDispatch: a + // task-scoped grant cannot reach either (see TaskGrants). + RecordPlaybookDispatch(context.Context, *RecordPlaybookDispatchRequest) (*RecordPlaybookDispatchResponse, error) + DeletePlaybookDispatches(context.Context, *DeletePlaybookDispatchesRequest) (*DeletePlaybookDispatchesResponse, error) + // BindingTaskCreator: claims the binding's dispatch of a capture and + // enqueues its task in one transaction, so a failure leaves neither and a + // replayed delivery is refused with AlreadyExists. + EnqueueBindingTask(context.Context, *EnqueueBindingTaskRequest) (*EnqueueBindingTaskResponse, error) + mustEmbedUnimplementedDispatchServiceServer() +} + +// UnimplementedDispatchServiceServer 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 UnimplementedDispatchServiceServer struct{} + +func (UnimplementedDispatchServiceServer) ListDispatches(context.Context, *ListDispatchesRequest) (*ListDispatchesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListDispatches not implemented") +} +func (UnimplementedDispatchServiceServer) RecordDispatch(context.Context, *RecordDispatchRequest) (*RecordDispatchResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RecordDispatch not implemented") +} +func (UnimplementedDispatchServiceServer) RecordPlaybookDispatch(context.Context, *RecordPlaybookDispatchRequest) (*RecordPlaybookDispatchResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RecordPlaybookDispatch not implemented") +} +func (UnimplementedDispatchServiceServer) DeletePlaybookDispatches(context.Context, *DeletePlaybookDispatchesRequest) (*DeletePlaybookDispatchesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeletePlaybookDispatches not implemented") +} +func (UnimplementedDispatchServiceServer) EnqueueBindingTask(context.Context, *EnqueueBindingTaskRequest) (*EnqueueBindingTaskResponse, error) { + return nil, status.Error(codes.Unimplemented, "method EnqueueBindingTask not implemented") +} +func (UnimplementedDispatchServiceServer) mustEmbedUnimplementedDispatchServiceServer() {} +func (UnimplementedDispatchServiceServer) testEmbeddedByValue() {} + +// UnsafeDispatchServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DispatchServiceServer will +// result in compilation errors. +type UnsafeDispatchServiceServer interface { + mustEmbedUnimplementedDispatchServiceServer() +} + +func RegisterDispatchServiceServer(s grpc.ServiceRegistrar, srv DispatchServiceServer) { + // If the following call panics, it indicates UnimplementedDispatchServiceServer 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(&DispatchService_ServiceDesc, srv) +} + +func _DispatchService_ListDispatches_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDispatchesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DispatchServiceServer).ListDispatches(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DispatchService_ListDispatches_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DispatchServiceServer).ListDispatches(ctx, req.(*ListDispatchesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DispatchService_RecordDispatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RecordDispatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DispatchServiceServer).RecordDispatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DispatchService_RecordDispatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DispatchServiceServer).RecordDispatch(ctx, req.(*RecordDispatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DispatchService_RecordPlaybookDispatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RecordPlaybookDispatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DispatchServiceServer).RecordPlaybookDispatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DispatchService_RecordPlaybookDispatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DispatchServiceServer).RecordPlaybookDispatch(ctx, req.(*RecordPlaybookDispatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DispatchService_DeletePlaybookDispatches_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePlaybookDispatchesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DispatchServiceServer).DeletePlaybookDispatches(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DispatchService_DeletePlaybookDispatches_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DispatchServiceServer).DeletePlaybookDispatches(ctx, req.(*DeletePlaybookDispatchesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DispatchService_EnqueueBindingTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EnqueueBindingTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DispatchServiceServer).EnqueueBindingTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DispatchService_EnqueueBindingTask_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DispatchServiceServer).EnqueueBindingTask(ctx, req.(*EnqueueBindingTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// DispatchService_ServiceDesc is the grpc.ServiceDesc for DispatchService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var DispatchService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.DispatchService", + HandlerType: (*DispatchServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListDispatches", + Handler: _DispatchService_ListDispatches_Handler, + }, + { + MethodName: "RecordDispatch", + Handler: _DispatchService_RecordDispatch_Handler, + }, + { + MethodName: "RecordPlaybookDispatch", + Handler: _DispatchService_RecordPlaybookDispatch_Handler, + }, + { + MethodName: "DeletePlaybookDispatches", + Handler: _DispatchService_DeletePlaybookDispatches_Handler, + }, + { + MethodName: "EnqueueBindingTask", + Handler: _DispatchService_EnqueueBindingTask_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "state/v1/dispatch.proto", +} diff --git a/internal/contracts/state/v1/event_type.pb.go b/internal/contracts/state/v1/event_type.pb.go new file mode 100644 index 000000000..4c9b56ae9 --- /dev/null +++ b/internal/contracts/state/v1/event_type.pb.go @@ -0,0 +1,702 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/event_type.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// EventTypeHeaderCondition mirrors internal/domain/eventtype.HeaderCondition. +type EventTypeHeaderCondition struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EventTypeHeaderCondition) Reset() { + *x = EventTypeHeaderCondition{} + mi := &file_state_v1_event_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EventTypeHeaderCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventTypeHeaderCondition) ProtoMessage() {} + +func (x *EventTypeHeaderCondition) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_event_type_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventTypeHeaderCondition.ProtoReflect.Descriptor instead. +func (*EventTypeHeaderCondition) Descriptor() ([]byte, []int) { + return file_state_v1_event_type_proto_rawDescGZIP(), []int{0} +} + +func (x *EventTypeHeaderCondition) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *EventTypeHeaderCondition) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +// EventTypePayloadCondition mirrors internal/domain/eventtype.PayloadCondition. +type EventTypePayloadCondition struct { + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Op string `protobuf:"bytes,2,opt,name=op,proto3" json:"op,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EventTypePayloadCondition) Reset() { + *x = EventTypePayloadCondition{} + mi := &file_state_v1_event_type_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EventTypePayloadCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventTypePayloadCondition) ProtoMessage() {} + +func (x *EventTypePayloadCondition) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_event_type_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventTypePayloadCondition.ProtoReflect.Descriptor instead. +func (*EventTypePayloadCondition) Descriptor() ([]byte, []int) { + return file_state_v1_event_type_proto_rawDescGZIP(), []int{1} +} + +func (x *EventTypePayloadCondition) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *EventTypePayloadCondition) GetOp() string { + if x != nil { + return x.Op + } + return "" +} + +func (x *EventTypePayloadCondition) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +// EventType mirrors internal/domain/eventtype.EventType. header_conditions and +// payload_conditions are its rule; schema maps each payload path to its type. +type EventType struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + HeaderConditions []*EventTypeHeaderCondition `protobuf:"bytes,4,rep,name=header_conditions,json=headerConditions,proto3" json:"header_conditions,omitempty"` + PayloadConditions []*EventTypePayloadCondition `protobuf:"bytes,5,rep,name=payload_conditions,json=payloadConditions,proto3" json:"payload_conditions,omitempty"` + Schema map[string]string `protobuf:"bytes,6,rep,name=schema,proto3" json:"schema,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + // workspace_id is its source's workspace; read-only here. + WorkspaceId string `protobuf:"bytes,9,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EventType) Reset() { + *x = EventType{} + mi := &file_state_v1_event_type_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EventType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventType) ProtoMessage() {} + +func (x *EventType) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_event_type_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventType.ProtoReflect.Descriptor instead. +func (*EventType) Descriptor() ([]byte, []int) { + return file_state_v1_event_type_proto_rawDescGZIP(), []int{2} +} + +func (x *EventType) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *EventType) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +func (x *EventType) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *EventType) GetHeaderConditions() []*EventTypeHeaderCondition { + if x != nil { + return x.HeaderConditions + } + return nil +} + +func (x *EventType) GetPayloadConditions() []*EventTypePayloadCondition { + if x != nil { + return x.PayloadConditions + } + return nil +} + +func (x *EventType) GetSchema() map[string]string { + if x != nil { + return x.Schema + } + return nil +} + +func (x *EventType) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *EventType) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *EventType) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +type InsertEventTypeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + EventType *EventType `protobuf:"bytes,1,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InsertEventTypeRequest) Reset() { + *x = InsertEventTypeRequest{} + mi := &file_state_v1_event_type_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InsertEventTypeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InsertEventTypeRequest) ProtoMessage() {} + +func (x *InsertEventTypeRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_event_type_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InsertEventTypeRequest.ProtoReflect.Descriptor instead. +func (*InsertEventTypeRequest) Descriptor() ([]byte, []int) { + return file_state_v1_event_type_proto_rawDescGZIP(), []int{3} +} + +func (x *InsertEventTypeRequest) GetEventType() *EventType { + if x != nil { + return x.EventType + } + return nil +} + +type InsertEventTypeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InsertEventTypeResponse) Reset() { + *x = InsertEventTypeResponse{} + mi := &file_state_v1_event_type_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InsertEventTypeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InsertEventTypeResponse) ProtoMessage() {} + +func (x *InsertEventTypeResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_event_type_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InsertEventTypeResponse.ProtoReflect.Descriptor instead. +func (*InsertEventTypeResponse) Descriptor() ([]byte, []int) { + return file_state_v1_event_type_proto_rawDescGZIP(), []int{4} +} + +func (x *InsertEventTypeResponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type UpdateEventTypeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + EventType *EventType `protobuf:"bytes,1,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateEventTypeRequest) Reset() { + *x = UpdateEventTypeRequest{} + mi := &file_state_v1_event_type_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateEventTypeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateEventTypeRequest) ProtoMessage() {} + +func (x *UpdateEventTypeRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_event_type_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateEventTypeRequest.ProtoReflect.Descriptor instead. +func (*UpdateEventTypeRequest) Descriptor() ([]byte, []int) { + return file_state_v1_event_type_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateEventTypeRequest) GetEventType() *EventType { + if x != nil { + return x.EventType + } + return nil +} + +type UpdateEventTypeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateEventTypeResponse) Reset() { + *x = UpdateEventTypeResponse{} + mi := &file_state_v1_event_type_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateEventTypeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateEventTypeResponse) ProtoMessage() {} + +func (x *UpdateEventTypeResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_event_type_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateEventTypeResponse.ProtoReflect.Descriptor instead. +func (*UpdateEventTypeResponse) Descriptor() ([]byte, []int) { + return file_state_v1_event_type_proto_rawDescGZIP(), []int{6} +} + +type DeleteEventTypeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteEventTypeRequest) Reset() { + *x = DeleteEventTypeRequest{} + mi := &file_state_v1_event_type_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteEventTypeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteEventTypeRequest) ProtoMessage() {} + +func (x *DeleteEventTypeRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_event_type_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteEventTypeRequest.ProtoReflect.Descriptor instead. +func (*DeleteEventTypeRequest) Descriptor() ([]byte, []int) { + return file_state_v1_event_type_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteEventTypeRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteEventTypeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteEventTypeResponse) Reset() { + *x = DeleteEventTypeResponse{} + mi := &file_state_v1_event_type_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteEventTypeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteEventTypeResponse) ProtoMessage() {} + +func (x *DeleteEventTypeResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_event_type_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteEventTypeResponse.ProtoReflect.Descriptor instead. +func (*DeleteEventTypeResponse) Descriptor() ([]byte, []int) { + return file_state_v1_event_type_proto_rawDescGZIP(), []int{8} +} + +type ListEventTypesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListEventTypesRequest) Reset() { + *x = ListEventTypesRequest{} + mi := &file_state_v1_event_type_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListEventTypesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEventTypesRequest) ProtoMessage() {} + +func (x *ListEventTypesRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_event_type_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListEventTypesRequest.ProtoReflect.Descriptor instead. +func (*ListEventTypesRequest) Descriptor() ([]byte, []int) { + return file_state_v1_event_type_proto_rawDescGZIP(), []int{9} +} + +type ListEventTypesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + EventTypes []*EventType `protobuf:"bytes,1,rep,name=event_types,json=eventTypes,proto3" json:"event_types,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListEventTypesResponse) Reset() { + *x = ListEventTypesResponse{} + mi := &file_state_v1_event_type_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListEventTypesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEventTypesResponse) ProtoMessage() {} + +func (x *ListEventTypesResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_event_type_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListEventTypesResponse.ProtoReflect.Descriptor instead. +func (*ListEventTypesResponse) Descriptor() ([]byte, []int) { + return file_state_v1_event_type_proto_rawDescGZIP(), []int{10} +} + +func (x *ListEventTypesResponse) GetEventTypes() []*EventType { + if x != nil { + return x.EventTypes + } + return nil +} + +var File_state_v1_event_type_proto protoreflect.FileDescriptor + +const file_state_v1_event_type_proto_rawDesc = "" + + "\n" + + "\x19state/v1/event_type.proto\x12\bstate.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"D\n" + + "\x18EventTypeHeaderCondition\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value\"U\n" + + "\x19EventTypePayloadCondition\x12\x12\n" + + "\x04path\x18\x01 \x01(\tR\x04path\x12\x0e\n" + + "\x02op\x18\x02 \x01(\tR\x02op\x12\x14\n" + + "\x05value\x18\x03 \x01(\tR\x05value\"\xf9\x03\n" + + "\tEventType\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + + "\x06source\x18\x02 \x01(\tR\x06source\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\x12O\n" + + "\x11header_conditions\x18\x04 \x03(\v2\".state.v1.EventTypeHeaderConditionR\x10headerConditions\x12R\n" + + "\x12payload_conditions\x18\x05 \x03(\v2#.state.v1.EventTypePayloadConditionR\x11payloadConditions\x127\n" + + "\x06schema\x18\x06 \x03(\v2\x1f.state.v1.EventType.SchemaEntryR\x06schema\x129\n" + + "\n" + + "created_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12!\n" + + "\fworkspace_id\x18\t \x01(\tR\vworkspaceId\x1a9\n" + + "\vSchemaEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"L\n" + + "\x16InsertEventTypeRequest\x122\n" + + "\n" + + "event_type\x18\x01 \x01(\v2\x13.state.v1.EventTypeR\teventType\")\n" + + "\x17InsertEventTypeResponse\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"L\n" + + "\x16UpdateEventTypeRequest\x122\n" + + "\n" + + "event_type\x18\x01 \x01(\v2\x13.state.v1.EventTypeR\teventType\"\x19\n" + + "\x17UpdateEventTypeResponse\"(\n" + + "\x16DeleteEventTypeRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\x19\n" + + "\x17DeleteEventTypeResponse\"\x17\n" + + "\x15ListEventTypesRequest\"N\n" + + "\x16ListEventTypesResponse\x124\n" + + "\vevent_types\x18\x01 \x03(\v2\x13.state.v1.EventTypeR\n" + + "eventTypes2\xef\x02\n" + + "\x10EventTypeService\x12V\n" + + "\x0fInsertEventType\x12 .state.v1.InsertEventTypeRequest\x1a!.state.v1.InsertEventTypeResponse\x12V\n" + + "\x0fUpdateEventType\x12 .state.v1.UpdateEventTypeRequest\x1a!.state.v1.UpdateEventTypeResponse\x12V\n" + + "\x0fDeleteEventType\x12 .state.v1.DeleteEventTypeRequest\x1a!.state.v1.DeleteEventTypeResponse\x12S\n" + + "\x0eListEventTypes\x12\x1f.state.v1.ListEventTypesRequest\x1a .state.v1.ListEventTypesResponseB\xa8\x01\n" + + "\fcom.state.v1B\x0eEventTypeProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_event_type_proto_rawDescOnce sync.Once + file_state_v1_event_type_proto_rawDescData []byte +) + +func file_state_v1_event_type_proto_rawDescGZIP() []byte { + file_state_v1_event_type_proto_rawDescOnce.Do(func() { + file_state_v1_event_type_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_event_type_proto_rawDesc), len(file_state_v1_event_type_proto_rawDesc))) + }) + return file_state_v1_event_type_proto_rawDescData +} + +var file_state_v1_event_type_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_state_v1_event_type_proto_goTypes = []any{ + (*EventTypeHeaderCondition)(nil), // 0: state.v1.EventTypeHeaderCondition + (*EventTypePayloadCondition)(nil), // 1: state.v1.EventTypePayloadCondition + (*EventType)(nil), // 2: state.v1.EventType + (*InsertEventTypeRequest)(nil), // 3: state.v1.InsertEventTypeRequest + (*InsertEventTypeResponse)(nil), // 4: state.v1.InsertEventTypeResponse + (*UpdateEventTypeRequest)(nil), // 5: state.v1.UpdateEventTypeRequest + (*UpdateEventTypeResponse)(nil), // 6: state.v1.UpdateEventTypeResponse + (*DeleteEventTypeRequest)(nil), // 7: state.v1.DeleteEventTypeRequest + (*DeleteEventTypeResponse)(nil), // 8: state.v1.DeleteEventTypeResponse + (*ListEventTypesRequest)(nil), // 9: state.v1.ListEventTypesRequest + (*ListEventTypesResponse)(nil), // 10: state.v1.ListEventTypesResponse + nil, // 11: state.v1.EventType.SchemaEntry + (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp +} +var file_state_v1_event_type_proto_depIdxs = []int32{ + 0, // 0: state.v1.EventType.header_conditions:type_name -> state.v1.EventTypeHeaderCondition + 1, // 1: state.v1.EventType.payload_conditions:type_name -> state.v1.EventTypePayloadCondition + 11, // 2: state.v1.EventType.schema:type_name -> state.v1.EventType.SchemaEntry + 12, // 3: state.v1.EventType.created_at:type_name -> google.protobuf.Timestamp + 12, // 4: state.v1.EventType.updated_at:type_name -> google.protobuf.Timestamp + 2, // 5: state.v1.InsertEventTypeRequest.event_type:type_name -> state.v1.EventType + 2, // 6: state.v1.UpdateEventTypeRequest.event_type:type_name -> state.v1.EventType + 2, // 7: state.v1.ListEventTypesResponse.event_types:type_name -> state.v1.EventType + 3, // 8: state.v1.EventTypeService.InsertEventType:input_type -> state.v1.InsertEventTypeRequest + 5, // 9: state.v1.EventTypeService.UpdateEventType:input_type -> state.v1.UpdateEventTypeRequest + 7, // 10: state.v1.EventTypeService.DeleteEventType:input_type -> state.v1.DeleteEventTypeRequest + 9, // 11: state.v1.EventTypeService.ListEventTypes:input_type -> state.v1.ListEventTypesRequest + 4, // 12: state.v1.EventTypeService.InsertEventType:output_type -> state.v1.InsertEventTypeResponse + 6, // 13: state.v1.EventTypeService.UpdateEventType:output_type -> state.v1.UpdateEventTypeResponse + 8, // 14: state.v1.EventTypeService.DeleteEventType:output_type -> state.v1.DeleteEventTypeResponse + 10, // 15: state.v1.EventTypeService.ListEventTypes:output_type -> state.v1.ListEventTypesResponse + 12, // [12:16] is the sub-list for method output_type + 8, // [8:12] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_state_v1_event_type_proto_init() } +func file_state_v1_event_type_proto_init() { + if File_state_v1_event_type_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_event_type_proto_rawDesc), len(file_state_v1_event_type_proto_rawDesc)), + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_event_type_proto_goTypes, + DependencyIndexes: file_state_v1_event_type_proto_depIdxs, + MessageInfos: file_state_v1_event_type_proto_msgTypes, + }.Build() + File_state_v1_event_type_proto = out.File + file_state_v1_event_type_proto_goTypes = nil + file_state_v1_event_type_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/event_type_grpc.pb.go b/internal/contracts/state/v1/event_type_grpc.pb.go new file mode 100644 index 000000000..8a2059ab1 --- /dev/null +++ b/internal/contracts/state/v1/event_type_grpc.pb.go @@ -0,0 +1,239 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/event_type.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 ( + EventTypeService_InsertEventType_FullMethodName = "/state.v1.EventTypeService/InsertEventType" + EventTypeService_UpdateEventType_FullMethodName = "/state.v1.EventTypeService/UpdateEventType" + EventTypeService_DeleteEventType_FullMethodName = "/state.v1.EventTypeService/DeleteEventType" + EventTypeService_ListEventTypes_FullMethodName = "/state.v1.EventTypeService/ListEventTypes" +) + +// EventTypeServiceClient is the client API for EventTypeService 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. +// +// Event types. Insert and Update refuse an overlapping or malformed type. +type EventTypeServiceClient interface { + InsertEventType(ctx context.Context, in *InsertEventTypeRequest, opts ...grpc.CallOption) (*InsertEventTypeResponse, error) + UpdateEventType(ctx context.Context, in *UpdateEventTypeRequest, opts ...grpc.CallOption) (*UpdateEventTypeResponse, error) + DeleteEventType(ctx context.Context, in *DeleteEventTypeRequest, opts ...grpc.CallOption) (*DeleteEventTypeResponse, error) + ListEventTypes(ctx context.Context, in *ListEventTypesRequest, opts ...grpc.CallOption) (*ListEventTypesResponse, error) +} + +type eventTypeServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewEventTypeServiceClient(cc grpc.ClientConnInterface) EventTypeServiceClient { + return &eventTypeServiceClient{cc} +} + +func (c *eventTypeServiceClient) InsertEventType(ctx context.Context, in *InsertEventTypeRequest, opts ...grpc.CallOption) (*InsertEventTypeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(InsertEventTypeResponse) + err := c.cc.Invoke(ctx, EventTypeService_InsertEventType_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *eventTypeServiceClient) UpdateEventType(ctx context.Context, in *UpdateEventTypeRequest, opts ...grpc.CallOption) (*UpdateEventTypeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdateEventTypeResponse) + err := c.cc.Invoke(ctx, EventTypeService_UpdateEventType_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *eventTypeServiceClient) DeleteEventType(ctx context.Context, in *DeleteEventTypeRequest, opts ...grpc.CallOption) (*DeleteEventTypeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteEventTypeResponse) + err := c.cc.Invoke(ctx, EventTypeService_DeleteEventType_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *eventTypeServiceClient) ListEventTypes(ctx context.Context, in *ListEventTypesRequest, opts ...grpc.CallOption) (*ListEventTypesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListEventTypesResponse) + err := c.cc.Invoke(ctx, EventTypeService_ListEventTypes_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// EventTypeServiceServer is the server API for EventTypeService service. +// All implementations must embed UnimplementedEventTypeServiceServer +// for forward compatibility. +// +// Event types. Insert and Update refuse an overlapping or malformed type. +type EventTypeServiceServer interface { + InsertEventType(context.Context, *InsertEventTypeRequest) (*InsertEventTypeResponse, error) + UpdateEventType(context.Context, *UpdateEventTypeRequest) (*UpdateEventTypeResponse, error) + DeleteEventType(context.Context, *DeleteEventTypeRequest) (*DeleteEventTypeResponse, error) + ListEventTypes(context.Context, *ListEventTypesRequest) (*ListEventTypesResponse, error) + mustEmbedUnimplementedEventTypeServiceServer() +} + +// UnimplementedEventTypeServiceServer 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 UnimplementedEventTypeServiceServer struct{} + +func (UnimplementedEventTypeServiceServer) InsertEventType(context.Context, *InsertEventTypeRequest) (*InsertEventTypeResponse, error) { + return nil, status.Error(codes.Unimplemented, "method InsertEventType not implemented") +} +func (UnimplementedEventTypeServiceServer) UpdateEventType(context.Context, *UpdateEventTypeRequest) (*UpdateEventTypeResponse, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateEventType not implemented") +} +func (UnimplementedEventTypeServiceServer) DeleteEventType(context.Context, *DeleteEventTypeRequest) (*DeleteEventTypeResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteEventType not implemented") +} +func (UnimplementedEventTypeServiceServer) ListEventTypes(context.Context, *ListEventTypesRequest) (*ListEventTypesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListEventTypes not implemented") +} +func (UnimplementedEventTypeServiceServer) mustEmbedUnimplementedEventTypeServiceServer() {} +func (UnimplementedEventTypeServiceServer) testEmbeddedByValue() {} + +// UnsafeEventTypeServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to EventTypeServiceServer will +// result in compilation errors. +type UnsafeEventTypeServiceServer interface { + mustEmbedUnimplementedEventTypeServiceServer() +} + +func RegisterEventTypeServiceServer(s grpc.ServiceRegistrar, srv EventTypeServiceServer) { + // If the following call panics, it indicates UnimplementedEventTypeServiceServer 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(&EventTypeService_ServiceDesc, srv) +} + +func _EventTypeService_InsertEventType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InsertEventTypeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EventTypeServiceServer).InsertEventType(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EventTypeService_InsertEventType_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EventTypeServiceServer).InsertEventType(ctx, req.(*InsertEventTypeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _EventTypeService_UpdateEventType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateEventTypeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EventTypeServiceServer).UpdateEventType(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EventTypeService_UpdateEventType_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EventTypeServiceServer).UpdateEventType(ctx, req.(*UpdateEventTypeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _EventTypeService_DeleteEventType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteEventTypeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EventTypeServiceServer).DeleteEventType(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EventTypeService_DeleteEventType_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EventTypeServiceServer).DeleteEventType(ctx, req.(*DeleteEventTypeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _EventTypeService_ListEventTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListEventTypesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EventTypeServiceServer).ListEventTypes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EventTypeService_ListEventTypes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EventTypeServiceServer).ListEventTypes(ctx, req.(*ListEventTypesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// EventTypeService_ServiceDesc is the grpc.ServiceDesc for EventTypeService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var EventTypeService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.EventTypeService", + HandlerType: (*EventTypeServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "InsertEventType", + Handler: _EventTypeService_InsertEventType_Handler, + }, + { + MethodName: "UpdateEventType", + Handler: _EventTypeService_UpdateEventType_Handler, + }, + { + MethodName: "DeleteEventType", + Handler: _EventTypeService_DeleteEventType_Handler, + }, + { + MethodName: "ListEventTypes", + Handler: _EventTypeService_ListEventTypes_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "state/v1/event_type.proto", +} diff --git a/internal/contracts/state/v1/execution.pb.go b/internal/contracts/state/v1/execution.pb.go new file mode 100644 index 000000000..451f94773 --- /dev/null +++ b/internal/contracts/state/v1/execution.pb.go @@ -0,0 +1,1039 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/execution.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type StartStepRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // execution_id is the WorkflowExecution (the tasks row) the step belongs + // to, and the task ID the run credential is scoped to. + ExecutionId int64 `protobuf:"varint,1,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"` + Attempt int64 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` + // parent_id is 0 when the step is a stage; otherwise it names the enclosing + // StepExecution, from which the store derives depth. + ParentId int64 `protobuf:"varint,3,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // kind is stage, agent or call. + Kind string `protobuf:"bytes,4,opt,name=kind,proto3" json:"kind,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + // called_execution_id names the WorkflowExecution a `call` step started; + // the store verifies it is this execution's own callee. + CalledExecutionId int64 `protobuf:"varint,6,opt,name=called_execution_id,json=calledExecutionId,proto3" json:"called_execution_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StartStepRequest) Reset() { + *x = StartStepRequest{} + mi := &file_state_v1_execution_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StartStepRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartStepRequest) ProtoMessage() {} + +func (x *StartStepRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_execution_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartStepRequest.ProtoReflect.Descriptor instead. +func (*StartStepRequest) Descriptor() ([]byte, []int) { + return file_state_v1_execution_proto_rawDescGZIP(), []int{0} +} + +func (x *StartStepRequest) GetExecutionId() int64 { + if x != nil { + return x.ExecutionId + } + return 0 +} + +func (x *StartStepRequest) GetAttempt() int64 { + if x != nil { + return x.Attempt + } + return 0 +} + +func (x *StartStepRequest) GetParentId() int64 { + if x != nil { + return x.ParentId + } + return 0 +} + +func (x *StartStepRequest) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *StartStepRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *StartStepRequest) GetCalledExecutionId() int64 { + if x != nil { + return x.CalledExecutionId + } + return 0 +} + +type StartStepResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + StepId int64 `protobuf:"varint,1,opt,name=step_id,json=stepId,proto3" json:"step_id,omitempty"` + // event is the transition's stage_start row, already persisted; the caller + // publishes it to its bus after the write commits (the daemon's event sink + // skips already-persisted rows by their assigned ID). + Event *Event `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StartStepResponse) Reset() { + *x = StartStepResponse{} + mi := &file_state_v1_execution_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StartStepResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartStepResponse) ProtoMessage() {} + +func (x *StartStepResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_execution_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartStepResponse.ProtoReflect.Descriptor instead. +func (*StartStepResponse) Descriptor() ([]byte, []int) { + return file_state_v1_execution_proto_rawDescGZIP(), []int{1} +} + +func (x *StartStepResponse) GetStepId() int64 { + if x != nil { + return x.StepId + } + return 0 +} + +func (x *StartStepResponse) GetEvent() *Event { + if x != nil { + return x.Event + } + return nil +} + +type FinishStepRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // execution_id names the run the step belongs to. The grant check verifies + // it against the credential, and the store verifies the step really is that + // execution's, so a caller cannot move another run's step by naming it. + ExecutionId int64 `protobuf:"varint,1,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"` + StepId int64 `protobuf:"varint,2,opt,name=step_id,json=stepId,proto3" json:"step_id,omitempty"` + From string `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"` + To string `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty"` + Detail string `protobuf:"bytes,5,opt,name=detail,proto3" json:"detail,omitempty"` + TokensUsed int64 `protobuf:"varint,6,opt,name=tokens_used,json=tokensUsed,proto3" json:"tokens_used,omitempty"` + // results is the run's step results (JSON, by step id) after a stage the + // run moves past; empty otherwise. A resumed attempt starts from them. + Results []byte `protobuf:"bytes,7,opt,name=results,proto3" json:"results,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FinishStepRequest) Reset() { + *x = FinishStepRequest{} + mi := &file_state_v1_execution_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FinishStepRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FinishStepRequest) ProtoMessage() {} + +func (x *FinishStepRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_execution_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FinishStepRequest.ProtoReflect.Descriptor instead. +func (*FinishStepRequest) Descriptor() ([]byte, []int) { + return file_state_v1_execution_proto_rawDescGZIP(), []int{2} +} + +func (x *FinishStepRequest) GetExecutionId() int64 { + if x != nil { + return x.ExecutionId + } + return 0 +} + +func (x *FinishStepRequest) GetStepId() int64 { + if x != nil { + return x.StepId + } + return 0 +} + +func (x *FinishStepRequest) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *FinishStepRequest) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *FinishStepRequest) GetDetail() string { + if x != nil { + return x.Detail + } + return "" +} + +func (x *FinishStepRequest) GetTokensUsed() int64 { + if x != nil { + return x.TokensUsed + } + return 0 +} + +func (x *FinishStepRequest) GetResults() []byte { + if x != nil { + return x.Results + } + return nil +} + +type FinishStepResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // event is the transition's stage_finish row, already persisted. + Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FinishStepResponse) Reset() { + *x = FinishStepResponse{} + mi := &file_state_v1_execution_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FinishStepResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FinishStepResponse) ProtoMessage() {} + +func (x *FinishStepResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_execution_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FinishStepResponse.ProtoReflect.Descriptor instead. +func (*FinishStepResponse) Descriptor() ([]byte, []int) { + return file_state_v1_execution_proto_rawDescGZIP(), []int{3} +} + +func (x *FinishStepResponse) GetEvent() *Event { + if x != nil { + return x.Event + } + return nil +} + +type CancelExecutionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + // reason records why the run was stopped, in the execution's park reason + // when the cancel lands there, and on every step event it writes. + Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` + // to is the execution's destination: the transition table routes it, and + // the operator actions name parked or closed_wont_do. + To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CancelExecutionRequest) Reset() { + *x = CancelExecutionRequest{} + mi := &file_state_v1_execution_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CancelExecutionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelExecutionRequest) ProtoMessage() {} + +func (x *CancelExecutionRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_execution_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelExecutionRequest.ProtoReflect.Descriptor instead. +func (*CancelExecutionRequest) Descriptor() ([]byte, []int) { + return file_state_v1_execution_proto_rawDescGZIP(), []int{4} +} + +func (x *CancelExecutionRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *CancelExecutionRequest) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *CancelExecutionRequest) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +type CancelExecutionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // cancelled_callee_ids are the executions the caller was waiting on that + // were cancelled with it, nested callees included; the caller stops their + // runs as well as its own. + CancelledCalleeIds []int64 `protobuf:"varint,2,rep,packed,name=cancelled_callee_ids,json=cancelledCalleeIds,proto3" json:"cancelled_callee_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CancelExecutionResponse) Reset() { + *x = CancelExecutionResponse{} + mi := &file_state_v1_execution_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CancelExecutionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelExecutionResponse) ProtoMessage() {} + +func (x *CancelExecutionResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_execution_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelExecutionResponse.ProtoReflect.Descriptor instead. +func (*CancelExecutionResponse) Descriptor() ([]byte, []int) { + return file_state_v1_execution_proto_rawDescGZIP(), []int{5} +} + +func (x *CancelExecutionResponse) GetCancelledCalleeIds() []int64 { + if x != nil { + return x.CancelledCalleeIds + } + return nil +} + +// StepExecution mirrors internal/domain/workflow/task.StepExecution. +type StepExecution struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + ExecutionId int64 `protobuf:"varint,2,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"` + Attempt int64 `protobuf:"varint,3,opt,name=attempt,proto3" json:"attempt,omitempty"` + // parent_id is 0 for a stage at the tree's root. + ParentId int64 `protobuf:"varint,4,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Depth int32 `protobuf:"varint,5,opt,name=depth,proto3" json:"depth,omitempty"` + Kind string `protobuf:"bytes,6,opt,name=kind,proto3" json:"kind,omitempty"` + Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"` + Status string `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"` + Detail string `protobuf:"bytes,9,opt,name=detail,proto3" json:"detail,omitempty"` + TokensUsed int64 `protobuf:"varint,10,opt,name=tokens_used,json=tokensUsed,proto3" json:"tokens_used,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + FinishedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` + // called_execution_id is the callee task a workflow.call step started. + CalledExecutionId int64 `protobuf:"varint,13,opt,name=called_execution_id,json=calledExecutionId,proto3" json:"called_execution_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StepExecution) Reset() { + *x = StepExecution{} + mi := &file_state_v1_execution_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StepExecution) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StepExecution) ProtoMessage() {} + +func (x *StepExecution) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_execution_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StepExecution.ProtoReflect.Descriptor instead. +func (*StepExecution) Descriptor() ([]byte, []int) { + return file_state_v1_execution_proto_rawDescGZIP(), []int{6} +} + +func (x *StepExecution) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *StepExecution) GetExecutionId() int64 { + if x != nil { + return x.ExecutionId + } + return 0 +} + +func (x *StepExecution) GetAttempt() int64 { + if x != nil { + return x.Attempt + } + return 0 +} + +func (x *StepExecution) GetParentId() int64 { + if x != nil { + return x.ParentId + } + return 0 +} + +func (x *StepExecution) GetDepth() int32 { + if x != nil { + return x.Depth + } + return 0 +} + +func (x *StepExecution) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *StepExecution) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *StepExecution) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *StepExecution) GetDetail() string { + if x != nil { + return x.Detail + } + return "" +} + +func (x *StepExecution) GetTokensUsed() int64 { + if x != nil { + return x.TokensUsed + } + return 0 +} + +func (x *StepExecution) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +func (x *StepExecution) GetFinishedAt() *timestamppb.Timestamp { + if x != nil { + return x.FinishedAt + } + return nil +} + +func (x *StepExecution) GetCalledExecutionId() int64 { + if x != nil { + return x.CalledExecutionId + } + return 0 +} + +type ListStepsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ExecutionId int64 `protobuf:"varint,1,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"` + // attempt selects one attempt's steps; 0 lists every attempt of the + // execution, oldest first -- the dashboard's run-detail rail renders every + // attempt from a single call rather than one per attempt. + Attempt int64 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListStepsRequest) Reset() { + *x = ListStepsRequest{} + mi := &file_state_v1_execution_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListStepsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStepsRequest) ProtoMessage() {} + +func (x *ListStepsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_execution_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStepsRequest.ProtoReflect.Descriptor instead. +func (*ListStepsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_execution_proto_rawDescGZIP(), []int{7} +} + +func (x *ListStepsRequest) GetExecutionId() int64 { + if x != nil { + return x.ExecutionId + } + return 0 +} + +func (x *ListStepsRequest) GetAttempt() int64 { + if x != nil { + return x.Attempt + } + return 0 +} + +type ListStepsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Steps []*StepExecution `protobuf:"bytes,1,rep,name=steps,proto3" json:"steps,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListStepsResponse) Reset() { + *x = ListStepsResponse{} + mi := &file_state_v1_execution_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListStepsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStepsResponse) ProtoMessage() {} + +func (x *ListStepsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_execution_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStepsResponse.ProtoReflect.Descriptor instead. +func (*ListStepsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_execution_proto_rawDescGZIP(), []int{8} +} + +func (x *ListStepsResponse) GetSteps() []*StepExecution { + if x != nil { + return x.Steps + } + return nil +} + +// UsageRecord mirrors usage.Record. A task's record belongs to the task's +// org; any other belongs to the calling principal's org. +type UsageRecord struct { + state protoimpl.MessageState `protogen:"open.v1"` + // source is task, chat or curator. + Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` + TaskId int64 `protobuf:"varint,3,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Attempt int64 `protobuf:"varint,4,opt,name=attempt,proto3" json:"attempt,omitempty"` + Workflow string `protobuf:"bytes,5,opt,name=workflow,proto3" json:"workflow,omitempty"` + Step string `protobuf:"bytes,6,opt,name=step,proto3" json:"step,omitempty"` + Alias string `protobuf:"bytes,7,opt,name=alias,proto3" json:"alias,omitempty"` + Provider string `protobuf:"bytes,8,opt,name=provider,proto3" json:"provider,omitempty"` + Model string `protobuf:"bytes,9,opt,name=model,proto3" json:"model,omitempty"` + InputTokens int64 `protobuf:"varint,10,opt,name=input_tokens,json=inputTokens,proto3" json:"input_tokens,omitempty"` + OutputTokens int64 `protobuf:"varint,11,opt,name=output_tokens,json=outputTokens,proto3" json:"output_tokens,omitempty"` + CachedTokens int64 `protobuf:"varint,12,opt,name=cached_tokens,json=cachedTokens,proto3" json:"cached_tokens,omitempty"` + At *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=at,proto3" json:"at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UsageRecord) Reset() { + *x = UsageRecord{} + mi := &file_state_v1_execution_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UsageRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UsageRecord) ProtoMessage() {} + +func (x *UsageRecord) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_execution_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UsageRecord.ProtoReflect.Descriptor instead. +func (*UsageRecord) Descriptor() ([]byte, []int) { + return file_state_v1_execution_proto_rawDescGZIP(), []int{9} +} + +func (x *UsageRecord) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +func (x *UsageRecord) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *UsageRecord) GetAttempt() int64 { + if x != nil { + return x.Attempt + } + return 0 +} + +func (x *UsageRecord) GetWorkflow() string { + if x != nil { + return x.Workflow + } + return "" +} + +func (x *UsageRecord) GetStep() string { + if x != nil { + return x.Step + } + return "" +} + +func (x *UsageRecord) GetAlias() string { + if x != nil { + return x.Alias + } + return "" +} + +func (x *UsageRecord) GetProvider() string { + if x != nil { + return x.Provider + } + return "" +} + +func (x *UsageRecord) GetModel() string { + if x != nil { + return x.Model + } + return "" +} + +func (x *UsageRecord) GetInputTokens() int64 { + if x != nil { + return x.InputTokens + } + return 0 +} + +func (x *UsageRecord) GetOutputTokens() int64 { + if x != nil { + return x.OutputTokens + } + return 0 +} + +func (x *UsageRecord) GetCachedTokens() int64 { + if x != nil { + return x.CachedTokens + } + return 0 +} + +func (x *UsageRecord) GetAt() *timestamppb.Timestamp { + if x != nil { + return x.At + } + return nil +} + +type RecordUsageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Record *UsageRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordUsageRequest) Reset() { + *x = RecordUsageRequest{} + mi := &file_state_v1_execution_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordUsageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordUsageRequest) ProtoMessage() {} + +func (x *RecordUsageRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_execution_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordUsageRequest.ProtoReflect.Descriptor instead. +func (*RecordUsageRequest) Descriptor() ([]byte, []int) { + return file_state_v1_execution_proto_rawDescGZIP(), []int{10} +} + +func (x *RecordUsageRequest) GetRecord() *UsageRecord { + if x != nil { + return x.Record + } + return nil +} + +type RecordUsageResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordUsageResponse) Reset() { + *x = RecordUsageResponse{} + mi := &file_state_v1_execution_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordUsageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordUsageResponse) ProtoMessage() {} + +func (x *RecordUsageResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_execution_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordUsageResponse.ProtoReflect.Descriptor instead. +func (*RecordUsageResponse) Descriptor() ([]byte, []int) { + return file_state_v1_execution_proto_rawDescGZIP(), []int{11} +} + +var File_state_v1_execution_proto protoreflect.FileDescriptor + +const file_state_v1_execution_proto_rawDesc = "" + + "\n" + + "\x18state/v1/execution.proto\x12\bstate.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x14state/v1/types.proto\"\xc4\x01\n" + + "\x10StartStepRequest\x12!\n" + + "\fexecution_id\x18\x01 \x01(\x03R\vexecutionId\x12\x18\n" + + "\aattempt\x18\x02 \x01(\x03R\aattempt\x12\x1b\n" + + "\tparent_id\x18\x03 \x01(\x03R\bparentId\x12\x12\n" + + "\x04kind\x18\x04 \x01(\tR\x04kind\x12\x12\n" + + "\x04name\x18\x05 \x01(\tR\x04name\x12.\n" + + "\x13called_execution_id\x18\x06 \x01(\x03R\x11calledExecutionId\"S\n" + + "\x11StartStepResponse\x12\x17\n" + + "\astep_id\x18\x01 \x01(\x03R\x06stepId\x12%\n" + + "\x05event\x18\x02 \x01(\v2\x0f.state.v1.EventR\x05event\"\xc6\x01\n" + + "\x11FinishStepRequest\x12!\n" + + "\fexecution_id\x18\x01 \x01(\x03R\vexecutionId\x12\x17\n" + + "\astep_id\x18\x02 \x01(\x03R\x06stepId\x12\x12\n" + + "\x04from\x18\x03 \x01(\tR\x04from\x12\x0e\n" + + "\x02to\x18\x04 \x01(\tR\x02to\x12\x16\n" + + "\x06detail\x18\x05 \x01(\tR\x06detail\x12\x1f\n" + + "\vtokens_used\x18\x06 \x01(\x03R\n" + + "tokensUsed\x12\x18\n" + + "\aresults\x18\a \x01(\fR\aresults\";\n" + + "\x12FinishStepResponse\x12%\n" + + "\x05event\x18\x01 \x01(\v2\x0f.state.v1.EventR\x05event\"Y\n" + + "\x16CancelExecutionRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x16\n" + + "\x06reason\x18\x02 \x01(\tR\x06reason\x12\x0e\n" + + "\x02to\x18\x03 \x01(\tR\x02to\"e\n" + + "\x17CancelExecutionResponse\x120\n" + + "\x14cancelled_callee_ids\x18\x02 \x03(\x03R\x12cancelledCalleeIdsJ\x04\b\x01\x10\x02R\x12cancelled_step_ids\"\xb0\x03\n" + + "\rStepExecution\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12!\n" + + "\fexecution_id\x18\x02 \x01(\x03R\vexecutionId\x12\x18\n" + + "\aattempt\x18\x03 \x01(\x03R\aattempt\x12\x1b\n" + + "\tparent_id\x18\x04 \x01(\x03R\bparentId\x12\x14\n" + + "\x05depth\x18\x05 \x01(\x05R\x05depth\x12\x12\n" + + "\x04kind\x18\x06 \x01(\tR\x04kind\x12\x12\n" + + "\x04name\x18\a \x01(\tR\x04name\x12\x16\n" + + "\x06status\x18\b \x01(\tR\x06status\x12\x16\n" + + "\x06detail\x18\t \x01(\tR\x06detail\x12\x1f\n" + + "\vtokens_used\x18\n" + + " \x01(\x03R\n" + + "tokensUsed\x129\n" + + "\n" + + "started_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\tstartedAt\x12;\n" + + "\vfinished_at\x18\f \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "finishedAt\x12.\n" + + "\x13called_execution_id\x18\r \x01(\x03R\x11calledExecutionId\"O\n" + + "\x10ListStepsRequest\x12!\n" + + "\fexecution_id\x18\x01 \x01(\x03R\vexecutionId\x12\x18\n" + + "\aattempt\x18\x02 \x01(\x03R\aattempt\"B\n" + + "\x11ListStepsResponse\x12-\n" + + "\x05steps\x18\x01 \x03(\v2\x17.state.v1.StepExecutionR\x05steps\"\xf7\x02\n" + + "\vUsageRecord\x12\x16\n" + + "\x06source\x18\x02 \x01(\tR\x06source\x12\x17\n" + + "\atask_id\x18\x03 \x01(\x03R\x06taskId\x12\x18\n" + + "\aattempt\x18\x04 \x01(\x03R\aattempt\x12\x1a\n" + + "\bworkflow\x18\x05 \x01(\tR\bworkflow\x12\x12\n" + + "\x04step\x18\x06 \x01(\tR\x04step\x12\x14\n" + + "\x05alias\x18\a \x01(\tR\x05alias\x12\x1a\n" + + "\bprovider\x18\b \x01(\tR\bprovider\x12\x14\n" + + "\x05model\x18\t \x01(\tR\x05model\x12!\n" + + "\finput_tokens\x18\n" + + " \x01(\x03R\vinputTokens\x12#\n" + + "\routput_tokens\x18\v \x01(\x03R\foutputTokens\x12#\n" + + "\rcached_tokens\x18\f \x01(\x03R\fcachedTokens\x12*\n" + + "\x02at\x18\r \x01(\v2\x1a.google.protobuf.TimestampR\x02atJ\x04\b\x01\x10\x02R\x06org_id\"C\n" + + "\x12RecordUsageRequest\x12-\n" + + "\x06record\x18\x01 \x01(\v2\x15.state.v1.UsageRecordR\x06record\"\x15\n" + + "\x13RecordUsageResponse2\x8b\x03\n" + + "\x10ExecutionService\x12D\n" + + "\tStartStep\x12\x1a.state.v1.StartStepRequest\x1a\x1b.state.v1.StartStepResponse\x12J\n" + + "\vRecordUsage\x12\x1c.state.v1.RecordUsageRequest\x1a\x1d.state.v1.RecordUsageResponse\x12G\n" + + "\n" + + "FinishStep\x12\x1b.state.v1.FinishStepRequest\x1a\x1c.state.v1.FinishStepResponse\x12V\n" + + "\x0fCancelExecution\x12 .state.v1.CancelExecutionRequest\x1a!.state.v1.CancelExecutionResponse\x12D\n" + + "\tListSteps\x12\x1a.state.v1.ListStepsRequest\x1a\x1b.state.v1.ListStepsResponseB\xa8\x01\n" + + "\fcom.state.v1B\x0eExecutionProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_execution_proto_rawDescOnce sync.Once + file_state_v1_execution_proto_rawDescData []byte +) + +func file_state_v1_execution_proto_rawDescGZIP() []byte { + file_state_v1_execution_proto_rawDescOnce.Do(func() { + file_state_v1_execution_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_execution_proto_rawDesc), len(file_state_v1_execution_proto_rawDesc))) + }) + return file_state_v1_execution_proto_rawDescData +} + +var file_state_v1_execution_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_state_v1_execution_proto_goTypes = []any{ + (*StartStepRequest)(nil), // 0: state.v1.StartStepRequest + (*StartStepResponse)(nil), // 1: state.v1.StartStepResponse + (*FinishStepRequest)(nil), // 2: state.v1.FinishStepRequest + (*FinishStepResponse)(nil), // 3: state.v1.FinishStepResponse + (*CancelExecutionRequest)(nil), // 4: state.v1.CancelExecutionRequest + (*CancelExecutionResponse)(nil), // 5: state.v1.CancelExecutionResponse + (*StepExecution)(nil), // 6: state.v1.StepExecution + (*ListStepsRequest)(nil), // 7: state.v1.ListStepsRequest + (*ListStepsResponse)(nil), // 8: state.v1.ListStepsResponse + (*UsageRecord)(nil), // 9: state.v1.UsageRecord + (*RecordUsageRequest)(nil), // 10: state.v1.RecordUsageRequest + (*RecordUsageResponse)(nil), // 11: state.v1.RecordUsageResponse + (*Event)(nil), // 12: state.v1.Event + (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp +} +var file_state_v1_execution_proto_depIdxs = []int32{ + 12, // 0: state.v1.StartStepResponse.event:type_name -> state.v1.Event + 12, // 1: state.v1.FinishStepResponse.event:type_name -> state.v1.Event + 13, // 2: state.v1.StepExecution.started_at:type_name -> google.protobuf.Timestamp + 13, // 3: state.v1.StepExecution.finished_at:type_name -> google.protobuf.Timestamp + 6, // 4: state.v1.ListStepsResponse.steps:type_name -> state.v1.StepExecution + 13, // 5: state.v1.UsageRecord.at:type_name -> google.protobuf.Timestamp + 9, // 6: state.v1.RecordUsageRequest.record:type_name -> state.v1.UsageRecord + 0, // 7: state.v1.ExecutionService.StartStep:input_type -> state.v1.StartStepRequest + 10, // 8: state.v1.ExecutionService.RecordUsage:input_type -> state.v1.RecordUsageRequest + 2, // 9: state.v1.ExecutionService.FinishStep:input_type -> state.v1.FinishStepRequest + 4, // 10: state.v1.ExecutionService.CancelExecution:input_type -> state.v1.CancelExecutionRequest + 7, // 11: state.v1.ExecutionService.ListSteps:input_type -> state.v1.ListStepsRequest + 1, // 12: state.v1.ExecutionService.StartStep:output_type -> state.v1.StartStepResponse + 11, // 13: state.v1.ExecutionService.RecordUsage:output_type -> state.v1.RecordUsageResponse + 3, // 14: state.v1.ExecutionService.FinishStep:output_type -> state.v1.FinishStepResponse + 5, // 15: state.v1.ExecutionService.CancelExecution:output_type -> state.v1.CancelExecutionResponse + 8, // 16: state.v1.ExecutionService.ListSteps:output_type -> state.v1.ListStepsResponse + 12, // [12:17] is the sub-list for method output_type + 7, // [7:12] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_state_v1_execution_proto_init() } +func file_state_v1_execution_proto_init() { + if File_state_v1_execution_proto != nil { + return + } + file_state_v1_types_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_execution_proto_rawDesc), len(file_state_v1_execution_proto_rawDesc)), + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_execution_proto_goTypes, + DependencyIndexes: file_state_v1_execution_proto_depIdxs, + MessageInfos: file_state_v1_execution_proto_msgTypes, + }.Build() + File_state_v1_execution_proto = out.File + file_state_v1_execution_proto_goTypes = nil + file_state_v1_execution_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/execution_grpc.pb.go b/internal/contracts/state/v1/execution_grpc.pb.go new file mode 100644 index 000000000..8b409d391 --- /dev/null +++ b/internal/contracts/state/v1/execution_grpc.pb.go @@ -0,0 +1,291 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/execution.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 ( + ExecutionService_StartStep_FullMethodName = "/state.v1.ExecutionService/StartStep" + ExecutionService_RecordUsage_FullMethodName = "/state.v1.ExecutionService/RecordUsage" + ExecutionService_FinishStep_FullMethodName = "/state.v1.ExecutionService/FinishStep" + ExecutionService_CancelExecution_FullMethodName = "/state.v1.ExecutionService/CancelExecution" + ExecutionService_ListSteps_FullMethodName = "/state.v1.ExecutionService/ListSteps" +) + +// ExecutionServiceClient is the client API for ExecutionService 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 ExecutionServiceClient interface { + // Step executions (docs/prds/execution-tree-state-machine.md). The run + // credential authorises both on its own execution only. + StartStep(ctx context.Context, in *StartStepRequest, opts ...grpc.CallOption) (*StartStepResponse, error) + // RecordUsage appends one model call's usage record. A run credential may + // record usage only for its own task. + RecordUsage(ctx context.Context, in *RecordUsageRequest, opts ...grpc.CallOption) (*RecordUsageResponse, error) + FinishStep(ctx context.Context, in *FinishStepRequest, opts ...grpc.CallOption) (*FinishStepResponse, error) + // Cancellation. Deliberately administrative (deny-by-default for a + // task-scoped grant): a cancel is a dashboard, API and dispatch action + // decided by the Authorizer, not a worker call. + CancelExecution(ctx context.Context, in *CancelExecutionRequest, opts ...grpc.CallOption) (*CancelExecutionResponse, error) + // ListSteps is a dashboard/API/dispatch action (Authorizer: read on the + // run), not task-scoped-grant callable like StartStep/FinishStep. + ListSteps(ctx context.Context, in *ListStepsRequest, opts ...grpc.CallOption) (*ListStepsResponse, error) +} + +type executionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewExecutionServiceClient(cc grpc.ClientConnInterface) ExecutionServiceClient { + return &executionServiceClient{cc} +} + +func (c *executionServiceClient) StartStep(ctx context.Context, in *StartStepRequest, opts ...grpc.CallOption) (*StartStepResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(StartStepResponse) + err := c.cc.Invoke(ctx, ExecutionService_StartStep_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *executionServiceClient) RecordUsage(ctx context.Context, in *RecordUsageRequest, opts ...grpc.CallOption) (*RecordUsageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RecordUsageResponse) + err := c.cc.Invoke(ctx, ExecutionService_RecordUsage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *executionServiceClient) FinishStep(ctx context.Context, in *FinishStepRequest, opts ...grpc.CallOption) (*FinishStepResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FinishStepResponse) + err := c.cc.Invoke(ctx, ExecutionService_FinishStep_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *executionServiceClient) CancelExecution(ctx context.Context, in *CancelExecutionRequest, opts ...grpc.CallOption) (*CancelExecutionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CancelExecutionResponse) + err := c.cc.Invoke(ctx, ExecutionService_CancelExecution_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *executionServiceClient) ListSteps(ctx context.Context, in *ListStepsRequest, opts ...grpc.CallOption) (*ListStepsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListStepsResponse) + err := c.cc.Invoke(ctx, ExecutionService_ListSteps_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ExecutionServiceServer is the server API for ExecutionService service. +// All implementations must embed UnimplementedExecutionServiceServer +// for forward compatibility. +type ExecutionServiceServer interface { + // Step executions (docs/prds/execution-tree-state-machine.md). The run + // credential authorises both on its own execution only. + StartStep(context.Context, *StartStepRequest) (*StartStepResponse, error) + // RecordUsage appends one model call's usage record. A run credential may + // record usage only for its own task. + RecordUsage(context.Context, *RecordUsageRequest) (*RecordUsageResponse, error) + FinishStep(context.Context, *FinishStepRequest) (*FinishStepResponse, error) + // Cancellation. Deliberately administrative (deny-by-default for a + // task-scoped grant): a cancel is a dashboard, API and dispatch action + // decided by the Authorizer, not a worker call. + CancelExecution(context.Context, *CancelExecutionRequest) (*CancelExecutionResponse, error) + // ListSteps is a dashboard/API/dispatch action (Authorizer: read on the + // run), not task-scoped-grant callable like StartStep/FinishStep. + ListSteps(context.Context, *ListStepsRequest) (*ListStepsResponse, error) + mustEmbedUnimplementedExecutionServiceServer() +} + +// UnimplementedExecutionServiceServer 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 UnimplementedExecutionServiceServer struct{} + +func (UnimplementedExecutionServiceServer) StartStep(context.Context, *StartStepRequest) (*StartStepResponse, error) { + return nil, status.Error(codes.Unimplemented, "method StartStep not implemented") +} +func (UnimplementedExecutionServiceServer) RecordUsage(context.Context, *RecordUsageRequest) (*RecordUsageResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RecordUsage not implemented") +} +func (UnimplementedExecutionServiceServer) FinishStep(context.Context, *FinishStepRequest) (*FinishStepResponse, error) { + return nil, status.Error(codes.Unimplemented, "method FinishStep not implemented") +} +func (UnimplementedExecutionServiceServer) CancelExecution(context.Context, *CancelExecutionRequest) (*CancelExecutionResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CancelExecution not implemented") +} +func (UnimplementedExecutionServiceServer) ListSteps(context.Context, *ListStepsRequest) (*ListStepsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListSteps not implemented") +} +func (UnimplementedExecutionServiceServer) mustEmbedUnimplementedExecutionServiceServer() {} +func (UnimplementedExecutionServiceServer) testEmbeddedByValue() {} + +// UnsafeExecutionServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ExecutionServiceServer will +// result in compilation errors. +type UnsafeExecutionServiceServer interface { + mustEmbedUnimplementedExecutionServiceServer() +} + +func RegisterExecutionServiceServer(s grpc.ServiceRegistrar, srv ExecutionServiceServer) { + // If the following call panics, it indicates UnimplementedExecutionServiceServer 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(&ExecutionService_ServiceDesc, srv) +} + +func _ExecutionService_StartStep_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StartStepRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExecutionServiceServer).StartStep(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExecutionService_StartStep_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExecutionServiceServer).StartStep(ctx, req.(*StartStepRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExecutionService_RecordUsage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RecordUsageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExecutionServiceServer).RecordUsage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExecutionService_RecordUsage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExecutionServiceServer).RecordUsage(ctx, req.(*RecordUsageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExecutionService_FinishStep_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FinishStepRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExecutionServiceServer).FinishStep(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExecutionService_FinishStep_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExecutionServiceServer).FinishStep(ctx, req.(*FinishStepRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExecutionService_CancelExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CancelExecutionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExecutionServiceServer).CancelExecution(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExecutionService_CancelExecution_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExecutionServiceServer).CancelExecution(ctx, req.(*CancelExecutionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExecutionService_ListSteps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListStepsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExecutionServiceServer).ListSteps(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExecutionService_ListSteps_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExecutionServiceServer).ListSteps(ctx, req.(*ListStepsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ExecutionService_ServiceDesc is the grpc.ServiceDesc for ExecutionService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ExecutionService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.ExecutionService", + HandlerType: (*ExecutionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "StartStep", + Handler: _ExecutionService_StartStep_Handler, + }, + { + MethodName: "RecordUsage", + Handler: _ExecutionService_RecordUsage_Handler, + }, + { + MethodName: "FinishStep", + Handler: _ExecutionService_FinishStep_Handler, + }, + { + MethodName: "CancelExecution", + Handler: _ExecutionService_CancelExecution_Handler, + }, + { + MethodName: "ListSteps", + Handler: _ExecutionService_ListSteps_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "state/v1/execution.proto", +} diff --git a/internal/contracts/state/v1/harness_secret.pb.go b/internal/contracts/state/v1/harness_secret.pb.go new file mode 100644 index 000000000..933182e44 --- /dev/null +++ b/internal/contracts/state/v1/harness_secret.pb.go @@ -0,0 +1,402 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/harness_secret.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// HarnessSecret mirrors internal/domain/harnesssecret.Secret -- one org's +// captured OAuth token set for a credential binding's service +// (docs/prds/external-agent-harness.md, Credentials). +type HarnessSecret struct { + state protoimpl.MessageState `protogen:"open.v1"` + Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` + AccessToken string `protobuf:"bytes,3,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` + RefreshToken string `protobuf:"bytes,4,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` + TokenType string `protobuf:"bytes,5,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Scopes []string `protobuf:"bytes,8,rep,name=scopes,proto3" json:"scopes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HarnessSecret) Reset() { + *x = HarnessSecret{} + mi := &file_state_v1_harness_secret_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HarnessSecret) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HarnessSecret) ProtoMessage() {} + +func (x *HarnessSecret) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_harness_secret_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HarnessSecret.ProtoReflect.Descriptor instead. +func (*HarnessSecret) Descriptor() ([]byte, []int) { + return file_state_v1_harness_secret_proto_rawDescGZIP(), []int{0} +} + +func (x *HarnessSecret) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *HarnessSecret) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + +func (x *HarnessSecret) GetRefreshToken() string { + if x != nil { + return x.RefreshToken + } + return "" +} + +func (x *HarnessSecret) GetTokenType() string { + if x != nil { + return x.TokenType + } + return "" +} + +func (x *HarnessSecret) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +func (x *HarnessSecret) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *HarnessSecret) GetScopes() []string { + if x != nil { + return x.Scopes + } + return nil +} + +type GetHarnessSecretRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` + RunCredential string `protobuf:"bytes,3,opt,name=run_credential,json=runCredential,proto3" json:"run_credential,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetHarnessSecretRequest) Reset() { + *x = GetHarnessSecretRequest{} + mi := &file_state_v1_harness_secret_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetHarnessSecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetHarnessSecretRequest) ProtoMessage() {} + +func (x *GetHarnessSecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_harness_secret_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetHarnessSecretRequest.ProtoReflect.Descriptor instead. +func (*GetHarnessSecretRequest) Descriptor() ([]byte, []int) { + return file_state_v1_harness_secret_proto_rawDescGZIP(), []int{1} +} + +func (x *GetHarnessSecretRequest) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *GetHarnessSecretRequest) GetRunCredential() string { + if x != nil { + return x.RunCredential + } + return "" +} + +type GetHarnessSecretResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Secret *HarnessSecret `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` + Org string `protobuf:"bytes,2,opt,name=org,proto3" json:"org,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetHarnessSecretResponse) Reset() { + *x = GetHarnessSecretResponse{} + mi := &file_state_v1_harness_secret_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetHarnessSecretResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetHarnessSecretResponse) ProtoMessage() {} + +func (x *GetHarnessSecretResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_harness_secret_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetHarnessSecretResponse.ProtoReflect.Descriptor instead. +func (*GetHarnessSecretResponse) Descriptor() ([]byte, []int) { + return file_state_v1_harness_secret_proto_rawDescGZIP(), []int{2} +} + +func (x *GetHarnessSecretResponse) GetSecret() *HarnessSecret { + if x != nil { + return x.Secret + } + return nil +} + +func (x *GetHarnessSecretResponse) GetOrg() string { + if x != nil { + return x.Org + } + return "" +} + +type PutHarnessSecretRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Secret *HarnessSecret `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` + RunCredential string `protobuf:"bytes,2,opt,name=run_credential,json=runCredential,proto3" json:"run_credential,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PutHarnessSecretRequest) Reset() { + *x = PutHarnessSecretRequest{} + mi := &file_state_v1_harness_secret_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PutHarnessSecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutHarnessSecretRequest) ProtoMessage() {} + +func (x *PutHarnessSecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_harness_secret_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutHarnessSecretRequest.ProtoReflect.Descriptor instead. +func (*PutHarnessSecretRequest) Descriptor() ([]byte, []int) { + return file_state_v1_harness_secret_proto_rawDescGZIP(), []int{3} +} + +func (x *PutHarnessSecretRequest) GetSecret() *HarnessSecret { + if x != nil { + return x.Secret + } + return nil +} + +func (x *PutHarnessSecretRequest) GetRunCredential() string { + if x != nil { + return x.RunCredential + } + return "" +} + +type PutHarnessSecretResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PutHarnessSecretResponse) Reset() { + *x = PutHarnessSecretResponse{} + mi := &file_state_v1_harness_secret_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PutHarnessSecretResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutHarnessSecretResponse) ProtoMessage() {} + +func (x *PutHarnessSecretResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_harness_secret_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutHarnessSecretResponse.ProtoReflect.Descriptor instead. +func (*PutHarnessSecretResponse) Descriptor() ([]byte, []int) { + return file_state_v1_harness_secret_proto_rawDescGZIP(), []int{4} +} + +var File_state_v1_harness_secret_proto protoreflect.FileDescriptor + +const file_state_v1_harness_secret_proto_rawDesc = "" + + "\n" + + "\x1dstate/v1/harness_secret.proto\x12\bstate.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa9\x02\n" + + "\rHarnessSecret\x12\x18\n" + + "\aservice\x18\x02 \x01(\tR\aservice\x12!\n" + + "\faccess_token\x18\x03 \x01(\tR\vaccessToken\x12#\n" + + "\rrefresh_token\x18\x04 \x01(\tR\frefreshToken\x12\x1d\n" + + "\n" + + "token_type\x18\x05 \x01(\tR\ttokenType\x129\n" + + "\n" + + "expires_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\x129\n" + + "\n" + + "updated_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x16\n" + + "\x06scopes\x18\b \x03(\tR\x06scopesJ\x04\b\x01\x10\x02R\x03org\"e\n" + + "\x17GetHarnessSecretRequest\x12\x18\n" + + "\aservice\x18\x02 \x01(\tR\aservice\x12%\n" + + "\x0erun_credential\x18\x03 \x01(\tR\rrunCredentialJ\x04\b\x01\x10\x02R\x03org\"]\n" + + "\x18GetHarnessSecretResponse\x12/\n" + + "\x06secret\x18\x01 \x01(\v2\x17.state.v1.HarnessSecretR\x06secret\x12\x10\n" + + "\x03org\x18\x02 \x01(\tR\x03org\"q\n" + + "\x17PutHarnessSecretRequest\x12/\n" + + "\x06secret\x18\x01 \x01(\v2\x17.state.v1.HarnessSecretR\x06secret\x12%\n" + + "\x0erun_credential\x18\x02 \x01(\tR\rrunCredential\"\x1a\n" + + "\x18PutHarnessSecretResponse2\xcc\x01\n" + + "\x14HarnessSecretService\x12Y\n" + + "\x10GetHarnessSecret\x12!.state.v1.GetHarnessSecretRequest\x1a\".state.v1.GetHarnessSecretResponse\x12Y\n" + + "\x10PutHarnessSecret\x12!.state.v1.PutHarnessSecretRequest\x1a\".state.v1.PutHarnessSecretResponseB\xac\x01\n" + + "\fcom.state.v1B\x12HarnessSecretProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_harness_secret_proto_rawDescOnce sync.Once + file_state_v1_harness_secret_proto_rawDescData []byte +) + +func file_state_v1_harness_secret_proto_rawDescGZIP() []byte { + file_state_v1_harness_secret_proto_rawDescOnce.Do(func() { + file_state_v1_harness_secret_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_harness_secret_proto_rawDesc), len(file_state_v1_harness_secret_proto_rawDesc))) + }) + return file_state_v1_harness_secret_proto_rawDescData +} + +var file_state_v1_harness_secret_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_state_v1_harness_secret_proto_goTypes = []any{ + (*HarnessSecret)(nil), // 0: state.v1.HarnessSecret + (*GetHarnessSecretRequest)(nil), // 1: state.v1.GetHarnessSecretRequest + (*GetHarnessSecretResponse)(nil), // 2: state.v1.GetHarnessSecretResponse + (*PutHarnessSecretRequest)(nil), // 3: state.v1.PutHarnessSecretRequest + (*PutHarnessSecretResponse)(nil), // 4: state.v1.PutHarnessSecretResponse + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp +} +var file_state_v1_harness_secret_proto_depIdxs = []int32{ + 5, // 0: state.v1.HarnessSecret.expires_at:type_name -> google.protobuf.Timestamp + 5, // 1: state.v1.HarnessSecret.updated_at:type_name -> google.protobuf.Timestamp + 0, // 2: state.v1.GetHarnessSecretResponse.secret:type_name -> state.v1.HarnessSecret + 0, // 3: state.v1.PutHarnessSecretRequest.secret:type_name -> state.v1.HarnessSecret + 1, // 4: state.v1.HarnessSecretService.GetHarnessSecret:input_type -> state.v1.GetHarnessSecretRequest + 3, // 5: state.v1.HarnessSecretService.PutHarnessSecret:input_type -> state.v1.PutHarnessSecretRequest + 2, // 6: state.v1.HarnessSecretService.GetHarnessSecret:output_type -> state.v1.GetHarnessSecretResponse + 4, // 7: state.v1.HarnessSecretService.PutHarnessSecret:output_type -> state.v1.PutHarnessSecretResponse + 6, // [6:8] is the sub-list for method output_type + 4, // [4:6] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_state_v1_harness_secret_proto_init() } +func file_state_v1_harness_secret_proto_init() { + if File_state_v1_harness_secret_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_harness_secret_proto_rawDesc), len(file_state_v1_harness_secret_proto_rawDesc)), + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_harness_secret_proto_goTypes, + DependencyIndexes: file_state_v1_harness_secret_proto_depIdxs, + MessageInfos: file_state_v1_harness_secret_proto_msgTypes, + }.Build() + File_state_v1_harness_secret_proto = out.File + file_state_v1_harness_secret_proto_goTypes = nil + file_state_v1_harness_secret_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/harness_secret_grpc.pb.go b/internal/contracts/state/v1/harness_secret_grpc.pb.go new file mode 100644 index 000000000..6298c5a89 --- /dev/null +++ b/internal/contracts/state/v1/harness_secret_grpc.pb.go @@ -0,0 +1,169 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/harness_secret.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 ( + HarnessSecretService_GetHarnessSecret_FullMethodName = "/state.v1.HarnessSecretService/GetHarnessSecret" + HarnessSecretService_PutHarnessSecret_FullMethodName = "/state.v1.HarnessSecretService/PutHarnessSecret" +) + +// HarnessSecretServiceClient is the client API for HarnessSecretService 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. +// +// Harness OAuth secrets (docs/prds/external-agent-harness.md, +// Credentials). Administrative: the setup terminal (an `update` action on +// the secret, Authorizer-gated) and the egress proxy's token-endpoint +// interception (acting as the daemon, not a worker) are the only callers. +type HarnessSecretServiceClient interface { + GetHarnessSecret(ctx context.Context, in *GetHarnessSecretRequest, opts ...grpc.CallOption) (*GetHarnessSecretResponse, error) + PutHarnessSecret(ctx context.Context, in *PutHarnessSecretRequest, opts ...grpc.CallOption) (*PutHarnessSecretResponse, error) +} + +type harnessSecretServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewHarnessSecretServiceClient(cc grpc.ClientConnInterface) HarnessSecretServiceClient { + return &harnessSecretServiceClient{cc} +} + +func (c *harnessSecretServiceClient) GetHarnessSecret(ctx context.Context, in *GetHarnessSecretRequest, opts ...grpc.CallOption) (*GetHarnessSecretResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetHarnessSecretResponse) + err := c.cc.Invoke(ctx, HarnessSecretService_GetHarnessSecret_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *harnessSecretServiceClient) PutHarnessSecret(ctx context.Context, in *PutHarnessSecretRequest, opts ...grpc.CallOption) (*PutHarnessSecretResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PutHarnessSecretResponse) + err := c.cc.Invoke(ctx, HarnessSecretService_PutHarnessSecret_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HarnessSecretServiceServer is the server API for HarnessSecretService service. +// All implementations must embed UnimplementedHarnessSecretServiceServer +// for forward compatibility. +// +// Harness OAuth secrets (docs/prds/external-agent-harness.md, +// Credentials). Administrative: the setup terminal (an `update` action on +// the secret, Authorizer-gated) and the egress proxy's token-endpoint +// interception (acting as the daemon, not a worker) are the only callers. +type HarnessSecretServiceServer interface { + GetHarnessSecret(context.Context, *GetHarnessSecretRequest) (*GetHarnessSecretResponse, error) + PutHarnessSecret(context.Context, *PutHarnessSecretRequest) (*PutHarnessSecretResponse, error) + mustEmbedUnimplementedHarnessSecretServiceServer() +} + +// UnimplementedHarnessSecretServiceServer 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 UnimplementedHarnessSecretServiceServer struct{} + +func (UnimplementedHarnessSecretServiceServer) GetHarnessSecret(context.Context, *GetHarnessSecretRequest) (*GetHarnessSecretResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetHarnessSecret not implemented") +} +func (UnimplementedHarnessSecretServiceServer) PutHarnessSecret(context.Context, *PutHarnessSecretRequest) (*PutHarnessSecretResponse, error) { + return nil, status.Error(codes.Unimplemented, "method PutHarnessSecret not implemented") +} +func (UnimplementedHarnessSecretServiceServer) mustEmbedUnimplementedHarnessSecretServiceServer() {} +func (UnimplementedHarnessSecretServiceServer) testEmbeddedByValue() {} + +// UnsafeHarnessSecretServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to HarnessSecretServiceServer will +// result in compilation errors. +type UnsafeHarnessSecretServiceServer interface { + mustEmbedUnimplementedHarnessSecretServiceServer() +} + +func RegisterHarnessSecretServiceServer(s grpc.ServiceRegistrar, srv HarnessSecretServiceServer) { + // If the following call panics, it indicates UnimplementedHarnessSecretServiceServer 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(&HarnessSecretService_ServiceDesc, srv) +} + +func _HarnessSecretService_GetHarnessSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetHarnessSecretRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HarnessSecretServiceServer).GetHarnessSecret(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HarnessSecretService_GetHarnessSecret_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HarnessSecretServiceServer).GetHarnessSecret(ctx, req.(*GetHarnessSecretRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HarnessSecretService_PutHarnessSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PutHarnessSecretRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HarnessSecretServiceServer).PutHarnessSecret(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HarnessSecretService_PutHarnessSecret_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HarnessSecretServiceServer).PutHarnessSecret(ctx, req.(*PutHarnessSecretRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// HarnessSecretService_ServiceDesc is the grpc.ServiceDesc for HarnessSecretService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var HarnessSecretService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.HarnessSecretService", + HandlerType: (*HarnessSecretServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetHarnessSecret", + Handler: _HarnessSecretService_GetHarnessSecret_Handler, + }, + { + MethodName: "PutHarnessSecret", + Handler: _HarnessSecretService_PutHarnessSecret_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "state/v1/harness_secret.proto", +} diff --git a/internal/contracts/state/v1/identity.pb.go b/internal/contracts/state/v1/identity.pb.go new file mode 100644 index 000000000..9c519be63 --- /dev/null +++ b/internal/contracts/state/v1/identity.pb.go @@ -0,0 +1,1286 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/identity.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type IdentityAudit struct { + state protoimpl.MessageState `protogen:"open.v1"` + ActorId string `protobuf:"bytes,1,opt,name=actor_id,json=actorId,proto3" json:"actor_id,omitempty"` + Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` + RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IdentityAudit) Reset() { + *x = IdentityAudit{} + mi := &file_state_v1_identity_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IdentityAudit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdentityAudit) ProtoMessage() {} + +func (x *IdentityAudit) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IdentityAudit.ProtoReflect.Descriptor instead. +func (*IdentityAudit) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{0} +} + +func (x *IdentityAudit) GetActorId() string { + if x != nil { + return x.ActorId + } + return "" +} + +func (x *IdentityAudit) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +func (x *IdentityAudit) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +type ListIdentitiesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListIdentitiesRequest) Reset() { + *x = ListIdentitiesRequest{} + mi := &file_state_v1_identity_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListIdentitiesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListIdentitiesRequest) ProtoMessage() {} + +func (x *ListIdentitiesRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListIdentitiesRequest.ProtoReflect.Descriptor instead. +func (*ListIdentitiesRequest) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{1} +} + +type ListIdentitiesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identities []*Identity `protobuf:"bytes,1,rep,name=identities,proto3" json:"identities,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListIdentitiesResponse) Reset() { + *x = ListIdentitiesResponse{} + mi := &file_state_v1_identity_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListIdentitiesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListIdentitiesResponse) ProtoMessage() {} + +func (x *ListIdentitiesResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListIdentitiesResponse.ProtoReflect.Descriptor instead. +func (*ListIdentitiesResponse) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{2} +} + +func (x *ListIdentitiesResponse) GetIdentities() []*Identity { + if x != nil { + return x.Identities + } + return nil +} + +type GetIdentityRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetIdentityRequest) Reset() { + *x = GetIdentityRequest{} + mi := &file_state_v1_identity_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetIdentityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIdentityRequest) ProtoMessage() {} + +func (x *GetIdentityRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetIdentityRequest.ProtoReflect.Descriptor instead. +func (*GetIdentityRequest) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{3} +} + +func (x *GetIdentityRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetIdentityResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetIdentityResponse) Reset() { + *x = GetIdentityResponse{} + mi := &file_state_v1_identity_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetIdentityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIdentityResponse) ProtoMessage() {} + +func (x *GetIdentityResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetIdentityResponse.ProtoReflect.Descriptor instead. +func (*GetIdentityResponse) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{4} +} + +func (x *GetIdentityResponse) GetIdentity() *Identity { + if x != nil { + return x.Identity + } + return nil +} + +type CreateIdentityRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Audit *IdentityAudit `protobuf:"bytes,4,opt,name=audit,proto3" json:"audit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateIdentityRequest) Reset() { + *x = CreateIdentityRequest{} + mi := &file_state_v1_identity_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateIdentityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateIdentityRequest) ProtoMessage() {} + +func (x *CreateIdentityRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateIdentityRequest.ProtoReflect.Descriptor instead. +func (*CreateIdentityRequest) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateIdentityRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CreateIdentityRequest) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *CreateIdentityRequest) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *CreateIdentityRequest) GetAudit() *IdentityAudit { + if x != nil { + return x.Audit + } + return nil +} + +type RenameIdentityRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ExpectedVersion int64 `protobuf:"varint,2,opt,name=expected_version,json=expectedVersion,proto3" json:"expected_version,omitempty"` + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Audit *IdentityAudit `protobuf:"bytes,4,opt,name=audit,proto3" json:"audit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RenameIdentityRequest) Reset() { + *x = RenameIdentityRequest{} + mi := &file_state_v1_identity_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RenameIdentityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RenameIdentityRequest) ProtoMessage() {} + +func (x *RenameIdentityRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RenameIdentityRequest.ProtoReflect.Descriptor instead. +func (*RenameIdentityRequest) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{6} +} + +func (x *RenameIdentityRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *RenameIdentityRequest) GetExpectedVersion() int64 { + if x != nil { + return x.ExpectedVersion + } + return 0 +} + +func (x *RenameIdentityRequest) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *RenameIdentityRequest) GetAudit() *IdentityAudit { + if x != nil { + return x.Audit + } + return nil +} + +type SuspendIdentityRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ExpectedVersion int64 `protobuf:"varint,2,opt,name=expected_version,json=expectedVersion,proto3" json:"expected_version,omitempty"` + Audit *IdentityAudit `protobuf:"bytes,3,opt,name=audit,proto3" json:"audit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SuspendIdentityRequest) Reset() { + *x = SuspendIdentityRequest{} + mi := &file_state_v1_identity_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SuspendIdentityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SuspendIdentityRequest) ProtoMessage() {} + +func (x *SuspendIdentityRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SuspendIdentityRequest.ProtoReflect.Descriptor instead. +func (*SuspendIdentityRequest) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{7} +} + +func (x *SuspendIdentityRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *SuspendIdentityRequest) GetExpectedVersion() int64 { + if x != nil { + return x.ExpectedVersion + } + return 0 +} + +func (x *SuspendIdentityRequest) GetAudit() *IdentityAudit { + if x != nil { + return x.Audit + } + return nil +} + +type ReactivateIdentityRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ExpectedVersion int64 `protobuf:"varint,2,opt,name=expected_version,json=expectedVersion,proto3" json:"expected_version,omitempty"` + Audit *IdentityAudit `protobuf:"bytes,3,opt,name=audit,proto3" json:"audit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReactivateIdentityRequest) Reset() { + *x = ReactivateIdentityRequest{} + mi := &file_state_v1_identity_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReactivateIdentityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReactivateIdentityRequest) ProtoMessage() {} + +func (x *ReactivateIdentityRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReactivateIdentityRequest.ProtoReflect.Descriptor instead. +func (*ReactivateIdentityRequest) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{8} +} + +func (x *ReactivateIdentityRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ReactivateIdentityRequest) GetExpectedVersion() int64 { + if x != nil { + return x.ExpectedVersion + } + return 0 +} + +func (x *ReactivateIdentityRequest) GetAudit() *IdentityAudit { + if x != nil { + return x.Audit + } + return nil +} + +type RetireIdentityRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ExpectedVersion int64 `protobuf:"varint,2,opt,name=expected_version,json=expectedVersion,proto3" json:"expected_version,omitempty"` + Audit *IdentityAudit `protobuf:"bytes,3,opt,name=audit,proto3" json:"audit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RetireIdentityRequest) Reset() { + *x = RetireIdentityRequest{} + mi := &file_state_v1_identity_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RetireIdentityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RetireIdentityRequest) ProtoMessage() {} + +func (x *RetireIdentityRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RetireIdentityRequest.ProtoReflect.Descriptor instead. +func (*RetireIdentityRequest) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{9} +} + +func (x *RetireIdentityRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *RetireIdentityRequest) GetExpectedVersion() int64 { + if x != nil { + return x.ExpectedVersion + } + return 0 +} + +func (x *RetireIdentityRequest) GetAudit() *IdentityAudit { + if x != nil { + return x.Audit + } + return nil +} + +type CreateIdentityResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateIdentityResponse) Reset() { + *x = CreateIdentityResponse{} + mi := &file_state_v1_identity_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateIdentityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateIdentityResponse) ProtoMessage() {} + +func (x *CreateIdentityResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateIdentityResponse.ProtoReflect.Descriptor instead. +func (*CreateIdentityResponse) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{10} +} + +func (x *CreateIdentityResponse) GetIdentity() *Identity { + if x != nil { + return x.Identity + } + return nil +} + +type RenameIdentityResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RenameIdentityResponse) Reset() { + *x = RenameIdentityResponse{} + mi := &file_state_v1_identity_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RenameIdentityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RenameIdentityResponse) ProtoMessage() {} + +func (x *RenameIdentityResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RenameIdentityResponse.ProtoReflect.Descriptor instead. +func (*RenameIdentityResponse) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{11} +} + +func (x *RenameIdentityResponse) GetIdentity() *Identity { + if x != nil { + return x.Identity + } + return nil +} + +type SuspendIdentityResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SuspendIdentityResponse) Reset() { + *x = SuspendIdentityResponse{} + mi := &file_state_v1_identity_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SuspendIdentityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SuspendIdentityResponse) ProtoMessage() {} + +func (x *SuspendIdentityResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SuspendIdentityResponse.ProtoReflect.Descriptor instead. +func (*SuspendIdentityResponse) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{12} +} + +func (x *SuspendIdentityResponse) GetIdentity() *Identity { + if x != nil { + return x.Identity + } + return nil +} + +type ReactivateIdentityResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReactivateIdentityResponse) Reset() { + *x = ReactivateIdentityResponse{} + mi := &file_state_v1_identity_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReactivateIdentityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReactivateIdentityResponse) ProtoMessage() {} + +func (x *ReactivateIdentityResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReactivateIdentityResponse.ProtoReflect.Descriptor instead. +func (*ReactivateIdentityResponse) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{13} +} + +func (x *ReactivateIdentityResponse) GetIdentity() *Identity { + if x != nil { + return x.Identity + } + return nil +} + +type RetireIdentityResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RetireIdentityResponse) Reset() { + *x = RetireIdentityResponse{} + mi := &file_state_v1_identity_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RetireIdentityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RetireIdentityResponse) ProtoMessage() {} + +func (x *RetireIdentityResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RetireIdentityResponse.ProtoReflect.Descriptor instead. +func (*RetireIdentityResponse) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{14} +} + +func (x *RetireIdentityResponse) GetIdentity() *Identity { + if x != nil { + return x.Identity + } + return nil +} + +type ResolveIdentitySubjectRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResolveIdentitySubjectRequest) Reset() { + *x = ResolveIdentitySubjectRequest{} + mi := &file_state_v1_identity_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResolveIdentitySubjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResolveIdentitySubjectRequest) ProtoMessage() {} + +func (x *ResolveIdentitySubjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResolveIdentitySubjectRequest.ProtoReflect.Descriptor instead. +func (*ResolveIdentitySubjectRequest) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{15} +} + +func (x *ResolveIdentitySubjectRequest) GetIssuer() string { + if x != nil { + return x.Issuer + } + return "" +} + +func (x *ResolveIdentitySubjectRequest) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +type ResolveIdentitySubjectResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResolveIdentitySubjectResponse) Reset() { + *x = ResolveIdentitySubjectResponse{} + mi := &file_state_v1_identity_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResolveIdentitySubjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResolveIdentitySubjectResponse) ProtoMessage() {} + +func (x *ResolveIdentitySubjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResolveIdentitySubjectResponse.ProtoReflect.Descriptor instead. +func (*ResolveIdentitySubjectResponse) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{16} +} + +func (x *ResolveIdentitySubjectResponse) GetIdentity() *Identity { + if x != nil { + return x.Identity + } + return nil +} + +type BindIdentitySubjectRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Issuer string `protobuf:"bytes,2,opt,name=issuer,proto3" json:"issuer,omitempty"` + Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` + Audit *IdentityAudit `protobuf:"bytes,4,opt,name=audit,proto3" json:"audit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BindIdentitySubjectRequest) Reset() { + *x = BindIdentitySubjectRequest{} + mi := &file_state_v1_identity_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BindIdentitySubjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BindIdentitySubjectRequest) ProtoMessage() {} + +func (x *BindIdentitySubjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BindIdentitySubjectRequest.ProtoReflect.Descriptor instead. +func (*BindIdentitySubjectRequest) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{17} +} + +func (x *BindIdentitySubjectRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *BindIdentitySubjectRequest) GetIssuer() string { + if x != nil { + return x.Issuer + } + return "" +} + +func (x *BindIdentitySubjectRequest) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +func (x *BindIdentitySubjectRequest) GetAudit() *IdentityAudit { + if x != nil { + return x.Audit + } + return nil +} + +type BindIdentitySubjectResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BindIdentitySubjectResponse) Reset() { + *x = BindIdentitySubjectResponse{} + mi := &file_state_v1_identity_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BindIdentitySubjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BindIdentitySubjectResponse) ProtoMessage() {} + +func (x *BindIdentitySubjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BindIdentitySubjectResponse.ProtoReflect.Descriptor instead. +func (*BindIdentitySubjectResponse) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{18} +} + +func (x *BindIdentitySubjectResponse) GetIdentity() *Identity { + if x != nil { + return x.Identity + } + return nil +} + +type ClaimIdentitySubjectRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` + Placeholder string `protobuf:"bytes,2,opt,name=placeholder,proto3" json:"placeholder,omitempty"` + Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClaimIdentitySubjectRequest) Reset() { + *x = ClaimIdentitySubjectRequest{} + mi := &file_state_v1_identity_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClaimIdentitySubjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClaimIdentitySubjectRequest) ProtoMessage() {} + +func (x *ClaimIdentitySubjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClaimIdentitySubjectRequest.ProtoReflect.Descriptor instead. +func (*ClaimIdentitySubjectRequest) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{19} +} + +func (x *ClaimIdentitySubjectRequest) GetIssuer() string { + if x != nil { + return x.Issuer + } + return "" +} + +func (x *ClaimIdentitySubjectRequest) GetPlaceholder() string { + if x != nil { + return x.Placeholder + } + return "" +} + +func (x *ClaimIdentitySubjectRequest) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +type ClaimIdentitySubjectResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClaimIdentitySubjectResponse) Reset() { + *x = ClaimIdentitySubjectResponse{} + mi := &file_state_v1_identity_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClaimIdentitySubjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClaimIdentitySubjectResponse) ProtoMessage() {} + +func (x *ClaimIdentitySubjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_identity_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClaimIdentitySubjectResponse.ProtoReflect.Descriptor instead. +func (*ClaimIdentitySubjectResponse) Descriptor() ([]byte, []int) { + return file_state_v1_identity_proto_rawDescGZIP(), []int{20} +} + +func (x *ClaimIdentitySubjectResponse) GetIdentity() *Identity { + if x != nil { + return x.Identity + } + return nil +} + +var File_state_v1_identity_proto protoreflect.FileDescriptor + +const file_state_v1_identity_proto_rawDesc = "" + + "\n" + + "\x17state/v1/identity.proto\x12\bstate.v1\x1a\x14state/v1/types.proto\"a\n" + + "\rIdentityAudit\x12\x19\n" + + "\bactor_id\x18\x01 \x01(\tR\aactorId\x12\x16\n" + + "\x06source\x18\x02 \x01(\tR\x06source\x12\x1d\n" + + "\n" + + "request_id\x18\x03 \x01(\tR\trequestId\"\x17\n" + + "\x15ListIdentitiesRequest\"L\n" + + "\x16ListIdentitiesResponse\x122\n" + + "\n" + + "identities\x18\x01 \x03(\v2\x12.state.v1.IdentityR\n" + + "identities\"$\n" + + "\x12GetIdentityRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"E\n" + + "\x13GetIdentityResponse\x12.\n" + + "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"\x8d\x01\n" + + "\x15CreateIdentityRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04kind\x18\x02 \x01(\tR\x04kind\x12!\n" + + "\fdisplay_name\x18\x03 \x01(\tR\vdisplayName\x12-\n" + + "\x05audit\x18\x04 \x01(\v2\x17.state.v1.IdentityAuditR\x05audit\"\xa4\x01\n" + + "\x15RenameIdentityRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12)\n" + + "\x10expected_version\x18\x02 \x01(\x03R\x0fexpectedVersion\x12!\n" + + "\fdisplay_name\x18\x03 \x01(\tR\vdisplayName\x12-\n" + + "\x05audit\x18\x04 \x01(\v2\x17.state.v1.IdentityAuditR\x05audit\"\x82\x01\n" + + "\x16SuspendIdentityRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12)\n" + + "\x10expected_version\x18\x02 \x01(\x03R\x0fexpectedVersion\x12-\n" + + "\x05audit\x18\x03 \x01(\v2\x17.state.v1.IdentityAuditR\x05audit\"\x85\x01\n" + + "\x19ReactivateIdentityRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12)\n" + + "\x10expected_version\x18\x02 \x01(\x03R\x0fexpectedVersion\x12-\n" + + "\x05audit\x18\x03 \x01(\v2\x17.state.v1.IdentityAuditR\x05audit\"\x81\x01\n" + + "\x15RetireIdentityRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12)\n" + + "\x10expected_version\x18\x02 \x01(\x03R\x0fexpectedVersion\x12-\n" + + "\x05audit\x18\x03 \x01(\v2\x17.state.v1.IdentityAuditR\x05audit\"H\n" + + "\x16CreateIdentityResponse\x12.\n" + + "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"H\n" + + "\x16RenameIdentityResponse\x12.\n" + + "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"I\n" + + "\x17SuspendIdentityResponse\x12.\n" + + "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"L\n" + + "\x1aReactivateIdentityResponse\x12.\n" + + "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"H\n" + + "\x16RetireIdentityResponse\x12.\n" + + "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"Q\n" + + "\x1dResolveIdentitySubjectRequest\x12\x16\n" + + "\x06issuer\x18\x01 \x01(\tR\x06issuer\x12\x18\n" + + "\asubject\x18\x02 \x01(\tR\asubject\"P\n" + + "\x1eResolveIdentitySubjectResponse\x12.\n" + + "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"\x8d\x01\n" + + "\x1aBindIdentitySubjectRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + + "\x06issuer\x18\x02 \x01(\tR\x06issuer\x12\x18\n" + + "\asubject\x18\x03 \x01(\tR\asubject\x12-\n" + + "\x05audit\x18\x04 \x01(\v2\x17.state.v1.IdentityAuditR\x05audit\"M\n" + + "\x1bBindIdentitySubjectResponse\x12.\n" + + "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"q\n" + + "\x1bClaimIdentitySubjectRequest\x12\x16\n" + + "\x06issuer\x18\x01 \x01(\tR\x06issuer\x12 \n" + + "\vplaceholder\x18\x02 \x01(\tR\vplaceholder\x12\x18\n" + + "\asubject\x18\x03 \x01(\tR\asubject\"N\n" + + "\x1cClaimIdentitySubjectResponse\x12.\n" + + "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity2\xa2\a\n" + + "\x0fIdentityService\x12S\n" + + "\x0eListIdentities\x12\x1f.state.v1.ListIdentitiesRequest\x1a .state.v1.ListIdentitiesResponse\x12J\n" + + "\vGetIdentity\x12\x1c.state.v1.GetIdentityRequest\x1a\x1d.state.v1.GetIdentityResponse\x12S\n" + + "\x0eCreateIdentity\x12\x1f.state.v1.CreateIdentityRequest\x1a .state.v1.CreateIdentityResponse\x12S\n" + + "\x0eRenameIdentity\x12\x1f.state.v1.RenameIdentityRequest\x1a .state.v1.RenameIdentityResponse\x12V\n" + + "\x0fSuspendIdentity\x12 .state.v1.SuspendIdentityRequest\x1a!.state.v1.SuspendIdentityResponse\x12_\n" + + "\x12ReactivateIdentity\x12#.state.v1.ReactivateIdentityRequest\x1a$.state.v1.ReactivateIdentityResponse\x12S\n" + + "\x0eRetireIdentity\x12\x1f.state.v1.RetireIdentityRequest\x1a .state.v1.RetireIdentityResponse\x12k\n" + + "\x16ResolveIdentitySubject\x12'.state.v1.ResolveIdentitySubjectRequest\x1a(.state.v1.ResolveIdentitySubjectResponse\x12b\n" + + "\x13BindIdentitySubject\x12$.state.v1.BindIdentitySubjectRequest\x1a%.state.v1.BindIdentitySubjectResponse\x12e\n" + + "\x14ClaimIdentitySubject\x12%.state.v1.ClaimIdentitySubjectRequest\x1a&.state.v1.ClaimIdentitySubjectResponseB\xa7\x01\n" + + "\fcom.state.v1B\rIdentityProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_identity_proto_rawDescOnce sync.Once + file_state_v1_identity_proto_rawDescData []byte +) + +func file_state_v1_identity_proto_rawDescGZIP() []byte { + file_state_v1_identity_proto_rawDescOnce.Do(func() { + file_state_v1_identity_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_identity_proto_rawDesc), len(file_state_v1_identity_proto_rawDesc))) + }) + return file_state_v1_identity_proto_rawDescData +} + +var file_state_v1_identity_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_state_v1_identity_proto_goTypes = []any{ + (*IdentityAudit)(nil), // 0: state.v1.IdentityAudit + (*ListIdentitiesRequest)(nil), // 1: state.v1.ListIdentitiesRequest + (*ListIdentitiesResponse)(nil), // 2: state.v1.ListIdentitiesResponse + (*GetIdentityRequest)(nil), // 3: state.v1.GetIdentityRequest + (*GetIdentityResponse)(nil), // 4: state.v1.GetIdentityResponse + (*CreateIdentityRequest)(nil), // 5: state.v1.CreateIdentityRequest + (*RenameIdentityRequest)(nil), // 6: state.v1.RenameIdentityRequest + (*SuspendIdentityRequest)(nil), // 7: state.v1.SuspendIdentityRequest + (*ReactivateIdentityRequest)(nil), // 8: state.v1.ReactivateIdentityRequest + (*RetireIdentityRequest)(nil), // 9: state.v1.RetireIdentityRequest + (*CreateIdentityResponse)(nil), // 10: state.v1.CreateIdentityResponse + (*RenameIdentityResponse)(nil), // 11: state.v1.RenameIdentityResponse + (*SuspendIdentityResponse)(nil), // 12: state.v1.SuspendIdentityResponse + (*ReactivateIdentityResponse)(nil), // 13: state.v1.ReactivateIdentityResponse + (*RetireIdentityResponse)(nil), // 14: state.v1.RetireIdentityResponse + (*ResolveIdentitySubjectRequest)(nil), // 15: state.v1.ResolveIdentitySubjectRequest + (*ResolveIdentitySubjectResponse)(nil), // 16: state.v1.ResolveIdentitySubjectResponse + (*BindIdentitySubjectRequest)(nil), // 17: state.v1.BindIdentitySubjectRequest + (*BindIdentitySubjectResponse)(nil), // 18: state.v1.BindIdentitySubjectResponse + (*ClaimIdentitySubjectRequest)(nil), // 19: state.v1.ClaimIdentitySubjectRequest + (*ClaimIdentitySubjectResponse)(nil), // 20: state.v1.ClaimIdentitySubjectResponse + (*Identity)(nil), // 21: state.v1.Identity +} +var file_state_v1_identity_proto_depIdxs = []int32{ + 21, // 0: state.v1.ListIdentitiesResponse.identities:type_name -> state.v1.Identity + 21, // 1: state.v1.GetIdentityResponse.identity:type_name -> state.v1.Identity + 0, // 2: state.v1.CreateIdentityRequest.audit:type_name -> state.v1.IdentityAudit + 0, // 3: state.v1.RenameIdentityRequest.audit:type_name -> state.v1.IdentityAudit + 0, // 4: state.v1.SuspendIdentityRequest.audit:type_name -> state.v1.IdentityAudit + 0, // 5: state.v1.ReactivateIdentityRequest.audit:type_name -> state.v1.IdentityAudit + 0, // 6: state.v1.RetireIdentityRequest.audit:type_name -> state.v1.IdentityAudit + 21, // 7: state.v1.CreateIdentityResponse.identity:type_name -> state.v1.Identity + 21, // 8: state.v1.RenameIdentityResponse.identity:type_name -> state.v1.Identity + 21, // 9: state.v1.SuspendIdentityResponse.identity:type_name -> state.v1.Identity + 21, // 10: state.v1.ReactivateIdentityResponse.identity:type_name -> state.v1.Identity + 21, // 11: state.v1.RetireIdentityResponse.identity:type_name -> state.v1.Identity + 21, // 12: state.v1.ResolveIdentitySubjectResponse.identity:type_name -> state.v1.Identity + 0, // 13: state.v1.BindIdentitySubjectRequest.audit:type_name -> state.v1.IdentityAudit + 21, // 14: state.v1.BindIdentitySubjectResponse.identity:type_name -> state.v1.Identity + 21, // 15: state.v1.ClaimIdentitySubjectResponse.identity:type_name -> state.v1.Identity + 1, // 16: state.v1.IdentityService.ListIdentities:input_type -> state.v1.ListIdentitiesRequest + 3, // 17: state.v1.IdentityService.GetIdentity:input_type -> state.v1.GetIdentityRequest + 5, // 18: state.v1.IdentityService.CreateIdentity:input_type -> state.v1.CreateIdentityRequest + 6, // 19: state.v1.IdentityService.RenameIdentity:input_type -> state.v1.RenameIdentityRequest + 7, // 20: state.v1.IdentityService.SuspendIdentity:input_type -> state.v1.SuspendIdentityRequest + 8, // 21: state.v1.IdentityService.ReactivateIdentity:input_type -> state.v1.ReactivateIdentityRequest + 9, // 22: state.v1.IdentityService.RetireIdentity:input_type -> state.v1.RetireIdentityRequest + 15, // 23: state.v1.IdentityService.ResolveIdentitySubject:input_type -> state.v1.ResolveIdentitySubjectRequest + 17, // 24: state.v1.IdentityService.BindIdentitySubject:input_type -> state.v1.BindIdentitySubjectRequest + 19, // 25: state.v1.IdentityService.ClaimIdentitySubject:input_type -> state.v1.ClaimIdentitySubjectRequest + 2, // 26: state.v1.IdentityService.ListIdentities:output_type -> state.v1.ListIdentitiesResponse + 4, // 27: state.v1.IdentityService.GetIdentity:output_type -> state.v1.GetIdentityResponse + 10, // 28: state.v1.IdentityService.CreateIdentity:output_type -> state.v1.CreateIdentityResponse + 11, // 29: state.v1.IdentityService.RenameIdentity:output_type -> state.v1.RenameIdentityResponse + 12, // 30: state.v1.IdentityService.SuspendIdentity:output_type -> state.v1.SuspendIdentityResponse + 13, // 31: state.v1.IdentityService.ReactivateIdentity:output_type -> state.v1.ReactivateIdentityResponse + 14, // 32: state.v1.IdentityService.RetireIdentity:output_type -> state.v1.RetireIdentityResponse + 16, // 33: state.v1.IdentityService.ResolveIdentitySubject:output_type -> state.v1.ResolveIdentitySubjectResponse + 18, // 34: state.v1.IdentityService.BindIdentitySubject:output_type -> state.v1.BindIdentitySubjectResponse + 20, // 35: state.v1.IdentityService.ClaimIdentitySubject:output_type -> state.v1.ClaimIdentitySubjectResponse + 26, // [26:36] is the sub-list for method output_type + 16, // [16:26] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_state_v1_identity_proto_init() } +func file_state_v1_identity_proto_init() { + if File_state_v1_identity_proto != nil { + return + } + file_state_v1_types_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_identity_proto_rawDesc), len(file_state_v1_identity_proto_rawDesc)), + NumEnums: 0, + NumMessages: 21, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_identity_proto_goTypes, + DependencyIndexes: file_state_v1_identity_proto_depIdxs, + MessageInfos: file_state_v1_identity_proto_msgTypes, + }.Build() + File_state_v1_identity_proto = out.File + file_state_v1_identity_proto_goTypes = nil + file_state_v1_identity_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/identity_grpc.pb.go b/internal/contracts/state/v1/identity_grpc.pb.go new file mode 100644 index 000000000..8c491f69e --- /dev/null +++ b/internal/contracts/state/v1/identity_grpc.pb.go @@ -0,0 +1,473 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/identity.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 ( + IdentityService_ListIdentities_FullMethodName = "/state.v1.IdentityService/ListIdentities" + IdentityService_GetIdentity_FullMethodName = "/state.v1.IdentityService/GetIdentity" + IdentityService_CreateIdentity_FullMethodName = "/state.v1.IdentityService/CreateIdentity" + IdentityService_RenameIdentity_FullMethodName = "/state.v1.IdentityService/RenameIdentity" + IdentityService_SuspendIdentity_FullMethodName = "/state.v1.IdentityService/SuspendIdentity" + IdentityService_ReactivateIdentity_FullMethodName = "/state.v1.IdentityService/ReactivateIdentity" + IdentityService_RetireIdentity_FullMethodName = "/state.v1.IdentityService/RetireIdentity" + IdentityService_ResolveIdentitySubject_FullMethodName = "/state.v1.IdentityService/ResolveIdentitySubject" + IdentityService_BindIdentitySubject_FullMethodName = "/state.v1.IdentityService/BindIdentitySubject" + IdentityService_ClaimIdentitySubject_FullMethodName = "/state.v1.IdentityService/ClaimIdentitySubject" +) + +// IdentityServiceClient is the client API for IdentityService 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. +// +// Task-scoped grants cannot call these administrative RPCs. +type IdentityServiceClient interface { + ListIdentities(ctx context.Context, in *ListIdentitiesRequest, opts ...grpc.CallOption) (*ListIdentitiesResponse, error) + GetIdentity(ctx context.Context, in *GetIdentityRequest, opts ...grpc.CallOption) (*GetIdentityResponse, error) + CreateIdentity(ctx context.Context, in *CreateIdentityRequest, opts ...grpc.CallOption) (*CreateIdentityResponse, error) + RenameIdentity(ctx context.Context, in *RenameIdentityRequest, opts ...grpc.CallOption) (*RenameIdentityResponse, error) + SuspendIdentity(ctx context.Context, in *SuspendIdentityRequest, opts ...grpc.CallOption) (*SuspendIdentityResponse, error) + ReactivateIdentity(ctx context.Context, in *ReactivateIdentityRequest, opts ...grpc.CallOption) (*ReactivateIdentityResponse, error) + RetireIdentity(ctx context.Context, in *RetireIdentityRequest, opts ...grpc.CallOption) (*RetireIdentityResponse, error) + // Subject bindings. A verified provider subject is resolved to the identity it + // is bound to; the authenticating process calls these rather than owning the + // identity store. + ResolveIdentitySubject(ctx context.Context, in *ResolveIdentitySubjectRequest, opts ...grpc.CallOption) (*ResolveIdentitySubjectResponse, error) + BindIdentitySubject(ctx context.Context, in *BindIdentitySubjectRequest, opts ...grpc.CallOption) (*BindIdentitySubjectResponse, error) + ClaimIdentitySubject(ctx context.Context, in *ClaimIdentitySubjectRequest, opts ...grpc.CallOption) (*ClaimIdentitySubjectResponse, error) +} + +type identityServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewIdentityServiceClient(cc grpc.ClientConnInterface) IdentityServiceClient { + return &identityServiceClient{cc} +} + +func (c *identityServiceClient) ListIdentities(ctx context.Context, in *ListIdentitiesRequest, opts ...grpc.CallOption) (*ListIdentitiesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListIdentitiesResponse) + err := c.cc.Invoke(ctx, IdentityService_ListIdentities_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *identityServiceClient) GetIdentity(ctx context.Context, in *GetIdentityRequest, opts ...grpc.CallOption) (*GetIdentityResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetIdentityResponse) + err := c.cc.Invoke(ctx, IdentityService_GetIdentity_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *identityServiceClient) CreateIdentity(ctx context.Context, in *CreateIdentityRequest, opts ...grpc.CallOption) (*CreateIdentityResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateIdentityResponse) + err := c.cc.Invoke(ctx, IdentityService_CreateIdentity_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *identityServiceClient) RenameIdentity(ctx context.Context, in *RenameIdentityRequest, opts ...grpc.CallOption) (*RenameIdentityResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RenameIdentityResponse) + err := c.cc.Invoke(ctx, IdentityService_RenameIdentity_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *identityServiceClient) SuspendIdentity(ctx context.Context, in *SuspendIdentityRequest, opts ...grpc.CallOption) (*SuspendIdentityResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SuspendIdentityResponse) + err := c.cc.Invoke(ctx, IdentityService_SuspendIdentity_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *identityServiceClient) ReactivateIdentity(ctx context.Context, in *ReactivateIdentityRequest, opts ...grpc.CallOption) (*ReactivateIdentityResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ReactivateIdentityResponse) + err := c.cc.Invoke(ctx, IdentityService_ReactivateIdentity_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *identityServiceClient) RetireIdentity(ctx context.Context, in *RetireIdentityRequest, opts ...grpc.CallOption) (*RetireIdentityResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RetireIdentityResponse) + err := c.cc.Invoke(ctx, IdentityService_RetireIdentity_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *identityServiceClient) ResolveIdentitySubject(ctx context.Context, in *ResolveIdentitySubjectRequest, opts ...grpc.CallOption) (*ResolveIdentitySubjectResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ResolveIdentitySubjectResponse) + err := c.cc.Invoke(ctx, IdentityService_ResolveIdentitySubject_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *identityServiceClient) BindIdentitySubject(ctx context.Context, in *BindIdentitySubjectRequest, opts ...grpc.CallOption) (*BindIdentitySubjectResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(BindIdentitySubjectResponse) + err := c.cc.Invoke(ctx, IdentityService_BindIdentitySubject_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *identityServiceClient) ClaimIdentitySubject(ctx context.Context, in *ClaimIdentitySubjectRequest, opts ...grpc.CallOption) (*ClaimIdentitySubjectResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ClaimIdentitySubjectResponse) + err := c.cc.Invoke(ctx, IdentityService_ClaimIdentitySubject_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// IdentityServiceServer is the server API for IdentityService service. +// All implementations must embed UnimplementedIdentityServiceServer +// for forward compatibility. +// +// Task-scoped grants cannot call these administrative RPCs. +type IdentityServiceServer interface { + ListIdentities(context.Context, *ListIdentitiesRequest) (*ListIdentitiesResponse, error) + GetIdentity(context.Context, *GetIdentityRequest) (*GetIdentityResponse, error) + CreateIdentity(context.Context, *CreateIdentityRequest) (*CreateIdentityResponse, error) + RenameIdentity(context.Context, *RenameIdentityRequest) (*RenameIdentityResponse, error) + SuspendIdentity(context.Context, *SuspendIdentityRequest) (*SuspendIdentityResponse, error) + ReactivateIdentity(context.Context, *ReactivateIdentityRequest) (*ReactivateIdentityResponse, error) + RetireIdentity(context.Context, *RetireIdentityRequest) (*RetireIdentityResponse, error) + // Subject bindings. A verified provider subject is resolved to the identity it + // is bound to; the authenticating process calls these rather than owning the + // identity store. + ResolveIdentitySubject(context.Context, *ResolveIdentitySubjectRequest) (*ResolveIdentitySubjectResponse, error) + BindIdentitySubject(context.Context, *BindIdentitySubjectRequest) (*BindIdentitySubjectResponse, error) + ClaimIdentitySubject(context.Context, *ClaimIdentitySubjectRequest) (*ClaimIdentitySubjectResponse, error) + mustEmbedUnimplementedIdentityServiceServer() +} + +// UnimplementedIdentityServiceServer 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 UnimplementedIdentityServiceServer struct{} + +func (UnimplementedIdentityServiceServer) ListIdentities(context.Context, *ListIdentitiesRequest) (*ListIdentitiesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListIdentities not implemented") +} +func (UnimplementedIdentityServiceServer) GetIdentity(context.Context, *GetIdentityRequest) (*GetIdentityResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetIdentity not implemented") +} +func (UnimplementedIdentityServiceServer) CreateIdentity(context.Context, *CreateIdentityRequest) (*CreateIdentityResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CreateIdentity not implemented") +} +func (UnimplementedIdentityServiceServer) RenameIdentity(context.Context, *RenameIdentityRequest) (*RenameIdentityResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RenameIdentity not implemented") +} +func (UnimplementedIdentityServiceServer) SuspendIdentity(context.Context, *SuspendIdentityRequest) (*SuspendIdentityResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SuspendIdentity not implemented") +} +func (UnimplementedIdentityServiceServer) ReactivateIdentity(context.Context, *ReactivateIdentityRequest) (*ReactivateIdentityResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ReactivateIdentity not implemented") +} +func (UnimplementedIdentityServiceServer) RetireIdentity(context.Context, *RetireIdentityRequest) (*RetireIdentityResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RetireIdentity not implemented") +} +func (UnimplementedIdentityServiceServer) ResolveIdentitySubject(context.Context, *ResolveIdentitySubjectRequest) (*ResolveIdentitySubjectResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ResolveIdentitySubject not implemented") +} +func (UnimplementedIdentityServiceServer) BindIdentitySubject(context.Context, *BindIdentitySubjectRequest) (*BindIdentitySubjectResponse, error) { + return nil, status.Error(codes.Unimplemented, "method BindIdentitySubject not implemented") +} +func (UnimplementedIdentityServiceServer) ClaimIdentitySubject(context.Context, *ClaimIdentitySubjectRequest) (*ClaimIdentitySubjectResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ClaimIdentitySubject not implemented") +} +func (UnimplementedIdentityServiceServer) mustEmbedUnimplementedIdentityServiceServer() {} +func (UnimplementedIdentityServiceServer) testEmbeddedByValue() {} + +// UnsafeIdentityServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to IdentityServiceServer will +// result in compilation errors. +type UnsafeIdentityServiceServer interface { + mustEmbedUnimplementedIdentityServiceServer() +} + +func RegisterIdentityServiceServer(s grpc.ServiceRegistrar, srv IdentityServiceServer) { + // If the following call panics, it indicates UnimplementedIdentityServiceServer 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(&IdentityService_ServiceDesc, srv) +} + +func _IdentityService_ListIdentities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListIdentitiesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityServiceServer).ListIdentities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: IdentityService_ListIdentities_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityServiceServer).ListIdentities(ctx, req.(*ListIdentitiesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IdentityService_GetIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetIdentityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityServiceServer).GetIdentity(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: IdentityService_GetIdentity_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityServiceServer).GetIdentity(ctx, req.(*GetIdentityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IdentityService_CreateIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateIdentityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityServiceServer).CreateIdentity(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: IdentityService_CreateIdentity_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityServiceServer).CreateIdentity(ctx, req.(*CreateIdentityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IdentityService_RenameIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RenameIdentityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityServiceServer).RenameIdentity(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: IdentityService_RenameIdentity_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityServiceServer).RenameIdentity(ctx, req.(*RenameIdentityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IdentityService_SuspendIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SuspendIdentityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityServiceServer).SuspendIdentity(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: IdentityService_SuspendIdentity_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityServiceServer).SuspendIdentity(ctx, req.(*SuspendIdentityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IdentityService_ReactivateIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReactivateIdentityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityServiceServer).ReactivateIdentity(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: IdentityService_ReactivateIdentity_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityServiceServer).ReactivateIdentity(ctx, req.(*ReactivateIdentityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IdentityService_RetireIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RetireIdentityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityServiceServer).RetireIdentity(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: IdentityService_RetireIdentity_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityServiceServer).RetireIdentity(ctx, req.(*RetireIdentityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IdentityService_ResolveIdentitySubject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResolveIdentitySubjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityServiceServer).ResolveIdentitySubject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: IdentityService_ResolveIdentitySubject_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityServiceServer).ResolveIdentitySubject(ctx, req.(*ResolveIdentitySubjectRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IdentityService_BindIdentitySubject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BindIdentitySubjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityServiceServer).BindIdentitySubject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: IdentityService_BindIdentitySubject_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityServiceServer).BindIdentitySubject(ctx, req.(*BindIdentitySubjectRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IdentityService_ClaimIdentitySubject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClaimIdentitySubjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityServiceServer).ClaimIdentitySubject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: IdentityService_ClaimIdentitySubject_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityServiceServer).ClaimIdentitySubject(ctx, req.(*ClaimIdentitySubjectRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// IdentityService_ServiceDesc is the grpc.ServiceDesc for IdentityService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var IdentityService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.IdentityService", + HandlerType: (*IdentityServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListIdentities", + Handler: _IdentityService_ListIdentities_Handler, + }, + { + MethodName: "GetIdentity", + Handler: _IdentityService_GetIdentity_Handler, + }, + { + MethodName: "CreateIdentity", + Handler: _IdentityService_CreateIdentity_Handler, + }, + { + MethodName: "RenameIdentity", + Handler: _IdentityService_RenameIdentity_Handler, + }, + { + MethodName: "SuspendIdentity", + Handler: _IdentityService_SuspendIdentity_Handler, + }, + { + MethodName: "ReactivateIdentity", + Handler: _IdentityService_ReactivateIdentity_Handler, + }, + { + MethodName: "RetireIdentity", + Handler: _IdentityService_RetireIdentity_Handler, + }, + { + MethodName: "ResolveIdentitySubject", + Handler: _IdentityService_ResolveIdentitySubject_Handler, + }, + { + MethodName: "BindIdentitySubject", + Handler: _IdentityService_BindIdentitySubject_Handler, + }, + { + MethodName: "ClaimIdentitySubject", + Handler: _IdentityService_ClaimIdentitySubject_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "state/v1/identity.proto", +} diff --git a/internal/contracts/state/v1/mapping.pb.go b/internal/contracts/state/v1/mapping.pb.go new file mode 100644 index 000000000..edf78c48f --- /dev/null +++ b/internal/contracts/state/v1/mapping.pb.go @@ -0,0 +1,865 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/mapping.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MappingField mirrors internal/domain/mapping.Field. +type MappingField struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MappingField) Reset() { + *x = MappingField{} + mi := &file_state_v1_mapping_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MappingField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MappingField) ProtoMessage() {} + +func (x *MappingField) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_mapping_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MappingField.ProtoReflect.Descriptor instead. +func (*MappingField) Descriptor() ([]byte, []int) { + return file_state_v1_mapping_proto_rawDescGZIP(), []int{0} +} + +func (x *MappingField) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MappingField) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *MappingField) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *MappingField) GetRequired() bool { + if x != nil { + return x.Required + } + return false +} + +// Mapping mirrors internal/domain/mapping.Mapping. +type Mapping struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + SourceHint string `protobuf:"bytes,3,opt,name=source_hint,json=sourceHint,proto3" json:"source_hint,omitempty"` + Fields []*MappingField `protobuf:"bytes,4,rep,name=fields,proto3" json:"fields,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + EventTypeId string `protobuf:"bytes,7,opt,name=event_type_id,json=eventTypeId,proto3" json:"event_type_id,omitempty"` + // match_count and last_matched_at are read-only: the store counts them. + MatchCount int64 `protobuf:"varint,8,opt,name=match_count,json=matchCount,proto3" json:"match_count,omitempty"` + LastMatchedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=last_matched_at,json=lastMatchedAt,proto3" json:"last_matched_at,omitempty"` + // workspace_id is its event type's workspace; read-only here. + WorkspaceId string `protobuf:"bytes,10,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Mapping) Reset() { + *x = Mapping{} + mi := &file_state_v1_mapping_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Mapping) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Mapping) ProtoMessage() {} + +func (x *Mapping) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_mapping_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Mapping.ProtoReflect.Descriptor instead. +func (*Mapping) Descriptor() ([]byte, []int) { + return file_state_v1_mapping_proto_rawDescGZIP(), []int{1} +} + +func (x *Mapping) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Mapping) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Mapping) GetSourceHint() string { + if x != nil { + return x.SourceHint + } + return "" +} + +func (x *Mapping) GetFields() []*MappingField { + if x != nil { + return x.Fields + } + return nil +} + +func (x *Mapping) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Mapping) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *Mapping) GetEventTypeId() string { + if x != nil { + return x.EventTypeId + } + return "" +} + +func (x *Mapping) GetMatchCount() int64 { + if x != nil { + return x.MatchCount + } + return 0 +} + +func (x *Mapping) GetLastMatchedAt() *timestamppb.Timestamp { + if x != nil { + return x.LastMatchedAt + } + return nil +} + +func (x *Mapping) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +type InsertMappingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Mapping *Mapping `protobuf:"bytes,1,opt,name=mapping,proto3" json:"mapping,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InsertMappingRequest) Reset() { + *x = InsertMappingRequest{} + mi := &file_state_v1_mapping_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InsertMappingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InsertMappingRequest) ProtoMessage() {} + +func (x *InsertMappingRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_mapping_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InsertMappingRequest.ProtoReflect.Descriptor instead. +func (*InsertMappingRequest) Descriptor() ([]byte, []int) { + return file_state_v1_mapping_proto_rawDescGZIP(), []int{2} +} + +func (x *InsertMappingRequest) GetMapping() *Mapping { + if x != nil { + return x.Mapping + } + return nil +} + +type InsertMappingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InsertMappingResponse) Reset() { + *x = InsertMappingResponse{} + mi := &file_state_v1_mapping_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InsertMappingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InsertMappingResponse) ProtoMessage() {} + +func (x *InsertMappingResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_mapping_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InsertMappingResponse.ProtoReflect.Descriptor instead. +func (*InsertMappingResponse) Descriptor() ([]byte, []int) { + return file_state_v1_mapping_proto_rawDescGZIP(), []int{3} +} + +func (x *InsertMappingResponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetMappingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMappingRequest) Reset() { + *x = GetMappingRequest{} + mi := &file_state_v1_mapping_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMappingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMappingRequest) ProtoMessage() {} + +func (x *GetMappingRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_mapping_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMappingRequest.ProtoReflect.Descriptor instead. +func (*GetMappingRequest) Descriptor() ([]byte, []int) { + return file_state_v1_mapping_proto_rawDescGZIP(), []int{4} +} + +func (x *GetMappingRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetMappingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Mapping *Mapping `protobuf:"bytes,1,opt,name=mapping,proto3" json:"mapping,omitempty"` + Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMappingResponse) Reset() { + *x = GetMappingResponse{} + mi := &file_state_v1_mapping_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMappingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMappingResponse) ProtoMessage() {} + +func (x *GetMappingResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_mapping_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMappingResponse.ProtoReflect.Descriptor instead. +func (*GetMappingResponse) Descriptor() ([]byte, []int) { + return file_state_v1_mapping_proto_rawDescGZIP(), []int{5} +} + +func (x *GetMappingResponse) GetMapping() *Mapping { + if x != nil { + return x.Mapping + } + return nil +} + +func (x *GetMappingResponse) GetFound() bool { + if x != nil { + return x.Found + } + return false +} + +type ListMappingsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMappingsRequest) Reset() { + *x = ListMappingsRequest{} + mi := &file_state_v1_mapping_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMappingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMappingsRequest) ProtoMessage() {} + +func (x *ListMappingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_mapping_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMappingsRequest.ProtoReflect.Descriptor instead. +func (*ListMappingsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_mapping_proto_rawDescGZIP(), []int{6} +} + +type ListMappingsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Mappings []*Mapping `protobuf:"bytes,1,rep,name=mappings,proto3" json:"mappings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMappingsResponse) Reset() { + *x = ListMappingsResponse{} + mi := &file_state_v1_mapping_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMappingsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMappingsResponse) ProtoMessage() {} + +func (x *ListMappingsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_mapping_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMappingsResponse.ProtoReflect.Descriptor instead. +func (*ListMappingsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_mapping_proto_rawDescGZIP(), []int{7} +} + +func (x *ListMappingsResponse) GetMappings() []*Mapping { + if x != nil { + return x.Mappings + } + return nil +} + +type UpdateMappingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Mapping *Mapping `protobuf:"bytes,1,opt,name=mapping,proto3" json:"mapping,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateMappingRequest) Reset() { + *x = UpdateMappingRequest{} + mi := &file_state_v1_mapping_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateMappingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateMappingRequest) ProtoMessage() {} + +func (x *UpdateMappingRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_mapping_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateMappingRequest.ProtoReflect.Descriptor instead. +func (*UpdateMappingRequest) Descriptor() ([]byte, []int) { + return file_state_v1_mapping_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateMappingRequest) GetMapping() *Mapping { + if x != nil { + return x.Mapping + } + return nil +} + +type UpdateMappingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateMappingResponse) Reset() { + *x = UpdateMappingResponse{} + mi := &file_state_v1_mapping_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateMappingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateMappingResponse) ProtoMessage() {} + +func (x *UpdateMappingResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_mapping_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateMappingResponse.ProtoReflect.Descriptor instead. +func (*UpdateMappingResponse) Descriptor() ([]byte, []int) { + return file_state_v1_mapping_proto_rawDescGZIP(), []int{9} +} + +type DeleteMappingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteMappingRequest) Reset() { + *x = DeleteMappingRequest{} + mi := &file_state_v1_mapping_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteMappingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMappingRequest) ProtoMessage() {} + +func (x *DeleteMappingRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_mapping_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteMappingRequest.ProtoReflect.Descriptor instead. +func (*DeleteMappingRequest) Descriptor() ([]byte, []int) { + return file_state_v1_mapping_proto_rawDescGZIP(), []int{10} +} + +func (x *DeleteMappingRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteMappingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteMappingResponse) Reset() { + *x = DeleteMappingResponse{} + mi := &file_state_v1_mapping_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteMappingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMappingResponse) ProtoMessage() {} + +func (x *DeleteMappingResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_mapping_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteMappingResponse.ProtoReflect.Descriptor instead. +func (*DeleteMappingResponse) Descriptor() ([]byte, []int) { + return file_state_v1_mapping_proto_rawDescGZIP(), []int{11} +} + +type RecordMappingMatchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + MappingId string `protobuf:"bytes,1,opt,name=mapping_id,json=mappingId,proto3" json:"mapping_id,omitempty"` + CaptureId string `protobuf:"bytes,2,opt,name=capture_id,json=captureId,proto3" json:"capture_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordMappingMatchRequest) Reset() { + *x = RecordMappingMatchRequest{} + mi := &file_state_v1_mapping_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordMappingMatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordMappingMatchRequest) ProtoMessage() {} + +func (x *RecordMappingMatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_mapping_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordMappingMatchRequest.ProtoReflect.Descriptor instead. +func (*RecordMappingMatchRequest) Descriptor() ([]byte, []int) { + return file_state_v1_mapping_proto_rawDescGZIP(), []int{12} +} + +func (x *RecordMappingMatchRequest) GetMappingId() string { + if x != nil { + return x.MappingId + } + return "" +} + +func (x *RecordMappingMatchRequest) GetCaptureId() string { + if x != nil { + return x.CaptureId + } + return "" +} + +type RecordMappingMatchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordMappingMatchResponse) Reset() { + *x = RecordMappingMatchResponse{} + mi := &file_state_v1_mapping_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordMappingMatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordMappingMatchResponse) ProtoMessage() {} + +func (x *RecordMappingMatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_mapping_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordMappingMatchResponse.ProtoReflect.Descriptor instead. +func (*RecordMappingMatchResponse) Descriptor() ([]byte, []int) { + return file_state_v1_mapping_proto_rawDescGZIP(), []int{13} +} + +var File_state_v1_mapping_proto protoreflect.FileDescriptor + +const file_state_v1_mapping_proto_rawDesc = "" + + "\n" + + "\x16state/v1/mapping.proto\x12\bstate.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"f\n" + + "\fMappingField\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" + + "\x04path\x18\x02 \x01(\tR\x04path\x12\x12\n" + + "\x04type\x18\x03 \x01(\tR\x04type\x12\x1a\n" + + "\brequired\x18\x04 \x01(\bR\brequired\"\xa0\x03\n" + + "\aMapping\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x1f\n" + + "\vsource_hint\x18\x03 \x01(\tR\n" + + "sourceHint\x12.\n" + + "\x06fields\x18\x04 \x03(\v2\x16.state.v1.MappingFieldR\x06fields\x129\n" + + "\n" + + "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12\"\n" + + "\revent_type_id\x18\a \x01(\tR\veventTypeId\x12\x1f\n" + + "\vmatch_count\x18\b \x01(\x03R\n" + + "matchCount\x12B\n" + + "\x0flast_matched_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\rlastMatchedAt\x12!\n" + + "\fworkspace_id\x18\n" + + " \x01(\tR\vworkspaceId\"C\n" + + "\x14InsertMappingRequest\x12+\n" + + "\amapping\x18\x01 \x01(\v2\x11.state.v1.MappingR\amapping\"'\n" + + "\x15InsertMappingResponse\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"#\n" + + "\x11GetMappingRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"W\n" + + "\x12GetMappingResponse\x12+\n" + + "\amapping\x18\x01 \x01(\v2\x11.state.v1.MappingR\amapping\x12\x14\n" + + "\x05found\x18\x02 \x01(\bR\x05found\"\x15\n" + + "\x13ListMappingsRequest\"E\n" + + "\x14ListMappingsResponse\x12-\n" + + "\bmappings\x18\x01 \x03(\v2\x11.state.v1.MappingR\bmappings\"C\n" + + "\x14UpdateMappingRequest\x12+\n" + + "\amapping\x18\x01 \x01(\v2\x11.state.v1.MappingR\amapping\"\x17\n" + + "\x15UpdateMappingResponse\"&\n" + + "\x14DeleteMappingRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\x17\n" + + "\x15DeleteMappingResponse\"Y\n" + + "\x19RecordMappingMatchRequest\x12\x1d\n" + + "\n" + + "mapping_id\x18\x01 \x01(\tR\tmappingId\x12\x1d\n" + + "\n" + + "capture_id\x18\x02 \x01(\tR\tcaptureId\"\x1c\n" + + "\x1aRecordMappingMatchResponse2\xff\x03\n" + + "\x0eMappingService\x12P\n" + + "\rInsertMapping\x12\x1e.state.v1.InsertMappingRequest\x1a\x1f.state.v1.InsertMappingResponse\x12G\n" + + "\n" + + "GetMapping\x12\x1b.state.v1.GetMappingRequest\x1a\x1c.state.v1.GetMappingResponse\x12M\n" + + "\fListMappings\x12\x1d.state.v1.ListMappingsRequest\x1a\x1e.state.v1.ListMappingsResponse\x12P\n" + + "\rUpdateMapping\x12\x1e.state.v1.UpdateMappingRequest\x1a\x1f.state.v1.UpdateMappingResponse\x12P\n" + + "\rDeleteMapping\x12\x1e.state.v1.DeleteMappingRequest\x1a\x1f.state.v1.DeleteMappingResponse\x12_\n" + + "\x12RecordMappingMatch\x12#.state.v1.RecordMappingMatchRequest\x1a$.state.v1.RecordMappingMatchResponseB\xa6\x01\n" + + "\fcom.state.v1B\fMappingProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_mapping_proto_rawDescOnce sync.Once + file_state_v1_mapping_proto_rawDescData []byte +) + +func file_state_v1_mapping_proto_rawDescGZIP() []byte { + file_state_v1_mapping_proto_rawDescOnce.Do(func() { + file_state_v1_mapping_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_mapping_proto_rawDesc), len(file_state_v1_mapping_proto_rawDesc))) + }) + return file_state_v1_mapping_proto_rawDescData +} + +var file_state_v1_mapping_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_state_v1_mapping_proto_goTypes = []any{ + (*MappingField)(nil), // 0: state.v1.MappingField + (*Mapping)(nil), // 1: state.v1.Mapping + (*InsertMappingRequest)(nil), // 2: state.v1.InsertMappingRequest + (*InsertMappingResponse)(nil), // 3: state.v1.InsertMappingResponse + (*GetMappingRequest)(nil), // 4: state.v1.GetMappingRequest + (*GetMappingResponse)(nil), // 5: state.v1.GetMappingResponse + (*ListMappingsRequest)(nil), // 6: state.v1.ListMappingsRequest + (*ListMappingsResponse)(nil), // 7: state.v1.ListMappingsResponse + (*UpdateMappingRequest)(nil), // 8: state.v1.UpdateMappingRequest + (*UpdateMappingResponse)(nil), // 9: state.v1.UpdateMappingResponse + (*DeleteMappingRequest)(nil), // 10: state.v1.DeleteMappingRequest + (*DeleteMappingResponse)(nil), // 11: state.v1.DeleteMappingResponse + (*RecordMappingMatchRequest)(nil), // 12: state.v1.RecordMappingMatchRequest + (*RecordMappingMatchResponse)(nil), // 13: state.v1.RecordMappingMatchResponse + (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp +} +var file_state_v1_mapping_proto_depIdxs = []int32{ + 0, // 0: state.v1.Mapping.fields:type_name -> state.v1.MappingField + 14, // 1: state.v1.Mapping.created_at:type_name -> google.protobuf.Timestamp + 14, // 2: state.v1.Mapping.updated_at:type_name -> google.protobuf.Timestamp + 14, // 3: state.v1.Mapping.last_matched_at:type_name -> google.protobuf.Timestamp + 1, // 4: state.v1.InsertMappingRequest.mapping:type_name -> state.v1.Mapping + 1, // 5: state.v1.GetMappingResponse.mapping:type_name -> state.v1.Mapping + 1, // 6: state.v1.ListMappingsResponse.mappings:type_name -> state.v1.Mapping + 1, // 7: state.v1.UpdateMappingRequest.mapping:type_name -> state.v1.Mapping + 2, // 8: state.v1.MappingService.InsertMapping:input_type -> state.v1.InsertMappingRequest + 4, // 9: state.v1.MappingService.GetMapping:input_type -> state.v1.GetMappingRequest + 6, // 10: state.v1.MappingService.ListMappings:input_type -> state.v1.ListMappingsRequest + 8, // 11: state.v1.MappingService.UpdateMapping:input_type -> state.v1.UpdateMappingRequest + 10, // 12: state.v1.MappingService.DeleteMapping:input_type -> state.v1.DeleteMappingRequest + 12, // 13: state.v1.MappingService.RecordMappingMatch:input_type -> state.v1.RecordMappingMatchRequest + 3, // 14: state.v1.MappingService.InsertMapping:output_type -> state.v1.InsertMappingResponse + 5, // 15: state.v1.MappingService.GetMapping:output_type -> state.v1.GetMappingResponse + 7, // 16: state.v1.MappingService.ListMappings:output_type -> state.v1.ListMappingsResponse + 9, // 17: state.v1.MappingService.UpdateMapping:output_type -> state.v1.UpdateMappingResponse + 11, // 18: state.v1.MappingService.DeleteMapping:output_type -> state.v1.DeleteMappingResponse + 13, // 19: state.v1.MappingService.RecordMappingMatch:output_type -> state.v1.RecordMappingMatchResponse + 14, // [14:20] is the sub-list for method output_type + 8, // [8:14] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_state_v1_mapping_proto_init() } +func file_state_v1_mapping_proto_init() { + if File_state_v1_mapping_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_mapping_proto_rawDesc), len(file_state_v1_mapping_proto_rawDesc)), + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_mapping_proto_goTypes, + DependencyIndexes: file_state_v1_mapping_proto_depIdxs, + MessageInfos: file_state_v1_mapping_proto_msgTypes, + }.Build() + File_state_v1_mapping_proto = out.File + file_state_v1_mapping_proto_goTypes = nil + file_state_v1_mapping_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/mapping_grpc.pb.go b/internal/contracts/state/v1/mapping_grpc.pb.go new file mode 100644 index 000000000..b2b4e3407 --- /dev/null +++ b/internal/contracts/state/v1/mapping_grpc.pb.go @@ -0,0 +1,315 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/mapping.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 ( + MappingService_InsertMapping_FullMethodName = "/state.v1.MappingService/InsertMapping" + MappingService_GetMapping_FullMethodName = "/state.v1.MappingService/GetMapping" + MappingService_ListMappings_FullMethodName = "/state.v1.MappingService/ListMappings" + MappingService_UpdateMapping_FullMethodName = "/state.v1.MappingService/UpdateMapping" + MappingService_DeleteMapping_FullMethodName = "/state.v1.MappingService/DeleteMapping" + MappingService_RecordMappingMatch_FullMethodName = "/state.v1.MappingService/RecordMappingMatch" +) + +// MappingServiceClient is the client API for MappingService 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 MappingServiceClient interface { + InsertMapping(ctx context.Context, in *InsertMappingRequest, opts ...grpc.CallOption) (*InsertMappingResponse, error) + GetMapping(ctx context.Context, in *GetMappingRequest, opts ...grpc.CallOption) (*GetMappingResponse, error) + ListMappings(ctx context.Context, in *ListMappingsRequest, opts ...grpc.CallOption) (*ListMappingsResponse, error) + UpdateMapping(ctx context.Context, in *UpdateMappingRequest, opts ...grpc.CallOption) (*UpdateMappingResponse, error) + DeleteMapping(ctx context.Context, in *DeleteMappingRequest, opts ...grpc.CallOption) (*DeleteMappingResponse, error) + // RecordMappingMatch counts one event a mapping resolved; the same + // (mapping, capture) twice counts once. + RecordMappingMatch(ctx context.Context, in *RecordMappingMatchRequest, opts ...grpc.CallOption) (*RecordMappingMatchResponse, error) +} + +type mappingServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewMappingServiceClient(cc grpc.ClientConnInterface) MappingServiceClient { + return &mappingServiceClient{cc} +} + +func (c *mappingServiceClient) InsertMapping(ctx context.Context, in *InsertMappingRequest, opts ...grpc.CallOption) (*InsertMappingResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(InsertMappingResponse) + err := c.cc.Invoke(ctx, MappingService_InsertMapping_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *mappingServiceClient) GetMapping(ctx context.Context, in *GetMappingRequest, opts ...grpc.CallOption) (*GetMappingResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMappingResponse) + err := c.cc.Invoke(ctx, MappingService_GetMapping_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *mappingServiceClient) ListMappings(ctx context.Context, in *ListMappingsRequest, opts ...grpc.CallOption) (*ListMappingsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListMappingsResponse) + err := c.cc.Invoke(ctx, MappingService_ListMappings_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *mappingServiceClient) UpdateMapping(ctx context.Context, in *UpdateMappingRequest, opts ...grpc.CallOption) (*UpdateMappingResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdateMappingResponse) + err := c.cc.Invoke(ctx, MappingService_UpdateMapping_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *mappingServiceClient) DeleteMapping(ctx context.Context, in *DeleteMappingRequest, opts ...grpc.CallOption) (*DeleteMappingResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteMappingResponse) + err := c.cc.Invoke(ctx, MappingService_DeleteMapping_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *mappingServiceClient) RecordMappingMatch(ctx context.Context, in *RecordMappingMatchRequest, opts ...grpc.CallOption) (*RecordMappingMatchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RecordMappingMatchResponse) + err := c.cc.Invoke(ctx, MappingService_RecordMappingMatch_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MappingServiceServer is the server API for MappingService service. +// All implementations must embed UnimplementedMappingServiceServer +// for forward compatibility. +type MappingServiceServer interface { + InsertMapping(context.Context, *InsertMappingRequest) (*InsertMappingResponse, error) + GetMapping(context.Context, *GetMappingRequest) (*GetMappingResponse, error) + ListMappings(context.Context, *ListMappingsRequest) (*ListMappingsResponse, error) + UpdateMapping(context.Context, *UpdateMappingRequest) (*UpdateMappingResponse, error) + DeleteMapping(context.Context, *DeleteMappingRequest) (*DeleteMappingResponse, error) + // RecordMappingMatch counts one event a mapping resolved; the same + // (mapping, capture) twice counts once. + RecordMappingMatch(context.Context, *RecordMappingMatchRequest) (*RecordMappingMatchResponse, error) + mustEmbedUnimplementedMappingServiceServer() +} + +// UnimplementedMappingServiceServer 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 UnimplementedMappingServiceServer struct{} + +func (UnimplementedMappingServiceServer) InsertMapping(context.Context, *InsertMappingRequest) (*InsertMappingResponse, error) { + return nil, status.Error(codes.Unimplemented, "method InsertMapping not implemented") +} +func (UnimplementedMappingServiceServer) GetMapping(context.Context, *GetMappingRequest) (*GetMappingResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetMapping not implemented") +} +func (UnimplementedMappingServiceServer) ListMappings(context.Context, *ListMappingsRequest) (*ListMappingsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListMappings not implemented") +} +func (UnimplementedMappingServiceServer) UpdateMapping(context.Context, *UpdateMappingRequest) (*UpdateMappingResponse, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateMapping not implemented") +} +func (UnimplementedMappingServiceServer) DeleteMapping(context.Context, *DeleteMappingRequest) (*DeleteMappingResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteMapping not implemented") +} +func (UnimplementedMappingServiceServer) RecordMappingMatch(context.Context, *RecordMappingMatchRequest) (*RecordMappingMatchResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RecordMappingMatch not implemented") +} +func (UnimplementedMappingServiceServer) mustEmbedUnimplementedMappingServiceServer() {} +func (UnimplementedMappingServiceServer) testEmbeddedByValue() {} + +// UnsafeMappingServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MappingServiceServer will +// result in compilation errors. +type UnsafeMappingServiceServer interface { + mustEmbedUnimplementedMappingServiceServer() +} + +func RegisterMappingServiceServer(s grpc.ServiceRegistrar, srv MappingServiceServer) { + // If the following call panics, it indicates UnimplementedMappingServiceServer 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(&MappingService_ServiceDesc, srv) +} + +func _MappingService_InsertMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InsertMappingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MappingServiceServer).InsertMapping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MappingService_InsertMapping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MappingServiceServer).InsertMapping(ctx, req.(*InsertMappingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MappingService_GetMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMappingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MappingServiceServer).GetMapping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MappingService_GetMapping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MappingServiceServer).GetMapping(ctx, req.(*GetMappingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MappingService_ListMappings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListMappingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MappingServiceServer).ListMappings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MappingService_ListMappings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MappingServiceServer).ListMappings(ctx, req.(*ListMappingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MappingService_UpdateMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateMappingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MappingServiceServer).UpdateMapping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MappingService_UpdateMapping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MappingServiceServer).UpdateMapping(ctx, req.(*UpdateMappingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MappingService_DeleteMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteMappingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MappingServiceServer).DeleteMapping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MappingService_DeleteMapping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MappingServiceServer).DeleteMapping(ctx, req.(*DeleteMappingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MappingService_RecordMappingMatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RecordMappingMatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MappingServiceServer).RecordMappingMatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MappingService_RecordMappingMatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MappingServiceServer).RecordMappingMatch(ctx, req.(*RecordMappingMatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// MappingService_ServiceDesc is the grpc.ServiceDesc for MappingService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var MappingService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.MappingService", + HandlerType: (*MappingServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "InsertMapping", + Handler: _MappingService_InsertMapping_Handler, + }, + { + MethodName: "GetMapping", + Handler: _MappingService_GetMapping_Handler, + }, + { + MethodName: "ListMappings", + Handler: _MappingService_ListMappings_Handler, + }, + { + MethodName: "UpdateMapping", + Handler: _MappingService_UpdateMapping_Handler, + }, + { + MethodName: "DeleteMapping", + Handler: _MappingService_DeleteMapping_Handler, + }, + { + MethodName: "RecordMappingMatch", + Handler: _MappingService_RecordMappingMatch_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "state/v1/mapping.proto", +} diff --git a/internal/contracts/state/v1/org.pb.go b/internal/contracts/state/v1/org.pb.go new file mode 100644 index 000000000..45c1683c8 --- /dev/null +++ b/internal/contracts/state/v1/org.pb.go @@ -0,0 +1,1502 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/org.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Org mirrors internal/domain/org.Org: one tenant. +type Org struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Org) Reset() { + *x = Org{} + mi := &file_state_v1_org_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Org) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Org) ProtoMessage() {} + +func (x *Org) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Org.ProtoReflect.Descriptor instead. +func (*Org) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{0} +} + +func (x *Org) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Org) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Workspace mirrors internal/domain/org.Workspace: a division of an org. +type Workspace struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Environment string `protobuf:"bytes,4,opt,name=environment,proto3" json:"environment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Workspace) Reset() { + *x = Workspace{} + mi := &file_state_v1_org_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Workspace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workspace) ProtoMessage() {} + +func (x *Workspace) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Workspace.ProtoReflect.Descriptor instead. +func (*Workspace) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{1} +} + +func (x *Workspace) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Workspace) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *Workspace) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Workspace) GetEnvironment() string { + if x != nil { + return x.Environment + } + return "" +} + +// Member mirrors internal/domain/org.Member: a membership with the identity +// it names, as the dashboard lists it. +type Member struct { + state protoimpl.MessageState `protogen:"open.v1"` + IdentityId string `protobuf:"bytes,1,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + WorkspaceId string `protobuf:"bytes,4,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + Role string `protobuf:"bytes,5,opt,name=role,proto3" json:"role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Member) Reset() { + *x = Member{} + mi := &file_state_v1_org_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Member) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Member) ProtoMessage() {} + +func (x *Member) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Member.ProtoReflect.Descriptor instead. +func (*Member) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{2} +} + +func (x *Member) GetIdentityId() string { + if x != nil { + return x.IdentityId + } + return "" +} + +func (x *Member) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Member) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Member) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *Member) GetRole() string { + if x != nil { + return x.Role + } + return "" +} + +type ListOrgsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListOrgsRequest) Reset() { + *x = ListOrgsRequest{} + mi := &file_state_v1_org_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListOrgsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOrgsRequest) ProtoMessage() {} + +func (x *ListOrgsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListOrgsRequest.ProtoReflect.Descriptor instead. +func (*ListOrgsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{3} +} + +type ListOrgsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Orgs []*Org `protobuf:"bytes,1,rep,name=orgs,proto3" json:"orgs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListOrgsResponse) Reset() { + *x = ListOrgsResponse{} + mi := &file_state_v1_org_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListOrgsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOrgsResponse) ProtoMessage() {} + +func (x *ListOrgsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListOrgsResponse.ProtoReflect.Descriptor instead. +func (*ListOrgsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{4} +} + +func (x *ListOrgsResponse) GetOrgs() []*Org { + if x != nil { + return x.Orgs + } + return nil +} + +type GetOrgRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetOrgRequest) Reset() { + *x = GetOrgRequest{} + mi := &file_state_v1_org_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetOrgRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOrgRequest) ProtoMessage() {} + +func (x *GetOrgRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOrgRequest.ProtoReflect.Descriptor instead. +func (*GetOrgRequest) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{5} +} + +func (x *GetOrgRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +type GetOrgResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Org *Org `protobuf:"bytes,1,opt,name=org,proto3" json:"org,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetOrgResponse) Reset() { + *x = GetOrgResponse{} + mi := &file_state_v1_org_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetOrgResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOrgResponse) ProtoMessage() {} + +func (x *GetOrgResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOrgResponse.ProtoReflect.Descriptor instead. +func (*GetOrgResponse) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{6} +} + +func (x *GetOrgResponse) GetOrg() *Org { + if x != nil { + return x.Org + } + return nil +} + +// CreateOrgRequest creates an org with its default workspace and its first +// owner. Only an instance admin may. +type CreateOrgRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + OwnerIdentityId string `protobuf:"bytes,3,opt,name=owner_identity_id,json=ownerIdentityId,proto3" json:"owner_identity_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateOrgRequest) Reset() { + *x = CreateOrgRequest{} + mi := &file_state_v1_org_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateOrgRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateOrgRequest) ProtoMessage() {} + +func (x *CreateOrgRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateOrgRequest.ProtoReflect.Descriptor instead. +func (*CreateOrgRequest) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{7} +} + +func (x *CreateOrgRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CreateOrgRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateOrgRequest) GetOwnerIdentityId() string { + if x != nil { + return x.OwnerIdentityId + } + return "" +} + +type CreateOrgResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Org *Org `protobuf:"bytes,1,opt,name=org,proto3" json:"org,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateOrgResponse) Reset() { + *x = CreateOrgResponse{} + mi := &file_state_v1_org_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateOrgResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateOrgResponse) ProtoMessage() {} + +func (x *CreateOrgResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateOrgResponse.ProtoReflect.Descriptor instead. +func (*CreateOrgResponse) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{8} +} + +func (x *CreateOrgResponse) GetOrg() *Org { + if x != nil { + return x.Org + } + return nil +} + +type ListWorkspacesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListWorkspacesRequest) Reset() { + *x = ListWorkspacesRequest{} + mi := &file_state_v1_org_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListWorkspacesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkspacesRequest) ProtoMessage() {} + +func (x *ListWorkspacesRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListWorkspacesRequest.ProtoReflect.Descriptor instead. +func (*ListWorkspacesRequest) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{9} +} + +func (x *ListWorkspacesRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +type ListWorkspacesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Workspaces []*Workspace `protobuf:"bytes,1,rep,name=workspaces,proto3" json:"workspaces,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListWorkspacesResponse) Reset() { + *x = ListWorkspacesResponse{} + mi := &file_state_v1_org_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListWorkspacesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkspacesResponse) ProtoMessage() {} + +func (x *ListWorkspacesResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListWorkspacesResponse.ProtoReflect.Descriptor instead. +func (*ListWorkspacesResponse) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{10} +} + +func (x *ListWorkspacesResponse) GetWorkspaces() []*Workspace { + if x != nil { + return x.Workspaces + } + return nil +} + +type CreateWorkspaceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Environment string `protobuf:"bytes,4,opt,name=environment,proto3" json:"environment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateWorkspaceRequest) Reset() { + *x = CreateWorkspaceRequest{} + mi := &file_state_v1_org_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateWorkspaceRequest) ProtoMessage() {} + +func (x *CreateWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*CreateWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{11} +} + +func (x *CreateWorkspaceRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *CreateWorkspaceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CreateWorkspaceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateWorkspaceRequest) GetEnvironment() string { + if x != nil { + return x.Environment + } + return "" +} + +type CreateWorkspaceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Workspace *Workspace `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateWorkspaceResponse) Reset() { + *x = CreateWorkspaceResponse{} + mi := &file_state_v1_org_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateWorkspaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateWorkspaceResponse) ProtoMessage() {} + +func (x *CreateWorkspaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateWorkspaceResponse.ProtoReflect.Descriptor instead. +func (*CreateWorkspaceResponse) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{12} +} + +func (x *CreateWorkspaceResponse) GetWorkspace() *Workspace { + if x != nil { + return x.Workspace + } + return nil +} + +type ListMembersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMembersRequest) Reset() { + *x = ListMembersRequest{} + mi := &file_state_v1_org_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMembersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMembersRequest) ProtoMessage() {} + +func (x *ListMembersRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMembersRequest.ProtoReflect.Descriptor instead. +func (*ListMembersRequest) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{13} +} + +func (x *ListMembersRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +type ListMembersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Members []*Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListMembersResponse) Reset() { + *x = ListMembersResponse{} + mi := &file_state_v1_org_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMembersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMembersResponse) ProtoMessage() {} + +func (x *ListMembersResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMembersResponse.ProtoReflect.Descriptor instead. +func (*ListMembersResponse) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{14} +} + +func (x *ListMembersResponse) GetMembers() []*Member { + if x != nil { + return x.Members + } + return nil +} + +type SetMembershipRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + IdentityId string `protobuf:"bytes,2,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` + WorkspaceId string `protobuf:"bytes,3,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + Role string `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetMembershipRequest) Reset() { + *x = SetMembershipRequest{} + mi := &file_state_v1_org_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetMembershipRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetMembershipRequest) ProtoMessage() {} + +func (x *SetMembershipRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetMembershipRequest.ProtoReflect.Descriptor instead. +func (*SetMembershipRequest) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{15} +} + +func (x *SetMembershipRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *SetMembershipRequest) GetIdentityId() string { + if x != nil { + return x.IdentityId + } + return "" +} + +func (x *SetMembershipRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *SetMembershipRequest) GetRole() string { + if x != nil { + return x.Role + } + return "" +} + +type SetMembershipResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetMembershipResponse) Reset() { + *x = SetMembershipResponse{} + mi := &file_state_v1_org_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetMembershipResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetMembershipResponse) ProtoMessage() {} + +func (x *SetMembershipResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetMembershipResponse.ProtoReflect.Descriptor instead. +func (*SetMembershipResponse) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{16} +} + +type RemoveMembershipRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + IdentityId string `protobuf:"bytes,2,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` + WorkspaceId string `protobuf:"bytes,3,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveMembershipRequest) Reset() { + *x = RemoveMembershipRequest{} + mi := &file_state_v1_org_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveMembershipRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveMembershipRequest) ProtoMessage() {} + +func (x *RemoveMembershipRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveMembershipRequest.ProtoReflect.Descriptor instead. +func (*RemoveMembershipRequest) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{17} +} + +func (x *RemoveMembershipRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *RemoveMembershipRequest) GetIdentityId() string { + if x != nil { + return x.IdentityId + } + return "" +} + +func (x *RemoveMembershipRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +type RemoveMembershipResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveMembershipResponse) Reset() { + *x = RemoveMembershipResponse{} + mi := &file_state_v1_org_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveMembershipResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveMembershipResponse) ProtoMessage() {} + +func (x *RemoveMembershipResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveMembershipResponse.ProtoReflect.Descriptor instead. +func (*RemoveMembershipResponse) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{18} +} + +type AssignAgentRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + IdentityId string `protobuf:"bytes,2,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AssignAgentRequest) Reset() { + *x = AssignAgentRequest{} + mi := &file_state_v1_org_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AssignAgentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssignAgentRequest) ProtoMessage() {} + +func (x *AssignAgentRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AssignAgentRequest.ProtoReflect.Descriptor instead. +func (*AssignAgentRequest) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{19} +} + +func (x *AssignAgentRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *AssignAgentRequest) GetIdentityId() string { + if x != nil { + return x.IdentityId + } + return "" +} + +type AssignAgentResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AssignAgentResponse) Reset() { + *x = AssignAgentResponse{} + mi := &file_state_v1_org_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AssignAgentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssignAgentResponse) ProtoMessage() {} + +func (x *AssignAgentResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AssignAgentResponse.ProtoReflect.Descriptor instead. +func (*AssignAgentResponse) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{20} +} + +type CallerModelsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CallerModelsRequest) Reset() { + *x = CallerModelsRequest{} + mi := &file_state_v1_org_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CallerModelsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CallerModelsRequest) ProtoMessage() {} + +func (x *CallerModelsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CallerModelsRequest.ProtoReflect.Descriptor instead. +func (*CallerModelsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{21} +} + +type CallerModelsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Aliases map[string]string `protobuf:"bytes,2,rep,name=aliases,proto3" json:"aliases,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CallerModelsResponse) Reset() { + *x = CallerModelsResponse{} + mi := &file_state_v1_org_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CallerModelsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CallerModelsResponse) ProtoMessage() {} + +func (x *CallerModelsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CallerModelsResponse.ProtoReflect.Descriptor instead. +func (*CallerModelsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{22} +} + +func (x *CallerModelsResponse) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *CallerModelsResponse) GetAliases() map[string]string { + if x != nil { + return x.Aliases + } + return nil +} + +type ListOrgAgentsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListOrgAgentsRequest) Reset() { + *x = ListOrgAgentsRequest{} + mi := &file_state_v1_org_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListOrgAgentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOrgAgentsRequest) ProtoMessage() {} + +func (x *ListOrgAgentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListOrgAgentsRequest.ProtoReflect.Descriptor instead. +func (*ListOrgAgentsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{23} +} + +func (x *ListOrgAgentsRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +type AgentAssignment struct { + state protoimpl.MessageState `protogen:"open.v1"` + IdentityId string `protobuf:"bytes,1,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` + OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentAssignment) Reset() { + *x = AgentAssignment{} + mi := &file_state_v1_org_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentAssignment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentAssignment) ProtoMessage() {} + +func (x *AgentAssignment) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentAssignment.ProtoReflect.Descriptor instead. +func (*AgentAssignment) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{24} +} + +func (x *AgentAssignment) GetIdentityId() string { + if x != nil { + return x.IdentityId + } + return "" +} + +func (x *AgentAssignment) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +type ListOrgAgentsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Agents []*AgentAssignment `protobuf:"bytes,1,rep,name=agents,proto3" json:"agents,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListOrgAgentsResponse) Reset() { + *x = ListOrgAgentsResponse{} + mi := &file_state_v1_org_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListOrgAgentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOrgAgentsResponse) ProtoMessage() {} + +func (x *ListOrgAgentsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_org_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListOrgAgentsResponse.ProtoReflect.Descriptor instead. +func (*ListOrgAgentsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_org_proto_rawDescGZIP(), []int{25} +} + +func (x *ListOrgAgentsResponse) GetAgents() []*AgentAssignment { + if x != nil { + return x.Agents + } + return nil +} + +var File_state_v1_org_proto protoreflect.FileDescriptor + +const file_state_v1_org_proto_rawDesc = "" + + "\n" + + "\x12state/v1/org.proto\x12\bstate.v1\")\n" + + "\x03Org\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\"h\n" + + "\tWorkspace\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n" + + "\x06org_id\x18\x02 \x01(\tR\x05orgId\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\x12 \n" + + "\venvironment\x18\x04 \x01(\tR\venvironment\"\x97\x01\n" + + "\x06Member\x12\x1f\n" + + "\videntity_id\x18\x01 \x01(\tR\n" + + "identityId\x12\x12\n" + + "\x04kind\x18\x02 \x01(\tR\x04kind\x12!\n" + + "\fdisplay_name\x18\x03 \x01(\tR\vdisplayName\x12!\n" + + "\fworkspace_id\x18\x04 \x01(\tR\vworkspaceId\x12\x12\n" + + "\x04role\x18\x05 \x01(\tR\x04role\"\x11\n" + + "\x0fListOrgsRequest\"5\n" + + "\x10ListOrgsResponse\x12!\n" + + "\x04orgs\x18\x01 \x03(\v2\r.state.v1.OrgR\x04orgs\"&\n" + + "\rGetOrgRequest\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\"1\n" + + "\x0eGetOrgResponse\x12\x1f\n" + + "\x03org\x18\x01 \x01(\v2\r.state.v1.OrgR\x03org\"b\n" + + "\x10CreateOrgRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12*\n" + + "\x11owner_identity_id\x18\x03 \x01(\tR\x0fownerIdentityId\"4\n" + + "\x11CreateOrgResponse\x12\x1f\n" + + "\x03org\x18\x01 \x01(\v2\r.state.v1.OrgR\x03org\".\n" + + "\x15ListWorkspacesRequest\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\"M\n" + + "\x16ListWorkspacesResponse\x123\n" + + "\n" + + "workspaces\x18\x01 \x03(\v2\x13.state.v1.WorkspaceR\n" + + "workspaces\"u\n" + + "\x16CreateWorkspaceRequest\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x0e\n" + + "\x02id\x18\x02 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\x12 \n" + + "\venvironment\x18\x04 \x01(\tR\venvironment\"L\n" + + "\x17CreateWorkspaceResponse\x121\n" + + "\tworkspace\x18\x01 \x01(\v2\x13.state.v1.WorkspaceR\tworkspace\"+\n" + + "\x12ListMembersRequest\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\"A\n" + + "\x13ListMembersResponse\x12*\n" + + "\amembers\x18\x01 \x03(\v2\x10.state.v1.MemberR\amembers\"\x85\x01\n" + + "\x14SetMembershipRequest\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x1f\n" + + "\videntity_id\x18\x02 \x01(\tR\n" + + "identityId\x12!\n" + + "\fworkspace_id\x18\x03 \x01(\tR\vworkspaceId\x12\x12\n" + + "\x04role\x18\x04 \x01(\tR\x04role\"\x17\n" + + "\x15SetMembershipResponse\"t\n" + + "\x17RemoveMembershipRequest\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x1f\n" + + "\videntity_id\x18\x02 \x01(\tR\n" + + "identityId\x12!\n" + + "\fworkspace_id\x18\x03 \x01(\tR\vworkspaceId\"\x1a\n" + + "\x18RemoveMembershipResponse\"L\n" + + "\x12AssignAgentRequest\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x1f\n" + + "\videntity_id\x18\x02 \x01(\tR\n" + + "identityId\"\x15\n" + + "\x13AssignAgentResponse\"\x15\n" + + "\x13CallerModelsRequest\"\xb0\x01\n" + + "\x14CallerModelsResponse\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12E\n" + + "\aaliases\x18\x02 \x03(\v2+.state.v1.CallerModelsResponse.AliasesEntryR\aaliases\x1a:\n" + + "\fAliasesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"-\n" + + "\x14ListOrgAgentsRequest\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\"I\n" + + "\x0fAgentAssignment\x12\x1f\n" + + "\videntity_id\x18\x01 \x01(\tR\n" + + "identityId\x12\x15\n" + + "\x06org_id\x18\x02 \x01(\tR\x05orgId\"J\n" + + "\x15ListOrgAgentsResponse\x121\n" + + "\x06agents\x18\x01 \x03(\v2\x19.state.v1.AgentAssignmentR\x06agents2\xe5\x06\n" + + "\n" + + "OrgService\x12M\n" + + "\fCallerModels\x12\x1d.state.v1.CallerModelsRequest\x1a\x1e.state.v1.CallerModelsResponse\x12A\n" + + "\bListOrgs\x12\x19.state.v1.ListOrgsRequest\x1a\x1a.state.v1.ListOrgsResponse\x12;\n" + + "\x06GetOrg\x12\x17.state.v1.GetOrgRequest\x1a\x18.state.v1.GetOrgResponse\x12D\n" + + "\tCreateOrg\x12\x1a.state.v1.CreateOrgRequest\x1a\x1b.state.v1.CreateOrgResponse\x12S\n" + + "\x0eListWorkspaces\x12\x1f.state.v1.ListWorkspacesRequest\x1a .state.v1.ListWorkspacesResponse\x12V\n" + + "\x0fCreateWorkspace\x12 .state.v1.CreateWorkspaceRequest\x1a!.state.v1.CreateWorkspaceResponse\x12J\n" + + "\vListMembers\x12\x1c.state.v1.ListMembersRequest\x1a\x1d.state.v1.ListMembersResponse\x12P\n" + + "\rSetMembership\x12\x1e.state.v1.SetMembershipRequest\x1a\x1f.state.v1.SetMembershipResponse\x12Y\n" + + "\x10RemoveMembership\x12!.state.v1.RemoveMembershipRequest\x1a\".state.v1.RemoveMembershipResponse\x12P\n" + + "\rListOrgAgents\x12\x1e.state.v1.ListOrgAgentsRequest\x1a\x1f.state.v1.ListOrgAgentsResponse\x12J\n" + + "\vAssignAgent\x12\x1c.state.v1.AssignAgentRequest\x1a\x1d.state.v1.AssignAgentResponseB\xa2\x01\n" + + "\fcom.state.v1B\bOrgProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_org_proto_rawDescOnce sync.Once + file_state_v1_org_proto_rawDescData []byte +) + +func file_state_v1_org_proto_rawDescGZIP() []byte { + file_state_v1_org_proto_rawDescOnce.Do(func() { + file_state_v1_org_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_org_proto_rawDesc), len(file_state_v1_org_proto_rawDesc))) + }) + return file_state_v1_org_proto_rawDescData +} + +var file_state_v1_org_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_state_v1_org_proto_goTypes = []any{ + (*Org)(nil), // 0: state.v1.Org + (*Workspace)(nil), // 1: state.v1.Workspace + (*Member)(nil), // 2: state.v1.Member + (*ListOrgsRequest)(nil), // 3: state.v1.ListOrgsRequest + (*ListOrgsResponse)(nil), // 4: state.v1.ListOrgsResponse + (*GetOrgRequest)(nil), // 5: state.v1.GetOrgRequest + (*GetOrgResponse)(nil), // 6: state.v1.GetOrgResponse + (*CreateOrgRequest)(nil), // 7: state.v1.CreateOrgRequest + (*CreateOrgResponse)(nil), // 8: state.v1.CreateOrgResponse + (*ListWorkspacesRequest)(nil), // 9: state.v1.ListWorkspacesRequest + (*ListWorkspacesResponse)(nil), // 10: state.v1.ListWorkspacesResponse + (*CreateWorkspaceRequest)(nil), // 11: state.v1.CreateWorkspaceRequest + (*CreateWorkspaceResponse)(nil), // 12: state.v1.CreateWorkspaceResponse + (*ListMembersRequest)(nil), // 13: state.v1.ListMembersRequest + (*ListMembersResponse)(nil), // 14: state.v1.ListMembersResponse + (*SetMembershipRequest)(nil), // 15: state.v1.SetMembershipRequest + (*SetMembershipResponse)(nil), // 16: state.v1.SetMembershipResponse + (*RemoveMembershipRequest)(nil), // 17: state.v1.RemoveMembershipRequest + (*RemoveMembershipResponse)(nil), // 18: state.v1.RemoveMembershipResponse + (*AssignAgentRequest)(nil), // 19: state.v1.AssignAgentRequest + (*AssignAgentResponse)(nil), // 20: state.v1.AssignAgentResponse + (*CallerModelsRequest)(nil), // 21: state.v1.CallerModelsRequest + (*CallerModelsResponse)(nil), // 22: state.v1.CallerModelsResponse + (*ListOrgAgentsRequest)(nil), // 23: state.v1.ListOrgAgentsRequest + (*AgentAssignment)(nil), // 24: state.v1.AgentAssignment + (*ListOrgAgentsResponse)(nil), // 25: state.v1.ListOrgAgentsResponse + nil, // 26: state.v1.CallerModelsResponse.AliasesEntry +} +var file_state_v1_org_proto_depIdxs = []int32{ + 0, // 0: state.v1.ListOrgsResponse.orgs:type_name -> state.v1.Org + 0, // 1: state.v1.GetOrgResponse.org:type_name -> state.v1.Org + 0, // 2: state.v1.CreateOrgResponse.org:type_name -> state.v1.Org + 1, // 3: state.v1.ListWorkspacesResponse.workspaces:type_name -> state.v1.Workspace + 1, // 4: state.v1.CreateWorkspaceResponse.workspace:type_name -> state.v1.Workspace + 2, // 5: state.v1.ListMembersResponse.members:type_name -> state.v1.Member + 26, // 6: state.v1.CallerModelsResponse.aliases:type_name -> state.v1.CallerModelsResponse.AliasesEntry + 24, // 7: state.v1.ListOrgAgentsResponse.agents:type_name -> state.v1.AgentAssignment + 21, // 8: state.v1.OrgService.CallerModels:input_type -> state.v1.CallerModelsRequest + 3, // 9: state.v1.OrgService.ListOrgs:input_type -> state.v1.ListOrgsRequest + 5, // 10: state.v1.OrgService.GetOrg:input_type -> state.v1.GetOrgRequest + 7, // 11: state.v1.OrgService.CreateOrg:input_type -> state.v1.CreateOrgRequest + 9, // 12: state.v1.OrgService.ListWorkspaces:input_type -> state.v1.ListWorkspacesRequest + 11, // 13: state.v1.OrgService.CreateWorkspace:input_type -> state.v1.CreateWorkspaceRequest + 13, // 14: state.v1.OrgService.ListMembers:input_type -> state.v1.ListMembersRequest + 15, // 15: state.v1.OrgService.SetMembership:input_type -> state.v1.SetMembershipRequest + 17, // 16: state.v1.OrgService.RemoveMembership:input_type -> state.v1.RemoveMembershipRequest + 23, // 17: state.v1.OrgService.ListOrgAgents:input_type -> state.v1.ListOrgAgentsRequest + 19, // 18: state.v1.OrgService.AssignAgent:input_type -> state.v1.AssignAgentRequest + 22, // 19: state.v1.OrgService.CallerModels:output_type -> state.v1.CallerModelsResponse + 4, // 20: state.v1.OrgService.ListOrgs:output_type -> state.v1.ListOrgsResponse + 6, // 21: state.v1.OrgService.GetOrg:output_type -> state.v1.GetOrgResponse + 8, // 22: state.v1.OrgService.CreateOrg:output_type -> state.v1.CreateOrgResponse + 10, // 23: state.v1.OrgService.ListWorkspaces:output_type -> state.v1.ListWorkspacesResponse + 12, // 24: state.v1.OrgService.CreateWorkspace:output_type -> state.v1.CreateWorkspaceResponse + 14, // 25: state.v1.OrgService.ListMembers:output_type -> state.v1.ListMembersResponse + 16, // 26: state.v1.OrgService.SetMembership:output_type -> state.v1.SetMembershipResponse + 18, // 27: state.v1.OrgService.RemoveMembership:output_type -> state.v1.RemoveMembershipResponse + 25, // 28: state.v1.OrgService.ListOrgAgents:output_type -> state.v1.ListOrgAgentsResponse + 20, // 29: state.v1.OrgService.AssignAgent:output_type -> state.v1.AssignAgentResponse + 19, // [19:30] is the sub-list for method output_type + 8, // [8:19] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_state_v1_org_proto_init() } +func file_state_v1_org_proto_init() { + if File_state_v1_org_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_org_proto_rawDesc), len(file_state_v1_org_proto_rawDesc)), + NumEnums: 0, + NumMessages: 27, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_org_proto_goTypes, + DependencyIndexes: file_state_v1_org_proto_depIdxs, + MessageInfos: file_state_v1_org_proto_msgTypes, + }.Build() + File_state_v1_org_proto = out.File + file_state_v1_org_proto_goTypes = nil + file_state_v1_org_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/org_grpc.pb.go b/internal/contracts/state/v1/org_grpc.pb.go new file mode 100644 index 000000000..090b9ed9e --- /dev/null +++ b/internal/contracts/state/v1/org_grpc.pb.go @@ -0,0 +1,515 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/org.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 ( + OrgService_CallerModels_FullMethodName = "/state.v1.OrgService/CallerModels" + OrgService_ListOrgs_FullMethodName = "/state.v1.OrgService/ListOrgs" + OrgService_GetOrg_FullMethodName = "/state.v1.OrgService/GetOrg" + OrgService_CreateOrg_FullMethodName = "/state.v1.OrgService/CreateOrg" + OrgService_ListWorkspaces_FullMethodName = "/state.v1.OrgService/ListWorkspaces" + OrgService_CreateWorkspace_FullMethodName = "/state.v1.OrgService/CreateWorkspace" + OrgService_ListMembers_FullMethodName = "/state.v1.OrgService/ListMembers" + OrgService_SetMembership_FullMethodName = "/state.v1.OrgService/SetMembership" + OrgService_RemoveMembership_FullMethodName = "/state.v1.OrgService/RemoveMembership" + OrgService_ListOrgAgents_FullMethodName = "/state.v1.OrgService/ListOrgAgents" + OrgService_AssignAgent_FullMethodName = "/state.v1.OrgService/AssignAgent" +) + +// OrgServiceClient is the client API for OrgService 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 OrgServiceClient interface { + // CallerModels answers the model aliases the caller's org may use. The org + // is the calling principal's; a call with none is the system org's. + CallerModels(ctx context.Context, in *CallerModelsRequest, opts ...grpc.CallOption) (*CallerModelsResponse, error) + // Orgs, workspaces, memberships and agent assignments + // (docs/prds/orgs-and-access.md). Every request names an org, but the + // State Store acts in the org the caller's principal carries: a request + // org that is not the caller's is ignored, so the contract cannot reach + // another tenant. Instance-admin widening is a later change. + ListOrgs(ctx context.Context, in *ListOrgsRequest, opts ...grpc.CallOption) (*ListOrgsResponse, error) + GetOrg(ctx context.Context, in *GetOrgRequest, opts ...grpc.CallOption) (*GetOrgResponse, error) + CreateOrg(ctx context.Context, in *CreateOrgRequest, opts ...grpc.CallOption) (*CreateOrgResponse, error) + ListWorkspaces(ctx context.Context, in *ListWorkspacesRequest, opts ...grpc.CallOption) (*ListWorkspacesResponse, error) + CreateWorkspace(ctx context.Context, in *CreateWorkspaceRequest, opts ...grpc.CallOption) (*CreateWorkspaceResponse, error) + ListMembers(ctx context.Context, in *ListMembersRequest, opts ...grpc.CallOption) (*ListMembersResponse, error) + SetMembership(ctx context.Context, in *SetMembershipRequest, opts ...grpc.CallOption) (*SetMembershipResponse, error) + RemoveMembership(ctx context.Context, in *RemoveMembershipRequest, opts ...grpc.CallOption) (*RemoveMembershipResponse, error) + ListOrgAgents(ctx context.Context, in *ListOrgAgentsRequest, opts ...grpc.CallOption) (*ListOrgAgentsResponse, error) + AssignAgent(ctx context.Context, in *AssignAgentRequest, opts ...grpc.CallOption) (*AssignAgentResponse, error) +} + +type orgServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewOrgServiceClient(cc grpc.ClientConnInterface) OrgServiceClient { + return &orgServiceClient{cc} +} + +func (c *orgServiceClient) CallerModels(ctx context.Context, in *CallerModelsRequest, opts ...grpc.CallOption) (*CallerModelsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CallerModelsResponse) + err := c.cc.Invoke(ctx, OrgService_CallerModels_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *orgServiceClient) ListOrgs(ctx context.Context, in *ListOrgsRequest, opts ...grpc.CallOption) (*ListOrgsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListOrgsResponse) + err := c.cc.Invoke(ctx, OrgService_ListOrgs_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *orgServiceClient) GetOrg(ctx context.Context, in *GetOrgRequest, opts ...grpc.CallOption) (*GetOrgResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetOrgResponse) + err := c.cc.Invoke(ctx, OrgService_GetOrg_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *orgServiceClient) CreateOrg(ctx context.Context, in *CreateOrgRequest, opts ...grpc.CallOption) (*CreateOrgResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateOrgResponse) + err := c.cc.Invoke(ctx, OrgService_CreateOrg_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *orgServiceClient) ListWorkspaces(ctx context.Context, in *ListWorkspacesRequest, opts ...grpc.CallOption) (*ListWorkspacesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListWorkspacesResponse) + err := c.cc.Invoke(ctx, OrgService_ListWorkspaces_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *orgServiceClient) CreateWorkspace(ctx context.Context, in *CreateWorkspaceRequest, opts ...grpc.CallOption) (*CreateWorkspaceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateWorkspaceResponse) + err := c.cc.Invoke(ctx, OrgService_CreateWorkspace_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *orgServiceClient) ListMembers(ctx context.Context, in *ListMembersRequest, opts ...grpc.CallOption) (*ListMembersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListMembersResponse) + err := c.cc.Invoke(ctx, OrgService_ListMembers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *orgServiceClient) SetMembership(ctx context.Context, in *SetMembershipRequest, opts ...grpc.CallOption) (*SetMembershipResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetMembershipResponse) + err := c.cc.Invoke(ctx, OrgService_SetMembership_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *orgServiceClient) RemoveMembership(ctx context.Context, in *RemoveMembershipRequest, opts ...grpc.CallOption) (*RemoveMembershipResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RemoveMembershipResponse) + err := c.cc.Invoke(ctx, OrgService_RemoveMembership_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *orgServiceClient) ListOrgAgents(ctx context.Context, in *ListOrgAgentsRequest, opts ...grpc.CallOption) (*ListOrgAgentsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListOrgAgentsResponse) + err := c.cc.Invoke(ctx, OrgService_ListOrgAgents_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *orgServiceClient) AssignAgent(ctx context.Context, in *AssignAgentRequest, opts ...grpc.CallOption) (*AssignAgentResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AssignAgentResponse) + err := c.cc.Invoke(ctx, OrgService_AssignAgent_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// OrgServiceServer is the server API for OrgService service. +// All implementations must embed UnimplementedOrgServiceServer +// for forward compatibility. +type OrgServiceServer interface { + // CallerModels answers the model aliases the caller's org may use. The org + // is the calling principal's; a call with none is the system org's. + CallerModels(context.Context, *CallerModelsRequest) (*CallerModelsResponse, error) + // Orgs, workspaces, memberships and agent assignments + // (docs/prds/orgs-and-access.md). Every request names an org, but the + // State Store acts in the org the caller's principal carries: a request + // org that is not the caller's is ignored, so the contract cannot reach + // another tenant. Instance-admin widening is a later change. + ListOrgs(context.Context, *ListOrgsRequest) (*ListOrgsResponse, error) + GetOrg(context.Context, *GetOrgRequest) (*GetOrgResponse, error) + CreateOrg(context.Context, *CreateOrgRequest) (*CreateOrgResponse, error) + ListWorkspaces(context.Context, *ListWorkspacesRequest) (*ListWorkspacesResponse, error) + CreateWorkspace(context.Context, *CreateWorkspaceRequest) (*CreateWorkspaceResponse, error) + ListMembers(context.Context, *ListMembersRequest) (*ListMembersResponse, error) + SetMembership(context.Context, *SetMembershipRequest) (*SetMembershipResponse, error) + RemoveMembership(context.Context, *RemoveMembershipRequest) (*RemoveMembershipResponse, error) + ListOrgAgents(context.Context, *ListOrgAgentsRequest) (*ListOrgAgentsResponse, error) + AssignAgent(context.Context, *AssignAgentRequest) (*AssignAgentResponse, error) + mustEmbedUnimplementedOrgServiceServer() +} + +// UnimplementedOrgServiceServer 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 UnimplementedOrgServiceServer struct{} + +func (UnimplementedOrgServiceServer) CallerModels(context.Context, *CallerModelsRequest) (*CallerModelsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CallerModels not implemented") +} +func (UnimplementedOrgServiceServer) ListOrgs(context.Context, *ListOrgsRequest) (*ListOrgsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListOrgs not implemented") +} +func (UnimplementedOrgServiceServer) GetOrg(context.Context, *GetOrgRequest) (*GetOrgResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetOrg not implemented") +} +func (UnimplementedOrgServiceServer) CreateOrg(context.Context, *CreateOrgRequest) (*CreateOrgResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CreateOrg not implemented") +} +func (UnimplementedOrgServiceServer) ListWorkspaces(context.Context, *ListWorkspacesRequest) (*ListWorkspacesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListWorkspaces not implemented") +} +func (UnimplementedOrgServiceServer) CreateWorkspace(context.Context, *CreateWorkspaceRequest) (*CreateWorkspaceResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CreateWorkspace not implemented") +} +func (UnimplementedOrgServiceServer) ListMembers(context.Context, *ListMembersRequest) (*ListMembersResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListMembers not implemented") +} +func (UnimplementedOrgServiceServer) SetMembership(context.Context, *SetMembershipRequest) (*SetMembershipResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetMembership not implemented") +} +func (UnimplementedOrgServiceServer) RemoveMembership(context.Context, *RemoveMembershipRequest) (*RemoveMembershipResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RemoveMembership not implemented") +} +func (UnimplementedOrgServiceServer) ListOrgAgents(context.Context, *ListOrgAgentsRequest) (*ListOrgAgentsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListOrgAgents not implemented") +} +func (UnimplementedOrgServiceServer) AssignAgent(context.Context, *AssignAgentRequest) (*AssignAgentResponse, error) { + return nil, status.Error(codes.Unimplemented, "method AssignAgent not implemented") +} +func (UnimplementedOrgServiceServer) mustEmbedUnimplementedOrgServiceServer() {} +func (UnimplementedOrgServiceServer) testEmbeddedByValue() {} + +// UnsafeOrgServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to OrgServiceServer will +// result in compilation errors. +type UnsafeOrgServiceServer interface { + mustEmbedUnimplementedOrgServiceServer() +} + +func RegisterOrgServiceServer(s grpc.ServiceRegistrar, srv OrgServiceServer) { + // If the following call panics, it indicates UnimplementedOrgServiceServer 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(&OrgService_ServiceDesc, srv) +} + +func _OrgService_CallerModels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CallerModelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrgServiceServer).CallerModels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrgService_CallerModels_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrgServiceServer).CallerModels(ctx, req.(*CallerModelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrgService_ListOrgs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListOrgsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrgServiceServer).ListOrgs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrgService_ListOrgs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrgServiceServer).ListOrgs(ctx, req.(*ListOrgsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrgService_GetOrg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOrgRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrgServiceServer).GetOrg(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrgService_GetOrg_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrgServiceServer).GetOrg(ctx, req.(*GetOrgRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrgService_CreateOrg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateOrgRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrgServiceServer).CreateOrg(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrgService_CreateOrg_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrgServiceServer).CreateOrg(ctx, req.(*CreateOrgRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrgService_ListWorkspaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListWorkspacesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrgServiceServer).ListWorkspaces(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrgService_ListWorkspaces_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrgServiceServer).ListWorkspaces(ctx, req.(*ListWorkspacesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrgService_CreateWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateWorkspaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrgServiceServer).CreateWorkspace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrgService_CreateWorkspace_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrgServiceServer).CreateWorkspace(ctx, req.(*CreateWorkspaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrgService_ListMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListMembersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrgServiceServer).ListMembers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrgService_ListMembers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrgServiceServer).ListMembers(ctx, req.(*ListMembersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrgService_SetMembership_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetMembershipRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrgServiceServer).SetMembership(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrgService_SetMembership_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrgServiceServer).SetMembership(ctx, req.(*SetMembershipRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrgService_RemoveMembership_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveMembershipRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrgServiceServer).RemoveMembership(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrgService_RemoveMembership_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrgServiceServer).RemoveMembership(ctx, req.(*RemoveMembershipRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrgService_ListOrgAgents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListOrgAgentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrgServiceServer).ListOrgAgents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrgService_ListOrgAgents_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrgServiceServer).ListOrgAgents(ctx, req.(*ListOrgAgentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OrgService_AssignAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AssignAgentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrgServiceServer).AssignAgent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OrgService_AssignAgent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrgServiceServer).AssignAgent(ctx, req.(*AssignAgentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// OrgService_ServiceDesc is the grpc.ServiceDesc for OrgService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var OrgService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.OrgService", + HandlerType: (*OrgServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CallerModels", + Handler: _OrgService_CallerModels_Handler, + }, + { + MethodName: "ListOrgs", + Handler: _OrgService_ListOrgs_Handler, + }, + { + MethodName: "GetOrg", + Handler: _OrgService_GetOrg_Handler, + }, + { + MethodName: "CreateOrg", + Handler: _OrgService_CreateOrg_Handler, + }, + { + MethodName: "ListWorkspaces", + Handler: _OrgService_ListWorkspaces_Handler, + }, + { + MethodName: "CreateWorkspace", + Handler: _OrgService_CreateWorkspace_Handler, + }, + { + MethodName: "ListMembers", + Handler: _OrgService_ListMembers_Handler, + }, + { + MethodName: "SetMembership", + Handler: _OrgService_SetMembership_Handler, + }, + { + MethodName: "RemoveMembership", + Handler: _OrgService_RemoveMembership_Handler, + }, + { + MethodName: "ListOrgAgents", + Handler: _OrgService_ListOrgAgents_Handler, + }, + { + MethodName: "AssignAgent", + Handler: _OrgService_AssignAgent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "state/v1/org.proto", +} diff --git a/internal/contracts/state/v1/package.pb.go b/internal/contracts/state/v1/package.pb.go new file mode 100644 index 000000000..6e445bb83 --- /dev/null +++ b/internal/contracts/state/v1/package.pb.go @@ -0,0 +1,1568 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/package.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type InstalledPackage struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Reference string `protobuf:"bytes,3,opt,name=reference,proto3" json:"reference,omitempty"` + Digest string `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"` + DescriptorJson []byte `protobuf:"bytes,5,opt,name=descriptor_json,json=descriptorJson,proto3" json:"descriptor_json,omitempty"` + Layer []byte `protobuf:"bytes,6,opt,name=layer,proto3" json:"layer,omitempty"` + UpdatePolicy string `protobuf:"bytes,7,opt,name=update_policy,json=updatePolicy,proto3" json:"update_policy,omitempty"` + // The operator's accepted authority, recorded against the pinned digest. + // Absent until the operator accepts (docs/prds/store.md, "Authority"). + AcceptedAuthority *PackageAuthority `protobuf:"bytes,8,opt,name=accepted_authority,json=acceptedAuthority,proto3" json:"accepted_authority,omitempty"` + // An update waiting for approval of widened authority; the live pin above + // is unchanged until then. + Pending *PackagePin `protobuf:"bytes,9,opt,name=pending,proto3" json:"pending,omitempty"` + // The pin the last update or rollback replaced, with the authority accepted + // against it. + Previous *PackagePin `protobuf:"bytes,10,opt,name=previous,proto3" json:"previous,omitempty"` + PreviousAcceptedAuthority *PackageAuthority `protobuf:"bytes,11,opt,name=previous_accepted_authority,json=previousAcceptedAuthority,proto3" json:"previous_accepted_authority,omitempty"` + // What the pending update declares. + PendingAuthority *PackageAuthority `protobuf:"bytes,12,opt,name=pending_authority,json=pendingAuthority,proto3" json:"pending_authority,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InstalledPackage) Reset() { + *x = InstalledPackage{} + mi := &file_state_v1_package_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InstalledPackage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstalledPackage) ProtoMessage() {} + +func (x *InstalledPackage) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstalledPackage.ProtoReflect.Descriptor instead. +func (*InstalledPackage) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{0} +} + +func (x *InstalledPackage) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *InstalledPackage) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *InstalledPackage) GetReference() string { + if x != nil { + return x.Reference + } + return "" +} + +func (x *InstalledPackage) GetDigest() string { + if x != nil { + return x.Digest + } + return "" +} + +func (x *InstalledPackage) GetDescriptorJson() []byte { + if x != nil { + return x.DescriptorJson + } + return nil +} + +func (x *InstalledPackage) GetLayer() []byte { + if x != nil { + return x.Layer + } + return nil +} + +func (x *InstalledPackage) GetUpdatePolicy() string { + if x != nil { + return x.UpdatePolicy + } + return "" +} + +func (x *InstalledPackage) GetAcceptedAuthority() *PackageAuthority { + if x != nil { + return x.AcceptedAuthority + } + return nil +} + +func (x *InstalledPackage) GetPending() *PackagePin { + if x != nil { + return x.Pending + } + return nil +} + +func (x *InstalledPackage) GetPrevious() *PackagePin { + if x != nil { + return x.Previous + } + return nil +} + +func (x *InstalledPackage) GetPreviousAcceptedAuthority() *PackageAuthority { + if x != nil { + return x.PreviousAcceptedAuthority + } + return nil +} + +func (x *InstalledPackage) GetPendingAuthority() *PackageAuthority { + if x != nil { + return x.PendingAuthority + } + return nil +} + +type PackagePin struct { + state protoimpl.MessageState `protogen:"open.v1"` + Reference string `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"` + Digest string `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PackagePin) Reset() { + *x = PackagePin{} + mi := &file_state_v1_package_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PackagePin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PackagePin) ProtoMessage() {} + +func (x *PackagePin) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PackagePin.ProtoReflect.Descriptor instead. +func (*PackagePin) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{1} +} + +func (x *PackagePin) GetReference() string { + if x != nil { + return x.Reference + } + return "" +} + +func (x *PackagePin) GetDigest() string { + if x != nil { + return x.Digest + } + return "" +} + +// PackageAuthority mirrors storepkg.Authority: the grants a package needs to +// operate. An acceptance record is an upper bound, checked field by field. +type PackageAuthority struct { + state protoimpl.MessageState `protogen:"open.v1"` + CredentialServices []string `protobuf:"bytes,1,rep,name=credential_services,json=credentialServices,proto3" json:"credential_services,omitempty"` + EgressHosts []string `protobuf:"bytes,2,rep,name=egress_hosts,json=egressHosts,proto3" json:"egress_hosts,omitempty"` + ForgePermissions []string `protobuf:"bytes,3,rep,name=forge_permissions,json=forgePermissions,proto3" json:"forge_permissions,omitempty"` + Triggers []string `protobuf:"bytes,4,rep,name=triggers,proto3" json:"triggers,omitempty"` + Tools []string `protobuf:"bytes,5,rep,name=tools,proto3" json:"tools,omitempty"` + Env []string `protobuf:"bytes,6,rep,name=env,proto3" json:"env,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PackageAuthority) Reset() { + *x = PackageAuthority{} + mi := &file_state_v1_package_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PackageAuthority) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PackageAuthority) ProtoMessage() {} + +func (x *PackageAuthority) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PackageAuthority.ProtoReflect.Descriptor instead. +func (*PackageAuthority) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{2} +} + +func (x *PackageAuthority) GetCredentialServices() []string { + if x != nil { + return x.CredentialServices + } + return nil +} + +func (x *PackageAuthority) GetEgressHosts() []string { + if x != nil { + return x.EgressHosts + } + return nil +} + +func (x *PackageAuthority) GetForgePermissions() []string { + if x != nil { + return x.ForgePermissions + } + return nil +} + +func (x *PackageAuthority) GetTriggers() []string { + if x != nil { + return x.Triggers + } + return nil +} + +func (x *PackageAuthority) GetTools() []string { + if x != nil { + return x.Tools + } + return nil +} + +func (x *PackageAuthority) GetEnv() []string { + if x != nil { + return x.Env + } + return nil +} + +// Package and denial requests act in the org the State Store derives from the +// caller's principal, else the default org. +type InstallPackageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Reference string `protobuf:"bytes,3,opt,name=reference,proto3" json:"reference,omitempty"` + Digest string `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InstallPackageRequest) Reset() { + *x = InstallPackageRequest{} + mi := &file_state_v1_package_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InstallPackageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstallPackageRequest) ProtoMessage() {} + +func (x *InstallPackageRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstallPackageRequest.ProtoReflect.Descriptor instead. +func (*InstallPackageRequest) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{3} +} + +func (x *InstallPackageRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *InstallPackageRequest) GetReference() string { + if x != nil { + return x.Reference + } + return "" +} + +func (x *InstallPackageRequest) GetDigest() string { + if x != nil { + return x.Digest + } + return "" +} + +type InstallPackageResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Package *InstalledPackage `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InstallPackageResponse) Reset() { + *x = InstallPackageResponse{} + mi := &file_state_v1_package_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InstallPackageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstallPackageResponse) ProtoMessage() {} + +func (x *InstallPackageResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstallPackageResponse.ProtoReflect.Descriptor instead. +func (*InstallPackageResponse) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{4} +} + +func (x *InstallPackageResponse) GetPackage() *InstalledPackage { + if x != nil { + return x.Package + } + return nil +} + +type CatalogueEntry struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Surface string `protobuf:"bytes,2,opt,name=surface,proto3" json:"surface,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + Reference string `protobuf:"bytes,5,opt,name=reference,proto3" json:"reference,omitempty"` + Digest string `protobuf:"bytes,6,opt,name=digest,proto3" json:"digest,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CatalogueEntry) Reset() { + *x = CatalogueEntry{} + mi := &file_state_v1_package_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CatalogueEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CatalogueEntry) ProtoMessage() {} + +func (x *CatalogueEntry) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CatalogueEntry.ProtoReflect.Descriptor instead. +func (*CatalogueEntry) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{5} +} + +func (x *CatalogueEntry) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CatalogueEntry) GetSurface() string { + if x != nil { + return x.Surface + } + return "" +} + +func (x *CatalogueEntry) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *CatalogueEntry) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CatalogueEntry) GetReference() string { + if x != nil { + return x.Reference + } + return "" +} + +func (x *CatalogueEntry) GetDigest() string { + if x != nil { + return x.Digest + } + return "" +} + +type ListCatalogueRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListCatalogueRequest) Reset() { + *x = ListCatalogueRequest{} + mi := &file_state_v1_package_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListCatalogueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCatalogueRequest) ProtoMessage() {} + +func (x *ListCatalogueRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCatalogueRequest.ProtoReflect.Descriptor instead. +func (*ListCatalogueRequest) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{6} +} + +type ListCatalogueResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Packages []*CatalogueEntry `protobuf:"bytes,1,rep,name=packages,proto3" json:"packages,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListCatalogueResponse) Reset() { + *x = ListCatalogueResponse{} + mi := &file_state_v1_package_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListCatalogueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCatalogueResponse) ProtoMessage() {} + +func (x *ListCatalogueResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCatalogueResponse.ProtoReflect.Descriptor instead. +func (*ListCatalogueResponse) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{7} +} + +func (x *ListCatalogueResponse) GetPackages() []*CatalogueEntry { + if x != nil { + return x.Packages + } + return nil +} + +type InstallFromCatalogueRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InstallFromCatalogueRequest) Reset() { + *x = InstallFromCatalogueRequest{} + mi := &file_state_v1_package_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InstallFromCatalogueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstallFromCatalogueRequest) ProtoMessage() {} + +func (x *InstallFromCatalogueRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstallFromCatalogueRequest.ProtoReflect.Descriptor instead. +func (*InstallFromCatalogueRequest) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{8} +} + +func (x *InstallFromCatalogueRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type InstallFromCatalogueResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Package *InstalledPackage `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InstallFromCatalogueResponse) Reset() { + *x = InstallFromCatalogueResponse{} + mi := &file_state_v1_package_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InstallFromCatalogueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstallFromCatalogueResponse) ProtoMessage() {} + +func (x *InstallFromCatalogueResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstallFromCatalogueResponse.ProtoReflect.Descriptor instead. +func (*InstallFromCatalogueResponse) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{9} +} + +func (x *InstallFromCatalogueResponse) GetPackage() *InstalledPackage { + if x != nil { + return x.Package + } + return nil +} + +type GetInstalledPackageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetInstalledPackageRequest) Reset() { + *x = GetInstalledPackageRequest{} + mi := &file_state_v1_package_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetInstalledPackageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInstalledPackageRequest) ProtoMessage() {} + +func (x *GetInstalledPackageRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetInstalledPackageRequest.ProtoReflect.Descriptor instead. +func (*GetInstalledPackageRequest) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{10} +} + +func (x *GetInstalledPackageRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetInstalledPackageResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Package *InstalledPackage `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetInstalledPackageResponse) Reset() { + *x = GetInstalledPackageResponse{} + mi := &file_state_v1_package_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetInstalledPackageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInstalledPackageResponse) ProtoMessage() {} + +func (x *GetInstalledPackageResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetInstalledPackageResponse.ProtoReflect.Descriptor instead. +func (*GetInstalledPackageResponse) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{11} +} + +func (x *GetInstalledPackageResponse) GetPackage() *InstalledPackage { + if x != nil { + return x.Package + } + return nil +} + +type ListInstalledPackagesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListInstalledPackagesRequest) Reset() { + *x = ListInstalledPackagesRequest{} + mi := &file_state_v1_package_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListInstalledPackagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInstalledPackagesRequest) ProtoMessage() {} + +func (x *ListInstalledPackagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInstalledPackagesRequest.ProtoReflect.Descriptor instead. +func (*ListInstalledPackagesRequest) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{12} +} + +type ListInstalledPackagesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Packages []*InstalledPackage `protobuf:"bytes,1,rep,name=packages,proto3" json:"packages,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListInstalledPackagesResponse) Reset() { + *x = ListInstalledPackagesResponse{} + mi := &file_state_v1_package_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListInstalledPackagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInstalledPackagesResponse) ProtoMessage() {} + +func (x *ListInstalledPackagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInstalledPackagesResponse.ProtoReflect.Descriptor instead. +func (*ListInstalledPackagesResponse) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{13} +} + +func (x *ListInstalledPackagesResponse) GetPackages() []*InstalledPackage { + if x != nil { + return x.Packages + } + return nil +} + +type AcceptPackageAuthorityRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Accepted *PackageAuthority `protobuf:"bytes,3,opt,name=accepted,proto3" json:"accepted,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AcceptPackageAuthorityRequest) Reset() { + *x = AcceptPackageAuthorityRequest{} + mi := &file_state_v1_package_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AcceptPackageAuthorityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AcceptPackageAuthorityRequest) ProtoMessage() {} + +func (x *AcceptPackageAuthorityRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AcceptPackageAuthorityRequest.ProtoReflect.Descriptor instead. +func (*AcceptPackageAuthorityRequest) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{14} +} + +func (x *AcceptPackageAuthorityRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AcceptPackageAuthorityRequest) GetAccepted() *PackageAuthority { + if x != nil { + return x.Accepted + } + return nil +} + +type AcceptPackageAuthorityResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Package *InstalledPackage `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AcceptPackageAuthorityResponse) Reset() { + *x = AcceptPackageAuthorityResponse{} + mi := &file_state_v1_package_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AcceptPackageAuthorityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AcceptPackageAuthorityResponse) ProtoMessage() {} + +func (x *AcceptPackageAuthorityResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AcceptPackageAuthorityResponse.ProtoReflect.Descriptor instead. +func (*AcceptPackageAuthorityResponse) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{15} +} + +func (x *AcceptPackageAuthorityResponse) GetPackage() *InstalledPackage { + if x != nil { + return x.Package + } + return nil +} + +type RemoveInstalledPackageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveInstalledPackageRequest) Reset() { + *x = RemoveInstalledPackageRequest{} + mi := &file_state_v1_package_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveInstalledPackageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveInstalledPackageRequest) ProtoMessage() {} + +func (x *RemoveInstalledPackageRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveInstalledPackageRequest.ProtoReflect.Descriptor instead. +func (*RemoveInstalledPackageRequest) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{16} +} + +func (x *RemoveInstalledPackageRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type RemoveInstalledPackageResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveInstalledPackageResponse) Reset() { + *x = RemoveInstalledPackageResponse{} + mi := &file_state_v1_package_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveInstalledPackageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveInstalledPackageResponse) ProtoMessage() {} + +func (x *RemoveInstalledPackageResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveInstalledPackageResponse.ProtoReflect.Descriptor instead. +func (*RemoveInstalledPackageResponse) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{17} +} + +type UpdatePackageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdatePackageRequest) Reset() { + *x = UpdatePackageRequest{} + mi := &file_state_v1_package_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdatePackageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdatePackageRequest) ProtoMessage() {} + +func (x *UpdatePackageRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdatePackageRequest.ProtoReflect.Descriptor instead. +func (*UpdatePackageRequest) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{18} +} + +func (x *UpdatePackageRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type UpdatePackageResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Package *InstalledPackage `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdatePackageResponse) Reset() { + *x = UpdatePackageResponse{} + mi := &file_state_v1_package_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdatePackageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdatePackageResponse) ProtoMessage() {} + +func (x *UpdatePackageResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdatePackageResponse.ProtoReflect.Descriptor instead. +func (*UpdatePackageResponse) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{19} +} + +func (x *UpdatePackageResponse) GetPackage() *InstalledPackage { + if x != nil { + return x.Package + } + return nil +} + +type ApprovePackageUpdateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ApprovePackageUpdateRequest) Reset() { + *x = ApprovePackageUpdateRequest{} + mi := &file_state_v1_package_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApprovePackageUpdateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApprovePackageUpdateRequest) ProtoMessage() {} + +func (x *ApprovePackageUpdateRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApprovePackageUpdateRequest.ProtoReflect.Descriptor instead. +func (*ApprovePackageUpdateRequest) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{20} +} + +func (x *ApprovePackageUpdateRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ApprovePackageUpdateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Package *InstalledPackage `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ApprovePackageUpdateResponse) Reset() { + *x = ApprovePackageUpdateResponse{} + mi := &file_state_v1_package_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApprovePackageUpdateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApprovePackageUpdateResponse) ProtoMessage() {} + +func (x *ApprovePackageUpdateResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApprovePackageUpdateResponse.ProtoReflect.Descriptor instead. +func (*ApprovePackageUpdateResponse) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{21} +} + +func (x *ApprovePackageUpdateResponse) GetPackage() *InstalledPackage { + if x != nil { + return x.Package + } + return nil +} + +type RollbackPackageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RollbackPackageRequest) Reset() { + *x = RollbackPackageRequest{} + mi := &file_state_v1_package_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RollbackPackageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RollbackPackageRequest) ProtoMessage() {} + +func (x *RollbackPackageRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RollbackPackageRequest.ProtoReflect.Descriptor instead. +func (*RollbackPackageRequest) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{22} +} + +func (x *RollbackPackageRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type RollbackPackageResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Package *InstalledPackage `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RollbackPackageResponse) Reset() { + *x = RollbackPackageResponse{} + mi := &file_state_v1_package_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RollbackPackageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RollbackPackageResponse) ProtoMessage() {} + +func (x *RollbackPackageResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RollbackPackageResponse.ProtoReflect.Descriptor instead. +func (*RollbackPackageResponse) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{23} +} + +func (x *RollbackPackageResponse) GetPackage() *InstalledPackage { + if x != nil { + return x.Package + } + return nil +} + +type SetPackageUpdatePolicyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Policy string `protobuf:"bytes,2,opt,name=policy,proto3" json:"policy,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetPackageUpdatePolicyRequest) Reset() { + *x = SetPackageUpdatePolicyRequest{} + mi := &file_state_v1_package_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetPackageUpdatePolicyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPackageUpdatePolicyRequest) ProtoMessage() {} + +func (x *SetPackageUpdatePolicyRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPackageUpdatePolicyRequest.ProtoReflect.Descriptor instead. +func (*SetPackageUpdatePolicyRequest) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{24} +} + +func (x *SetPackageUpdatePolicyRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SetPackageUpdatePolicyRequest) GetPolicy() string { + if x != nil { + return x.Policy + } + return "" +} + +type SetPackageUpdatePolicyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Package *InstalledPackage `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetPackageUpdatePolicyResponse) Reset() { + *x = SetPackageUpdatePolicyResponse{} + mi := &file_state_v1_package_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetPackageUpdatePolicyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPackageUpdatePolicyResponse) ProtoMessage() {} + +func (x *SetPackageUpdatePolicyResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_package_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPackageUpdatePolicyResponse.ProtoReflect.Descriptor instead. +func (*SetPackageUpdatePolicyResponse) Descriptor() ([]byte, []int) { + return file_state_v1_package_proto_rawDescGZIP(), []int{25} +} + +func (x *SetPackageUpdatePolicyResponse) GetPackage() *InstalledPackage { + if x != nil { + return x.Package + } + return nil +} + +var File_state_v1_package_proto protoreflect.FileDescriptor + +const file_state_v1_package_proto_rawDesc = "" + + "\n" + + "\x16state/v1/package.proto\x12\bstate.v1\"\xa9\x04\n" + + "\x10InstalledPackage\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x1c\n" + + "\treference\x18\x03 \x01(\tR\treference\x12\x16\n" + + "\x06digest\x18\x04 \x01(\tR\x06digest\x12'\n" + + "\x0fdescriptor_json\x18\x05 \x01(\fR\x0edescriptorJson\x12\x14\n" + + "\x05layer\x18\x06 \x01(\fR\x05layer\x12#\n" + + "\rupdate_policy\x18\a \x01(\tR\fupdatePolicy\x12I\n" + + "\x12accepted_authority\x18\b \x01(\v2\x1a.state.v1.PackageAuthorityR\x11acceptedAuthority\x12.\n" + + "\apending\x18\t \x01(\v2\x14.state.v1.PackagePinR\apending\x120\n" + + "\bprevious\x18\n" + + " \x01(\v2\x14.state.v1.PackagePinR\bprevious\x12Z\n" + + "\x1bprevious_accepted_authority\x18\v \x01(\v2\x1a.state.v1.PackageAuthorityR\x19previousAcceptedAuthority\x12G\n" + + "\x11pending_authority\x18\f \x01(\v2\x1a.state.v1.PackageAuthorityR\x10pendingAuthority\"B\n" + + "\n" + + "PackagePin\x12\x1c\n" + + "\treference\x18\x01 \x01(\tR\treference\x12\x16\n" + + "\x06digest\x18\x02 \x01(\tR\x06digest\"\xd7\x01\n" + + "\x10PackageAuthority\x12/\n" + + "\x13credential_services\x18\x01 \x03(\tR\x12credentialServices\x12!\n" + + "\fegress_hosts\x18\x02 \x03(\tR\vegressHosts\x12+\n" + + "\x11forge_permissions\x18\x03 \x03(\tR\x10forgePermissions\x12\x1a\n" + + "\btriggers\x18\x04 \x03(\tR\btriggers\x12\x14\n" + + "\x05tools\x18\x05 \x03(\tR\x05tools\x12\x10\n" + + "\x03env\x18\x06 \x03(\tR\x03env\"o\n" + + "\x15InstallPackageRequest\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x1c\n" + + "\treference\x18\x03 \x01(\tR\treference\x12\x16\n" + + "\x06digest\x18\x04 \x01(\tR\x06digestJ\x04\b\x01\x10\x02R\x06org_id\"N\n" + + "\x16InstallPackageResponse\x124\n" + + "\apackage\x18\x01 \x01(\v2\x1a.state.v1.InstalledPackageR\apackage\"\xb0\x01\n" + + "\x0eCatalogueEntry\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + + "\asurface\x18\x02 \x01(\tR\asurface\x12\x18\n" + + "\aversion\x18\x03 \x01(\tR\aversion\x12 \n" + + "\vdescription\x18\x04 \x01(\tR\vdescription\x12\x1c\n" + + "\treference\x18\x05 \x01(\tR\treference\x12\x16\n" + + "\x06digest\x18\x06 \x01(\tR\x06digest\"\x16\n" + + "\x14ListCatalogueRequest\"M\n" + + "\x15ListCatalogueResponse\x124\n" + + "\bpackages\x18\x01 \x03(\v2\x18.state.v1.CatalogueEntryR\bpackages\"1\n" + + "\x1bInstallFromCatalogueRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\"T\n" + + "\x1cInstallFromCatalogueResponse\x124\n" + + "\apackage\x18\x01 \x01(\v2\x1a.state.v1.InstalledPackageR\apackage\">\n" + + "\x1aGetInstalledPackageRequest\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04nameJ\x04\b\x01\x10\x02R\x06org_id\"S\n" + + "\x1bGetInstalledPackageResponse\x124\n" + + "\apackage\x18\x01 \x01(\v2\x1a.state.v1.InstalledPackageR\apackage\",\n" + + "\x1cListInstalledPackagesRequestJ\x04\b\x01\x10\x02R\x06org_id\"W\n" + + "\x1dListInstalledPackagesResponse\x126\n" + + "\bpackages\x18\x01 \x03(\v2\x1a.state.v1.InstalledPackageR\bpackages\"y\n" + + "\x1dAcceptPackageAuthorityRequest\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x126\n" + + "\baccepted\x18\x03 \x01(\v2\x1a.state.v1.PackageAuthorityR\bacceptedJ\x04\b\x01\x10\x02R\x06org_id\"V\n" + + "\x1eAcceptPackageAuthorityResponse\x124\n" + + "\apackage\x18\x01 \x01(\v2\x1a.state.v1.InstalledPackageR\apackage\"A\n" + + "\x1dRemoveInstalledPackageRequest\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04nameJ\x04\b\x01\x10\x02R\x06org_id\" \n" + + "\x1eRemoveInstalledPackageResponse\"*\n" + + "\x14UpdatePackageRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\"M\n" + + "\x15UpdatePackageResponse\x124\n" + + "\apackage\x18\x01 \x01(\v2\x1a.state.v1.InstalledPackageR\apackage\"1\n" + + "\x1bApprovePackageUpdateRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\"T\n" + + "\x1cApprovePackageUpdateResponse\x124\n" + + "\apackage\x18\x01 \x01(\v2\x1a.state.v1.InstalledPackageR\apackage\",\n" + + "\x16RollbackPackageRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\"O\n" + + "\x17RollbackPackageResponse\x124\n" + + "\apackage\x18\x01 \x01(\v2\x1a.state.v1.InstalledPackageR\apackage\"K\n" + + "\x1dSetPackageUpdatePolicyRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" + + "\x06policy\x18\x02 \x01(\tR\x06policy\"V\n" + + "\x1eSetPackageUpdatePolicyResponse\x124\n" + + "\apackage\x18\x01 \x01(\v2\x1a.state.v1.InstalledPackageR\apackage2\xc4\b\n" + + "\x0ePackageService\x12S\n" + + "\x0eInstallPackage\x12\x1f.state.v1.InstallPackageRequest\x1a .state.v1.InstallPackageResponse\x12P\n" + + "\rListCatalogue\x12\x1e.state.v1.ListCatalogueRequest\x1a\x1f.state.v1.ListCatalogueResponse\x12e\n" + + "\x14InstallFromCatalogue\x12%.state.v1.InstallFromCatalogueRequest\x1a&.state.v1.InstallFromCatalogueResponse\x12b\n" + + "\x13GetInstalledPackage\x12$.state.v1.GetInstalledPackageRequest\x1a%.state.v1.GetInstalledPackageResponse\x12h\n" + + "\x15ListInstalledPackages\x12&.state.v1.ListInstalledPackagesRequest\x1a'.state.v1.ListInstalledPackagesResponse\x12k\n" + + "\x16AcceptPackageAuthority\x12'.state.v1.AcceptPackageAuthorityRequest\x1a(.state.v1.AcceptPackageAuthorityResponse\x12k\n" + + "\x16RemoveInstalledPackage\x12'.state.v1.RemoveInstalledPackageRequest\x1a(.state.v1.RemoveInstalledPackageResponse\x12P\n" + + "\rUpdatePackage\x12\x1e.state.v1.UpdatePackageRequest\x1a\x1f.state.v1.UpdatePackageResponse\x12e\n" + + "\x14ApprovePackageUpdate\x12%.state.v1.ApprovePackageUpdateRequest\x1a&.state.v1.ApprovePackageUpdateResponse\x12V\n" + + "\x0fRollbackPackage\x12 .state.v1.RollbackPackageRequest\x1a!.state.v1.RollbackPackageResponse\x12k\n" + + "\x16SetPackageUpdatePolicy\x12'.state.v1.SetPackageUpdatePolicyRequest\x1a(.state.v1.SetPackageUpdatePolicyResponseB\xa6\x01\n" + + "\fcom.state.v1B\fPackageProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_package_proto_rawDescOnce sync.Once + file_state_v1_package_proto_rawDescData []byte +) + +func file_state_v1_package_proto_rawDescGZIP() []byte { + file_state_v1_package_proto_rawDescOnce.Do(func() { + file_state_v1_package_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_package_proto_rawDesc), len(file_state_v1_package_proto_rawDesc))) + }) + return file_state_v1_package_proto_rawDescData +} + +var file_state_v1_package_proto_msgTypes = make([]protoimpl.MessageInfo, 26) +var file_state_v1_package_proto_goTypes = []any{ + (*InstalledPackage)(nil), // 0: state.v1.InstalledPackage + (*PackagePin)(nil), // 1: state.v1.PackagePin + (*PackageAuthority)(nil), // 2: state.v1.PackageAuthority + (*InstallPackageRequest)(nil), // 3: state.v1.InstallPackageRequest + (*InstallPackageResponse)(nil), // 4: state.v1.InstallPackageResponse + (*CatalogueEntry)(nil), // 5: state.v1.CatalogueEntry + (*ListCatalogueRequest)(nil), // 6: state.v1.ListCatalogueRequest + (*ListCatalogueResponse)(nil), // 7: state.v1.ListCatalogueResponse + (*InstallFromCatalogueRequest)(nil), // 8: state.v1.InstallFromCatalogueRequest + (*InstallFromCatalogueResponse)(nil), // 9: state.v1.InstallFromCatalogueResponse + (*GetInstalledPackageRequest)(nil), // 10: state.v1.GetInstalledPackageRequest + (*GetInstalledPackageResponse)(nil), // 11: state.v1.GetInstalledPackageResponse + (*ListInstalledPackagesRequest)(nil), // 12: state.v1.ListInstalledPackagesRequest + (*ListInstalledPackagesResponse)(nil), // 13: state.v1.ListInstalledPackagesResponse + (*AcceptPackageAuthorityRequest)(nil), // 14: state.v1.AcceptPackageAuthorityRequest + (*AcceptPackageAuthorityResponse)(nil), // 15: state.v1.AcceptPackageAuthorityResponse + (*RemoveInstalledPackageRequest)(nil), // 16: state.v1.RemoveInstalledPackageRequest + (*RemoveInstalledPackageResponse)(nil), // 17: state.v1.RemoveInstalledPackageResponse + (*UpdatePackageRequest)(nil), // 18: state.v1.UpdatePackageRequest + (*UpdatePackageResponse)(nil), // 19: state.v1.UpdatePackageResponse + (*ApprovePackageUpdateRequest)(nil), // 20: state.v1.ApprovePackageUpdateRequest + (*ApprovePackageUpdateResponse)(nil), // 21: state.v1.ApprovePackageUpdateResponse + (*RollbackPackageRequest)(nil), // 22: state.v1.RollbackPackageRequest + (*RollbackPackageResponse)(nil), // 23: state.v1.RollbackPackageResponse + (*SetPackageUpdatePolicyRequest)(nil), // 24: state.v1.SetPackageUpdatePolicyRequest + (*SetPackageUpdatePolicyResponse)(nil), // 25: state.v1.SetPackageUpdatePolicyResponse +} +var file_state_v1_package_proto_depIdxs = []int32{ + 2, // 0: state.v1.InstalledPackage.accepted_authority:type_name -> state.v1.PackageAuthority + 1, // 1: state.v1.InstalledPackage.pending:type_name -> state.v1.PackagePin + 1, // 2: state.v1.InstalledPackage.previous:type_name -> state.v1.PackagePin + 2, // 3: state.v1.InstalledPackage.previous_accepted_authority:type_name -> state.v1.PackageAuthority + 2, // 4: state.v1.InstalledPackage.pending_authority:type_name -> state.v1.PackageAuthority + 0, // 5: state.v1.InstallPackageResponse.package:type_name -> state.v1.InstalledPackage + 5, // 6: state.v1.ListCatalogueResponse.packages:type_name -> state.v1.CatalogueEntry + 0, // 7: state.v1.InstallFromCatalogueResponse.package:type_name -> state.v1.InstalledPackage + 0, // 8: state.v1.GetInstalledPackageResponse.package:type_name -> state.v1.InstalledPackage + 0, // 9: state.v1.ListInstalledPackagesResponse.packages:type_name -> state.v1.InstalledPackage + 2, // 10: state.v1.AcceptPackageAuthorityRequest.accepted:type_name -> state.v1.PackageAuthority + 0, // 11: state.v1.AcceptPackageAuthorityResponse.package:type_name -> state.v1.InstalledPackage + 0, // 12: state.v1.UpdatePackageResponse.package:type_name -> state.v1.InstalledPackage + 0, // 13: state.v1.ApprovePackageUpdateResponse.package:type_name -> state.v1.InstalledPackage + 0, // 14: state.v1.RollbackPackageResponse.package:type_name -> state.v1.InstalledPackage + 0, // 15: state.v1.SetPackageUpdatePolicyResponse.package:type_name -> state.v1.InstalledPackage + 3, // 16: state.v1.PackageService.InstallPackage:input_type -> state.v1.InstallPackageRequest + 6, // 17: state.v1.PackageService.ListCatalogue:input_type -> state.v1.ListCatalogueRequest + 8, // 18: state.v1.PackageService.InstallFromCatalogue:input_type -> state.v1.InstallFromCatalogueRequest + 10, // 19: state.v1.PackageService.GetInstalledPackage:input_type -> state.v1.GetInstalledPackageRequest + 12, // 20: state.v1.PackageService.ListInstalledPackages:input_type -> state.v1.ListInstalledPackagesRequest + 14, // 21: state.v1.PackageService.AcceptPackageAuthority:input_type -> state.v1.AcceptPackageAuthorityRequest + 16, // 22: state.v1.PackageService.RemoveInstalledPackage:input_type -> state.v1.RemoveInstalledPackageRequest + 18, // 23: state.v1.PackageService.UpdatePackage:input_type -> state.v1.UpdatePackageRequest + 20, // 24: state.v1.PackageService.ApprovePackageUpdate:input_type -> state.v1.ApprovePackageUpdateRequest + 22, // 25: state.v1.PackageService.RollbackPackage:input_type -> state.v1.RollbackPackageRequest + 24, // 26: state.v1.PackageService.SetPackageUpdatePolicy:input_type -> state.v1.SetPackageUpdatePolicyRequest + 4, // 27: state.v1.PackageService.InstallPackage:output_type -> state.v1.InstallPackageResponse + 7, // 28: state.v1.PackageService.ListCatalogue:output_type -> state.v1.ListCatalogueResponse + 9, // 29: state.v1.PackageService.InstallFromCatalogue:output_type -> state.v1.InstallFromCatalogueResponse + 11, // 30: state.v1.PackageService.GetInstalledPackage:output_type -> state.v1.GetInstalledPackageResponse + 13, // 31: state.v1.PackageService.ListInstalledPackages:output_type -> state.v1.ListInstalledPackagesResponse + 15, // 32: state.v1.PackageService.AcceptPackageAuthority:output_type -> state.v1.AcceptPackageAuthorityResponse + 17, // 33: state.v1.PackageService.RemoveInstalledPackage:output_type -> state.v1.RemoveInstalledPackageResponse + 19, // 34: state.v1.PackageService.UpdatePackage:output_type -> state.v1.UpdatePackageResponse + 21, // 35: state.v1.PackageService.ApprovePackageUpdate:output_type -> state.v1.ApprovePackageUpdateResponse + 23, // 36: state.v1.PackageService.RollbackPackage:output_type -> state.v1.RollbackPackageResponse + 25, // 37: state.v1.PackageService.SetPackageUpdatePolicy:output_type -> state.v1.SetPackageUpdatePolicyResponse + 27, // [27:38] is the sub-list for method output_type + 16, // [16:27] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_state_v1_package_proto_init() } +func file_state_v1_package_proto_init() { + if File_state_v1_package_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_package_proto_rawDesc), len(file_state_v1_package_proto_rawDesc)), + NumEnums: 0, + NumMessages: 26, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_package_proto_goTypes, + DependencyIndexes: file_state_v1_package_proto_depIdxs, + MessageInfos: file_state_v1_package_proto_msgTypes, + }.Build() + File_state_v1_package_proto = out.File + file_state_v1_package_proto_goTypes = nil + file_state_v1_package_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/package_grpc.pb.go b/internal/contracts/state/v1/package_grpc.pb.go new file mode 100644 index 000000000..7e18ffc1d --- /dev/null +++ b/internal/contracts/state/v1/package_grpc.pb.go @@ -0,0 +1,527 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/package.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 ( + PackageService_InstallPackage_FullMethodName = "/state.v1.PackageService/InstallPackage" + PackageService_ListCatalogue_FullMethodName = "/state.v1.PackageService/ListCatalogue" + PackageService_InstallFromCatalogue_FullMethodName = "/state.v1.PackageService/InstallFromCatalogue" + PackageService_GetInstalledPackage_FullMethodName = "/state.v1.PackageService/GetInstalledPackage" + PackageService_ListInstalledPackages_FullMethodName = "/state.v1.PackageService/ListInstalledPackages" + PackageService_AcceptPackageAuthority_FullMethodName = "/state.v1.PackageService/AcceptPackageAuthority" + PackageService_RemoveInstalledPackage_FullMethodName = "/state.v1.PackageService/RemoveInstalledPackage" + PackageService_UpdatePackage_FullMethodName = "/state.v1.PackageService/UpdatePackage" + PackageService_ApprovePackageUpdate_FullMethodName = "/state.v1.PackageService/ApprovePackageUpdate" + PackageService_RollbackPackage_FullMethodName = "/state.v1.PackageService/RollbackPackage" + PackageService_SetPackageUpdatePolicy_FullMethodName = "/state.v1.PackageService/SetPackageUpdatePolicy" +) + +// PackageServiceClient is the client API for PackageService 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. +// +// Installed Archie packages. Administrative until org-scoped principals land. +type PackageServiceClient interface { + InstallPackage(ctx context.Context, in *InstallPackageRequest, opts ...grpc.CallOption) (*InstallPackageResponse, error) + // ListCatalogue returns the packages the instance's verified catalogue + // offers; InstallFromCatalogue installs one by name at the digest it lists. + ListCatalogue(ctx context.Context, in *ListCatalogueRequest, opts ...grpc.CallOption) (*ListCatalogueResponse, error) + InstallFromCatalogue(ctx context.Context, in *InstallFromCatalogueRequest, opts ...grpc.CallOption) (*InstallFromCatalogueResponse, error) + GetInstalledPackage(ctx context.Context, in *GetInstalledPackageRequest, opts ...grpc.CallOption) (*GetInstalledPackageResponse, error) + ListInstalledPackages(ctx context.Context, in *ListInstalledPackagesRequest, opts ...grpc.CallOption) (*ListInstalledPackagesResponse, error) + // AcceptPackageAuthority records the operator's accepted authority against + // the pinned digest (the approve action; install is the create action). + // Administrative until org-scoped principals land. + AcceptPackageAuthority(ctx context.Context, in *AcceptPackageAuthorityRequest, opts ...grpc.CallOption) (*AcceptPackageAuthorityResponse, error) + RemoveInstalledPackage(ctx context.Context, in *RemoveInstalledPackageRequest, opts ...grpc.CallOption) (*RemoveInstalledPackageResponse, error) + // UpdatePackage moves a package to the digest the verified catalogue lists: + // a non-widening update applies, a widening one waits as pending. + // ApprovePackageUpdate applies the pending update and accepts its authority; + // RollbackPackage restores the previous digest and its accepted authority. + UpdatePackage(ctx context.Context, in *UpdatePackageRequest, opts ...grpc.CallOption) (*UpdatePackageResponse, error) + ApprovePackageUpdate(ctx context.Context, in *ApprovePackageUpdateRequest, opts ...grpc.CallOption) (*ApprovePackageUpdateResponse, error) + RollbackPackage(ctx context.Context, in *RollbackPackageRequest, opts ...grpc.CallOption) (*RollbackPackageResponse, error) + // SetPackageUpdatePolicy sets "manual" or "auto"; the State Store updates + // auto packages on a timer. + SetPackageUpdatePolicy(ctx context.Context, in *SetPackageUpdatePolicyRequest, opts ...grpc.CallOption) (*SetPackageUpdatePolicyResponse, error) +} + +type packageServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPackageServiceClient(cc grpc.ClientConnInterface) PackageServiceClient { + return &packageServiceClient{cc} +} + +func (c *packageServiceClient) InstallPackage(ctx context.Context, in *InstallPackageRequest, opts ...grpc.CallOption) (*InstallPackageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(InstallPackageResponse) + err := c.cc.Invoke(ctx, PackageService_InstallPackage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *packageServiceClient) ListCatalogue(ctx context.Context, in *ListCatalogueRequest, opts ...grpc.CallOption) (*ListCatalogueResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListCatalogueResponse) + err := c.cc.Invoke(ctx, PackageService_ListCatalogue_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *packageServiceClient) InstallFromCatalogue(ctx context.Context, in *InstallFromCatalogueRequest, opts ...grpc.CallOption) (*InstallFromCatalogueResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(InstallFromCatalogueResponse) + err := c.cc.Invoke(ctx, PackageService_InstallFromCatalogue_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *packageServiceClient) GetInstalledPackage(ctx context.Context, in *GetInstalledPackageRequest, opts ...grpc.CallOption) (*GetInstalledPackageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetInstalledPackageResponse) + err := c.cc.Invoke(ctx, PackageService_GetInstalledPackage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *packageServiceClient) ListInstalledPackages(ctx context.Context, in *ListInstalledPackagesRequest, opts ...grpc.CallOption) (*ListInstalledPackagesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListInstalledPackagesResponse) + err := c.cc.Invoke(ctx, PackageService_ListInstalledPackages_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *packageServiceClient) AcceptPackageAuthority(ctx context.Context, in *AcceptPackageAuthorityRequest, opts ...grpc.CallOption) (*AcceptPackageAuthorityResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AcceptPackageAuthorityResponse) + err := c.cc.Invoke(ctx, PackageService_AcceptPackageAuthority_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *packageServiceClient) RemoveInstalledPackage(ctx context.Context, in *RemoveInstalledPackageRequest, opts ...grpc.CallOption) (*RemoveInstalledPackageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RemoveInstalledPackageResponse) + err := c.cc.Invoke(ctx, PackageService_RemoveInstalledPackage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *packageServiceClient) UpdatePackage(ctx context.Context, in *UpdatePackageRequest, opts ...grpc.CallOption) (*UpdatePackageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdatePackageResponse) + err := c.cc.Invoke(ctx, PackageService_UpdatePackage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *packageServiceClient) ApprovePackageUpdate(ctx context.Context, in *ApprovePackageUpdateRequest, opts ...grpc.CallOption) (*ApprovePackageUpdateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ApprovePackageUpdateResponse) + err := c.cc.Invoke(ctx, PackageService_ApprovePackageUpdate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *packageServiceClient) RollbackPackage(ctx context.Context, in *RollbackPackageRequest, opts ...grpc.CallOption) (*RollbackPackageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RollbackPackageResponse) + err := c.cc.Invoke(ctx, PackageService_RollbackPackage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *packageServiceClient) SetPackageUpdatePolicy(ctx context.Context, in *SetPackageUpdatePolicyRequest, opts ...grpc.CallOption) (*SetPackageUpdatePolicyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetPackageUpdatePolicyResponse) + err := c.cc.Invoke(ctx, PackageService_SetPackageUpdatePolicy_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PackageServiceServer is the server API for PackageService service. +// All implementations must embed UnimplementedPackageServiceServer +// for forward compatibility. +// +// Installed Archie packages. Administrative until org-scoped principals land. +type PackageServiceServer interface { + InstallPackage(context.Context, *InstallPackageRequest) (*InstallPackageResponse, error) + // ListCatalogue returns the packages the instance's verified catalogue + // offers; InstallFromCatalogue installs one by name at the digest it lists. + ListCatalogue(context.Context, *ListCatalogueRequest) (*ListCatalogueResponse, error) + InstallFromCatalogue(context.Context, *InstallFromCatalogueRequest) (*InstallFromCatalogueResponse, error) + GetInstalledPackage(context.Context, *GetInstalledPackageRequest) (*GetInstalledPackageResponse, error) + ListInstalledPackages(context.Context, *ListInstalledPackagesRequest) (*ListInstalledPackagesResponse, error) + // AcceptPackageAuthority records the operator's accepted authority against + // the pinned digest (the approve action; install is the create action). + // Administrative until org-scoped principals land. + AcceptPackageAuthority(context.Context, *AcceptPackageAuthorityRequest) (*AcceptPackageAuthorityResponse, error) + RemoveInstalledPackage(context.Context, *RemoveInstalledPackageRequest) (*RemoveInstalledPackageResponse, error) + // UpdatePackage moves a package to the digest the verified catalogue lists: + // a non-widening update applies, a widening one waits as pending. + // ApprovePackageUpdate applies the pending update and accepts its authority; + // RollbackPackage restores the previous digest and its accepted authority. + UpdatePackage(context.Context, *UpdatePackageRequest) (*UpdatePackageResponse, error) + ApprovePackageUpdate(context.Context, *ApprovePackageUpdateRequest) (*ApprovePackageUpdateResponse, error) + RollbackPackage(context.Context, *RollbackPackageRequest) (*RollbackPackageResponse, error) + // SetPackageUpdatePolicy sets "manual" or "auto"; the State Store updates + // auto packages on a timer. + SetPackageUpdatePolicy(context.Context, *SetPackageUpdatePolicyRequest) (*SetPackageUpdatePolicyResponse, error) + mustEmbedUnimplementedPackageServiceServer() +} + +// UnimplementedPackageServiceServer 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 UnimplementedPackageServiceServer struct{} + +func (UnimplementedPackageServiceServer) InstallPackage(context.Context, *InstallPackageRequest) (*InstallPackageResponse, error) { + return nil, status.Error(codes.Unimplemented, "method InstallPackage not implemented") +} +func (UnimplementedPackageServiceServer) ListCatalogue(context.Context, *ListCatalogueRequest) (*ListCatalogueResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListCatalogue not implemented") +} +func (UnimplementedPackageServiceServer) InstallFromCatalogue(context.Context, *InstallFromCatalogueRequest) (*InstallFromCatalogueResponse, error) { + return nil, status.Error(codes.Unimplemented, "method InstallFromCatalogue not implemented") +} +func (UnimplementedPackageServiceServer) GetInstalledPackage(context.Context, *GetInstalledPackageRequest) (*GetInstalledPackageResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetInstalledPackage not implemented") +} +func (UnimplementedPackageServiceServer) ListInstalledPackages(context.Context, *ListInstalledPackagesRequest) (*ListInstalledPackagesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListInstalledPackages not implemented") +} +func (UnimplementedPackageServiceServer) AcceptPackageAuthority(context.Context, *AcceptPackageAuthorityRequest) (*AcceptPackageAuthorityResponse, error) { + return nil, status.Error(codes.Unimplemented, "method AcceptPackageAuthority not implemented") +} +func (UnimplementedPackageServiceServer) RemoveInstalledPackage(context.Context, *RemoveInstalledPackageRequest) (*RemoveInstalledPackageResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RemoveInstalledPackage not implemented") +} +func (UnimplementedPackageServiceServer) UpdatePackage(context.Context, *UpdatePackageRequest) (*UpdatePackageResponse, error) { + return nil, status.Error(codes.Unimplemented, "method UpdatePackage not implemented") +} +func (UnimplementedPackageServiceServer) ApprovePackageUpdate(context.Context, *ApprovePackageUpdateRequest) (*ApprovePackageUpdateResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ApprovePackageUpdate not implemented") +} +func (UnimplementedPackageServiceServer) RollbackPackage(context.Context, *RollbackPackageRequest) (*RollbackPackageResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RollbackPackage not implemented") +} +func (UnimplementedPackageServiceServer) SetPackageUpdatePolicy(context.Context, *SetPackageUpdatePolicyRequest) (*SetPackageUpdatePolicyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetPackageUpdatePolicy not implemented") +} +func (UnimplementedPackageServiceServer) mustEmbedUnimplementedPackageServiceServer() {} +func (UnimplementedPackageServiceServer) testEmbeddedByValue() {} + +// UnsafePackageServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PackageServiceServer will +// result in compilation errors. +type UnsafePackageServiceServer interface { + mustEmbedUnimplementedPackageServiceServer() +} + +func RegisterPackageServiceServer(s grpc.ServiceRegistrar, srv PackageServiceServer) { + // If the following call panics, it indicates UnimplementedPackageServiceServer 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(&PackageService_ServiceDesc, srv) +} + +func _PackageService_InstallPackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InstallPackageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PackageServiceServer).InstallPackage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PackageService_InstallPackage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).InstallPackage(ctx, req.(*InstallPackageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PackageService_ListCatalogue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListCatalogueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PackageServiceServer).ListCatalogue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PackageService_ListCatalogue_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).ListCatalogue(ctx, req.(*ListCatalogueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PackageService_InstallFromCatalogue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InstallFromCatalogueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PackageServiceServer).InstallFromCatalogue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PackageService_InstallFromCatalogue_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).InstallFromCatalogue(ctx, req.(*InstallFromCatalogueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PackageService_GetInstalledPackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetInstalledPackageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PackageServiceServer).GetInstalledPackage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PackageService_GetInstalledPackage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).GetInstalledPackage(ctx, req.(*GetInstalledPackageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PackageService_ListInstalledPackages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListInstalledPackagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PackageServiceServer).ListInstalledPackages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PackageService_ListInstalledPackages_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).ListInstalledPackages(ctx, req.(*ListInstalledPackagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PackageService_AcceptPackageAuthority_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AcceptPackageAuthorityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PackageServiceServer).AcceptPackageAuthority(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PackageService_AcceptPackageAuthority_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).AcceptPackageAuthority(ctx, req.(*AcceptPackageAuthorityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PackageService_RemoveInstalledPackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveInstalledPackageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PackageServiceServer).RemoveInstalledPackage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PackageService_RemoveInstalledPackage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).RemoveInstalledPackage(ctx, req.(*RemoveInstalledPackageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PackageService_UpdatePackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdatePackageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PackageServiceServer).UpdatePackage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PackageService_UpdatePackage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).UpdatePackage(ctx, req.(*UpdatePackageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PackageService_ApprovePackageUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApprovePackageUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PackageServiceServer).ApprovePackageUpdate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PackageService_ApprovePackageUpdate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).ApprovePackageUpdate(ctx, req.(*ApprovePackageUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PackageService_RollbackPackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RollbackPackageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PackageServiceServer).RollbackPackage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PackageService_RollbackPackage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).RollbackPackage(ctx, req.(*RollbackPackageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PackageService_SetPackageUpdatePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetPackageUpdatePolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PackageServiceServer).SetPackageUpdatePolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PackageService_SetPackageUpdatePolicy_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).SetPackageUpdatePolicy(ctx, req.(*SetPackageUpdatePolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PackageService_ServiceDesc is the grpc.ServiceDesc for PackageService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PackageService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.PackageService", + HandlerType: (*PackageServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "InstallPackage", + Handler: _PackageService_InstallPackage_Handler, + }, + { + MethodName: "ListCatalogue", + Handler: _PackageService_ListCatalogue_Handler, + }, + { + MethodName: "InstallFromCatalogue", + Handler: _PackageService_InstallFromCatalogue_Handler, + }, + { + MethodName: "GetInstalledPackage", + Handler: _PackageService_GetInstalledPackage_Handler, + }, + { + MethodName: "ListInstalledPackages", + Handler: _PackageService_ListInstalledPackages_Handler, + }, + { + MethodName: "AcceptPackageAuthority", + Handler: _PackageService_AcceptPackageAuthority_Handler, + }, + { + MethodName: "RemoveInstalledPackage", + Handler: _PackageService_RemoveInstalledPackage_Handler, + }, + { + MethodName: "UpdatePackage", + Handler: _PackageService_UpdatePackage_Handler, + }, + { + MethodName: "ApprovePackageUpdate", + Handler: _PackageService_ApprovePackageUpdate_Handler, + }, + { + MethodName: "RollbackPackage", + Handler: _PackageService_RollbackPackage_Handler, + }, + { + MethodName: "SetPackageUpdatePolicy", + Handler: _PackageService_SetPackageUpdatePolicy_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "state/v1/package.proto", +} diff --git a/internal/contracts/state/v1/review.pb.go b/internal/contracts/state/v1/review.pb.go new file mode 100644 index 000000000..7c3f04f2c --- /dev/null +++ b/internal/contracts/state/v1/review.pb.go @@ -0,0 +1,511 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/review.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RespondReviewGateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + FromStatus string `protobuf:"bytes,2,opt,name=from_status,json=fromStatus,proto3" json:"from_status,omitempty"` + // gate is the whole review_gate document the caller computed: the offer + // with the answer filled in. The store persists it unread. + Gate string `protobuf:"bytes,3,opt,name=gate,proto3" json:"gate,omitempty"` + // rereview increments rereview_rounds in the same write; an approve must + // pass false and bumps nothing. + Rereview bool `protobuf:"varint,4,opt,name=rereview,proto3" json:"rereview,omitempty"` + // cap is the domain's re-review bound (prreview.MaxRereviewRounds). It + // crosses so the guard is enforced where the row is locked rather than by + // the caller's stale read. + Cap int64 `protobuf:"varint,5,opt,name=cap,proto3" json:"cap,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RespondReviewGateRequest) Reset() { + *x = RespondReviewGateRequest{} + mi := &file_state_v1_review_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RespondReviewGateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RespondReviewGateRequest) ProtoMessage() {} + +func (x *RespondReviewGateRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_review_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RespondReviewGateRequest.ProtoReflect.Descriptor instead. +func (*RespondReviewGateRequest) Descriptor() ([]byte, []int) { + return file_state_v1_review_proto_rawDescGZIP(), []int{0} +} + +func (x *RespondReviewGateRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *RespondReviewGateRequest) GetFromStatus() string { + if x != nil { + return x.FromStatus + } + return "" +} + +func (x *RespondReviewGateRequest) GetGate() string { + if x != nil { + return x.Gate + } + return "" +} + +func (x *RespondReviewGateRequest) GetRereview() bool { + if x != nil { + return x.Rereview + } + return false +} + +func (x *RespondReviewGateRequest) GetCap() int64 { + if x != nil { + return x.Cap + } + return 0 +} + +type RespondReviewGateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RespondReviewGateResponse) Reset() { + *x = RespondReviewGateResponse{} + mi := &file_state_v1_review_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RespondReviewGateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RespondReviewGateResponse) ProtoMessage() {} + +func (x *RespondReviewGateResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_review_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RespondReviewGateResponse.ProtoReflect.Descriptor instead. +func (*RespondReviewGateResponse) Descriptor() ([]byte, []int) { + return file_state_v1_review_proto_rawDescGZIP(), []int{1} +} + +type BeginRemediationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Payload string `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BeginRemediationRequest) Reset() { + *x = BeginRemediationRequest{} + mi := &file_state_v1_review_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BeginRemediationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BeginRemediationRequest) ProtoMessage() {} + +func (x *BeginRemediationRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_review_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BeginRemediationRequest.ProtoReflect.Descriptor instead. +func (*BeginRemediationRequest) Descriptor() ([]byte, []int) { + return file_state_v1_review_proto_rawDescGZIP(), []int{2} +} + +func (x *BeginRemediationRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *BeginRemediationRequest) GetPayload() string { + if x != nil { + return x.Payload + } + return "" +} + +type BeginRemediationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BeginRemediationResponse) Reset() { + *x = BeginRemediationResponse{} + mi := &file_state_v1_review_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BeginRemediationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BeginRemediationResponse) ProtoMessage() {} + +func (x *BeginRemediationResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_review_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BeginRemediationResponse.ProtoReflect.Descriptor instead. +func (*BeginRemediationResponse) Descriptor() ([]byte, []int) { + return file_state_v1_review_proto_rawDescGZIP(), []int{3} +} + +// UpdateReviewPayloadRequest merges payload's comments into the unclaimed +// review unit with the same review id, active or pending. +type UpdateReviewPayloadRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Payload string `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateReviewPayloadRequest) Reset() { + *x = UpdateReviewPayloadRequest{} + mi := &file_state_v1_review_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateReviewPayloadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReviewPayloadRequest) ProtoMessage() {} + +func (x *UpdateReviewPayloadRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_review_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateReviewPayloadRequest.ProtoReflect.Descriptor instead. +func (*UpdateReviewPayloadRequest) Descriptor() ([]byte, []int) { + return file_state_v1_review_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateReviewPayloadRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *UpdateReviewPayloadRequest) GetPayload() string { + if x != nil { + return x.Payload + } + return "" +} + +type UpdateReviewPayloadResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateReviewPayloadResponse) Reset() { + *x = UpdateReviewPayloadResponse{} + mi := &file_state_v1_review_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateReviewPayloadResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReviewPayloadResponse) ProtoMessage() {} + +func (x *UpdateReviewPayloadResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_review_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateReviewPayloadResponse.ProtoReflect.Descriptor instead. +func (*UpdateReviewPayloadResponse) Descriptor() ([]byte, []int) { + return file_state_v1_review_proto_rawDescGZIP(), []int{5} +} + +type SetReviewCursorsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + ReviewCursor int64 `protobuf:"varint,2,opt,name=review_cursor,json=reviewCursor,proto3" json:"review_cursor,omitempty"` + CommentCursor int64 `protobuf:"varint,3,opt,name=comment_cursor,json=commentCursor,proto3" json:"comment_cursor,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetReviewCursorsRequest) Reset() { + *x = SetReviewCursorsRequest{} + mi := &file_state_v1_review_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetReviewCursorsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetReviewCursorsRequest) ProtoMessage() {} + +func (x *SetReviewCursorsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_review_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetReviewCursorsRequest.ProtoReflect.Descriptor instead. +func (*SetReviewCursorsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_review_proto_rawDescGZIP(), []int{6} +} + +func (x *SetReviewCursorsRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *SetReviewCursorsRequest) GetReviewCursor() int64 { + if x != nil { + return x.ReviewCursor + } + return 0 +} + +func (x *SetReviewCursorsRequest) GetCommentCursor() int64 { + if x != nil { + return x.CommentCursor + } + return 0 +} + +type SetReviewCursorsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetReviewCursorsResponse) Reset() { + *x = SetReviewCursorsResponse{} + mi := &file_state_v1_review_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetReviewCursorsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetReviewCursorsResponse) ProtoMessage() {} + +func (x *SetReviewCursorsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_review_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetReviewCursorsResponse.ProtoReflect.Descriptor instead. +func (*SetReviewCursorsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_review_proto_rawDescGZIP(), []int{7} +} + +var File_state_v1_review_proto protoreflect.FileDescriptor + +const file_state_v1_review_proto_rawDesc = "" + + "\n" + + "\x15state/v1/review.proto\x12\bstate.v1\"\x96\x01\n" + + "\x18RespondReviewGateRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x1f\n" + + "\vfrom_status\x18\x02 \x01(\tR\n" + + "fromStatus\x12\x12\n" + + "\x04gate\x18\x03 \x01(\tR\x04gate\x12\x1a\n" + + "\brereview\x18\x04 \x01(\bR\brereview\x12\x10\n" + + "\x03cap\x18\x05 \x01(\x03R\x03cap\"\x1b\n" + + "\x19RespondReviewGateResponse\"L\n" + + "\x17BeginRemediationRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x18\n" + + "\apayload\x18\x02 \x01(\tR\apayload\"\x1a\n" + + "\x18BeginRemediationResponse\"O\n" + + "\x1aUpdateReviewPayloadRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x18\n" + + "\apayload\x18\x02 \x01(\tR\apayload\"\x1d\n" + + "\x1bUpdateReviewPayloadResponse\"~\n" + + "\x17SetReviewCursorsRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12#\n" + + "\rreview_cursor\x18\x02 \x01(\x03R\freviewCursor\x12%\n" + + "\x0ecomment_cursor\x18\x03 \x01(\x03R\rcommentCursor\"\x1a\n" + + "\x18SetReviewCursorsResponse2\x87\x03\n" + + "\rReviewService\x12\\\n" + + "\x11RespondReviewGate\x12\".state.v1.RespondReviewGateRequest\x1a#.state.v1.RespondReviewGateResponse\x12Y\n" + + "\x10BeginRemediation\x12!.state.v1.BeginRemediationRequest\x1a\".state.v1.BeginRemediationResponse\x12b\n" + + "\x13UpdateReviewPayload\x12$.state.v1.UpdateReviewPayloadRequest\x1a%.state.v1.UpdateReviewPayloadResponse\x12Y\n" + + "\x10SetReviewCursors\x12!.state.v1.SetReviewCursorsRequest\x1a\".state.v1.SetReviewCursorsResponseB\xa5\x01\n" + + "\fcom.state.v1B\vReviewProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_review_proto_rawDescOnce sync.Once + file_state_v1_review_proto_rawDescData []byte +) + +func file_state_v1_review_proto_rawDescGZIP() []byte { + file_state_v1_review_proto_rawDescOnce.Do(func() { + file_state_v1_review_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_review_proto_rawDesc), len(file_state_v1_review_proto_rawDesc))) + }) + return file_state_v1_review_proto_rawDescData +} + +var file_state_v1_review_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_state_v1_review_proto_goTypes = []any{ + (*RespondReviewGateRequest)(nil), // 0: state.v1.RespondReviewGateRequest + (*RespondReviewGateResponse)(nil), // 1: state.v1.RespondReviewGateResponse + (*BeginRemediationRequest)(nil), // 2: state.v1.BeginRemediationRequest + (*BeginRemediationResponse)(nil), // 3: state.v1.BeginRemediationResponse + (*UpdateReviewPayloadRequest)(nil), // 4: state.v1.UpdateReviewPayloadRequest + (*UpdateReviewPayloadResponse)(nil), // 5: state.v1.UpdateReviewPayloadResponse + (*SetReviewCursorsRequest)(nil), // 6: state.v1.SetReviewCursorsRequest + (*SetReviewCursorsResponse)(nil), // 7: state.v1.SetReviewCursorsResponse +} +var file_state_v1_review_proto_depIdxs = []int32{ + 0, // 0: state.v1.ReviewService.RespondReviewGate:input_type -> state.v1.RespondReviewGateRequest + 2, // 1: state.v1.ReviewService.BeginRemediation:input_type -> state.v1.BeginRemediationRequest + 4, // 2: state.v1.ReviewService.UpdateReviewPayload:input_type -> state.v1.UpdateReviewPayloadRequest + 6, // 3: state.v1.ReviewService.SetReviewCursors:input_type -> state.v1.SetReviewCursorsRequest + 1, // 4: state.v1.ReviewService.RespondReviewGate:output_type -> state.v1.RespondReviewGateResponse + 3, // 5: state.v1.ReviewService.BeginRemediation:output_type -> state.v1.BeginRemediationResponse + 5, // 6: state.v1.ReviewService.UpdateReviewPayload:output_type -> state.v1.UpdateReviewPayloadResponse + 7, // 7: state.v1.ReviewService.SetReviewCursors:output_type -> state.v1.SetReviewCursorsResponse + 4, // [4:8] is the sub-list for method output_type + 0, // [0:4] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_state_v1_review_proto_init() } +func file_state_v1_review_proto_init() { + if File_state_v1_review_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_review_proto_rawDesc), len(file_state_v1_review_proto_rawDesc)), + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_review_proto_goTypes, + DependencyIndexes: file_state_v1_review_proto_depIdxs, + MessageInfos: file_state_v1_review_proto_msgTypes, + }.Build() + File_state_v1_review_proto = out.File + file_state_v1_review_proto_goTypes = nil + file_state_v1_review_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/review_grpc.pb.go b/internal/contracts/state/v1/review_grpc.pb.go new file mode 100644 index 000000000..51a238dff --- /dev/null +++ b/internal/contracts/state/v1/review_grpc.pb.go @@ -0,0 +1,247 @@ +// 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", +} diff --git a/internal/contracts/state/v1/source.pb.go b/internal/contracts/state/v1/source.pb.go new file mode 100644 index 000000000..83df7a10a --- /dev/null +++ b/internal/contracts/state/v1/source.pb.go @@ -0,0 +1,975 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/source.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Source mirrors internal/domain/source.Source. +type Source struct { + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Signing string `protobuf:"bytes,2,opt,name=signing,proto3" json:"signing,omitempty"` + Secret string `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` + DeliveryHeader string `protobuf:"bytes,7,opt,name=delivery_header,json=deliveryHeader,proto3" json:"delivery_header,omitempty"` + // org_id is the source's owning org, read-only here. workspace_id is the + // org's workspace it is created in, the default one when empty. + OrgId string `protobuf:"bytes,8,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + WorkspaceId string `protobuf:"bytes,9,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Source) Reset() { + *x = Source{} + mi := &file_state_v1_source_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Source) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Source) ProtoMessage() {} + +func (x *Source) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Source.ProtoReflect.Descriptor instead. +func (*Source) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{0} +} + +func (x *Source) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *Source) GetSigning() string { + if x != nil { + return x.Signing + } + return "" +} + +func (x *Source) GetSecret() string { + if x != nil { + return x.Secret + } + return "" +} + +func (x *Source) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Source) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *Source) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Source) GetDeliveryHeader() string { + if x != nil { + return x.DeliveryHeader + } + return "" +} + +func (x *Source) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *Source) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +type SetSourceNameRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetSourceNameRequest) Reset() { + *x = SetSourceNameRequest{} + mi := &file_state_v1_source_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetSourceNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSourceNameRequest) ProtoMessage() {} + +func (x *SetSourceNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSourceNameRequest.ProtoReflect.Descriptor instead. +func (*SetSourceNameRequest) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{1} +} + +func (x *SetSourceNameRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *SetSourceNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type SetSourceNameResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetSourceNameResponse) Reset() { + *x = SetSourceNameResponse{} + mi := &file_state_v1_source_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetSourceNameResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSourceNameResponse) ProtoMessage() {} + +func (x *SetSourceNameResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSourceNameResponse.ProtoReflect.Descriptor instead. +func (*SetSourceNameResponse) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{2} +} + +type SetSourceDeliveryHeaderRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Header string `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetSourceDeliveryHeaderRequest) Reset() { + *x = SetSourceDeliveryHeaderRequest{} + mi := &file_state_v1_source_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetSourceDeliveryHeaderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSourceDeliveryHeaderRequest) ProtoMessage() {} + +func (x *SetSourceDeliveryHeaderRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSourceDeliveryHeaderRequest.ProtoReflect.Descriptor instead. +func (*SetSourceDeliveryHeaderRequest) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{3} +} + +func (x *SetSourceDeliveryHeaderRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *SetSourceDeliveryHeaderRequest) GetHeader() string { + if x != nil { + return x.Header + } + return "" +} + +type SetSourceDeliveryHeaderResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetSourceDeliveryHeaderResponse) Reset() { + *x = SetSourceDeliveryHeaderResponse{} + mi := &file_state_v1_source_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetSourceDeliveryHeaderResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSourceDeliveryHeaderResponse) ProtoMessage() {} + +func (x *SetSourceDeliveryHeaderResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSourceDeliveryHeaderResponse.ProtoReflect.Descriptor instead. +func (*SetSourceDeliveryHeaderResponse) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{4} +} + +type DeleteSourceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteSourceRequest) Reset() { + *x = DeleteSourceRequest{} + mi := &file_state_v1_source_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteSourceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSourceRequest) ProtoMessage() {} + +func (x *DeleteSourceRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSourceRequest.ProtoReflect.Descriptor instead. +func (*DeleteSourceRequest) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteSourceRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type DeleteSourceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteSourceResponse) Reset() { + *x = DeleteSourceResponse{} + mi := &file_state_v1_source_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteSourceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSourceResponse) ProtoMessage() {} + +func (x *DeleteSourceResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSourceResponse.ProtoReflect.Descriptor instead. +func (*DeleteSourceResponse) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{6} +} + +type InsertSourceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Source *Source `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InsertSourceRequest) Reset() { + *x = InsertSourceRequest{} + mi := &file_state_v1_source_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InsertSourceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InsertSourceRequest) ProtoMessage() {} + +func (x *InsertSourceRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InsertSourceRequest.ProtoReflect.Descriptor instead. +func (*InsertSourceRequest) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{7} +} + +func (x *InsertSourceRequest) GetSource() *Source { + if x != nil { + return x.Source + } + return nil +} + +type InsertSourceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InsertSourceResponse) Reset() { + *x = InsertSourceResponse{} + mi := &file_state_v1_source_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InsertSourceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InsertSourceResponse) ProtoMessage() {} + +func (x *InsertSourceResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InsertSourceResponse.ProtoReflect.Descriptor instead. +func (*InsertSourceResponse) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{8} +} + +type GetSourceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSourceRequest) Reset() { + *x = GetSourceRequest{} + mi := &file_state_v1_source_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSourceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSourceRequest) ProtoMessage() {} + +func (x *GetSourceRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSourceRequest.ProtoReflect.Descriptor instead. +func (*GetSourceRequest) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{9} +} + +func (x *GetSourceRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type GetSourceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Source *Source `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSourceResponse) Reset() { + *x = GetSourceResponse{} + mi := &file_state_v1_source_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSourceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSourceResponse) ProtoMessage() {} + +func (x *GetSourceResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSourceResponse.ProtoReflect.Descriptor instead. +func (*GetSourceResponse) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{10} +} + +func (x *GetSourceResponse) GetSource() *Source { + if x != nil { + return x.Source + } + return nil +} + +func (x *GetSourceResponse) GetFound() bool { + if x != nil { + return x.Found + } + return false +} + +type ListSourcesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListSourcesRequest) Reset() { + *x = ListSourcesRequest{} + mi := &file_state_v1_source_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListSourcesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSourcesRequest) ProtoMessage() {} + +func (x *ListSourcesRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSourcesRequest.ProtoReflect.Descriptor instead. +func (*ListSourcesRequest) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{11} +} + +type ListSourcesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sources []*Source `protobuf:"bytes,1,rep,name=sources,proto3" json:"sources,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListSourcesResponse) Reset() { + *x = ListSourcesResponse{} + mi := &file_state_v1_source_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListSourcesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSourcesResponse) ProtoMessage() {} + +func (x *ListSourcesResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSourcesResponse.ProtoReflect.Descriptor instead. +func (*ListSourcesResponse) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{12} +} + +func (x *ListSourcesResponse) GetSources() []*Source { + if x != nil { + return x.Sources + } + return nil +} + +type SetSourceSigningRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetSourceSigningRequest) Reset() { + *x = SetSourceSigningRequest{} + mi := &file_state_v1_source_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetSourceSigningRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSourceSigningRequest) ProtoMessage() {} + +func (x *SetSourceSigningRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSourceSigningRequest.ProtoReflect.Descriptor instead. +func (*SetSourceSigningRequest) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{13} +} + +func (x *SetSourceSigningRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *SetSourceSigningRequest) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *SetSourceSigningRequest) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +type SetSourceSigningResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetSourceSigningResponse) Reset() { + *x = SetSourceSigningResponse{} + mi := &file_state_v1_source_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetSourceSigningResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSourceSigningResponse) ProtoMessage() {} + +func (x *SetSourceSigningResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSourceSigningResponse.ProtoReflect.Descriptor instead. +func (*SetSourceSigningResponse) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{14} +} + +type SetSourceSecretRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetSourceSecretRequest) Reset() { + *x = SetSourceSecretRequest{} + mi := &file_state_v1_source_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetSourceSecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSourceSecretRequest) ProtoMessage() {} + +func (x *SetSourceSecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSourceSecretRequest.ProtoReflect.Descriptor instead. +func (*SetSourceSecretRequest) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{15} +} + +func (x *SetSourceSecretRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *SetSourceSecretRequest) GetSecret() string { + if x != nil { + return x.Secret + } + return "" +} + +type SetSourceSecretResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetSourceSecretResponse) Reset() { + *x = SetSourceSecretResponse{} + mi := &file_state_v1_source_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetSourceSecretResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSourceSecretResponse) ProtoMessage() {} + +func (x *SetSourceSecretResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_source_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSourceSecretResponse.ProtoReflect.Descriptor instead. +func (*SetSourceSecretResponse) Descriptor() ([]byte, []int) { + return file_state_v1_source_proto_rawDescGZIP(), []int{16} +} + +var File_state_v1_source_proto protoreflect.FileDescriptor + +const file_state_v1_source_proto_rawDesc = "" + + "\n" + + "\x15state/v1/source.proto\x12\bstate.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbb\x02\n" + + "\x06Source\x12\x12\n" + + "\x04path\x18\x01 \x01(\tR\x04path\x12\x18\n" + + "\asigning\x18\x02 \x01(\tR\asigning\x12\x16\n" + + "\x06secret\x18\x03 \x01(\tR\x06secret\x129\n" + + "\n" + + "created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x12\n" + + "\x04name\x18\x06 \x01(\tR\x04name\x12'\n" + + "\x0fdelivery_header\x18\a \x01(\tR\x0edeliveryHeader\x12\x15\n" + + "\x06org_id\x18\b \x01(\tR\x05orgId\x12!\n" + + "\fworkspace_id\x18\t \x01(\tR\vworkspaceId\">\n" + + "\x14SetSourceNameRequest\x12\x12\n" + + "\x04path\x18\x01 \x01(\tR\x04path\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\"\x17\n" + + "\x15SetSourceNameResponse\"L\n" + + "\x1eSetSourceDeliveryHeaderRequest\x12\x12\n" + + "\x04path\x18\x01 \x01(\tR\x04path\x12\x16\n" + + "\x06header\x18\x02 \x01(\tR\x06header\"!\n" + + "\x1fSetSourceDeliveryHeaderResponse\")\n" + + "\x13DeleteSourceRequest\x12\x12\n" + + "\x04path\x18\x01 \x01(\tR\x04path\"\x16\n" + + "\x14DeleteSourceResponse\"?\n" + + "\x13InsertSourceRequest\x12(\n" + + "\x06source\x18\x01 \x01(\v2\x10.state.v1.SourceR\x06source\"\x16\n" + + "\x14InsertSourceResponse\"&\n" + + "\x10GetSourceRequest\x12\x12\n" + + "\x04path\x18\x01 \x01(\tR\x04path\"S\n" + + "\x11GetSourceResponse\x12(\n" + + "\x06source\x18\x01 \x01(\v2\x10.state.v1.SourceR\x06source\x12\x14\n" + + "\x05found\x18\x02 \x01(\bR\x05found\"\x14\n" + + "\x12ListSourcesRequest\"A\n" + + "\x13ListSourcesResponse\x12*\n" + + "\asources\x18\x01 \x03(\v2\x10.state.v1.SourceR\asources\"Q\n" + + "\x17SetSourceSigningRequest\x12\x12\n" + + "\x04path\x18\x01 \x01(\tR\x04path\x12\x12\n" + + "\x04from\x18\x02 \x01(\tR\x04from\x12\x0e\n" + + "\x02to\x18\x03 \x01(\tR\x02to\"\x1a\n" + + "\x18SetSourceSigningResponse\"D\n" + + "\x16SetSourceSecretRequest\x12\x12\n" + + "\x04path\x18\x01 \x01(\tR\x04path\x12\x16\n" + + "\x06secret\x18\x02 \x01(\tR\x06secret\"\x19\n" + + "\x17SetSourceSecretResponse2\xb4\x05\n" + + "\rSourceService\x12M\n" + + "\fInsertSource\x12\x1d.state.v1.InsertSourceRequest\x1a\x1e.state.v1.InsertSourceResponse\x12D\n" + + "\tGetSource\x12\x1a.state.v1.GetSourceRequest\x1a\x1b.state.v1.GetSourceResponse\x12J\n" + + "\vListSources\x12\x1c.state.v1.ListSourcesRequest\x1a\x1d.state.v1.ListSourcesResponse\x12Y\n" + + "\x10SetSourceSigning\x12!.state.v1.SetSourceSigningRequest\x1a\".state.v1.SetSourceSigningResponse\x12V\n" + + "\x0fSetSourceSecret\x12 .state.v1.SetSourceSecretRequest\x1a!.state.v1.SetSourceSecretResponse\x12P\n" + + "\rSetSourceName\x12\x1e.state.v1.SetSourceNameRequest\x1a\x1f.state.v1.SetSourceNameResponse\x12n\n" + + "\x17SetSourceDeliveryHeader\x12(.state.v1.SetSourceDeliveryHeaderRequest\x1a).state.v1.SetSourceDeliveryHeaderResponse\x12M\n" + + "\fDeleteSource\x12\x1d.state.v1.DeleteSourceRequest\x1a\x1e.state.v1.DeleteSourceResponseB\xa5\x01\n" + + "\fcom.state.v1B\vSourceProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_source_proto_rawDescOnce sync.Once + file_state_v1_source_proto_rawDescData []byte +) + +func file_state_v1_source_proto_rawDescGZIP() []byte { + file_state_v1_source_proto_rawDescOnce.Do(func() { + file_state_v1_source_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_source_proto_rawDesc), len(file_state_v1_source_proto_rawDesc))) + }) + return file_state_v1_source_proto_rawDescData +} + +var file_state_v1_source_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_state_v1_source_proto_goTypes = []any{ + (*Source)(nil), // 0: state.v1.Source + (*SetSourceNameRequest)(nil), // 1: state.v1.SetSourceNameRequest + (*SetSourceNameResponse)(nil), // 2: state.v1.SetSourceNameResponse + (*SetSourceDeliveryHeaderRequest)(nil), // 3: state.v1.SetSourceDeliveryHeaderRequest + (*SetSourceDeliveryHeaderResponse)(nil), // 4: state.v1.SetSourceDeliveryHeaderResponse + (*DeleteSourceRequest)(nil), // 5: state.v1.DeleteSourceRequest + (*DeleteSourceResponse)(nil), // 6: state.v1.DeleteSourceResponse + (*InsertSourceRequest)(nil), // 7: state.v1.InsertSourceRequest + (*InsertSourceResponse)(nil), // 8: state.v1.InsertSourceResponse + (*GetSourceRequest)(nil), // 9: state.v1.GetSourceRequest + (*GetSourceResponse)(nil), // 10: state.v1.GetSourceResponse + (*ListSourcesRequest)(nil), // 11: state.v1.ListSourcesRequest + (*ListSourcesResponse)(nil), // 12: state.v1.ListSourcesResponse + (*SetSourceSigningRequest)(nil), // 13: state.v1.SetSourceSigningRequest + (*SetSourceSigningResponse)(nil), // 14: state.v1.SetSourceSigningResponse + (*SetSourceSecretRequest)(nil), // 15: state.v1.SetSourceSecretRequest + (*SetSourceSecretResponse)(nil), // 16: state.v1.SetSourceSecretResponse + (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp +} +var file_state_v1_source_proto_depIdxs = []int32{ + 17, // 0: state.v1.Source.created_at:type_name -> google.protobuf.Timestamp + 17, // 1: state.v1.Source.updated_at:type_name -> google.protobuf.Timestamp + 0, // 2: state.v1.InsertSourceRequest.source:type_name -> state.v1.Source + 0, // 3: state.v1.GetSourceResponse.source:type_name -> state.v1.Source + 0, // 4: state.v1.ListSourcesResponse.sources:type_name -> state.v1.Source + 7, // 5: state.v1.SourceService.InsertSource:input_type -> state.v1.InsertSourceRequest + 9, // 6: state.v1.SourceService.GetSource:input_type -> state.v1.GetSourceRequest + 11, // 7: state.v1.SourceService.ListSources:input_type -> state.v1.ListSourcesRequest + 13, // 8: state.v1.SourceService.SetSourceSigning:input_type -> state.v1.SetSourceSigningRequest + 15, // 9: state.v1.SourceService.SetSourceSecret:input_type -> state.v1.SetSourceSecretRequest + 1, // 10: state.v1.SourceService.SetSourceName:input_type -> state.v1.SetSourceNameRequest + 3, // 11: state.v1.SourceService.SetSourceDeliveryHeader:input_type -> state.v1.SetSourceDeliveryHeaderRequest + 5, // 12: state.v1.SourceService.DeleteSource:input_type -> state.v1.DeleteSourceRequest + 8, // 13: state.v1.SourceService.InsertSource:output_type -> state.v1.InsertSourceResponse + 10, // 14: state.v1.SourceService.GetSource:output_type -> state.v1.GetSourceResponse + 12, // 15: state.v1.SourceService.ListSources:output_type -> state.v1.ListSourcesResponse + 14, // 16: state.v1.SourceService.SetSourceSigning:output_type -> state.v1.SetSourceSigningResponse + 16, // 17: state.v1.SourceService.SetSourceSecret:output_type -> state.v1.SetSourceSecretResponse + 2, // 18: state.v1.SourceService.SetSourceName:output_type -> state.v1.SetSourceNameResponse + 4, // 19: state.v1.SourceService.SetSourceDeliveryHeader:output_type -> state.v1.SetSourceDeliveryHeaderResponse + 6, // 20: state.v1.SourceService.DeleteSource:output_type -> state.v1.DeleteSourceResponse + 13, // [13:21] is the sub-list for method output_type + 5, // [5:13] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_state_v1_source_proto_init() } +func file_state_v1_source_proto_init() { + if File_state_v1_source_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_source_proto_rawDesc), len(file_state_v1_source_proto_rawDesc)), + NumEnums: 0, + NumMessages: 17, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_source_proto_goTypes, + DependencyIndexes: file_state_v1_source_proto_depIdxs, + MessageInfos: file_state_v1_source_proto_msgTypes, + }.Build() + File_state_v1_source_proto = out.File + file_state_v1_source_proto_goTypes = nil + file_state_v1_source_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/source_grpc.pb.go b/internal/contracts/state/v1/source_grpc.pb.go new file mode 100644 index 000000000..698604777 --- /dev/null +++ b/internal/contracts/state/v1/source_grpc.pb.go @@ -0,0 +1,393 @@ +// 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", +} diff --git a/internal/contracts/state/v1/state.pb.go b/internal/contracts/state/v1/state.pb.go deleted file mode 100644 index 69a7088da..000000000 --- a/internal/contracts/state/v1/state.pb.go +++ /dev/null @@ -1,22005 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc (unknown) -// source: state/v1/state.proto - -package statev1 - -import ( - v1 "github.com/samcharles93/archie-core/internal/contracts/logging/v1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type RegisterTaskGrantRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` - LifetimeSeconds int64 `protobuf:"varint,3,opt,name=lifetime_seconds,json=lifetimeSeconds,proto3" json:"lifetime_seconds,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RegisterTaskGrantRequest) Reset() { - *x = RegisterTaskGrantRequest{} - mi := &file_state_v1_state_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RegisterTaskGrantRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterTaskGrantRequest) ProtoMessage() {} - -func (x *RegisterTaskGrantRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegisterTaskGrantRequest.ProtoReflect.Descriptor instead. -func (*RegisterTaskGrantRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{0} -} - -func (x *RegisterTaskGrantRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *RegisterTaskGrantRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *RegisterTaskGrantRequest) GetLifetimeSeconds() int64 { - if x != nil { - return x.LifetimeSeconds - } - return 0 -} - -type RegisterTaskGrantResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RegisterTaskGrantResponse) Reset() { - *x = RegisterTaskGrantResponse{} - mi := &file_state_v1_state_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RegisterTaskGrantResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterTaskGrantResponse) ProtoMessage() {} - -func (x *RegisterTaskGrantResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegisterTaskGrantResponse.ProtoReflect.Descriptor instead. -func (*RegisterTaskGrantResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{1} -} - -type RevokeTaskGrantRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RevokeTaskGrantRequest) Reset() { - *x = RevokeTaskGrantRequest{} - mi := &file_state_v1_state_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RevokeTaskGrantRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RevokeTaskGrantRequest) ProtoMessage() {} - -func (x *RevokeTaskGrantRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RevokeTaskGrantRequest.ProtoReflect.Descriptor instead. -func (*RevokeTaskGrantRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{2} -} - -func (x *RevokeTaskGrantRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -type RevokeTaskGrantResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RevokeTaskGrantResponse) Reset() { - *x = RevokeTaskGrantResponse{} - mi := &file_state_v1_state_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RevokeTaskGrantResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RevokeTaskGrantResponse) ProtoMessage() {} - -func (x *RevokeTaskGrantResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RevokeTaskGrantResponse.ProtoReflect.Descriptor instead. -func (*RevokeTaskGrantResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{3} -} - -// ResolveTaskGrantRequest names a run credential; the response is the task -// it was issued for. -type ResolveTaskGrantRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ResolveTaskGrantRequest) Reset() { - *x = ResolveTaskGrantRequest{} - mi := &file_state_v1_state_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ResolveTaskGrantRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResolveTaskGrantRequest) ProtoMessage() {} - -func (x *ResolveTaskGrantRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResolveTaskGrantRequest.ProtoReflect.Descriptor instead. -func (*ResolveTaskGrantRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{4} -} - -func (x *ResolveTaskGrantRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -type ResolveTaskGrantResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - // Canonical execution identity; empty names the instance root RPC route. - ExecutionIdentity string `protobuf:"bytes,2,opt,name=execution_identity,json=executionIdentity,proto3" json:"execution_identity,omitempty"` - // Canonical principal, including the instance root. - PrincipalId string `protobuf:"bytes,3,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ResolveTaskGrantResponse) Reset() { - *x = ResolveTaskGrantResponse{} - mi := &file_state_v1_state_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ResolveTaskGrantResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResolveTaskGrantResponse) ProtoMessage() {} - -func (x *ResolveTaskGrantResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResolveTaskGrantResponse.ProtoReflect.Descriptor instead. -func (*ResolveTaskGrantResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{5} -} - -func (x *ResolveTaskGrantResponse) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *ResolveTaskGrantResponse) GetExecutionIdentity() string { - if x != nil { - return x.ExecutionIdentity - } - return "" -} - -func (x *ResolveTaskGrantResponse) GetPrincipalId() string { - if x != nil { - return x.PrincipalId - } - return "" -} - -type Identity struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` - DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Lifecycle string `protobuf:"bytes,4,opt,name=lifecycle,proto3" json:"lifecycle,omitempty"` - Version int64 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Identity) Reset() { - *x = Identity{} - mi := &file_state_v1_state_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Identity) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Identity) ProtoMessage() {} - -func (x *Identity) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Identity.ProtoReflect.Descriptor instead. -func (*Identity) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{6} -} - -func (x *Identity) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Identity) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -func (x *Identity) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Identity) GetLifecycle() string { - if x != nil { - return x.Lifecycle - } - return "" -} - -func (x *Identity) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *Identity) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Identity) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type IdentityAudit struct { - state protoimpl.MessageState `protogen:"open.v1"` - ActorId string `protobuf:"bytes,1,opt,name=actor_id,json=actorId,proto3" json:"actor_id,omitempty"` - Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` - RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IdentityAudit) Reset() { - *x = IdentityAudit{} - mi := &file_state_v1_state_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IdentityAudit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IdentityAudit) ProtoMessage() {} - -func (x *IdentityAudit) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IdentityAudit.ProtoReflect.Descriptor instead. -func (*IdentityAudit) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{7} -} - -func (x *IdentityAudit) GetActorId() string { - if x != nil { - return x.ActorId - } - return "" -} - -func (x *IdentityAudit) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -func (x *IdentityAudit) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -type ListIdentitiesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListIdentitiesRequest) Reset() { - *x = ListIdentitiesRequest{} - mi := &file_state_v1_state_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListIdentitiesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListIdentitiesRequest) ProtoMessage() {} - -func (x *ListIdentitiesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListIdentitiesRequest.ProtoReflect.Descriptor instead. -func (*ListIdentitiesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{8} -} - -type ListIdentitiesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identities []*Identity `protobuf:"bytes,1,rep,name=identities,proto3" json:"identities,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListIdentitiesResponse) Reset() { - *x = ListIdentitiesResponse{} - mi := &file_state_v1_state_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListIdentitiesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListIdentitiesResponse) ProtoMessage() {} - -func (x *ListIdentitiesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListIdentitiesResponse.ProtoReflect.Descriptor instead. -func (*ListIdentitiesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{9} -} - -func (x *ListIdentitiesResponse) GetIdentities() []*Identity { - if x != nil { - return x.Identities - } - return nil -} - -type GetIdentityRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetIdentityRequest) Reset() { - *x = GetIdentityRequest{} - mi := &file_state_v1_state_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetIdentityRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetIdentityRequest) ProtoMessage() {} - -func (x *GetIdentityRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetIdentityRequest.ProtoReflect.Descriptor instead. -func (*GetIdentityRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{10} -} - -func (x *GetIdentityRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetIdentityResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetIdentityResponse) Reset() { - *x = GetIdentityResponse{} - mi := &file_state_v1_state_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetIdentityResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetIdentityResponse) ProtoMessage() {} - -func (x *GetIdentityResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetIdentityResponse.ProtoReflect.Descriptor instead. -func (*GetIdentityResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{11} -} - -func (x *GetIdentityResponse) GetIdentity() *Identity { - if x != nil { - return x.Identity - } - return nil -} - -type CreateIdentityRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` - DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Audit *IdentityAudit `protobuf:"bytes,4,opt,name=audit,proto3" json:"audit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateIdentityRequest) Reset() { - *x = CreateIdentityRequest{} - mi := &file_state_v1_state_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateIdentityRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateIdentityRequest) ProtoMessage() {} - -func (x *CreateIdentityRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateIdentityRequest.ProtoReflect.Descriptor instead. -func (*CreateIdentityRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{12} -} - -func (x *CreateIdentityRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *CreateIdentityRequest) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -func (x *CreateIdentityRequest) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *CreateIdentityRequest) GetAudit() *IdentityAudit { - if x != nil { - return x.Audit - } - return nil -} - -type RenameIdentityRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ExpectedVersion int64 `protobuf:"varint,2,opt,name=expected_version,json=expectedVersion,proto3" json:"expected_version,omitempty"` - DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Audit *IdentityAudit `protobuf:"bytes,4,opt,name=audit,proto3" json:"audit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RenameIdentityRequest) Reset() { - *x = RenameIdentityRequest{} - mi := &file_state_v1_state_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RenameIdentityRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RenameIdentityRequest) ProtoMessage() {} - -func (x *RenameIdentityRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RenameIdentityRequest.ProtoReflect.Descriptor instead. -func (*RenameIdentityRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{13} -} - -func (x *RenameIdentityRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *RenameIdentityRequest) GetExpectedVersion() int64 { - if x != nil { - return x.ExpectedVersion - } - return 0 -} - -func (x *RenameIdentityRequest) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *RenameIdentityRequest) GetAudit() *IdentityAudit { - if x != nil { - return x.Audit - } - return nil -} - -type SuspendIdentityRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ExpectedVersion int64 `protobuf:"varint,2,opt,name=expected_version,json=expectedVersion,proto3" json:"expected_version,omitempty"` - Audit *IdentityAudit `protobuf:"bytes,3,opt,name=audit,proto3" json:"audit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SuspendIdentityRequest) Reset() { - *x = SuspendIdentityRequest{} - mi := &file_state_v1_state_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SuspendIdentityRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SuspendIdentityRequest) ProtoMessage() {} - -func (x *SuspendIdentityRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SuspendIdentityRequest.ProtoReflect.Descriptor instead. -func (*SuspendIdentityRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{14} -} - -func (x *SuspendIdentityRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *SuspendIdentityRequest) GetExpectedVersion() int64 { - if x != nil { - return x.ExpectedVersion - } - return 0 -} - -func (x *SuspendIdentityRequest) GetAudit() *IdentityAudit { - if x != nil { - return x.Audit - } - return nil -} - -type ReactivateIdentityRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ExpectedVersion int64 `protobuf:"varint,2,opt,name=expected_version,json=expectedVersion,proto3" json:"expected_version,omitempty"` - Audit *IdentityAudit `protobuf:"bytes,3,opt,name=audit,proto3" json:"audit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ReactivateIdentityRequest) Reset() { - *x = ReactivateIdentityRequest{} - mi := &file_state_v1_state_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ReactivateIdentityRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReactivateIdentityRequest) ProtoMessage() {} - -func (x *ReactivateIdentityRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[15] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ReactivateIdentityRequest.ProtoReflect.Descriptor instead. -func (*ReactivateIdentityRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{15} -} - -func (x *ReactivateIdentityRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *ReactivateIdentityRequest) GetExpectedVersion() int64 { - if x != nil { - return x.ExpectedVersion - } - return 0 -} - -func (x *ReactivateIdentityRequest) GetAudit() *IdentityAudit { - if x != nil { - return x.Audit - } - return nil -} - -type RetireIdentityRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ExpectedVersion int64 `protobuf:"varint,2,opt,name=expected_version,json=expectedVersion,proto3" json:"expected_version,omitempty"` - Audit *IdentityAudit `protobuf:"bytes,3,opt,name=audit,proto3" json:"audit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RetireIdentityRequest) Reset() { - *x = RetireIdentityRequest{} - mi := &file_state_v1_state_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RetireIdentityRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetireIdentityRequest) ProtoMessage() {} - -func (x *RetireIdentityRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[16] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetireIdentityRequest.ProtoReflect.Descriptor instead. -func (*RetireIdentityRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{16} -} - -func (x *RetireIdentityRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *RetireIdentityRequest) GetExpectedVersion() int64 { - if x != nil { - return x.ExpectedVersion - } - return 0 -} - -func (x *RetireIdentityRequest) GetAudit() *IdentityAudit { - if x != nil { - return x.Audit - } - return nil -} - -type CreateIdentityResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateIdentityResponse) Reset() { - *x = CreateIdentityResponse{} - mi := &file_state_v1_state_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateIdentityResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateIdentityResponse) ProtoMessage() {} - -func (x *CreateIdentityResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[17] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateIdentityResponse.ProtoReflect.Descriptor instead. -func (*CreateIdentityResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{17} -} - -func (x *CreateIdentityResponse) GetIdentity() *Identity { - if x != nil { - return x.Identity - } - return nil -} - -type RenameIdentityResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RenameIdentityResponse) Reset() { - *x = RenameIdentityResponse{} - mi := &file_state_v1_state_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RenameIdentityResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RenameIdentityResponse) ProtoMessage() {} - -func (x *RenameIdentityResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[18] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RenameIdentityResponse.ProtoReflect.Descriptor instead. -func (*RenameIdentityResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{18} -} - -func (x *RenameIdentityResponse) GetIdentity() *Identity { - if x != nil { - return x.Identity - } - return nil -} - -type SuspendIdentityResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SuspendIdentityResponse) Reset() { - *x = SuspendIdentityResponse{} - mi := &file_state_v1_state_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SuspendIdentityResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SuspendIdentityResponse) ProtoMessage() {} - -func (x *SuspendIdentityResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[19] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SuspendIdentityResponse.ProtoReflect.Descriptor instead. -func (*SuspendIdentityResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{19} -} - -func (x *SuspendIdentityResponse) GetIdentity() *Identity { - if x != nil { - return x.Identity - } - return nil -} - -type ReactivateIdentityResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ReactivateIdentityResponse) Reset() { - *x = ReactivateIdentityResponse{} - mi := &file_state_v1_state_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ReactivateIdentityResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReactivateIdentityResponse) ProtoMessage() {} - -func (x *ReactivateIdentityResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[20] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ReactivateIdentityResponse.ProtoReflect.Descriptor instead. -func (*ReactivateIdentityResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{20} -} - -func (x *ReactivateIdentityResponse) GetIdentity() *Identity { - if x != nil { - return x.Identity - } - return nil -} - -type RetireIdentityResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RetireIdentityResponse) Reset() { - *x = RetireIdentityResponse{} - mi := &file_state_v1_state_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RetireIdentityResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetireIdentityResponse) ProtoMessage() {} - -func (x *RetireIdentityResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[21] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetireIdentityResponse.ProtoReflect.Descriptor instead. -func (*RetireIdentityResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{21} -} - -func (x *RetireIdentityResponse) GetIdentity() *Identity { - if x != nil { - return x.Identity - } - return nil -} - -type ResolveIdentitySubjectRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ResolveIdentitySubjectRequest) Reset() { - *x = ResolveIdentitySubjectRequest{} - mi := &file_state_v1_state_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ResolveIdentitySubjectRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResolveIdentitySubjectRequest) ProtoMessage() {} - -func (x *ResolveIdentitySubjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[22] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResolveIdentitySubjectRequest.ProtoReflect.Descriptor instead. -func (*ResolveIdentitySubjectRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{22} -} - -func (x *ResolveIdentitySubjectRequest) GetIssuer() string { - if x != nil { - return x.Issuer - } - return "" -} - -func (x *ResolveIdentitySubjectRequest) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -type ResolveIdentitySubjectResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ResolveIdentitySubjectResponse) Reset() { - *x = ResolveIdentitySubjectResponse{} - mi := &file_state_v1_state_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ResolveIdentitySubjectResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResolveIdentitySubjectResponse) ProtoMessage() {} - -func (x *ResolveIdentitySubjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[23] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResolveIdentitySubjectResponse.ProtoReflect.Descriptor instead. -func (*ResolveIdentitySubjectResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{23} -} - -func (x *ResolveIdentitySubjectResponse) GetIdentity() *Identity { - if x != nil { - return x.Identity - } - return nil -} - -type BindIdentitySubjectRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Issuer string `protobuf:"bytes,2,opt,name=issuer,proto3" json:"issuer,omitempty"` - Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` - Audit *IdentityAudit `protobuf:"bytes,4,opt,name=audit,proto3" json:"audit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BindIdentitySubjectRequest) Reset() { - *x = BindIdentitySubjectRequest{} - mi := &file_state_v1_state_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BindIdentitySubjectRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BindIdentitySubjectRequest) ProtoMessage() {} - -func (x *BindIdentitySubjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[24] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BindIdentitySubjectRequest.ProtoReflect.Descriptor instead. -func (*BindIdentitySubjectRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{24} -} - -func (x *BindIdentitySubjectRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *BindIdentitySubjectRequest) GetIssuer() string { - if x != nil { - return x.Issuer - } - return "" -} - -func (x *BindIdentitySubjectRequest) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *BindIdentitySubjectRequest) GetAudit() *IdentityAudit { - if x != nil { - return x.Audit - } - return nil -} - -type BindIdentitySubjectResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BindIdentitySubjectResponse) Reset() { - *x = BindIdentitySubjectResponse{} - mi := &file_state_v1_state_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BindIdentitySubjectResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BindIdentitySubjectResponse) ProtoMessage() {} - -func (x *BindIdentitySubjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[25] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BindIdentitySubjectResponse.ProtoReflect.Descriptor instead. -func (*BindIdentitySubjectResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{25} -} - -func (x *BindIdentitySubjectResponse) GetIdentity() *Identity { - if x != nil { - return x.Identity - } - return nil -} - -type ClaimIdentitySubjectRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` - Placeholder string `protobuf:"bytes,2,opt,name=placeholder,proto3" json:"placeholder,omitempty"` - Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClaimIdentitySubjectRequest) Reset() { - *x = ClaimIdentitySubjectRequest{} - mi := &file_state_v1_state_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClaimIdentitySubjectRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClaimIdentitySubjectRequest) ProtoMessage() {} - -func (x *ClaimIdentitySubjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[26] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClaimIdentitySubjectRequest.ProtoReflect.Descriptor instead. -func (*ClaimIdentitySubjectRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{26} -} - -func (x *ClaimIdentitySubjectRequest) GetIssuer() string { - if x != nil { - return x.Issuer - } - return "" -} - -func (x *ClaimIdentitySubjectRequest) GetPlaceholder() string { - if x != nil { - return x.Placeholder - } - return "" -} - -func (x *ClaimIdentitySubjectRequest) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -type ClaimIdentitySubjectResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClaimIdentitySubjectResponse) Reset() { - *x = ClaimIdentitySubjectResponse{} - mi := &file_state_v1_state_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClaimIdentitySubjectResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClaimIdentitySubjectResponse) ProtoMessage() {} - -func (x *ClaimIdentitySubjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[27] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClaimIdentitySubjectResponse.ProtoReflect.Descriptor instead. -func (*ClaimIdentitySubjectResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{27} -} - -func (x *ClaimIdentitySubjectResponse) GetIdentity() *Identity { - if x != nil { - return x.Identity - } - return nil -} - -// PersonalToken identifies a token by the SHA-256 it binds as; the token -// itself never reaches the State Store. -type PersonalToken struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PersonalToken) Reset() { - *x = PersonalToken{} - mi := &file_state_v1_state_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PersonalToken) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PersonalToken) ProtoMessage() {} - -func (x *PersonalToken) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[28] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PersonalToken.ProtoReflect.Descriptor instead. -func (*PersonalToken) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{28} -} - -func (x *PersonalToken) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *PersonalToken) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -type AddPersonalTokenRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AddPersonalTokenRequest) Reset() { - *x = AddPersonalTokenRequest{} - mi := &file_state_v1_state_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AddPersonalTokenRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddPersonalTokenRequest) ProtoMessage() {} - -func (x *AddPersonalTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[29] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddPersonalTokenRequest.ProtoReflect.Descriptor instead. -func (*AddPersonalTokenRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{29} -} - -func (x *AddPersonalTokenRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type AddPersonalTokenResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AddPersonalTokenResponse) Reset() { - *x = AddPersonalTokenResponse{} - mi := &file_state_v1_state_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AddPersonalTokenResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddPersonalTokenResponse) ProtoMessage() {} - -func (x *AddPersonalTokenResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[30] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddPersonalTokenResponse.ProtoReflect.Descriptor instead. -func (*AddPersonalTokenResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{30} -} - -type ListPersonalTokensRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListPersonalTokensRequest) Reset() { - *x = ListPersonalTokensRequest{} - mi := &file_state_v1_state_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListPersonalTokensRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListPersonalTokensRequest) ProtoMessage() {} - -func (x *ListPersonalTokensRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[31] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListPersonalTokensRequest.ProtoReflect.Descriptor instead. -func (*ListPersonalTokensRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{31} -} - -type ListPersonalTokensResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Tokens []*PersonalToken `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListPersonalTokensResponse) Reset() { - *x = ListPersonalTokensResponse{} - mi := &file_state_v1_state_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListPersonalTokensResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListPersonalTokensResponse) ProtoMessage() {} - -func (x *ListPersonalTokensResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[32] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListPersonalTokensResponse.ProtoReflect.Descriptor instead. -func (*ListPersonalTokensResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{32} -} - -func (x *ListPersonalTokensResponse) GetTokens() []*PersonalToken { - if x != nil { - return x.Tokens - } - return nil -} - -type RevokePersonalTokenRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RevokePersonalTokenRequest) Reset() { - *x = RevokePersonalTokenRequest{} - mi := &file_state_v1_state_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RevokePersonalTokenRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RevokePersonalTokenRequest) ProtoMessage() {} - -func (x *RevokePersonalTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[33] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RevokePersonalTokenRequest.ProtoReflect.Descriptor instead. -func (*RevokePersonalTokenRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{33} -} - -func (x *RevokePersonalTokenRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type RevokePersonalTokenResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RevokePersonalTokenResponse) Reset() { - *x = RevokePersonalTokenResponse{} - mi := &file_state_v1_state_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RevokePersonalTokenResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RevokePersonalTokenResponse) ProtoMessage() {} - -func (x *RevokePersonalTokenResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[34] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RevokePersonalTokenResponse.ProtoReflect.Descriptor instead. -func (*RevokePersonalTokenResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{34} -} - -// Task mirrors internal/domain/workflow.Task. -type Task struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` - Repo string `protobuf:"bytes,3,opt,name=repo,proto3" json:"repo,omitempty"` - IssueNumber int64 `protobuf:"varint,4,opt,name=issue_number,json=issueNumber,proto3" json:"issue_number,omitempty"` - Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` - Body string `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"` - Labels string `protobuf:"bytes,7,opt,name=labels,proto3" json:"labels,omitempty"` - Status string `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"` - Workflow string `protobuf:"bytes,9,opt,name=workflow,proto3" json:"workflow,omitempty"` - // Retired: the per-task "current stage" column was overwritten as - // workflow.Run advanced and carried no history. step_executions is the - // durable per-step record now (docs/prds/execution-tree-state-machine.md); - // ListSteps is its read. - // - // Deprecated: Marked as deprecated in state/v1/state.proto. - Stage string `protobuf:"bytes,10,opt,name=stage,proto3" json:"stage,omitempty"` - Branch string `protobuf:"bytes,11,opt,name=branch,proto3" json:"branch,omitempty"` - Plan string `protobuf:"bytes,12,opt,name=plan,proto3" json:"plan,omitempty"` - Notes string `protobuf:"bytes,13,opt,name=notes,proto3" json:"notes,omitempty"` - PrNumber int64 `protobuf:"varint,14,opt,name=pr_number,json=prNumber,proto3" json:"pr_number,omitempty"` - TokensUsed int64 `protobuf:"varint,15,opt,name=tokens_used,json=tokensUsed,proto3" json:"tokens_used,omitempty"` - Iterations int64 `protobuf:"varint,16,opt,name=iterations,proto3" json:"iterations,omitempty"` - Attempt int64 `protobuf:"varint,17,opt,name=attempt,proto3" json:"attempt,omitempty"` - ParkReason string `protobuf:"bytes,18,opt,name=park_reason,json=parkReason,proto3" json:"park_reason,omitempty"` - RetryCount int64 `protobuf:"varint,19,opt,name=retry_count,json=retryCount,proto3" json:"retry_count,omitempty"` - WatchCommentId int64 `protobuf:"varint,20,opt,name=watch_comment_id,json=watchCommentId,proto3" json:"watch_comment_id,omitempty"` - Source string `protobuf:"bytes,21,opt,name=source,proto3" json:"source,omitempty"` - Identity string `protobuf:"bytes,22,opt,name=identity,proto3" json:"identity,omitempty"` - BindingId string `protobuf:"bytes,23,opt,name=binding_id,json=bindingId,proto3" json:"binding_id,omitempty"` - BindingVersion int64 `protobuf:"varint,24,opt,name=binding_version,json=bindingVersion,proto3" json:"binding_version,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,25,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,26,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - // review_payload is the JSON-encoded review unit the remediate workflow's - // current run must address (docs/prds/pr-review-remediation.md decision 4). - ReviewPayload string `protobuf:"bytes,27,opt,name=review_payload,json=reviewPayload,proto3" json:"review_payload,omitempty"` - // The workflow pin: the exact definition version this run started with. - // It has to cross the wire for the daemon's digest guard to hold, because - // a retry reads the task back over this contract before deciding whether - // to reuse the pinned YAML (docs/prds/runtime-control-plane.md:95). - WorkflowDefinitionVersion int64 `protobuf:"varint,28,opt,name=workflow_definition_version,json=workflowDefinitionVersion,proto3" json:"workflow_definition_version,omitempty"` - WorkflowDefinitionDigest string `protobuf:"bytes,29,opt,name=workflow_definition_digest,json=workflowDefinitionDigest,proto3" json:"workflow_definition_digest,omitempty"` - WorkflowDefinitionYaml string `protobuf:"bytes,30,opt,name=workflow_definition_yaml,json=workflowDefinitionYaml,proto3" json:"workflow_definition_yaml,omitempty"` - // review_cursor is the poll backstop's high-water mark over forge review - // IDs for this task. It is separate from watch_comment_id (the review- - // comment cursor) because the two forge sequences are independent; one - // combined cursor would silently skip reviews once a larger comment ID - // landed (docs/prds/pr-review-remediation.md decision 2). - ReviewCursor int64 `protobuf:"varint,31,opt,name=review_cursor,json=reviewCursor,proto3" json:"review_cursor,omitempty"` - // park_class is the producer-recorded answer to "what kind of - // intervention does this park need?" (taskstate.ParkClass: - // needs_decision, transient, terminal). Store-side normalization makes - // empty and unknown values needs_decision, so the class is advisory on - // the wire and authoritative only as recorded at the park site. - ParkClass string `protobuf:"bytes,32,opt,name=park_class,json=parkClass,proto3" json:"park_class,omitempty"` - // remediation_rounds counts review-triggered remediation rounds - // separately from retry_count, so an operator's manual retries no - // longer draw down the review-remediation budget (and vice versa). - RemediationRounds int32 `protobuf:"varint,33,opt,name=remediation_rounds,json=remediationRounds,proto3" json:"remediation_rounds,omitempty"` - // inputs_json is the JSON object of workflow inputs a binding dispatch - // resolved (task.EncodeInputs); empty for a task no binding started. - InputsJson string `protobuf:"bytes,34,opt,name=inputs_json,json=inputsJson,proto3" json:"inputs_json,omitempty"` - // org is the org the task belongs to, derived store-side from the task's - // identity when the row is written; a task of a single-operator install - // belongs to the default org (docs/prds/orgs-and-access.md). - Org string `protobuf:"bytes,35,opt,name=org,proto3" json:"org,omitempty"` - // The workflow.call linkage (docs/prds/workflow-calls.md): the task whose - // workflow.call step started this one (0 on a root run) and how many - // call hops this row is from that root. Columns default, so an older - // writer reads as a depth-0 root run. - CallParentTaskId int64 `protobuf:"varint,36,opt,name=call_parent_task_id,json=callParentTaskId,proto3" json:"call_parent_task_id,omitempty"` - CallDepth int32 `protobuf:"varint,37,opt,name=call_depth,json=callDepth,proto3" json:"call_depth,omitempty"` - // outputs_json is the JSON object of declared-output values this run wrote - // (task.EncodeOutputs), empty for a run that wrote none. The container's - // Update sends the whole row, so a column the message cannot carry is a - // column that write drops (docs/prds/workflow-call-outputs.md, "Storage and - // wire"). - OutputsJson string `protobuf:"bytes,38,opt,name=outputs_json,json=outputsJson,proto3" json:"outputs_json,omitempty"` - // review_gate is the operator-approval gate's whole conversation with the - // operator (docs/prds/pr-review-operator-response.md): the offer the gate - // wrote before waiting, and the answer the response path filled in. It is - // opaque here -- internal/domain/workflow/prreview owns the encoding -- but - // it must cross so the dashboard can render the offer and the resumed run - // can read the answer. - ReviewGate string `protobuf:"bytes,39,opt,name=review_gate,json=reviewGate,proto3" json:"review_gate,omitempty"` - // rereview_rounds counts granted operator re-reviews, capped by - // prreview.MaxRereviewRounds in the guarded response write. It is separate - // from retry_count and remediation_rounds for the same reason those are - // separate from each other. - RereviewRounds int64 `protobuf:"varint,40,opt,name=rereview_rounds,json=rereviewRounds,proto3" json:"rereview_rounds,omitempty"` - // retry_mode is the operator's worktree choice for the next dispatch - // (taskstate.RetryMode: refresh_onto_base, continue_pushed_work). The retry - // action writes it and the daemon's prepareWorkspace reads it, so it must - // cross the wire for a retry to land on the source the operator chose. The - // empty string reads as refresh_onto_base. - RetryMode string `protobuf:"bytes,41,opt,name=retry_mode,json=retryMode,proto3" json:"retry_mode,omitempty"` - // resume_from is the stage the next attempt starts at; empty runs every - // stage. resume_results are the step results (JSON) it starts with. - ResumeFrom string `protobuf:"bytes,42,opt,name=resume_from,json=resumeFrom,proto3" json:"resume_from,omitempty"` - ResumeResults []byte `protobuf:"bytes,43,opt,name=resume_results,json=resumeResults,proto3" json:"resume_results,omitempty"` - // origin names the conversation that created the task; empty for none. - Origin string `protobuf:"bytes,44,opt,name=origin,proto3" json:"origin,omitempty"` - // workspace is the workspace of its org the task belongs to; read-only - // here. - Workspace string `protobuf:"bytes,45,opt,name=workspace,proto3" json:"workspace,omitempty"` - // binding_signature and binding_addr are the signature result and address - // of the captured event that started a binding task. - BindingSignature string `protobuf:"bytes,46,opt,name=binding_signature,json=bindingSignature,proto3" json:"binding_signature,omitempty"` - BindingAddr string `protobuf:"bytes,47,opt,name=binding_addr,json=bindingAddr,proto3" json:"binding_addr,omitempty"` - // park_blocker names what a parked task is missing (taskstate.Blocker), - // recorded at the park site; empty when the park has no known fix. - ParkBlocker string `protobuf:"bytes,48,opt,name=park_blocker,json=parkBlocker,proto3" json:"park_blocker,omitempty"` - // plan_document is the structured plan (JSON) plan was rendered from. - PlanDocument string `protobuf:"bytes,50,opt,name=plan_document,json=planDocument,proto3" json:"plan_document,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Task) Reset() { - *x = Task{} - mi := &file_state_v1_state_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Task) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Task) ProtoMessage() {} - -func (x *Task) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[35] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Task.ProtoReflect.Descriptor instead. -func (*Task) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{35} -} - -func (x *Task) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Task) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *Task) GetRepo() string { - if x != nil { - return x.Repo - } - return "" -} - -func (x *Task) GetIssueNumber() int64 { - if x != nil { - return x.IssueNumber - } - return 0 -} - -func (x *Task) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *Task) GetBody() string { - if x != nil { - return x.Body - } - return "" -} - -func (x *Task) GetLabels() string { - if x != nil { - return x.Labels - } - return "" -} - -func (x *Task) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *Task) GetWorkflow() string { - if x != nil { - return x.Workflow - } - return "" -} - -// Deprecated: Marked as deprecated in state/v1/state.proto. -func (x *Task) GetStage() string { - if x != nil { - return x.Stage - } - return "" -} - -func (x *Task) GetBranch() string { - if x != nil { - return x.Branch - } - return "" -} - -func (x *Task) GetPlan() string { - if x != nil { - return x.Plan - } - return "" -} - -func (x *Task) GetNotes() string { - if x != nil { - return x.Notes - } - return "" -} - -func (x *Task) GetPrNumber() int64 { - if x != nil { - return x.PrNumber - } - return 0 -} - -func (x *Task) GetTokensUsed() int64 { - if x != nil { - return x.TokensUsed - } - return 0 -} - -func (x *Task) GetIterations() int64 { - if x != nil { - return x.Iterations - } - return 0 -} - -func (x *Task) GetAttempt() int64 { - if x != nil { - return x.Attempt - } - return 0 -} - -func (x *Task) GetParkReason() string { - if x != nil { - return x.ParkReason - } - return "" -} - -func (x *Task) GetRetryCount() int64 { - if x != nil { - return x.RetryCount - } - return 0 -} - -func (x *Task) GetWatchCommentId() int64 { - if x != nil { - return x.WatchCommentId - } - return 0 -} - -func (x *Task) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -func (x *Task) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *Task) GetBindingId() string { - if x != nil { - return x.BindingId - } - return "" -} - -func (x *Task) GetBindingVersion() int64 { - if x != nil { - return x.BindingVersion - } - return 0 -} - -func (x *Task) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Task) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -func (x *Task) GetReviewPayload() string { - if x != nil { - return x.ReviewPayload - } - return "" -} - -func (x *Task) GetWorkflowDefinitionVersion() int64 { - if x != nil { - return x.WorkflowDefinitionVersion - } - return 0 -} - -func (x *Task) GetWorkflowDefinitionDigest() string { - if x != nil { - return x.WorkflowDefinitionDigest - } - return "" -} - -func (x *Task) GetWorkflowDefinitionYaml() string { - if x != nil { - return x.WorkflowDefinitionYaml - } - return "" -} - -func (x *Task) GetReviewCursor() int64 { - if x != nil { - return x.ReviewCursor - } - return 0 -} - -func (x *Task) GetParkClass() string { - if x != nil { - return x.ParkClass - } - return "" -} - -func (x *Task) GetRemediationRounds() int32 { - if x != nil { - return x.RemediationRounds - } - return 0 -} - -func (x *Task) GetInputsJson() string { - if x != nil { - return x.InputsJson - } - return "" -} - -func (x *Task) GetOrg() string { - if x != nil { - return x.Org - } - return "" -} - -func (x *Task) GetCallParentTaskId() int64 { - if x != nil { - return x.CallParentTaskId - } - return 0 -} - -func (x *Task) GetCallDepth() int32 { - if x != nil { - return x.CallDepth - } - return 0 -} - -func (x *Task) GetOutputsJson() string { - if x != nil { - return x.OutputsJson - } - return "" -} - -func (x *Task) GetReviewGate() string { - if x != nil { - return x.ReviewGate - } - return "" -} - -func (x *Task) GetRereviewRounds() int64 { - if x != nil { - return x.RereviewRounds - } - return 0 -} - -func (x *Task) GetRetryMode() string { - if x != nil { - return x.RetryMode - } - return "" -} - -func (x *Task) GetResumeFrom() string { - if x != nil { - return x.ResumeFrom - } - return "" -} - -func (x *Task) GetResumeResults() []byte { - if x != nil { - return x.ResumeResults - } - return nil -} - -func (x *Task) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *Task) GetWorkspace() string { - if x != nil { - return x.Workspace - } - return "" -} - -func (x *Task) GetBindingSignature() string { - if x != nil { - return x.BindingSignature - } - return "" -} - -func (x *Task) GetBindingAddr() string { - if x != nil { - return x.BindingAddr - } - return "" -} - -func (x *Task) GetParkBlocker() string { - if x != nil { - return x.ParkBlocker - } - return "" -} - -func (x *Task) GetPlanDocument() string { - if x != nil { - return x.PlanDocument - } - return "" -} - -// Event mirrors internal/events.Event. Data is carried as a JSON object -// string (matching the store's own on-disk representation) rather than -// google.protobuf.Struct, to stay a direct mirror of the existing column. -type Event struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - At *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=at,proto3" json:"at,omitempty"` - Kind string `protobuf:"bytes,3,opt,name=kind,proto3" json:"kind,omitempty"` - TaskId int64 `protobuf:"varint,4,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - Repo string `protobuf:"bytes,5,opt,name=repo,proto3" json:"repo,omitempty"` - Issue int64 `protobuf:"varint,6,opt,name=issue,proto3" json:"issue,omitempty"` - Workflow string `protobuf:"bytes,7,opt,name=workflow,proto3" json:"workflow,omitempty"` - Stage string `protobuf:"bytes,8,opt,name=stage,proto3" json:"stage,omitempty"` - // attempt is the run this event belongs to. Zero means UNATTRIBUTED, not a - // first attempt: rows written before the field existed, and the deliberately - // task-agnostic producers, all carry zero. A reader must report those as - // unattributable rather than presenting them as one run. - Attempt int64 `protobuf:"varint,11,opt,name=attempt,proto3" json:"attempt,omitempty"` - Detail string `protobuf:"bytes,9,opt,name=detail,proto3" json:"detail,omitempty"` - DataJson string `protobuf:"bytes,10,opt,name=data_json,json=dataJson,proto3" json:"data_json,omitempty"` - // Attribution. actor_id is the identity that performed the action and - // actor_kind its kind, so a reader can tell an agent's action from a person's - // without resolving the identity. principal_id is the identity whose authority - // the action used, which is a different fact when an agent acts under a - // person's standing approval; empty means unattributed. All three must cross - // this boundary: a record whose attribution survives only in `detail` is not - // queryable, which is the attribution this design exists to replace. - ActorId string `protobuf:"bytes,12,opt,name=actor_id,json=actorId,proto3" json:"actor_id,omitempty"` - ActorKind string `protobuf:"bytes,13,opt,name=actor_kind,json=actorKind,proto3" json:"actor_kind,omitempty"` - PrincipalId string `protobuf:"bytes,14,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Event) Reset() { - *x = Event{} - mi := &file_state_v1_state_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Event) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Event) ProtoMessage() {} - -func (x *Event) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[36] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Event.ProtoReflect.Descriptor instead. -func (*Event) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{36} -} - -func (x *Event) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Event) GetAt() *timestamppb.Timestamp { - if x != nil { - return x.At - } - return nil -} - -func (x *Event) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -func (x *Event) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *Event) GetRepo() string { - if x != nil { - return x.Repo - } - return "" -} - -func (x *Event) GetIssue() int64 { - if x != nil { - return x.Issue - } - return 0 -} - -func (x *Event) GetWorkflow() string { - if x != nil { - return x.Workflow - } - return "" -} - -func (x *Event) GetStage() string { - if x != nil { - return x.Stage - } - return "" -} - -func (x *Event) GetAttempt() int64 { - if x != nil { - return x.Attempt - } - return 0 -} - -func (x *Event) GetDetail() string { - if x != nil { - return x.Detail - } - return "" -} - -func (x *Event) GetDataJson() string { - if x != nil { - return x.DataJson - } - return "" -} - -func (x *Event) GetActorId() string { - if x != nil { - return x.ActorId - } - return "" -} - -func (x *Event) GetActorKind() string { - if x != nil { - return x.ActorKind - } - return "" -} - -func (x *Event) GetPrincipalId() string { - if x != nil { - return x.PrincipalId - } - return "" -} - -// CapturedEvent mirrors storecontract.CapturedEvent. -type CapturedEvent struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ReceivedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=received_at,json=receivedAt,proto3" json:"received_at,omitempty"` - Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"` - RemoteAddr string `protobuf:"bytes,4,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"` - ContentType string `protobuf:"bytes,5,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` - Headers string `protobuf:"bytes,6,opt,name=headers,proto3" json:"headers,omitempty"` - Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"` - Authenticated bool `protobuf:"varint,8,opt,name=authenticated,proto3" json:"authenticated,omitempty"` - // event_type is the ID of the event type the capture was identified as on - // arrival; empty is unidentified. - EventType string `protobuf:"bytes,9,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` - // unsigned marks an event taken on an approved unsigned source. - Unsigned bool `protobuf:"varint,10,opt,name=unsigned,proto3" json:"unsigned,omitempty"` - // delivery names the sender's delivery; a retry of one delivery shares it. - // Intake sets it from the source's delivery header; empty takes the - // capture ID. - Delivery string `protobuf:"bytes,11,opt,name=delivery,proto3" json:"delivery,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CapturedEvent) Reset() { - *x = CapturedEvent{} - mi := &file_state_v1_state_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CapturedEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CapturedEvent) ProtoMessage() {} - -func (x *CapturedEvent) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[37] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CapturedEvent.ProtoReflect.Descriptor instead. -func (*CapturedEvent) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{37} -} - -func (x *CapturedEvent) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *CapturedEvent) GetReceivedAt() *timestamppb.Timestamp { - if x != nil { - return x.ReceivedAt - } - return nil -} - -func (x *CapturedEvent) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -func (x *CapturedEvent) GetRemoteAddr() string { - if x != nil { - return x.RemoteAddr - } - return "" -} - -func (x *CapturedEvent) GetContentType() string { - if x != nil { - return x.ContentType - } - return "" -} - -func (x *CapturedEvent) GetHeaders() string { - if x != nil { - return x.Headers - } - return "" -} - -func (x *CapturedEvent) GetBody() string { - if x != nil { - return x.Body - } - return "" -} - -func (x *CapturedEvent) GetAuthenticated() bool { - if x != nil { - return x.Authenticated - } - return false -} - -func (x *CapturedEvent) GetEventType() string { - if x != nil { - return x.EventType - } - return "" -} - -func (x *CapturedEvent) GetUnsigned() bool { - if x != nil { - return x.Unsigned - } - return false -} - -func (x *CapturedEvent) GetDelivery() string { - if x != nil { - return x.Delivery - } - return "" -} - -// EventTypeHeaderCondition mirrors internal/domain/eventtype.HeaderCondition. -type EventTypeHeaderCondition struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EventTypeHeaderCondition) Reset() { - *x = EventTypeHeaderCondition{} - mi := &file_state_v1_state_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EventTypeHeaderCondition) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventTypeHeaderCondition) ProtoMessage() {} - -func (x *EventTypeHeaderCondition) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[38] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EventTypeHeaderCondition.ProtoReflect.Descriptor instead. -func (*EventTypeHeaderCondition) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{38} -} - -func (x *EventTypeHeaderCondition) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *EventTypeHeaderCondition) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -// EventTypePayloadCondition mirrors internal/domain/eventtype.PayloadCondition. -type EventTypePayloadCondition struct { - state protoimpl.MessageState `protogen:"open.v1"` - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - Op string `protobuf:"bytes,2,opt,name=op,proto3" json:"op,omitempty"` - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EventTypePayloadCondition) Reset() { - *x = EventTypePayloadCondition{} - mi := &file_state_v1_state_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EventTypePayloadCondition) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventTypePayloadCondition) ProtoMessage() {} - -func (x *EventTypePayloadCondition) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[39] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EventTypePayloadCondition.ProtoReflect.Descriptor instead. -func (*EventTypePayloadCondition) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{39} -} - -func (x *EventTypePayloadCondition) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *EventTypePayloadCondition) GetOp() string { - if x != nil { - return x.Op - } - return "" -} - -func (x *EventTypePayloadCondition) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -// EventType mirrors internal/domain/eventtype.EventType. header_conditions and -// payload_conditions are its rule; schema maps each payload path to its type. -type EventType struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - HeaderConditions []*EventTypeHeaderCondition `protobuf:"bytes,4,rep,name=header_conditions,json=headerConditions,proto3" json:"header_conditions,omitempty"` - PayloadConditions []*EventTypePayloadCondition `protobuf:"bytes,5,rep,name=payload_conditions,json=payloadConditions,proto3" json:"payload_conditions,omitempty"` - Schema map[string]string `protobuf:"bytes,6,rep,name=schema,proto3" json:"schema,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - // workspace_id is its source's workspace; read-only here. - WorkspaceId string `protobuf:"bytes,9,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EventType) Reset() { - *x = EventType{} - mi := &file_state_v1_state_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EventType) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventType) ProtoMessage() {} - -func (x *EventType) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[40] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EventType.ProtoReflect.Descriptor instead. -func (*EventType) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{40} -} - -func (x *EventType) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *EventType) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -func (x *EventType) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *EventType) GetHeaderConditions() []*EventTypeHeaderCondition { - if x != nil { - return x.HeaderConditions - } - return nil -} - -func (x *EventType) GetPayloadConditions() []*EventTypePayloadCondition { - if x != nil { - return x.PayloadConditions - } - return nil -} - -func (x *EventType) GetSchema() map[string]string { - if x != nil { - return x.Schema - } - return nil -} - -func (x *EventType) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *EventType) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -func (x *EventType) GetWorkspaceId() string { - if x != nil { - return x.WorkspaceId - } - return "" -} - -// MappingField mirrors internal/domain/mapping.Field. -type MappingField struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` - Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MappingField) Reset() { - *x = MappingField{} - mi := &file_state_v1_state_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MappingField) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MappingField) ProtoMessage() {} - -func (x *MappingField) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[41] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MappingField.ProtoReflect.Descriptor instead. -func (*MappingField) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{41} -} - -func (x *MappingField) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *MappingField) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *MappingField) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *MappingField) GetRequired() bool { - if x != nil { - return x.Required - } - return false -} - -// Mapping mirrors internal/domain/mapping.Mapping. -type Mapping struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - SourceHint string `protobuf:"bytes,3,opt,name=source_hint,json=sourceHint,proto3" json:"source_hint,omitempty"` - Fields []*MappingField `protobuf:"bytes,4,rep,name=fields,proto3" json:"fields,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - EventTypeId string `protobuf:"bytes,7,opt,name=event_type_id,json=eventTypeId,proto3" json:"event_type_id,omitempty"` - // match_count and last_matched_at are read-only: the store counts them. - MatchCount int64 `protobuf:"varint,8,opt,name=match_count,json=matchCount,proto3" json:"match_count,omitempty"` - LastMatchedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=last_matched_at,json=lastMatchedAt,proto3" json:"last_matched_at,omitempty"` - // workspace_id is its event type's workspace; read-only here. - WorkspaceId string `protobuf:"bytes,10,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Mapping) Reset() { - *x = Mapping{} - mi := &file_state_v1_state_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Mapping) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Mapping) ProtoMessage() {} - -func (x *Mapping) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[42] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Mapping.ProtoReflect.Descriptor instead. -func (*Mapping) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{42} -} - -func (x *Mapping) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Mapping) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Mapping) GetSourceHint() string { - if x != nil { - return x.SourceHint - } - return "" -} - -func (x *Mapping) GetFields() []*MappingField { - if x != nil { - return x.Fields - } - return nil -} - -func (x *Mapping) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Mapping) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -func (x *Mapping) GetEventTypeId() string { - if x != nil { - return x.EventTypeId - } - return "" -} - -func (x *Mapping) GetMatchCount() int64 { - if x != nil { - return x.MatchCount - } - return 0 -} - -func (x *Mapping) GetLastMatchedAt() *timestamppb.Timestamp { - if x != nil { - return x.LastMatchedAt - } - return nil -} - -func (x *Mapping) GetWorkspaceId() string { - if x != nil { - return x.WorkspaceId - } - return "" -} - -// BindingMatcher mirrors internal/domain/binding.Matcher. -type BindingMatcher struct { - state protoimpl.MessageState `protogen:"open.v1"` - Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BindingMatcher) Reset() { - *x = BindingMatcher{} - mi := &file_state_v1_state_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BindingMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BindingMatcher) ProtoMessage() {} - -func (x *BindingMatcher) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[43] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BindingMatcher.ProtoReflect.Descriptor instead. -func (*BindingMatcher) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{43} -} - -func (x *BindingMatcher) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -// Binding mirrors internal/domain/binding.Binding. -type Binding struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Matcher *BindingMatcher `protobuf:"bytes,3,opt,name=matcher,proto3" json:"matcher,omitempty"` - MappingId string `protobuf:"bytes,4,opt,name=mapping_id,json=mappingId,proto3" json:"mapping_id,omitempty"` - Workflow string `protobuf:"bytes,5,opt,name=workflow,proto3" json:"workflow,omitempty"` - Owner string `protobuf:"bytes,6,opt,name=owner,proto3" json:"owner,omitempty"` - Repo string `protobuf:"bytes,7,opt,name=repo,proto3" json:"repo,omitempty"` - Version int64 `protobuf:"varint,8,opt,name=version,proto3" json:"version,omitempty"` - Status string `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - Filter string `protobuf:"bytes,13,opt,name=filter,proto3" json:"filter,omitempty"` - // inputs_json assigns workflow inputs, a JSON object of - // {"param": name} or {"value": constant} per input. - InputsJson string `protobuf:"bytes,14,opt,name=inputs_json,json=inputsJson,proto3" json:"inputs_json,omitempty"` - // repo_param names the mapped parameter holding "owner/name". - RepoParam string `protobuf:"bytes,15,opt,name=repo_param,json=repoParam,proto3" json:"repo_param,omitempty"` - // org_id is the org that owns the binding; it is read-only here. - OrgId string `protobuf:"bytes,16,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - // workspace_id is its source's workspace; read-only here. - WorkspaceId string `protobuf:"bytes,17,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Binding) Reset() { - *x = Binding{} - mi := &file_state_v1_state_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Binding) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Binding) ProtoMessage() {} - -func (x *Binding) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[44] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Binding.ProtoReflect.Descriptor instead. -func (*Binding) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{44} -} - -func (x *Binding) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Binding) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Binding) GetMatcher() *BindingMatcher { - if x != nil { - return x.Matcher - } - return nil -} - -func (x *Binding) GetMappingId() string { - if x != nil { - return x.MappingId - } - return "" -} - -func (x *Binding) GetWorkflow() string { - if x != nil { - return x.Workflow - } - return "" -} - -func (x *Binding) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *Binding) GetRepo() string { - if x != nil { - return x.Repo - } - return "" -} - -func (x *Binding) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *Binding) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *Binding) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Binding) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -func (x *Binding) GetFilter() string { - if x != nil { - return x.Filter - } - return "" -} - -func (x *Binding) GetInputsJson() string { - if x != nil { - return x.InputsJson - } - return "" -} - -func (x *Binding) GetRepoParam() string { - if x != nil { - return x.RepoParam - } - return "" -} - -func (x *Binding) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *Binding) GetWorkspaceId() string { - if x != nil { - return x.WorkspaceId - } - return "" -} - -// Source mirrors internal/domain/source.Source. -type Source struct { - state protoimpl.MessageState `protogen:"open.v1"` - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - Signing string `protobuf:"bytes,2,opt,name=signing,proto3" json:"signing,omitempty"` - Secret string `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - DeliveryHeader string `protobuf:"bytes,7,opt,name=delivery_header,json=deliveryHeader,proto3" json:"delivery_header,omitempty"` - // org_id is the source's owning org, read-only here. workspace_id is the - // org's workspace it is created in, the default one when empty. - OrgId string `protobuf:"bytes,8,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - WorkspaceId string `protobuf:"bytes,9,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Source) Reset() { - *x = Source{} - mi := &file_state_v1_state_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Source) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Source) ProtoMessage() {} - -func (x *Source) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[45] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Source.ProtoReflect.Descriptor instead. -func (*Source) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{45} -} - -func (x *Source) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *Source) GetSigning() string { - if x != nil { - return x.Signing - } - return "" -} - -func (x *Source) GetSecret() string { - if x != nil { - return x.Secret - } - return "" -} - -func (x *Source) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Source) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -func (x *Source) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Source) GetDeliveryHeader() string { - if x != nil { - return x.DeliveryHeader - } - return "" -} - -func (x *Source) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *Source) GetWorkspaceId() string { - if x != nil { - return x.WorkspaceId - } - return "" -} - -// WorkflowStat mirrors storecontract.WorkflowStat. -type WorkflowStat struct { - state protoimpl.MessageState `protogen:"open.v1"` - Workflow string `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` - Runs int64 `protobuf:"varint,2,opt,name=runs,proto3" json:"runs,omitempty"` - Merged int64 `protobuf:"varint,3,opt,name=merged,proto3" json:"merged,omitempty"` - PrOpen int64 `protobuf:"varint,4,opt,name=pr_open,json=prOpen,proto3" json:"pr_open,omitempty"` - Parked int64 `protobuf:"varint,5,opt,name=parked,proto3" json:"parked,omitempty"` - AvgTokens int64 `protobuf:"varint,6,opt,name=avg_tokens,json=avgTokens,proto3" json:"avg_tokens,omitempty"` - AvgSteps float64 `protobuf:"fixed64,7,opt,name=avg_steps,json=avgSteps,proto3" json:"avg_steps,omitempty"` - TotalTokens int64 `protobuf:"varint,8,opt,name=total_tokens,json=totalTokens,proto3" json:"total_tokens,omitempty"` - Completed int64 `protobuf:"varint,9,opt,name=completed,proto3" json:"completed,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *WorkflowStat) Reset() { - *x = WorkflowStat{} - mi := &file_state_v1_state_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *WorkflowStat) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowStat) ProtoMessage() {} - -func (x *WorkflowStat) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[46] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkflowStat.ProtoReflect.Descriptor instead. -func (*WorkflowStat) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{46} -} - -func (x *WorkflowStat) GetWorkflow() string { - if x != nil { - return x.Workflow - } - return "" -} - -func (x *WorkflowStat) GetRuns() int64 { - if x != nil { - return x.Runs - } - return 0 -} - -func (x *WorkflowStat) GetMerged() int64 { - if x != nil { - return x.Merged - } - return 0 -} - -func (x *WorkflowStat) GetPrOpen() int64 { - if x != nil { - return x.PrOpen - } - return 0 -} - -func (x *WorkflowStat) GetParked() int64 { - if x != nil { - return x.Parked - } - return 0 -} - -func (x *WorkflowStat) GetAvgTokens() int64 { - if x != nil { - return x.AvgTokens - } - return 0 -} - -func (x *WorkflowStat) GetAvgSteps() float64 { - if x != nil { - return x.AvgSteps - } - return 0 -} - -func (x *WorkflowStat) GetTotalTokens() int64 { - if x != nil { - return x.TotalTokens - } - return 0 -} - -func (x *WorkflowStat) GetCompleted() int64 { - if x != nil { - return x.Completed - } - return 0 -} - -// StageStat mirrors storecontract.StageStat. -type StageStat struct { - state protoimpl.MessageState `protogen:"open.v1"` - Workflow string `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` - Stage string `protobuf:"bytes,2,opt,name=stage,proto3" json:"stage,omitempty"` - Runs int64 `protobuf:"varint,3,opt,name=runs,proto3" json:"runs,omitempty"` - AvgMs int64 `protobuf:"varint,4,opt,name=avg_ms,json=avgMs,proto3" json:"avg_ms,omitempty"` - Errors int64 `protobuf:"varint,5,opt,name=errors,proto3" json:"errors,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StageStat) Reset() { - *x = StageStat{} - mi := &file_state_v1_state_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StageStat) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StageStat) ProtoMessage() {} - -func (x *StageStat) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[47] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StageStat.ProtoReflect.Descriptor instead. -func (*StageStat) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{47} -} - -func (x *StageStat) GetWorkflow() string { - if x != nil { - return x.Workflow - } - return "" -} - -func (x *StageStat) GetStage() string { - if x != nil { - return x.Stage - } - return "" -} - -func (x *StageStat) GetRuns() int64 { - if x != nil { - return x.Runs - } - return 0 -} - -func (x *StageStat) GetAvgMs() int64 { - if x != nil { - return x.AvgMs - } - return 0 -} - -func (x *StageStat) GetErrors() int64 { - if x != nil { - return x.Errors - } - return 0 -} - -// DayTokens mirrors storecontract.DayTokens. -type DayTokens struct { - state protoimpl.MessageState `protogen:"open.v1"` - Day string `protobuf:"bytes,1,opt,name=day,proto3" json:"day,omitempty"` - Tokens int64 `protobuf:"varint,2,opt,name=tokens,proto3" json:"tokens,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DayTokens) Reset() { - *x = DayTokens{} - mi := &file_state_v1_state_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DayTokens) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DayTokens) ProtoMessage() {} - -func (x *DayTokens) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[48] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DayTokens.ProtoReflect.Descriptor instead. -func (*DayTokens) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{48} -} - -func (x *DayTokens) GetDay() string { - if x != nil { - return x.Day - } - return "" -} - -func (x *DayTokens) GetTokens() int64 { - if x != nil { - return x.Tokens - } - return 0 -} - -type EnqueueIssueRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` - Number int64 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` - Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` - Body string `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"` - Labels string `protobuf:"bytes,6,opt,name=labels,proto3" json:"labels,omitempty"` - Identity string `protobuf:"bytes,7,opt,name=identity,proto3" json:"identity,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EnqueueIssueRequest) Reset() { - *x = EnqueueIssueRequest{} - mi := &file_state_v1_state_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EnqueueIssueRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnqueueIssueRequest) ProtoMessage() {} - -func (x *EnqueueIssueRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[49] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnqueueIssueRequest.ProtoReflect.Descriptor instead. -func (*EnqueueIssueRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{49} -} - -func (x *EnqueueIssueRequest) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *EnqueueIssueRequest) GetRepo() string { - if x != nil { - return x.Repo - } - return "" -} - -func (x *EnqueueIssueRequest) GetNumber() int64 { - if x != nil { - return x.Number - } - return 0 -} - -func (x *EnqueueIssueRequest) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *EnqueueIssueRequest) GetBody() string { - if x != nil { - return x.Body - } - return "" -} - -func (x *EnqueueIssueRequest) GetLabels() string { - if x != nil { - return x.Labels - } - return "" -} - -func (x *EnqueueIssueRequest) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -type EnqueueIssueResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Inserted bool `protobuf:"varint,1,opt,name=inserted,proto3" json:"inserted,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EnqueueIssueResponse) Reset() { - *x = EnqueueIssueResponse{} - mi := &file_state_v1_state_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EnqueueIssueResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnqueueIssueResponse) ProtoMessage() {} - -func (x *EnqueueIssueResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[50] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnqueueIssueResponse.ProtoReflect.Descriptor instead. -func (*EnqueueIssueResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{50} -} - -func (x *EnqueueIssueResponse) GetInserted() bool { - if x != nil { - return x.Inserted - } - return false -} - -type ActiveTasksByOriginRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ActiveTasksByOriginRequest) Reset() { - *x = ActiveTasksByOriginRequest{} - mi := &file_state_v1_state_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ActiveTasksByOriginRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActiveTasksByOriginRequest) ProtoMessage() {} - -func (x *ActiveTasksByOriginRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[51] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActiveTasksByOriginRequest.ProtoReflect.Descriptor instead. -func (*ActiveTasksByOriginRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{51} -} - -func (x *ActiveTasksByOriginRequest) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -type ActiveTasksByOriginResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ActiveTasksByOriginResponse) Reset() { - *x = ActiveTasksByOriginResponse{} - mi := &file_state_v1_state_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ActiveTasksByOriginResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActiveTasksByOriginResponse) ProtoMessage() {} - -func (x *ActiveTasksByOriginResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[52] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActiveTasksByOriginResponse.ProtoReflect.Descriptor instead. -func (*ActiveTasksByOriginResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{52} -} - -func (x *ActiveTasksByOriginResponse) GetTasks() []*Task { - if x != nil { - return x.Tasks - } - return nil -} - -type UnpostedOutcomesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UnpostedOutcomesRequest) Reset() { - *x = UnpostedOutcomesRequest{} - mi := &file_state_v1_state_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UnpostedOutcomesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnpostedOutcomesRequest) ProtoMessage() {} - -func (x *UnpostedOutcomesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[53] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UnpostedOutcomesRequest.ProtoReflect.Descriptor instead. -func (*UnpostedOutcomesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{53} -} - -type UnpostedOutcomesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UnpostedOutcomesResponse) Reset() { - *x = UnpostedOutcomesResponse{} - mi := &file_state_v1_state_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UnpostedOutcomesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnpostedOutcomesResponse) ProtoMessage() {} - -func (x *UnpostedOutcomesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[54] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UnpostedOutcomesResponse.ProtoReflect.Descriptor instead. -func (*UnpostedOutcomesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{54} -} - -func (x *UnpostedOutcomesResponse) GetTasks() []*Task { - if x != nil { - return x.Tasks - } - return nil -} - -type MarkOutcomePostedRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - // status is the task status whose state was posted. - Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MarkOutcomePostedRequest) Reset() { - *x = MarkOutcomePostedRequest{} - mi := &file_state_v1_state_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MarkOutcomePostedRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MarkOutcomePostedRequest) ProtoMessage() {} - -func (x *MarkOutcomePostedRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[55] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MarkOutcomePostedRequest.ProtoReflect.Descriptor instead. -func (*MarkOutcomePostedRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{55} -} - -func (x *MarkOutcomePostedRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *MarkOutcomePostedRequest) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -type MarkOutcomePostedResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MarkOutcomePostedResponse) Reset() { - *x = MarkOutcomePostedResponse{} - mi := &file_state_v1_state_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MarkOutcomePostedResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MarkOutcomePostedResponse) ProtoMessage() {} - -func (x *MarkOutcomePostedResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[56] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MarkOutcomePostedResponse.ProtoReflect.Descriptor instead. -func (*MarkOutcomePostedResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{56} -} - -type EnqueueChatTaskRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` - Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` - Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` - Workflow string `protobuf:"bytes,5,opt,name=workflow,proto3" json:"workflow,omitempty"` - Identity string `protobuf:"bytes,6,opt,name=identity,proto3" json:"identity,omitempty"` - // inputs_json assigns workflow inputs, a JSON object of the same form - // EnqueueBindingTaskRequest carries. A chat task sets them at insert - // time: it has no binding provenance to stamp afterwards. - InputsJson string `protobuf:"bytes,7,opt,name=inputs_json,json=inputsJson,proto3" json:"inputs_json,omitempty"` - // origin names the conversation that created the task; empty for none. - Origin string `protobuf:"bytes,8,opt,name=origin,proto3" json:"origin,omitempty"` - // draft_yaml, when set, makes the task a test run of that unsaved - // definition: it is pinned to it and writes nothing to a forge. - DraftYaml string `protobuf:"bytes,9,opt,name=draft_yaml,json=draftYaml,proto3" json:"draft_yaml,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EnqueueChatTaskRequest) Reset() { - *x = EnqueueChatTaskRequest{} - mi := &file_state_v1_state_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EnqueueChatTaskRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnqueueChatTaskRequest) ProtoMessage() {} - -func (x *EnqueueChatTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[57] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnqueueChatTaskRequest.ProtoReflect.Descriptor instead. -func (*EnqueueChatTaskRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{57} -} - -func (x *EnqueueChatTaskRequest) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *EnqueueChatTaskRequest) GetRepo() string { - if x != nil { - return x.Repo - } - return "" -} - -func (x *EnqueueChatTaskRequest) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *EnqueueChatTaskRequest) GetBody() string { - if x != nil { - return x.Body - } - return "" -} - -func (x *EnqueueChatTaskRequest) GetWorkflow() string { - if x != nil { - return x.Workflow - } - return "" -} - -func (x *EnqueueChatTaskRequest) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *EnqueueChatTaskRequest) GetInputsJson() string { - if x != nil { - return x.InputsJson - } - return "" -} - -func (x *EnqueueChatTaskRequest) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *EnqueueChatTaskRequest) GetDraftYaml() string { - if x != nil { - return x.DraftYaml - } - return "" -} - -type EnqueueChatTaskResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EnqueueChatTaskResponse) Reset() { - *x = EnqueueChatTaskResponse{} - mi := &file_state_v1_state_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EnqueueChatTaskResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnqueueChatTaskResponse) ProtoMessage() {} - -func (x *EnqueueChatTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[58] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnqueueChatTaskResponse.ProtoReflect.Descriptor instead. -func (*EnqueueChatTaskResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{58} -} - -func (x *EnqueueChatTaskResponse) GetTask() *Task { - if x != nil { - return x.Task - } - return nil -} - -type ClaimNextRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClaimNextRequest) Reset() { - *x = ClaimNextRequest{} - mi := &file_state_v1_state_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClaimNextRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClaimNextRequest) ProtoMessage() {} - -func (x *ClaimNextRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[59] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClaimNextRequest.ProtoReflect.Descriptor instead. -func (*ClaimNextRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{59} -} - -type ClaimNextResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` - Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClaimNextResponse) Reset() { - *x = ClaimNextResponse{} - mi := &file_state_v1_state_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClaimNextResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClaimNextResponse) ProtoMessage() {} - -func (x *ClaimNextResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[60] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClaimNextResponse.ProtoReflect.Descriptor instead. -func (*ClaimNextResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{60} -} - -func (x *ClaimNextResponse) GetTask() *Task { - if x != nil { - return x.Task - } - return nil -} - -func (x *ClaimNextResponse) GetFound() bool { - if x != nil { - return x.Found - } - return false -} - -type ClaimByIssueRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` - Number int64 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClaimByIssueRequest) Reset() { - *x = ClaimByIssueRequest{} - mi := &file_state_v1_state_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClaimByIssueRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClaimByIssueRequest) ProtoMessage() {} - -func (x *ClaimByIssueRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[61] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClaimByIssueRequest.ProtoReflect.Descriptor instead. -func (*ClaimByIssueRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{61} -} - -func (x *ClaimByIssueRequest) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *ClaimByIssueRequest) GetRepo() string { - if x != nil { - return x.Repo - } - return "" -} - -func (x *ClaimByIssueRequest) GetNumber() int64 { - if x != nil { - return x.Number - } - return 0 -} - -type ClaimByIssueResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` - Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClaimByIssueResponse) Reset() { - *x = ClaimByIssueResponse{} - mi := &file_state_v1_state_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClaimByIssueResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClaimByIssueResponse) ProtoMessage() {} - -func (x *ClaimByIssueResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[62] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClaimByIssueResponse.ProtoReflect.Descriptor instead. -func (*ClaimByIssueResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{62} -} - -func (x *ClaimByIssueResponse) GetTask() *Task { - if x != nil { - return x.Task - } - return nil -} - -func (x *ClaimByIssueResponse) GetFound() bool { - if x != nil { - return x.Found - } - return false -} - -type TransitionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` - To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` - Detail string `protobuf:"bytes,4,opt,name=detail,proto3" json:"detail,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TransitionRequest) Reset() { - *x = TransitionRequest{} - mi := &file_state_v1_state_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TransitionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransitionRequest) ProtoMessage() {} - -func (x *TransitionRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[63] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TransitionRequest.ProtoReflect.Descriptor instead. -func (*TransitionRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{63} -} - -func (x *TransitionRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *TransitionRequest) GetFrom() string { - if x != nil { - return x.From - } - return "" -} - -func (x *TransitionRequest) GetTo() string { - if x != nil { - return x.To - } - return "" -} - -func (x *TransitionRequest) GetDetail() string { - if x != nil { - return x.Detail - } - return "" -} - -type TransitionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TransitionResponse) Reset() { - *x = TransitionResponse{} - mi := &file_state_v1_state_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TransitionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransitionResponse) ProtoMessage() {} - -func (x *TransitionResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[64] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TransitionResponse.ProtoReflect.Descriptor instead. -func (*TransitionResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{64} -} - -type StartStepRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // execution_id is the WorkflowExecution (the tasks row) the step belongs - // to, and the task ID the run credential is scoped to. - ExecutionId int64 `protobuf:"varint,1,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"` - Attempt int64 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` - // parent_id is 0 when the step is a stage; otherwise it names the enclosing - // StepExecution, from which the store derives depth. - ParentId int64 `protobuf:"varint,3,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` - // kind is stage, agent or call. - Kind string `protobuf:"bytes,4,opt,name=kind,proto3" json:"kind,omitempty"` - Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - // called_execution_id names the WorkflowExecution a `call` step started; - // the store verifies it is this execution's own callee. - CalledExecutionId int64 `protobuf:"varint,6,opt,name=called_execution_id,json=calledExecutionId,proto3" json:"called_execution_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StartStepRequest) Reset() { - *x = StartStepRequest{} - mi := &file_state_v1_state_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StartStepRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StartStepRequest) ProtoMessage() {} - -func (x *StartStepRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[65] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StartStepRequest.ProtoReflect.Descriptor instead. -func (*StartStepRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{65} -} - -func (x *StartStepRequest) GetExecutionId() int64 { - if x != nil { - return x.ExecutionId - } - return 0 -} - -func (x *StartStepRequest) GetAttempt() int64 { - if x != nil { - return x.Attempt - } - return 0 -} - -func (x *StartStepRequest) GetParentId() int64 { - if x != nil { - return x.ParentId - } - return 0 -} - -func (x *StartStepRequest) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -func (x *StartStepRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *StartStepRequest) GetCalledExecutionId() int64 { - if x != nil { - return x.CalledExecutionId - } - return 0 -} - -type StartStepResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - StepId int64 `protobuf:"varint,1,opt,name=step_id,json=stepId,proto3" json:"step_id,omitempty"` - // event is the transition's stage_start row, already persisted; the caller - // publishes it to its bus after the write commits (the daemon's event sink - // skips already-persisted rows by their assigned ID). - Event *Event `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StartStepResponse) Reset() { - *x = StartStepResponse{} - mi := &file_state_v1_state_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StartStepResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StartStepResponse) ProtoMessage() {} - -func (x *StartStepResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[66] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StartStepResponse.ProtoReflect.Descriptor instead. -func (*StartStepResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{66} -} - -func (x *StartStepResponse) GetStepId() int64 { - if x != nil { - return x.StepId - } - return 0 -} - -func (x *StartStepResponse) GetEvent() *Event { - if x != nil { - return x.Event - } - return nil -} - -type FinishStepRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // execution_id names the run the step belongs to. The grant check verifies - // it against the credential, and the store verifies the step really is that - // execution's, so a caller cannot move another run's step by naming it. - ExecutionId int64 `protobuf:"varint,1,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"` - StepId int64 `protobuf:"varint,2,opt,name=step_id,json=stepId,proto3" json:"step_id,omitempty"` - From string `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"` - To string `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty"` - Detail string `protobuf:"bytes,5,opt,name=detail,proto3" json:"detail,omitempty"` - TokensUsed int64 `protobuf:"varint,6,opt,name=tokens_used,json=tokensUsed,proto3" json:"tokens_used,omitempty"` - // results is the run's step results (JSON, by step id) after a stage the - // run moves past; empty otherwise. A resumed attempt starts from them. - Results []byte `protobuf:"bytes,7,opt,name=results,proto3" json:"results,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FinishStepRequest) Reset() { - *x = FinishStepRequest{} - mi := &file_state_v1_state_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FinishStepRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FinishStepRequest) ProtoMessage() {} - -func (x *FinishStepRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[67] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FinishStepRequest.ProtoReflect.Descriptor instead. -func (*FinishStepRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{67} -} - -func (x *FinishStepRequest) GetExecutionId() int64 { - if x != nil { - return x.ExecutionId - } - return 0 -} - -func (x *FinishStepRequest) GetStepId() int64 { - if x != nil { - return x.StepId - } - return 0 -} - -func (x *FinishStepRequest) GetFrom() string { - if x != nil { - return x.From - } - return "" -} - -func (x *FinishStepRequest) GetTo() string { - if x != nil { - return x.To - } - return "" -} - -func (x *FinishStepRequest) GetDetail() string { - if x != nil { - return x.Detail - } - return "" -} - -func (x *FinishStepRequest) GetTokensUsed() int64 { - if x != nil { - return x.TokensUsed - } - return 0 -} - -func (x *FinishStepRequest) GetResults() []byte { - if x != nil { - return x.Results - } - return nil -} - -type FinishStepResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // event is the transition's stage_finish row, already persisted. - Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FinishStepResponse) Reset() { - *x = FinishStepResponse{} - mi := &file_state_v1_state_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FinishStepResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FinishStepResponse) ProtoMessage() {} - -func (x *FinishStepResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[68] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FinishStepResponse.ProtoReflect.Descriptor instead. -func (*FinishStepResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{68} -} - -func (x *FinishStepResponse) GetEvent() *Event { - if x != nil { - return x.Event - } - return nil -} - -type CancelExecutionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - // reason records why the run was stopped, in the execution's park reason - // when the cancel lands there, and on every step event it writes. - Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` - // to is the execution's destination: the transition table routes it, and - // the operator actions name parked or closed_wont_do. - To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CancelExecutionRequest) Reset() { - *x = CancelExecutionRequest{} - mi := &file_state_v1_state_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CancelExecutionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CancelExecutionRequest) ProtoMessage() {} - -func (x *CancelExecutionRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[69] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CancelExecutionRequest.ProtoReflect.Descriptor instead. -func (*CancelExecutionRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{69} -} - -func (x *CancelExecutionRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *CancelExecutionRequest) GetReason() string { - if x != nil { - return x.Reason - } - return "" -} - -func (x *CancelExecutionRequest) GetTo() string { - if x != nil { - return x.To - } - return "" -} - -type CancelExecutionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // cancelled_callee_ids are the executions the caller was waiting on that - // were cancelled with it, nested callees included; the caller stops their - // runs as well as its own. - CancelledCalleeIds []int64 `protobuf:"varint,2,rep,packed,name=cancelled_callee_ids,json=cancelledCalleeIds,proto3" json:"cancelled_callee_ids,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CancelExecutionResponse) Reset() { - *x = CancelExecutionResponse{} - mi := &file_state_v1_state_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CancelExecutionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CancelExecutionResponse) ProtoMessage() {} - -func (x *CancelExecutionResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[70] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CancelExecutionResponse.ProtoReflect.Descriptor instead. -func (*CancelExecutionResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{70} -} - -func (x *CancelExecutionResponse) GetCancelledCalleeIds() []int64 { - if x != nil { - return x.CancelledCalleeIds - } - return nil -} - -// StepExecution mirrors internal/domain/workflow/task.StepExecution. -type StepExecution struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - ExecutionId int64 `protobuf:"varint,2,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"` - Attempt int64 `protobuf:"varint,3,opt,name=attempt,proto3" json:"attempt,omitempty"` - // parent_id is 0 for a stage at the tree's root. - ParentId int64 `protobuf:"varint,4,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` - Depth int32 `protobuf:"varint,5,opt,name=depth,proto3" json:"depth,omitempty"` - Kind string `protobuf:"bytes,6,opt,name=kind,proto3" json:"kind,omitempty"` - Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"` - Status string `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"` - Detail string `protobuf:"bytes,9,opt,name=detail,proto3" json:"detail,omitempty"` - TokensUsed int64 `protobuf:"varint,10,opt,name=tokens_used,json=tokensUsed,proto3" json:"tokens_used,omitempty"` - StartedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` - FinishedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` - // called_execution_id is the callee task a workflow.call step started. - CalledExecutionId int64 `protobuf:"varint,13,opt,name=called_execution_id,json=calledExecutionId,proto3" json:"called_execution_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StepExecution) Reset() { - *x = StepExecution{} - mi := &file_state_v1_state_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StepExecution) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StepExecution) ProtoMessage() {} - -func (x *StepExecution) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[71] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StepExecution.ProtoReflect.Descriptor instead. -func (*StepExecution) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{71} -} - -func (x *StepExecution) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *StepExecution) GetExecutionId() int64 { - if x != nil { - return x.ExecutionId - } - return 0 -} - -func (x *StepExecution) GetAttempt() int64 { - if x != nil { - return x.Attempt - } - return 0 -} - -func (x *StepExecution) GetParentId() int64 { - if x != nil { - return x.ParentId - } - return 0 -} - -func (x *StepExecution) GetDepth() int32 { - if x != nil { - return x.Depth - } - return 0 -} - -func (x *StepExecution) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -func (x *StepExecution) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *StepExecution) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *StepExecution) GetDetail() string { - if x != nil { - return x.Detail - } - return "" -} - -func (x *StepExecution) GetTokensUsed() int64 { - if x != nil { - return x.TokensUsed - } - return 0 -} - -func (x *StepExecution) GetStartedAt() *timestamppb.Timestamp { - if x != nil { - return x.StartedAt - } - return nil -} - -func (x *StepExecution) GetFinishedAt() *timestamppb.Timestamp { - if x != nil { - return x.FinishedAt - } - return nil -} - -func (x *StepExecution) GetCalledExecutionId() int64 { - if x != nil { - return x.CalledExecutionId - } - return 0 -} - -type ListStepsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - ExecutionId int64 `protobuf:"varint,1,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"` - // attempt selects one attempt's steps; 0 lists every attempt of the - // execution, oldest first -- the dashboard's run-detail rail renders every - // attempt from a single call rather than one per attempt. - Attempt int64 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListStepsRequest) Reset() { - *x = ListStepsRequest{} - mi := &file_state_v1_state_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListStepsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListStepsRequest) ProtoMessage() {} - -func (x *ListStepsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[72] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListStepsRequest.ProtoReflect.Descriptor instead. -func (*ListStepsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{72} -} - -func (x *ListStepsRequest) GetExecutionId() int64 { - if x != nil { - return x.ExecutionId - } - return 0 -} - -func (x *ListStepsRequest) GetAttempt() int64 { - if x != nil { - return x.Attempt - } - return 0 -} - -type ListStepsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Steps []*StepExecution `protobuf:"bytes,1,rep,name=steps,proto3" json:"steps,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListStepsResponse) Reset() { - *x = ListStepsResponse{} - mi := &file_state_v1_state_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListStepsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListStepsResponse) ProtoMessage() {} - -func (x *ListStepsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[73] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListStepsResponse.ProtoReflect.Descriptor instead. -func (*ListStepsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{73} -} - -func (x *ListStepsResponse) GetSteps() []*StepExecution { - if x != nil { - return x.Steps - } - return nil -} - -// HarnessSecret mirrors internal/domain/harnesssecret.Secret -- one org's -// captured OAuth token set for a credential binding's service -// (docs/prds/external-agent-harness.md, Credentials). -type HarnessSecret struct { - state protoimpl.MessageState `protogen:"open.v1"` - Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` - AccessToken string `protobuf:"bytes,3,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` - RefreshToken string `protobuf:"bytes,4,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` - TokenType string `protobuf:"bytes,5,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` - ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - Scopes []string `protobuf:"bytes,8,rep,name=scopes,proto3" json:"scopes,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *HarnessSecret) Reset() { - *x = HarnessSecret{} - mi := &file_state_v1_state_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *HarnessSecret) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HarnessSecret) ProtoMessage() {} - -func (x *HarnessSecret) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[74] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HarnessSecret.ProtoReflect.Descriptor instead. -func (*HarnessSecret) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{74} -} - -func (x *HarnessSecret) GetService() string { - if x != nil { - return x.Service - } - return "" -} - -func (x *HarnessSecret) GetAccessToken() string { - if x != nil { - return x.AccessToken - } - return "" -} - -func (x *HarnessSecret) GetRefreshToken() string { - if x != nil { - return x.RefreshToken - } - return "" -} - -func (x *HarnessSecret) GetTokenType() string { - if x != nil { - return x.TokenType - } - return "" -} - -func (x *HarnessSecret) GetExpiresAt() *timestamppb.Timestamp { - if x != nil { - return x.ExpiresAt - } - return nil -} - -func (x *HarnessSecret) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -func (x *HarnessSecret) GetScopes() []string { - if x != nil { - return x.Scopes - } - return nil -} - -type GetHarnessSecretRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` - RunCredential string `protobuf:"bytes,3,opt,name=run_credential,json=runCredential,proto3" json:"run_credential,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetHarnessSecretRequest) Reset() { - *x = GetHarnessSecretRequest{} - mi := &file_state_v1_state_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetHarnessSecretRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetHarnessSecretRequest) ProtoMessage() {} - -func (x *GetHarnessSecretRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[75] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetHarnessSecretRequest.ProtoReflect.Descriptor instead. -func (*GetHarnessSecretRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{75} -} - -func (x *GetHarnessSecretRequest) GetService() string { - if x != nil { - return x.Service - } - return "" -} - -func (x *GetHarnessSecretRequest) GetRunCredential() string { - if x != nil { - return x.RunCredential - } - return "" -} - -type GetHarnessSecretResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Secret *HarnessSecret `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` - Org string `protobuf:"bytes,2,opt,name=org,proto3" json:"org,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetHarnessSecretResponse) Reset() { - *x = GetHarnessSecretResponse{} - mi := &file_state_v1_state_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetHarnessSecretResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetHarnessSecretResponse) ProtoMessage() {} - -func (x *GetHarnessSecretResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[76] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetHarnessSecretResponse.ProtoReflect.Descriptor instead. -func (*GetHarnessSecretResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{76} -} - -func (x *GetHarnessSecretResponse) GetSecret() *HarnessSecret { - if x != nil { - return x.Secret - } - return nil -} - -func (x *GetHarnessSecretResponse) GetOrg() string { - if x != nil { - return x.Org - } - return "" -} - -type PutHarnessSecretRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Secret *HarnessSecret `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` - RunCredential string `protobuf:"bytes,2,opt,name=run_credential,json=runCredential,proto3" json:"run_credential,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PutHarnessSecretRequest) Reset() { - *x = PutHarnessSecretRequest{} - mi := &file_state_v1_state_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PutHarnessSecretRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PutHarnessSecretRequest) ProtoMessage() {} - -func (x *PutHarnessSecretRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[77] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PutHarnessSecretRequest.ProtoReflect.Descriptor instead. -func (*PutHarnessSecretRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{77} -} - -func (x *PutHarnessSecretRequest) GetSecret() *HarnessSecret { - if x != nil { - return x.Secret - } - return nil -} - -func (x *PutHarnessSecretRequest) GetRunCredential() string { - if x != nil { - return x.RunCredential - } - return "" -} - -type PutHarnessSecretResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PutHarnessSecretResponse) Reset() { - *x = PutHarnessSecretResponse{} - mi := &file_state_v1_state_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PutHarnessSecretResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PutHarnessSecretResponse) ProtoMessage() {} - -func (x *PutHarnessSecretResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[78] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PutHarnessSecretResponse.ProtoReflect.Descriptor instead. -func (*PutHarnessSecretResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{78} -} - -type UpdateRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateRequest) Reset() { - *x = UpdateRequest{} - mi := &file_state_v1_state_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateRequest) ProtoMessage() {} - -func (x *UpdateRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[79] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead. -func (*UpdateRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{79} -} - -func (x *UpdateRequest) GetTask() *Task { - if x != nil { - return x.Task - } - return nil -} - -type UpdateResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateResponse) Reset() { - *x = UpdateResponse{} - mi := &file_state_v1_state_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateResponse) ProtoMessage() {} - -func (x *UpdateResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[80] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead. -func (*UpdateResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{80} -} - -type RequeueRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - FromStatus string `protobuf:"bytes,2,opt,name=from_status,json=fromStatus,proto3" json:"from_status,omitempty"` - Workflow string `protobuf:"bytes,3,opt,name=workflow,proto3" json:"workflow,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RequeueRequest) Reset() { - *x = RequeueRequest{} - mi := &file_state_v1_state_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RequeueRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequeueRequest) ProtoMessage() {} - -func (x *RequeueRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[81] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RequeueRequest.ProtoReflect.Descriptor instead. -func (*RequeueRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{81} -} - -func (x *RequeueRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *RequeueRequest) GetFromStatus() string { - if x != nil { - return x.FromStatus - } - return "" -} - -func (x *RequeueRequest) GetWorkflow() string { - if x != nil { - return x.Workflow - } - return "" -} - -type RequeueResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RequeueResponse) Reset() { - *x = RequeueResponse{} - mi := &file_state_v1_state_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RequeueResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequeueResponse) ProtoMessage() {} - -func (x *RequeueResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[82] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RequeueResponse.ProtoReflect.Descriptor instead. -func (*RequeueResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{82} -} - -type ParkTaskRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` - Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"` - Class string `protobuf:"bytes,4,opt,name=class,proto3" json:"class,omitempty"` - Blocker string `protobuf:"bytes,5,opt,name=blocker,proto3" json:"blocker,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ParkTaskRequest) Reset() { - *x = ParkTaskRequest{} - mi := &file_state_v1_state_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ParkTaskRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParkTaskRequest) ProtoMessage() {} - -func (x *ParkTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[83] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ParkTaskRequest.ProtoReflect.Descriptor instead. -func (*ParkTaskRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{83} -} - -func (x *ParkTaskRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *ParkTaskRequest) GetFrom() string { - if x != nil { - return x.From - } - return "" -} - -func (x *ParkTaskRequest) GetDetail() string { - if x != nil { - return x.Detail - } - return "" -} - -func (x *ParkTaskRequest) GetClass() string { - if x != nil { - return x.Class - } - return "" -} - -func (x *ParkTaskRequest) GetBlocker() string { - if x != nil { - return x.Blocker - } - return "" -} - -type ParkTaskResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ParkTaskResponse) Reset() { - *x = ParkTaskResponse{} - mi := &file_state_v1_state_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ParkTaskResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParkTaskResponse) ProtoMessage() {} - -func (x *ParkTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[84] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ParkTaskResponse.ProtoReflect.Descriptor instead. -func (*ParkTaskResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{84} -} - -type RecoverStaleRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecoverStaleRequest) Reset() { - *x = RecoverStaleRequest{} - mi := &file_state_v1_state_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecoverStaleRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecoverStaleRequest) ProtoMessage() {} - -func (x *RecoverStaleRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[85] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecoverStaleRequest.ProtoReflect.Descriptor instead. -func (*RecoverStaleRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{85} -} - -type RecoverStaleResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecoverStaleResponse) Reset() { - *x = RecoverStaleResponse{} - mi := &file_state_v1_state_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecoverStaleResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecoverStaleResponse) ProtoMessage() {} - -func (x *RecoverStaleResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[86] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecoverStaleResponse.ProtoReflect.Descriptor instead. -func (*RecoverStaleResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{86} -} - -func (x *RecoverStaleResponse) GetCount() int64 { - if x != nil { - return x.Count - } - return 0 -} - -type ArchiveTaskRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - FromStatus string `protobuf:"bytes,2,opt,name=from_status,json=fromStatus,proto3" json:"from_status,omitempty"` - Audit *Event `protobuf:"bytes,3,opt,name=audit,proto3" json:"audit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ArchiveTaskRequest) Reset() { - *x = ArchiveTaskRequest{} - mi := &file_state_v1_state_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ArchiveTaskRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ArchiveTaskRequest) ProtoMessage() {} - -func (x *ArchiveTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[87] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ArchiveTaskRequest.ProtoReflect.Descriptor instead. -func (*ArchiveTaskRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{87} -} - -func (x *ArchiveTaskRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *ArchiveTaskRequest) GetFromStatus() string { - if x != nil { - return x.FromStatus - } - return "" -} - -func (x *ArchiveTaskRequest) GetAudit() *Event { - if x != nil { - return x.Audit - } - return nil -} - -type ArchiveTaskResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - EventId int64 `protobuf:"varint,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ArchiveTaskResponse) Reset() { - *x = ArchiveTaskResponse{} - mi := &file_state_v1_state_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ArchiveTaskResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ArchiveTaskResponse) ProtoMessage() {} - -func (x *ArchiveTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[88] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ArchiveTaskResponse.ProtoReflect.Descriptor instead. -func (*ArchiveTaskResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{88} -} - -func (x *ArchiveTaskResponse) GetEventId() int64 { - if x != nil { - return x.EventId - } - return 0 -} - -type RetryTaskRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - FromStatus string `protobuf:"bytes,2,opt,name=from_status,json=fromStatus,proto3" json:"from_status,omitempty"` - Workflow string `protobuf:"bytes,3,opt,name=workflow,proto3" json:"workflow,omitempty"` - // retry_mode is the operator's worktree choice (taskstate.RetryMode) the - // requeue persists. Empty reads as refresh_onto_base. - RetryMode string `protobuf:"bytes,4,opt,name=retry_mode,json=retryMode,proto3" json:"retry_mode,omitempty"` - // resume_from is the stage the attempt starts at, and resume_after the - // stage before it whose recorded results it starts with (task.Resume). - ResumeFrom string `protobuf:"bytes,5,opt,name=resume_from,json=resumeFrom,proto3" json:"resume_from,omitempty"` - ResumeAfter string `protobuf:"bytes,6,opt,name=resume_after,json=resumeAfter,proto3" json:"resume_after,omitempty"` - // current_definition clears the pinned definition so the next dispatch - // pins the workflow's current stored version. - CurrentDefinition bool `protobuf:"varint,7,opt,name=current_definition,json=currentDefinition,proto3" json:"current_definition,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RetryTaskRequest) Reset() { - *x = RetryTaskRequest{} - mi := &file_state_v1_state_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RetryTaskRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryTaskRequest) ProtoMessage() {} - -func (x *RetryTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[89] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryTaskRequest.ProtoReflect.Descriptor instead. -func (*RetryTaskRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{89} -} - -func (x *RetryTaskRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *RetryTaskRequest) GetFromStatus() string { - if x != nil { - return x.FromStatus - } - return "" -} - -func (x *RetryTaskRequest) GetWorkflow() string { - if x != nil { - return x.Workflow - } - return "" -} - -func (x *RetryTaskRequest) GetRetryMode() string { - if x != nil { - return x.RetryMode - } - return "" -} - -func (x *RetryTaskRequest) GetResumeFrom() string { - if x != nil { - return x.ResumeFrom - } - return "" -} - -func (x *RetryTaskRequest) GetResumeAfter() string { - if x != nil { - return x.ResumeAfter - } - return "" -} - -func (x *RetryTaskRequest) GetCurrentDefinition() bool { - if x != nil { - return x.CurrentDefinition - } - return false -} - -type RetryTaskResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RetryTaskResponse) Reset() { - *x = RetryTaskResponse{} - mi := &file_state_v1_state_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RetryTaskResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryTaskResponse) ProtoMessage() {} - -func (x *RetryTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[90] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryTaskResponse.ProtoReflect.Descriptor instead. -func (*RetryTaskResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{90} -} - -type RespondReviewGateRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - FromStatus string `protobuf:"bytes,2,opt,name=from_status,json=fromStatus,proto3" json:"from_status,omitempty"` - // gate is the whole review_gate document the caller computed: the offer - // with the answer filled in. The store persists it unread. - Gate string `protobuf:"bytes,3,opt,name=gate,proto3" json:"gate,omitempty"` - // rereview increments rereview_rounds in the same write; an approve must - // pass false and bumps nothing. - Rereview bool `protobuf:"varint,4,opt,name=rereview,proto3" json:"rereview,omitempty"` - // cap is the domain's re-review bound (prreview.MaxRereviewRounds). It - // crosses so the guard is enforced where the row is locked rather than by - // the caller's stale read. - Cap int64 `protobuf:"varint,5,opt,name=cap,proto3" json:"cap,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RespondReviewGateRequest) Reset() { - *x = RespondReviewGateRequest{} - mi := &file_state_v1_state_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RespondReviewGateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RespondReviewGateRequest) ProtoMessage() {} - -func (x *RespondReviewGateRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[91] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RespondReviewGateRequest.ProtoReflect.Descriptor instead. -func (*RespondReviewGateRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{91} -} - -func (x *RespondReviewGateRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *RespondReviewGateRequest) GetFromStatus() string { - if x != nil { - return x.FromStatus - } - return "" -} - -func (x *RespondReviewGateRequest) GetGate() string { - if x != nil { - return x.Gate - } - return "" -} - -func (x *RespondReviewGateRequest) GetRereview() bool { - if x != nil { - return x.Rereview - } - return false -} - -func (x *RespondReviewGateRequest) GetCap() int64 { - if x != nil { - return x.Cap - } - return 0 -} - -type RespondReviewGateResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RespondReviewGateResponse) Reset() { - *x = RespondReviewGateResponse{} - mi := &file_state_v1_state_proto_msgTypes[92] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RespondReviewGateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RespondReviewGateResponse) ProtoMessage() {} - -func (x *RespondReviewGateResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[92] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RespondReviewGateResponse.ProtoReflect.Descriptor instead. -func (*RespondReviewGateResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{92} -} - -type BeginRemediationRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - Payload string `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BeginRemediationRequest) Reset() { - *x = BeginRemediationRequest{} - mi := &file_state_v1_state_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BeginRemediationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BeginRemediationRequest) ProtoMessage() {} - -func (x *BeginRemediationRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[93] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BeginRemediationRequest.ProtoReflect.Descriptor instead. -func (*BeginRemediationRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{93} -} - -func (x *BeginRemediationRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *BeginRemediationRequest) GetPayload() string { - if x != nil { - return x.Payload - } - return "" -} - -type BeginRemediationResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BeginRemediationResponse) Reset() { - *x = BeginRemediationResponse{} - mi := &file_state_v1_state_proto_msgTypes[94] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BeginRemediationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BeginRemediationResponse) ProtoMessage() {} - -func (x *BeginRemediationResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[94] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BeginRemediationResponse.ProtoReflect.Descriptor instead. -func (*BeginRemediationResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{94} -} - -// UpdateReviewPayloadRequest merges payload's comments into the unclaimed -// review unit with the same review id, active or pending. -type UpdateReviewPayloadRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - Payload string `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateReviewPayloadRequest) Reset() { - *x = UpdateReviewPayloadRequest{} - mi := &file_state_v1_state_proto_msgTypes[95] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateReviewPayloadRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateReviewPayloadRequest) ProtoMessage() {} - -func (x *UpdateReviewPayloadRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[95] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateReviewPayloadRequest.ProtoReflect.Descriptor instead. -func (*UpdateReviewPayloadRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{95} -} - -func (x *UpdateReviewPayloadRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *UpdateReviewPayloadRequest) GetPayload() string { - if x != nil { - return x.Payload - } - return "" -} - -type UpdateReviewPayloadResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateReviewPayloadResponse) Reset() { - *x = UpdateReviewPayloadResponse{} - mi := &file_state_v1_state_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateReviewPayloadResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateReviewPayloadResponse) ProtoMessage() {} - -func (x *UpdateReviewPayloadResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[96] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateReviewPayloadResponse.ProtoReflect.Descriptor instead. -func (*UpdateReviewPayloadResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{96} -} - -type SetReviewCursorsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - ReviewCursor int64 `protobuf:"varint,2,opt,name=review_cursor,json=reviewCursor,proto3" json:"review_cursor,omitempty"` - CommentCursor int64 `protobuf:"varint,3,opt,name=comment_cursor,json=commentCursor,proto3" json:"comment_cursor,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetReviewCursorsRequest) Reset() { - *x = SetReviewCursorsRequest{} - mi := &file_state_v1_state_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetReviewCursorsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetReviewCursorsRequest) ProtoMessage() {} - -func (x *SetReviewCursorsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[97] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetReviewCursorsRequest.ProtoReflect.Descriptor instead. -func (*SetReviewCursorsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{97} -} - -func (x *SetReviewCursorsRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *SetReviewCursorsRequest) GetReviewCursor() int64 { - if x != nil { - return x.ReviewCursor - } - return 0 -} - -func (x *SetReviewCursorsRequest) GetCommentCursor() int64 { - if x != nil { - return x.CommentCursor - } - return 0 -} - -type SetReviewCursorsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetReviewCursorsResponse) Reset() { - *x = SetReviewCursorsResponse{} - mi := &file_state_v1_state_proto_msgTypes[98] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetReviewCursorsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetReviewCursorsResponse) ProtoMessage() {} - -func (x *SetReviewCursorsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[98] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetReviewCursorsResponse.ProtoReflect.Descriptor instead. -func (*SetReviewCursorsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{98} -} - -type TaskByIssueRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` - Number int64 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TaskByIssueRequest) Reset() { - *x = TaskByIssueRequest{} - mi := &file_state_v1_state_proto_msgTypes[99] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TaskByIssueRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskByIssueRequest) ProtoMessage() {} - -func (x *TaskByIssueRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[99] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TaskByIssueRequest.ProtoReflect.Descriptor instead. -func (*TaskByIssueRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{99} -} - -func (x *TaskByIssueRequest) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *TaskByIssueRequest) GetRepo() string { - if x != nil { - return x.Repo - } - return "" -} - -func (x *TaskByIssueRequest) GetNumber() int64 { - if x != nil { - return x.Number - } - return 0 -} - -type TaskByIssueResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` - Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TaskByIssueResponse) Reset() { - *x = TaskByIssueResponse{} - mi := &file_state_v1_state_proto_msgTypes[100] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TaskByIssueResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskByIssueResponse) ProtoMessage() {} - -func (x *TaskByIssueResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[100] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TaskByIssueResponse.ProtoReflect.Descriptor instead. -func (*TaskByIssueResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{100} -} - -func (x *TaskByIssueResponse) GetTask() *Task { - if x != nil { - return x.Task - } - return nil -} - -func (x *TaskByIssueResponse) GetFound() bool { - if x != nil { - return x.Found - } - return false -} - -type OpenTaskByPRRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` - Number int64 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *OpenTaskByPRRequest) Reset() { - *x = OpenTaskByPRRequest{} - mi := &file_state_v1_state_proto_msgTypes[101] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *OpenTaskByPRRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OpenTaskByPRRequest) ProtoMessage() {} - -func (x *OpenTaskByPRRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[101] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OpenTaskByPRRequest.ProtoReflect.Descriptor instead. -func (*OpenTaskByPRRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{101} -} - -func (x *OpenTaskByPRRequest) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *OpenTaskByPRRequest) GetRepo() string { - if x != nil { - return x.Repo - } - return "" -} - -func (x *OpenTaskByPRRequest) GetNumber() int64 { - if x != nil { - return x.Number - } - return 0 -} - -type OpenTaskByPRResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` - Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *OpenTaskByPRResponse) Reset() { - *x = OpenTaskByPRResponse{} - mi := &file_state_v1_state_proto_msgTypes[102] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *OpenTaskByPRResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OpenTaskByPRResponse) ProtoMessage() {} - -func (x *OpenTaskByPRResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[102] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OpenTaskByPRResponse.ProtoReflect.Descriptor instead. -func (*OpenTaskByPRResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{102} -} - -func (x *OpenTaskByPRResponse) GetTask() *Task { - if x != nil { - return x.Task - } - return nil -} - -func (x *OpenTaskByPRResponse) GetFound() bool { - if x != nil { - return x.Found - } - return false -} - -type TaskByIDRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TaskByIDRequest) Reset() { - *x = TaskByIDRequest{} - mi := &file_state_v1_state_proto_msgTypes[103] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TaskByIDRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskByIDRequest) ProtoMessage() {} - -func (x *TaskByIDRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[103] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TaskByIDRequest.ProtoReflect.Descriptor instead. -func (*TaskByIDRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{103} -} - -func (x *TaskByIDRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -type TaskByIDResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` - Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TaskByIDResponse) Reset() { - *x = TaskByIDResponse{} - mi := &file_state_v1_state_proto_msgTypes[104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TaskByIDResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskByIDResponse) ProtoMessage() {} - -func (x *TaskByIDResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[104] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TaskByIDResponse.ProtoReflect.Descriptor instead. -func (*TaskByIDResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{104} -} - -func (x *TaskByIDResponse) GetTask() *Task { - if x != nil { - return x.Task - } - return nil -} - -func (x *TaskByIDResponse) GetFound() bool { - if x != nil { - return x.Found - } - return false -} - -type OpenPRsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *OpenPRsRequest) Reset() { - *x = OpenPRsRequest{} - mi := &file_state_v1_state_proto_msgTypes[105] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *OpenPRsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OpenPRsRequest) ProtoMessage() {} - -func (x *OpenPRsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[105] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OpenPRsRequest.ProtoReflect.Descriptor instead. -func (*OpenPRsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{105} -} - -type OpenPRsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *OpenPRsResponse) Reset() { - *x = OpenPRsResponse{} - mi := &file_state_v1_state_proto_msgTypes[106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *OpenPRsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OpenPRsResponse) ProtoMessage() {} - -func (x *OpenPRsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[106] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OpenPRsResponse.ProtoReflect.Descriptor instead. -func (*OpenPRsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{106} -} - -func (x *OpenPRsResponse) GetTasks() []*Task { - if x != nil { - return x.Tasks - } - return nil -} - -type ClearTerminalTasksRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClearTerminalTasksRequest) Reset() { - *x = ClearTerminalTasksRequest{} - mi := &file_state_v1_state_proto_msgTypes[107] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClearTerminalTasksRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClearTerminalTasksRequest) ProtoMessage() {} - -func (x *ClearTerminalTasksRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[107] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClearTerminalTasksRequest.ProtoReflect.Descriptor instead. -func (*ClearTerminalTasksRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{107} -} - -type ClearTerminalTasksResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClearTerminalTasksResponse) Reset() { - *x = ClearTerminalTasksResponse{} - mi := &file_state_v1_state_proto_msgTypes[108] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClearTerminalTasksResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClearTerminalTasksResponse) ProtoMessage() {} - -func (x *ClearTerminalTasksResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[108] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClearTerminalTasksResponse.ProtoReflect.Descriptor instead. -func (*ClearTerminalTasksResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{108} -} - -func (x *ClearTerminalTasksResponse) GetCount() int64 { - if x != nil { - return x.Count - } - return 0 -} - -// TasksRequest selects one page of tasks, most recently updated first. Empty -// statuses matches every status; after_id 0 starts at the newest task. -type TasksRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` - Statuses []string `protobuf:"bytes,2,rep,name=statuses,proto3" json:"statuses,omitempty"` - AfterUpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=after_updated_at,json=afterUpdatedAt,proto3" json:"after_updated_at,omitempty"` - AfterId int64 `protobuf:"varint,4,opt,name=after_id,json=afterId,proto3" json:"after_id,omitempty"` - // workflow, when set, keeps only that workflow's tasks. - Workflow string `protobuf:"bytes,5,opt,name=workflow,proto3" json:"workflow,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TasksRequest) Reset() { - *x = TasksRequest{} - mi := &file_state_v1_state_proto_msgTypes[109] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TasksRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TasksRequest) ProtoMessage() {} - -func (x *TasksRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[109] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TasksRequest.ProtoReflect.Descriptor instead. -func (*TasksRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{109} -} - -func (x *TasksRequest) GetLimit() int64 { - if x != nil { - return x.Limit - } - return 0 -} - -func (x *TasksRequest) GetStatuses() []string { - if x != nil { - return x.Statuses - } - return nil -} - -func (x *TasksRequest) GetAfterUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.AfterUpdatedAt - } - return nil -} - -func (x *TasksRequest) GetAfterId() int64 { - if x != nil { - return x.AfterId - } - return 0 -} - -func (x *TasksRequest) GetWorkflow() string { - if x != nil { - return x.Workflow - } - return "" -} - -type TasksResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TasksResponse) Reset() { - *x = TasksResponse{} - mi := &file_state_v1_state_proto_msgTypes[110] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TasksResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TasksResponse) ProtoMessage() {} - -func (x *TasksResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[110] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TasksResponse.ProtoReflect.Descriptor instead. -func (*TasksResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{110} -} - -func (x *TasksResponse) GetTasks() []*Task { - if x != nil { - return x.Tasks - } - return nil -} - -type StatusCountsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StatusCountsRequest) Reset() { - *x = StatusCountsRequest{} - mi := &file_state_v1_state_proto_msgTypes[111] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatusCountsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusCountsRequest) ProtoMessage() {} - -func (x *StatusCountsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[111] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusCountsRequest.ProtoReflect.Descriptor instead. -func (*StatusCountsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{111} -} - -type StatusCountsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Counts map[string]int64 `protobuf:"bytes,1,rep,name=counts,proto3" json:"counts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StatusCountsResponse) Reset() { - *x = StatusCountsResponse{} - mi := &file_state_v1_state_proto_msgTypes[112] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatusCountsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusCountsResponse) ProtoMessage() {} - -func (x *StatusCountsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[112] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusCountsResponse.ProtoReflect.Descriptor instead. -func (*StatusCountsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{112} -} - -func (x *StatusCountsResponse) GetCounts() map[string]int64 { - if x != nil { - return x.Counts - } - return nil -} - -type InsertEventRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InsertEventRequest) Reset() { - *x = InsertEventRequest{} - mi := &file_state_v1_state_proto_msgTypes[113] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InsertEventRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InsertEventRequest) ProtoMessage() {} - -func (x *InsertEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[113] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InsertEventRequest.ProtoReflect.Descriptor instead. -func (*InsertEventRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{113} -} - -func (x *InsertEventRequest) GetEvent() *Event { - if x != nil { - return x.Event - } - return nil -} - -type InsertEventResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InsertEventResponse) Reset() { - *x = InsertEventResponse{} - mi := &file_state_v1_state_proto_msgTypes[114] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InsertEventResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InsertEventResponse) ProtoMessage() {} - -func (x *InsertEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[114] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InsertEventResponse.ProtoReflect.Descriptor instead. -func (*InsertEventResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{114} -} - -func (x *InsertEventResponse) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -type EventsSinceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // since_id is the opaque resume cursor returned by the previous page (the SSE - // id: field, echoed back as Last-Event-ID). Empty means "from the - // beginning". The field keeps its name and number so the wire name stays - // put; only its type widened, from the SQLite rowid to the fixed-width - // "|" cursor. - SinceId string `protobuf:"bytes,1,opt,name=since_id,json=sinceId,proto3" json:"since_id,omitempty"` - Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EventsSinceRequest) Reset() { - *x = EventsSinceRequest{} - mi := &file_state_v1_state_proto_msgTypes[115] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EventsSinceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventsSinceRequest) ProtoMessage() {} - -func (x *EventsSinceRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[115] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EventsSinceRequest.ProtoReflect.Descriptor instead. -func (*EventsSinceRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{115} -} - -func (x *EventsSinceRequest) GetSinceId() string { - if x != nil { - return x.SinceId - } - return "" -} - -func (x *EventsSinceRequest) GetLimit() int64 { - if x != nil { - return x.Limit - } - return 0 -} - -type EventsSinceResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EventsSinceResponse) Reset() { - *x = EventsSinceResponse{} - mi := &file_state_v1_state_proto_msgTypes[116] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EventsSinceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventsSinceResponse) ProtoMessage() {} - -func (x *EventsSinceResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[116] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EventsSinceResponse.ProtoReflect.Descriptor instead. -func (*EventsSinceResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{116} -} - -func (x *EventsSinceResponse) GetEvents() []*Event { - if x != nil { - return x.Events - } - return nil -} - -type TaskEventsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TaskEventsRequest) Reset() { - *x = TaskEventsRequest{} - mi := &file_state_v1_state_proto_msgTypes[117] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TaskEventsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskEventsRequest) ProtoMessage() {} - -func (x *TaskEventsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[117] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TaskEventsRequest.ProtoReflect.Descriptor instead. -func (*TaskEventsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{117} -} - -func (x *TaskEventsRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -type TaskEventsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TaskEventsResponse) Reset() { - *x = TaskEventsResponse{} - mi := &file_state_v1_state_proto_msgTypes[118] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TaskEventsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskEventsResponse) ProtoMessage() {} - -func (x *TaskEventsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[118] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TaskEventsResponse.ProtoReflect.Descriptor instead. -func (*TaskEventsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{118} -} - -func (x *TaskEventsResponse) GetEvents() []*Event { - if x != nil { - return x.Events - } - return nil -} - -type WorkflowStatsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *WorkflowStatsRequest) Reset() { - *x = WorkflowStatsRequest{} - mi := &file_state_v1_state_proto_msgTypes[119] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *WorkflowStatsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowStatsRequest) ProtoMessage() {} - -func (x *WorkflowStatsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[119] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkflowStatsRequest.ProtoReflect.Descriptor instead. -func (*WorkflowStatsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{119} -} - -type WorkflowStatsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Stats []*WorkflowStat `protobuf:"bytes,1,rep,name=stats,proto3" json:"stats,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *WorkflowStatsResponse) Reset() { - *x = WorkflowStatsResponse{} - mi := &file_state_v1_state_proto_msgTypes[120] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *WorkflowStatsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowStatsResponse) ProtoMessage() {} - -func (x *WorkflowStatsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[120] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkflowStatsResponse.ProtoReflect.Descriptor instead. -func (*WorkflowStatsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{120} -} - -func (x *WorkflowStatsResponse) GetStats() []*WorkflowStat { - if x != nil { - return x.Stats - } - return nil -} - -type StageStatsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StageStatsRequest) Reset() { - *x = StageStatsRequest{} - mi := &file_state_v1_state_proto_msgTypes[121] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StageStatsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StageStatsRequest) ProtoMessage() {} - -func (x *StageStatsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[121] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StageStatsRequest.ProtoReflect.Descriptor instead. -func (*StageStatsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{121} -} - -type StageStatsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Stats []*StageStat `protobuf:"bytes,1,rep,name=stats,proto3" json:"stats,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StageStatsResponse) Reset() { - *x = StageStatsResponse{} - mi := &file_state_v1_state_proto_msgTypes[122] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StageStatsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StageStatsResponse) ProtoMessage() {} - -func (x *StageStatsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[122] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StageStatsResponse.ProtoReflect.Descriptor instead. -func (*StageStatsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{122} -} - -func (x *StageStatsResponse) GetStats() []*StageStat { - if x != nil { - return x.Stats - } - return nil -} - -type TokensByDayRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Days int64 `protobuf:"varint,1,opt,name=days,proto3" json:"days,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TokensByDayRequest) Reset() { - *x = TokensByDayRequest{} - mi := &file_state_v1_state_proto_msgTypes[123] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TokensByDayRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TokensByDayRequest) ProtoMessage() {} - -func (x *TokensByDayRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[123] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TokensByDayRequest.ProtoReflect.Descriptor instead. -func (*TokensByDayRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{123} -} - -func (x *TokensByDayRequest) GetDays() int64 { - if x != nil { - return x.Days - } - return 0 -} - -type TokensByDayResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Tokens []*DayTokens `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TokensByDayResponse) Reset() { - *x = TokensByDayResponse{} - mi := &file_state_v1_state_proto_msgTypes[124] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TokensByDayResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TokensByDayResponse) ProtoMessage() {} - -func (x *TokensByDayResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[124] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TokensByDayResponse.ProtoReflect.Descriptor instead. -func (*TokensByDayResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{124} -} - -func (x *TokensByDayResponse) GetTokens() []*DayTokens { - if x != nil { - return x.Tokens - } - return nil -} - -// ConfigSnapshot carries the dashboard's configuration projection. document -// is opaque to the store: its shape belongs to the producer and the page that -// reads it, and schema names that shape so a reader can refuse one it does -// not understand. It is secret-free at the producer -- the projection carries -// an API key's environment variable name and whether it resolved, never a -// value. -type ConfigSnapshot struct { - state protoimpl.MessageState `protogen:"open.v1"` - Schema string `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` - Document []byte `protobuf:"bytes,2,opt,name=document,proto3" json:"document,omitempty"` - PublishedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=published_at,json=publishedAt,proto3" json:"published_at,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ConfigSnapshot) Reset() { - *x = ConfigSnapshot{} - mi := &file_state_v1_state_proto_msgTypes[125] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfigSnapshot) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfigSnapshot) ProtoMessage() {} - -func (x *ConfigSnapshot) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[125] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfigSnapshot.ProtoReflect.Descriptor instead. -func (*ConfigSnapshot) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{125} -} - -func (x *ConfigSnapshot) GetSchema() string { - if x != nil { - return x.Schema - } - return "" -} - -func (x *ConfigSnapshot) GetDocument() []byte { - if x != nil { - return x.Document - } - return nil -} - -func (x *ConfigSnapshot) GetPublishedAt() *timestamppb.Timestamp { - if x != nil { - return x.PublishedAt - } - return nil -} - -type PutConfigSnapshotRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Snapshot *ConfigSnapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PutConfigSnapshotRequest) Reset() { - *x = PutConfigSnapshotRequest{} - mi := &file_state_v1_state_proto_msgTypes[126] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PutConfigSnapshotRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PutConfigSnapshotRequest) ProtoMessage() {} - -func (x *PutConfigSnapshotRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[126] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PutConfigSnapshotRequest.ProtoReflect.Descriptor instead. -func (*PutConfigSnapshotRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{126} -} - -func (x *PutConfigSnapshotRequest) GetSnapshot() *ConfigSnapshot { - if x != nil { - return x.Snapshot - } - return nil -} - -type PutConfigSnapshotResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PutConfigSnapshotResponse) Reset() { - *x = PutConfigSnapshotResponse{} - mi := &file_state_v1_state_proto_msgTypes[127] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PutConfigSnapshotResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PutConfigSnapshotResponse) ProtoMessage() {} - -func (x *PutConfigSnapshotResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[127] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PutConfigSnapshotResponse.ProtoReflect.Descriptor instead. -func (*PutConfigSnapshotResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{127} -} - -type GetConfigSnapshotRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetConfigSnapshotRequest) Reset() { - *x = GetConfigSnapshotRequest{} - mi := &file_state_v1_state_proto_msgTypes[128] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetConfigSnapshotRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConfigSnapshotRequest) ProtoMessage() {} - -func (x *GetConfigSnapshotRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[128] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetConfigSnapshotRequest.ProtoReflect.Descriptor instead. -func (*GetConfigSnapshotRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{128} -} - -type GetConfigSnapshotResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Snapshot *ConfigSnapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` - Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetConfigSnapshotResponse) Reset() { - *x = GetConfigSnapshotResponse{} - mi := &file_state_v1_state_proto_msgTypes[129] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetConfigSnapshotResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConfigSnapshotResponse) ProtoMessage() {} - -func (x *GetConfigSnapshotResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[129] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetConfigSnapshotResponse.ProtoReflect.Descriptor instead. -func (*GetConfigSnapshotResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{129} -} - -func (x *GetConfigSnapshotResponse) GetSnapshot() *ConfigSnapshot { - if x != nil { - return x.Snapshot - } - return nil -} - -func (x *GetConfigSnapshotResponse) GetFound() bool { - if x != nil { - return x.Found - } - return false -} - -// ChannelStatus is one channel's runtime state, as the process hosting it -// observes it. ReloadSupported is a capability declaration, not a request: the -// service reports it, so a reader may offer a reload action -- but asking for one -// travels on its own surface, because a transient request and a durable state do -// not share a lifetime. -type ChannelStatus struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` - Detail string `protobuf:"bytes,4,opt,name=detail,proto3" json:"detail,omitempty"` - Configured bool `protobuf:"varint,5,opt,name=configured,proto3" json:"configured,omitempty"` - ReloadSupported bool `protobuf:"varint,6,opt,name=reload_supported,json=reloadSupported,proto3" json:"reload_supported,omitempty"` - ObservedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=observed_at,json=observedAt,proto3" json:"observed_at,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ChannelStatus) Reset() { - *x = ChannelStatus{} - mi := &file_state_v1_state_proto_msgTypes[130] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ChannelStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChannelStatus) ProtoMessage() {} - -func (x *ChannelStatus) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[130] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChannelStatus.ProtoReflect.Descriptor instead. -func (*ChannelStatus) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{130} -} - -func (x *ChannelStatus) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *ChannelStatus) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ChannelStatus) GetState() string { - if x != nil { - return x.State - } - return "" -} - -func (x *ChannelStatus) GetDetail() string { - if x != nil { - return x.Detail - } - return "" -} - -func (x *ChannelStatus) GetConfigured() bool { - if x != nil { - return x.Configured - } - return false -} - -func (x *ChannelStatus) GetReloadSupported() bool { - if x != nil { - return x.ReloadSupported - } - return false -} - -func (x *ChannelStatus) GetObservedAt() *timestamppb.Timestamp { - if x != nil { - return x.ObservedAt - } - return nil -} - -type PutChannelStatusRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Channels []*ChannelStatus `protobuf:"bytes,1,rep,name=channels,proto3" json:"channels,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PutChannelStatusRequest) Reset() { - *x = PutChannelStatusRequest{} - mi := &file_state_v1_state_proto_msgTypes[131] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PutChannelStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PutChannelStatusRequest) ProtoMessage() {} - -func (x *PutChannelStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[131] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PutChannelStatusRequest.ProtoReflect.Descriptor instead. -func (*PutChannelStatusRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{131} -} - -func (x *PutChannelStatusRequest) GetChannels() []*ChannelStatus { - if x != nil { - return x.Channels - } - return nil -} - -type PutChannelStatusResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PutChannelStatusResponse) Reset() { - *x = PutChannelStatusResponse{} - mi := &file_state_v1_state_proto_msgTypes[132] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PutChannelStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PutChannelStatusResponse) ProtoMessage() {} - -func (x *PutChannelStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[132] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PutChannelStatusResponse.ProtoReflect.Descriptor instead. -func (*PutChannelStatusResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{132} -} - -type ListChannelStatusRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListChannelStatusRequest) Reset() { - *x = ListChannelStatusRequest{} - mi := &file_state_v1_state_proto_msgTypes[133] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListChannelStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListChannelStatusRequest) ProtoMessage() {} - -func (x *ListChannelStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[133] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListChannelStatusRequest.ProtoReflect.Descriptor instead. -func (*ListChannelStatusRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{133} -} - -type ListChannelStatusResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Channels []*ChannelStatus `protobuf:"bytes,1,rep,name=channels,proto3" json:"channels,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListChannelStatusResponse) Reset() { - *x = ListChannelStatusResponse{} - mi := &file_state_v1_state_proto_msgTypes[134] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListChannelStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListChannelStatusResponse) ProtoMessage() {} - -func (x *ListChannelStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[134] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListChannelStatusResponse.ProtoReflect.Descriptor instead. -func (*ListChannelStatusResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{134} -} - -func (x *ListChannelStatusResponse) GetChannels() []*ChannelStatus { - if x != nil { - return x.Channels - } - return nil -} - -// ApplyStatus is one process's report about one control-plane resource kind. -// applied_version is the version that process is running; error is set when it -// could not apply what the store returned, and leaves applied_version at the -// last version it did apply. reported_at is re-stamped on an interval, so a -// record older than the staleness window belongs to a process that has stopped -// running (docs/prds/control-plane-apply-status.md). -type ApplyStatus struct { - state protoimpl.MessageState `protogen:"open.v1"` - Process string `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"` - Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` - AppliedVersion int64 `protobuf:"varint,3,opt,name=applied_version,json=appliedVersion,proto3" json:"applied_version,omitempty"` - Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` - ReportedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=reported_at,json=reportedAt,proto3" json:"reported_at,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ApplyStatus) Reset() { - *x = ApplyStatus{} - mi := &file_state_v1_state_proto_msgTypes[135] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ApplyStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApplyStatus) ProtoMessage() {} - -func (x *ApplyStatus) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[135] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApplyStatus.ProtoReflect.Descriptor instead. -func (*ApplyStatus) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{135} -} - -func (x *ApplyStatus) GetProcess() string { - if x != nil { - return x.Process - } - return "" -} - -func (x *ApplyStatus) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -func (x *ApplyStatus) GetAppliedVersion() int64 { - if x != nil { - return x.AppliedVersion - } - return 0 -} - -func (x *ApplyStatus) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -func (x *ApplyStatus) GetReportedAt() *timestamppb.Timestamp { - if x != nil { - return x.ReportedAt - } - return nil -} - -type PutApplyStatusRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Status *ApplyStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PutApplyStatusRequest) Reset() { - *x = PutApplyStatusRequest{} - mi := &file_state_v1_state_proto_msgTypes[136] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PutApplyStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PutApplyStatusRequest) ProtoMessage() {} - -func (x *PutApplyStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[136] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PutApplyStatusRequest.ProtoReflect.Descriptor instead. -func (*PutApplyStatusRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{136} -} - -func (x *PutApplyStatusRequest) GetStatus() *ApplyStatus { - if x != nil { - return x.Status - } - return nil -} - -type PutApplyStatusResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PutApplyStatusResponse) Reset() { - *x = PutApplyStatusResponse{} - mi := &file_state_v1_state_proto_msgTypes[137] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PutApplyStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PutApplyStatusResponse) ProtoMessage() {} - -func (x *PutApplyStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[137] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PutApplyStatusResponse.ProtoReflect.Descriptor instead. -func (*PutApplyStatusResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{137} -} - -type ListApplyStatusRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListApplyStatusRequest) Reset() { - *x = ListApplyStatusRequest{} - mi := &file_state_v1_state_proto_msgTypes[138] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListApplyStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListApplyStatusRequest) ProtoMessage() {} - -func (x *ListApplyStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[138] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListApplyStatusRequest.ProtoReflect.Descriptor instead. -func (*ListApplyStatusRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{138} -} - -type ListApplyStatusResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Statuses []*ApplyStatus `protobuf:"bytes,1,rep,name=statuses,proto3" json:"statuses,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListApplyStatusResponse) Reset() { - *x = ListApplyStatusResponse{} - mi := &file_state_v1_state_proto_msgTypes[139] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListApplyStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListApplyStatusResponse) ProtoMessage() {} - -func (x *ListApplyStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[139] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListApplyStatusResponse.ProtoReflect.Descriptor instead. -func (*ListApplyStatusResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{139} -} - -func (x *ListApplyStatusResponse) GetStatuses() []*ApplyStatus { - if x != nil { - return x.Statuses - } - return nil -} - -// Presence is one running service instance. ready and detail summarise its -// readiness probes; detail names the degraded ones. -type DependencyCheck struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` - Ready bool `protobuf:"varint,3,opt,name=ready,proto3" json:"ready,omitempty"` - Detail string `protobuf:"bytes,4,opt,name=detail,proto3" json:"detail,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DependencyCheck) Reset() { - *x = DependencyCheck{} - mi := &file_state_v1_state_proto_msgTypes[140] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DependencyCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DependencyCheck) ProtoMessage() {} - -func (x *DependencyCheck) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[140] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DependencyCheck.ProtoReflect.Descriptor instead. -func (*DependencyCheck) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{140} -} - -func (x *DependencyCheck) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *DependencyCheck) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *DependencyCheck) GetReady() bool { - if x != nil { - return x.Ready - } - return false -} - -func (x *DependencyCheck) GetDetail() string { - if x != nil { - return x.Detail - } - return "" -} - -type Presence struct { - state protoimpl.MessageState `protogen:"open.v1"` - Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` - InstanceId string `protobuf:"bytes,2,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - InstallType string `protobuf:"bytes,4,opt,name=install_type,json=installType,proto3" json:"install_type,omitempty"` - StartedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` - ReportedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=reported_at,json=reportedAt,proto3" json:"reported_at,omitempty"` - Ready bool `protobuf:"varint,7,opt,name=ready,proto3" json:"ready,omitempty"` - Detail string `protobuf:"bytes,8,opt,name=detail,proto3" json:"detail,omitempty"` - Checks []*DependencyCheck `protobuf:"bytes,9,rep,name=checks,proto3" json:"checks,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Presence) Reset() { - *x = Presence{} - mi := &file_state_v1_state_proto_msgTypes[141] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Presence) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Presence) ProtoMessage() {} - -func (x *Presence) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[141] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Presence.ProtoReflect.Descriptor instead. -func (*Presence) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{141} -} - -func (x *Presence) GetService() string { - if x != nil { - return x.Service - } - return "" -} - -func (x *Presence) GetInstanceId() string { - if x != nil { - return x.InstanceId - } - return "" -} - -func (x *Presence) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *Presence) GetInstallType() string { - if x != nil { - return x.InstallType - } - return "" -} - -func (x *Presence) GetStartedAt() *timestamppb.Timestamp { - if x != nil { - return x.StartedAt - } - return nil -} - -func (x *Presence) GetReportedAt() *timestamppb.Timestamp { - if x != nil { - return x.ReportedAt - } - return nil -} - -func (x *Presence) GetReady() bool { - if x != nil { - return x.Ready - } - return false -} - -func (x *Presence) GetDetail() string { - if x != nil { - return x.Detail - } - return "" -} - -func (x *Presence) GetChecks() []*DependencyCheck { - if x != nil { - return x.Checks - } - return nil -} - -type RecordCaptureRefusalRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` - Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` - RefusedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=refused_at,json=refusedAt,proto3" json:"refused_at,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecordCaptureRefusalRequest) Reset() { - *x = RecordCaptureRefusalRequest{} - mi := &file_state_v1_state_proto_msgTypes[142] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecordCaptureRefusalRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecordCaptureRefusalRequest) ProtoMessage() {} - -func (x *RecordCaptureRefusalRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[142] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecordCaptureRefusalRequest.ProtoReflect.Descriptor instead. -func (*RecordCaptureRefusalRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{142} -} - -func (x *RecordCaptureRefusalRequest) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -func (x *RecordCaptureRefusalRequest) GetAddr() string { - if x != nil { - return x.Addr - } - return "" -} - -func (x *RecordCaptureRefusalRequest) GetRefusedAt() *timestamppb.Timestamp { - if x != nil { - return x.RefusedAt - } - return nil -} - -type RecordCaptureRefusalResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecordCaptureRefusalResponse) Reset() { - *x = RecordCaptureRefusalResponse{} - mi := &file_state_v1_state_proto_msgTypes[143] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecordCaptureRefusalResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecordCaptureRefusalResponse) ProtoMessage() {} - -func (x *RecordCaptureRefusalResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[143] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecordCaptureRefusalResponse.ProtoReflect.Descriptor instead. -func (*RecordCaptureRefusalResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{143} -} - -type ListCaptureRefusalsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Since *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=since,proto3" json:"since,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListCaptureRefusalsRequest) Reset() { - *x = ListCaptureRefusalsRequest{} - mi := &file_state_v1_state_proto_msgTypes[144] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListCaptureRefusalsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListCaptureRefusalsRequest) ProtoMessage() {} - -func (x *ListCaptureRefusalsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[144] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListCaptureRefusalsRequest.ProtoReflect.Descriptor instead. -func (*ListCaptureRefusalsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{144} -} - -func (x *ListCaptureRefusalsRequest) GetSince() *timestamppb.Timestamp { - if x != nil { - return x.Since - } - return nil -} - -type CaptureRefusals struct { - state protoimpl.MessageState `protogen:"open.v1"` - Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` - Refused int64 `protobuf:"varint,2,opt,name=refused,proto3" json:"refused,omitempty"` - Accepted int64 `protobuf:"varint,3,opt,name=accepted,proto3" json:"accepted,omitempty"` - Addrs []string `protobuf:"bytes,4,rep,name=addrs,proto3" json:"addrs,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CaptureRefusals) Reset() { - *x = CaptureRefusals{} - mi := &file_state_v1_state_proto_msgTypes[145] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CaptureRefusals) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CaptureRefusals) ProtoMessage() {} - -func (x *CaptureRefusals) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[145] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CaptureRefusals.ProtoReflect.Descriptor instead. -func (*CaptureRefusals) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{145} -} - -func (x *CaptureRefusals) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -func (x *CaptureRefusals) GetRefused() int64 { - if x != nil { - return x.Refused - } - return 0 -} - -func (x *CaptureRefusals) GetAccepted() int64 { - if x != nil { - return x.Accepted - } - return 0 -} - -func (x *CaptureRefusals) GetAddrs() []string { - if x != nil { - return x.Addrs - } - return nil -} - -type ListCaptureRefusalsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Sources []*CaptureRefusals `protobuf:"bytes,1,rep,name=sources,proto3" json:"sources,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListCaptureRefusalsResponse) Reset() { - *x = ListCaptureRefusalsResponse{} - mi := &file_state_v1_state_proto_msgTypes[146] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListCaptureRefusalsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListCaptureRefusalsResponse) ProtoMessage() {} - -func (x *ListCaptureRefusalsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[146] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListCaptureRefusalsResponse.ProtoReflect.Descriptor instead. -func (*ListCaptureRefusalsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{146} -} - -func (x *ListCaptureRefusalsResponse) GetSources() []*CaptureRefusals { - if x != nil { - return x.Sources - } - return nil -} - -type PutPresenceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Presence *Presence `protobuf:"bytes,1,opt,name=presence,proto3" json:"presence,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PutPresenceRequest) Reset() { - *x = PutPresenceRequest{} - mi := &file_state_v1_state_proto_msgTypes[147] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PutPresenceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PutPresenceRequest) ProtoMessage() {} - -func (x *PutPresenceRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[147] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PutPresenceRequest.ProtoReflect.Descriptor instead. -func (*PutPresenceRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{147} -} - -func (x *PutPresenceRequest) GetPresence() *Presence { - if x != nil { - return x.Presence - } - return nil -} - -type PutPresenceResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PutPresenceResponse) Reset() { - *x = PutPresenceResponse{} - mi := &file_state_v1_state_proto_msgTypes[148] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PutPresenceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PutPresenceResponse) ProtoMessage() {} - -func (x *PutPresenceResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[148] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PutPresenceResponse.ProtoReflect.Descriptor instead. -func (*PutPresenceResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{148} -} - -type ListPresenceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListPresenceRequest) Reset() { - *x = ListPresenceRequest{} - mi := &file_state_v1_state_proto_msgTypes[149] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListPresenceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListPresenceRequest) ProtoMessage() {} - -func (x *ListPresenceRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[149] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListPresenceRequest.ProtoReflect.Descriptor instead. -func (*ListPresenceRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{149} -} - -type ListPresenceResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Presences []*Presence `protobuf:"bytes,1,rep,name=presences,proto3" json:"presences,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListPresenceResponse) Reset() { - *x = ListPresenceResponse{} - mi := &file_state_v1_state_proto_msgTypes[150] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListPresenceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListPresenceResponse) ProtoMessage() {} - -func (x *ListPresenceResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[150] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListPresenceResponse.ProtoReflect.Descriptor instead. -func (*ListPresenceResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{150} -} - -func (x *ListPresenceResponse) GetPresences() []*Presence { - if x != nil { - return x.Presences - } - return nil -} - -// TaskLogEntry mirrors internal/logging.Entry: one decoded log line. fields -// carries every remaining key as a JSON object string, the same way Event -// carries its data, so structured context survives the hop without this -// contract having to know what a call site attached. -type TaskLogEntry struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"` - Level string `protobuf:"bytes,3,opt,name=level,proto3" json:"level,omitempty"` - Msg string `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"` - FieldsJson string `protobuf:"bytes,5,opt,name=fields_json,json=fieldsJson,proto3" json:"fields_json,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TaskLogEntry) Reset() { - *x = TaskLogEntry{} - mi := &file_state_v1_state_proto_msgTypes[151] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TaskLogEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskLogEntry) ProtoMessage() {} - -func (x *TaskLogEntry) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[151] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TaskLogEntry.ProtoReflect.Descriptor instead. -func (*TaskLogEntry) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{151} -} - -func (x *TaskLogEntry) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *TaskLogEntry) GetTime() *timestamppb.Timestamp { - if x != nil { - return x.Time - } - return nil -} - -func (x *TaskLogEntry) GetLevel() string { - if x != nil { - return x.Level - } - return "" -} - -func (x *TaskLogEntry) GetMsg() string { - if x != nil { - return x.Msg - } - return "" -} - -func (x *TaskLogEntry) GetFieldsJson() string { - if x != nil { - return x.FieldsJson - } - return "" -} - -// ReadTaskLog returns a page of one task attempt's decoded log. attempt is the -// attempt the caller resolved (the dashboard sends the task's current attempt -// when the request omitted one). levels, component, contains, since and until -// carry the whole query the logging package's Tail accepts -- the wire mirrors -// that query rather than a subset of it, so a filter cannot silently stop -// working by crossing the boundary. limit is caller-capped -// (docs/prds/state-store-contract.md §8: the log cap is 2000). -type ReadTaskLogRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - Attempt int64 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` - Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` - Levels []string `protobuf:"bytes,4,rep,name=levels,proto3" json:"levels,omitempty"` - Component string `protobuf:"bytes,5,opt,name=component,proto3" json:"component,omitempty"` - Contains string `protobuf:"bytes,6,opt,name=contains,proto3" json:"contains,omitempty"` - Since *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=since,proto3" json:"since,omitempty"` - Until *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=until,proto3" json:"until,omitempty"` - // stage filters on an entry's own "stage" field. Only entries a stage - // tagged carry one -- agent and tool output is logged without a stage, so a - // stage filter narrows the file rather than covering it. Empty means any. - Stage string `protobuf:"bytes,9,opt,name=stage,proto3" json:"stage,omitempty"` - // before_id is the byte-offset cursor a previous page returned as cursor: the - // read returns the most recent matching entries ending at or before it. Zero - // reads the tail, which is the page the dashboard opens on. - BeforeId int64 `protobuf:"varint,10,opt,name=before_id,json=beforeId,proto3" json:"before_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ReadTaskLogRequest) Reset() { - *x = ReadTaskLogRequest{} - mi := &file_state_v1_state_proto_msgTypes[152] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ReadTaskLogRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReadTaskLogRequest) ProtoMessage() {} - -func (x *ReadTaskLogRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[152] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ReadTaskLogRequest.ProtoReflect.Descriptor instead. -func (*ReadTaskLogRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{152} -} - -func (x *ReadTaskLogRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *ReadTaskLogRequest) GetAttempt() int64 { - if x != nil { - return x.Attempt - } - return 0 -} - -func (x *ReadTaskLogRequest) GetLimit() int64 { - if x != nil { - return x.Limit - } - return 0 -} - -func (x *ReadTaskLogRequest) GetLevels() []string { - if x != nil { - return x.Levels - } - return nil -} - -func (x *ReadTaskLogRequest) GetComponent() string { - if x != nil { - return x.Component - } - return "" -} - -func (x *ReadTaskLogRequest) GetContains() string { - if x != nil { - return x.Contains - } - return "" -} - -func (x *ReadTaskLogRequest) GetSince() *timestamppb.Timestamp { - if x != nil { - return x.Since - } - return nil -} - -func (x *ReadTaskLogRequest) GetUntil() *timestamppb.Timestamp { - if x != nil { - return x.Until - } - return nil -} - -func (x *ReadTaskLogRequest) GetStage() string { - if x != nil { - return x.Stage - } - return "" -} - -func (x *ReadTaskLogRequest) GetBeforeId() int64 { - if x != nil { - return x.BeforeId - } - return 0 -} - -// found=false is not an error: the task has no log file for that attempt. -// That is a different condition from a process that cannot read logs at all -// (codes.Unavailable), and the dashboard reports them differently. -type ReadTaskLogResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Entries []*TaskLogEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` - Truncated bool `protobuf:"varint,2,opt,name=truncated,proto3" json:"truncated,omitempty"` - Attempt int64 `protobuf:"varint,3,opt,name=attempt,proto3" json:"attempt,omitempty"` - Found bool `protobuf:"varint,4,opt,name=found,proto3" json:"found,omitempty"` - Components []string `protobuf:"bytes,5,rep,name=components,proto3" json:"components,omitempty"` - // file is the path read, so the page can name where the log came from. It - // is the state directory's own layout, reported to an already-authenticated - // operator; no caller is expected to open it. - File string `protobuf:"bytes,6,opt,name=file,proto3" json:"file,omitempty"` - // more_available reports matching entries did not fit in this page; cursor - // is the before_id for the next older one. truncated is separate: it means - // the log is larger than the readable scan window, so its oldest entries - // cannot be reached by paging at all. - MoreAvailable bool `protobuf:"varint,7,opt,name=more_available,json=moreAvailable,proto3" json:"more_available,omitempty"` - Cursor int64 `protobuf:"varint,8,opt,name=cursor,proto3" json:"cursor,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ReadTaskLogResponse) Reset() { - *x = ReadTaskLogResponse{} - mi := &file_state_v1_state_proto_msgTypes[153] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ReadTaskLogResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReadTaskLogResponse) ProtoMessage() {} - -func (x *ReadTaskLogResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[153] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ReadTaskLogResponse.ProtoReflect.Descriptor instead. -func (*ReadTaskLogResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{153} -} - -func (x *ReadTaskLogResponse) GetEntries() []*TaskLogEntry { - if x != nil { - return x.Entries - } - return nil -} - -func (x *ReadTaskLogResponse) GetTruncated() bool { - if x != nil { - return x.Truncated - } - return false -} - -func (x *ReadTaskLogResponse) GetAttempt() int64 { - if x != nil { - return x.Attempt - } - return 0 -} - -func (x *ReadTaskLogResponse) GetFound() bool { - if x != nil { - return x.Found - } - return false -} - -func (x *ReadTaskLogResponse) GetComponents() []string { - if x != nil { - return x.Components - } - return nil -} - -func (x *ReadTaskLogResponse) GetFile() string { - if x != nil { - return x.File - } - return "" -} - -func (x *ReadTaskLogResponse) GetMoreAvailable() bool { - if x != nil { - return x.MoreAvailable - } - return false -} - -func (x *ReadTaskLogResponse) GetCursor() int64 { - if x != nil { - return x.Cursor - } - return 0 -} - -// StreamTaskLogContent returns one attempt's log verbatim, for a download. The -// bytes are the file's own JSONL, not a re-encoding of it: this contract -// transports the log, it does not restate the format. found=false, with no -// chunks, means the attempt has no log file -- not an error. -type StreamTaskLogContentRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - Attempt int64 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StreamTaskLogContentRequest) Reset() { - *x = StreamTaskLogContentRequest{} - mi := &file_state_v1_state_proto_msgTypes[154] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StreamTaskLogContentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamTaskLogContentRequest) ProtoMessage() {} - -func (x *StreamTaskLogContentRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[154] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamTaskLogContentRequest.ProtoReflect.Descriptor instead. -func (*StreamTaskLogContentRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{154} -} - -func (x *StreamTaskLogContentRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *StreamTaskLogContentRequest) GetAttempt() int64 { - if x != nil { - return x.Attempt - } - return 0 -} - -type StreamTaskLogContentResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` - Attempt int64 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` - Found bool `protobuf:"varint,3,opt,name=found,proto3" json:"found,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StreamTaskLogContentResponse) Reset() { - *x = StreamTaskLogContentResponse{} - mi := &file_state_v1_state_proto_msgTypes[155] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StreamTaskLogContentResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamTaskLogContentResponse) ProtoMessage() {} - -func (x *StreamTaskLogContentResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[155] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamTaskLogContentResponse.ProtoReflect.Descriptor instead. -func (*StreamTaskLogContentResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{155} -} - -func (x *StreamTaskLogContentResponse) GetChunk() []byte { - if x != nil { - return x.Chunk - } - return nil -} - -func (x *StreamTaskLogContentResponse) GetAttempt() int64 { - if x != nil { - return x.Attempt - } - return 0 -} - -func (x *StreamTaskLogContentResponse) GetFound() bool { - if x != nil { - return x.Found - } - return false -} - -type InsertCaptureRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Capture *CapturedEvent `protobuf:"bytes,1,opt,name=capture,proto3" json:"capture,omitempty"` - RetentionSeconds int64 `protobuf:"varint,2,opt,name=retention_seconds,json=retentionSeconds,proto3" json:"retention_seconds,omitempty"` - MaxEvents int64 `protobuf:"varint,3,opt,name=max_events,json=maxEvents,proto3" json:"max_events,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InsertCaptureRequest) Reset() { - *x = InsertCaptureRequest{} - mi := &file_state_v1_state_proto_msgTypes[156] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InsertCaptureRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InsertCaptureRequest) ProtoMessage() {} - -func (x *InsertCaptureRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[156] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InsertCaptureRequest.ProtoReflect.Descriptor instead. -func (*InsertCaptureRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{156} -} - -func (x *InsertCaptureRequest) GetCapture() *CapturedEvent { - if x != nil { - return x.Capture - } - return nil -} - -func (x *InsertCaptureRequest) GetRetentionSeconds() int64 { - if x != nil { - return x.RetentionSeconds - } - return 0 -} - -func (x *InsertCaptureRequest) GetMaxEvents() int64 { - if x != nil { - return x.MaxEvents - } - return 0 -} - -type InsertCaptureResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InsertCaptureResponse) Reset() { - *x = InsertCaptureResponse{} - mi := &file_state_v1_state_proto_msgTypes[157] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InsertCaptureResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InsertCaptureResponse) ProtoMessage() {} - -func (x *InsertCaptureResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[157] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InsertCaptureResponse.ProtoReflect.Descriptor instead. -func (*InsertCaptureResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{157} -} - -func (x *InsertCaptureResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type StreamCapturesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StreamCapturesRequest) Reset() { - *x = StreamCapturesRequest{} - mi := &file_state_v1_state_proto_msgTypes[158] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StreamCapturesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamCapturesRequest) ProtoMessage() {} - -func (x *StreamCapturesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[158] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamCapturesRequest.ProtoReflect.Descriptor instead. -func (*StreamCapturesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{158} -} - -func (x *StreamCapturesRequest) GetLimit() int64 { - if x != nil { - return x.Limit - } - return 0 -} - -// Streamed one capture per message; see StreamCaptures above. -type StreamCapturesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Capture *CapturedEvent `protobuf:"bytes,1,opt,name=capture,proto3" json:"capture,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StreamCapturesResponse) Reset() { - *x = StreamCapturesResponse{} - mi := &file_state_v1_state_proto_msgTypes[159] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StreamCapturesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamCapturesResponse) ProtoMessage() {} - -func (x *StreamCapturesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[159] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamCapturesResponse.ProtoReflect.Descriptor instead. -func (*StreamCapturesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{159} -} - -func (x *StreamCapturesResponse) GetCapture() *CapturedEvent { - if x != nil { - return x.Capture - } - return nil -} - -type InsertMappingRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Mapping *Mapping `protobuf:"bytes,1,opt,name=mapping,proto3" json:"mapping,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InsertMappingRequest) Reset() { - *x = InsertMappingRequest{} - mi := &file_state_v1_state_proto_msgTypes[160] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InsertMappingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InsertMappingRequest) ProtoMessage() {} - -func (x *InsertMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[160] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InsertMappingRequest.ProtoReflect.Descriptor instead. -func (*InsertMappingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{160} -} - -func (x *InsertMappingRequest) GetMapping() *Mapping { - if x != nil { - return x.Mapping - } - return nil -} - -type InsertMappingResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InsertMappingResponse) Reset() { - *x = InsertMappingResponse{} - mi := &file_state_v1_state_proto_msgTypes[161] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InsertMappingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InsertMappingResponse) ProtoMessage() {} - -func (x *InsertMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[161] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InsertMappingResponse.ProtoReflect.Descriptor instead. -func (*InsertMappingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{161} -} - -func (x *InsertMappingResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetMappingRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetMappingRequest) Reset() { - *x = GetMappingRequest{} - mi := &file_state_v1_state_proto_msgTypes[162] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetMappingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetMappingRequest) ProtoMessage() {} - -func (x *GetMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[162] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetMappingRequest.ProtoReflect.Descriptor instead. -func (*GetMappingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{162} -} - -func (x *GetMappingRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetMappingResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Mapping *Mapping `protobuf:"bytes,1,opt,name=mapping,proto3" json:"mapping,omitempty"` - Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetMappingResponse) Reset() { - *x = GetMappingResponse{} - mi := &file_state_v1_state_proto_msgTypes[163] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetMappingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetMappingResponse) ProtoMessage() {} - -func (x *GetMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[163] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetMappingResponse.ProtoReflect.Descriptor instead. -func (*GetMappingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{163} -} - -func (x *GetMappingResponse) GetMapping() *Mapping { - if x != nil { - return x.Mapping - } - return nil -} - -func (x *GetMappingResponse) GetFound() bool { - if x != nil { - return x.Found - } - return false -} - -type ListMappingsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListMappingsRequest) Reset() { - *x = ListMappingsRequest{} - mi := &file_state_v1_state_proto_msgTypes[164] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListMappingsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMappingsRequest) ProtoMessage() {} - -func (x *ListMappingsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[164] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMappingsRequest.ProtoReflect.Descriptor instead. -func (*ListMappingsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{164} -} - -type ListMappingsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Mappings []*Mapping `protobuf:"bytes,1,rep,name=mappings,proto3" json:"mappings,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListMappingsResponse) Reset() { - *x = ListMappingsResponse{} - mi := &file_state_v1_state_proto_msgTypes[165] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListMappingsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMappingsResponse) ProtoMessage() {} - -func (x *ListMappingsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[165] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMappingsResponse.ProtoReflect.Descriptor instead. -func (*ListMappingsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{165} -} - -func (x *ListMappingsResponse) GetMappings() []*Mapping { - if x != nil { - return x.Mappings - } - return nil -} - -type UpdateMappingRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Mapping *Mapping `protobuf:"bytes,1,opt,name=mapping,proto3" json:"mapping,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateMappingRequest) Reset() { - *x = UpdateMappingRequest{} - mi := &file_state_v1_state_proto_msgTypes[166] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateMappingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateMappingRequest) ProtoMessage() {} - -func (x *UpdateMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[166] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateMappingRequest.ProtoReflect.Descriptor instead. -func (*UpdateMappingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{166} -} - -func (x *UpdateMappingRequest) GetMapping() *Mapping { - if x != nil { - return x.Mapping - } - return nil -} - -type UpdateMappingResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateMappingResponse) Reset() { - *x = UpdateMappingResponse{} - mi := &file_state_v1_state_proto_msgTypes[167] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateMappingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateMappingResponse) ProtoMessage() {} - -func (x *UpdateMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[167] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateMappingResponse.ProtoReflect.Descriptor instead. -func (*UpdateMappingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{167} -} - -type DeleteMappingRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteMappingRequest) Reset() { - *x = DeleteMappingRequest{} - mi := &file_state_v1_state_proto_msgTypes[168] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteMappingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteMappingRequest) ProtoMessage() {} - -func (x *DeleteMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[168] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteMappingRequest.ProtoReflect.Descriptor instead. -func (*DeleteMappingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{168} -} - -func (x *DeleteMappingRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type DeleteMappingResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteMappingResponse) Reset() { - *x = DeleteMappingResponse{} - mi := &file_state_v1_state_proto_msgTypes[169] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteMappingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteMappingResponse) ProtoMessage() {} - -func (x *DeleteMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[169] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteMappingResponse.ProtoReflect.Descriptor instead. -func (*DeleteMappingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{169} -} - -type RecordMappingMatchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - MappingId string `protobuf:"bytes,1,opt,name=mapping_id,json=mappingId,proto3" json:"mapping_id,omitempty"` - CaptureId string `protobuf:"bytes,2,opt,name=capture_id,json=captureId,proto3" json:"capture_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecordMappingMatchRequest) Reset() { - *x = RecordMappingMatchRequest{} - mi := &file_state_v1_state_proto_msgTypes[170] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecordMappingMatchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecordMappingMatchRequest) ProtoMessage() {} - -func (x *RecordMappingMatchRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[170] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecordMappingMatchRequest.ProtoReflect.Descriptor instead. -func (*RecordMappingMatchRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{170} -} - -func (x *RecordMappingMatchRequest) GetMappingId() string { - if x != nil { - return x.MappingId - } - return "" -} - -func (x *RecordMappingMatchRequest) GetCaptureId() string { - if x != nil { - return x.CaptureId - } - return "" -} - -type RecordMappingMatchResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecordMappingMatchResponse) Reset() { - *x = RecordMappingMatchResponse{} - mi := &file_state_v1_state_proto_msgTypes[171] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecordMappingMatchResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecordMappingMatchResponse) ProtoMessage() {} - -func (x *RecordMappingMatchResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[171] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecordMappingMatchResponse.ProtoReflect.Descriptor instead. -func (*RecordMappingMatchResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{171} -} - -type InsertEventTypeRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - EventType *EventType `protobuf:"bytes,1,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InsertEventTypeRequest) Reset() { - *x = InsertEventTypeRequest{} - mi := &file_state_v1_state_proto_msgTypes[172] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InsertEventTypeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InsertEventTypeRequest) ProtoMessage() {} - -func (x *InsertEventTypeRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[172] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InsertEventTypeRequest.ProtoReflect.Descriptor instead. -func (*InsertEventTypeRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{172} -} - -func (x *InsertEventTypeRequest) GetEventType() *EventType { - if x != nil { - return x.EventType - } - return nil -} - -type InsertEventTypeResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InsertEventTypeResponse) Reset() { - *x = InsertEventTypeResponse{} - mi := &file_state_v1_state_proto_msgTypes[173] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InsertEventTypeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InsertEventTypeResponse) ProtoMessage() {} - -func (x *InsertEventTypeResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[173] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InsertEventTypeResponse.ProtoReflect.Descriptor instead. -func (*InsertEventTypeResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{173} -} - -func (x *InsertEventTypeResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type UpdateEventTypeRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - EventType *EventType `protobuf:"bytes,1,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateEventTypeRequest) Reset() { - *x = UpdateEventTypeRequest{} - mi := &file_state_v1_state_proto_msgTypes[174] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateEventTypeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateEventTypeRequest) ProtoMessage() {} - -func (x *UpdateEventTypeRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[174] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateEventTypeRequest.ProtoReflect.Descriptor instead. -func (*UpdateEventTypeRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{174} -} - -func (x *UpdateEventTypeRequest) GetEventType() *EventType { - if x != nil { - return x.EventType - } - return nil -} - -type UpdateEventTypeResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateEventTypeResponse) Reset() { - *x = UpdateEventTypeResponse{} - mi := &file_state_v1_state_proto_msgTypes[175] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateEventTypeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateEventTypeResponse) ProtoMessage() {} - -func (x *UpdateEventTypeResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[175] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateEventTypeResponse.ProtoReflect.Descriptor instead. -func (*UpdateEventTypeResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{175} -} - -type DeleteEventTypeRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteEventTypeRequest) Reset() { - *x = DeleteEventTypeRequest{} - mi := &file_state_v1_state_proto_msgTypes[176] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteEventTypeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteEventTypeRequest) ProtoMessage() {} - -func (x *DeleteEventTypeRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[176] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteEventTypeRequest.ProtoReflect.Descriptor instead. -func (*DeleteEventTypeRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{176} -} - -func (x *DeleteEventTypeRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type DeleteEventTypeResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteEventTypeResponse) Reset() { - *x = DeleteEventTypeResponse{} - mi := &file_state_v1_state_proto_msgTypes[177] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteEventTypeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteEventTypeResponse) ProtoMessage() {} - -func (x *DeleteEventTypeResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[177] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteEventTypeResponse.ProtoReflect.Descriptor instead. -func (*DeleteEventTypeResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{177} -} - -type ListEventTypesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListEventTypesRequest) Reset() { - *x = ListEventTypesRequest{} - mi := &file_state_v1_state_proto_msgTypes[178] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListEventTypesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListEventTypesRequest) ProtoMessage() {} - -func (x *ListEventTypesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[178] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListEventTypesRequest.ProtoReflect.Descriptor instead. -func (*ListEventTypesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{178} -} - -type ListEventTypesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - EventTypes []*EventType `protobuf:"bytes,1,rep,name=event_types,json=eventTypes,proto3" json:"event_types,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListEventTypesResponse) Reset() { - *x = ListEventTypesResponse{} - mi := &file_state_v1_state_proto_msgTypes[179] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListEventTypesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListEventTypesResponse) ProtoMessage() {} - -func (x *ListEventTypesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[179] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListEventTypesResponse.ProtoReflect.Descriptor instead. -func (*ListEventTypesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{179} -} - -func (x *ListEventTypesResponse) GetEventTypes() []*EventType { - if x != nil { - return x.EventTypes - } - return nil -} - -type InsertBindingRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Binding *Binding `protobuf:"bytes,1,opt,name=binding,proto3" json:"binding,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InsertBindingRequest) Reset() { - *x = InsertBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[180] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InsertBindingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InsertBindingRequest) ProtoMessage() {} - -func (x *InsertBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[180] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InsertBindingRequest.ProtoReflect.Descriptor instead. -func (*InsertBindingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{180} -} - -func (x *InsertBindingRequest) GetBinding() *Binding { - if x != nil { - return x.Binding - } - return nil -} - -type InsertBindingResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InsertBindingResponse) Reset() { - *x = InsertBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[181] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InsertBindingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InsertBindingResponse) ProtoMessage() {} - -func (x *InsertBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[181] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InsertBindingResponse.ProtoReflect.Descriptor instead. -func (*InsertBindingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{181} -} - -func (x *InsertBindingResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetBindingRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetBindingRequest) Reset() { - *x = GetBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[182] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetBindingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBindingRequest) ProtoMessage() {} - -func (x *GetBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[182] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetBindingRequest.ProtoReflect.Descriptor instead. -func (*GetBindingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{182} -} - -func (x *GetBindingRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetBindingResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Binding *Binding `protobuf:"bytes,1,opt,name=binding,proto3" json:"binding,omitempty"` - Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetBindingResponse) Reset() { - *x = GetBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[183] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetBindingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBindingResponse) ProtoMessage() {} - -func (x *GetBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[183] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetBindingResponse.ProtoReflect.Descriptor instead. -func (*GetBindingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{183} -} - -func (x *GetBindingResponse) GetBinding() *Binding { - if x != nil { - return x.Binding - } - return nil -} - -func (x *GetBindingResponse) GetFound() bool { - if x != nil { - return x.Found - } - return false -} - -type ListBindingsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListBindingsRequest) Reset() { - *x = ListBindingsRequest{} - mi := &file_state_v1_state_proto_msgTypes[184] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListBindingsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListBindingsRequest) ProtoMessage() {} - -func (x *ListBindingsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[184] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListBindingsRequest.ProtoReflect.Descriptor instead. -func (*ListBindingsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{184} -} - -type ListBindingsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Bindings []*Binding `protobuf:"bytes,1,rep,name=bindings,proto3" json:"bindings,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListBindingsResponse) Reset() { - *x = ListBindingsResponse{} - mi := &file_state_v1_state_proto_msgTypes[185] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListBindingsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListBindingsResponse) ProtoMessage() {} - -func (x *ListBindingsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[185] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListBindingsResponse.ProtoReflect.Descriptor instead. -func (*ListBindingsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{185} -} - -func (x *ListBindingsResponse) GetBindings() []*Binding { - if x != nil { - return x.Bindings - } - return nil -} - -type UpdateBindingRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Binding *Binding `protobuf:"bytes,1,opt,name=binding,proto3" json:"binding,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateBindingRequest) Reset() { - *x = UpdateBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[186] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateBindingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateBindingRequest) ProtoMessage() {} - -func (x *UpdateBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[186] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateBindingRequest.ProtoReflect.Descriptor instead. -func (*UpdateBindingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{186} -} - -func (x *UpdateBindingRequest) GetBinding() *Binding { - if x != nil { - return x.Binding - } - return nil -} - -type UpdateBindingResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateBindingResponse) Reset() { - *x = UpdateBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[187] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateBindingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateBindingResponse) ProtoMessage() {} - -func (x *UpdateBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[187] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateBindingResponse.ProtoReflect.Descriptor instead. -func (*UpdateBindingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{187} -} - -type DeleteBindingRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteBindingRequest) Reset() { - *x = DeleteBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[188] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteBindingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteBindingRequest) ProtoMessage() {} - -func (x *DeleteBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[188] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteBindingRequest.ProtoReflect.Descriptor instead. -func (*DeleteBindingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{188} -} - -func (x *DeleteBindingRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type DeleteBindingResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteBindingResponse) Reset() { - *x = DeleteBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[189] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteBindingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteBindingResponse) ProtoMessage() {} - -func (x *DeleteBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[189] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteBindingResponse.ProtoReflect.Descriptor instead. -func (*DeleteBindingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{189} -} - -type ApproveBindingRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ApproveBindingRequest) Reset() { - *x = ApproveBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[190] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ApproveBindingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApproveBindingRequest) ProtoMessage() {} - -func (x *ApproveBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[190] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApproveBindingRequest.ProtoReflect.Descriptor instead. -func (*ApproveBindingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{190} -} - -func (x *ApproveBindingRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type ApproveBindingResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ApproveBindingResponse) Reset() { - *x = ApproveBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[191] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ApproveBindingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApproveBindingResponse) ProtoMessage() {} - -func (x *ApproveBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[191] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApproveBindingResponse.ProtoReflect.Descriptor instead. -func (*ApproveBindingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{191} -} - -type SetSourceNameRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetSourceNameRequest) Reset() { - *x = SetSourceNameRequest{} - mi := &file_state_v1_state_proto_msgTypes[192] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetSourceNameRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetSourceNameRequest) ProtoMessage() {} - -func (x *SetSourceNameRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[192] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetSourceNameRequest.ProtoReflect.Descriptor instead. -func (*SetSourceNameRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{192} -} - -func (x *SetSourceNameRequest) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *SetSourceNameRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type SetSourceNameResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetSourceNameResponse) Reset() { - *x = SetSourceNameResponse{} - mi := &file_state_v1_state_proto_msgTypes[193] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetSourceNameResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetSourceNameResponse) ProtoMessage() {} - -func (x *SetSourceNameResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[193] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetSourceNameResponse.ProtoReflect.Descriptor instead. -func (*SetSourceNameResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{193} -} - -type SetSourceDeliveryHeaderRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - Header string `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetSourceDeliveryHeaderRequest) Reset() { - *x = SetSourceDeliveryHeaderRequest{} - mi := &file_state_v1_state_proto_msgTypes[194] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetSourceDeliveryHeaderRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetSourceDeliveryHeaderRequest) ProtoMessage() {} - -func (x *SetSourceDeliveryHeaderRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[194] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetSourceDeliveryHeaderRequest.ProtoReflect.Descriptor instead. -func (*SetSourceDeliveryHeaderRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{194} -} - -func (x *SetSourceDeliveryHeaderRequest) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *SetSourceDeliveryHeaderRequest) GetHeader() string { - if x != nil { - return x.Header - } - return "" -} - -type SetSourceDeliveryHeaderResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetSourceDeliveryHeaderResponse) Reset() { - *x = SetSourceDeliveryHeaderResponse{} - mi := &file_state_v1_state_proto_msgTypes[195] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetSourceDeliveryHeaderResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetSourceDeliveryHeaderResponse) ProtoMessage() {} - -func (x *SetSourceDeliveryHeaderResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[195] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetSourceDeliveryHeaderResponse.ProtoReflect.Descriptor instead. -func (*SetSourceDeliveryHeaderResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{195} -} - -type DeleteSourceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteSourceRequest) Reset() { - *x = DeleteSourceRequest{} - mi := &file_state_v1_state_proto_msgTypes[196] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteSourceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSourceRequest) ProtoMessage() {} - -func (x *DeleteSourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[196] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteSourceRequest.ProtoReflect.Descriptor instead. -func (*DeleteSourceRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{196} -} - -func (x *DeleteSourceRequest) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -type DeleteSourceResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteSourceResponse) Reset() { - *x = DeleteSourceResponse{} - mi := &file_state_v1_state_proto_msgTypes[197] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteSourceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSourceResponse) ProtoMessage() {} - -func (x *DeleteSourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[197] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteSourceResponse.ProtoReflect.Descriptor instead. -func (*DeleteSourceResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{197} -} - -type PauseBindingRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PauseBindingRequest) Reset() { - *x = PauseBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[198] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PauseBindingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PauseBindingRequest) ProtoMessage() {} - -func (x *PauseBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[198] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PauseBindingRequest.ProtoReflect.Descriptor instead. -func (*PauseBindingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{198} -} - -func (x *PauseBindingRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type PauseBindingResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PauseBindingResponse) Reset() { - *x = PauseBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[199] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PauseBindingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PauseBindingResponse) ProtoMessage() {} - -func (x *PauseBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[199] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PauseBindingResponse.ProtoReflect.Descriptor instead. -func (*PauseBindingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{199} -} - -type ResumeBindingRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ResumeBindingRequest) Reset() { - *x = ResumeBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[200] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ResumeBindingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResumeBindingRequest) ProtoMessage() {} - -func (x *ResumeBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[200] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResumeBindingRequest.ProtoReflect.Descriptor instead. -func (*ResumeBindingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{200} -} - -func (x *ResumeBindingRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type ResumeBindingResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ResumeBindingResponse) Reset() { - *x = ResumeBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[201] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ResumeBindingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResumeBindingResponse) ProtoMessage() {} - -func (x *ResumeBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[201] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResumeBindingResponse.ProtoReflect.Descriptor instead. -func (*ResumeBindingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{201} -} - -type InsertSourceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Source *Source `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InsertSourceRequest) Reset() { - *x = InsertSourceRequest{} - mi := &file_state_v1_state_proto_msgTypes[202] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InsertSourceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InsertSourceRequest) ProtoMessage() {} - -func (x *InsertSourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[202] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InsertSourceRequest.ProtoReflect.Descriptor instead. -func (*InsertSourceRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{202} -} - -func (x *InsertSourceRequest) GetSource() *Source { - if x != nil { - return x.Source - } - return nil -} - -type InsertSourceResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InsertSourceResponse) Reset() { - *x = InsertSourceResponse{} - mi := &file_state_v1_state_proto_msgTypes[203] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InsertSourceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InsertSourceResponse) ProtoMessage() {} - -func (x *InsertSourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[203] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InsertSourceResponse.ProtoReflect.Descriptor instead. -func (*InsertSourceResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{203} -} - -type GetSourceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetSourceRequest) Reset() { - *x = GetSourceRequest{} - mi := &file_state_v1_state_proto_msgTypes[204] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetSourceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSourceRequest) ProtoMessage() {} - -func (x *GetSourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[204] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSourceRequest.ProtoReflect.Descriptor instead. -func (*GetSourceRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{204} -} - -func (x *GetSourceRequest) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -type GetSourceResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Source *Source `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` - Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetSourceResponse) Reset() { - *x = GetSourceResponse{} - mi := &file_state_v1_state_proto_msgTypes[205] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetSourceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSourceResponse) ProtoMessage() {} - -func (x *GetSourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[205] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSourceResponse.ProtoReflect.Descriptor instead. -func (*GetSourceResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{205} -} - -func (x *GetSourceResponse) GetSource() *Source { - if x != nil { - return x.Source - } - return nil -} - -func (x *GetSourceResponse) GetFound() bool { - if x != nil { - return x.Found - } - return false -} - -type ListSourcesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListSourcesRequest) Reset() { - *x = ListSourcesRequest{} - mi := &file_state_v1_state_proto_msgTypes[206] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListSourcesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSourcesRequest) ProtoMessage() {} - -func (x *ListSourcesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[206] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListSourcesRequest.ProtoReflect.Descriptor instead. -func (*ListSourcesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{206} -} - -type ListSourcesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Sources []*Source `protobuf:"bytes,1,rep,name=sources,proto3" json:"sources,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListSourcesResponse) Reset() { - *x = ListSourcesResponse{} - mi := &file_state_v1_state_proto_msgTypes[207] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListSourcesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSourcesResponse) ProtoMessage() {} - -func (x *ListSourcesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[207] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListSourcesResponse.ProtoReflect.Descriptor instead. -func (*ListSourcesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{207} -} - -func (x *ListSourcesResponse) GetSources() []*Source { - if x != nil { - return x.Sources - } - return nil -} - -type SetSourceSigningRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` - To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetSourceSigningRequest) Reset() { - *x = SetSourceSigningRequest{} - mi := &file_state_v1_state_proto_msgTypes[208] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetSourceSigningRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetSourceSigningRequest) ProtoMessage() {} - -func (x *SetSourceSigningRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[208] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetSourceSigningRequest.ProtoReflect.Descriptor instead. -func (*SetSourceSigningRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{208} -} - -func (x *SetSourceSigningRequest) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *SetSourceSigningRequest) GetFrom() string { - if x != nil { - return x.From - } - return "" -} - -func (x *SetSourceSigningRequest) GetTo() string { - if x != nil { - return x.To - } - return "" -} - -type SetSourceSigningResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetSourceSigningResponse) Reset() { - *x = SetSourceSigningResponse{} - mi := &file_state_v1_state_proto_msgTypes[209] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetSourceSigningResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetSourceSigningResponse) ProtoMessage() {} - -func (x *SetSourceSigningResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[209] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetSourceSigningResponse.ProtoReflect.Descriptor instead. -func (*SetSourceSigningResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{209} -} - -type SetSourceSecretRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetSourceSecretRequest) Reset() { - *x = SetSourceSecretRequest{} - mi := &file_state_v1_state_proto_msgTypes[210] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetSourceSecretRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetSourceSecretRequest) ProtoMessage() {} - -func (x *SetSourceSecretRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[210] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetSourceSecretRequest.ProtoReflect.Descriptor instead. -func (*SetSourceSecretRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{210} -} - -func (x *SetSourceSecretRequest) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *SetSourceSecretRequest) GetSecret() string { - if x != nil { - return x.Secret - } - return "" -} - -type SetSourceSecretResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetSourceSecretResponse) Reset() { - *x = SetSourceSecretResponse{} - mi := &file_state_v1_state_proto_msgTypes[211] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetSourceSecretResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetSourceSecretResponse) ProtoMessage() {} - -func (x *SetSourceSecretResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[211] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetSourceSecretResponse.ProtoReflect.Descriptor instead. -func (*SetSourceSecretResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{211} -} - -type ArmedBindingsForSourceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ArmedBindingsForSourceRequest) Reset() { - *x = ArmedBindingsForSourceRequest{} - mi := &file_state_v1_state_proto_msgTypes[212] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ArmedBindingsForSourceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ArmedBindingsForSourceRequest) ProtoMessage() {} - -func (x *ArmedBindingsForSourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[212] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ArmedBindingsForSourceRequest.ProtoReflect.Descriptor instead. -func (*ArmedBindingsForSourceRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{212} -} - -func (x *ArmedBindingsForSourceRequest) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -type ArmedBindingsForSourceResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Bindings []*Binding `protobuf:"bytes,1,rep,name=bindings,proto3" json:"bindings,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ArmedBindingsForSourceResponse) Reset() { - *x = ArmedBindingsForSourceResponse{} - mi := &file_state_v1_state_proto_msgTypes[213] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ArmedBindingsForSourceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ArmedBindingsForSourceResponse) ProtoMessage() {} - -func (x *ArmedBindingsForSourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[213] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ArmedBindingsForSourceResponse.ProtoReflect.Descriptor instead. -func (*ArmedBindingsForSourceResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{213} -} - -func (x *ArmedBindingsForSourceResponse) GetBindings() []*Binding { - if x != nil { - return x.Bindings - } - return nil -} - -type RecordDispatchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - BindingId string `protobuf:"bytes,1,opt,name=binding_id,json=bindingId,proto3" json:"binding_id,omitempty"` - BindingVersion int64 `protobuf:"varint,2,opt,name=binding_version,json=bindingVersion,proto3" json:"binding_version,omitempty"` - CaptureId string `protobuf:"bytes,3,opt,name=capture_id,json=captureId,proto3" json:"capture_id,omitempty"` - // task_id addresses the tasks table. - TaskId int64 `protobuf:"varint,4,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - // reason is empty for a dispatch and names why an evaluated capture - // started no task. - Reason string `protobuf:"bytes,5,opt,name=reason,proto3" json:"reason,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecordDispatchRequest) Reset() { - *x = RecordDispatchRequest{} - mi := &file_state_v1_state_proto_msgTypes[214] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecordDispatchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecordDispatchRequest) ProtoMessage() {} - -func (x *RecordDispatchRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[214] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecordDispatchRequest.ProtoReflect.Descriptor instead. -func (*RecordDispatchRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{214} -} - -func (x *RecordDispatchRequest) GetBindingId() string { - if x != nil { - return x.BindingId - } - return "" -} - -func (x *RecordDispatchRequest) GetBindingVersion() int64 { - if x != nil { - return x.BindingVersion - } - return 0 -} - -func (x *RecordDispatchRequest) GetCaptureId() string { - if x != nil { - return x.CaptureId - } - return "" -} - -func (x *RecordDispatchRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *RecordDispatchRequest) GetReason() string { - if x != nil { - return x.Reason - } - return "" -} - -type RecordDispatchResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecordDispatchResponse) Reset() { - *x = RecordDispatchResponse{} - mi := &file_state_v1_state_proto_msgTypes[215] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecordDispatchResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecordDispatchResponse) ProtoMessage() {} - -func (x *RecordDispatchResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[215] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecordDispatchResponse.ProtoReflect.Descriptor instead. -func (*RecordDispatchResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{215} -} - -// ListDispatchesRequest filters the binding dispatch ledger; empty fields -// match any row. -type ListDispatchesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - BindingId string `protobuf:"bytes,1,opt,name=binding_id,json=bindingId,proto3" json:"binding_id,omitempty"` - CaptureId string `protobuf:"bytes,2,opt,name=capture_id,json=captureId,proto3" json:"capture_id,omitempty"` - TaskId int64 `protobuf:"varint,3,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListDispatchesRequest) Reset() { - *x = ListDispatchesRequest{} - mi := &file_state_v1_state_proto_msgTypes[216] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListDispatchesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListDispatchesRequest) ProtoMessage() {} - -func (x *ListDispatchesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[216] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListDispatchesRequest.ProtoReflect.Descriptor instead. -func (*ListDispatchesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{216} -} - -func (x *ListDispatchesRequest) GetBindingId() string { - if x != nil { - return x.BindingId - } - return "" -} - -func (x *ListDispatchesRequest) GetCaptureId() string { - if x != nil { - return x.CaptureId - } - return "" -} - -func (x *ListDispatchesRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *ListDispatchesRequest) GetLimit() int32 { - if x != nil { - return x.Limit - } - return 0 -} - -type Dispatch struct { - state protoimpl.MessageState `protogen:"open.v1"` - BindingId string `protobuf:"bytes,1,opt,name=binding_id,json=bindingId,proto3" json:"binding_id,omitempty"` - BindingVersion int64 `protobuf:"varint,2,opt,name=binding_version,json=bindingVersion,proto3" json:"binding_version,omitempty"` - CaptureId string `protobuf:"bytes,3,opt,name=capture_id,json=captureId,proto3" json:"capture_id,omitempty"` - TaskId int64 `protobuf:"varint,4,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - Reason string `protobuf:"bytes,5,opt,name=reason,proto3" json:"reason,omitempty"` - DispatchedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=dispatched_at,json=dispatchedAt,proto3" json:"dispatched_at,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Dispatch) Reset() { - *x = Dispatch{} - mi := &file_state_v1_state_proto_msgTypes[217] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Dispatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Dispatch) ProtoMessage() {} - -func (x *Dispatch) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[217] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Dispatch.ProtoReflect.Descriptor instead. -func (*Dispatch) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{217} -} - -func (x *Dispatch) GetBindingId() string { - if x != nil { - return x.BindingId - } - return "" -} - -func (x *Dispatch) GetBindingVersion() int64 { - if x != nil { - return x.BindingVersion - } - return 0 -} - -func (x *Dispatch) GetCaptureId() string { - if x != nil { - return x.CaptureId - } - return "" -} - -func (x *Dispatch) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *Dispatch) GetReason() string { - if x != nil { - return x.Reason - } - return "" -} - -func (x *Dispatch) GetDispatchedAt() *timestamppb.Timestamp { - if x != nil { - return x.DispatchedAt - } - return nil -} - -type ListDispatchesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Dispatches []*Dispatch `protobuf:"bytes,1,rep,name=dispatches,proto3" json:"dispatches,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListDispatchesResponse) Reset() { - *x = ListDispatchesResponse{} - mi := &file_state_v1_state_proto_msgTypes[218] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListDispatchesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListDispatchesResponse) ProtoMessage() {} - -func (x *ListDispatchesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[218] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListDispatchesResponse.ProtoReflect.Descriptor instead. -func (*ListDispatchesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{218} -} - -func (x *ListDispatchesResponse) GetDispatches() []*Dispatch { - if x != nil { - return x.Dispatches - } - return nil -} - -type RecordPlaybookDispatchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PlaybookId string `protobuf:"bytes,1,opt,name=playbook_id,json=playbookId,proto3" json:"playbook_id,omitempty"` - PlaybookVersion string `protobuf:"bytes,2,opt,name=playbook_version,json=playbookVersion,proto3" json:"playbook_version,omitempty"` - EventId string `protobuf:"bytes,3,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` - ActionId string `protobuf:"bytes,4,opt,name=action_id,json=actionId,proto3" json:"action_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecordPlaybookDispatchRequest) Reset() { - *x = RecordPlaybookDispatchRequest{} - mi := &file_state_v1_state_proto_msgTypes[219] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecordPlaybookDispatchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecordPlaybookDispatchRequest) ProtoMessage() {} - -func (x *RecordPlaybookDispatchRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[219] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecordPlaybookDispatchRequest.ProtoReflect.Descriptor instead. -func (*RecordPlaybookDispatchRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{219} -} - -func (x *RecordPlaybookDispatchRequest) GetPlaybookId() string { - if x != nil { - return x.PlaybookId - } - return "" -} - -func (x *RecordPlaybookDispatchRequest) GetPlaybookVersion() string { - if x != nil { - return x.PlaybookVersion - } - return "" -} - -func (x *RecordPlaybookDispatchRequest) GetEventId() string { - if x != nil { - return x.EventId - } - return "" -} - -func (x *RecordPlaybookDispatchRequest) GetActionId() string { - if x != nil { - return x.ActionId - } - return "" -} - -type RecordPlaybookDispatchResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecordPlaybookDispatchResponse) Reset() { - *x = RecordPlaybookDispatchResponse{} - mi := &file_state_v1_state_proto_msgTypes[220] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecordPlaybookDispatchResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecordPlaybookDispatchResponse) ProtoMessage() {} - -func (x *RecordPlaybookDispatchResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[220] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecordPlaybookDispatchResponse.ProtoReflect.Descriptor instead. -func (*RecordPlaybookDispatchResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{220} -} - -type DeletePlaybookDispatchesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PlaybookId string `protobuf:"bytes,1,opt,name=playbook_id,json=playbookId,proto3" json:"playbook_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeletePlaybookDispatchesRequest) Reset() { - *x = DeletePlaybookDispatchesRequest{} - mi := &file_state_v1_state_proto_msgTypes[221] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeletePlaybookDispatchesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeletePlaybookDispatchesRequest) ProtoMessage() {} - -func (x *DeletePlaybookDispatchesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[221] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeletePlaybookDispatchesRequest.ProtoReflect.Descriptor instead. -func (*DeletePlaybookDispatchesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{221} -} - -func (x *DeletePlaybookDispatchesRequest) GetPlaybookId() string { - if x != nil { - return x.PlaybookId - } - return "" -} - -type DeletePlaybookDispatchesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeletePlaybookDispatchesResponse) Reset() { - *x = DeletePlaybookDispatchesResponse{} - mi := &file_state_v1_state_proto_msgTypes[222] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeletePlaybookDispatchesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeletePlaybookDispatchesResponse) ProtoMessage() {} - -func (x *DeletePlaybookDispatchesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[222] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeletePlaybookDispatchesResponse.ProtoReflect.Descriptor instead. -func (*DeletePlaybookDispatchesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{222} -} - -type StreamUndispatchedCapturesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Bindings are the ids of the armed bindings, on enabled workflows, the - // captures are listed for. - Bindings []string `protobuf:"bytes,3,rep,name=bindings,proto3" json:"bindings,omitempty"` - Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StreamUndispatchedCapturesRequest) Reset() { - *x = StreamUndispatchedCapturesRequest{} - mi := &file_state_v1_state_proto_msgTypes[223] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StreamUndispatchedCapturesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamUndispatchedCapturesRequest) ProtoMessage() {} - -func (x *StreamUndispatchedCapturesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[223] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamUndispatchedCapturesRequest.ProtoReflect.Descriptor instead. -func (*StreamUndispatchedCapturesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{223} -} - -func (x *StreamUndispatchedCapturesRequest) GetBindings() []string { - if x != nil { - return x.Bindings - } - return nil -} - -func (x *StreamUndispatchedCapturesRequest) GetLimit() int64 { - if x != nil { - return x.Limit - } - return 0 -} - -// Streamed one capture per message; see StreamUndispatchedCaptures above. -type StreamUndispatchedCapturesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Capture *CapturedEvent `protobuf:"bytes,1,opt,name=capture,proto3" json:"capture,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StreamUndispatchedCapturesResponse) Reset() { - *x = StreamUndispatchedCapturesResponse{} - mi := &file_state_v1_state_proto_msgTypes[224] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StreamUndispatchedCapturesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamUndispatchedCapturesResponse) ProtoMessage() {} - -func (x *StreamUndispatchedCapturesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[224] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StreamUndispatchedCapturesResponse.ProtoReflect.Descriptor instead. -func (*StreamUndispatchedCapturesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{224} -} - -func (x *StreamUndispatchedCapturesResponse) GetCapture() *CapturedEvent { - if x != nil { - return x.Capture - } - return nil -} - -type EnqueueBindingTaskRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` - Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` - Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` - Workflow string `protobuf:"bytes,5,opt,name=workflow,proto3" json:"workflow,omitempty"` - Identity string `protobuf:"bytes,6,opt,name=identity,proto3" json:"identity,omitempty"` - BindingId string `protobuf:"bytes,7,opt,name=binding_id,json=bindingId,proto3" json:"binding_id,omitempty"` - BindingVersion int64 `protobuf:"varint,8,opt,name=binding_version,json=bindingVersion,proto3" json:"binding_version,omitempty"` - InputsJson string `protobuf:"bytes,9,opt,name=inputs_json,json=inputsJson,proto3" json:"inputs_json,omitempty"` - CaptureId string `protobuf:"bytes,10,opt,name=capture_id,json=captureId,proto3" json:"capture_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EnqueueBindingTaskRequest) Reset() { - *x = EnqueueBindingTaskRequest{} - mi := &file_state_v1_state_proto_msgTypes[225] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EnqueueBindingTaskRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnqueueBindingTaskRequest) ProtoMessage() {} - -func (x *EnqueueBindingTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[225] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnqueueBindingTaskRequest.ProtoReflect.Descriptor instead. -func (*EnqueueBindingTaskRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{225} -} - -func (x *EnqueueBindingTaskRequest) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *EnqueueBindingTaskRequest) GetRepo() string { - if x != nil { - return x.Repo - } - return "" -} - -func (x *EnqueueBindingTaskRequest) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *EnqueueBindingTaskRequest) GetBody() string { - if x != nil { - return x.Body - } - return "" -} - -func (x *EnqueueBindingTaskRequest) GetWorkflow() string { - if x != nil { - return x.Workflow - } - return "" -} - -func (x *EnqueueBindingTaskRequest) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *EnqueueBindingTaskRequest) GetBindingId() string { - if x != nil { - return x.BindingId - } - return "" -} - -func (x *EnqueueBindingTaskRequest) GetBindingVersion() int64 { - if x != nil { - return x.BindingVersion - } - return 0 -} - -func (x *EnqueueBindingTaskRequest) GetInputsJson() string { - if x != nil { - return x.InputsJson - } - return "" -} - -func (x *EnqueueBindingTaskRequest) GetCaptureId() string { - if x != nil { - return x.CaptureId - } - return "" -} - -type EnqueueBindingTaskResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EnqueueBindingTaskResponse) Reset() { - *x = EnqueueBindingTaskResponse{} - mi := &file_state_v1_state_proto_msgTypes[226] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EnqueueBindingTaskResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnqueueBindingTaskResponse) ProtoMessage() {} - -func (x *EnqueueBindingTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[226] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnqueueBindingTaskResponse.ProtoReflect.Descriptor instead. -func (*EnqueueBindingTaskResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{226} -} - -func (x *EnqueueBindingTaskResponse) GetTask() *Task { - if x != nil { - return x.Task - } - return nil -} - -// workflow.call: the caller's grant names the caller; the store derives the -// rest from the caller's row (docs/prds/workflow-calls.md). -type EnqueueCallTaskRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - CallerTaskId int64 `protobuf:"varint,1,opt,name=caller_task_id,json=callerTaskId,proto3" json:"caller_task_id,omitempty"` - Workflow string `protobuf:"bytes,2,opt,name=workflow,proto3" json:"workflow,omitempty"` - InputsJson string `protobuf:"bytes,3,opt,name=inputs_json,json=inputsJson,proto3" json:"inputs_json,omitempty"` - // call_key is the call site's durable identity: the call step's declared - // path within the run, plus the workflow it starts (so one task running a - // second definition at a colliding path does not reuse the first callee's - // child). The store stamps it on the child and, when the caller already - // started a child under it, returns that child instead of starting a second - // one. Required: a retry of one call site carries the same key, so the retry - // cannot duplicate the child's work. - CallKey string `protobuf:"bytes,4,opt,name=call_key,json=callKey,proto3" json:"call_key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EnqueueCallTaskRequest) Reset() { - *x = EnqueueCallTaskRequest{} - mi := &file_state_v1_state_proto_msgTypes[227] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EnqueueCallTaskRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnqueueCallTaskRequest) ProtoMessage() {} - -func (x *EnqueueCallTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[227] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnqueueCallTaskRequest.ProtoReflect.Descriptor instead. -func (*EnqueueCallTaskRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{227} -} - -func (x *EnqueueCallTaskRequest) GetCallerTaskId() int64 { - if x != nil { - return x.CallerTaskId - } - return 0 -} - -func (x *EnqueueCallTaskRequest) GetWorkflow() string { - if x != nil { - return x.Workflow - } - return "" -} - -func (x *EnqueueCallTaskRequest) GetInputsJson() string { - if x != nil { - return x.InputsJson - } - return "" -} - -func (x *EnqueueCallTaskRequest) GetCallKey() string { - if x != nil { - return x.CallKey - } - return "" -} - -type EnqueueCallTaskResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` - Accepted bool `protobuf:"varint,2,opt,name=accepted,proto3" json:"accepted,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EnqueueCallTaskResponse) Reset() { - *x = EnqueueCallTaskResponse{} - mi := &file_state_v1_state_proto_msgTypes[228] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EnqueueCallTaskResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnqueueCallTaskResponse) ProtoMessage() {} - -func (x *EnqueueCallTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[228] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnqueueCallTaskResponse.ProtoReflect.Descriptor instead. -func (*EnqueueCallTaskResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{228} -} - -func (x *EnqueueCallTaskResponse) GetTask() *Task { - if x != nil { - return x.Task - } - return nil -} - -func (x *EnqueueCallTaskResponse) GetAccepted() bool { - if x != nil { - return x.Accepted - } - return false -} - -type WorkflowCallStatusRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - CallerTaskId int64 `protobuf:"varint,1,opt,name=caller_task_id,json=callerTaskId,proto3" json:"caller_task_id,omitempty"` - CallTaskId int64 `protobuf:"varint,2,opt,name=call_task_id,json=callTaskId,proto3" json:"call_task_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *WorkflowCallStatusRequest) Reset() { - *x = WorkflowCallStatusRequest{} - mi := &file_state_v1_state_proto_msgTypes[229] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *WorkflowCallStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowCallStatusRequest) ProtoMessage() {} - -func (x *WorkflowCallStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[229] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkflowCallStatusRequest.ProtoReflect.Descriptor instead. -func (*WorkflowCallStatusRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{229} -} - -func (x *WorkflowCallStatusRequest) GetCallerTaskId() int64 { - if x != nil { - return x.CallerTaskId - } - return 0 -} - -func (x *WorkflowCallStatusRequest) GetCallTaskId() int64 { - if x != nil { - return x.CallTaskId - } - return 0 -} - -type WorkflowCallStatusResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // status is the callee's task status and detail its latest transition - // detail (empty before the callee first moves). outputs_json is the - // callee's written outputs (task.EncodeOutputs), so a wait:true caller can - // publish one as its own (docs/prds/workflow-call-outputs.md, "Storage and - // wire"). - Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"` - OutputsJson string `protobuf:"bytes,3,opt,name=outputs_json,json=outputsJson,proto3" json:"outputs_json,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *WorkflowCallStatusResponse) Reset() { - *x = WorkflowCallStatusResponse{} - mi := &file_state_v1_state_proto_msgTypes[230] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *WorkflowCallStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowCallStatusResponse) ProtoMessage() {} - -func (x *WorkflowCallStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[230] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkflowCallStatusResponse.ProtoReflect.Descriptor instead. -func (*WorkflowCallStatusResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{230} -} - -func (x *WorkflowCallStatusResponse) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *WorkflowCallStatusResponse) GetDetail() string { - if x != nil { - return x.Detail - } - return "" -} - -func (x *WorkflowCallStatusResponse) GetOutputsJson() string { - if x != nil { - return x.OutputsJson - } - return "" -} - -type InstalledPackage struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Reference string `protobuf:"bytes,3,opt,name=reference,proto3" json:"reference,omitempty"` - Digest string `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"` - DescriptorJson []byte `protobuf:"bytes,5,opt,name=descriptor_json,json=descriptorJson,proto3" json:"descriptor_json,omitempty"` - Layer []byte `protobuf:"bytes,6,opt,name=layer,proto3" json:"layer,omitempty"` - UpdatePolicy string `protobuf:"bytes,7,opt,name=update_policy,json=updatePolicy,proto3" json:"update_policy,omitempty"` - // The operator's accepted authority, recorded against the pinned digest. - // Absent until the operator accepts (docs/prds/store.md, "Authority"). - AcceptedAuthority *PackageAuthority `protobuf:"bytes,8,opt,name=accepted_authority,json=acceptedAuthority,proto3" json:"accepted_authority,omitempty"` - // An update waiting for approval of widened authority; the live pin above - // is unchanged until then. - Pending *PackagePin `protobuf:"bytes,9,opt,name=pending,proto3" json:"pending,omitempty"` - // The pin the last update or rollback replaced, with the authority accepted - // against it. - Previous *PackagePin `protobuf:"bytes,10,opt,name=previous,proto3" json:"previous,omitempty"` - PreviousAcceptedAuthority *PackageAuthority `protobuf:"bytes,11,opt,name=previous_accepted_authority,json=previousAcceptedAuthority,proto3" json:"previous_accepted_authority,omitempty"` - // What the pending update declares. - PendingAuthority *PackageAuthority `protobuf:"bytes,12,opt,name=pending_authority,json=pendingAuthority,proto3" json:"pending_authority,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InstalledPackage) Reset() { - *x = InstalledPackage{} - mi := &file_state_v1_state_proto_msgTypes[231] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InstalledPackage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InstalledPackage) ProtoMessage() {} - -func (x *InstalledPackage) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[231] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InstalledPackage.ProtoReflect.Descriptor instead. -func (*InstalledPackage) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{231} -} - -func (x *InstalledPackage) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *InstalledPackage) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *InstalledPackage) GetReference() string { - if x != nil { - return x.Reference - } - return "" -} - -func (x *InstalledPackage) GetDigest() string { - if x != nil { - return x.Digest - } - return "" -} - -func (x *InstalledPackage) GetDescriptorJson() []byte { - if x != nil { - return x.DescriptorJson - } - return nil -} - -func (x *InstalledPackage) GetLayer() []byte { - if x != nil { - return x.Layer - } - return nil -} - -func (x *InstalledPackage) GetUpdatePolicy() string { - if x != nil { - return x.UpdatePolicy - } - return "" -} - -func (x *InstalledPackage) GetAcceptedAuthority() *PackageAuthority { - if x != nil { - return x.AcceptedAuthority - } - return nil -} - -func (x *InstalledPackage) GetPending() *PackagePin { - if x != nil { - return x.Pending - } - return nil -} - -func (x *InstalledPackage) GetPrevious() *PackagePin { - if x != nil { - return x.Previous - } - return nil -} - -func (x *InstalledPackage) GetPreviousAcceptedAuthority() *PackageAuthority { - if x != nil { - return x.PreviousAcceptedAuthority - } - return nil -} - -func (x *InstalledPackage) GetPendingAuthority() *PackageAuthority { - if x != nil { - return x.PendingAuthority - } - return nil -} - -type PackagePin struct { - state protoimpl.MessageState `protogen:"open.v1"` - Reference string `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"` - Digest string `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PackagePin) Reset() { - *x = PackagePin{} - mi := &file_state_v1_state_proto_msgTypes[232] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PackagePin) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PackagePin) ProtoMessage() {} - -func (x *PackagePin) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[232] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PackagePin.ProtoReflect.Descriptor instead. -func (*PackagePin) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{232} -} - -func (x *PackagePin) GetReference() string { - if x != nil { - return x.Reference - } - return "" -} - -func (x *PackagePin) GetDigest() string { - if x != nil { - return x.Digest - } - return "" -} - -// PackageAuthority mirrors storepkg.Authority: the grants a package needs to -// operate. An acceptance record is an upper bound, checked field by field. -type PackageAuthority struct { - state protoimpl.MessageState `protogen:"open.v1"` - CredentialServices []string `protobuf:"bytes,1,rep,name=credential_services,json=credentialServices,proto3" json:"credential_services,omitempty"` - EgressHosts []string `protobuf:"bytes,2,rep,name=egress_hosts,json=egressHosts,proto3" json:"egress_hosts,omitempty"` - ForgePermissions []string `protobuf:"bytes,3,rep,name=forge_permissions,json=forgePermissions,proto3" json:"forge_permissions,omitempty"` - Triggers []string `protobuf:"bytes,4,rep,name=triggers,proto3" json:"triggers,omitempty"` - Tools []string `protobuf:"bytes,5,rep,name=tools,proto3" json:"tools,omitempty"` - Env []string `protobuf:"bytes,6,rep,name=env,proto3" json:"env,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PackageAuthority) Reset() { - *x = PackageAuthority{} - mi := &file_state_v1_state_proto_msgTypes[233] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PackageAuthority) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PackageAuthority) ProtoMessage() {} - -func (x *PackageAuthority) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[233] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PackageAuthority.ProtoReflect.Descriptor instead. -func (*PackageAuthority) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{233} -} - -func (x *PackageAuthority) GetCredentialServices() []string { - if x != nil { - return x.CredentialServices - } - return nil -} - -func (x *PackageAuthority) GetEgressHosts() []string { - if x != nil { - return x.EgressHosts - } - return nil -} - -func (x *PackageAuthority) GetForgePermissions() []string { - if x != nil { - return x.ForgePermissions - } - return nil -} - -func (x *PackageAuthority) GetTriggers() []string { - if x != nil { - return x.Triggers - } - return nil -} - -func (x *PackageAuthority) GetTools() []string { - if x != nil { - return x.Tools - } - return nil -} - -func (x *PackageAuthority) GetEnv() []string { - if x != nil { - return x.Env - } - return nil -} - -// Package and denial requests act in the org the State Store derives from the -// caller's principal, else the default org. -type InstallPackageRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Reference string `protobuf:"bytes,3,opt,name=reference,proto3" json:"reference,omitempty"` - Digest string `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InstallPackageRequest) Reset() { - *x = InstallPackageRequest{} - mi := &file_state_v1_state_proto_msgTypes[234] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InstallPackageRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InstallPackageRequest) ProtoMessage() {} - -func (x *InstallPackageRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[234] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InstallPackageRequest.ProtoReflect.Descriptor instead. -func (*InstallPackageRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{234} -} - -func (x *InstallPackageRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *InstallPackageRequest) GetReference() string { - if x != nil { - return x.Reference - } - return "" -} - -func (x *InstallPackageRequest) GetDigest() string { - if x != nil { - return x.Digest - } - return "" -} - -type InstallPackageResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Package *InstalledPackage `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InstallPackageResponse) Reset() { - *x = InstallPackageResponse{} - mi := &file_state_v1_state_proto_msgTypes[235] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InstallPackageResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InstallPackageResponse) ProtoMessage() {} - -func (x *InstallPackageResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[235] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InstallPackageResponse.ProtoReflect.Descriptor instead. -func (*InstallPackageResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{235} -} - -func (x *InstallPackageResponse) GetPackage() *InstalledPackage { - if x != nil { - return x.Package - } - return nil -} - -type CatalogueEntry struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Surface string `protobuf:"bytes,2,opt,name=surface,proto3" json:"surface,omitempty"` - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - Reference string `protobuf:"bytes,5,opt,name=reference,proto3" json:"reference,omitempty"` - Digest string `protobuf:"bytes,6,opt,name=digest,proto3" json:"digest,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CatalogueEntry) Reset() { - *x = CatalogueEntry{} - mi := &file_state_v1_state_proto_msgTypes[236] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CatalogueEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CatalogueEntry) ProtoMessage() {} - -func (x *CatalogueEntry) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[236] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CatalogueEntry.ProtoReflect.Descriptor instead. -func (*CatalogueEntry) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{236} -} - -func (x *CatalogueEntry) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CatalogueEntry) GetSurface() string { - if x != nil { - return x.Surface - } - return "" -} - -func (x *CatalogueEntry) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *CatalogueEntry) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *CatalogueEntry) GetReference() string { - if x != nil { - return x.Reference - } - return "" -} - -func (x *CatalogueEntry) GetDigest() string { - if x != nil { - return x.Digest - } - return "" -} - -type ListCatalogueRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListCatalogueRequest) Reset() { - *x = ListCatalogueRequest{} - mi := &file_state_v1_state_proto_msgTypes[237] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListCatalogueRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListCatalogueRequest) ProtoMessage() {} - -func (x *ListCatalogueRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[237] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListCatalogueRequest.ProtoReflect.Descriptor instead. -func (*ListCatalogueRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{237} -} - -type ListCatalogueResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Packages []*CatalogueEntry `protobuf:"bytes,1,rep,name=packages,proto3" json:"packages,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListCatalogueResponse) Reset() { - *x = ListCatalogueResponse{} - mi := &file_state_v1_state_proto_msgTypes[238] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListCatalogueResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListCatalogueResponse) ProtoMessage() {} - -func (x *ListCatalogueResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[238] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListCatalogueResponse.ProtoReflect.Descriptor instead. -func (*ListCatalogueResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{238} -} - -func (x *ListCatalogueResponse) GetPackages() []*CatalogueEntry { - if x != nil { - return x.Packages - } - return nil -} - -type InstallFromCatalogueRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InstallFromCatalogueRequest) Reset() { - *x = InstallFromCatalogueRequest{} - mi := &file_state_v1_state_proto_msgTypes[239] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InstallFromCatalogueRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InstallFromCatalogueRequest) ProtoMessage() {} - -func (x *InstallFromCatalogueRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[239] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InstallFromCatalogueRequest.ProtoReflect.Descriptor instead. -func (*InstallFromCatalogueRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{239} -} - -func (x *InstallFromCatalogueRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type InstallFromCatalogueResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Package *InstalledPackage `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InstallFromCatalogueResponse) Reset() { - *x = InstallFromCatalogueResponse{} - mi := &file_state_v1_state_proto_msgTypes[240] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InstallFromCatalogueResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InstallFromCatalogueResponse) ProtoMessage() {} - -func (x *InstallFromCatalogueResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[240] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InstallFromCatalogueResponse.ProtoReflect.Descriptor instead. -func (*InstallFromCatalogueResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{240} -} - -func (x *InstallFromCatalogueResponse) GetPackage() *InstalledPackage { - if x != nil { - return x.Package - } - return nil -} - -type GetInstalledPackageRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetInstalledPackageRequest) Reset() { - *x = GetInstalledPackageRequest{} - mi := &file_state_v1_state_proto_msgTypes[241] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetInstalledPackageRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetInstalledPackageRequest) ProtoMessage() {} - -func (x *GetInstalledPackageRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[241] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetInstalledPackageRequest.ProtoReflect.Descriptor instead. -func (*GetInstalledPackageRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{241} -} - -func (x *GetInstalledPackageRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type GetInstalledPackageResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Package *InstalledPackage `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetInstalledPackageResponse) Reset() { - *x = GetInstalledPackageResponse{} - mi := &file_state_v1_state_proto_msgTypes[242] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetInstalledPackageResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetInstalledPackageResponse) ProtoMessage() {} - -func (x *GetInstalledPackageResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[242] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetInstalledPackageResponse.ProtoReflect.Descriptor instead. -func (*GetInstalledPackageResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{242} -} - -func (x *GetInstalledPackageResponse) GetPackage() *InstalledPackage { - if x != nil { - return x.Package - } - return nil -} - -type ListInstalledPackagesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListInstalledPackagesRequest) Reset() { - *x = ListInstalledPackagesRequest{} - mi := &file_state_v1_state_proto_msgTypes[243] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListInstalledPackagesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListInstalledPackagesRequest) ProtoMessage() {} - -func (x *ListInstalledPackagesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[243] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListInstalledPackagesRequest.ProtoReflect.Descriptor instead. -func (*ListInstalledPackagesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{243} -} - -type ListInstalledPackagesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Packages []*InstalledPackage `protobuf:"bytes,1,rep,name=packages,proto3" json:"packages,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListInstalledPackagesResponse) Reset() { - *x = ListInstalledPackagesResponse{} - mi := &file_state_v1_state_proto_msgTypes[244] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListInstalledPackagesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListInstalledPackagesResponse) ProtoMessage() {} - -func (x *ListInstalledPackagesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[244] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListInstalledPackagesResponse.ProtoReflect.Descriptor instead. -func (*ListInstalledPackagesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{244} -} - -func (x *ListInstalledPackagesResponse) GetPackages() []*InstalledPackage { - if x != nil { - return x.Packages - } - return nil -} - -type AcceptPackageAuthorityRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Accepted *PackageAuthority `protobuf:"bytes,3,opt,name=accepted,proto3" json:"accepted,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AcceptPackageAuthorityRequest) Reset() { - *x = AcceptPackageAuthorityRequest{} - mi := &file_state_v1_state_proto_msgTypes[245] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AcceptPackageAuthorityRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AcceptPackageAuthorityRequest) ProtoMessage() {} - -func (x *AcceptPackageAuthorityRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[245] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AcceptPackageAuthorityRequest.ProtoReflect.Descriptor instead. -func (*AcceptPackageAuthorityRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{245} -} - -func (x *AcceptPackageAuthorityRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *AcceptPackageAuthorityRequest) GetAccepted() *PackageAuthority { - if x != nil { - return x.Accepted - } - return nil -} - -type AcceptPackageAuthorityResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Package *InstalledPackage `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AcceptPackageAuthorityResponse) Reset() { - *x = AcceptPackageAuthorityResponse{} - mi := &file_state_v1_state_proto_msgTypes[246] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AcceptPackageAuthorityResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AcceptPackageAuthorityResponse) ProtoMessage() {} - -func (x *AcceptPackageAuthorityResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[246] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AcceptPackageAuthorityResponse.ProtoReflect.Descriptor instead. -func (*AcceptPackageAuthorityResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{246} -} - -func (x *AcceptPackageAuthorityResponse) GetPackage() *InstalledPackage { - if x != nil { - return x.Package - } - return nil -} - -type RemoveInstalledPackageRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RemoveInstalledPackageRequest) Reset() { - *x = RemoveInstalledPackageRequest{} - mi := &file_state_v1_state_proto_msgTypes[247] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RemoveInstalledPackageRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveInstalledPackageRequest) ProtoMessage() {} - -func (x *RemoveInstalledPackageRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[247] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveInstalledPackageRequest.ProtoReflect.Descriptor instead. -func (*RemoveInstalledPackageRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{247} -} - -func (x *RemoveInstalledPackageRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type RemoveInstalledPackageResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RemoveInstalledPackageResponse) Reset() { - *x = RemoveInstalledPackageResponse{} - mi := &file_state_v1_state_proto_msgTypes[248] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RemoveInstalledPackageResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveInstalledPackageResponse) ProtoMessage() {} - -func (x *RemoveInstalledPackageResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[248] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveInstalledPackageResponse.ProtoReflect.Descriptor instead. -func (*RemoveInstalledPackageResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{248} -} - -type UpdatePackageRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdatePackageRequest) Reset() { - *x = UpdatePackageRequest{} - mi := &file_state_v1_state_proto_msgTypes[249] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdatePackageRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdatePackageRequest) ProtoMessage() {} - -func (x *UpdatePackageRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[249] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdatePackageRequest.ProtoReflect.Descriptor instead. -func (*UpdatePackageRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{249} -} - -func (x *UpdatePackageRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type UpdatePackageResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Package *InstalledPackage `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdatePackageResponse) Reset() { - *x = UpdatePackageResponse{} - mi := &file_state_v1_state_proto_msgTypes[250] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdatePackageResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdatePackageResponse) ProtoMessage() {} - -func (x *UpdatePackageResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[250] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdatePackageResponse.ProtoReflect.Descriptor instead. -func (*UpdatePackageResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{250} -} - -func (x *UpdatePackageResponse) GetPackage() *InstalledPackage { - if x != nil { - return x.Package - } - return nil -} - -type ApprovePackageUpdateRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ApprovePackageUpdateRequest) Reset() { - *x = ApprovePackageUpdateRequest{} - mi := &file_state_v1_state_proto_msgTypes[251] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ApprovePackageUpdateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApprovePackageUpdateRequest) ProtoMessage() {} - -func (x *ApprovePackageUpdateRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[251] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApprovePackageUpdateRequest.ProtoReflect.Descriptor instead. -func (*ApprovePackageUpdateRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{251} -} - -func (x *ApprovePackageUpdateRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type ApprovePackageUpdateResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Package *InstalledPackage `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ApprovePackageUpdateResponse) Reset() { - *x = ApprovePackageUpdateResponse{} - mi := &file_state_v1_state_proto_msgTypes[252] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ApprovePackageUpdateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApprovePackageUpdateResponse) ProtoMessage() {} - -func (x *ApprovePackageUpdateResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[252] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApprovePackageUpdateResponse.ProtoReflect.Descriptor instead. -func (*ApprovePackageUpdateResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{252} -} - -func (x *ApprovePackageUpdateResponse) GetPackage() *InstalledPackage { - if x != nil { - return x.Package - } - return nil -} - -type RollbackPackageRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RollbackPackageRequest) Reset() { - *x = RollbackPackageRequest{} - mi := &file_state_v1_state_proto_msgTypes[253] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RollbackPackageRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RollbackPackageRequest) ProtoMessage() {} - -func (x *RollbackPackageRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[253] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RollbackPackageRequest.ProtoReflect.Descriptor instead. -func (*RollbackPackageRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{253} -} - -func (x *RollbackPackageRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type RollbackPackageResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Package *InstalledPackage `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RollbackPackageResponse) Reset() { - *x = RollbackPackageResponse{} - mi := &file_state_v1_state_proto_msgTypes[254] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RollbackPackageResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RollbackPackageResponse) ProtoMessage() {} - -func (x *RollbackPackageResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[254] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RollbackPackageResponse.ProtoReflect.Descriptor instead. -func (*RollbackPackageResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{254} -} - -func (x *RollbackPackageResponse) GetPackage() *InstalledPackage { - if x != nil { - return x.Package - } - return nil -} - -type SetPackageUpdatePolicyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Policy string `protobuf:"bytes,2,opt,name=policy,proto3" json:"policy,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetPackageUpdatePolicyRequest) Reset() { - *x = SetPackageUpdatePolicyRequest{} - mi := &file_state_v1_state_proto_msgTypes[255] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetPackageUpdatePolicyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetPackageUpdatePolicyRequest) ProtoMessage() {} - -func (x *SetPackageUpdatePolicyRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[255] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetPackageUpdatePolicyRequest.ProtoReflect.Descriptor instead. -func (*SetPackageUpdatePolicyRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{255} -} - -func (x *SetPackageUpdatePolicyRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SetPackageUpdatePolicyRequest) GetPolicy() string { - if x != nil { - return x.Policy - } - return "" -} - -type SetPackageUpdatePolicyResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Package *InstalledPackage `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetPackageUpdatePolicyResponse) Reset() { - *x = SetPackageUpdatePolicyResponse{} - mi := &file_state_v1_state_proto_msgTypes[256] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetPackageUpdatePolicyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetPackageUpdatePolicyResponse) ProtoMessage() {} - -func (x *SetPackageUpdatePolicyResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[256] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetPackageUpdatePolicyResponse.ProtoReflect.Descriptor instead. -func (*SetPackageUpdatePolicyResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{256} -} - -func (x *SetPackageUpdatePolicyResponse) GetPackage() *InstalledPackage { - if x != nil { - return x.Package - } - return nil -} - -type GetPrincipalRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - IdentityId string `protobuf:"bytes,1,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetPrincipalRequest) Reset() { - *x = GetPrincipalRequest{} - mi := &file_state_v1_state_proto_msgTypes[257] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetPrincipalRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPrincipalRequest) ProtoMessage() {} - -func (x *GetPrincipalRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[257] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPrincipalRequest.ProtoReflect.Descriptor instead. -func (*GetPrincipalRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{257} -} - -func (x *GetPrincipalRequest) GetIdentityId() string { - if x != nil { - return x.IdentityId - } - return "" -} - -// PrincipalMembership mirrors org.Membership: an identity's role in an org, -// or in one workspace of it. -type PrincipalMembership struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - WorkspaceId string `protobuf:"bytes,2,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` - Role string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PrincipalMembership) Reset() { - *x = PrincipalMembership{} - mi := &file_state_v1_state_proto_msgTypes[258] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PrincipalMembership) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrincipalMembership) ProtoMessage() {} - -func (x *PrincipalMembership) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[258] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PrincipalMembership.ProtoReflect.Descriptor instead. -func (*PrincipalMembership) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{258} -} - -func (x *PrincipalMembership) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *PrincipalMembership) GetWorkspaceId() string { - if x != nil { - return x.WorkspaceId - } - return "" -} - -func (x *PrincipalMembership) GetRole() string { - if x != nil { - return x.Role - } - return "" -} - -// PrincipalWorkspace is one workspace of the principal's org, as policies -// read it. -type PrincipalWorkspace struct { - state protoimpl.MessageState `protogen:"open.v1"` - WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` - Environment string `protobuf:"bytes,2,opt,name=environment,proto3" json:"environment,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PrincipalWorkspace) Reset() { - *x = PrincipalWorkspace{} - mi := &file_state_v1_state_proto_msgTypes[259] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PrincipalWorkspace) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrincipalWorkspace) ProtoMessage() {} - -func (x *PrincipalWorkspace) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[259] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PrincipalWorkspace.ProtoReflect.Descriptor instead. -func (*PrincipalWorkspace) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{259} -} - -func (x *PrincipalWorkspace) GetWorkspaceId() string { - if x != nil { - return x.WorkspaceId - } - return "" -} - -func (x *PrincipalWorkspace) GetEnvironment() string { - if x != nil { - return x.Environment - } - return "" -} - -type AccessPrincipal struct { - state protoimpl.MessageState `protogen:"open.v1"` - IdentityId string `protobuf:"bytes,1,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` - OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - Memberships []*PrincipalMembership `protobuf:"bytes,3,rep,name=memberships,proto3" json:"memberships,omitempty"` - // workspaces are the workspaces of org_id. - Workspaces []*PrincipalWorkspace `protobuf:"bytes,4,rep,name=workspaces,proto3" json:"workspaces,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AccessPrincipal) Reset() { - *x = AccessPrincipal{} - mi := &file_state_v1_state_proto_msgTypes[260] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AccessPrincipal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccessPrincipal) ProtoMessage() {} - -func (x *AccessPrincipal) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[260] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccessPrincipal.ProtoReflect.Descriptor instead. -func (*AccessPrincipal) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{260} -} - -func (x *AccessPrincipal) GetIdentityId() string { - if x != nil { - return x.IdentityId - } - return "" -} - -func (x *AccessPrincipal) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *AccessPrincipal) GetMemberships() []*PrincipalMembership { - if x != nil { - return x.Memberships - } - return nil -} - -func (x *AccessPrincipal) GetWorkspaces() []*PrincipalWorkspace { - if x != nil { - return x.Workspaces - } - return nil -} - -type GetPrincipalResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Principal *AccessPrincipal `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetPrincipalResponse) Reset() { - *x = GetPrincipalResponse{} - mi := &file_state_v1_state_proto_msgTypes[261] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetPrincipalResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPrincipalResponse) ProtoMessage() {} - -func (x *GetPrincipalResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[261] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPrincipalResponse.ProtoReflect.Descriptor instead. -func (*GetPrincipalResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{261} -} - -func (x *GetPrincipalResponse) GetPrincipal() *AccessPrincipal { - if x != nil { - return x.Principal - } - return nil -} - -// AccessPolicy mirrors internal/domain/access.Policy: one Cedar policy -// document and the level-scope tuple that places it in the chain. -type AccessPolicy struct { - state protoimpl.MessageState `protogen:"open.v1"` - PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - Level string `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty"` - OrgId string `protobuf:"bytes,3,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - WorkspaceId string `protobuf:"bytes,4,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` - ObjectKind string `protobuf:"bytes,5,opt,name=object_kind,json=objectKind,proto3" json:"object_kind,omitempty"` - ObjectId string `protobuf:"bytes,6,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"` - Text string `protobuf:"bytes,7,opt,name=text,proto3" json:"text,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AccessPolicy) Reset() { - *x = AccessPolicy{} - mi := &file_state_v1_state_proto_msgTypes[262] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AccessPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccessPolicy) ProtoMessage() {} - -func (x *AccessPolicy) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[262] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccessPolicy.ProtoReflect.Descriptor instead. -func (*AccessPolicy) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{262} -} - -func (x *AccessPolicy) GetPolicyId() string { - if x != nil { - return x.PolicyId - } - return "" -} - -func (x *AccessPolicy) GetLevel() string { - if x != nil { - return x.Level - } - return "" -} - -func (x *AccessPolicy) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *AccessPolicy) GetWorkspaceId() string { - if x != nil { - return x.WorkspaceId - } - return "" -} - -func (x *AccessPolicy) GetObjectKind() string { - if x != nil { - return x.ObjectKind - } - return "" -} - -func (x *AccessPolicy) GetObjectId() string { - if x != nil { - return x.ObjectId - } - return "" -} - -func (x *AccessPolicy) GetText() string { - if x != nil { - return x.Text - } - return "" -} - -type ListPoliciesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListPoliciesRequest) Reset() { - *x = ListPoliciesRequest{} - mi := &file_state_v1_state_proto_msgTypes[263] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListPoliciesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListPoliciesRequest) ProtoMessage() {} - -func (x *ListPoliciesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[263] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListPoliciesRequest.ProtoReflect.Descriptor instead. -func (*ListPoliciesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{263} -} - -type ListPoliciesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Policies []*AccessPolicy `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListPoliciesResponse) Reset() { - *x = ListPoliciesResponse{} - mi := &file_state_v1_state_proto_msgTypes[264] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListPoliciesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListPoliciesResponse) ProtoMessage() {} - -func (x *ListPoliciesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[264] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListPoliciesResponse.ProtoReflect.Descriptor instead. -func (*ListPoliciesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{264} -} - -func (x *ListPoliciesResponse) GetPolicies() []*AccessPolicy { - if x != nil { - return x.Policies - } - return nil -} - -type GetPoliciesVersionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetPoliciesVersionRequest) Reset() { - *x = GetPoliciesVersionRequest{} - mi := &file_state_v1_state_proto_msgTypes[265] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetPoliciesVersionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPoliciesVersionRequest) ProtoMessage() {} - -func (x *GetPoliciesVersionRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[265] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPoliciesVersionRequest.ProtoReflect.Descriptor instead. -func (*GetPoliciesVersionRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{265} -} - -type GetPoliciesVersionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetPoliciesVersionResponse) Reset() { - *x = GetPoliciesVersionResponse{} - mi := &file_state_v1_state_proto_msgTypes[266] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetPoliciesVersionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPoliciesVersionResponse) ProtoMessage() {} - -func (x *GetPoliciesVersionResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[266] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPoliciesVersionResponse.ProtoReflect.Descriptor instead. -func (*GetPoliciesVersionResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{266} -} - -func (x *GetPoliciesVersionResponse) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -type PutPolicyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Policy *AccessPolicy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PutPolicyRequest) Reset() { - *x = PutPolicyRequest{} - mi := &file_state_v1_state_proto_msgTypes[267] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PutPolicyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PutPolicyRequest) ProtoMessage() {} - -func (x *PutPolicyRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[267] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PutPolicyRequest.ProtoReflect.Descriptor instead. -func (*PutPolicyRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{267} -} - -func (x *PutPolicyRequest) GetPolicy() *AccessPolicy { - if x != nil { - return x.Policy - } - return nil -} - -type PutPolicyResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PutPolicyResponse) Reset() { - *x = PutPolicyResponse{} - mi := &file_state_v1_state_proto_msgTypes[268] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PutPolicyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PutPolicyResponse) ProtoMessage() {} - -func (x *PutPolicyResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[268] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PutPolicyResponse.ProtoReflect.Descriptor instead. -func (*PutPolicyResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{268} -} - -func (x *PutPolicyResponse) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -type DeletePolicyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Policy *AccessPolicy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeletePolicyRequest) Reset() { - *x = DeletePolicyRequest{} - mi := &file_state_v1_state_proto_msgTypes[269] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeletePolicyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeletePolicyRequest) ProtoMessage() {} - -func (x *DeletePolicyRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[269] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeletePolicyRequest.ProtoReflect.Descriptor instead. -func (*DeletePolicyRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{269} -} - -func (x *DeletePolicyRequest) GetPolicy() *AccessPolicy { - if x != nil { - return x.Policy - } - return nil -} - -type DeletePolicyResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeletePolicyResponse) Reset() { - *x = DeletePolicyResponse{} - mi := &file_state_v1_state_proto_msgTypes[270] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeletePolicyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeletePolicyResponse) ProtoMessage() {} - -func (x *DeletePolicyResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[270] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeletePolicyResponse.ProtoReflect.Descriptor instead. -func (*DeletePolicyResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{270} -} - -type EnsureShippedOrgPoliciesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EnsureShippedOrgPoliciesRequest) Reset() { - *x = EnsureShippedOrgPoliciesRequest{} - mi := &file_state_v1_state_proto_msgTypes[271] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EnsureShippedOrgPoliciesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnsureShippedOrgPoliciesRequest) ProtoMessage() {} - -func (x *EnsureShippedOrgPoliciesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[271] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnsureShippedOrgPoliciesRequest.ProtoReflect.Descriptor instead. -func (*EnsureShippedOrgPoliciesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{271} -} - -func (x *EnsureShippedOrgPoliciesRequest) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -type EnsureShippedOrgPoliciesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EnsureShippedOrgPoliciesResponse) Reset() { - *x = EnsureShippedOrgPoliciesResponse{} - mi := &file_state_v1_state_proto_msgTypes[272] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EnsureShippedOrgPoliciesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnsureShippedOrgPoliciesResponse) ProtoMessage() {} - -func (x *EnsureShippedOrgPoliciesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[272] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnsureShippedOrgPoliciesResponse.ProtoReflect.Descriptor instead. -func (*EnsureShippedOrgPoliciesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{272} -} - -// AccessDenial mirrors internal/domain/access.Denial: one refusal with the -// level that decided it and the deciding policies. The store coalesces -// identical denials within a minute into one row with a count. -type AccessDenial struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - Principal string `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"` - Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` - ResourceKind string `protobuf:"bytes,4,opt,name=resource_kind,json=resourceKind,proto3" json:"resource_kind,omitempty"` - ResourceId string `protobuf:"bytes,5,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` - Level string `protobuf:"bytes,6,opt,name=level,proto3" json:"level,omitempty"` - Policies []string `protobuf:"bytes,7,rep,name=policies,proto3" json:"policies,omitempty"` - Count int64 `protobuf:"varint,8,opt,name=count,proto3" json:"count,omitempty"` - At *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=at,proto3" json:"at,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AccessDenial) Reset() { - *x = AccessDenial{} - mi := &file_state_v1_state_proto_msgTypes[273] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AccessDenial) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccessDenial) ProtoMessage() {} - -func (x *AccessDenial) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[273] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccessDenial.ProtoReflect.Descriptor instead. -func (*AccessDenial) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{273} -} - -func (x *AccessDenial) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *AccessDenial) GetPrincipal() string { - if x != nil { - return x.Principal - } - return "" -} - -func (x *AccessDenial) GetAction() string { - if x != nil { - return x.Action - } - return "" -} - -func (x *AccessDenial) GetResourceKind() string { - if x != nil { - return x.ResourceKind - } - return "" -} - -func (x *AccessDenial) GetResourceId() string { - if x != nil { - return x.ResourceId - } - return "" -} - -func (x *AccessDenial) GetLevel() string { - if x != nil { - return x.Level - } - return "" -} - -func (x *AccessDenial) GetPolicies() []string { - if x != nil { - return x.Policies - } - return nil -} - -func (x *AccessDenial) GetCount() int64 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *AccessDenial) GetAt() *timestamppb.Timestamp { - if x != nil { - return x.At - } - return nil -} - -type RecordDenialRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Denial *AccessDenial `protobuf:"bytes,1,opt,name=denial,proto3" json:"denial,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecordDenialRequest) Reset() { - *x = RecordDenialRequest{} - mi := &file_state_v1_state_proto_msgTypes[274] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecordDenialRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecordDenialRequest) ProtoMessage() {} - -func (x *RecordDenialRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[274] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecordDenialRequest.ProtoReflect.Descriptor instead. -func (*RecordDenialRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{274} -} - -func (x *RecordDenialRequest) GetDenial() *AccessDenial { - if x != nil { - return x.Denial - } - return nil -} - -type RecordDenialResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecordDenialResponse) Reset() { - *x = RecordDenialResponse{} - mi := &file_state_v1_state_proto_msgTypes[275] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecordDenialResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecordDenialResponse) ProtoMessage() {} - -func (x *RecordDenialResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[275] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecordDenialResponse.ProtoReflect.Descriptor instead. -func (*RecordDenialResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{275} -} - -type ListDenialsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListDenialsRequest) Reset() { - *x = ListDenialsRequest{} - mi := &file_state_v1_state_proto_msgTypes[276] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListDenialsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListDenialsRequest) ProtoMessage() {} - -func (x *ListDenialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[276] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListDenialsRequest.ProtoReflect.Descriptor instead. -func (*ListDenialsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{276} -} - -func (x *ListDenialsRequest) GetLimit() int32 { - if x != nil { - return x.Limit - } - return 0 -} - -type ListDenialsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Denials []*AccessDenial `protobuf:"bytes,1,rep,name=denials,proto3" json:"denials,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListDenialsResponse) Reset() { - *x = ListDenialsResponse{} - mi := &file_state_v1_state_proto_msgTypes[277] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListDenialsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListDenialsResponse) ProtoMessage() {} - -func (x *ListDenialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[277] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListDenialsResponse.ProtoReflect.Descriptor instead. -func (*ListDenialsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{277} -} - -func (x *ListDenialsResponse) GetDenials() []*AccessDenial { - if x != nil { - return x.Denials - } - return nil -} - -// Org mirrors internal/domain/org.Org: one tenant. -type Org struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Org) Reset() { - *x = Org{} - mi := &file_state_v1_state_proto_msgTypes[278] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Org) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Org) ProtoMessage() {} - -func (x *Org) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[278] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Org.ProtoReflect.Descriptor instead. -func (*Org) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{278} -} - -func (x *Org) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Org) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// Workspace mirrors internal/domain/org.Workspace: a division of an org. -type Workspace struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Environment string `protobuf:"bytes,4,opt,name=environment,proto3" json:"environment,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Workspace) Reset() { - *x = Workspace{} - mi := &file_state_v1_state_proto_msgTypes[279] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Workspace) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Workspace) ProtoMessage() {} - -func (x *Workspace) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[279] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Workspace.ProtoReflect.Descriptor instead. -func (*Workspace) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{279} -} - -func (x *Workspace) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Workspace) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *Workspace) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Workspace) GetEnvironment() string { - if x != nil { - return x.Environment - } - return "" -} - -// Member mirrors internal/domain/org.Member: a membership with the identity -// it names, as the dashboard lists it. -type Member struct { - state protoimpl.MessageState `protogen:"open.v1"` - IdentityId string `protobuf:"bytes,1,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` - Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` - DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - WorkspaceId string `protobuf:"bytes,4,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` - Role string `protobuf:"bytes,5,opt,name=role,proto3" json:"role,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Member) Reset() { - *x = Member{} - mi := &file_state_v1_state_proto_msgTypes[280] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Member) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Member) ProtoMessage() {} - -func (x *Member) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[280] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Member.ProtoReflect.Descriptor instead. -func (*Member) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{280} -} - -func (x *Member) GetIdentityId() string { - if x != nil { - return x.IdentityId - } - return "" -} - -func (x *Member) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -func (x *Member) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Member) GetWorkspaceId() string { - if x != nil { - return x.WorkspaceId - } - return "" -} - -func (x *Member) GetRole() string { - if x != nil { - return x.Role - } - return "" -} - -type ListOrgsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListOrgsRequest) Reset() { - *x = ListOrgsRequest{} - mi := &file_state_v1_state_proto_msgTypes[281] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListOrgsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListOrgsRequest) ProtoMessage() {} - -func (x *ListOrgsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[281] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListOrgsRequest.ProtoReflect.Descriptor instead. -func (*ListOrgsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{281} -} - -type ListOrgsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Orgs []*Org `protobuf:"bytes,1,rep,name=orgs,proto3" json:"orgs,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListOrgsResponse) Reset() { - *x = ListOrgsResponse{} - mi := &file_state_v1_state_proto_msgTypes[282] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListOrgsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListOrgsResponse) ProtoMessage() {} - -func (x *ListOrgsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[282] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListOrgsResponse.ProtoReflect.Descriptor instead. -func (*ListOrgsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{282} -} - -func (x *ListOrgsResponse) GetOrgs() []*Org { - if x != nil { - return x.Orgs - } - return nil -} - -type GetOrgRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetOrgRequest) Reset() { - *x = GetOrgRequest{} - mi := &file_state_v1_state_proto_msgTypes[283] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetOrgRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetOrgRequest) ProtoMessage() {} - -func (x *GetOrgRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[283] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetOrgRequest.ProtoReflect.Descriptor instead. -func (*GetOrgRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{283} -} - -func (x *GetOrgRequest) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -type GetOrgResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Org *Org `protobuf:"bytes,1,opt,name=org,proto3" json:"org,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetOrgResponse) Reset() { - *x = GetOrgResponse{} - mi := &file_state_v1_state_proto_msgTypes[284] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetOrgResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetOrgResponse) ProtoMessage() {} - -func (x *GetOrgResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[284] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetOrgResponse.ProtoReflect.Descriptor instead. -func (*GetOrgResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{284} -} - -func (x *GetOrgResponse) GetOrg() *Org { - if x != nil { - return x.Org - } - return nil -} - -// CreateOrgRequest creates an org with its default workspace and its first -// owner. Only an instance admin may. -type CreateOrgRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - OwnerIdentityId string `protobuf:"bytes,3,opt,name=owner_identity_id,json=ownerIdentityId,proto3" json:"owner_identity_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateOrgRequest) Reset() { - *x = CreateOrgRequest{} - mi := &file_state_v1_state_proto_msgTypes[285] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateOrgRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateOrgRequest) ProtoMessage() {} - -func (x *CreateOrgRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[285] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateOrgRequest.ProtoReflect.Descriptor instead. -func (*CreateOrgRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{285} -} - -func (x *CreateOrgRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *CreateOrgRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CreateOrgRequest) GetOwnerIdentityId() string { - if x != nil { - return x.OwnerIdentityId - } - return "" -} - -type CreateOrgResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Org *Org `protobuf:"bytes,1,opt,name=org,proto3" json:"org,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateOrgResponse) Reset() { - *x = CreateOrgResponse{} - mi := &file_state_v1_state_proto_msgTypes[286] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateOrgResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateOrgResponse) ProtoMessage() {} - -func (x *CreateOrgResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[286] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateOrgResponse.ProtoReflect.Descriptor instead. -func (*CreateOrgResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{286} -} - -func (x *CreateOrgResponse) GetOrg() *Org { - if x != nil { - return x.Org - } - return nil -} - -type ListWorkspacesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListWorkspacesRequest) Reset() { - *x = ListWorkspacesRequest{} - mi := &file_state_v1_state_proto_msgTypes[287] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListWorkspacesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkspacesRequest) ProtoMessage() {} - -func (x *ListWorkspacesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[287] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListWorkspacesRequest.ProtoReflect.Descriptor instead. -func (*ListWorkspacesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{287} -} - -func (x *ListWorkspacesRequest) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -type ListWorkspacesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Workspaces []*Workspace `protobuf:"bytes,1,rep,name=workspaces,proto3" json:"workspaces,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListWorkspacesResponse) Reset() { - *x = ListWorkspacesResponse{} - mi := &file_state_v1_state_proto_msgTypes[288] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListWorkspacesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkspacesResponse) ProtoMessage() {} - -func (x *ListWorkspacesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[288] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListWorkspacesResponse.ProtoReflect.Descriptor instead. -func (*ListWorkspacesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{288} -} - -func (x *ListWorkspacesResponse) GetWorkspaces() []*Workspace { - if x != nil { - return x.Workspaces - } - return nil -} - -type CreateWorkspaceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Environment string `protobuf:"bytes,4,opt,name=environment,proto3" json:"environment,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateWorkspaceRequest) Reset() { - *x = CreateWorkspaceRequest{} - mi := &file_state_v1_state_proto_msgTypes[289] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateWorkspaceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateWorkspaceRequest) ProtoMessage() {} - -func (x *CreateWorkspaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[289] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateWorkspaceRequest.ProtoReflect.Descriptor instead. -func (*CreateWorkspaceRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{289} -} - -func (x *CreateWorkspaceRequest) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *CreateWorkspaceRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *CreateWorkspaceRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CreateWorkspaceRequest) GetEnvironment() string { - if x != nil { - return x.Environment - } - return "" -} - -type CreateWorkspaceResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Workspace *Workspace `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateWorkspaceResponse) Reset() { - *x = CreateWorkspaceResponse{} - mi := &file_state_v1_state_proto_msgTypes[290] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateWorkspaceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateWorkspaceResponse) ProtoMessage() {} - -func (x *CreateWorkspaceResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[290] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateWorkspaceResponse.ProtoReflect.Descriptor instead. -func (*CreateWorkspaceResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{290} -} - -func (x *CreateWorkspaceResponse) GetWorkspace() *Workspace { - if x != nil { - return x.Workspace - } - return nil -} - -type ListMembersRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListMembersRequest) Reset() { - *x = ListMembersRequest{} - mi := &file_state_v1_state_proto_msgTypes[291] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListMembersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMembersRequest) ProtoMessage() {} - -func (x *ListMembersRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[291] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMembersRequest.ProtoReflect.Descriptor instead. -func (*ListMembersRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{291} -} - -func (x *ListMembersRequest) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -type ListMembersResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Members []*Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListMembersResponse) Reset() { - *x = ListMembersResponse{} - mi := &file_state_v1_state_proto_msgTypes[292] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListMembersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMembersResponse) ProtoMessage() {} - -func (x *ListMembersResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[292] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMembersResponse.ProtoReflect.Descriptor instead. -func (*ListMembersResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{292} -} - -func (x *ListMembersResponse) GetMembers() []*Member { - if x != nil { - return x.Members - } - return nil -} - -type SetMembershipRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - IdentityId string `protobuf:"bytes,2,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` - WorkspaceId string `protobuf:"bytes,3,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` - Role string `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetMembershipRequest) Reset() { - *x = SetMembershipRequest{} - mi := &file_state_v1_state_proto_msgTypes[293] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetMembershipRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetMembershipRequest) ProtoMessage() {} - -func (x *SetMembershipRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[293] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetMembershipRequest.ProtoReflect.Descriptor instead. -func (*SetMembershipRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{293} -} - -func (x *SetMembershipRequest) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *SetMembershipRequest) GetIdentityId() string { - if x != nil { - return x.IdentityId - } - return "" -} - -func (x *SetMembershipRequest) GetWorkspaceId() string { - if x != nil { - return x.WorkspaceId - } - return "" -} - -func (x *SetMembershipRequest) GetRole() string { - if x != nil { - return x.Role - } - return "" -} - -type SetMembershipResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetMembershipResponse) Reset() { - *x = SetMembershipResponse{} - mi := &file_state_v1_state_proto_msgTypes[294] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetMembershipResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetMembershipResponse) ProtoMessage() {} - -func (x *SetMembershipResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[294] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetMembershipResponse.ProtoReflect.Descriptor instead. -func (*SetMembershipResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{294} -} - -type RemoveMembershipRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - IdentityId string `protobuf:"bytes,2,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` - WorkspaceId string `protobuf:"bytes,3,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RemoveMembershipRequest) Reset() { - *x = RemoveMembershipRequest{} - mi := &file_state_v1_state_proto_msgTypes[295] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RemoveMembershipRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveMembershipRequest) ProtoMessage() {} - -func (x *RemoveMembershipRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[295] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveMembershipRequest.ProtoReflect.Descriptor instead. -func (*RemoveMembershipRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{295} -} - -func (x *RemoveMembershipRequest) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *RemoveMembershipRequest) GetIdentityId() string { - if x != nil { - return x.IdentityId - } - return "" -} - -func (x *RemoveMembershipRequest) GetWorkspaceId() string { - if x != nil { - return x.WorkspaceId - } - return "" -} - -type RemoveMembershipResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RemoveMembershipResponse) Reset() { - *x = RemoveMembershipResponse{} - mi := &file_state_v1_state_proto_msgTypes[296] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RemoveMembershipResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveMembershipResponse) ProtoMessage() {} - -func (x *RemoveMembershipResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[296] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveMembershipResponse.ProtoReflect.Descriptor instead. -func (*RemoveMembershipResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{296} -} - -type AssignAgentRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - IdentityId string `protobuf:"bytes,2,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AssignAgentRequest) Reset() { - *x = AssignAgentRequest{} - mi := &file_state_v1_state_proto_msgTypes[297] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AssignAgentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AssignAgentRequest) ProtoMessage() {} - -func (x *AssignAgentRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[297] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AssignAgentRequest.ProtoReflect.Descriptor instead. -func (*AssignAgentRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{297} -} - -func (x *AssignAgentRequest) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *AssignAgentRequest) GetIdentityId() string { - if x != nil { - return x.IdentityId - } - return "" -} - -type AssignAgentResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AssignAgentResponse) Reset() { - *x = AssignAgentResponse{} - mi := &file_state_v1_state_proto_msgTypes[298] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AssignAgentResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AssignAgentResponse) ProtoMessage() {} - -func (x *AssignAgentResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[298] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AssignAgentResponse.ProtoReflect.Descriptor instead. -func (*AssignAgentResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{298} -} - -type RecentLogsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Query *v1.LogQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecentLogsRequest) Reset() { - *x = RecentLogsRequest{} - mi := &file_state_v1_state_proto_msgTypes[299] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecentLogsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecentLogsRequest) ProtoMessage() {} - -func (x *RecentLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[299] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecentLogsRequest.ProtoReflect.Descriptor instead. -func (*RecentLogsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{299} -} - -func (x *RecentLogsRequest) GetQuery() *v1.LogQuery { - if x != nil { - return x.Query - } - return nil -} - -type RecentLogsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Snapshot *v1.LogSnapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecentLogsResponse) Reset() { - *x = RecentLogsResponse{} - mi := &file_state_v1_state_proto_msgTypes[300] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecentLogsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecentLogsResponse) ProtoMessage() {} - -func (x *RecentLogsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[300] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecentLogsResponse.ProtoReflect.Descriptor instead. -func (*RecentLogsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{300} -} - -func (x *RecentLogsResponse) GetSnapshot() *v1.LogSnapshot { - if x != nil { - return x.Snapshot - } - return nil -} - -// UsageRecord mirrors usage.Record. A task's record belongs to the task's -// org; any other belongs to the calling principal's org. -type UsageRecord struct { - state protoimpl.MessageState `protogen:"open.v1"` - // source is task, chat or curator. - Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` - TaskId int64 `protobuf:"varint,3,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - Attempt int64 `protobuf:"varint,4,opt,name=attempt,proto3" json:"attempt,omitempty"` - Workflow string `protobuf:"bytes,5,opt,name=workflow,proto3" json:"workflow,omitempty"` - Step string `protobuf:"bytes,6,opt,name=step,proto3" json:"step,omitempty"` - Alias string `protobuf:"bytes,7,opt,name=alias,proto3" json:"alias,omitempty"` - Provider string `protobuf:"bytes,8,opt,name=provider,proto3" json:"provider,omitempty"` - Model string `protobuf:"bytes,9,opt,name=model,proto3" json:"model,omitempty"` - InputTokens int64 `protobuf:"varint,10,opt,name=input_tokens,json=inputTokens,proto3" json:"input_tokens,omitempty"` - OutputTokens int64 `protobuf:"varint,11,opt,name=output_tokens,json=outputTokens,proto3" json:"output_tokens,omitempty"` - CachedTokens int64 `protobuf:"varint,12,opt,name=cached_tokens,json=cachedTokens,proto3" json:"cached_tokens,omitempty"` - At *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=at,proto3" json:"at,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UsageRecord) Reset() { - *x = UsageRecord{} - mi := &file_state_v1_state_proto_msgTypes[301] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UsageRecord) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UsageRecord) ProtoMessage() {} - -func (x *UsageRecord) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[301] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UsageRecord.ProtoReflect.Descriptor instead. -func (*UsageRecord) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{301} -} - -func (x *UsageRecord) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -func (x *UsageRecord) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -func (x *UsageRecord) GetAttempt() int64 { - if x != nil { - return x.Attempt - } - return 0 -} - -func (x *UsageRecord) GetWorkflow() string { - if x != nil { - return x.Workflow - } - return "" -} - -func (x *UsageRecord) GetStep() string { - if x != nil { - return x.Step - } - return "" -} - -func (x *UsageRecord) GetAlias() string { - if x != nil { - return x.Alias - } - return "" -} - -func (x *UsageRecord) GetProvider() string { - if x != nil { - return x.Provider - } - return "" -} - -func (x *UsageRecord) GetModel() string { - if x != nil { - return x.Model - } - return "" -} - -func (x *UsageRecord) GetInputTokens() int64 { - if x != nil { - return x.InputTokens - } - return 0 -} - -func (x *UsageRecord) GetOutputTokens() int64 { - if x != nil { - return x.OutputTokens - } - return 0 -} - -func (x *UsageRecord) GetCachedTokens() int64 { - if x != nil { - return x.CachedTokens - } - return 0 -} - -func (x *UsageRecord) GetAt() *timestamppb.Timestamp { - if x != nil { - return x.At - } - return nil -} - -type RecordUsageRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Record *UsageRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecordUsageRequest) Reset() { - *x = RecordUsageRequest{} - mi := &file_state_v1_state_proto_msgTypes[302] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecordUsageRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecordUsageRequest) ProtoMessage() {} - -func (x *RecordUsageRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[302] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecordUsageRequest.ProtoReflect.Descriptor instead. -func (*RecordUsageRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{302} -} - -func (x *RecordUsageRequest) GetRecord() *UsageRecord { - if x != nil { - return x.Record - } - return nil -} - -type RecordUsageResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecordUsageResponse) Reset() { - *x = RecordUsageResponse{} - mi := &file_state_v1_state_proto_msgTypes[303] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecordUsageResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecordUsageResponse) ProtoMessage() {} - -func (x *RecordUsageResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[303] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecordUsageResponse.ProtoReflect.Descriptor instead. -func (*RecordUsageResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{303} -} - -type TaskModelsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TaskModelsRequest) Reset() { - *x = TaskModelsRequest{} - mi := &file_state_v1_state_proto_msgTypes[304] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TaskModelsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskModelsRequest) ProtoMessage() {} - -func (x *TaskModelsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[304] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TaskModelsRequest.ProtoReflect.Descriptor instead. -func (*TaskModelsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{304} -} - -func (x *TaskModelsRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -type TaskInstructionsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TaskInstructionsRequest) Reset() { - *x = TaskInstructionsRequest{} - mi := &file_state_v1_state_proto_msgTypes[305] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TaskInstructionsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskInstructionsRequest) ProtoMessage() {} - -func (x *TaskInstructionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[305] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TaskInstructionsRequest.ProtoReflect.Descriptor instead. -func (*TaskInstructionsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{305} -} - -func (x *TaskInstructionsRequest) GetTaskId() int64 { - if x != nil { - return x.TaskId - } - return 0 -} - -type TaskInstructionsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Instance string `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` - Organisation string `protobuf:"bytes,2,opt,name=organisation,proto3" json:"organisation,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TaskInstructionsResponse) Reset() { - *x = TaskInstructionsResponse{} - mi := &file_state_v1_state_proto_msgTypes[306] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TaskInstructionsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskInstructionsResponse) ProtoMessage() {} - -func (x *TaskInstructionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[306] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TaskInstructionsResponse.ProtoReflect.Descriptor instead. -func (*TaskInstructionsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{306} -} - -func (x *TaskInstructionsResponse) GetInstance() string { - if x != nil { - return x.Instance - } - return "" -} - -func (x *TaskInstructionsResponse) GetOrganisation() string { - if x != nil { - return x.Organisation - } - return "" -} - -type TaskModelsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - Aliases map[string]string `protobuf:"bytes,2,rep,name=aliases,proto3" json:"aliases,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Providers map[string]*ModelProvider `protobuf:"bytes,3,rep,name=providers,proto3" json:"providers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TaskModelsResponse) Reset() { - *x = TaskModelsResponse{} - mi := &file_state_v1_state_proto_msgTypes[307] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TaskModelsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskModelsResponse) ProtoMessage() {} - -func (x *TaskModelsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[307] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TaskModelsResponse.ProtoReflect.Descriptor instead. -func (*TaskModelsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{307} -} - -func (x *TaskModelsResponse) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *TaskModelsResponse) GetAliases() map[string]string { - if x != nil { - return x.Aliases - } - return nil -} - -func (x *TaskModelsResponse) GetProviders() map[string]*ModelProvider { - if x != nil { - return x.Providers - } - return nil -} - -// ModelProvider is an org's own provider. Its key is the org's credential -// binding named after it. -type ModelProvider struct { - state protoimpl.MessageState `protogen:"open.v1"` - Class string `protobuf:"bytes,1,opt,name=class,proto3" json:"class,omitempty"` - BaseUrl string `protobuf:"bytes,2,opt,name=base_url,json=baseUrl,proto3" json:"base_url,omitempty"` - ApiKeyEnv string `protobuf:"bytes,3,opt,name=api_key_env,json=apiKeyEnv,proto3" json:"api_key_env,omitempty"` - // The provider's credential reference: where its key lives, never the key - // itself. A daemon resolves a model egress credential from it; without it - // every provider arrives credential-less and no runtime can be built. - ApiKeyEngine string `protobuf:"bytes,4,opt,name=api_key_engine,json=apiKeyEngine,proto3" json:"api_key_engine,omitempty"` - ApiKeyKey string `protobuf:"bytes,5,opt,name=api_key_key,json=apiKeyKey,proto3" json:"api_key_key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ModelProvider) Reset() { - *x = ModelProvider{} - mi := &file_state_v1_state_proto_msgTypes[308] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ModelProvider) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ModelProvider) ProtoMessage() {} - -func (x *ModelProvider) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[308] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ModelProvider.ProtoReflect.Descriptor instead. -func (*ModelProvider) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{308} -} - -func (x *ModelProvider) GetClass() string { - if x != nil { - return x.Class - } - return "" -} - -func (x *ModelProvider) GetBaseUrl() string { - if x != nil { - return x.BaseUrl - } - return "" -} - -func (x *ModelProvider) GetApiKeyEnv() string { - if x != nil { - return x.ApiKeyEnv - } - return "" -} - -func (x *ModelProvider) GetApiKeyEngine() string { - if x != nil { - return x.ApiKeyEngine - } - return "" -} - -func (x *ModelProvider) GetApiKeyKey() string { - if x != nil { - return x.ApiKeyKey - } - return "" -} - -type CallerModelsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CallerModelsRequest) Reset() { - *x = CallerModelsRequest{} - mi := &file_state_v1_state_proto_msgTypes[309] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CallerModelsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CallerModelsRequest) ProtoMessage() {} - -func (x *CallerModelsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[309] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CallerModelsRequest.ProtoReflect.Descriptor instead. -func (*CallerModelsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{309} -} - -type CallerModelsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - Aliases map[string]string `protobuf:"bytes,2,rep,name=aliases,proto3" json:"aliases,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CallerModelsResponse) Reset() { - *x = CallerModelsResponse{} - mi := &file_state_v1_state_proto_msgTypes[310] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CallerModelsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CallerModelsResponse) ProtoMessage() {} - -func (x *CallerModelsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[310] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CallerModelsResponse.ProtoReflect.Descriptor instead. -func (*CallerModelsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{310} -} - -func (x *CallerModelsResponse) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *CallerModelsResponse) GetAliases() map[string]string { - if x != nil { - return x.Aliases - } - return nil -} - -// Alert mirrors internal/domain/alert.Alert. Severity is info, warning or -// action; state is open, resolved or dismissed. -type Alert struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - Kind string `protobuf:"bytes,3,opt,name=kind,proto3" json:"kind,omitempty"` - Subject string `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` - Severity string `protobuf:"bytes,5,opt,name=severity,proto3" json:"severity,omitempty"` - Title string `protobuf:"bytes,6,opt,name=title,proto3" json:"title,omitempty"` - Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"` - Link string `protobuf:"bytes,8,opt,name=link,proto3" json:"link,omitempty"` - Condition bool `protobuf:"varint,9,opt,name=condition,proto3" json:"condition,omitempty"` - State string `protobuf:"bytes,10,opt,name=state,proto3" json:"state,omitempty"` - FirstRaised *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=first_raised,json=firstRaised,proto3" json:"first_raised,omitempty"` - LastSeen *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen,omitempty"` - Count int64 `protobuf:"varint,13,opt,name=count,proto3" json:"count,omitempty"` - ClosedBy string `protobuf:"bytes,14,opt,name=closed_by,json=closedBy,proto3" json:"closed_by,omitempty"` - ClosedAt *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=closed_at,json=closedAt,proto3" json:"closed_at,omitempty"` - Deliveries []*AlertDelivery `protobuf:"bytes,16,rep,name=deliveries,proto3" json:"deliveries,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Alert) Reset() { - *x = Alert{} - mi := &file_state_v1_state_proto_msgTypes[311] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Alert) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Alert) ProtoMessage() {} - -func (x *Alert) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[311] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Alert.ProtoReflect.Descriptor instead. -func (*Alert) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{311} -} - -func (x *Alert) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Alert) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *Alert) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -func (x *Alert) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *Alert) GetSeverity() string { - if x != nil { - return x.Severity - } - return "" -} - -func (x *Alert) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *Alert) GetBody() string { - if x != nil { - return x.Body - } - return "" -} - -func (x *Alert) GetLink() string { - if x != nil { - return x.Link - } - return "" -} - -func (x *Alert) GetCondition() bool { - if x != nil { - return x.Condition - } - return false -} - -func (x *Alert) GetState() string { - if x != nil { - return x.State - } - return "" -} - -func (x *Alert) GetFirstRaised() *timestamppb.Timestamp { - if x != nil { - return x.FirstRaised - } - return nil -} - -func (x *Alert) GetLastSeen() *timestamppb.Timestamp { - if x != nil { - return x.LastSeen - } - return nil -} - -func (x *Alert) GetCount() int64 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *Alert) GetClosedBy() string { - if x != nil { - return x.ClosedBy - } - return "" -} - -func (x *Alert) GetClosedAt() *timestamppb.Timestamp { - if x != nil { - return x.ClosedAt - } - return nil -} - -func (x *Alert) GetDeliveries() []*AlertDelivery { - if x != nil { - return x.Deliveries - } - return nil -} - -// AlertDelivery is one outbound notice an alert owed. Event is raised or -// resolved; state is pending, delivered, failed or skipped. -type AlertDelivery struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Event string `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` - State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - Attempts []*AlertAttempt `protobuf:"bytes,5,rep,name=attempts,proto3" json:"attempts,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AlertDelivery) Reset() { - *x = AlertDelivery{} - mi := &file_state_v1_state_proto_msgTypes[312] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AlertDelivery) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AlertDelivery) ProtoMessage() {} - -func (x *AlertDelivery) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[312] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AlertDelivery.ProtoReflect.Descriptor instead. -func (*AlertDelivery) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{312} -} - -func (x *AlertDelivery) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *AlertDelivery) GetEvent() string { - if x != nil { - return x.Event - } - return "" -} - -func (x *AlertDelivery) GetState() string { - if x != nil { - return x.State - } - return "" -} - -func (x *AlertDelivery) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *AlertDelivery) GetAttempts() []*AlertAttempt { - if x != nil { - return x.Attempts - } - return nil -} - -type AlertAttempt struct { - state protoimpl.MessageState `protogen:"open.v1"` - N int64 `protobuf:"varint,1,opt,name=n,proto3" json:"n,omitempty"` - At *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=at,proto3" json:"at,omitempty"` - StatusCode int64 `protobuf:"varint,3,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` - Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AlertAttempt) Reset() { - *x = AlertAttempt{} - mi := &file_state_v1_state_proto_msgTypes[313] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AlertAttempt) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AlertAttempt) ProtoMessage() {} - -func (x *AlertAttempt) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[313] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AlertAttempt.ProtoReflect.Descriptor instead. -func (*AlertAttempt) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{313} -} - -func (x *AlertAttempt) GetN() int64 { - if x != nil { - return x.N - } - return 0 -} - -func (x *AlertAttempt) GetAt() *timestamppb.Timestamp { - if x != nil { - return x.At - } - return nil -} - -func (x *AlertAttempt) GetStatusCode() int64 { - if x != nil { - return x.StatusCode - } - return 0 -} - -func (x *AlertAttempt) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -type RaiseAlertRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` - Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` - Severity string `protobuf:"bytes,4,opt,name=severity,proto3" json:"severity,omitempty"` - Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` - Body string `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"` - Link string `protobuf:"bytes,7,opt,name=link,proto3" json:"link,omitempty"` - // condition is true when the raiser resolves the alert itself once the - // condition clears; an event alert stays until dismissed. - Condition bool `protobuf:"varint,8,opt,name=condition,proto3" json:"condition,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RaiseAlertRequest) Reset() { - *x = RaiseAlertRequest{} - mi := &file_state_v1_state_proto_msgTypes[314] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RaiseAlertRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RaiseAlertRequest) ProtoMessage() {} - -func (x *RaiseAlertRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[314] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RaiseAlertRequest.ProtoReflect.Descriptor instead. -func (*RaiseAlertRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{314} -} - -func (x *RaiseAlertRequest) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *RaiseAlertRequest) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -func (x *RaiseAlertRequest) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *RaiseAlertRequest) GetSeverity() string { - if x != nil { - return x.Severity - } - return "" -} - -func (x *RaiseAlertRequest) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *RaiseAlertRequest) GetBody() string { - if x != nil { - return x.Body - } - return "" -} - -func (x *RaiseAlertRequest) GetLink() string { - if x != nil { - return x.Link - } - return "" -} - -func (x *RaiseAlertRequest) GetCondition() bool { - if x != nil { - return x.Condition - } - return false -} - -type RaiseAlertResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Alert *Alert `protobuf:"bytes,1,opt,name=alert,proto3" json:"alert,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RaiseAlertResponse) Reset() { - *x = RaiseAlertResponse{} - mi := &file_state_v1_state_proto_msgTypes[315] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RaiseAlertResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RaiseAlertResponse) ProtoMessage() {} - -func (x *RaiseAlertResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[315] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RaiseAlertResponse.ProtoReflect.Descriptor instead. -func (*RaiseAlertResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{315} -} - -func (x *RaiseAlertResponse) GetAlert() *Alert { - if x != nil { - return x.Alert - } - return nil -} - -type ResolveAlertRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` - Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ResolveAlertRequest) Reset() { - *x = ResolveAlertRequest{} - mi := &file_state_v1_state_proto_msgTypes[316] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ResolveAlertRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResolveAlertRequest) ProtoMessage() {} - -func (x *ResolveAlertRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[316] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResolveAlertRequest.ProtoReflect.Descriptor instead. -func (*ResolveAlertRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{316} -} - -func (x *ResolveAlertRequest) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *ResolveAlertRequest) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -func (x *ResolveAlertRequest) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -type ResolveAlertResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ResolveAlertResponse) Reset() { - *x = ResolveAlertResponse{} - mi := &file_state_v1_state_proto_msgTypes[317] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ResolveAlertResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResolveAlertResponse) ProtoMessage() {} - -func (x *ResolveAlertResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[317] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResolveAlertResponse.ProtoReflect.Descriptor instead. -func (*ResolveAlertResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{317} -} - -type DismissAlertRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DismissAlertRequest) Reset() { - *x = DismissAlertRequest{} - mi := &file_state_v1_state_proto_msgTypes[318] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DismissAlertRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DismissAlertRequest) ProtoMessage() {} - -func (x *DismissAlertRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[318] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DismissAlertRequest.ProtoReflect.Descriptor instead. -func (*DismissAlertRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{318} -} - -func (x *DismissAlertRequest) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *DismissAlertRequest) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -type DismissAlertResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DismissAlertResponse) Reset() { - *x = DismissAlertResponse{} - mi := &file_state_v1_state_proto_msgTypes[319] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DismissAlertResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DismissAlertResponse) ProtoMessage() {} - -func (x *DismissAlertResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[319] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DismissAlertResponse.ProtoReflect.Descriptor instead. -func (*DismissAlertResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{319} -} - -type ListAlertsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - // states defaults to open. - States []string `protobuf:"bytes,2,rep,name=states,proto3" json:"states,omitempty"` - Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListAlertsRequest) Reset() { - *x = ListAlertsRequest{} - mi := &file_state_v1_state_proto_msgTypes[320] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListAlertsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListAlertsRequest) ProtoMessage() {} - -func (x *ListAlertsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[320] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListAlertsRequest.ProtoReflect.Descriptor instead. -func (*ListAlertsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{320} -} - -func (x *ListAlertsRequest) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -func (x *ListAlertsRequest) GetStates() []string { - if x != nil { - return x.States - } - return nil -} - -func (x *ListAlertsRequest) GetLimit() int32 { - if x != nil { - return x.Limit - } - return 0 -} - -type ListAlertsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Alerts []*Alert `protobuf:"bytes,1,rep,name=alerts,proto3" json:"alerts,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListAlertsResponse) Reset() { - *x = ListAlertsResponse{} - mi := &file_state_v1_state_proto_msgTypes[321] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListAlertsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListAlertsResponse) ProtoMessage() {} - -func (x *ListAlertsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[321] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListAlertsResponse.ProtoReflect.Descriptor instead. -func (*ListAlertsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{321} -} - -func (x *ListAlertsResponse) GetAlerts() []*Alert { - if x != nil { - return x.Alerts - } - return nil -} - -type ClaimAlertDeliveriesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClaimAlertDeliveriesRequest) Reset() { - *x = ClaimAlertDeliveriesRequest{} - mi := &file_state_v1_state_proto_msgTypes[322] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClaimAlertDeliveriesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClaimAlertDeliveriesRequest) ProtoMessage() {} - -func (x *ClaimAlertDeliveriesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[322] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClaimAlertDeliveriesRequest.ProtoReflect.Descriptor instead. -func (*ClaimAlertDeliveriesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{322} -} - -func (x *ClaimAlertDeliveriesRequest) GetLimit() int32 { - if x != nil { - return x.Limit - } - return 0 -} - -type DueAlertDelivery struct { - state protoimpl.MessageState `protogen:"open.v1"` - Delivery *AlertDelivery `protobuf:"bytes,1,opt,name=delivery,proto3" json:"delivery,omitempty"` - Alert *Alert `protobuf:"bytes,2,opt,name=alert,proto3" json:"alert,omitempty"` - // attempt is the number of this try, counting from one. - Attempt int64 `protobuf:"varint,3,opt,name=attempt,proto3" json:"attempt,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DueAlertDelivery) Reset() { - *x = DueAlertDelivery{} - mi := &file_state_v1_state_proto_msgTypes[323] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DueAlertDelivery) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DueAlertDelivery) ProtoMessage() {} - -func (x *DueAlertDelivery) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[323] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DueAlertDelivery.ProtoReflect.Descriptor instead. -func (*DueAlertDelivery) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{323} -} - -func (x *DueAlertDelivery) GetDelivery() *AlertDelivery { - if x != nil { - return x.Delivery - } - return nil -} - -func (x *DueAlertDelivery) GetAlert() *Alert { - if x != nil { - return x.Alert - } - return nil -} - -func (x *DueAlertDelivery) GetAttempt() int64 { - if x != nil { - return x.Attempt - } - return 0 -} - -type ClaimAlertDeliveriesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Due []*DueAlertDelivery `protobuf:"bytes,1,rep,name=due,proto3" json:"due,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClaimAlertDeliveriesResponse) Reset() { - *x = ClaimAlertDeliveriesResponse{} - mi := &file_state_v1_state_proto_msgTypes[324] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClaimAlertDeliveriesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClaimAlertDeliveriesResponse) ProtoMessage() {} - -func (x *ClaimAlertDeliveriesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[324] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClaimAlertDeliveriesResponse.ProtoReflect.Descriptor instead. -func (*ClaimAlertDeliveriesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{324} -} - -func (x *ClaimAlertDeliveriesResponse) GetDue() []*DueAlertDelivery { - if x != nil { - return x.Due - } - return nil -} - -type RecordAlertAttemptRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - DeliveryId int64 `protobuf:"varint,1,opt,name=delivery_id,json=deliveryId,proto3" json:"delivery_id,omitempty"` - Skipped bool `protobuf:"varint,2,opt,name=skipped,proto3" json:"skipped,omitempty"` - StatusCode int64 `protobuf:"varint,3,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` - // error is empty on success. - Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecordAlertAttemptRequest) Reset() { - *x = RecordAlertAttemptRequest{} - mi := &file_state_v1_state_proto_msgTypes[325] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecordAlertAttemptRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecordAlertAttemptRequest) ProtoMessage() {} - -func (x *RecordAlertAttemptRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[325] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecordAlertAttemptRequest.ProtoReflect.Descriptor instead. -func (*RecordAlertAttemptRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{325} -} - -func (x *RecordAlertAttemptRequest) GetDeliveryId() int64 { - if x != nil { - return x.DeliveryId - } - return 0 -} - -func (x *RecordAlertAttemptRequest) GetSkipped() bool { - if x != nil { - return x.Skipped - } - return false -} - -func (x *RecordAlertAttemptRequest) GetStatusCode() int64 { - if x != nil { - return x.StatusCode - } - return 0 -} - -func (x *RecordAlertAttemptRequest) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -type RecordAlertAttemptResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecordAlertAttemptResponse) Reset() { - *x = RecordAlertAttemptResponse{} - mi := &file_state_v1_state_proto_msgTypes[326] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecordAlertAttemptResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecordAlertAttemptResponse) ProtoMessage() {} - -func (x *RecordAlertAttemptResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[326] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecordAlertAttemptResponse.ProtoReflect.Descriptor instead. -func (*RecordAlertAttemptResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{326} -} - -type AccountSetupRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AccountSetupRequest) Reset() { - *x = AccountSetupRequest{} - mi := &file_state_v1_state_proto_msgTypes[327] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AccountSetupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccountSetupRequest) ProtoMessage() {} - -func (x *AccountSetupRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[327] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccountSetupRequest.ProtoReflect.Descriptor instead. -func (*AccountSetupRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{327} -} - -type AccountSetupResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Required bool `protobuf:"varint,1,opt,name=required,proto3" json:"required,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AccountSetupResponse) Reset() { - *x = AccountSetupResponse{} - mi := &file_state_v1_state_proto_msgTypes[328] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AccountSetupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccountSetupResponse) ProtoMessage() {} - -func (x *AccountSetupResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[328] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccountSetupResponse.ProtoReflect.Descriptor instead. -func (*AccountSetupResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{328} -} - -func (x *AccountSetupResponse) GetRequired() bool { - if x != nil { - return x.Required - } - return false -} - -type RegisterAccountRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` - Role string `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"` - Bootstrap bool `protobuf:"varint,5,opt,name=bootstrap,proto3" json:"bootstrap,omitempty"` - OrganisationName string `protobuf:"bytes,6,opt,name=organisation_name,json=organisationName,proto3" json:"organisation_name,omitempty"` - WorkspaceName string `protobuf:"bytes,7,opt,name=workspace_name,json=workspaceName,proto3" json:"workspace_name,omitempty"` - PublicUrl string `protobuf:"bytes,8,opt,name=public_url,json=publicUrl,proto3" json:"public_url,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RegisterAccountRequest) Reset() { - *x = RegisterAccountRequest{} - mi := &file_state_v1_state_proto_msgTypes[329] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RegisterAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterAccountRequest) ProtoMessage() {} - -func (x *RegisterAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[329] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegisterAccountRequest.ProtoReflect.Descriptor instead. -func (*RegisterAccountRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{329} -} - -func (x *RegisterAccountRequest) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *RegisterAccountRequest) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *RegisterAccountRequest) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -func (x *RegisterAccountRequest) GetRole() string { - if x != nil { - return x.Role - } - return "" -} - -func (x *RegisterAccountRequest) GetBootstrap() bool { - if x != nil { - return x.Bootstrap - } - return false -} - -func (x *RegisterAccountRequest) GetOrganisationName() string { - if x != nil { - return x.OrganisationName - } - return "" -} - -func (x *RegisterAccountRequest) GetWorkspaceName() string { - if x != nil { - return x.WorkspaceName - } - return "" -} - -func (x *RegisterAccountRequest) GetPublicUrl() string { - if x != nil { - return x.PublicUrl - } - return "" -} - -type RegisterAccountResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RegisterAccountResponse) Reset() { - *x = RegisterAccountResponse{} - mi := &file_state_v1_state_proto_msgTypes[330] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RegisterAccountResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterAccountResponse) ProtoMessage() {} - -func (x *RegisterAccountResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[330] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegisterAccountResponse.ProtoReflect.Descriptor instead. -func (*RegisterAccountResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{330} -} - -func (x *RegisterAccountResponse) GetIdentity() *Identity { - if x != nil { - return x.Identity - } - return nil -} - -type SignInAccountRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SignInAccountRequest) Reset() { - *x = SignInAccountRequest{} - mi := &file_state_v1_state_proto_msgTypes[331] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SignInAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignInAccountRequest) ProtoMessage() {} - -func (x *SignInAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[331] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SignInAccountRequest.ProtoReflect.Descriptor instead. -func (*SignInAccountRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{331} -} - -func (x *SignInAccountRequest) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *SignInAccountRequest) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -type SignInAccountResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` - ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SignInAccountResponse) Reset() { - *x = SignInAccountResponse{} - mi := &file_state_v1_state_proto_msgTypes[332] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SignInAccountResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignInAccountResponse) ProtoMessage() {} - -func (x *SignInAccountResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[332] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SignInAccountResponse.ProtoReflect.Descriptor instead. -func (*SignInAccountResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{332} -} - -func (x *SignInAccountResponse) GetIdentity() *Identity { - if x != nil { - return x.Identity - } - return nil -} - -func (x *SignInAccountResponse) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *SignInAccountResponse) GetExpiresAt() *timestamppb.Timestamp { - if x != nil { - return x.ExpiresAt - } - return nil -} - -type ResolveAccountSessionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ResolveAccountSessionRequest) Reset() { - *x = ResolveAccountSessionRequest{} - mi := &file_state_v1_state_proto_msgTypes[333] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ResolveAccountSessionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResolveAccountSessionRequest) ProtoMessage() {} - -func (x *ResolveAccountSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[333] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResolveAccountSessionRequest.ProtoReflect.Descriptor instead. -func (*ResolveAccountSessionRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{333} -} - -func (x *ResolveAccountSessionRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -type ResolveAccountSessionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ResolveAccountSessionResponse) Reset() { - *x = ResolveAccountSessionResponse{} - mi := &file_state_v1_state_proto_msgTypes[334] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ResolveAccountSessionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResolveAccountSessionResponse) ProtoMessage() {} - -func (x *ResolveAccountSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[334] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResolveAccountSessionResponse.ProtoReflect.Descriptor instead. -func (*ResolveAccountSessionResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{334} -} - -func (x *ResolveAccountSessionResponse) GetIdentity() *Identity { - if x != nil { - return x.Identity - } - return nil -} - -type SignOutAccountRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SignOutAccountRequest) Reset() { - *x = SignOutAccountRequest{} - mi := &file_state_v1_state_proto_msgTypes[335] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SignOutAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignOutAccountRequest) ProtoMessage() {} - -func (x *SignOutAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[335] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SignOutAccountRequest.ProtoReflect.Descriptor instead. -func (*SignOutAccountRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{335} -} - -func (x *SignOutAccountRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -type SignOutAccountResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SignOutAccountResponse) Reset() { - *x = SignOutAccountResponse{} - mi := &file_state_v1_state_proto_msgTypes[336] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SignOutAccountResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignOutAccountResponse) ProtoMessage() {} - -func (x *SignOutAccountResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[336] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SignOutAccountResponse.ProtoReflect.Descriptor instead. -func (*SignOutAccountResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{336} -} - -type ChangeAccountPasswordRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - CurrentPassword string `protobuf:"bytes,1,opt,name=current_password,json=currentPassword,proto3" json:"current_password,omitempty"` - NewPassword string `protobuf:"bytes,2,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ChangeAccountPasswordRequest) Reset() { - *x = ChangeAccountPasswordRequest{} - mi := &file_state_v1_state_proto_msgTypes[337] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ChangeAccountPasswordRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangeAccountPasswordRequest) ProtoMessage() {} - -func (x *ChangeAccountPasswordRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[337] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChangeAccountPasswordRequest.ProtoReflect.Descriptor instead. -func (*ChangeAccountPasswordRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{337} -} - -func (x *ChangeAccountPasswordRequest) GetCurrentPassword() string { - if x != nil { - return x.CurrentPassword - } - return "" -} - -func (x *ChangeAccountPasswordRequest) GetNewPassword() string { - if x != nil { - return x.NewPassword - } - return "" -} - -type ChangeAccountPasswordResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ChangeAccountPasswordResponse) Reset() { - *x = ChangeAccountPasswordResponse{} - mi := &file_state_v1_state_proto_msgTypes[338] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ChangeAccountPasswordResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangeAccountPasswordResponse) ProtoMessage() {} - -func (x *ChangeAccountPasswordResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[338] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChangeAccountPasswordResponse.ProtoReflect.Descriptor instead. -func (*ChangeAccountPasswordResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{338} -} - -type AuthenticationSettings struct { - state protoimpl.MessageState `protogen:"open.v1"` - PublicUrl string `protobuf:"bytes,1,opt,name=public_url,json=publicUrl,proto3" json:"public_url,omitempty"` - OidcIssuer string `protobuf:"bytes,2,opt,name=oidc_issuer,json=oidcIssuer,proto3" json:"oidc_issuer,omitempty"` - OidcAudience string `protobuf:"bytes,3,opt,name=oidc_audience,json=oidcAudience,proto3" json:"oidc_audience,omitempty"` - OidcClientId string `protobuf:"bytes,4,opt,name=oidc_client_id,json=oidcClientId,proto3" json:"oidc_client_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AuthenticationSettings) Reset() { - *x = AuthenticationSettings{} - mi := &file_state_v1_state_proto_msgTypes[339] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AuthenticationSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthenticationSettings) ProtoMessage() {} - -func (x *AuthenticationSettings) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[339] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AuthenticationSettings.ProtoReflect.Descriptor instead. -func (*AuthenticationSettings) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{339} -} - -func (x *AuthenticationSettings) GetPublicUrl() string { - if x != nil { - return x.PublicUrl - } - return "" -} - -func (x *AuthenticationSettings) GetOidcIssuer() string { - if x != nil { - return x.OidcIssuer - } - return "" -} - -func (x *AuthenticationSettings) GetOidcAudience() string { - if x != nil { - return x.OidcAudience - } - return "" -} - -func (x *AuthenticationSettings) GetOidcClientId() string { - if x != nil { - return x.OidcClientId - } - return "" -} - -type GetAuthenticationSettingsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetAuthenticationSettingsRequest) Reset() { - *x = GetAuthenticationSettingsRequest{} - mi := &file_state_v1_state_proto_msgTypes[340] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetAuthenticationSettingsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAuthenticationSettingsRequest) ProtoMessage() {} - -func (x *GetAuthenticationSettingsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[340] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAuthenticationSettingsRequest.ProtoReflect.Descriptor instead. -func (*GetAuthenticationSettingsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{340} -} - -type GetAuthenticationSettingsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Settings *AuthenticationSettings `protobuf:"bytes,1,opt,name=settings,proto3" json:"settings,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetAuthenticationSettingsResponse) Reset() { - *x = GetAuthenticationSettingsResponse{} - mi := &file_state_v1_state_proto_msgTypes[341] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetAuthenticationSettingsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAuthenticationSettingsResponse) ProtoMessage() {} - -func (x *GetAuthenticationSettingsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[341] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAuthenticationSettingsResponse.ProtoReflect.Descriptor instead. -func (*GetAuthenticationSettingsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{341} -} - -func (x *GetAuthenticationSettingsResponse) GetSettings() *AuthenticationSettings { - if x != nil { - return x.Settings - } - return nil -} - -type SaveAuthenticationSettingsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Settings *AuthenticationSettings `protobuf:"bytes,1,opt,name=settings,proto3" json:"settings,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SaveAuthenticationSettingsRequest) Reset() { - *x = SaveAuthenticationSettingsRequest{} - mi := &file_state_v1_state_proto_msgTypes[342] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SaveAuthenticationSettingsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SaveAuthenticationSettingsRequest) ProtoMessage() {} - -func (x *SaveAuthenticationSettingsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[342] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SaveAuthenticationSettingsRequest.ProtoReflect.Descriptor instead. -func (*SaveAuthenticationSettingsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{342} -} - -func (x *SaveAuthenticationSettingsRequest) GetSettings() *AuthenticationSettings { - if x != nil { - return x.Settings - } - return nil -} - -type SaveAuthenticationSettingsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SaveAuthenticationSettingsResponse) Reset() { - *x = SaveAuthenticationSettingsResponse{} - mi := &file_state_v1_state_proto_msgTypes[343] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SaveAuthenticationSettingsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SaveAuthenticationSettingsResponse) ProtoMessage() {} - -func (x *SaveAuthenticationSettingsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[343] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SaveAuthenticationSettingsResponse.ProtoReflect.Descriptor instead. -func (*SaveAuthenticationSettingsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{343} -} - -type BeginPasskeyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Registration bool `protobuf:"varint,1,opt,name=registration,proto3" json:"registration,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BeginPasskeyRequest) Reset() { - *x = BeginPasskeyRequest{} - mi := &file_state_v1_state_proto_msgTypes[344] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BeginPasskeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BeginPasskeyRequest) ProtoMessage() {} - -func (x *BeginPasskeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[344] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BeginPasskeyRequest.ProtoReflect.Descriptor instead. -func (*BeginPasskeyRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{344} -} - -func (x *BeginPasskeyRequest) GetRegistration() bool { - if x != nil { - return x.Registration - } - return false -} - -type BeginPasskeyResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - Options []byte `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BeginPasskeyResponse) Reset() { - *x = BeginPasskeyResponse{} - mi := &file_state_v1_state_proto_msgTypes[345] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BeginPasskeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BeginPasskeyResponse) ProtoMessage() {} - -func (x *BeginPasskeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[345] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BeginPasskeyResponse.ProtoReflect.Descriptor instead. -func (*BeginPasskeyResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{345} -} - -func (x *BeginPasskeyResponse) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *BeginPasskeyResponse) GetOptions() []byte { - if x != nil { - return x.Options - } - return nil -} - -type FinishPasskeyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - Credential []byte `protobuf:"bytes,2,opt,name=credential,proto3" json:"credential,omitempty"` - Registration bool `protobuf:"varint,3,opt,name=registration,proto3" json:"registration,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FinishPasskeyRequest) Reset() { - *x = FinishPasskeyRequest{} - mi := &file_state_v1_state_proto_msgTypes[346] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FinishPasskeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FinishPasskeyRequest) ProtoMessage() {} - -func (x *FinishPasskeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[346] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FinishPasskeyRequest.ProtoReflect.Descriptor instead. -func (*FinishPasskeyRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{346} -} - -func (x *FinishPasskeyRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *FinishPasskeyRequest) GetCredential() []byte { - if x != nil { - return x.Credential - } - return nil -} - -func (x *FinishPasskeyRequest) GetRegistration() bool { - if x != nil { - return x.Registration - } - return false -} - -func (x *FinishPasskeyRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type FinishPasskeyResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` - ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FinishPasskeyResponse) Reset() { - *x = FinishPasskeyResponse{} - mi := &file_state_v1_state_proto_msgTypes[347] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FinishPasskeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FinishPasskeyResponse) ProtoMessage() {} - -func (x *FinishPasskeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[347] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FinishPasskeyResponse.ProtoReflect.Descriptor instead. -func (*FinishPasskeyResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{347} -} - -func (x *FinishPasskeyResponse) GetIdentity() *Identity { - if x != nil { - return x.Identity - } - return nil -} - -func (x *FinishPasskeyResponse) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *FinishPasskeyResponse) GetExpiresAt() *timestamppb.Timestamp { - if x != nil { - return x.ExpiresAt - } - return nil -} - -type Passkey struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Passkey) Reset() { - *x = Passkey{} - mi := &file_state_v1_state_proto_msgTypes[348] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Passkey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Passkey) ProtoMessage() {} - -func (x *Passkey) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[348] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Passkey.ProtoReflect.Descriptor instead. -func (*Passkey) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{348} -} - -func (x *Passkey) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Passkey) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type ListPasskeysRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListPasskeysRequest) Reset() { - *x = ListPasskeysRequest{} - mi := &file_state_v1_state_proto_msgTypes[349] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListPasskeysRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListPasskeysRequest) ProtoMessage() {} - -func (x *ListPasskeysRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[349] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListPasskeysRequest.ProtoReflect.Descriptor instead. -func (*ListPasskeysRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{349} -} - -type ListPasskeysResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Passkeys []*Passkey `protobuf:"bytes,1,rep,name=passkeys,proto3" json:"passkeys,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListPasskeysResponse) Reset() { - *x = ListPasskeysResponse{} - mi := &file_state_v1_state_proto_msgTypes[350] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListPasskeysResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListPasskeysResponse) ProtoMessage() {} - -func (x *ListPasskeysResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[350] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListPasskeysResponse.ProtoReflect.Descriptor instead. -func (*ListPasskeysResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{350} -} - -func (x *ListPasskeysResponse) GetPasskeys() []*Passkey { - if x != nil { - return x.Passkeys - } - return nil -} - -type DeletePasskeyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeletePasskeyRequest) Reset() { - *x = DeletePasskeyRequest{} - mi := &file_state_v1_state_proto_msgTypes[351] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeletePasskeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeletePasskeyRequest) ProtoMessage() {} - -func (x *DeletePasskeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[351] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeletePasskeyRequest.ProtoReflect.Descriptor instead. -func (*DeletePasskeyRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{351} -} - -func (x *DeletePasskeyRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type DeletePasskeyResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeletePasskeyResponse) Reset() { - *x = DeletePasskeyResponse{} - mi := &file_state_v1_state_proto_msgTypes[352] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeletePasskeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeletePasskeyResponse) ProtoMessage() {} - -func (x *DeletePasskeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[352] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeletePasskeyResponse.ProtoReflect.Descriptor instead. -func (*DeletePasskeyResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{352} -} - -type OpenAccountSessionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *OpenAccountSessionRequest) Reset() { - *x = OpenAccountSessionRequest{} - mi := &file_state_v1_state_proto_msgTypes[353] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *OpenAccountSessionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OpenAccountSessionRequest) ProtoMessage() {} - -func (x *OpenAccountSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[353] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OpenAccountSessionRequest.ProtoReflect.Descriptor instead. -func (*OpenAccountSessionRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{353} -} - -func (x *OpenAccountSessionRequest) GetExpiresAt() *timestamppb.Timestamp { - if x != nil { - return x.ExpiresAt - } - return nil -} - -type OpenAccountSessionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` - ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *OpenAccountSessionResponse) Reset() { - *x = OpenAccountSessionResponse{} - mi := &file_state_v1_state_proto_msgTypes[354] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *OpenAccountSessionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OpenAccountSessionResponse) ProtoMessage() {} - -func (x *OpenAccountSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[354] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OpenAccountSessionResponse.ProtoReflect.Descriptor instead. -func (*OpenAccountSessionResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{354} -} - -func (x *OpenAccountSessionResponse) GetIdentity() *Identity { - if x != nil { - return x.Identity - } - return nil -} - -func (x *OpenAccountSessionResponse) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *OpenAccountSessionResponse) GetExpiresAt() *timestamppb.Timestamp { - if x != nil { - return x.ExpiresAt - } - return nil -} - -type RequireFreshAccountSessionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RequireFreshAccountSessionRequest) Reset() { - *x = RequireFreshAccountSessionRequest{} - mi := &file_state_v1_state_proto_msgTypes[355] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RequireFreshAccountSessionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequireFreshAccountSessionRequest) ProtoMessage() {} - -func (x *RequireFreshAccountSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[355] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RequireFreshAccountSessionRequest.ProtoReflect.Descriptor instead. -func (*RequireFreshAccountSessionRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{355} -} - -func (x *RequireFreshAccountSessionRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -type RequireFreshAccountSessionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RequireFreshAccountSessionResponse) Reset() { - *x = RequireFreshAccountSessionResponse{} - mi := &file_state_v1_state_proto_msgTypes[356] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RequireFreshAccountSessionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequireFreshAccountSessionResponse) ProtoMessage() {} - -func (x *RequireFreshAccountSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[356] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RequireFreshAccountSessionResponse.ProtoReflect.Descriptor instead. -func (*RequireFreshAccountSessionResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{356} -} - -type CreateAccountRecoveryRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateAccountRecoveryRequest) Reset() { - *x = CreateAccountRecoveryRequest{} - mi := &file_state_v1_state_proto_msgTypes[357] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateAccountRecoveryRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateAccountRecoveryRequest) ProtoMessage() {} - -func (x *CreateAccountRecoveryRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[357] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateAccountRecoveryRequest.ProtoReflect.Descriptor instead. -func (*CreateAccountRecoveryRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{357} -} - -type CreateAccountRecoveryResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateAccountRecoveryResponse) Reset() { - *x = CreateAccountRecoveryResponse{} - mi := &file_state_v1_state_proto_msgTypes[358] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateAccountRecoveryResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateAccountRecoveryResponse) ProtoMessage() {} - -func (x *CreateAccountRecoveryResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[358] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateAccountRecoveryResponse.ProtoReflect.Descriptor instead. -func (*CreateAccountRecoveryResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{358} -} - -func (x *CreateAccountRecoveryResponse) GetCode() string { - if x != nil { - return x.Code - } - return "" -} - -type RecoverAccountRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` - Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` - Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecoverAccountRequest) Reset() { - *x = RecoverAccountRequest{} - mi := &file_state_v1_state_proto_msgTypes[359] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecoverAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecoverAccountRequest) ProtoMessage() {} - -func (x *RecoverAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[359] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecoverAccountRequest.ProtoReflect.Descriptor instead. -func (*RecoverAccountRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{359} -} - -func (x *RecoverAccountRequest) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *RecoverAccountRequest) GetCode() string { - if x != nil { - return x.Code - } - return "" -} - -func (x *RecoverAccountRequest) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -type RecoverAccountResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RecoverAccountResponse) Reset() { - *x = RecoverAccountResponse{} - mi := &file_state_v1_state_proto_msgTypes[360] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RecoverAccountResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RecoverAccountResponse) ProtoMessage() {} - -func (x *RecoverAccountResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[360] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RecoverAccountResponse.ProtoReflect.Descriptor instead. -func (*RecoverAccountResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{360} -} - -type ListOrgAgentsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListOrgAgentsRequest) Reset() { - *x = ListOrgAgentsRequest{} - mi := &file_state_v1_state_proto_msgTypes[361] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListOrgAgentsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListOrgAgentsRequest) ProtoMessage() {} - -func (x *ListOrgAgentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[361] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListOrgAgentsRequest.ProtoReflect.Descriptor instead. -func (*ListOrgAgentsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{361} -} - -func (x *ListOrgAgentsRequest) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -type AgentAssignment struct { - state protoimpl.MessageState `protogen:"open.v1"` - IdentityId string `protobuf:"bytes,1,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` - OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AgentAssignment) Reset() { - *x = AgentAssignment{} - mi := &file_state_v1_state_proto_msgTypes[362] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AgentAssignment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AgentAssignment) ProtoMessage() {} - -func (x *AgentAssignment) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[362] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AgentAssignment.ProtoReflect.Descriptor instead. -func (*AgentAssignment) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{362} -} - -func (x *AgentAssignment) GetIdentityId() string { - if x != nil { - return x.IdentityId - } - return "" -} - -func (x *AgentAssignment) GetOrgId() string { - if x != nil { - return x.OrgId - } - return "" -} - -type ListOrgAgentsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Agents []*AgentAssignment `protobuf:"bytes,1,rep,name=agents,proto3" json:"agents,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListOrgAgentsResponse) Reset() { - *x = ListOrgAgentsResponse{} - mi := &file_state_v1_state_proto_msgTypes[363] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListOrgAgentsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListOrgAgentsResponse) ProtoMessage() {} - -func (x *ListOrgAgentsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[363] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListOrgAgentsResponse.ProtoReflect.Descriptor instead. -func (*ListOrgAgentsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{363} -} - -func (x *ListOrgAgentsResponse) GetAgents() []*AgentAssignment { - if x != nil { - return x.Agents - } - return nil -} - -var File_state_v1_state_proto protoreflect.FileDescriptor - -const file_state_v1_state_proto_rawDesc = "" + - "\n" + - "\x14state/v1/state.proto\x12\bstate.v1\x1a\x18logging/v1/logging.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"t\n" + - "\x18RegisterTaskGrantRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x14\n" + - "\x05token\x18\x02 \x01(\tR\x05token\x12)\n" + - "\x10lifetime_seconds\x18\x03 \x01(\x03R\x0flifetimeSeconds\"\x1b\n" + - "\x19RegisterTaskGrantResponse\".\n" + - "\x16RevokeTaskGrantRequest\x12\x14\n" + - "\x05token\x18\x01 \x01(\tR\x05token\"\x19\n" + - "\x17RevokeTaskGrantResponse\"/\n" + - "\x17ResolveTaskGrantRequest\x12\x14\n" + - "\x05token\x18\x01 \x01(\tR\x05token\"\x85\x01\n" + - "\x18ResolveTaskGrantResponse\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12-\n" + - "\x12execution_identity\x18\x02 \x01(\tR\x11executionIdentity\x12!\n" + - "\fprincipal_id\x18\x03 \x01(\tR\vprincipalId\"\xff\x01\n" + - "\bIdentity\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + - "\x04kind\x18\x02 \x01(\tR\x04kind\x12!\n" + - "\fdisplay_name\x18\x03 \x01(\tR\vdisplayName\x12\x1c\n" + - "\tlifecycle\x18\x04 \x01(\tR\tlifecycle\x12\x18\n" + - "\aversion\x18\x05 \x01(\x03R\aversion\x129\n" + - "\n" + - "created_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + - "\n" + - "updated_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"a\n" + - "\rIdentityAudit\x12\x19\n" + - "\bactor_id\x18\x01 \x01(\tR\aactorId\x12\x16\n" + - "\x06source\x18\x02 \x01(\tR\x06source\x12\x1d\n" + - "\n" + - "request_id\x18\x03 \x01(\tR\trequestId\"\x17\n" + - "\x15ListIdentitiesRequest\"L\n" + - "\x16ListIdentitiesResponse\x122\n" + - "\n" + - "identities\x18\x01 \x03(\v2\x12.state.v1.IdentityR\n" + - "identities\"$\n" + - "\x12GetIdentityRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"E\n" + - "\x13GetIdentityResponse\x12.\n" + - "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"\x8d\x01\n" + - "\x15CreateIdentityRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + - "\x04kind\x18\x02 \x01(\tR\x04kind\x12!\n" + - "\fdisplay_name\x18\x03 \x01(\tR\vdisplayName\x12-\n" + - "\x05audit\x18\x04 \x01(\v2\x17.state.v1.IdentityAuditR\x05audit\"\xa4\x01\n" + - "\x15RenameIdentityRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12)\n" + - "\x10expected_version\x18\x02 \x01(\x03R\x0fexpectedVersion\x12!\n" + - "\fdisplay_name\x18\x03 \x01(\tR\vdisplayName\x12-\n" + - "\x05audit\x18\x04 \x01(\v2\x17.state.v1.IdentityAuditR\x05audit\"\x82\x01\n" + - "\x16SuspendIdentityRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12)\n" + - "\x10expected_version\x18\x02 \x01(\x03R\x0fexpectedVersion\x12-\n" + - "\x05audit\x18\x03 \x01(\v2\x17.state.v1.IdentityAuditR\x05audit\"\x85\x01\n" + - "\x19ReactivateIdentityRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12)\n" + - "\x10expected_version\x18\x02 \x01(\x03R\x0fexpectedVersion\x12-\n" + - "\x05audit\x18\x03 \x01(\v2\x17.state.v1.IdentityAuditR\x05audit\"\x81\x01\n" + - "\x15RetireIdentityRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12)\n" + - "\x10expected_version\x18\x02 \x01(\x03R\x0fexpectedVersion\x12-\n" + - "\x05audit\x18\x03 \x01(\v2\x17.state.v1.IdentityAuditR\x05audit\"H\n" + - "\x16CreateIdentityResponse\x12.\n" + - "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"H\n" + - "\x16RenameIdentityResponse\x12.\n" + - "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"I\n" + - "\x17SuspendIdentityResponse\x12.\n" + - "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"L\n" + - "\x1aReactivateIdentityResponse\x12.\n" + - "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"H\n" + - "\x16RetireIdentityResponse\x12.\n" + - "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"Q\n" + - "\x1dResolveIdentitySubjectRequest\x12\x16\n" + - "\x06issuer\x18\x01 \x01(\tR\x06issuer\x12\x18\n" + - "\asubject\x18\x02 \x01(\tR\asubject\"P\n" + - "\x1eResolveIdentitySubjectResponse\x12.\n" + - "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"\x8d\x01\n" + - "\x1aBindIdentitySubjectRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + - "\x06issuer\x18\x02 \x01(\tR\x06issuer\x12\x18\n" + - "\asubject\x18\x03 \x01(\tR\asubject\x12-\n" + - "\x05audit\x18\x04 \x01(\v2\x17.state.v1.IdentityAuditR\x05audit\"M\n" + - "\x1bBindIdentitySubjectResponse\x12.\n" + - "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"q\n" + - "\x1bClaimIdentitySubjectRequest\x12\x16\n" + - "\x06issuer\x18\x01 \x01(\tR\x06issuer\x12 \n" + - "\vplaceholder\x18\x02 \x01(\tR\vplaceholder\x12\x18\n" + - "\asubject\x18\x03 \x01(\tR\asubject\"N\n" + - "\x1cClaimIdentitySubjectResponse\x12.\n" + - "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"Z\n" + - "\rPersonalToken\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x129\n" + - "\n" + - "created_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\")\n" + - "\x17AddPersonalTokenRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"\x1a\n" + - "\x18AddPersonalTokenResponse\"\x1b\n" + - "\x19ListPersonalTokensRequest\"M\n" + - "\x1aListPersonalTokensResponse\x12/\n" + - "\x06tokens\x18\x01 \x03(\v2\x17.state.v1.PersonalTokenR\x06tokens\",\n" + - "\x1aRevokePersonalTokenRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"\x1d\n" + - "\x1bRevokePersonalTokenResponse\"\x91\r\n" + - "\x04Task\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x14\n" + - "\x05owner\x18\x02 \x01(\tR\x05owner\x12\x12\n" + - "\x04repo\x18\x03 \x01(\tR\x04repo\x12!\n" + - "\fissue_number\x18\x04 \x01(\x03R\vissueNumber\x12\x14\n" + - "\x05title\x18\x05 \x01(\tR\x05title\x12\x12\n" + - "\x04body\x18\x06 \x01(\tR\x04body\x12\x16\n" + - "\x06labels\x18\a \x01(\tR\x06labels\x12\x16\n" + - "\x06status\x18\b \x01(\tR\x06status\x12\x1a\n" + - "\bworkflow\x18\t \x01(\tR\bworkflow\x12\x18\n" + - "\x05stage\x18\n" + - " \x01(\tB\x02\x18\x01R\x05stage\x12\x16\n" + - "\x06branch\x18\v \x01(\tR\x06branch\x12\x12\n" + - "\x04plan\x18\f \x01(\tR\x04plan\x12\x14\n" + - "\x05notes\x18\r \x01(\tR\x05notes\x12\x1b\n" + - "\tpr_number\x18\x0e \x01(\x03R\bprNumber\x12\x1f\n" + - "\vtokens_used\x18\x0f \x01(\x03R\n" + - "tokensUsed\x12\x1e\n" + - "\n" + - "iterations\x18\x10 \x01(\x03R\n" + - "iterations\x12\x18\n" + - "\aattempt\x18\x11 \x01(\x03R\aattempt\x12\x1f\n" + - "\vpark_reason\x18\x12 \x01(\tR\n" + - "parkReason\x12\x1f\n" + - "\vretry_count\x18\x13 \x01(\x03R\n" + - "retryCount\x12(\n" + - "\x10watch_comment_id\x18\x14 \x01(\x03R\x0ewatchCommentId\x12\x16\n" + - "\x06source\x18\x15 \x01(\tR\x06source\x12\x1a\n" + - "\bidentity\x18\x16 \x01(\tR\bidentity\x12\x1d\n" + - "\n" + - "binding_id\x18\x17 \x01(\tR\tbindingId\x12'\n" + - "\x0fbinding_version\x18\x18 \x01(\x03R\x0ebindingVersion\x129\n" + - "\n" + - "created_at\x18\x19 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + - "\n" + - "updated_at\x18\x1a \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12%\n" + - "\x0ereview_payload\x18\x1b \x01(\tR\rreviewPayload\x12>\n" + - "\x1bworkflow_definition_version\x18\x1c \x01(\x03R\x19workflowDefinitionVersion\x12<\n" + - "\x1aworkflow_definition_digest\x18\x1d \x01(\tR\x18workflowDefinitionDigest\x128\n" + - "\x18workflow_definition_yaml\x18\x1e \x01(\tR\x16workflowDefinitionYaml\x12#\n" + - "\rreview_cursor\x18\x1f \x01(\x03R\freviewCursor\x12\x1d\n" + - "\n" + - "park_class\x18 \x01(\tR\tparkClass\x12-\n" + - "\x12remediation_rounds\x18! \x01(\x05R\x11remediationRounds\x12\x1f\n" + - "\vinputs_json\x18\" \x01(\tR\n" + - "inputsJson\x12\x10\n" + - "\x03org\x18# \x01(\tR\x03org\x12-\n" + - "\x13call_parent_task_id\x18$ \x01(\x03R\x10callParentTaskId\x12\x1d\n" + - "\n" + - "call_depth\x18% \x01(\x05R\tcallDepth\x12!\n" + - "\foutputs_json\x18& \x01(\tR\voutputsJson\x12\x1f\n" + - "\vreview_gate\x18' \x01(\tR\n" + - "reviewGate\x12'\n" + - "\x0frereview_rounds\x18( \x01(\x03R\x0erereviewRounds\x12\x1d\n" + - "\n" + - "retry_mode\x18) \x01(\tR\tretryMode\x12\x1f\n" + - "\vresume_from\x18* \x01(\tR\n" + - "resumeFrom\x12%\n" + - "\x0eresume_results\x18+ \x01(\fR\rresumeResults\x12\x16\n" + - "\x06origin\x18, \x01(\tR\x06origin\x12\x1c\n" + - "\tworkspace\x18- \x01(\tR\tworkspace\x12+\n" + - "\x11binding_signature\x18. \x01(\tR\x10bindingSignature\x12!\n" + - "\fbinding_addr\x18/ \x01(\tR\vbindingAddr\x12!\n" + - "\fpark_blocker\x180 \x01(\tR\vparkBlocker\x12#\n" + - "\rplan_document\x182 \x01(\tR\fplanDocumentJ\x04\b1\x102R\tplan_view\"\xf8\x02\n" + - "\x05Event\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12*\n" + - "\x02at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x02at\x12\x12\n" + - "\x04kind\x18\x03 \x01(\tR\x04kind\x12\x17\n" + - "\atask_id\x18\x04 \x01(\x03R\x06taskId\x12\x12\n" + - "\x04repo\x18\x05 \x01(\tR\x04repo\x12\x14\n" + - "\x05issue\x18\x06 \x01(\x03R\x05issue\x12\x1a\n" + - "\bworkflow\x18\a \x01(\tR\bworkflow\x12\x14\n" + - "\x05stage\x18\b \x01(\tR\x05stage\x12\x18\n" + - "\aattempt\x18\v \x01(\x03R\aattempt\x12\x16\n" + - "\x06detail\x18\t \x01(\tR\x06detail\x12\x1b\n" + - "\tdata_json\x18\n" + - " \x01(\tR\bdataJson\x12\x19\n" + - "\bactor_id\x18\f \x01(\tR\aactorId\x12\x1d\n" + - "\n" + - "actor_kind\x18\r \x01(\tR\tactorKind\x12!\n" + - "\fprincipal_id\x18\x0e \x01(\tR\vprincipalId\"\xe3\x02\n" + - "\rCapturedEvent\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12;\n" + - "\vreceived_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\n" + - "receivedAt\x12\x16\n" + - "\x06source\x18\x03 \x01(\tR\x06source\x12\x1f\n" + - "\vremote_addr\x18\x04 \x01(\tR\n" + - "remoteAddr\x12!\n" + - "\fcontent_type\x18\x05 \x01(\tR\vcontentType\x12\x18\n" + - "\aheaders\x18\x06 \x01(\tR\aheaders\x12\x12\n" + - "\x04body\x18\a \x01(\tR\x04body\x12$\n" + - "\rauthenticated\x18\b \x01(\bR\rauthenticated\x12\x1d\n" + - "\n" + - "event_type\x18\t \x01(\tR\teventType\x12\x1a\n" + - "\bunsigned\x18\n" + - " \x01(\bR\bunsigned\x12\x1a\n" + - "\bdelivery\x18\v \x01(\tR\bdelivery\"D\n" + - "\x18EventTypeHeaderCondition\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value\"U\n" + - "\x19EventTypePayloadCondition\x12\x12\n" + - "\x04path\x18\x01 \x01(\tR\x04path\x12\x0e\n" + - "\x02op\x18\x02 \x01(\tR\x02op\x12\x14\n" + - "\x05value\x18\x03 \x01(\tR\x05value\"\xf9\x03\n" + - "\tEventType\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + - "\x06source\x18\x02 \x01(\tR\x06source\x12\x12\n" + - "\x04name\x18\x03 \x01(\tR\x04name\x12O\n" + - "\x11header_conditions\x18\x04 \x03(\v2\".state.v1.EventTypeHeaderConditionR\x10headerConditions\x12R\n" + - "\x12payload_conditions\x18\x05 \x03(\v2#.state.v1.EventTypePayloadConditionR\x11payloadConditions\x127\n" + - "\x06schema\x18\x06 \x03(\v2\x1f.state.v1.EventType.SchemaEntryR\x06schema\x129\n" + - "\n" + - "created_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + - "\n" + - "updated_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12!\n" + - "\fworkspace_id\x18\t \x01(\tR\vworkspaceId\x1a9\n" + - "\vSchemaEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"f\n" + - "\fMappingField\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" + - "\x04path\x18\x02 \x01(\tR\x04path\x12\x12\n" + - "\x04type\x18\x03 \x01(\tR\x04type\x12\x1a\n" + - "\brequired\x18\x04 \x01(\bR\brequired\"\xa0\x03\n" + - "\aMapping\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\x12\x1f\n" + - "\vsource_hint\x18\x03 \x01(\tR\n" + - "sourceHint\x12.\n" + - "\x06fields\x18\x04 \x03(\v2\x16.state.v1.MappingFieldR\x06fields\x129\n" + - "\n" + - "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + - "\n" + - "updated_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12\"\n" + - "\revent_type_id\x18\a \x01(\tR\veventTypeId\x12\x1f\n" + - "\vmatch_count\x18\b \x01(\x03R\n" + - "matchCount\x12B\n" + - "\x0flast_matched_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\rlastMatchedAt\x12!\n" + - "\fworkspace_id\x18\n" + - " \x01(\tR\vworkspaceId\"(\n" + - "\x0eBindingMatcher\x12\x16\n" + - "\x06source\x18\x01 \x01(\tR\x06source\"\x8e\x04\n" + - "\aBinding\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\x122\n" + - "\amatcher\x18\x03 \x01(\v2\x18.state.v1.BindingMatcherR\amatcher\x12\x1d\n" + - "\n" + - "mapping_id\x18\x04 \x01(\tR\tmappingId\x12\x1a\n" + - "\bworkflow\x18\x05 \x01(\tR\bworkflow\x12\x14\n" + - "\x05owner\x18\x06 \x01(\tR\x05owner\x12\x12\n" + - "\x04repo\x18\a \x01(\tR\x04repo\x12\x18\n" + - "\aversion\x18\b \x01(\x03R\aversion\x12\x16\n" + - "\x06status\x18\t \x01(\tR\x06status\x129\n" + - "\n" + - "created_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + - "\n" + - "updated_at\x18\f \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x16\n" + - "\x06filter\x18\r \x01(\tR\x06filter\x12\x1f\n" + - "\vinputs_json\x18\x0e \x01(\tR\n" + - "inputsJson\x12\x1d\n" + - "\n" + - "repo_param\x18\x0f \x01(\tR\trepoParam\x12\x15\n" + - "\x06org_id\x18\x10 \x01(\tR\x05orgId\x12!\n" + - "\fworkspace_id\x18\x11 \x01(\tR\vworkspaceIdJ\x04\b\n" + - "\x10\vR\x06secret\"\xbb\x02\n" + - "\x06Source\x12\x12\n" + - "\x04path\x18\x01 \x01(\tR\x04path\x12\x18\n" + - "\asigning\x18\x02 \x01(\tR\asigning\x12\x16\n" + - "\x06secret\x18\x03 \x01(\tR\x06secret\x129\n" + - "\n" + - "created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + - "\n" + - "updated_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x12\n" + - "\x04name\x18\x06 \x01(\tR\x04name\x12'\n" + - "\x0fdelivery_header\x18\a \x01(\tR\x0edeliveryHeader\x12\x15\n" + - "\x06org_id\x18\b \x01(\tR\x05orgId\x12!\n" + - "\fworkspace_id\x18\t \x01(\tR\vworkspaceId\"\x84\x02\n" + - "\fWorkflowStat\x12\x1a\n" + - "\bworkflow\x18\x01 \x01(\tR\bworkflow\x12\x12\n" + - "\x04runs\x18\x02 \x01(\x03R\x04runs\x12\x16\n" + - "\x06merged\x18\x03 \x01(\x03R\x06merged\x12\x17\n" + - "\apr_open\x18\x04 \x01(\x03R\x06prOpen\x12\x16\n" + - "\x06parked\x18\x05 \x01(\x03R\x06parked\x12\x1d\n" + - "\n" + - "avg_tokens\x18\x06 \x01(\x03R\tavgTokens\x12\x1b\n" + - "\tavg_steps\x18\a \x01(\x01R\bavgSteps\x12!\n" + - "\ftotal_tokens\x18\b \x01(\x03R\vtotalTokens\x12\x1c\n" + - "\tcompleted\x18\t \x01(\x03R\tcompleted\"\x80\x01\n" + - "\tStageStat\x12\x1a\n" + - "\bworkflow\x18\x01 \x01(\tR\bworkflow\x12\x14\n" + - "\x05stage\x18\x02 \x01(\tR\x05stage\x12\x12\n" + - "\x04runs\x18\x03 \x01(\x03R\x04runs\x12\x15\n" + - "\x06avg_ms\x18\x04 \x01(\x03R\x05avgMs\x12\x16\n" + - "\x06errors\x18\x05 \x01(\x03R\x06errors\"5\n" + - "\tDayTokens\x12\x10\n" + - "\x03day\x18\x01 \x01(\tR\x03day\x12\x16\n" + - "\x06tokens\x18\x02 \x01(\x03R\x06tokens\"\xb5\x01\n" + - "\x13EnqueueIssueRequest\x12\x14\n" + - "\x05owner\x18\x01 \x01(\tR\x05owner\x12\x12\n" + - "\x04repo\x18\x02 \x01(\tR\x04repo\x12\x16\n" + - "\x06number\x18\x03 \x01(\x03R\x06number\x12\x14\n" + - "\x05title\x18\x04 \x01(\tR\x05title\x12\x12\n" + - "\x04body\x18\x05 \x01(\tR\x04body\x12\x16\n" + - "\x06labels\x18\x06 \x01(\tR\x06labels\x12\x1a\n" + - "\bidentity\x18\a \x01(\tR\bidentity\"2\n" + - "\x14EnqueueIssueResponse\x12\x1a\n" + - "\binserted\x18\x01 \x01(\bR\binserted\"4\n" + - "\x1aActiveTasksByOriginRequest\x12\x16\n" + - "\x06origin\x18\x01 \x01(\tR\x06origin\"C\n" + - "\x1bActiveTasksByOriginResponse\x12$\n" + - "\x05tasks\x18\x01 \x03(\v2\x0e.state.v1.TaskR\x05tasks\"\x19\n" + - "\x17UnpostedOutcomesRequest\"@\n" + - "\x18UnpostedOutcomesResponse\x12$\n" + - "\x05tasks\x18\x01 \x03(\v2\x0e.state.v1.TaskR\x05tasks\"K\n" + - "\x18MarkOutcomePostedRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x16\n" + - "\x06status\x18\x02 \x01(\tR\x06status\"\x1b\n" + - "\x19MarkOutcomePostedResponse\"\xfc\x01\n" + - "\x16EnqueueChatTaskRequest\x12\x14\n" + - "\x05owner\x18\x01 \x01(\tR\x05owner\x12\x12\n" + - "\x04repo\x18\x02 \x01(\tR\x04repo\x12\x14\n" + - "\x05title\x18\x03 \x01(\tR\x05title\x12\x12\n" + - "\x04body\x18\x04 \x01(\tR\x04body\x12\x1a\n" + - "\bworkflow\x18\x05 \x01(\tR\bworkflow\x12\x1a\n" + - "\bidentity\x18\x06 \x01(\tR\bidentity\x12\x1f\n" + - "\vinputs_json\x18\a \x01(\tR\n" + - "inputsJson\x12\x16\n" + - "\x06origin\x18\b \x01(\tR\x06origin\x12\x1d\n" + - "\n" + - "draft_yaml\x18\t \x01(\tR\tdraftYaml\"=\n" + - "\x17EnqueueChatTaskResponse\x12\"\n" + - "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\"\x12\n" + - "\x10ClaimNextRequest\"M\n" + - "\x11ClaimNextResponse\x12\"\n" + - "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\x12\x14\n" + - "\x05found\x18\x02 \x01(\bR\x05found\"W\n" + - "\x13ClaimByIssueRequest\x12\x14\n" + - "\x05owner\x18\x01 \x01(\tR\x05owner\x12\x12\n" + - "\x04repo\x18\x02 \x01(\tR\x04repo\x12\x16\n" + - "\x06number\x18\x03 \x01(\x03R\x06number\"P\n" + - "\x14ClaimByIssueResponse\x12\"\n" + - "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\x12\x14\n" + - "\x05found\x18\x02 \x01(\bR\x05found\"h\n" + - "\x11TransitionRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x12\n" + - "\x04from\x18\x02 \x01(\tR\x04from\x12\x0e\n" + - "\x02to\x18\x03 \x01(\tR\x02to\x12\x16\n" + - "\x06detail\x18\x04 \x01(\tR\x06detail\"\x14\n" + - "\x12TransitionResponse\"\xc4\x01\n" + - "\x10StartStepRequest\x12!\n" + - "\fexecution_id\x18\x01 \x01(\x03R\vexecutionId\x12\x18\n" + - "\aattempt\x18\x02 \x01(\x03R\aattempt\x12\x1b\n" + - "\tparent_id\x18\x03 \x01(\x03R\bparentId\x12\x12\n" + - "\x04kind\x18\x04 \x01(\tR\x04kind\x12\x12\n" + - "\x04name\x18\x05 \x01(\tR\x04name\x12.\n" + - "\x13called_execution_id\x18\x06 \x01(\x03R\x11calledExecutionId\"S\n" + - "\x11StartStepResponse\x12\x17\n" + - "\astep_id\x18\x01 \x01(\x03R\x06stepId\x12%\n" + - "\x05event\x18\x02 \x01(\v2\x0f.state.v1.EventR\x05event\"\xc6\x01\n" + - "\x11FinishStepRequest\x12!\n" + - "\fexecution_id\x18\x01 \x01(\x03R\vexecutionId\x12\x17\n" + - "\astep_id\x18\x02 \x01(\x03R\x06stepId\x12\x12\n" + - "\x04from\x18\x03 \x01(\tR\x04from\x12\x0e\n" + - "\x02to\x18\x04 \x01(\tR\x02to\x12\x16\n" + - "\x06detail\x18\x05 \x01(\tR\x06detail\x12\x1f\n" + - "\vtokens_used\x18\x06 \x01(\x03R\n" + - "tokensUsed\x12\x18\n" + - "\aresults\x18\a \x01(\fR\aresults\";\n" + - "\x12FinishStepResponse\x12%\n" + - "\x05event\x18\x01 \x01(\v2\x0f.state.v1.EventR\x05event\"Y\n" + - "\x16CancelExecutionRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x16\n" + - "\x06reason\x18\x02 \x01(\tR\x06reason\x12\x0e\n" + - "\x02to\x18\x03 \x01(\tR\x02to\"e\n" + - "\x17CancelExecutionResponse\x120\n" + - "\x14cancelled_callee_ids\x18\x02 \x03(\x03R\x12cancelledCalleeIdsJ\x04\b\x01\x10\x02R\x12cancelled_step_ids\"\xb0\x03\n" + - "\rStepExecution\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12!\n" + - "\fexecution_id\x18\x02 \x01(\x03R\vexecutionId\x12\x18\n" + - "\aattempt\x18\x03 \x01(\x03R\aattempt\x12\x1b\n" + - "\tparent_id\x18\x04 \x01(\x03R\bparentId\x12\x14\n" + - "\x05depth\x18\x05 \x01(\x05R\x05depth\x12\x12\n" + - "\x04kind\x18\x06 \x01(\tR\x04kind\x12\x12\n" + - "\x04name\x18\a \x01(\tR\x04name\x12\x16\n" + - "\x06status\x18\b \x01(\tR\x06status\x12\x16\n" + - "\x06detail\x18\t \x01(\tR\x06detail\x12\x1f\n" + - "\vtokens_used\x18\n" + - " \x01(\x03R\n" + - "tokensUsed\x129\n" + - "\n" + - "started_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\tstartedAt\x12;\n" + - "\vfinished_at\x18\f \x01(\v2\x1a.google.protobuf.TimestampR\n" + - "finishedAt\x12.\n" + - "\x13called_execution_id\x18\r \x01(\x03R\x11calledExecutionId\"O\n" + - "\x10ListStepsRequest\x12!\n" + - "\fexecution_id\x18\x01 \x01(\x03R\vexecutionId\x12\x18\n" + - "\aattempt\x18\x02 \x01(\x03R\aattempt\"B\n" + - "\x11ListStepsResponse\x12-\n" + - "\x05steps\x18\x01 \x03(\v2\x17.state.v1.StepExecutionR\x05steps\"\xa9\x02\n" + - "\rHarnessSecret\x12\x18\n" + - "\aservice\x18\x02 \x01(\tR\aservice\x12!\n" + - "\faccess_token\x18\x03 \x01(\tR\vaccessToken\x12#\n" + - "\rrefresh_token\x18\x04 \x01(\tR\frefreshToken\x12\x1d\n" + - "\n" + - "token_type\x18\x05 \x01(\tR\ttokenType\x129\n" + - "\n" + - "expires_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\x129\n" + - "\n" + - "updated_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x16\n" + - "\x06scopes\x18\b \x03(\tR\x06scopesJ\x04\b\x01\x10\x02R\x03org\"e\n" + - "\x17GetHarnessSecretRequest\x12\x18\n" + - "\aservice\x18\x02 \x01(\tR\aservice\x12%\n" + - "\x0erun_credential\x18\x03 \x01(\tR\rrunCredentialJ\x04\b\x01\x10\x02R\x03org\"]\n" + - "\x18GetHarnessSecretResponse\x12/\n" + - "\x06secret\x18\x01 \x01(\v2\x17.state.v1.HarnessSecretR\x06secret\x12\x10\n" + - "\x03org\x18\x02 \x01(\tR\x03org\"q\n" + - "\x17PutHarnessSecretRequest\x12/\n" + - "\x06secret\x18\x01 \x01(\v2\x17.state.v1.HarnessSecretR\x06secret\x12%\n" + - "\x0erun_credential\x18\x02 \x01(\tR\rrunCredential\"\x1a\n" + - "\x18PutHarnessSecretResponse\"3\n" + - "\rUpdateRequest\x12\"\n" + - "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\"\x10\n" + - "\x0eUpdateResponse\"f\n" + - "\x0eRequeueRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x1f\n" + - "\vfrom_status\x18\x02 \x01(\tR\n" + - "fromStatus\x12\x1a\n" + - "\bworkflow\x18\x03 \x01(\tR\bworkflow\"\x11\n" + - "\x0fRequeueResponse\"\x86\x01\n" + - "\x0fParkTaskRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x12\n" + - "\x04from\x18\x02 \x01(\tR\x04from\x12\x16\n" + - "\x06detail\x18\x03 \x01(\tR\x06detail\x12\x14\n" + - "\x05class\x18\x04 \x01(\tR\x05class\x12\x18\n" + - "\ablocker\x18\x05 \x01(\tR\ablocker\"\x12\n" + - "\x10ParkTaskResponse\"\x15\n" + - "\x13RecoverStaleRequest\",\n" + - "\x14RecoverStaleResponse\x12\x14\n" + - "\x05count\x18\x01 \x01(\x03R\x05count\"u\n" + - "\x12ArchiveTaskRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x1f\n" + - "\vfrom_status\x18\x02 \x01(\tR\n" + - "fromStatus\x12%\n" + - "\x05audit\x18\x03 \x01(\v2\x0f.state.v1.EventR\x05audit\"0\n" + - "\x13ArchiveTaskResponse\x12\x19\n" + - "\bevent_id\x18\x01 \x01(\x03R\aeventId\"\xfa\x01\n" + - "\x10RetryTaskRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x1f\n" + - "\vfrom_status\x18\x02 \x01(\tR\n" + - "fromStatus\x12\x1a\n" + - "\bworkflow\x18\x03 \x01(\tR\bworkflow\x12\x1d\n" + - "\n" + - "retry_mode\x18\x04 \x01(\tR\tretryMode\x12\x1f\n" + - "\vresume_from\x18\x05 \x01(\tR\n" + - "resumeFrom\x12!\n" + - "\fresume_after\x18\x06 \x01(\tR\vresumeAfter\x12-\n" + - "\x12current_definition\x18\a \x01(\bR\x11currentDefinition\"\x13\n" + - "\x11RetryTaskResponse\"\x96\x01\n" + - "\x18RespondReviewGateRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x1f\n" + - "\vfrom_status\x18\x02 \x01(\tR\n" + - "fromStatus\x12\x12\n" + - "\x04gate\x18\x03 \x01(\tR\x04gate\x12\x1a\n" + - "\brereview\x18\x04 \x01(\bR\brereview\x12\x10\n" + - "\x03cap\x18\x05 \x01(\x03R\x03cap\"\x1b\n" + - "\x19RespondReviewGateResponse\"L\n" + - "\x17BeginRemediationRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x18\n" + - "\apayload\x18\x02 \x01(\tR\apayload\"\x1a\n" + - "\x18BeginRemediationResponse\"O\n" + - "\x1aUpdateReviewPayloadRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x18\n" + - "\apayload\x18\x02 \x01(\tR\apayload\"\x1d\n" + - "\x1bUpdateReviewPayloadResponse\"~\n" + - "\x17SetReviewCursorsRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12#\n" + - "\rreview_cursor\x18\x02 \x01(\x03R\freviewCursor\x12%\n" + - "\x0ecomment_cursor\x18\x03 \x01(\x03R\rcommentCursor\"\x1a\n" + - "\x18SetReviewCursorsResponse\"V\n" + - "\x12TaskByIssueRequest\x12\x14\n" + - "\x05owner\x18\x01 \x01(\tR\x05owner\x12\x12\n" + - "\x04repo\x18\x02 \x01(\tR\x04repo\x12\x16\n" + - "\x06number\x18\x03 \x01(\x03R\x06number\"O\n" + - "\x13TaskByIssueResponse\x12\"\n" + - "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\x12\x14\n" + - "\x05found\x18\x02 \x01(\bR\x05found\"W\n" + - "\x13OpenTaskByPRRequest\x12\x14\n" + - "\x05owner\x18\x01 \x01(\tR\x05owner\x12\x12\n" + - "\x04repo\x18\x02 \x01(\tR\x04repo\x12\x16\n" + - "\x06number\x18\x03 \x01(\x03R\x06number\"P\n" + - "\x14OpenTaskByPRResponse\x12\"\n" + - "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\x12\x14\n" + - "\x05found\x18\x02 \x01(\bR\x05found\"*\n" + - "\x0fTaskByIDRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\"L\n" + - "\x10TaskByIDResponse\x12\"\n" + - "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\x12\x14\n" + - "\x05found\x18\x02 \x01(\bR\x05found\"\x10\n" + - "\x0eOpenPRsRequest\"7\n" + - "\x0fOpenPRsResponse\x12$\n" + - "\x05tasks\x18\x01 \x03(\v2\x0e.state.v1.TaskR\x05tasks\"\x1b\n" + - "\x19ClearTerminalTasksRequest\"2\n" + - "\x1aClearTerminalTasksResponse\x12\x14\n" + - "\x05count\x18\x01 \x01(\x03R\x05count\"\xbd\x01\n" + - "\fTasksRequest\x12\x14\n" + - "\x05limit\x18\x01 \x01(\x03R\x05limit\x12\x1a\n" + - "\bstatuses\x18\x02 \x03(\tR\bstatuses\x12D\n" + - "\x10after_updated_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x0eafterUpdatedAt\x12\x19\n" + - "\bafter_id\x18\x04 \x01(\x03R\aafterId\x12\x1a\n" + - "\bworkflow\x18\x05 \x01(\tR\bworkflow\"5\n" + - "\rTasksResponse\x12$\n" + - "\x05tasks\x18\x01 \x03(\v2\x0e.state.v1.TaskR\x05tasks\"\x15\n" + - "\x13StatusCountsRequest\"\x95\x01\n" + - "\x14StatusCountsResponse\x12B\n" + - "\x06counts\x18\x01 \x03(\v2*.state.v1.StatusCountsResponse.CountsEntryR\x06counts\x1a9\n" + - "\vCountsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\x03R\x05value:\x028\x01\";\n" + - "\x12InsertEventRequest\x12%\n" + - "\x05event\x18\x01 \x01(\v2\x0f.state.v1.EventR\x05event\"%\n" + - "\x13InsertEventResponse\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\"E\n" + - "\x12EventsSinceRequest\x12\x19\n" + - "\bsince_id\x18\x01 \x01(\tR\asinceId\x12\x14\n" + - "\x05limit\x18\x02 \x01(\x03R\x05limit\">\n" + - "\x13EventsSinceResponse\x12'\n" + - "\x06events\x18\x01 \x03(\v2\x0f.state.v1.EventR\x06events\",\n" + - "\x11TaskEventsRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\"=\n" + - "\x12TaskEventsResponse\x12'\n" + - "\x06events\x18\x01 \x03(\v2\x0f.state.v1.EventR\x06events\"\x16\n" + - "\x14WorkflowStatsRequest\"E\n" + - "\x15WorkflowStatsResponse\x12,\n" + - "\x05stats\x18\x01 \x03(\v2\x16.state.v1.WorkflowStatR\x05stats\"\x13\n" + - "\x11StageStatsRequest\"?\n" + - "\x12StageStatsResponse\x12)\n" + - "\x05stats\x18\x01 \x03(\v2\x13.state.v1.StageStatR\x05stats\"(\n" + - "\x12TokensByDayRequest\x12\x12\n" + - "\x04days\x18\x01 \x01(\x03R\x04days\"B\n" + - "\x13TokensByDayResponse\x12+\n" + - "\x06tokens\x18\x01 \x03(\v2\x13.state.v1.DayTokensR\x06tokens\"\x83\x01\n" + - "\x0eConfigSnapshot\x12\x16\n" + - "\x06schema\x18\x01 \x01(\tR\x06schema\x12\x1a\n" + - "\bdocument\x18\x02 \x01(\fR\bdocument\x12=\n" + - "\fpublished_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\vpublishedAt\"P\n" + - "\x18PutConfigSnapshotRequest\x124\n" + - "\bsnapshot\x18\x01 \x01(\v2\x18.state.v1.ConfigSnapshotR\bsnapshot\"\x1b\n" + - "\x19PutConfigSnapshotResponse\"\x1a\n" + - "\x18GetConfigSnapshotRequest\"g\n" + - "\x19GetConfigSnapshotResponse\x124\n" + - "\bsnapshot\x18\x01 \x01(\v2\x18.state.v1.ConfigSnapshotR\bsnapshot\x12\x14\n" + - "\x05found\x18\x02 \x01(\bR\x05found\"\xe9\x01\n" + - "\rChannelStatus\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + - "\x05state\x18\x03 \x01(\tR\x05state\x12\x16\n" + - "\x06detail\x18\x04 \x01(\tR\x06detail\x12\x1e\n" + - "\n" + - "configured\x18\x05 \x01(\bR\n" + - "configured\x12)\n" + - "\x10reload_supported\x18\x06 \x01(\bR\x0freloadSupported\x12;\n" + - "\vobserved_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\n" + - "observedAt\"N\n" + - "\x17PutChannelStatusRequest\x123\n" + - "\bchannels\x18\x01 \x03(\v2\x17.state.v1.ChannelStatusR\bchannels\"\x1a\n" + - "\x18PutChannelStatusResponse\"\x1a\n" + - "\x18ListChannelStatusRequest\"P\n" + - "\x19ListChannelStatusResponse\x123\n" + - "\bchannels\x18\x01 \x03(\v2\x17.state.v1.ChannelStatusR\bchannels\"\xb7\x01\n" + - "\vApplyStatus\x12\x18\n" + - "\aprocess\x18\x01 \x01(\tR\aprocess\x12\x12\n" + - "\x04kind\x18\x02 \x01(\tR\x04kind\x12'\n" + - "\x0fapplied_version\x18\x03 \x01(\x03R\x0eappliedVersion\x12\x14\n" + - "\x05error\x18\x04 \x01(\tR\x05error\x12;\n" + - "\vreported_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\n" + - "reportedAt\"F\n" + - "\x15PutApplyStatusRequest\x12-\n" + - "\x06status\x18\x01 \x01(\v2\x15.state.v1.ApplyStatusR\x06status\"\x18\n" + - "\x16PutApplyStatusResponse\"\x18\n" + - "\x16ListApplyStatusRequest\"L\n" + - "\x17ListApplyStatusResponse\x121\n" + - "\bstatuses\x18\x01 \x03(\v2\x15.state.v1.ApplyStatusR\bstatuses\"k\n" + - "\x0fDependencyCheck\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" + - "\x06status\x18\x02 \x01(\tR\x06status\x12\x14\n" + - "\x05ready\x18\x03 \x01(\bR\x05ready\x12\x16\n" + - "\x06detail\x18\x04 \x01(\tR\x06detail\"\xdb\x02\n" + - "\bPresence\x12\x18\n" + - "\aservice\x18\x01 \x01(\tR\aservice\x12\x1f\n" + - "\vinstance_id\x18\x02 \x01(\tR\n" + - "instanceId\x12\x18\n" + - "\aversion\x18\x03 \x01(\tR\aversion\x12!\n" + - "\finstall_type\x18\x04 \x01(\tR\vinstallType\x129\n" + - "\n" + - "started_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tstartedAt\x12;\n" + - "\vreported_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\n" + - "reportedAt\x12\x14\n" + - "\x05ready\x18\a \x01(\bR\x05ready\x12\x16\n" + - "\x06detail\x18\b \x01(\tR\x06detail\x121\n" + - "\x06checks\x18\t \x03(\v2\x19.state.v1.DependencyCheckR\x06checks\"\x84\x01\n" + - "\x1bRecordCaptureRefusalRequest\x12\x16\n" + - "\x06source\x18\x01 \x01(\tR\x06source\x12\x12\n" + - "\x04addr\x18\x02 \x01(\tR\x04addr\x129\n" + - "\n" + - "refused_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\trefusedAt\"\x1e\n" + - "\x1cRecordCaptureRefusalResponse\"N\n" + - "\x1aListCaptureRefusalsRequest\x120\n" + - "\x05since\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x05since\"u\n" + - "\x0fCaptureRefusals\x12\x16\n" + - "\x06source\x18\x01 \x01(\tR\x06source\x12\x18\n" + - "\arefused\x18\x02 \x01(\x03R\arefused\x12\x1a\n" + - "\baccepted\x18\x03 \x01(\x03R\baccepted\x12\x14\n" + - "\x05addrs\x18\x04 \x03(\tR\x05addrs\"R\n" + - "\x1bListCaptureRefusalsResponse\x123\n" + - "\asources\x18\x01 \x03(\v2\x19.state.v1.CaptureRefusalsR\asources\"D\n" + - "\x12PutPresenceRequest\x12.\n" + - "\bpresence\x18\x01 \x01(\v2\x12.state.v1.PresenceR\bpresence\"\x15\n" + - "\x13PutPresenceResponse\"\x15\n" + - "\x13ListPresenceRequest\"H\n" + - "\x14ListPresenceResponse\x120\n" + - "\tpresences\x18\x01 \x03(\v2\x12.state.v1.PresenceR\tpresences\"\x97\x01\n" + - "\fTaskLogEntry\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12.\n" + - "\x04time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x04time\x12\x14\n" + - "\x05level\x18\x03 \x01(\tR\x05level\x12\x10\n" + - "\x03msg\x18\x04 \x01(\tR\x03msg\x12\x1f\n" + - "\vfields_json\x18\x05 \x01(\tR\n" + - "fieldsJson\"\xc6\x02\n" + - "\x12ReadTaskLogRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x18\n" + - "\aattempt\x18\x02 \x01(\x03R\aattempt\x12\x14\n" + - "\x05limit\x18\x03 \x01(\x03R\x05limit\x12\x16\n" + - "\x06levels\x18\x04 \x03(\tR\x06levels\x12\x1c\n" + - "\tcomponent\x18\x05 \x01(\tR\tcomponent\x12\x1a\n" + - "\bcontains\x18\x06 \x01(\tR\bcontains\x120\n" + - "\x05since\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\x05since\x120\n" + - "\x05until\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\x05until\x12\x14\n" + - "\x05stage\x18\t \x01(\tR\x05stage\x12\x1b\n" + - "\tbefore_id\x18\n" + - " \x01(\x03R\bbeforeId\"\x88\x02\n" + - "\x13ReadTaskLogResponse\x120\n" + - "\aentries\x18\x01 \x03(\v2\x16.state.v1.TaskLogEntryR\aentries\x12\x1c\n" + - "\ttruncated\x18\x02 \x01(\bR\ttruncated\x12\x18\n" + - "\aattempt\x18\x03 \x01(\x03R\aattempt\x12\x14\n" + - "\x05found\x18\x04 \x01(\bR\x05found\x12\x1e\n" + - "\n" + - "components\x18\x05 \x03(\tR\n" + - "components\x12\x12\n" + - "\x04file\x18\x06 \x01(\tR\x04file\x12%\n" + - "\x0emore_available\x18\a \x01(\bR\rmoreAvailable\x12\x16\n" + - "\x06cursor\x18\b \x01(\x03R\x06cursor\"P\n" + - "\x1bStreamTaskLogContentRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x18\n" + - "\aattempt\x18\x02 \x01(\x03R\aattempt\"d\n" + - "\x1cStreamTaskLogContentResponse\x12\x14\n" + - "\x05chunk\x18\x01 \x01(\fR\x05chunk\x12\x18\n" + - "\aattempt\x18\x02 \x01(\x03R\aattempt\x12\x14\n" + - "\x05found\x18\x03 \x01(\bR\x05found\"\x95\x01\n" + - "\x14InsertCaptureRequest\x121\n" + - "\acapture\x18\x01 \x01(\v2\x17.state.v1.CapturedEventR\acapture\x12+\n" + - "\x11retention_seconds\x18\x02 \x01(\x03R\x10retentionSeconds\x12\x1d\n" + - "\n" + - "max_events\x18\x03 \x01(\x03R\tmaxEvents\"'\n" + - "\x15InsertCaptureResponse\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"-\n" + - "\x15StreamCapturesRequest\x12\x14\n" + - "\x05limit\x18\x01 \x01(\x03R\x05limit\"K\n" + - "\x16StreamCapturesResponse\x121\n" + - "\acapture\x18\x01 \x01(\v2\x17.state.v1.CapturedEventR\acapture\"C\n" + - "\x14InsertMappingRequest\x12+\n" + - "\amapping\x18\x01 \x01(\v2\x11.state.v1.MappingR\amapping\"'\n" + - "\x15InsertMappingResponse\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"#\n" + - "\x11GetMappingRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"W\n" + - "\x12GetMappingResponse\x12+\n" + - "\amapping\x18\x01 \x01(\v2\x11.state.v1.MappingR\amapping\x12\x14\n" + - "\x05found\x18\x02 \x01(\bR\x05found\"\x15\n" + - "\x13ListMappingsRequest\"E\n" + - "\x14ListMappingsResponse\x12-\n" + - "\bmappings\x18\x01 \x03(\v2\x11.state.v1.MappingR\bmappings\"C\n" + - "\x14UpdateMappingRequest\x12+\n" + - "\amapping\x18\x01 \x01(\v2\x11.state.v1.MappingR\amapping\"\x17\n" + - "\x15UpdateMappingResponse\"&\n" + - "\x14DeleteMappingRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"\x17\n" + - "\x15DeleteMappingResponse\"Y\n" + - "\x19RecordMappingMatchRequest\x12\x1d\n" + - "\n" + - "mapping_id\x18\x01 \x01(\tR\tmappingId\x12\x1d\n" + - "\n" + - "capture_id\x18\x02 \x01(\tR\tcaptureId\"\x1c\n" + - "\x1aRecordMappingMatchResponse\"L\n" + - "\x16InsertEventTypeRequest\x122\n" + - "\n" + - "event_type\x18\x01 \x01(\v2\x13.state.v1.EventTypeR\teventType\")\n" + - "\x17InsertEventTypeResponse\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"L\n" + - "\x16UpdateEventTypeRequest\x122\n" + - "\n" + - "event_type\x18\x01 \x01(\v2\x13.state.v1.EventTypeR\teventType\"\x19\n" + - "\x17UpdateEventTypeResponse\"(\n" + - "\x16DeleteEventTypeRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"\x19\n" + - "\x17DeleteEventTypeResponse\"\x17\n" + - "\x15ListEventTypesRequest\"N\n" + - "\x16ListEventTypesResponse\x124\n" + - "\vevent_types\x18\x01 \x03(\v2\x13.state.v1.EventTypeR\n" + - "eventTypes\"C\n" + - "\x14InsertBindingRequest\x12+\n" + - "\abinding\x18\x01 \x01(\v2\x11.state.v1.BindingR\abinding\"'\n" + - "\x15InsertBindingResponse\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"#\n" + - "\x11GetBindingRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"W\n" + - "\x12GetBindingResponse\x12+\n" + - "\abinding\x18\x01 \x01(\v2\x11.state.v1.BindingR\abinding\x12\x14\n" + - "\x05found\x18\x02 \x01(\bR\x05found\"\x15\n" + - "\x13ListBindingsRequest\"E\n" + - "\x14ListBindingsResponse\x12-\n" + - "\bbindings\x18\x01 \x03(\v2\x11.state.v1.BindingR\bbindings\"C\n" + - "\x14UpdateBindingRequest\x12+\n" + - "\abinding\x18\x01 \x01(\v2\x11.state.v1.BindingR\abinding\"\x17\n" + - "\x15UpdateBindingResponse\"&\n" + - "\x14DeleteBindingRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"\x17\n" + - "\x15DeleteBindingResponse\"'\n" + - "\x15ApproveBindingRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"\x18\n" + - "\x16ApproveBindingResponse\">\n" + - "\x14SetSourceNameRequest\x12\x12\n" + - "\x04path\x18\x01 \x01(\tR\x04path\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\"\x17\n" + - "\x15SetSourceNameResponse\"L\n" + - "\x1eSetSourceDeliveryHeaderRequest\x12\x12\n" + - "\x04path\x18\x01 \x01(\tR\x04path\x12\x16\n" + - "\x06header\x18\x02 \x01(\tR\x06header\"!\n" + - "\x1fSetSourceDeliveryHeaderResponse\")\n" + - "\x13DeleteSourceRequest\x12\x12\n" + - "\x04path\x18\x01 \x01(\tR\x04path\"\x16\n" + - "\x14DeleteSourceResponse\"%\n" + - "\x13PauseBindingRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"\x16\n" + - "\x14PauseBindingResponse\"&\n" + - "\x14ResumeBindingRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"\x17\n" + - "\x15ResumeBindingResponse\"?\n" + - "\x13InsertSourceRequest\x12(\n" + - "\x06source\x18\x01 \x01(\v2\x10.state.v1.SourceR\x06source\"\x16\n" + - "\x14InsertSourceResponse\"&\n" + - "\x10GetSourceRequest\x12\x12\n" + - "\x04path\x18\x01 \x01(\tR\x04path\"S\n" + - "\x11GetSourceResponse\x12(\n" + - "\x06source\x18\x01 \x01(\v2\x10.state.v1.SourceR\x06source\x12\x14\n" + - "\x05found\x18\x02 \x01(\bR\x05found\"\x14\n" + - "\x12ListSourcesRequest\"A\n" + - "\x13ListSourcesResponse\x12*\n" + - "\asources\x18\x01 \x03(\v2\x10.state.v1.SourceR\asources\"Q\n" + - "\x17SetSourceSigningRequest\x12\x12\n" + - "\x04path\x18\x01 \x01(\tR\x04path\x12\x12\n" + - "\x04from\x18\x02 \x01(\tR\x04from\x12\x0e\n" + - "\x02to\x18\x03 \x01(\tR\x02to\"\x1a\n" + - "\x18SetSourceSigningResponse\"D\n" + - "\x16SetSourceSecretRequest\x12\x12\n" + - "\x04path\x18\x01 \x01(\tR\x04path\x12\x16\n" + - "\x06secret\x18\x02 \x01(\tR\x06secret\"\x19\n" + - "\x17SetSourceSecretResponse\"7\n" + - "\x1dArmedBindingsForSourceRequest\x12\x16\n" + - "\x06source\x18\x01 \x01(\tR\x06source\"O\n" + - "\x1eArmedBindingsForSourceResponse\x12-\n" + - "\bbindings\x18\x01 \x03(\v2\x11.state.v1.BindingR\bbindings\"\xaf\x01\n" + - "\x15RecordDispatchRequest\x12\x1d\n" + - "\n" + - "binding_id\x18\x01 \x01(\tR\tbindingId\x12'\n" + - "\x0fbinding_version\x18\x02 \x01(\x03R\x0ebindingVersion\x12\x1d\n" + - "\n" + - "capture_id\x18\x03 \x01(\tR\tcaptureId\x12\x17\n" + - "\atask_id\x18\x04 \x01(\x03R\x06taskId\x12\x16\n" + - "\x06reason\x18\x05 \x01(\tR\x06reason\"\x18\n" + - "\x16RecordDispatchResponse\"\x84\x01\n" + - "\x15ListDispatchesRequest\x12\x1d\n" + - "\n" + - "binding_id\x18\x01 \x01(\tR\tbindingId\x12\x1d\n" + - "\n" + - "capture_id\x18\x02 \x01(\tR\tcaptureId\x12\x17\n" + - "\atask_id\x18\x03 \x01(\x03R\x06taskId\x12\x14\n" + - "\x05limit\x18\x04 \x01(\x05R\x05limit\"\xe3\x01\n" + - "\bDispatch\x12\x1d\n" + - "\n" + - "binding_id\x18\x01 \x01(\tR\tbindingId\x12'\n" + - "\x0fbinding_version\x18\x02 \x01(\x03R\x0ebindingVersion\x12\x1d\n" + - "\n" + - "capture_id\x18\x03 \x01(\tR\tcaptureId\x12\x17\n" + - "\atask_id\x18\x04 \x01(\x03R\x06taskId\x12\x16\n" + - "\x06reason\x18\x05 \x01(\tR\x06reason\x12?\n" + - "\rdispatched_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\fdispatchedAt\"L\n" + - "\x16ListDispatchesResponse\x122\n" + - "\n" + - "dispatches\x18\x01 \x03(\v2\x12.state.v1.DispatchR\n" + - "dispatches\"\xa3\x01\n" + - "\x1dRecordPlaybookDispatchRequest\x12\x1f\n" + - "\vplaybook_id\x18\x01 \x01(\tR\n" + - "playbookId\x12)\n" + - "\x10playbook_version\x18\x02 \x01(\tR\x0fplaybookVersion\x12\x19\n" + - "\bevent_id\x18\x03 \x01(\tR\aeventId\x12\x1b\n" + - "\taction_id\x18\x04 \x01(\tR\bactionId\" \n" + - "\x1eRecordPlaybookDispatchResponse\"B\n" + - "\x1fDeletePlaybookDispatchesRequest\x12\x1f\n" + - "\vplaybook_id\x18\x01 \x01(\tR\n" + - "playbookId\"\"\n" + - " DeletePlaybookDispatchesResponse\"d\n" + - "!StreamUndispatchedCapturesRequest\x12\x1a\n" + - "\bbindings\x18\x03 \x03(\tR\bbindings\x12\x14\n" + - "\x05limit\x18\x02 \x01(\x03R\x05limitJ\x04\b\x01\x10\x02R\asources\"W\n" + - "\"StreamUndispatchedCapturesResponse\x121\n" + - "\acapture\x18\x01 \x01(\v2\x17.state.v1.CapturedEventR\acapture\"\xaf\x02\n" + - "\x19EnqueueBindingTaskRequest\x12\x14\n" + - "\x05owner\x18\x01 \x01(\tR\x05owner\x12\x12\n" + - "\x04repo\x18\x02 \x01(\tR\x04repo\x12\x14\n" + - "\x05title\x18\x03 \x01(\tR\x05title\x12\x12\n" + - "\x04body\x18\x04 \x01(\tR\x04body\x12\x1a\n" + - "\bworkflow\x18\x05 \x01(\tR\bworkflow\x12\x1a\n" + - "\bidentity\x18\x06 \x01(\tR\bidentity\x12\x1d\n" + - "\n" + - "binding_id\x18\a \x01(\tR\tbindingId\x12'\n" + - "\x0fbinding_version\x18\b \x01(\x03R\x0ebindingVersion\x12\x1f\n" + - "\vinputs_json\x18\t \x01(\tR\n" + - "inputsJson\x12\x1d\n" + - "\n" + - "capture_id\x18\n" + - " \x01(\tR\tcaptureId\"@\n" + - "\x1aEnqueueBindingTaskResponse\x12\"\n" + - "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\"\x96\x01\n" + - "\x16EnqueueCallTaskRequest\x12$\n" + - "\x0ecaller_task_id\x18\x01 \x01(\x03R\fcallerTaskId\x12\x1a\n" + - "\bworkflow\x18\x02 \x01(\tR\bworkflow\x12\x1f\n" + - "\vinputs_json\x18\x03 \x01(\tR\n" + - "inputsJson\x12\x19\n" + - "\bcall_key\x18\x04 \x01(\tR\acallKey\"Y\n" + - "\x17EnqueueCallTaskResponse\x12\"\n" + - "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\x12\x1a\n" + - "\baccepted\x18\x02 \x01(\bR\baccepted\"c\n" + - "\x19WorkflowCallStatusRequest\x12$\n" + - "\x0ecaller_task_id\x18\x01 \x01(\x03R\fcallerTaskId\x12 \n" + - "\fcall_task_id\x18\x02 \x01(\x03R\n" + - "callTaskId\"o\n" + - "\x1aWorkflowCallStatusResponse\x12\x16\n" + - "\x06status\x18\x01 \x01(\tR\x06status\x12\x16\n" + - "\x06detail\x18\x02 \x01(\tR\x06detail\x12!\n" + - "\foutputs_json\x18\x03 \x01(\tR\voutputsJson\"\xa9\x04\n" + - "\x10InstalledPackage\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\x12\x1c\n" + - "\treference\x18\x03 \x01(\tR\treference\x12\x16\n" + - "\x06digest\x18\x04 \x01(\tR\x06digest\x12'\n" + - "\x0fdescriptor_json\x18\x05 \x01(\fR\x0edescriptorJson\x12\x14\n" + - "\x05layer\x18\x06 \x01(\fR\x05layer\x12#\n" + - "\rupdate_policy\x18\a \x01(\tR\fupdatePolicy\x12I\n" + - "\x12accepted_authority\x18\b \x01(\v2\x1a.state.v1.PackageAuthorityR\x11acceptedAuthority\x12.\n" + - "\apending\x18\t \x01(\v2\x14.state.v1.PackagePinR\apending\x120\n" + - "\bprevious\x18\n" + - " \x01(\v2\x14.state.v1.PackagePinR\bprevious\x12Z\n" + - "\x1bprevious_accepted_authority\x18\v \x01(\v2\x1a.state.v1.PackageAuthorityR\x19previousAcceptedAuthority\x12G\n" + - "\x11pending_authority\x18\f \x01(\v2\x1a.state.v1.PackageAuthorityR\x10pendingAuthority\"B\n" + - "\n" + - "PackagePin\x12\x1c\n" + - "\treference\x18\x01 \x01(\tR\treference\x12\x16\n" + - "\x06digest\x18\x02 \x01(\tR\x06digest\"\xd7\x01\n" + - "\x10PackageAuthority\x12/\n" + - "\x13credential_services\x18\x01 \x03(\tR\x12credentialServices\x12!\n" + - "\fegress_hosts\x18\x02 \x03(\tR\vegressHosts\x12+\n" + - "\x11forge_permissions\x18\x03 \x03(\tR\x10forgePermissions\x12\x1a\n" + - "\btriggers\x18\x04 \x03(\tR\btriggers\x12\x14\n" + - "\x05tools\x18\x05 \x03(\tR\x05tools\x12\x10\n" + - "\x03env\x18\x06 \x03(\tR\x03env\"o\n" + - "\x15InstallPackageRequest\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\x12\x1c\n" + - "\treference\x18\x03 \x01(\tR\treference\x12\x16\n" + - "\x06digest\x18\x04 \x01(\tR\x06digestJ\x04\b\x01\x10\x02R\x06org_id\"N\n" + - "\x16InstallPackageResponse\x124\n" + - "\apackage\x18\x01 \x01(\v2\x1a.state.v1.InstalledPackageR\apackage\"\xb0\x01\n" + - "\x0eCatalogueEntry\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + - "\asurface\x18\x02 \x01(\tR\asurface\x12\x18\n" + - "\aversion\x18\x03 \x01(\tR\aversion\x12 \n" + - "\vdescription\x18\x04 \x01(\tR\vdescription\x12\x1c\n" + - "\treference\x18\x05 \x01(\tR\treference\x12\x16\n" + - "\x06digest\x18\x06 \x01(\tR\x06digest\"\x16\n" + - "\x14ListCatalogueRequest\"M\n" + - "\x15ListCatalogueResponse\x124\n" + - "\bpackages\x18\x01 \x03(\v2\x18.state.v1.CatalogueEntryR\bpackages\"1\n" + - "\x1bInstallFromCatalogueRequest\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\"T\n" + - "\x1cInstallFromCatalogueResponse\x124\n" + - "\apackage\x18\x01 \x01(\v2\x1a.state.v1.InstalledPackageR\apackage\">\n" + - "\x1aGetInstalledPackageRequest\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04nameJ\x04\b\x01\x10\x02R\x06org_id\"S\n" + - "\x1bGetInstalledPackageResponse\x124\n" + - "\apackage\x18\x01 \x01(\v2\x1a.state.v1.InstalledPackageR\apackage\",\n" + - "\x1cListInstalledPackagesRequestJ\x04\b\x01\x10\x02R\x06org_id\"W\n" + - "\x1dListInstalledPackagesResponse\x126\n" + - "\bpackages\x18\x01 \x03(\v2\x1a.state.v1.InstalledPackageR\bpackages\"y\n" + - "\x1dAcceptPackageAuthorityRequest\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\x126\n" + - "\baccepted\x18\x03 \x01(\v2\x1a.state.v1.PackageAuthorityR\bacceptedJ\x04\b\x01\x10\x02R\x06org_id\"V\n" + - "\x1eAcceptPackageAuthorityResponse\x124\n" + - "\apackage\x18\x01 \x01(\v2\x1a.state.v1.InstalledPackageR\apackage\"A\n" + - "\x1dRemoveInstalledPackageRequest\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04nameJ\x04\b\x01\x10\x02R\x06org_id\" \n" + - "\x1eRemoveInstalledPackageResponse\"*\n" + - "\x14UpdatePackageRequest\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\"M\n" + - "\x15UpdatePackageResponse\x124\n" + - "\apackage\x18\x01 \x01(\v2\x1a.state.v1.InstalledPackageR\apackage\"1\n" + - "\x1bApprovePackageUpdateRequest\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\"T\n" + - "\x1cApprovePackageUpdateResponse\x124\n" + - "\apackage\x18\x01 \x01(\v2\x1a.state.v1.InstalledPackageR\apackage\",\n" + - "\x16RollbackPackageRequest\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\"O\n" + - "\x17RollbackPackageResponse\x124\n" + - "\apackage\x18\x01 \x01(\v2\x1a.state.v1.InstalledPackageR\apackage\"K\n" + - "\x1dSetPackageUpdatePolicyRequest\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" + - "\x06policy\x18\x02 \x01(\tR\x06policy\"V\n" + - "\x1eSetPackageUpdatePolicyResponse\x124\n" + - "\apackage\x18\x01 \x01(\v2\x1a.state.v1.InstalledPackageR\apackage\"6\n" + - "\x13GetPrincipalRequest\x12\x1f\n" + - "\videntity_id\x18\x01 \x01(\tR\n" + - "identityId\"c\n" + - "\x13PrincipalMembership\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12!\n" + - "\fworkspace_id\x18\x02 \x01(\tR\vworkspaceId\x12\x12\n" + - "\x04role\x18\x03 \x01(\tR\x04role\"Y\n" + - "\x12PrincipalWorkspace\x12!\n" + - "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12 \n" + - "\venvironment\x18\x02 \x01(\tR\venvironment\"\xc8\x01\n" + - "\x0fAccessPrincipal\x12\x1f\n" + - "\videntity_id\x18\x01 \x01(\tR\n" + - "identityId\x12\x15\n" + - "\x06org_id\x18\x02 \x01(\tR\x05orgId\x12?\n" + - "\vmemberships\x18\x03 \x03(\v2\x1d.state.v1.PrincipalMembershipR\vmemberships\x12<\n" + - "\n" + - "workspaces\x18\x04 \x03(\v2\x1c.state.v1.PrincipalWorkspaceR\n" + - "workspaces\"O\n" + - "\x14GetPrincipalResponse\x127\n" + - "\tprincipal\x18\x01 \x01(\v2\x19.state.v1.AccessPrincipalR\tprincipal\"\xcd\x01\n" + - "\fAccessPolicy\x12\x1b\n" + - "\tpolicy_id\x18\x01 \x01(\tR\bpolicyId\x12\x14\n" + - "\x05level\x18\x02 \x01(\tR\x05level\x12\x15\n" + - "\x06org_id\x18\x03 \x01(\tR\x05orgId\x12!\n" + - "\fworkspace_id\x18\x04 \x01(\tR\vworkspaceId\x12\x1f\n" + - "\vobject_kind\x18\x05 \x01(\tR\n" + - "objectKind\x12\x1b\n" + - "\tobject_id\x18\x06 \x01(\tR\bobjectId\x12\x12\n" + - "\x04text\x18\a \x01(\tR\x04text\"\x15\n" + - "\x13ListPoliciesRequest\"J\n" + - "\x14ListPoliciesResponse\x122\n" + - "\bpolicies\x18\x01 \x03(\v2\x16.state.v1.AccessPolicyR\bpolicies\"\x1b\n" + - "\x19GetPoliciesVersionRequest\"6\n" + - "\x1aGetPoliciesVersionResponse\x12\x18\n" + - "\aversion\x18\x01 \x01(\x03R\aversion\"B\n" + - "\x10PutPolicyRequest\x12.\n" + - "\x06policy\x18\x01 \x01(\v2\x16.state.v1.AccessPolicyR\x06policy\"-\n" + - "\x11PutPolicyResponse\x12\x18\n" + - "\aversion\x18\x01 \x01(\x03R\aversion\"E\n" + - "\x13DeletePolicyRequest\x12.\n" + - "\x06policy\x18\x01 \x01(\v2\x16.state.v1.AccessPolicyR\x06policy\"\x16\n" + - "\x14DeletePolicyResponse\"8\n" + - "\x1fEnsureShippedOrgPoliciesRequest\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\"\"\n" + - " EnsureShippedOrgPoliciesResponse\"\x95\x02\n" + - "\fAccessDenial\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x1c\n" + - "\tprincipal\x18\x02 \x01(\tR\tprincipal\x12\x16\n" + - "\x06action\x18\x03 \x01(\tR\x06action\x12#\n" + - "\rresource_kind\x18\x04 \x01(\tR\fresourceKind\x12\x1f\n" + - "\vresource_id\x18\x05 \x01(\tR\n" + - "resourceId\x12\x14\n" + - "\x05level\x18\x06 \x01(\tR\x05level\x12\x1a\n" + - "\bpolicies\x18\a \x03(\tR\bpolicies\x12\x14\n" + - "\x05count\x18\b \x01(\x03R\x05count\x12*\n" + - "\x02at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\x02at\"E\n" + - "\x13RecordDenialRequest\x12.\n" + - "\x06denial\x18\x01 \x01(\v2\x16.state.v1.AccessDenialR\x06denial\"\x16\n" + - "\x14RecordDenialResponse\"8\n" + - "\x12ListDenialsRequest\x12\x14\n" + - "\x05limit\x18\x02 \x01(\x05R\x05limitJ\x04\b\x01\x10\x02R\x06org_id\"G\n" + - "\x13ListDenialsResponse\x120\n" + - "\adenials\x18\x01 \x03(\v2\x16.state.v1.AccessDenialR\adenials\")\n" + - "\x03Org\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\"h\n" + - "\tWorkspace\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n" + - "\x06org_id\x18\x02 \x01(\tR\x05orgId\x12\x12\n" + - "\x04name\x18\x03 \x01(\tR\x04name\x12 \n" + - "\venvironment\x18\x04 \x01(\tR\venvironment\"\x97\x01\n" + - "\x06Member\x12\x1f\n" + - "\videntity_id\x18\x01 \x01(\tR\n" + - "identityId\x12\x12\n" + - "\x04kind\x18\x02 \x01(\tR\x04kind\x12!\n" + - "\fdisplay_name\x18\x03 \x01(\tR\vdisplayName\x12!\n" + - "\fworkspace_id\x18\x04 \x01(\tR\vworkspaceId\x12\x12\n" + - "\x04role\x18\x05 \x01(\tR\x04role\"\x11\n" + - "\x0fListOrgsRequest\"5\n" + - "\x10ListOrgsResponse\x12!\n" + - "\x04orgs\x18\x01 \x03(\v2\r.state.v1.OrgR\x04orgs\"&\n" + - "\rGetOrgRequest\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\"1\n" + - "\x0eGetOrgResponse\x12\x1f\n" + - "\x03org\x18\x01 \x01(\v2\r.state.v1.OrgR\x03org\"b\n" + - "\x10CreateOrgRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\x12*\n" + - "\x11owner_identity_id\x18\x03 \x01(\tR\x0fownerIdentityId\"4\n" + - "\x11CreateOrgResponse\x12\x1f\n" + - "\x03org\x18\x01 \x01(\v2\r.state.v1.OrgR\x03org\".\n" + - "\x15ListWorkspacesRequest\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\"M\n" + - "\x16ListWorkspacesResponse\x123\n" + - "\n" + - "workspaces\x18\x01 \x03(\v2\x13.state.v1.WorkspaceR\n" + - "workspaces\"u\n" + - "\x16CreateWorkspaceRequest\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x0e\n" + - "\x02id\x18\x02 \x01(\tR\x02id\x12\x12\n" + - "\x04name\x18\x03 \x01(\tR\x04name\x12 \n" + - "\venvironment\x18\x04 \x01(\tR\venvironment\"L\n" + - "\x17CreateWorkspaceResponse\x121\n" + - "\tworkspace\x18\x01 \x01(\v2\x13.state.v1.WorkspaceR\tworkspace\"+\n" + - "\x12ListMembersRequest\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\"A\n" + - "\x13ListMembersResponse\x12*\n" + - "\amembers\x18\x01 \x03(\v2\x10.state.v1.MemberR\amembers\"\x85\x01\n" + - "\x14SetMembershipRequest\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x1f\n" + - "\videntity_id\x18\x02 \x01(\tR\n" + - "identityId\x12!\n" + - "\fworkspace_id\x18\x03 \x01(\tR\vworkspaceId\x12\x12\n" + - "\x04role\x18\x04 \x01(\tR\x04role\"\x17\n" + - "\x15SetMembershipResponse\"t\n" + - "\x17RemoveMembershipRequest\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x1f\n" + - "\videntity_id\x18\x02 \x01(\tR\n" + - "identityId\x12!\n" + - "\fworkspace_id\x18\x03 \x01(\tR\vworkspaceId\"\x1a\n" + - "\x18RemoveMembershipResponse\"L\n" + - "\x12AssignAgentRequest\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x1f\n" + - "\videntity_id\x18\x02 \x01(\tR\n" + - "identityId\"\x15\n" + - "\x13AssignAgentResponse\"?\n" + - "\x11RecentLogsRequest\x12*\n" + - "\x05query\x18\x01 \x01(\v2\x14.logging.v1.LogQueryR\x05query\"I\n" + - "\x12RecentLogsResponse\x123\n" + - "\bsnapshot\x18\x01 \x01(\v2\x17.logging.v1.LogSnapshotR\bsnapshot\"\xf7\x02\n" + - "\vUsageRecord\x12\x16\n" + - "\x06source\x18\x02 \x01(\tR\x06source\x12\x17\n" + - "\atask_id\x18\x03 \x01(\x03R\x06taskId\x12\x18\n" + - "\aattempt\x18\x04 \x01(\x03R\aattempt\x12\x1a\n" + - "\bworkflow\x18\x05 \x01(\tR\bworkflow\x12\x12\n" + - "\x04step\x18\x06 \x01(\tR\x04step\x12\x14\n" + - "\x05alias\x18\a \x01(\tR\x05alias\x12\x1a\n" + - "\bprovider\x18\b \x01(\tR\bprovider\x12\x14\n" + - "\x05model\x18\t \x01(\tR\x05model\x12!\n" + - "\finput_tokens\x18\n" + - " \x01(\x03R\vinputTokens\x12#\n" + - "\routput_tokens\x18\v \x01(\x03R\foutputTokens\x12#\n" + - "\rcached_tokens\x18\f \x01(\x03R\fcachedTokens\x12*\n" + - "\x02at\x18\r \x01(\v2\x1a.google.protobuf.TimestampR\x02atJ\x04\b\x01\x10\x02R\x06org_id\"C\n" + - "\x12RecordUsageRequest\x12-\n" + - "\x06record\x18\x01 \x01(\v2\x15.state.v1.UsageRecordR\x06record\"\x15\n" + - "\x13RecordUsageResponse\",\n" + - "\x11TaskModelsRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\"2\n" + - "\x17TaskInstructionsRequest\x12\x17\n" + - "\atask_id\x18\x01 \x01(\x03R\x06taskId\"Z\n" + - "\x18TaskInstructionsResponse\x12\x1a\n" + - "\binstance\x18\x01 \x01(\tR\binstance\x12\"\n" + - "\forganisation\x18\x02 \x01(\tR\forganisation\"\xce\x02\n" + - "\x12TaskModelsResponse\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12C\n" + - "\aaliases\x18\x02 \x03(\v2).state.v1.TaskModelsResponse.AliasesEntryR\aaliases\x12I\n" + - "\tproviders\x18\x03 \x03(\v2+.state.v1.TaskModelsResponse.ProvidersEntryR\tproviders\x1a:\n" + - "\fAliasesEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aU\n" + - "\x0eProvidersEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12-\n" + - "\x05value\x18\x02 \x01(\v2\x17.state.v1.ModelProviderR\x05value:\x028\x01\"\xa6\x01\n" + - "\rModelProvider\x12\x14\n" + - "\x05class\x18\x01 \x01(\tR\x05class\x12\x19\n" + - "\bbase_url\x18\x02 \x01(\tR\abaseUrl\x12\x1e\n" + - "\vapi_key_env\x18\x03 \x01(\tR\tapiKeyEnv\x12$\n" + - "\x0eapi_key_engine\x18\x04 \x01(\tR\fapiKeyEngine\x12\x1e\n" + - "\vapi_key_key\x18\x05 \x01(\tR\tapiKeyKey\"\x15\n" + - "\x13CallerModelsRequest\"\xb0\x01\n" + - "\x14CallerModelsResponse\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12E\n" + - "\aaliases\x18\x02 \x03(\v2+.state.v1.CallerModelsResponse.AliasesEntryR\aaliases\x1a:\n" + - "\fAliasesEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x87\x04\n" + - "\x05Alert\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x15\n" + - "\x06org_id\x18\x02 \x01(\tR\x05orgId\x12\x12\n" + - "\x04kind\x18\x03 \x01(\tR\x04kind\x12\x18\n" + - "\asubject\x18\x04 \x01(\tR\asubject\x12\x1a\n" + - "\bseverity\x18\x05 \x01(\tR\bseverity\x12\x14\n" + - "\x05title\x18\x06 \x01(\tR\x05title\x12\x12\n" + - "\x04body\x18\a \x01(\tR\x04body\x12\x12\n" + - "\x04link\x18\b \x01(\tR\x04link\x12\x1c\n" + - "\tcondition\x18\t \x01(\bR\tcondition\x12\x14\n" + - "\x05state\x18\n" + - " \x01(\tR\x05state\x12=\n" + - "\ffirst_raised\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\vfirstRaised\x127\n" + - "\tlast_seen\x18\f \x01(\v2\x1a.google.protobuf.TimestampR\blastSeen\x12\x14\n" + - "\x05count\x18\r \x01(\x03R\x05count\x12\x1b\n" + - "\tclosed_by\x18\x0e \x01(\tR\bclosedBy\x127\n" + - "\tclosed_at\x18\x0f \x01(\v2\x1a.google.protobuf.TimestampR\bclosedAt\x127\n" + - "\n" + - "deliveries\x18\x10 \x03(\v2\x17.state.v1.AlertDeliveryR\n" + - "deliveries\"\xba\x01\n" + - "\rAlertDelivery\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x14\n" + - "\x05event\x18\x02 \x01(\tR\x05event\x12\x14\n" + - "\x05state\x18\x03 \x01(\tR\x05state\x129\n" + - "\n" + - "created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x122\n" + - "\battempts\x18\x05 \x03(\v2\x16.state.v1.AlertAttemptR\battempts\"\x7f\n" + - "\fAlertAttempt\x12\f\n" + - "\x01n\x18\x01 \x01(\x03R\x01n\x12*\n" + - "\x02at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x02at\x12\x1f\n" + - "\vstatus_code\x18\x03 \x01(\x03R\n" + - "statusCode\x12\x14\n" + - "\x05error\x18\x04 \x01(\tR\x05error\"\xd0\x01\n" + - "\x11RaiseAlertRequest\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x12\n" + - "\x04kind\x18\x02 \x01(\tR\x04kind\x12\x18\n" + - "\asubject\x18\x03 \x01(\tR\asubject\x12\x1a\n" + - "\bseverity\x18\x04 \x01(\tR\bseverity\x12\x14\n" + - "\x05title\x18\x05 \x01(\tR\x05title\x12\x12\n" + - "\x04body\x18\x06 \x01(\tR\x04body\x12\x12\n" + - "\x04link\x18\a \x01(\tR\x04link\x12\x1c\n" + - "\tcondition\x18\b \x01(\bR\tcondition\";\n" + - "\x12RaiseAlertResponse\x12%\n" + - "\x05alert\x18\x01 \x01(\v2\x0f.state.v1.AlertR\x05alert\"Z\n" + - "\x13ResolveAlertRequest\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x12\n" + - "\x04kind\x18\x02 \x01(\tR\x04kind\x12\x18\n" + - "\asubject\x18\x03 \x01(\tR\asubject\"\x16\n" + - "\x14ResolveAlertResponse\"<\n" + - "\x13DismissAlertRequest\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x0e\n" + - "\x02id\x18\x02 \x01(\x03R\x02id\"\x16\n" + - "\x14DismissAlertResponse\"X\n" + - "\x11ListAlertsRequest\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12\x16\n" + - "\x06states\x18\x02 \x03(\tR\x06states\x12\x14\n" + - "\x05limit\x18\x03 \x01(\x05R\x05limit\"=\n" + - "\x12ListAlertsResponse\x12'\n" + - "\x06alerts\x18\x01 \x03(\v2\x0f.state.v1.AlertR\x06alerts\"3\n" + - "\x1bClaimAlertDeliveriesRequest\x12\x14\n" + - "\x05limit\x18\x01 \x01(\x05R\x05limit\"\x88\x01\n" + - "\x10DueAlertDelivery\x123\n" + - "\bdelivery\x18\x01 \x01(\v2\x17.state.v1.AlertDeliveryR\bdelivery\x12%\n" + - "\x05alert\x18\x02 \x01(\v2\x0f.state.v1.AlertR\x05alert\x12\x18\n" + - "\aattempt\x18\x03 \x01(\x03R\aattempt\"L\n" + - "\x1cClaimAlertDeliveriesResponse\x12,\n" + - "\x03due\x18\x01 \x03(\v2\x1a.state.v1.DueAlertDeliveryR\x03due\"\x8d\x01\n" + - "\x19RecordAlertAttemptRequest\x12\x1f\n" + - "\vdelivery_id\x18\x01 \x01(\x03R\n" + - "deliveryId\x12\x18\n" + - "\askipped\x18\x02 \x01(\bR\askipped\x12\x1f\n" + - "\vstatus_code\x18\x03 \x01(\x03R\n" + - "statusCode\x12\x14\n" + - "\x05error\x18\x04 \x01(\tR\x05error\"\x1c\n" + - "\x1aRecordAlertAttemptResponse\"\x15\n" + - "\x13AccountSetupRequest\"2\n" + - "\x14AccountSetupResponse\x12\x1a\n" + - "\brequired\x18\x01 \x01(\bR\brequired\"\x92\x02\n" + - "\x16RegisterAccountRequest\x12\x14\n" + - "\x05email\x18\x01 \x01(\tR\x05email\x12!\n" + - "\fdisplay_name\x18\x02 \x01(\tR\vdisplayName\x12\x1a\n" + - "\bpassword\x18\x03 \x01(\tR\bpassword\x12\x12\n" + - "\x04role\x18\x04 \x01(\tR\x04role\x12\x1c\n" + - "\tbootstrap\x18\x05 \x01(\bR\tbootstrap\x12+\n" + - "\x11organisation_name\x18\x06 \x01(\tR\x10organisationName\x12%\n" + - "\x0eworkspace_name\x18\a \x01(\tR\rworkspaceName\x12\x1d\n" + - "\n" + - "public_url\x18\b \x01(\tR\tpublicUrl\"I\n" + - "\x17RegisterAccountResponse\x12.\n" + - "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"H\n" + - "\x14SignInAccountRequest\x12\x14\n" + - "\x05email\x18\x01 \x01(\tR\x05email\x12\x1a\n" + - "\bpassword\x18\x02 \x01(\tR\bpassword\"\x98\x01\n" + - "\x15SignInAccountResponse\x12.\n" + - "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\x12\x14\n" + - "\x05token\x18\x02 \x01(\tR\x05token\x129\n" + - "\n" + - "expires_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\"4\n" + - "\x1cResolveAccountSessionRequest\x12\x14\n" + - "\x05token\x18\x01 \x01(\tR\x05token\"O\n" + - "\x1dResolveAccountSessionResponse\x12.\n" + - "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\"-\n" + - "\x15SignOutAccountRequest\x12\x14\n" + - "\x05token\x18\x01 \x01(\tR\x05token\"\x18\n" + - "\x16SignOutAccountResponse\"l\n" + - "\x1cChangeAccountPasswordRequest\x12)\n" + - "\x10current_password\x18\x01 \x01(\tR\x0fcurrentPassword\x12!\n" + - "\fnew_password\x18\x02 \x01(\tR\vnewPassword\"\x1f\n" + - "\x1dChangeAccountPasswordResponse\"\xa3\x01\n" + - "\x16AuthenticationSettings\x12\x1d\n" + - "\n" + - "public_url\x18\x01 \x01(\tR\tpublicUrl\x12\x1f\n" + - "\voidc_issuer\x18\x02 \x01(\tR\n" + - "oidcIssuer\x12#\n" + - "\roidc_audience\x18\x03 \x01(\tR\foidcAudience\x12$\n" + - "\x0eoidc_client_id\x18\x04 \x01(\tR\foidcClientId\"\"\n" + - " GetAuthenticationSettingsRequest\"a\n" + - "!GetAuthenticationSettingsResponse\x12<\n" + - "\bsettings\x18\x01 \x01(\v2 .state.v1.AuthenticationSettingsR\bsettings\"a\n" + - "!SaveAuthenticationSettingsRequest\x12<\n" + - "\bsettings\x18\x01 \x01(\v2 .state.v1.AuthenticationSettingsR\bsettings\"$\n" + - "\"SaveAuthenticationSettingsResponse\"9\n" + - "\x13BeginPasskeyRequest\x12\"\n" + - "\fregistration\x18\x01 \x01(\bR\fregistration\"F\n" + - "\x14BeginPasskeyResponse\x12\x14\n" + - "\x05token\x18\x01 \x01(\tR\x05token\x12\x18\n" + - "\aoptions\x18\x02 \x01(\fR\aoptions\"\x84\x01\n" + - "\x14FinishPasskeyRequest\x12\x14\n" + - "\x05token\x18\x01 \x01(\tR\x05token\x12\x1e\n" + - "\n" + - "credential\x18\x02 \x01(\fR\n" + - "credential\x12\"\n" + - "\fregistration\x18\x03 \x01(\bR\fregistration\x12\x12\n" + - "\x04name\x18\x04 \x01(\tR\x04name\"\x98\x01\n" + - "\x15FinishPasskeyResponse\x12.\n" + - "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\x12\x14\n" + - "\x05token\x18\x02 \x01(\tR\x05token\x129\n" + - "\n" + - "expires_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\"-\n" + - "\aPasskey\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\"\x15\n" + - "\x13ListPasskeysRequest\"E\n" + - "\x14ListPasskeysResponse\x12-\n" + - "\bpasskeys\x18\x01 \x03(\v2\x11.state.v1.PasskeyR\bpasskeys\"&\n" + - "\x14DeletePasskeyRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"\x17\n" + - "\x15DeletePasskeyResponse\"V\n" + - "\x19OpenAccountSessionRequest\x129\n" + - "\n" + - "expires_at\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\"\x9d\x01\n" + - "\x1aOpenAccountSessionResponse\x12.\n" + - "\bidentity\x18\x01 \x01(\v2\x12.state.v1.IdentityR\bidentity\x12\x14\n" + - "\x05token\x18\x02 \x01(\tR\x05token\x129\n" + - "\n" + - "expires_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\"9\n" + - "!RequireFreshAccountSessionRequest\x12\x14\n" + - "\x05token\x18\x01 \x01(\tR\x05token\"$\n" + - "\"RequireFreshAccountSessionResponse\"\x1e\n" + - "\x1cCreateAccountRecoveryRequest\"3\n" + - "\x1dCreateAccountRecoveryResponse\x12\x12\n" + - "\x04code\x18\x01 \x01(\tR\x04code\"]\n" + - "\x15RecoverAccountRequest\x12\x14\n" + - "\x05email\x18\x01 \x01(\tR\x05email\x12\x12\n" + - "\x04code\x18\x02 \x01(\tR\x04code\x12\x1a\n" + - "\bpassword\x18\x03 \x01(\tR\bpassword\"\x18\n" + - "\x16RecoverAccountResponse\"-\n" + - "\x14ListOrgAgentsRequest\x12\x15\n" + - "\x06org_id\x18\x01 \x01(\tR\x05orgId\"I\n" + - "\x0fAgentAssignment\x12\x1f\n" + - "\videntity_id\x18\x01 \x01(\tR\n" + - "identityId\x12\x15\n" + - "\x06org_id\x18\x02 \x01(\tR\x05orgId\"J\n" + - "\x15ListOrgAgentsResponse\x121\n" + - "\x06agents\x18\x01 \x03(\v2\x19.state.v1.AgentAssignmentR\x06agents2\xf6j\n" + - "\x11StateStoreService\x12G\n" + - "\n" + - "RecentLogs\x12\x1b.state.v1.RecentLogsRequest\x1a\x1c.state.v1.RecentLogsResponse\x12S\n" + - "\x0eInstallPackage\x12\x1f.state.v1.InstallPackageRequest\x1a .state.v1.InstallPackageResponse\x12P\n" + - "\rListCatalogue\x12\x1e.state.v1.ListCatalogueRequest\x1a\x1f.state.v1.ListCatalogueResponse\x12e\n" + - "\x14InstallFromCatalogue\x12%.state.v1.InstallFromCatalogueRequest\x1a&.state.v1.InstallFromCatalogueResponse\x12b\n" + - "\x13GetInstalledPackage\x12$.state.v1.GetInstalledPackageRequest\x1a%.state.v1.GetInstalledPackageResponse\x12h\n" + - "\x15ListInstalledPackages\x12&.state.v1.ListInstalledPackagesRequest\x1a'.state.v1.ListInstalledPackagesResponse\x12k\n" + - "\x16AcceptPackageAuthority\x12'.state.v1.AcceptPackageAuthorityRequest\x1a(.state.v1.AcceptPackageAuthorityResponse\x12k\n" + - "\x16RemoveInstalledPackage\x12'.state.v1.RemoveInstalledPackageRequest\x1a(.state.v1.RemoveInstalledPackageResponse\x12P\n" + - "\rUpdatePackage\x12\x1e.state.v1.UpdatePackageRequest\x1a\x1f.state.v1.UpdatePackageResponse\x12e\n" + - "\x14ApprovePackageUpdate\x12%.state.v1.ApprovePackageUpdateRequest\x1a&.state.v1.ApprovePackageUpdateResponse\x12V\n" + - "\x0fRollbackPackage\x12 .state.v1.RollbackPackageRequest\x1a!.state.v1.RollbackPackageResponse\x12k\n" + - "\x16SetPackageUpdatePolicy\x12'.state.v1.SetPackageUpdatePolicyRequest\x1a(.state.v1.SetPackageUpdatePolicyResponse\x12\\\n" + - "\x11RegisterTaskGrant\x12\".state.v1.RegisterTaskGrantRequest\x1a#.state.v1.RegisterTaskGrantResponse\x12V\n" + - "\x0fRevokeTaskGrant\x12 .state.v1.RevokeTaskGrantRequest\x1a!.state.v1.RevokeTaskGrantResponse\x12Y\n" + - "\x10ResolveTaskGrant\x12!.state.v1.ResolveTaskGrantRequest\x1a\".state.v1.ResolveTaskGrantResponse\x12S\n" + - "\x0eListIdentities\x12\x1f.state.v1.ListIdentitiesRequest\x1a .state.v1.ListIdentitiesResponse\x12t\n" + - "\x19GetAuthenticationSettings\x12*.state.v1.GetAuthenticationSettingsRequest\x1a+.state.v1.GetAuthenticationSettingsResponse\x12w\n" + - "\x1aSaveAuthenticationSettings\x12+.state.v1.SaveAuthenticationSettingsRequest\x1a,.state.v1.SaveAuthenticationSettingsResponse\x12M\n" + - "\fBeginPasskey\x12\x1d.state.v1.BeginPasskeyRequest\x1a\x1e.state.v1.BeginPasskeyResponse\x12P\n" + - "\rFinishPasskey\x12\x1e.state.v1.FinishPasskeyRequest\x1a\x1f.state.v1.FinishPasskeyResponse\x12M\n" + - "\fListPasskeys\x12\x1d.state.v1.ListPasskeysRequest\x1a\x1e.state.v1.ListPasskeysResponse\x12P\n" + - "\rDeletePasskey\x12\x1e.state.v1.DeletePasskeyRequest\x1a\x1f.state.v1.DeletePasskeyResponse\x12_\n" + - "\x12OpenAccountSession\x12#.state.v1.OpenAccountSessionRequest\x1a$.state.v1.OpenAccountSessionResponse\x12w\n" + - "\x1aRequireFreshAccountSession\x12+.state.v1.RequireFreshAccountSessionRequest\x1a,.state.v1.RequireFreshAccountSessionResponse\x12h\n" + - "\x15CreateAccountRecovery\x12&.state.v1.CreateAccountRecoveryRequest\x1a'.state.v1.CreateAccountRecoveryResponse\x12S\n" + - "\x0eRecoverAccount\x12\x1f.state.v1.RecoverAccountRequest\x1a .state.v1.RecoverAccountResponse\x12M\n" + - "\fAccountSetup\x12\x1d.state.v1.AccountSetupRequest\x1a\x1e.state.v1.AccountSetupResponse\x12V\n" + - "\x0fRegisterAccount\x12 .state.v1.RegisterAccountRequest\x1a!.state.v1.RegisterAccountResponse\x12P\n" + - "\rSignInAccount\x12\x1e.state.v1.SignInAccountRequest\x1a\x1f.state.v1.SignInAccountResponse\x12h\n" + - "\x15ResolveAccountSession\x12&.state.v1.ResolveAccountSessionRequest\x1a'.state.v1.ResolveAccountSessionResponse\x12S\n" + - "\x0eSignOutAccount\x12\x1f.state.v1.SignOutAccountRequest\x1a .state.v1.SignOutAccountResponse\x12h\n" + - "\x15ChangeAccountPassword\x12&.state.v1.ChangeAccountPasswordRequest\x1a'.state.v1.ChangeAccountPasswordResponse\x12J\n" + - "\vGetIdentity\x12\x1c.state.v1.GetIdentityRequest\x1a\x1d.state.v1.GetIdentityResponse\x12S\n" + - "\x0eCreateIdentity\x12\x1f.state.v1.CreateIdentityRequest\x1a .state.v1.CreateIdentityResponse\x12S\n" + - "\x0eRenameIdentity\x12\x1f.state.v1.RenameIdentityRequest\x1a .state.v1.RenameIdentityResponse\x12V\n" + - "\x0fSuspendIdentity\x12 .state.v1.SuspendIdentityRequest\x1a!.state.v1.SuspendIdentityResponse\x12_\n" + - "\x12ReactivateIdentity\x12#.state.v1.ReactivateIdentityRequest\x1a$.state.v1.ReactivateIdentityResponse\x12S\n" + - "\x0eRetireIdentity\x12\x1f.state.v1.RetireIdentityRequest\x1a .state.v1.RetireIdentityResponse\x12k\n" + - "\x16ResolveIdentitySubject\x12'.state.v1.ResolveIdentitySubjectRequest\x1a(.state.v1.ResolveIdentitySubjectResponse\x12b\n" + - "\x13BindIdentitySubject\x12$.state.v1.BindIdentitySubjectRequest\x1a%.state.v1.BindIdentitySubjectResponse\x12e\n" + - "\x14ClaimIdentitySubject\x12%.state.v1.ClaimIdentitySubjectRequest\x1a&.state.v1.ClaimIdentitySubjectResponse\x12Y\n" + - "\x10AddPersonalToken\x12!.state.v1.AddPersonalTokenRequest\x1a\".state.v1.AddPersonalTokenResponse\x12_\n" + - "\x12ListPersonalTokens\x12#.state.v1.ListPersonalTokensRequest\x1a$.state.v1.ListPersonalTokensResponse\x12b\n" + - "\x13RevokePersonalToken\x12$.state.v1.RevokePersonalTokenRequest\x1a%.state.v1.RevokePersonalTokenResponse\x12M\n" + - "\fEnqueueIssue\x12\x1d.state.v1.EnqueueIssueRequest\x1a\x1e.state.v1.EnqueueIssueResponse\x12V\n" + - "\x0fEnqueueChatTask\x12 .state.v1.EnqueueChatTaskRequest\x1a!.state.v1.EnqueueChatTaskResponse\x12b\n" + - "\x13ActiveTasksByOrigin\x12$.state.v1.ActiveTasksByOriginRequest\x1a%.state.v1.ActiveTasksByOriginResponse\x12Y\n" + - "\x10UnpostedOutcomes\x12!.state.v1.UnpostedOutcomesRequest\x1a\".state.v1.UnpostedOutcomesResponse\x12\\\n" + - "\x11MarkOutcomePosted\x12\".state.v1.MarkOutcomePostedRequest\x1a#.state.v1.MarkOutcomePostedResponse\x12D\n" + - "\tClaimNext\x12\x1a.state.v1.ClaimNextRequest\x1a\x1b.state.v1.ClaimNextResponse\x12M\n" + - "\fClaimByIssue\x12\x1d.state.v1.ClaimByIssueRequest\x1a\x1e.state.v1.ClaimByIssueResponse\x12G\n" + - "\n" + - "Transition\x12\x1b.state.v1.TransitionRequest\x1a\x1c.state.v1.TransitionResponse\x12;\n" + - "\x06Update\x12\x17.state.v1.UpdateRequest\x1a\x18.state.v1.UpdateResponse\x12D\n" + - "\tStartStep\x12\x1a.state.v1.StartStepRequest\x1a\x1b.state.v1.StartStepResponse\x12J\n" + - "\vRecordUsage\x12\x1c.state.v1.RecordUsageRequest\x1a\x1d.state.v1.RecordUsageResponse\x12G\n" + - "\n" + - "TaskModels\x12\x1b.state.v1.TaskModelsRequest\x1a\x1c.state.v1.TaskModelsResponse\x12Y\n" + - "\x10TaskInstructions\x12!.state.v1.TaskInstructionsRequest\x1a\".state.v1.TaskInstructionsResponse\x12M\n" + - "\fCallerModels\x12\x1d.state.v1.CallerModelsRequest\x1a\x1e.state.v1.CallerModelsResponse\x12G\n" + - "\n" + - "FinishStep\x12\x1b.state.v1.FinishStepRequest\x1a\x1c.state.v1.FinishStepResponse\x12V\n" + - "\x0fCancelExecution\x12 .state.v1.CancelExecutionRequest\x1a!.state.v1.CancelExecutionResponse\x12D\n" + - "\tListSteps\x12\x1a.state.v1.ListStepsRequest\x1a\x1b.state.v1.ListStepsResponse\x12Y\n" + - "\x10GetHarnessSecret\x12!.state.v1.GetHarnessSecretRequest\x1a\".state.v1.GetHarnessSecretResponse\x12Y\n" + - "\x10PutHarnessSecret\x12!.state.v1.PutHarnessSecretRequest\x1a\".state.v1.PutHarnessSecretResponse\x12>\n" + - "\aRequeue\x12\x18.state.v1.RequeueRequest\x1a\x19.state.v1.RequeueResponse\x12A\n" + - "\bParkTask\x12\x19.state.v1.ParkTaskRequest\x1a\x1a.state.v1.ParkTaskResponse\x12M\n" + - "\fRecoverStale\x12\x1d.state.v1.RecoverStaleRequest\x1a\x1e.state.v1.RecoverStaleResponse\x12J\n" + - "\vArchiveTask\x12\x1c.state.v1.ArchiveTaskRequest\x1a\x1d.state.v1.ArchiveTaskResponse\x12D\n" + - "\tRetryTask\x12\x1a.state.v1.RetryTaskRequest\x1a\x1b.state.v1.RetryTaskResponse\x12\\\n" + - "\x11RespondReviewGate\x12\".state.v1.RespondReviewGateRequest\x1a#.state.v1.RespondReviewGateResponse\x12Y\n" + - "\x10BeginRemediation\x12!.state.v1.BeginRemediationRequest\x1a\".state.v1.BeginRemediationResponse\x12b\n" + - "\x13UpdateReviewPayload\x12$.state.v1.UpdateReviewPayloadRequest\x1a%.state.v1.UpdateReviewPayloadResponse\x12Y\n" + - "\x10SetReviewCursors\x12!.state.v1.SetReviewCursorsRequest\x1a\".state.v1.SetReviewCursorsResponse\x12J\n" + - "\vTaskByIssue\x12\x1c.state.v1.TaskByIssueRequest\x1a\x1d.state.v1.TaskByIssueResponse\x12M\n" + - "\fOpenTaskByPR\x12\x1d.state.v1.OpenTaskByPRRequest\x1a\x1e.state.v1.OpenTaskByPRResponse\x12A\n" + - "\bTaskByID\x12\x19.state.v1.TaskByIDRequest\x1a\x1a.state.v1.TaskByIDResponse\x12>\n" + - "\aOpenPRs\x12\x18.state.v1.OpenPRsRequest\x1a\x19.state.v1.OpenPRsResponse\x12_\n" + - "\x12ClearTerminalTasks\x12#.state.v1.ClearTerminalTasksRequest\x1a$.state.v1.ClearTerminalTasksResponse\x128\n" + - "\x05Tasks\x12\x16.state.v1.TasksRequest\x1a\x17.state.v1.TasksResponse\x12M\n" + - "\fStatusCounts\x12\x1d.state.v1.StatusCountsRequest\x1a\x1e.state.v1.StatusCountsResponse\x12J\n" + - "\vInsertEvent\x12\x1c.state.v1.InsertEventRequest\x1a\x1d.state.v1.InsertEventResponse\x12J\n" + - "\vEventsSince\x12\x1c.state.v1.EventsSinceRequest\x1a\x1d.state.v1.EventsSinceResponse\x12G\n" + - "\n" + - "TaskEvents\x12\x1b.state.v1.TaskEventsRequest\x1a\x1c.state.v1.TaskEventsResponse\x12P\n" + - "\rWorkflowStats\x12\x1e.state.v1.WorkflowStatsRequest\x1a\x1f.state.v1.WorkflowStatsResponse\x12G\n" + - "\n" + - "StageStats\x12\x1b.state.v1.StageStatsRequest\x1a\x1c.state.v1.StageStatsResponse\x12J\n" + - "\vTokensByDay\x12\x1c.state.v1.TokensByDayRequest\x1a\x1d.state.v1.TokensByDayResponse\x12\\\n" + - "\x11PutConfigSnapshot\x12\".state.v1.PutConfigSnapshotRequest\x1a#.state.v1.PutConfigSnapshotResponse\x12\\\n" + - "\x11GetConfigSnapshot\x12\".state.v1.GetConfigSnapshotRequest\x1a#.state.v1.GetConfigSnapshotResponse\x12Y\n" + - "\x10PutChannelStatus\x12!.state.v1.PutChannelStatusRequest\x1a\".state.v1.PutChannelStatusResponse\x12\\\n" + - "\x11ListChannelStatus\x12\".state.v1.ListChannelStatusRequest\x1a#.state.v1.ListChannelStatusResponse\x12S\n" + - "\x0ePutApplyStatus\x12\x1f.state.v1.PutApplyStatusRequest\x1a .state.v1.PutApplyStatusResponse\x12V\n" + - "\x0fListApplyStatus\x12 .state.v1.ListApplyStatusRequest\x1a!.state.v1.ListApplyStatusResponse\x12J\n" + - "\vPutPresence\x12\x1c.state.v1.PutPresenceRequest\x1a\x1d.state.v1.PutPresenceResponse\x12e\n" + - "\x14RecordCaptureRefusal\x12%.state.v1.RecordCaptureRefusalRequest\x1a&.state.v1.RecordCaptureRefusalResponse\x12b\n" + - "\x13ListCaptureRefusals\x12$.state.v1.ListCaptureRefusalsRequest\x1a%.state.v1.ListCaptureRefusalsResponse\x12M\n" + - "\fListPresence\x12\x1d.state.v1.ListPresenceRequest\x1a\x1e.state.v1.ListPresenceResponse\x12J\n" + - "\vReadTaskLog\x12\x1c.state.v1.ReadTaskLogRequest\x1a\x1d.state.v1.ReadTaskLogResponse\x12g\n" + - "\x14StreamTaskLogContent\x12%.state.v1.StreamTaskLogContentRequest\x1a&.state.v1.StreamTaskLogContentResponse0\x01\x12P\n" + - "\rInsertCapture\x12\x1e.state.v1.InsertCaptureRequest\x1a\x1f.state.v1.InsertCaptureResponse\x12U\n" + - "\x0eStreamCaptures\x12\x1f.state.v1.StreamCapturesRequest\x1a .state.v1.StreamCapturesResponse0\x01\x12P\n" + - "\rInsertMapping\x12\x1e.state.v1.InsertMappingRequest\x1a\x1f.state.v1.InsertMappingResponse\x12G\n" + - "\n" + - "GetMapping\x12\x1b.state.v1.GetMappingRequest\x1a\x1c.state.v1.GetMappingResponse\x12M\n" + - "\fListMappings\x12\x1d.state.v1.ListMappingsRequest\x1a\x1e.state.v1.ListMappingsResponse\x12P\n" + - "\rUpdateMapping\x12\x1e.state.v1.UpdateMappingRequest\x1a\x1f.state.v1.UpdateMappingResponse\x12P\n" + - "\rDeleteMapping\x12\x1e.state.v1.DeleteMappingRequest\x1a\x1f.state.v1.DeleteMappingResponse\x12_\n" + - "\x12RecordMappingMatch\x12#.state.v1.RecordMappingMatchRequest\x1a$.state.v1.RecordMappingMatchResponse\x12V\n" + - "\x0fInsertEventType\x12 .state.v1.InsertEventTypeRequest\x1a!.state.v1.InsertEventTypeResponse\x12V\n" + - "\x0fUpdateEventType\x12 .state.v1.UpdateEventTypeRequest\x1a!.state.v1.UpdateEventTypeResponse\x12V\n" + - "\x0fDeleteEventType\x12 .state.v1.DeleteEventTypeRequest\x1a!.state.v1.DeleteEventTypeResponse\x12S\n" + - "\x0eListEventTypes\x12\x1f.state.v1.ListEventTypesRequest\x1a .state.v1.ListEventTypesResponse\x12P\n" + - "\rInsertBinding\x12\x1e.state.v1.InsertBindingRequest\x1a\x1f.state.v1.InsertBindingResponse\x12G\n" + - "\n" + - "GetBinding\x12\x1b.state.v1.GetBindingRequest\x1a\x1c.state.v1.GetBindingResponse\x12M\n" + - "\fListBindings\x12\x1d.state.v1.ListBindingsRequest\x1a\x1e.state.v1.ListBindingsResponse\x12S\n" + - "\x0eListDispatches\x12\x1f.state.v1.ListDispatchesRequest\x1a .state.v1.ListDispatchesResponse\x12P\n" + - "\rUpdateBinding\x12\x1e.state.v1.UpdateBindingRequest\x1a\x1f.state.v1.UpdateBindingResponse\x12P\n" + - "\rDeleteBinding\x12\x1e.state.v1.DeleteBindingRequest\x1a\x1f.state.v1.DeleteBindingResponse\x12S\n" + - "\x0eApproveBinding\x12\x1f.state.v1.ApproveBindingRequest\x1a .state.v1.ApproveBindingResponse\x12M\n" + - "\fPauseBinding\x12\x1d.state.v1.PauseBindingRequest\x1a\x1e.state.v1.PauseBindingResponse\x12P\n" + - "\rResumeBinding\x12\x1e.state.v1.ResumeBindingRequest\x1a\x1f.state.v1.ResumeBindingResponse\x12M\n" + - "\fInsertSource\x12\x1d.state.v1.InsertSourceRequest\x1a\x1e.state.v1.InsertSourceResponse\x12D\n" + - "\tGetSource\x12\x1a.state.v1.GetSourceRequest\x1a\x1b.state.v1.GetSourceResponse\x12J\n" + - "\vListSources\x12\x1c.state.v1.ListSourcesRequest\x1a\x1d.state.v1.ListSourcesResponse\x12Y\n" + - "\x10SetSourceSigning\x12!.state.v1.SetSourceSigningRequest\x1a\".state.v1.SetSourceSigningResponse\x12V\n" + - "\x0fSetSourceSecret\x12 .state.v1.SetSourceSecretRequest\x1a!.state.v1.SetSourceSecretResponse\x12P\n" + - "\rSetSourceName\x12\x1e.state.v1.SetSourceNameRequest\x1a\x1f.state.v1.SetSourceNameResponse\x12n\n" + - "\x17SetSourceDeliveryHeader\x12(.state.v1.SetSourceDeliveryHeaderRequest\x1a).state.v1.SetSourceDeliveryHeaderResponse\x12M\n" + - "\fDeleteSource\x12\x1d.state.v1.DeleteSourceRequest\x1a\x1e.state.v1.DeleteSourceResponse\x12k\n" + - "\x16ArmedBindingsForSource\x12'.state.v1.ArmedBindingsForSourceRequest\x1a(.state.v1.ArmedBindingsForSourceResponse\x12S\n" + - "\x0eRecordDispatch\x12\x1f.state.v1.RecordDispatchRequest\x1a .state.v1.RecordDispatchResponse\x12k\n" + - "\x16RecordPlaybookDispatch\x12'.state.v1.RecordPlaybookDispatchRequest\x1a(.state.v1.RecordPlaybookDispatchResponse\x12q\n" + - "\x18DeletePlaybookDispatches\x12).state.v1.DeletePlaybookDispatchesRequest\x1a*.state.v1.DeletePlaybookDispatchesResponse\x12y\n" + - "\x1aStreamUndispatchedCaptures\x12+.state.v1.StreamUndispatchedCapturesRequest\x1a,.state.v1.StreamUndispatchedCapturesResponse0\x01\x12_\n" + - "\x12EnqueueBindingTask\x12#.state.v1.EnqueueBindingTaskRequest\x1a$.state.v1.EnqueueBindingTaskResponse\x12V\n" + - "\x0fEnqueueCallTask\x12 .state.v1.EnqueueCallTaskRequest\x1a!.state.v1.EnqueueCallTaskResponse\x12_\n" + - "\x12WorkflowCallStatus\x12#.state.v1.WorkflowCallStatusRequest\x1a$.state.v1.WorkflowCallStatusResponse\x12M\n" + - "\fGetPrincipal\x12\x1d.state.v1.GetPrincipalRequest\x1a\x1e.state.v1.GetPrincipalResponse\x12M\n" + - "\fListPolicies\x12\x1d.state.v1.ListPoliciesRequest\x1a\x1e.state.v1.ListPoliciesResponse\x12_\n" + - "\x12GetPoliciesVersion\x12#.state.v1.GetPoliciesVersionRequest\x1a$.state.v1.GetPoliciesVersionResponse\x12D\n" + - "\tPutPolicy\x12\x1a.state.v1.PutPolicyRequest\x1a\x1b.state.v1.PutPolicyResponse\x12M\n" + - "\fDeletePolicy\x12\x1d.state.v1.DeletePolicyRequest\x1a\x1e.state.v1.DeletePolicyResponse\x12q\n" + - "\x18EnsureShippedOrgPolicies\x12).state.v1.EnsureShippedOrgPoliciesRequest\x1a*.state.v1.EnsureShippedOrgPoliciesResponse\x12M\n" + - "\fRecordDenial\x12\x1d.state.v1.RecordDenialRequest\x1a\x1e.state.v1.RecordDenialResponse\x12J\n" + - "\vListDenials\x12\x1c.state.v1.ListDenialsRequest\x1a\x1d.state.v1.ListDenialsResponse\x12A\n" + - "\bListOrgs\x12\x19.state.v1.ListOrgsRequest\x1a\x1a.state.v1.ListOrgsResponse\x12;\n" + - "\x06GetOrg\x12\x17.state.v1.GetOrgRequest\x1a\x18.state.v1.GetOrgResponse\x12D\n" + - "\tCreateOrg\x12\x1a.state.v1.CreateOrgRequest\x1a\x1b.state.v1.CreateOrgResponse\x12S\n" + - "\x0eListWorkspaces\x12\x1f.state.v1.ListWorkspacesRequest\x1a .state.v1.ListWorkspacesResponse\x12V\n" + - "\x0fCreateWorkspace\x12 .state.v1.CreateWorkspaceRequest\x1a!.state.v1.CreateWorkspaceResponse\x12J\n" + - "\vListMembers\x12\x1c.state.v1.ListMembersRequest\x1a\x1d.state.v1.ListMembersResponse\x12P\n" + - "\rSetMembership\x12\x1e.state.v1.SetMembershipRequest\x1a\x1f.state.v1.SetMembershipResponse\x12Y\n" + - "\x10RemoveMembership\x12!.state.v1.RemoveMembershipRequest\x1a\".state.v1.RemoveMembershipResponse\x12P\n" + - "\rListOrgAgents\x12\x1e.state.v1.ListOrgAgentsRequest\x1a\x1f.state.v1.ListOrgAgentsResponse\x12J\n" + - "\vAssignAgent\x12\x1c.state.v1.AssignAgentRequest\x1a\x1d.state.v1.AssignAgentResponse\x12G\n" + - "\n" + - "RaiseAlert\x12\x1b.state.v1.RaiseAlertRequest\x1a\x1c.state.v1.RaiseAlertResponse\x12M\n" + - "\fResolveAlert\x12\x1d.state.v1.ResolveAlertRequest\x1a\x1e.state.v1.ResolveAlertResponse\x12M\n" + - "\fDismissAlert\x12\x1d.state.v1.DismissAlertRequest\x1a\x1e.state.v1.DismissAlertResponse\x12G\n" + - "\n" + - "ListAlerts\x12\x1b.state.v1.ListAlertsRequest\x1a\x1c.state.v1.ListAlertsResponse\x12e\n" + - "\x14ClaimAlertDeliveries\x12%.state.v1.ClaimAlertDeliveriesRequest\x1a&.state.v1.ClaimAlertDeliveriesResponse\x12_\n" + - "\x12RecordAlertAttempt\x12#.state.v1.RecordAlertAttemptRequest\x1a$.state.v1.RecordAlertAttemptResponseB\xa4\x01\n" + - "\fcom.state.v1B\n" + - "StateProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" - -var ( - file_state_v1_state_proto_rawDescOnce sync.Once - file_state_v1_state_proto_rawDescData []byte -) - -func file_state_v1_state_proto_rawDescGZIP() []byte { - file_state_v1_state_proto_rawDescOnce.Do(func() { - file_state_v1_state_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_state_proto_rawDesc), len(file_state_v1_state_proto_rawDesc))) - }) - return file_state_v1_state_proto_rawDescData -} - -var file_state_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 369) -var file_state_v1_state_proto_goTypes = []any{ - (*RegisterTaskGrantRequest)(nil), // 0: state.v1.RegisterTaskGrantRequest - (*RegisterTaskGrantResponse)(nil), // 1: state.v1.RegisterTaskGrantResponse - (*RevokeTaskGrantRequest)(nil), // 2: state.v1.RevokeTaskGrantRequest - (*RevokeTaskGrantResponse)(nil), // 3: state.v1.RevokeTaskGrantResponse - (*ResolveTaskGrantRequest)(nil), // 4: state.v1.ResolveTaskGrantRequest - (*ResolveTaskGrantResponse)(nil), // 5: state.v1.ResolveTaskGrantResponse - (*Identity)(nil), // 6: state.v1.Identity - (*IdentityAudit)(nil), // 7: state.v1.IdentityAudit - (*ListIdentitiesRequest)(nil), // 8: state.v1.ListIdentitiesRequest - (*ListIdentitiesResponse)(nil), // 9: state.v1.ListIdentitiesResponse - (*GetIdentityRequest)(nil), // 10: state.v1.GetIdentityRequest - (*GetIdentityResponse)(nil), // 11: state.v1.GetIdentityResponse - (*CreateIdentityRequest)(nil), // 12: state.v1.CreateIdentityRequest - (*RenameIdentityRequest)(nil), // 13: state.v1.RenameIdentityRequest - (*SuspendIdentityRequest)(nil), // 14: state.v1.SuspendIdentityRequest - (*ReactivateIdentityRequest)(nil), // 15: state.v1.ReactivateIdentityRequest - (*RetireIdentityRequest)(nil), // 16: state.v1.RetireIdentityRequest - (*CreateIdentityResponse)(nil), // 17: state.v1.CreateIdentityResponse - (*RenameIdentityResponse)(nil), // 18: state.v1.RenameIdentityResponse - (*SuspendIdentityResponse)(nil), // 19: state.v1.SuspendIdentityResponse - (*ReactivateIdentityResponse)(nil), // 20: state.v1.ReactivateIdentityResponse - (*RetireIdentityResponse)(nil), // 21: state.v1.RetireIdentityResponse - (*ResolveIdentitySubjectRequest)(nil), // 22: state.v1.ResolveIdentitySubjectRequest - (*ResolveIdentitySubjectResponse)(nil), // 23: state.v1.ResolveIdentitySubjectResponse - (*BindIdentitySubjectRequest)(nil), // 24: state.v1.BindIdentitySubjectRequest - (*BindIdentitySubjectResponse)(nil), // 25: state.v1.BindIdentitySubjectResponse - (*ClaimIdentitySubjectRequest)(nil), // 26: state.v1.ClaimIdentitySubjectRequest - (*ClaimIdentitySubjectResponse)(nil), // 27: state.v1.ClaimIdentitySubjectResponse - (*PersonalToken)(nil), // 28: state.v1.PersonalToken - (*AddPersonalTokenRequest)(nil), // 29: state.v1.AddPersonalTokenRequest - (*AddPersonalTokenResponse)(nil), // 30: state.v1.AddPersonalTokenResponse - (*ListPersonalTokensRequest)(nil), // 31: state.v1.ListPersonalTokensRequest - (*ListPersonalTokensResponse)(nil), // 32: state.v1.ListPersonalTokensResponse - (*RevokePersonalTokenRequest)(nil), // 33: state.v1.RevokePersonalTokenRequest - (*RevokePersonalTokenResponse)(nil), // 34: state.v1.RevokePersonalTokenResponse - (*Task)(nil), // 35: state.v1.Task - (*Event)(nil), // 36: state.v1.Event - (*CapturedEvent)(nil), // 37: state.v1.CapturedEvent - (*EventTypeHeaderCondition)(nil), // 38: state.v1.EventTypeHeaderCondition - (*EventTypePayloadCondition)(nil), // 39: state.v1.EventTypePayloadCondition - (*EventType)(nil), // 40: state.v1.EventType - (*MappingField)(nil), // 41: state.v1.MappingField - (*Mapping)(nil), // 42: state.v1.Mapping - (*BindingMatcher)(nil), // 43: state.v1.BindingMatcher - (*Binding)(nil), // 44: state.v1.Binding - (*Source)(nil), // 45: state.v1.Source - (*WorkflowStat)(nil), // 46: state.v1.WorkflowStat - (*StageStat)(nil), // 47: state.v1.StageStat - (*DayTokens)(nil), // 48: state.v1.DayTokens - (*EnqueueIssueRequest)(nil), // 49: state.v1.EnqueueIssueRequest - (*EnqueueIssueResponse)(nil), // 50: state.v1.EnqueueIssueResponse - (*ActiveTasksByOriginRequest)(nil), // 51: state.v1.ActiveTasksByOriginRequest - (*ActiveTasksByOriginResponse)(nil), // 52: state.v1.ActiveTasksByOriginResponse - (*UnpostedOutcomesRequest)(nil), // 53: state.v1.UnpostedOutcomesRequest - (*UnpostedOutcomesResponse)(nil), // 54: state.v1.UnpostedOutcomesResponse - (*MarkOutcomePostedRequest)(nil), // 55: state.v1.MarkOutcomePostedRequest - (*MarkOutcomePostedResponse)(nil), // 56: state.v1.MarkOutcomePostedResponse - (*EnqueueChatTaskRequest)(nil), // 57: state.v1.EnqueueChatTaskRequest - (*EnqueueChatTaskResponse)(nil), // 58: state.v1.EnqueueChatTaskResponse - (*ClaimNextRequest)(nil), // 59: state.v1.ClaimNextRequest - (*ClaimNextResponse)(nil), // 60: state.v1.ClaimNextResponse - (*ClaimByIssueRequest)(nil), // 61: state.v1.ClaimByIssueRequest - (*ClaimByIssueResponse)(nil), // 62: state.v1.ClaimByIssueResponse - (*TransitionRequest)(nil), // 63: state.v1.TransitionRequest - (*TransitionResponse)(nil), // 64: state.v1.TransitionResponse - (*StartStepRequest)(nil), // 65: state.v1.StartStepRequest - (*StartStepResponse)(nil), // 66: state.v1.StartStepResponse - (*FinishStepRequest)(nil), // 67: state.v1.FinishStepRequest - (*FinishStepResponse)(nil), // 68: state.v1.FinishStepResponse - (*CancelExecutionRequest)(nil), // 69: state.v1.CancelExecutionRequest - (*CancelExecutionResponse)(nil), // 70: state.v1.CancelExecutionResponse - (*StepExecution)(nil), // 71: state.v1.StepExecution - (*ListStepsRequest)(nil), // 72: state.v1.ListStepsRequest - (*ListStepsResponse)(nil), // 73: state.v1.ListStepsResponse - (*HarnessSecret)(nil), // 74: state.v1.HarnessSecret - (*GetHarnessSecretRequest)(nil), // 75: state.v1.GetHarnessSecretRequest - (*GetHarnessSecretResponse)(nil), // 76: state.v1.GetHarnessSecretResponse - (*PutHarnessSecretRequest)(nil), // 77: state.v1.PutHarnessSecretRequest - (*PutHarnessSecretResponse)(nil), // 78: state.v1.PutHarnessSecretResponse - (*UpdateRequest)(nil), // 79: state.v1.UpdateRequest - (*UpdateResponse)(nil), // 80: state.v1.UpdateResponse - (*RequeueRequest)(nil), // 81: state.v1.RequeueRequest - (*RequeueResponse)(nil), // 82: state.v1.RequeueResponse - (*ParkTaskRequest)(nil), // 83: state.v1.ParkTaskRequest - (*ParkTaskResponse)(nil), // 84: state.v1.ParkTaskResponse - (*RecoverStaleRequest)(nil), // 85: state.v1.RecoverStaleRequest - (*RecoverStaleResponse)(nil), // 86: state.v1.RecoverStaleResponse - (*ArchiveTaskRequest)(nil), // 87: state.v1.ArchiveTaskRequest - (*ArchiveTaskResponse)(nil), // 88: state.v1.ArchiveTaskResponse - (*RetryTaskRequest)(nil), // 89: state.v1.RetryTaskRequest - (*RetryTaskResponse)(nil), // 90: state.v1.RetryTaskResponse - (*RespondReviewGateRequest)(nil), // 91: state.v1.RespondReviewGateRequest - (*RespondReviewGateResponse)(nil), // 92: state.v1.RespondReviewGateResponse - (*BeginRemediationRequest)(nil), // 93: state.v1.BeginRemediationRequest - (*BeginRemediationResponse)(nil), // 94: state.v1.BeginRemediationResponse - (*UpdateReviewPayloadRequest)(nil), // 95: state.v1.UpdateReviewPayloadRequest - (*UpdateReviewPayloadResponse)(nil), // 96: state.v1.UpdateReviewPayloadResponse - (*SetReviewCursorsRequest)(nil), // 97: state.v1.SetReviewCursorsRequest - (*SetReviewCursorsResponse)(nil), // 98: state.v1.SetReviewCursorsResponse - (*TaskByIssueRequest)(nil), // 99: state.v1.TaskByIssueRequest - (*TaskByIssueResponse)(nil), // 100: state.v1.TaskByIssueResponse - (*OpenTaskByPRRequest)(nil), // 101: state.v1.OpenTaskByPRRequest - (*OpenTaskByPRResponse)(nil), // 102: state.v1.OpenTaskByPRResponse - (*TaskByIDRequest)(nil), // 103: state.v1.TaskByIDRequest - (*TaskByIDResponse)(nil), // 104: state.v1.TaskByIDResponse - (*OpenPRsRequest)(nil), // 105: state.v1.OpenPRsRequest - (*OpenPRsResponse)(nil), // 106: state.v1.OpenPRsResponse - (*ClearTerminalTasksRequest)(nil), // 107: state.v1.ClearTerminalTasksRequest - (*ClearTerminalTasksResponse)(nil), // 108: state.v1.ClearTerminalTasksResponse - (*TasksRequest)(nil), // 109: state.v1.TasksRequest - (*TasksResponse)(nil), // 110: state.v1.TasksResponse - (*StatusCountsRequest)(nil), // 111: state.v1.StatusCountsRequest - (*StatusCountsResponse)(nil), // 112: state.v1.StatusCountsResponse - (*InsertEventRequest)(nil), // 113: state.v1.InsertEventRequest - (*InsertEventResponse)(nil), // 114: state.v1.InsertEventResponse - (*EventsSinceRequest)(nil), // 115: state.v1.EventsSinceRequest - (*EventsSinceResponse)(nil), // 116: state.v1.EventsSinceResponse - (*TaskEventsRequest)(nil), // 117: state.v1.TaskEventsRequest - (*TaskEventsResponse)(nil), // 118: state.v1.TaskEventsResponse - (*WorkflowStatsRequest)(nil), // 119: state.v1.WorkflowStatsRequest - (*WorkflowStatsResponse)(nil), // 120: state.v1.WorkflowStatsResponse - (*StageStatsRequest)(nil), // 121: state.v1.StageStatsRequest - (*StageStatsResponse)(nil), // 122: state.v1.StageStatsResponse - (*TokensByDayRequest)(nil), // 123: state.v1.TokensByDayRequest - (*TokensByDayResponse)(nil), // 124: state.v1.TokensByDayResponse - (*ConfigSnapshot)(nil), // 125: state.v1.ConfigSnapshot - (*PutConfigSnapshotRequest)(nil), // 126: state.v1.PutConfigSnapshotRequest - (*PutConfigSnapshotResponse)(nil), // 127: state.v1.PutConfigSnapshotResponse - (*GetConfigSnapshotRequest)(nil), // 128: state.v1.GetConfigSnapshotRequest - (*GetConfigSnapshotResponse)(nil), // 129: state.v1.GetConfigSnapshotResponse - (*ChannelStatus)(nil), // 130: state.v1.ChannelStatus - (*PutChannelStatusRequest)(nil), // 131: state.v1.PutChannelStatusRequest - (*PutChannelStatusResponse)(nil), // 132: state.v1.PutChannelStatusResponse - (*ListChannelStatusRequest)(nil), // 133: state.v1.ListChannelStatusRequest - (*ListChannelStatusResponse)(nil), // 134: state.v1.ListChannelStatusResponse - (*ApplyStatus)(nil), // 135: state.v1.ApplyStatus - (*PutApplyStatusRequest)(nil), // 136: state.v1.PutApplyStatusRequest - (*PutApplyStatusResponse)(nil), // 137: state.v1.PutApplyStatusResponse - (*ListApplyStatusRequest)(nil), // 138: state.v1.ListApplyStatusRequest - (*ListApplyStatusResponse)(nil), // 139: state.v1.ListApplyStatusResponse - (*DependencyCheck)(nil), // 140: state.v1.DependencyCheck - (*Presence)(nil), // 141: state.v1.Presence - (*RecordCaptureRefusalRequest)(nil), // 142: state.v1.RecordCaptureRefusalRequest - (*RecordCaptureRefusalResponse)(nil), // 143: state.v1.RecordCaptureRefusalResponse - (*ListCaptureRefusalsRequest)(nil), // 144: state.v1.ListCaptureRefusalsRequest - (*CaptureRefusals)(nil), // 145: state.v1.CaptureRefusals - (*ListCaptureRefusalsResponse)(nil), // 146: state.v1.ListCaptureRefusalsResponse - (*PutPresenceRequest)(nil), // 147: state.v1.PutPresenceRequest - (*PutPresenceResponse)(nil), // 148: state.v1.PutPresenceResponse - (*ListPresenceRequest)(nil), // 149: state.v1.ListPresenceRequest - (*ListPresenceResponse)(nil), // 150: state.v1.ListPresenceResponse - (*TaskLogEntry)(nil), // 151: state.v1.TaskLogEntry - (*ReadTaskLogRequest)(nil), // 152: state.v1.ReadTaskLogRequest - (*ReadTaskLogResponse)(nil), // 153: state.v1.ReadTaskLogResponse - (*StreamTaskLogContentRequest)(nil), // 154: state.v1.StreamTaskLogContentRequest - (*StreamTaskLogContentResponse)(nil), // 155: state.v1.StreamTaskLogContentResponse - (*InsertCaptureRequest)(nil), // 156: state.v1.InsertCaptureRequest - (*InsertCaptureResponse)(nil), // 157: state.v1.InsertCaptureResponse - (*StreamCapturesRequest)(nil), // 158: state.v1.StreamCapturesRequest - (*StreamCapturesResponse)(nil), // 159: state.v1.StreamCapturesResponse - (*InsertMappingRequest)(nil), // 160: state.v1.InsertMappingRequest - (*InsertMappingResponse)(nil), // 161: state.v1.InsertMappingResponse - (*GetMappingRequest)(nil), // 162: state.v1.GetMappingRequest - (*GetMappingResponse)(nil), // 163: state.v1.GetMappingResponse - (*ListMappingsRequest)(nil), // 164: state.v1.ListMappingsRequest - (*ListMappingsResponse)(nil), // 165: state.v1.ListMappingsResponse - (*UpdateMappingRequest)(nil), // 166: state.v1.UpdateMappingRequest - (*UpdateMappingResponse)(nil), // 167: state.v1.UpdateMappingResponse - (*DeleteMappingRequest)(nil), // 168: state.v1.DeleteMappingRequest - (*DeleteMappingResponse)(nil), // 169: state.v1.DeleteMappingResponse - (*RecordMappingMatchRequest)(nil), // 170: state.v1.RecordMappingMatchRequest - (*RecordMappingMatchResponse)(nil), // 171: state.v1.RecordMappingMatchResponse - (*InsertEventTypeRequest)(nil), // 172: state.v1.InsertEventTypeRequest - (*InsertEventTypeResponse)(nil), // 173: state.v1.InsertEventTypeResponse - (*UpdateEventTypeRequest)(nil), // 174: state.v1.UpdateEventTypeRequest - (*UpdateEventTypeResponse)(nil), // 175: state.v1.UpdateEventTypeResponse - (*DeleteEventTypeRequest)(nil), // 176: state.v1.DeleteEventTypeRequest - (*DeleteEventTypeResponse)(nil), // 177: state.v1.DeleteEventTypeResponse - (*ListEventTypesRequest)(nil), // 178: state.v1.ListEventTypesRequest - (*ListEventTypesResponse)(nil), // 179: state.v1.ListEventTypesResponse - (*InsertBindingRequest)(nil), // 180: state.v1.InsertBindingRequest - (*InsertBindingResponse)(nil), // 181: state.v1.InsertBindingResponse - (*GetBindingRequest)(nil), // 182: state.v1.GetBindingRequest - (*GetBindingResponse)(nil), // 183: state.v1.GetBindingResponse - (*ListBindingsRequest)(nil), // 184: state.v1.ListBindingsRequest - (*ListBindingsResponse)(nil), // 185: state.v1.ListBindingsResponse - (*UpdateBindingRequest)(nil), // 186: state.v1.UpdateBindingRequest - (*UpdateBindingResponse)(nil), // 187: state.v1.UpdateBindingResponse - (*DeleteBindingRequest)(nil), // 188: state.v1.DeleteBindingRequest - (*DeleteBindingResponse)(nil), // 189: state.v1.DeleteBindingResponse - (*ApproveBindingRequest)(nil), // 190: state.v1.ApproveBindingRequest - (*ApproveBindingResponse)(nil), // 191: state.v1.ApproveBindingResponse - (*SetSourceNameRequest)(nil), // 192: state.v1.SetSourceNameRequest - (*SetSourceNameResponse)(nil), // 193: state.v1.SetSourceNameResponse - (*SetSourceDeliveryHeaderRequest)(nil), // 194: state.v1.SetSourceDeliveryHeaderRequest - (*SetSourceDeliveryHeaderResponse)(nil), // 195: state.v1.SetSourceDeliveryHeaderResponse - (*DeleteSourceRequest)(nil), // 196: state.v1.DeleteSourceRequest - (*DeleteSourceResponse)(nil), // 197: state.v1.DeleteSourceResponse - (*PauseBindingRequest)(nil), // 198: state.v1.PauseBindingRequest - (*PauseBindingResponse)(nil), // 199: state.v1.PauseBindingResponse - (*ResumeBindingRequest)(nil), // 200: state.v1.ResumeBindingRequest - (*ResumeBindingResponse)(nil), // 201: state.v1.ResumeBindingResponse - (*InsertSourceRequest)(nil), // 202: state.v1.InsertSourceRequest - (*InsertSourceResponse)(nil), // 203: state.v1.InsertSourceResponse - (*GetSourceRequest)(nil), // 204: state.v1.GetSourceRequest - (*GetSourceResponse)(nil), // 205: state.v1.GetSourceResponse - (*ListSourcesRequest)(nil), // 206: state.v1.ListSourcesRequest - (*ListSourcesResponse)(nil), // 207: state.v1.ListSourcesResponse - (*SetSourceSigningRequest)(nil), // 208: state.v1.SetSourceSigningRequest - (*SetSourceSigningResponse)(nil), // 209: state.v1.SetSourceSigningResponse - (*SetSourceSecretRequest)(nil), // 210: state.v1.SetSourceSecretRequest - (*SetSourceSecretResponse)(nil), // 211: state.v1.SetSourceSecretResponse - (*ArmedBindingsForSourceRequest)(nil), // 212: state.v1.ArmedBindingsForSourceRequest - (*ArmedBindingsForSourceResponse)(nil), // 213: state.v1.ArmedBindingsForSourceResponse - (*RecordDispatchRequest)(nil), // 214: state.v1.RecordDispatchRequest - (*RecordDispatchResponse)(nil), // 215: state.v1.RecordDispatchResponse - (*ListDispatchesRequest)(nil), // 216: state.v1.ListDispatchesRequest - (*Dispatch)(nil), // 217: state.v1.Dispatch - (*ListDispatchesResponse)(nil), // 218: state.v1.ListDispatchesResponse - (*RecordPlaybookDispatchRequest)(nil), // 219: state.v1.RecordPlaybookDispatchRequest - (*RecordPlaybookDispatchResponse)(nil), // 220: state.v1.RecordPlaybookDispatchResponse - (*DeletePlaybookDispatchesRequest)(nil), // 221: state.v1.DeletePlaybookDispatchesRequest - (*DeletePlaybookDispatchesResponse)(nil), // 222: state.v1.DeletePlaybookDispatchesResponse - (*StreamUndispatchedCapturesRequest)(nil), // 223: state.v1.StreamUndispatchedCapturesRequest - (*StreamUndispatchedCapturesResponse)(nil), // 224: state.v1.StreamUndispatchedCapturesResponse - (*EnqueueBindingTaskRequest)(nil), // 225: state.v1.EnqueueBindingTaskRequest - (*EnqueueBindingTaskResponse)(nil), // 226: state.v1.EnqueueBindingTaskResponse - (*EnqueueCallTaskRequest)(nil), // 227: state.v1.EnqueueCallTaskRequest - (*EnqueueCallTaskResponse)(nil), // 228: state.v1.EnqueueCallTaskResponse - (*WorkflowCallStatusRequest)(nil), // 229: state.v1.WorkflowCallStatusRequest - (*WorkflowCallStatusResponse)(nil), // 230: state.v1.WorkflowCallStatusResponse - (*InstalledPackage)(nil), // 231: state.v1.InstalledPackage - (*PackagePin)(nil), // 232: state.v1.PackagePin - (*PackageAuthority)(nil), // 233: state.v1.PackageAuthority - (*InstallPackageRequest)(nil), // 234: state.v1.InstallPackageRequest - (*InstallPackageResponse)(nil), // 235: state.v1.InstallPackageResponse - (*CatalogueEntry)(nil), // 236: state.v1.CatalogueEntry - (*ListCatalogueRequest)(nil), // 237: state.v1.ListCatalogueRequest - (*ListCatalogueResponse)(nil), // 238: state.v1.ListCatalogueResponse - (*InstallFromCatalogueRequest)(nil), // 239: state.v1.InstallFromCatalogueRequest - (*InstallFromCatalogueResponse)(nil), // 240: state.v1.InstallFromCatalogueResponse - (*GetInstalledPackageRequest)(nil), // 241: state.v1.GetInstalledPackageRequest - (*GetInstalledPackageResponse)(nil), // 242: state.v1.GetInstalledPackageResponse - (*ListInstalledPackagesRequest)(nil), // 243: state.v1.ListInstalledPackagesRequest - (*ListInstalledPackagesResponse)(nil), // 244: state.v1.ListInstalledPackagesResponse - (*AcceptPackageAuthorityRequest)(nil), // 245: state.v1.AcceptPackageAuthorityRequest - (*AcceptPackageAuthorityResponse)(nil), // 246: state.v1.AcceptPackageAuthorityResponse - (*RemoveInstalledPackageRequest)(nil), // 247: state.v1.RemoveInstalledPackageRequest - (*RemoveInstalledPackageResponse)(nil), // 248: state.v1.RemoveInstalledPackageResponse - (*UpdatePackageRequest)(nil), // 249: state.v1.UpdatePackageRequest - (*UpdatePackageResponse)(nil), // 250: state.v1.UpdatePackageResponse - (*ApprovePackageUpdateRequest)(nil), // 251: state.v1.ApprovePackageUpdateRequest - (*ApprovePackageUpdateResponse)(nil), // 252: state.v1.ApprovePackageUpdateResponse - (*RollbackPackageRequest)(nil), // 253: state.v1.RollbackPackageRequest - (*RollbackPackageResponse)(nil), // 254: state.v1.RollbackPackageResponse - (*SetPackageUpdatePolicyRequest)(nil), // 255: state.v1.SetPackageUpdatePolicyRequest - (*SetPackageUpdatePolicyResponse)(nil), // 256: state.v1.SetPackageUpdatePolicyResponse - (*GetPrincipalRequest)(nil), // 257: state.v1.GetPrincipalRequest - (*PrincipalMembership)(nil), // 258: state.v1.PrincipalMembership - (*PrincipalWorkspace)(nil), // 259: state.v1.PrincipalWorkspace - (*AccessPrincipal)(nil), // 260: state.v1.AccessPrincipal - (*GetPrincipalResponse)(nil), // 261: state.v1.GetPrincipalResponse - (*AccessPolicy)(nil), // 262: state.v1.AccessPolicy - (*ListPoliciesRequest)(nil), // 263: state.v1.ListPoliciesRequest - (*ListPoliciesResponse)(nil), // 264: state.v1.ListPoliciesResponse - (*GetPoliciesVersionRequest)(nil), // 265: state.v1.GetPoliciesVersionRequest - (*GetPoliciesVersionResponse)(nil), // 266: state.v1.GetPoliciesVersionResponse - (*PutPolicyRequest)(nil), // 267: state.v1.PutPolicyRequest - (*PutPolicyResponse)(nil), // 268: state.v1.PutPolicyResponse - (*DeletePolicyRequest)(nil), // 269: state.v1.DeletePolicyRequest - (*DeletePolicyResponse)(nil), // 270: state.v1.DeletePolicyResponse - (*EnsureShippedOrgPoliciesRequest)(nil), // 271: state.v1.EnsureShippedOrgPoliciesRequest - (*EnsureShippedOrgPoliciesResponse)(nil), // 272: state.v1.EnsureShippedOrgPoliciesResponse - (*AccessDenial)(nil), // 273: state.v1.AccessDenial - (*RecordDenialRequest)(nil), // 274: state.v1.RecordDenialRequest - (*RecordDenialResponse)(nil), // 275: state.v1.RecordDenialResponse - (*ListDenialsRequest)(nil), // 276: state.v1.ListDenialsRequest - (*ListDenialsResponse)(nil), // 277: state.v1.ListDenialsResponse - (*Org)(nil), // 278: state.v1.Org - (*Workspace)(nil), // 279: state.v1.Workspace - (*Member)(nil), // 280: state.v1.Member - (*ListOrgsRequest)(nil), // 281: state.v1.ListOrgsRequest - (*ListOrgsResponse)(nil), // 282: state.v1.ListOrgsResponse - (*GetOrgRequest)(nil), // 283: state.v1.GetOrgRequest - (*GetOrgResponse)(nil), // 284: state.v1.GetOrgResponse - (*CreateOrgRequest)(nil), // 285: state.v1.CreateOrgRequest - (*CreateOrgResponse)(nil), // 286: state.v1.CreateOrgResponse - (*ListWorkspacesRequest)(nil), // 287: state.v1.ListWorkspacesRequest - (*ListWorkspacesResponse)(nil), // 288: state.v1.ListWorkspacesResponse - (*CreateWorkspaceRequest)(nil), // 289: state.v1.CreateWorkspaceRequest - (*CreateWorkspaceResponse)(nil), // 290: state.v1.CreateWorkspaceResponse - (*ListMembersRequest)(nil), // 291: state.v1.ListMembersRequest - (*ListMembersResponse)(nil), // 292: state.v1.ListMembersResponse - (*SetMembershipRequest)(nil), // 293: state.v1.SetMembershipRequest - (*SetMembershipResponse)(nil), // 294: state.v1.SetMembershipResponse - (*RemoveMembershipRequest)(nil), // 295: state.v1.RemoveMembershipRequest - (*RemoveMembershipResponse)(nil), // 296: state.v1.RemoveMembershipResponse - (*AssignAgentRequest)(nil), // 297: state.v1.AssignAgentRequest - (*AssignAgentResponse)(nil), // 298: state.v1.AssignAgentResponse - (*RecentLogsRequest)(nil), // 299: state.v1.RecentLogsRequest - (*RecentLogsResponse)(nil), // 300: state.v1.RecentLogsResponse - (*UsageRecord)(nil), // 301: state.v1.UsageRecord - (*RecordUsageRequest)(nil), // 302: state.v1.RecordUsageRequest - (*RecordUsageResponse)(nil), // 303: state.v1.RecordUsageResponse - (*TaskModelsRequest)(nil), // 304: state.v1.TaskModelsRequest - (*TaskInstructionsRequest)(nil), // 305: state.v1.TaskInstructionsRequest - (*TaskInstructionsResponse)(nil), // 306: state.v1.TaskInstructionsResponse - (*TaskModelsResponse)(nil), // 307: state.v1.TaskModelsResponse - (*ModelProvider)(nil), // 308: state.v1.ModelProvider - (*CallerModelsRequest)(nil), // 309: state.v1.CallerModelsRequest - (*CallerModelsResponse)(nil), // 310: state.v1.CallerModelsResponse - (*Alert)(nil), // 311: state.v1.Alert - (*AlertDelivery)(nil), // 312: state.v1.AlertDelivery - (*AlertAttempt)(nil), // 313: state.v1.AlertAttempt - (*RaiseAlertRequest)(nil), // 314: state.v1.RaiseAlertRequest - (*RaiseAlertResponse)(nil), // 315: state.v1.RaiseAlertResponse - (*ResolveAlertRequest)(nil), // 316: state.v1.ResolveAlertRequest - (*ResolveAlertResponse)(nil), // 317: state.v1.ResolveAlertResponse - (*DismissAlertRequest)(nil), // 318: state.v1.DismissAlertRequest - (*DismissAlertResponse)(nil), // 319: state.v1.DismissAlertResponse - (*ListAlertsRequest)(nil), // 320: state.v1.ListAlertsRequest - (*ListAlertsResponse)(nil), // 321: state.v1.ListAlertsResponse - (*ClaimAlertDeliveriesRequest)(nil), // 322: state.v1.ClaimAlertDeliveriesRequest - (*DueAlertDelivery)(nil), // 323: state.v1.DueAlertDelivery - (*ClaimAlertDeliveriesResponse)(nil), // 324: state.v1.ClaimAlertDeliveriesResponse - (*RecordAlertAttemptRequest)(nil), // 325: state.v1.RecordAlertAttemptRequest - (*RecordAlertAttemptResponse)(nil), // 326: state.v1.RecordAlertAttemptResponse - (*AccountSetupRequest)(nil), // 327: state.v1.AccountSetupRequest - (*AccountSetupResponse)(nil), // 328: state.v1.AccountSetupResponse - (*RegisterAccountRequest)(nil), // 329: state.v1.RegisterAccountRequest - (*RegisterAccountResponse)(nil), // 330: state.v1.RegisterAccountResponse - (*SignInAccountRequest)(nil), // 331: state.v1.SignInAccountRequest - (*SignInAccountResponse)(nil), // 332: state.v1.SignInAccountResponse - (*ResolveAccountSessionRequest)(nil), // 333: state.v1.ResolveAccountSessionRequest - (*ResolveAccountSessionResponse)(nil), // 334: state.v1.ResolveAccountSessionResponse - (*SignOutAccountRequest)(nil), // 335: state.v1.SignOutAccountRequest - (*SignOutAccountResponse)(nil), // 336: state.v1.SignOutAccountResponse - (*ChangeAccountPasswordRequest)(nil), // 337: state.v1.ChangeAccountPasswordRequest - (*ChangeAccountPasswordResponse)(nil), // 338: state.v1.ChangeAccountPasswordResponse - (*AuthenticationSettings)(nil), // 339: state.v1.AuthenticationSettings - (*GetAuthenticationSettingsRequest)(nil), // 340: state.v1.GetAuthenticationSettingsRequest - (*GetAuthenticationSettingsResponse)(nil), // 341: state.v1.GetAuthenticationSettingsResponse - (*SaveAuthenticationSettingsRequest)(nil), // 342: state.v1.SaveAuthenticationSettingsRequest - (*SaveAuthenticationSettingsResponse)(nil), // 343: state.v1.SaveAuthenticationSettingsResponse - (*BeginPasskeyRequest)(nil), // 344: state.v1.BeginPasskeyRequest - (*BeginPasskeyResponse)(nil), // 345: state.v1.BeginPasskeyResponse - (*FinishPasskeyRequest)(nil), // 346: state.v1.FinishPasskeyRequest - (*FinishPasskeyResponse)(nil), // 347: state.v1.FinishPasskeyResponse - (*Passkey)(nil), // 348: state.v1.Passkey - (*ListPasskeysRequest)(nil), // 349: state.v1.ListPasskeysRequest - (*ListPasskeysResponse)(nil), // 350: state.v1.ListPasskeysResponse - (*DeletePasskeyRequest)(nil), // 351: state.v1.DeletePasskeyRequest - (*DeletePasskeyResponse)(nil), // 352: state.v1.DeletePasskeyResponse - (*OpenAccountSessionRequest)(nil), // 353: state.v1.OpenAccountSessionRequest - (*OpenAccountSessionResponse)(nil), // 354: state.v1.OpenAccountSessionResponse - (*RequireFreshAccountSessionRequest)(nil), // 355: state.v1.RequireFreshAccountSessionRequest - (*RequireFreshAccountSessionResponse)(nil), // 356: state.v1.RequireFreshAccountSessionResponse - (*CreateAccountRecoveryRequest)(nil), // 357: state.v1.CreateAccountRecoveryRequest - (*CreateAccountRecoveryResponse)(nil), // 358: state.v1.CreateAccountRecoveryResponse - (*RecoverAccountRequest)(nil), // 359: state.v1.RecoverAccountRequest - (*RecoverAccountResponse)(nil), // 360: state.v1.RecoverAccountResponse - (*ListOrgAgentsRequest)(nil), // 361: state.v1.ListOrgAgentsRequest - (*AgentAssignment)(nil), // 362: state.v1.AgentAssignment - (*ListOrgAgentsResponse)(nil), // 363: state.v1.ListOrgAgentsResponse - nil, // 364: state.v1.EventType.SchemaEntry - nil, // 365: state.v1.StatusCountsResponse.CountsEntry - nil, // 366: state.v1.TaskModelsResponse.AliasesEntry - nil, // 367: state.v1.TaskModelsResponse.ProvidersEntry - nil, // 368: state.v1.CallerModelsResponse.AliasesEntry - (*timestamppb.Timestamp)(nil), // 369: google.protobuf.Timestamp - (*v1.LogQuery)(nil), // 370: logging.v1.LogQuery - (*v1.LogSnapshot)(nil), // 371: logging.v1.LogSnapshot -} -var file_state_v1_state_proto_depIdxs = []int32{ - 369, // 0: state.v1.Identity.created_at:type_name -> google.protobuf.Timestamp - 369, // 1: state.v1.Identity.updated_at:type_name -> google.protobuf.Timestamp - 6, // 2: state.v1.ListIdentitiesResponse.identities:type_name -> state.v1.Identity - 6, // 3: state.v1.GetIdentityResponse.identity:type_name -> state.v1.Identity - 7, // 4: state.v1.CreateIdentityRequest.audit:type_name -> state.v1.IdentityAudit - 7, // 5: state.v1.RenameIdentityRequest.audit:type_name -> state.v1.IdentityAudit - 7, // 6: state.v1.SuspendIdentityRequest.audit:type_name -> state.v1.IdentityAudit - 7, // 7: state.v1.ReactivateIdentityRequest.audit:type_name -> state.v1.IdentityAudit - 7, // 8: state.v1.RetireIdentityRequest.audit:type_name -> state.v1.IdentityAudit - 6, // 9: state.v1.CreateIdentityResponse.identity:type_name -> state.v1.Identity - 6, // 10: state.v1.RenameIdentityResponse.identity:type_name -> state.v1.Identity - 6, // 11: state.v1.SuspendIdentityResponse.identity:type_name -> state.v1.Identity - 6, // 12: state.v1.ReactivateIdentityResponse.identity:type_name -> state.v1.Identity - 6, // 13: state.v1.RetireIdentityResponse.identity:type_name -> state.v1.Identity - 6, // 14: state.v1.ResolveIdentitySubjectResponse.identity:type_name -> state.v1.Identity - 7, // 15: state.v1.BindIdentitySubjectRequest.audit:type_name -> state.v1.IdentityAudit - 6, // 16: state.v1.BindIdentitySubjectResponse.identity:type_name -> state.v1.Identity - 6, // 17: state.v1.ClaimIdentitySubjectResponse.identity:type_name -> state.v1.Identity - 369, // 18: state.v1.PersonalToken.created_at:type_name -> google.protobuf.Timestamp - 28, // 19: state.v1.ListPersonalTokensResponse.tokens:type_name -> state.v1.PersonalToken - 369, // 20: state.v1.Task.created_at:type_name -> google.protobuf.Timestamp - 369, // 21: state.v1.Task.updated_at:type_name -> google.protobuf.Timestamp - 369, // 22: state.v1.Event.at:type_name -> google.protobuf.Timestamp - 369, // 23: state.v1.CapturedEvent.received_at:type_name -> google.protobuf.Timestamp - 38, // 24: state.v1.EventType.header_conditions:type_name -> state.v1.EventTypeHeaderCondition - 39, // 25: state.v1.EventType.payload_conditions:type_name -> state.v1.EventTypePayloadCondition - 364, // 26: state.v1.EventType.schema:type_name -> state.v1.EventType.SchemaEntry - 369, // 27: state.v1.EventType.created_at:type_name -> google.protobuf.Timestamp - 369, // 28: state.v1.EventType.updated_at:type_name -> google.protobuf.Timestamp - 41, // 29: state.v1.Mapping.fields:type_name -> state.v1.MappingField - 369, // 30: state.v1.Mapping.created_at:type_name -> google.protobuf.Timestamp - 369, // 31: state.v1.Mapping.updated_at:type_name -> google.protobuf.Timestamp - 369, // 32: state.v1.Mapping.last_matched_at:type_name -> google.protobuf.Timestamp - 43, // 33: state.v1.Binding.matcher:type_name -> state.v1.BindingMatcher - 369, // 34: state.v1.Binding.created_at:type_name -> google.protobuf.Timestamp - 369, // 35: state.v1.Binding.updated_at:type_name -> google.protobuf.Timestamp - 369, // 36: state.v1.Source.created_at:type_name -> google.protobuf.Timestamp - 369, // 37: state.v1.Source.updated_at:type_name -> google.protobuf.Timestamp - 35, // 38: state.v1.ActiveTasksByOriginResponse.tasks:type_name -> state.v1.Task - 35, // 39: state.v1.UnpostedOutcomesResponse.tasks:type_name -> state.v1.Task - 35, // 40: state.v1.EnqueueChatTaskResponse.task:type_name -> state.v1.Task - 35, // 41: state.v1.ClaimNextResponse.task:type_name -> state.v1.Task - 35, // 42: state.v1.ClaimByIssueResponse.task:type_name -> state.v1.Task - 36, // 43: state.v1.StartStepResponse.event:type_name -> state.v1.Event - 36, // 44: state.v1.FinishStepResponse.event:type_name -> state.v1.Event - 369, // 45: state.v1.StepExecution.started_at:type_name -> google.protobuf.Timestamp - 369, // 46: state.v1.StepExecution.finished_at:type_name -> google.protobuf.Timestamp - 71, // 47: state.v1.ListStepsResponse.steps:type_name -> state.v1.StepExecution - 369, // 48: state.v1.HarnessSecret.expires_at:type_name -> google.protobuf.Timestamp - 369, // 49: state.v1.HarnessSecret.updated_at:type_name -> google.protobuf.Timestamp - 74, // 50: state.v1.GetHarnessSecretResponse.secret:type_name -> state.v1.HarnessSecret - 74, // 51: state.v1.PutHarnessSecretRequest.secret:type_name -> state.v1.HarnessSecret - 35, // 52: state.v1.UpdateRequest.task:type_name -> state.v1.Task - 36, // 53: state.v1.ArchiveTaskRequest.audit:type_name -> state.v1.Event - 35, // 54: state.v1.TaskByIssueResponse.task:type_name -> state.v1.Task - 35, // 55: state.v1.OpenTaskByPRResponse.task:type_name -> state.v1.Task - 35, // 56: state.v1.TaskByIDResponse.task:type_name -> state.v1.Task - 35, // 57: state.v1.OpenPRsResponse.tasks:type_name -> state.v1.Task - 369, // 58: state.v1.TasksRequest.after_updated_at:type_name -> google.protobuf.Timestamp - 35, // 59: state.v1.TasksResponse.tasks:type_name -> state.v1.Task - 365, // 60: state.v1.StatusCountsResponse.counts:type_name -> state.v1.StatusCountsResponse.CountsEntry - 36, // 61: state.v1.InsertEventRequest.event:type_name -> state.v1.Event - 36, // 62: state.v1.EventsSinceResponse.events:type_name -> state.v1.Event - 36, // 63: state.v1.TaskEventsResponse.events:type_name -> state.v1.Event - 46, // 64: state.v1.WorkflowStatsResponse.stats:type_name -> state.v1.WorkflowStat - 47, // 65: state.v1.StageStatsResponse.stats:type_name -> state.v1.StageStat - 48, // 66: state.v1.TokensByDayResponse.tokens:type_name -> state.v1.DayTokens - 369, // 67: state.v1.ConfigSnapshot.published_at:type_name -> google.protobuf.Timestamp - 125, // 68: state.v1.PutConfigSnapshotRequest.snapshot:type_name -> state.v1.ConfigSnapshot - 125, // 69: state.v1.GetConfigSnapshotResponse.snapshot:type_name -> state.v1.ConfigSnapshot - 369, // 70: state.v1.ChannelStatus.observed_at:type_name -> google.protobuf.Timestamp - 130, // 71: state.v1.PutChannelStatusRequest.channels:type_name -> state.v1.ChannelStatus - 130, // 72: state.v1.ListChannelStatusResponse.channels:type_name -> state.v1.ChannelStatus - 369, // 73: state.v1.ApplyStatus.reported_at:type_name -> google.protobuf.Timestamp - 135, // 74: state.v1.PutApplyStatusRequest.status:type_name -> state.v1.ApplyStatus - 135, // 75: state.v1.ListApplyStatusResponse.statuses:type_name -> state.v1.ApplyStatus - 369, // 76: state.v1.Presence.started_at:type_name -> google.protobuf.Timestamp - 369, // 77: state.v1.Presence.reported_at:type_name -> google.protobuf.Timestamp - 140, // 78: state.v1.Presence.checks:type_name -> state.v1.DependencyCheck - 369, // 79: state.v1.RecordCaptureRefusalRequest.refused_at:type_name -> google.protobuf.Timestamp - 369, // 80: state.v1.ListCaptureRefusalsRequest.since:type_name -> google.protobuf.Timestamp - 145, // 81: state.v1.ListCaptureRefusalsResponse.sources:type_name -> state.v1.CaptureRefusals - 141, // 82: state.v1.PutPresenceRequest.presence:type_name -> state.v1.Presence - 141, // 83: state.v1.ListPresenceResponse.presences:type_name -> state.v1.Presence - 369, // 84: state.v1.TaskLogEntry.time:type_name -> google.protobuf.Timestamp - 369, // 85: state.v1.ReadTaskLogRequest.since:type_name -> google.protobuf.Timestamp - 369, // 86: state.v1.ReadTaskLogRequest.until:type_name -> google.protobuf.Timestamp - 151, // 87: state.v1.ReadTaskLogResponse.entries:type_name -> state.v1.TaskLogEntry - 37, // 88: state.v1.InsertCaptureRequest.capture:type_name -> state.v1.CapturedEvent - 37, // 89: state.v1.StreamCapturesResponse.capture:type_name -> state.v1.CapturedEvent - 42, // 90: state.v1.InsertMappingRequest.mapping:type_name -> state.v1.Mapping - 42, // 91: state.v1.GetMappingResponse.mapping:type_name -> state.v1.Mapping - 42, // 92: state.v1.ListMappingsResponse.mappings:type_name -> state.v1.Mapping - 42, // 93: state.v1.UpdateMappingRequest.mapping:type_name -> state.v1.Mapping - 40, // 94: state.v1.InsertEventTypeRequest.event_type:type_name -> state.v1.EventType - 40, // 95: state.v1.UpdateEventTypeRequest.event_type:type_name -> state.v1.EventType - 40, // 96: state.v1.ListEventTypesResponse.event_types:type_name -> state.v1.EventType - 44, // 97: state.v1.InsertBindingRequest.binding:type_name -> state.v1.Binding - 44, // 98: state.v1.GetBindingResponse.binding:type_name -> state.v1.Binding - 44, // 99: state.v1.ListBindingsResponse.bindings:type_name -> state.v1.Binding - 44, // 100: state.v1.UpdateBindingRequest.binding:type_name -> state.v1.Binding - 45, // 101: state.v1.InsertSourceRequest.source:type_name -> state.v1.Source - 45, // 102: state.v1.GetSourceResponse.source:type_name -> state.v1.Source - 45, // 103: state.v1.ListSourcesResponse.sources:type_name -> state.v1.Source - 44, // 104: state.v1.ArmedBindingsForSourceResponse.bindings:type_name -> state.v1.Binding - 369, // 105: state.v1.Dispatch.dispatched_at:type_name -> google.protobuf.Timestamp - 217, // 106: state.v1.ListDispatchesResponse.dispatches:type_name -> state.v1.Dispatch - 37, // 107: state.v1.StreamUndispatchedCapturesResponse.capture:type_name -> state.v1.CapturedEvent - 35, // 108: state.v1.EnqueueBindingTaskResponse.task:type_name -> state.v1.Task - 35, // 109: state.v1.EnqueueCallTaskResponse.task:type_name -> state.v1.Task - 233, // 110: state.v1.InstalledPackage.accepted_authority:type_name -> state.v1.PackageAuthority - 232, // 111: state.v1.InstalledPackage.pending:type_name -> state.v1.PackagePin - 232, // 112: state.v1.InstalledPackage.previous:type_name -> state.v1.PackagePin - 233, // 113: state.v1.InstalledPackage.previous_accepted_authority:type_name -> state.v1.PackageAuthority - 233, // 114: state.v1.InstalledPackage.pending_authority:type_name -> state.v1.PackageAuthority - 231, // 115: state.v1.InstallPackageResponse.package:type_name -> state.v1.InstalledPackage - 236, // 116: state.v1.ListCatalogueResponse.packages:type_name -> state.v1.CatalogueEntry - 231, // 117: state.v1.InstallFromCatalogueResponse.package:type_name -> state.v1.InstalledPackage - 231, // 118: state.v1.GetInstalledPackageResponse.package:type_name -> state.v1.InstalledPackage - 231, // 119: state.v1.ListInstalledPackagesResponse.packages:type_name -> state.v1.InstalledPackage - 233, // 120: state.v1.AcceptPackageAuthorityRequest.accepted:type_name -> state.v1.PackageAuthority - 231, // 121: state.v1.AcceptPackageAuthorityResponse.package:type_name -> state.v1.InstalledPackage - 231, // 122: state.v1.UpdatePackageResponse.package:type_name -> state.v1.InstalledPackage - 231, // 123: state.v1.ApprovePackageUpdateResponse.package:type_name -> state.v1.InstalledPackage - 231, // 124: state.v1.RollbackPackageResponse.package:type_name -> state.v1.InstalledPackage - 231, // 125: state.v1.SetPackageUpdatePolicyResponse.package:type_name -> state.v1.InstalledPackage - 258, // 126: state.v1.AccessPrincipal.memberships:type_name -> state.v1.PrincipalMembership - 259, // 127: state.v1.AccessPrincipal.workspaces:type_name -> state.v1.PrincipalWorkspace - 260, // 128: state.v1.GetPrincipalResponse.principal:type_name -> state.v1.AccessPrincipal - 262, // 129: state.v1.ListPoliciesResponse.policies:type_name -> state.v1.AccessPolicy - 262, // 130: state.v1.PutPolicyRequest.policy:type_name -> state.v1.AccessPolicy - 262, // 131: state.v1.DeletePolicyRequest.policy:type_name -> state.v1.AccessPolicy - 369, // 132: state.v1.AccessDenial.at:type_name -> google.protobuf.Timestamp - 273, // 133: state.v1.RecordDenialRequest.denial:type_name -> state.v1.AccessDenial - 273, // 134: state.v1.ListDenialsResponse.denials:type_name -> state.v1.AccessDenial - 278, // 135: state.v1.ListOrgsResponse.orgs:type_name -> state.v1.Org - 278, // 136: state.v1.GetOrgResponse.org:type_name -> state.v1.Org - 278, // 137: state.v1.CreateOrgResponse.org:type_name -> state.v1.Org - 279, // 138: state.v1.ListWorkspacesResponse.workspaces:type_name -> state.v1.Workspace - 279, // 139: state.v1.CreateWorkspaceResponse.workspace:type_name -> state.v1.Workspace - 280, // 140: state.v1.ListMembersResponse.members:type_name -> state.v1.Member - 370, // 141: state.v1.RecentLogsRequest.query:type_name -> logging.v1.LogQuery - 371, // 142: state.v1.RecentLogsResponse.snapshot:type_name -> logging.v1.LogSnapshot - 369, // 143: state.v1.UsageRecord.at:type_name -> google.protobuf.Timestamp - 301, // 144: state.v1.RecordUsageRequest.record:type_name -> state.v1.UsageRecord - 366, // 145: state.v1.TaskModelsResponse.aliases:type_name -> state.v1.TaskModelsResponse.AliasesEntry - 367, // 146: state.v1.TaskModelsResponse.providers:type_name -> state.v1.TaskModelsResponse.ProvidersEntry - 368, // 147: state.v1.CallerModelsResponse.aliases:type_name -> state.v1.CallerModelsResponse.AliasesEntry - 369, // 148: state.v1.Alert.first_raised:type_name -> google.protobuf.Timestamp - 369, // 149: state.v1.Alert.last_seen:type_name -> google.protobuf.Timestamp - 369, // 150: state.v1.Alert.closed_at:type_name -> google.protobuf.Timestamp - 312, // 151: state.v1.Alert.deliveries:type_name -> state.v1.AlertDelivery - 369, // 152: state.v1.AlertDelivery.created_at:type_name -> google.protobuf.Timestamp - 313, // 153: state.v1.AlertDelivery.attempts:type_name -> state.v1.AlertAttempt - 369, // 154: state.v1.AlertAttempt.at:type_name -> google.protobuf.Timestamp - 311, // 155: state.v1.RaiseAlertResponse.alert:type_name -> state.v1.Alert - 311, // 156: state.v1.ListAlertsResponse.alerts:type_name -> state.v1.Alert - 312, // 157: state.v1.DueAlertDelivery.delivery:type_name -> state.v1.AlertDelivery - 311, // 158: state.v1.DueAlertDelivery.alert:type_name -> state.v1.Alert - 323, // 159: state.v1.ClaimAlertDeliveriesResponse.due:type_name -> state.v1.DueAlertDelivery - 6, // 160: state.v1.RegisterAccountResponse.identity:type_name -> state.v1.Identity - 6, // 161: state.v1.SignInAccountResponse.identity:type_name -> state.v1.Identity - 369, // 162: state.v1.SignInAccountResponse.expires_at:type_name -> google.protobuf.Timestamp - 6, // 163: state.v1.ResolveAccountSessionResponse.identity:type_name -> state.v1.Identity - 339, // 164: state.v1.GetAuthenticationSettingsResponse.settings:type_name -> state.v1.AuthenticationSettings - 339, // 165: state.v1.SaveAuthenticationSettingsRequest.settings:type_name -> state.v1.AuthenticationSettings - 6, // 166: state.v1.FinishPasskeyResponse.identity:type_name -> state.v1.Identity - 369, // 167: state.v1.FinishPasskeyResponse.expires_at:type_name -> google.protobuf.Timestamp - 348, // 168: state.v1.ListPasskeysResponse.passkeys:type_name -> state.v1.Passkey - 369, // 169: state.v1.OpenAccountSessionRequest.expires_at:type_name -> google.protobuf.Timestamp - 6, // 170: state.v1.OpenAccountSessionResponse.identity:type_name -> state.v1.Identity - 369, // 171: state.v1.OpenAccountSessionResponse.expires_at:type_name -> google.protobuf.Timestamp - 362, // 172: state.v1.ListOrgAgentsResponse.agents:type_name -> state.v1.AgentAssignment - 308, // 173: state.v1.TaskModelsResponse.ProvidersEntry.value:type_name -> state.v1.ModelProvider - 299, // 174: state.v1.StateStoreService.RecentLogs:input_type -> state.v1.RecentLogsRequest - 234, // 175: state.v1.StateStoreService.InstallPackage:input_type -> state.v1.InstallPackageRequest - 237, // 176: state.v1.StateStoreService.ListCatalogue:input_type -> state.v1.ListCatalogueRequest - 239, // 177: state.v1.StateStoreService.InstallFromCatalogue:input_type -> state.v1.InstallFromCatalogueRequest - 241, // 178: state.v1.StateStoreService.GetInstalledPackage:input_type -> state.v1.GetInstalledPackageRequest - 243, // 179: state.v1.StateStoreService.ListInstalledPackages:input_type -> state.v1.ListInstalledPackagesRequest - 245, // 180: state.v1.StateStoreService.AcceptPackageAuthority:input_type -> state.v1.AcceptPackageAuthorityRequest - 247, // 181: state.v1.StateStoreService.RemoveInstalledPackage:input_type -> state.v1.RemoveInstalledPackageRequest - 249, // 182: state.v1.StateStoreService.UpdatePackage:input_type -> state.v1.UpdatePackageRequest - 251, // 183: state.v1.StateStoreService.ApprovePackageUpdate:input_type -> state.v1.ApprovePackageUpdateRequest - 253, // 184: state.v1.StateStoreService.RollbackPackage:input_type -> state.v1.RollbackPackageRequest - 255, // 185: state.v1.StateStoreService.SetPackageUpdatePolicy:input_type -> state.v1.SetPackageUpdatePolicyRequest - 0, // 186: state.v1.StateStoreService.RegisterTaskGrant:input_type -> state.v1.RegisterTaskGrantRequest - 2, // 187: state.v1.StateStoreService.RevokeTaskGrant:input_type -> state.v1.RevokeTaskGrantRequest - 4, // 188: state.v1.StateStoreService.ResolveTaskGrant:input_type -> state.v1.ResolveTaskGrantRequest - 8, // 189: state.v1.StateStoreService.ListIdentities:input_type -> state.v1.ListIdentitiesRequest - 340, // 190: state.v1.StateStoreService.GetAuthenticationSettings:input_type -> state.v1.GetAuthenticationSettingsRequest - 342, // 191: state.v1.StateStoreService.SaveAuthenticationSettings:input_type -> state.v1.SaveAuthenticationSettingsRequest - 344, // 192: state.v1.StateStoreService.BeginPasskey:input_type -> state.v1.BeginPasskeyRequest - 346, // 193: state.v1.StateStoreService.FinishPasskey:input_type -> state.v1.FinishPasskeyRequest - 349, // 194: state.v1.StateStoreService.ListPasskeys:input_type -> state.v1.ListPasskeysRequest - 351, // 195: state.v1.StateStoreService.DeletePasskey:input_type -> state.v1.DeletePasskeyRequest - 353, // 196: state.v1.StateStoreService.OpenAccountSession:input_type -> state.v1.OpenAccountSessionRequest - 355, // 197: state.v1.StateStoreService.RequireFreshAccountSession:input_type -> state.v1.RequireFreshAccountSessionRequest - 357, // 198: state.v1.StateStoreService.CreateAccountRecovery:input_type -> state.v1.CreateAccountRecoveryRequest - 359, // 199: state.v1.StateStoreService.RecoverAccount:input_type -> state.v1.RecoverAccountRequest - 327, // 200: state.v1.StateStoreService.AccountSetup:input_type -> state.v1.AccountSetupRequest - 329, // 201: state.v1.StateStoreService.RegisterAccount:input_type -> state.v1.RegisterAccountRequest - 331, // 202: state.v1.StateStoreService.SignInAccount:input_type -> state.v1.SignInAccountRequest - 333, // 203: state.v1.StateStoreService.ResolveAccountSession:input_type -> state.v1.ResolveAccountSessionRequest - 335, // 204: state.v1.StateStoreService.SignOutAccount:input_type -> state.v1.SignOutAccountRequest - 337, // 205: state.v1.StateStoreService.ChangeAccountPassword:input_type -> state.v1.ChangeAccountPasswordRequest - 10, // 206: state.v1.StateStoreService.GetIdentity:input_type -> state.v1.GetIdentityRequest - 12, // 207: state.v1.StateStoreService.CreateIdentity:input_type -> state.v1.CreateIdentityRequest - 13, // 208: state.v1.StateStoreService.RenameIdentity:input_type -> state.v1.RenameIdentityRequest - 14, // 209: state.v1.StateStoreService.SuspendIdentity:input_type -> state.v1.SuspendIdentityRequest - 15, // 210: state.v1.StateStoreService.ReactivateIdentity:input_type -> state.v1.ReactivateIdentityRequest - 16, // 211: state.v1.StateStoreService.RetireIdentity:input_type -> state.v1.RetireIdentityRequest - 22, // 212: state.v1.StateStoreService.ResolveIdentitySubject:input_type -> state.v1.ResolveIdentitySubjectRequest - 24, // 213: state.v1.StateStoreService.BindIdentitySubject:input_type -> state.v1.BindIdentitySubjectRequest - 26, // 214: state.v1.StateStoreService.ClaimIdentitySubject:input_type -> state.v1.ClaimIdentitySubjectRequest - 29, // 215: state.v1.StateStoreService.AddPersonalToken:input_type -> state.v1.AddPersonalTokenRequest - 31, // 216: state.v1.StateStoreService.ListPersonalTokens:input_type -> state.v1.ListPersonalTokensRequest - 33, // 217: state.v1.StateStoreService.RevokePersonalToken:input_type -> state.v1.RevokePersonalTokenRequest - 49, // 218: state.v1.StateStoreService.EnqueueIssue:input_type -> state.v1.EnqueueIssueRequest - 57, // 219: state.v1.StateStoreService.EnqueueChatTask:input_type -> state.v1.EnqueueChatTaskRequest - 51, // 220: state.v1.StateStoreService.ActiveTasksByOrigin:input_type -> state.v1.ActiveTasksByOriginRequest - 53, // 221: state.v1.StateStoreService.UnpostedOutcomes:input_type -> state.v1.UnpostedOutcomesRequest - 55, // 222: state.v1.StateStoreService.MarkOutcomePosted:input_type -> state.v1.MarkOutcomePostedRequest - 59, // 223: state.v1.StateStoreService.ClaimNext:input_type -> state.v1.ClaimNextRequest - 61, // 224: state.v1.StateStoreService.ClaimByIssue:input_type -> state.v1.ClaimByIssueRequest - 63, // 225: state.v1.StateStoreService.Transition:input_type -> state.v1.TransitionRequest - 79, // 226: state.v1.StateStoreService.Update:input_type -> state.v1.UpdateRequest - 65, // 227: state.v1.StateStoreService.StartStep:input_type -> state.v1.StartStepRequest - 302, // 228: state.v1.StateStoreService.RecordUsage:input_type -> state.v1.RecordUsageRequest - 304, // 229: state.v1.StateStoreService.TaskModels:input_type -> state.v1.TaskModelsRequest - 305, // 230: state.v1.StateStoreService.TaskInstructions:input_type -> state.v1.TaskInstructionsRequest - 309, // 231: state.v1.StateStoreService.CallerModels:input_type -> state.v1.CallerModelsRequest - 67, // 232: state.v1.StateStoreService.FinishStep:input_type -> state.v1.FinishStepRequest - 69, // 233: state.v1.StateStoreService.CancelExecution:input_type -> state.v1.CancelExecutionRequest - 72, // 234: state.v1.StateStoreService.ListSteps:input_type -> state.v1.ListStepsRequest - 75, // 235: state.v1.StateStoreService.GetHarnessSecret:input_type -> state.v1.GetHarnessSecretRequest - 77, // 236: state.v1.StateStoreService.PutHarnessSecret:input_type -> state.v1.PutHarnessSecretRequest - 81, // 237: state.v1.StateStoreService.Requeue:input_type -> state.v1.RequeueRequest - 83, // 238: state.v1.StateStoreService.ParkTask:input_type -> state.v1.ParkTaskRequest - 85, // 239: state.v1.StateStoreService.RecoverStale:input_type -> state.v1.RecoverStaleRequest - 87, // 240: state.v1.StateStoreService.ArchiveTask:input_type -> state.v1.ArchiveTaskRequest - 89, // 241: state.v1.StateStoreService.RetryTask:input_type -> state.v1.RetryTaskRequest - 91, // 242: state.v1.StateStoreService.RespondReviewGate:input_type -> state.v1.RespondReviewGateRequest - 93, // 243: state.v1.StateStoreService.BeginRemediation:input_type -> state.v1.BeginRemediationRequest - 95, // 244: state.v1.StateStoreService.UpdateReviewPayload:input_type -> state.v1.UpdateReviewPayloadRequest - 97, // 245: state.v1.StateStoreService.SetReviewCursors:input_type -> state.v1.SetReviewCursorsRequest - 99, // 246: state.v1.StateStoreService.TaskByIssue:input_type -> state.v1.TaskByIssueRequest - 101, // 247: state.v1.StateStoreService.OpenTaskByPR:input_type -> state.v1.OpenTaskByPRRequest - 103, // 248: state.v1.StateStoreService.TaskByID:input_type -> state.v1.TaskByIDRequest - 105, // 249: state.v1.StateStoreService.OpenPRs:input_type -> state.v1.OpenPRsRequest - 107, // 250: state.v1.StateStoreService.ClearTerminalTasks:input_type -> state.v1.ClearTerminalTasksRequest - 109, // 251: state.v1.StateStoreService.Tasks:input_type -> state.v1.TasksRequest - 111, // 252: state.v1.StateStoreService.StatusCounts:input_type -> state.v1.StatusCountsRequest - 113, // 253: state.v1.StateStoreService.InsertEvent:input_type -> state.v1.InsertEventRequest - 115, // 254: state.v1.StateStoreService.EventsSince:input_type -> state.v1.EventsSinceRequest - 117, // 255: state.v1.StateStoreService.TaskEvents:input_type -> state.v1.TaskEventsRequest - 119, // 256: state.v1.StateStoreService.WorkflowStats:input_type -> state.v1.WorkflowStatsRequest - 121, // 257: state.v1.StateStoreService.StageStats:input_type -> state.v1.StageStatsRequest - 123, // 258: state.v1.StateStoreService.TokensByDay:input_type -> state.v1.TokensByDayRequest - 126, // 259: state.v1.StateStoreService.PutConfigSnapshot:input_type -> state.v1.PutConfigSnapshotRequest - 128, // 260: state.v1.StateStoreService.GetConfigSnapshot:input_type -> state.v1.GetConfigSnapshotRequest - 131, // 261: state.v1.StateStoreService.PutChannelStatus:input_type -> state.v1.PutChannelStatusRequest - 133, // 262: state.v1.StateStoreService.ListChannelStatus:input_type -> state.v1.ListChannelStatusRequest - 136, // 263: state.v1.StateStoreService.PutApplyStatus:input_type -> state.v1.PutApplyStatusRequest - 138, // 264: state.v1.StateStoreService.ListApplyStatus:input_type -> state.v1.ListApplyStatusRequest - 147, // 265: state.v1.StateStoreService.PutPresence:input_type -> state.v1.PutPresenceRequest - 142, // 266: state.v1.StateStoreService.RecordCaptureRefusal:input_type -> state.v1.RecordCaptureRefusalRequest - 144, // 267: state.v1.StateStoreService.ListCaptureRefusals:input_type -> state.v1.ListCaptureRefusalsRequest - 149, // 268: state.v1.StateStoreService.ListPresence:input_type -> state.v1.ListPresenceRequest - 152, // 269: state.v1.StateStoreService.ReadTaskLog:input_type -> state.v1.ReadTaskLogRequest - 154, // 270: state.v1.StateStoreService.StreamTaskLogContent:input_type -> state.v1.StreamTaskLogContentRequest - 156, // 271: state.v1.StateStoreService.InsertCapture:input_type -> state.v1.InsertCaptureRequest - 158, // 272: state.v1.StateStoreService.StreamCaptures:input_type -> state.v1.StreamCapturesRequest - 160, // 273: state.v1.StateStoreService.InsertMapping:input_type -> state.v1.InsertMappingRequest - 162, // 274: state.v1.StateStoreService.GetMapping:input_type -> state.v1.GetMappingRequest - 164, // 275: state.v1.StateStoreService.ListMappings:input_type -> state.v1.ListMappingsRequest - 166, // 276: state.v1.StateStoreService.UpdateMapping:input_type -> state.v1.UpdateMappingRequest - 168, // 277: state.v1.StateStoreService.DeleteMapping:input_type -> state.v1.DeleteMappingRequest - 170, // 278: state.v1.StateStoreService.RecordMappingMatch:input_type -> state.v1.RecordMappingMatchRequest - 172, // 279: state.v1.StateStoreService.InsertEventType:input_type -> state.v1.InsertEventTypeRequest - 174, // 280: state.v1.StateStoreService.UpdateEventType:input_type -> state.v1.UpdateEventTypeRequest - 176, // 281: state.v1.StateStoreService.DeleteEventType:input_type -> state.v1.DeleteEventTypeRequest - 178, // 282: state.v1.StateStoreService.ListEventTypes:input_type -> state.v1.ListEventTypesRequest - 180, // 283: state.v1.StateStoreService.InsertBinding:input_type -> state.v1.InsertBindingRequest - 182, // 284: state.v1.StateStoreService.GetBinding:input_type -> state.v1.GetBindingRequest - 184, // 285: state.v1.StateStoreService.ListBindings:input_type -> state.v1.ListBindingsRequest - 216, // 286: state.v1.StateStoreService.ListDispatches:input_type -> state.v1.ListDispatchesRequest - 186, // 287: state.v1.StateStoreService.UpdateBinding:input_type -> state.v1.UpdateBindingRequest - 188, // 288: state.v1.StateStoreService.DeleteBinding:input_type -> state.v1.DeleteBindingRequest - 190, // 289: state.v1.StateStoreService.ApproveBinding:input_type -> state.v1.ApproveBindingRequest - 198, // 290: state.v1.StateStoreService.PauseBinding:input_type -> state.v1.PauseBindingRequest - 200, // 291: state.v1.StateStoreService.ResumeBinding:input_type -> state.v1.ResumeBindingRequest - 202, // 292: state.v1.StateStoreService.InsertSource:input_type -> state.v1.InsertSourceRequest - 204, // 293: state.v1.StateStoreService.GetSource:input_type -> state.v1.GetSourceRequest - 206, // 294: state.v1.StateStoreService.ListSources:input_type -> state.v1.ListSourcesRequest - 208, // 295: state.v1.StateStoreService.SetSourceSigning:input_type -> state.v1.SetSourceSigningRequest - 210, // 296: state.v1.StateStoreService.SetSourceSecret:input_type -> state.v1.SetSourceSecretRequest - 192, // 297: state.v1.StateStoreService.SetSourceName:input_type -> state.v1.SetSourceNameRequest - 194, // 298: state.v1.StateStoreService.SetSourceDeliveryHeader:input_type -> state.v1.SetSourceDeliveryHeaderRequest - 196, // 299: state.v1.StateStoreService.DeleteSource:input_type -> state.v1.DeleteSourceRequest - 212, // 300: state.v1.StateStoreService.ArmedBindingsForSource:input_type -> state.v1.ArmedBindingsForSourceRequest - 214, // 301: state.v1.StateStoreService.RecordDispatch:input_type -> state.v1.RecordDispatchRequest - 219, // 302: state.v1.StateStoreService.RecordPlaybookDispatch:input_type -> state.v1.RecordPlaybookDispatchRequest - 221, // 303: state.v1.StateStoreService.DeletePlaybookDispatches:input_type -> state.v1.DeletePlaybookDispatchesRequest - 223, // 304: state.v1.StateStoreService.StreamUndispatchedCaptures:input_type -> state.v1.StreamUndispatchedCapturesRequest - 225, // 305: state.v1.StateStoreService.EnqueueBindingTask:input_type -> state.v1.EnqueueBindingTaskRequest - 227, // 306: state.v1.StateStoreService.EnqueueCallTask:input_type -> state.v1.EnqueueCallTaskRequest - 229, // 307: state.v1.StateStoreService.WorkflowCallStatus:input_type -> state.v1.WorkflowCallStatusRequest - 257, // 308: state.v1.StateStoreService.GetPrincipal:input_type -> state.v1.GetPrincipalRequest - 263, // 309: state.v1.StateStoreService.ListPolicies:input_type -> state.v1.ListPoliciesRequest - 265, // 310: state.v1.StateStoreService.GetPoliciesVersion:input_type -> state.v1.GetPoliciesVersionRequest - 267, // 311: state.v1.StateStoreService.PutPolicy:input_type -> state.v1.PutPolicyRequest - 269, // 312: state.v1.StateStoreService.DeletePolicy:input_type -> state.v1.DeletePolicyRequest - 271, // 313: state.v1.StateStoreService.EnsureShippedOrgPolicies:input_type -> state.v1.EnsureShippedOrgPoliciesRequest - 274, // 314: state.v1.StateStoreService.RecordDenial:input_type -> state.v1.RecordDenialRequest - 276, // 315: state.v1.StateStoreService.ListDenials:input_type -> state.v1.ListDenialsRequest - 281, // 316: state.v1.StateStoreService.ListOrgs:input_type -> state.v1.ListOrgsRequest - 283, // 317: state.v1.StateStoreService.GetOrg:input_type -> state.v1.GetOrgRequest - 285, // 318: state.v1.StateStoreService.CreateOrg:input_type -> state.v1.CreateOrgRequest - 287, // 319: state.v1.StateStoreService.ListWorkspaces:input_type -> state.v1.ListWorkspacesRequest - 289, // 320: state.v1.StateStoreService.CreateWorkspace:input_type -> state.v1.CreateWorkspaceRequest - 291, // 321: state.v1.StateStoreService.ListMembers:input_type -> state.v1.ListMembersRequest - 293, // 322: state.v1.StateStoreService.SetMembership:input_type -> state.v1.SetMembershipRequest - 295, // 323: state.v1.StateStoreService.RemoveMembership:input_type -> state.v1.RemoveMembershipRequest - 361, // 324: state.v1.StateStoreService.ListOrgAgents:input_type -> state.v1.ListOrgAgentsRequest - 297, // 325: state.v1.StateStoreService.AssignAgent:input_type -> state.v1.AssignAgentRequest - 314, // 326: state.v1.StateStoreService.RaiseAlert:input_type -> state.v1.RaiseAlertRequest - 316, // 327: state.v1.StateStoreService.ResolveAlert:input_type -> state.v1.ResolveAlertRequest - 318, // 328: state.v1.StateStoreService.DismissAlert:input_type -> state.v1.DismissAlertRequest - 320, // 329: state.v1.StateStoreService.ListAlerts:input_type -> state.v1.ListAlertsRequest - 322, // 330: state.v1.StateStoreService.ClaimAlertDeliveries:input_type -> state.v1.ClaimAlertDeliveriesRequest - 325, // 331: state.v1.StateStoreService.RecordAlertAttempt:input_type -> state.v1.RecordAlertAttemptRequest - 300, // 332: state.v1.StateStoreService.RecentLogs:output_type -> state.v1.RecentLogsResponse - 235, // 333: state.v1.StateStoreService.InstallPackage:output_type -> state.v1.InstallPackageResponse - 238, // 334: state.v1.StateStoreService.ListCatalogue:output_type -> state.v1.ListCatalogueResponse - 240, // 335: state.v1.StateStoreService.InstallFromCatalogue:output_type -> state.v1.InstallFromCatalogueResponse - 242, // 336: state.v1.StateStoreService.GetInstalledPackage:output_type -> state.v1.GetInstalledPackageResponse - 244, // 337: state.v1.StateStoreService.ListInstalledPackages:output_type -> state.v1.ListInstalledPackagesResponse - 246, // 338: state.v1.StateStoreService.AcceptPackageAuthority:output_type -> state.v1.AcceptPackageAuthorityResponse - 248, // 339: state.v1.StateStoreService.RemoveInstalledPackage:output_type -> state.v1.RemoveInstalledPackageResponse - 250, // 340: state.v1.StateStoreService.UpdatePackage:output_type -> state.v1.UpdatePackageResponse - 252, // 341: state.v1.StateStoreService.ApprovePackageUpdate:output_type -> state.v1.ApprovePackageUpdateResponse - 254, // 342: state.v1.StateStoreService.RollbackPackage:output_type -> state.v1.RollbackPackageResponse - 256, // 343: state.v1.StateStoreService.SetPackageUpdatePolicy:output_type -> state.v1.SetPackageUpdatePolicyResponse - 1, // 344: state.v1.StateStoreService.RegisterTaskGrant:output_type -> state.v1.RegisterTaskGrantResponse - 3, // 345: state.v1.StateStoreService.RevokeTaskGrant:output_type -> state.v1.RevokeTaskGrantResponse - 5, // 346: state.v1.StateStoreService.ResolveTaskGrant:output_type -> state.v1.ResolveTaskGrantResponse - 9, // 347: state.v1.StateStoreService.ListIdentities:output_type -> state.v1.ListIdentitiesResponse - 341, // 348: state.v1.StateStoreService.GetAuthenticationSettings:output_type -> state.v1.GetAuthenticationSettingsResponse - 343, // 349: state.v1.StateStoreService.SaveAuthenticationSettings:output_type -> state.v1.SaveAuthenticationSettingsResponse - 345, // 350: state.v1.StateStoreService.BeginPasskey:output_type -> state.v1.BeginPasskeyResponse - 347, // 351: state.v1.StateStoreService.FinishPasskey:output_type -> state.v1.FinishPasskeyResponse - 350, // 352: state.v1.StateStoreService.ListPasskeys:output_type -> state.v1.ListPasskeysResponse - 352, // 353: state.v1.StateStoreService.DeletePasskey:output_type -> state.v1.DeletePasskeyResponse - 354, // 354: state.v1.StateStoreService.OpenAccountSession:output_type -> state.v1.OpenAccountSessionResponse - 356, // 355: state.v1.StateStoreService.RequireFreshAccountSession:output_type -> state.v1.RequireFreshAccountSessionResponse - 358, // 356: state.v1.StateStoreService.CreateAccountRecovery:output_type -> state.v1.CreateAccountRecoveryResponse - 360, // 357: state.v1.StateStoreService.RecoverAccount:output_type -> state.v1.RecoverAccountResponse - 328, // 358: state.v1.StateStoreService.AccountSetup:output_type -> state.v1.AccountSetupResponse - 330, // 359: state.v1.StateStoreService.RegisterAccount:output_type -> state.v1.RegisterAccountResponse - 332, // 360: state.v1.StateStoreService.SignInAccount:output_type -> state.v1.SignInAccountResponse - 334, // 361: state.v1.StateStoreService.ResolveAccountSession:output_type -> state.v1.ResolveAccountSessionResponse - 336, // 362: state.v1.StateStoreService.SignOutAccount:output_type -> state.v1.SignOutAccountResponse - 338, // 363: state.v1.StateStoreService.ChangeAccountPassword:output_type -> state.v1.ChangeAccountPasswordResponse - 11, // 364: state.v1.StateStoreService.GetIdentity:output_type -> state.v1.GetIdentityResponse - 17, // 365: state.v1.StateStoreService.CreateIdentity:output_type -> state.v1.CreateIdentityResponse - 18, // 366: state.v1.StateStoreService.RenameIdentity:output_type -> state.v1.RenameIdentityResponse - 19, // 367: state.v1.StateStoreService.SuspendIdentity:output_type -> state.v1.SuspendIdentityResponse - 20, // 368: state.v1.StateStoreService.ReactivateIdentity:output_type -> state.v1.ReactivateIdentityResponse - 21, // 369: state.v1.StateStoreService.RetireIdentity:output_type -> state.v1.RetireIdentityResponse - 23, // 370: state.v1.StateStoreService.ResolveIdentitySubject:output_type -> state.v1.ResolveIdentitySubjectResponse - 25, // 371: state.v1.StateStoreService.BindIdentitySubject:output_type -> state.v1.BindIdentitySubjectResponse - 27, // 372: state.v1.StateStoreService.ClaimIdentitySubject:output_type -> state.v1.ClaimIdentitySubjectResponse - 30, // 373: state.v1.StateStoreService.AddPersonalToken:output_type -> state.v1.AddPersonalTokenResponse - 32, // 374: state.v1.StateStoreService.ListPersonalTokens:output_type -> state.v1.ListPersonalTokensResponse - 34, // 375: state.v1.StateStoreService.RevokePersonalToken:output_type -> state.v1.RevokePersonalTokenResponse - 50, // 376: state.v1.StateStoreService.EnqueueIssue:output_type -> state.v1.EnqueueIssueResponse - 58, // 377: state.v1.StateStoreService.EnqueueChatTask:output_type -> state.v1.EnqueueChatTaskResponse - 52, // 378: state.v1.StateStoreService.ActiveTasksByOrigin:output_type -> state.v1.ActiveTasksByOriginResponse - 54, // 379: state.v1.StateStoreService.UnpostedOutcomes:output_type -> state.v1.UnpostedOutcomesResponse - 56, // 380: state.v1.StateStoreService.MarkOutcomePosted:output_type -> state.v1.MarkOutcomePostedResponse - 60, // 381: state.v1.StateStoreService.ClaimNext:output_type -> state.v1.ClaimNextResponse - 62, // 382: state.v1.StateStoreService.ClaimByIssue:output_type -> state.v1.ClaimByIssueResponse - 64, // 383: state.v1.StateStoreService.Transition:output_type -> state.v1.TransitionResponse - 80, // 384: state.v1.StateStoreService.Update:output_type -> state.v1.UpdateResponse - 66, // 385: state.v1.StateStoreService.StartStep:output_type -> state.v1.StartStepResponse - 303, // 386: state.v1.StateStoreService.RecordUsage:output_type -> state.v1.RecordUsageResponse - 307, // 387: state.v1.StateStoreService.TaskModels:output_type -> state.v1.TaskModelsResponse - 306, // 388: state.v1.StateStoreService.TaskInstructions:output_type -> state.v1.TaskInstructionsResponse - 310, // 389: state.v1.StateStoreService.CallerModels:output_type -> state.v1.CallerModelsResponse - 68, // 390: state.v1.StateStoreService.FinishStep:output_type -> state.v1.FinishStepResponse - 70, // 391: state.v1.StateStoreService.CancelExecution:output_type -> state.v1.CancelExecutionResponse - 73, // 392: state.v1.StateStoreService.ListSteps:output_type -> state.v1.ListStepsResponse - 76, // 393: state.v1.StateStoreService.GetHarnessSecret:output_type -> state.v1.GetHarnessSecretResponse - 78, // 394: state.v1.StateStoreService.PutHarnessSecret:output_type -> state.v1.PutHarnessSecretResponse - 82, // 395: state.v1.StateStoreService.Requeue:output_type -> state.v1.RequeueResponse - 84, // 396: state.v1.StateStoreService.ParkTask:output_type -> state.v1.ParkTaskResponse - 86, // 397: state.v1.StateStoreService.RecoverStale:output_type -> state.v1.RecoverStaleResponse - 88, // 398: state.v1.StateStoreService.ArchiveTask:output_type -> state.v1.ArchiveTaskResponse - 90, // 399: state.v1.StateStoreService.RetryTask:output_type -> state.v1.RetryTaskResponse - 92, // 400: state.v1.StateStoreService.RespondReviewGate:output_type -> state.v1.RespondReviewGateResponse - 94, // 401: state.v1.StateStoreService.BeginRemediation:output_type -> state.v1.BeginRemediationResponse - 96, // 402: state.v1.StateStoreService.UpdateReviewPayload:output_type -> state.v1.UpdateReviewPayloadResponse - 98, // 403: state.v1.StateStoreService.SetReviewCursors:output_type -> state.v1.SetReviewCursorsResponse - 100, // 404: state.v1.StateStoreService.TaskByIssue:output_type -> state.v1.TaskByIssueResponse - 102, // 405: state.v1.StateStoreService.OpenTaskByPR:output_type -> state.v1.OpenTaskByPRResponse - 104, // 406: state.v1.StateStoreService.TaskByID:output_type -> state.v1.TaskByIDResponse - 106, // 407: state.v1.StateStoreService.OpenPRs:output_type -> state.v1.OpenPRsResponse - 108, // 408: state.v1.StateStoreService.ClearTerminalTasks:output_type -> state.v1.ClearTerminalTasksResponse - 110, // 409: state.v1.StateStoreService.Tasks:output_type -> state.v1.TasksResponse - 112, // 410: state.v1.StateStoreService.StatusCounts:output_type -> state.v1.StatusCountsResponse - 114, // 411: state.v1.StateStoreService.InsertEvent:output_type -> state.v1.InsertEventResponse - 116, // 412: state.v1.StateStoreService.EventsSince:output_type -> state.v1.EventsSinceResponse - 118, // 413: state.v1.StateStoreService.TaskEvents:output_type -> state.v1.TaskEventsResponse - 120, // 414: state.v1.StateStoreService.WorkflowStats:output_type -> state.v1.WorkflowStatsResponse - 122, // 415: state.v1.StateStoreService.StageStats:output_type -> state.v1.StageStatsResponse - 124, // 416: state.v1.StateStoreService.TokensByDay:output_type -> state.v1.TokensByDayResponse - 127, // 417: state.v1.StateStoreService.PutConfigSnapshot:output_type -> state.v1.PutConfigSnapshotResponse - 129, // 418: state.v1.StateStoreService.GetConfigSnapshot:output_type -> state.v1.GetConfigSnapshotResponse - 132, // 419: state.v1.StateStoreService.PutChannelStatus:output_type -> state.v1.PutChannelStatusResponse - 134, // 420: state.v1.StateStoreService.ListChannelStatus:output_type -> state.v1.ListChannelStatusResponse - 137, // 421: state.v1.StateStoreService.PutApplyStatus:output_type -> state.v1.PutApplyStatusResponse - 139, // 422: state.v1.StateStoreService.ListApplyStatus:output_type -> state.v1.ListApplyStatusResponse - 148, // 423: state.v1.StateStoreService.PutPresence:output_type -> state.v1.PutPresenceResponse - 143, // 424: state.v1.StateStoreService.RecordCaptureRefusal:output_type -> state.v1.RecordCaptureRefusalResponse - 146, // 425: state.v1.StateStoreService.ListCaptureRefusals:output_type -> state.v1.ListCaptureRefusalsResponse - 150, // 426: state.v1.StateStoreService.ListPresence:output_type -> state.v1.ListPresenceResponse - 153, // 427: state.v1.StateStoreService.ReadTaskLog:output_type -> state.v1.ReadTaskLogResponse - 155, // 428: state.v1.StateStoreService.StreamTaskLogContent:output_type -> state.v1.StreamTaskLogContentResponse - 157, // 429: state.v1.StateStoreService.InsertCapture:output_type -> state.v1.InsertCaptureResponse - 159, // 430: state.v1.StateStoreService.StreamCaptures:output_type -> state.v1.StreamCapturesResponse - 161, // 431: state.v1.StateStoreService.InsertMapping:output_type -> state.v1.InsertMappingResponse - 163, // 432: state.v1.StateStoreService.GetMapping:output_type -> state.v1.GetMappingResponse - 165, // 433: state.v1.StateStoreService.ListMappings:output_type -> state.v1.ListMappingsResponse - 167, // 434: state.v1.StateStoreService.UpdateMapping:output_type -> state.v1.UpdateMappingResponse - 169, // 435: state.v1.StateStoreService.DeleteMapping:output_type -> state.v1.DeleteMappingResponse - 171, // 436: state.v1.StateStoreService.RecordMappingMatch:output_type -> state.v1.RecordMappingMatchResponse - 173, // 437: state.v1.StateStoreService.InsertEventType:output_type -> state.v1.InsertEventTypeResponse - 175, // 438: state.v1.StateStoreService.UpdateEventType:output_type -> state.v1.UpdateEventTypeResponse - 177, // 439: state.v1.StateStoreService.DeleteEventType:output_type -> state.v1.DeleteEventTypeResponse - 179, // 440: state.v1.StateStoreService.ListEventTypes:output_type -> state.v1.ListEventTypesResponse - 181, // 441: state.v1.StateStoreService.InsertBinding:output_type -> state.v1.InsertBindingResponse - 183, // 442: state.v1.StateStoreService.GetBinding:output_type -> state.v1.GetBindingResponse - 185, // 443: state.v1.StateStoreService.ListBindings:output_type -> state.v1.ListBindingsResponse - 218, // 444: state.v1.StateStoreService.ListDispatches:output_type -> state.v1.ListDispatchesResponse - 187, // 445: state.v1.StateStoreService.UpdateBinding:output_type -> state.v1.UpdateBindingResponse - 189, // 446: state.v1.StateStoreService.DeleteBinding:output_type -> state.v1.DeleteBindingResponse - 191, // 447: state.v1.StateStoreService.ApproveBinding:output_type -> state.v1.ApproveBindingResponse - 199, // 448: state.v1.StateStoreService.PauseBinding:output_type -> state.v1.PauseBindingResponse - 201, // 449: state.v1.StateStoreService.ResumeBinding:output_type -> state.v1.ResumeBindingResponse - 203, // 450: state.v1.StateStoreService.InsertSource:output_type -> state.v1.InsertSourceResponse - 205, // 451: state.v1.StateStoreService.GetSource:output_type -> state.v1.GetSourceResponse - 207, // 452: state.v1.StateStoreService.ListSources:output_type -> state.v1.ListSourcesResponse - 209, // 453: state.v1.StateStoreService.SetSourceSigning:output_type -> state.v1.SetSourceSigningResponse - 211, // 454: state.v1.StateStoreService.SetSourceSecret:output_type -> state.v1.SetSourceSecretResponse - 193, // 455: state.v1.StateStoreService.SetSourceName:output_type -> state.v1.SetSourceNameResponse - 195, // 456: state.v1.StateStoreService.SetSourceDeliveryHeader:output_type -> state.v1.SetSourceDeliveryHeaderResponse - 197, // 457: state.v1.StateStoreService.DeleteSource:output_type -> state.v1.DeleteSourceResponse - 213, // 458: state.v1.StateStoreService.ArmedBindingsForSource:output_type -> state.v1.ArmedBindingsForSourceResponse - 215, // 459: state.v1.StateStoreService.RecordDispatch:output_type -> state.v1.RecordDispatchResponse - 220, // 460: state.v1.StateStoreService.RecordPlaybookDispatch:output_type -> state.v1.RecordPlaybookDispatchResponse - 222, // 461: state.v1.StateStoreService.DeletePlaybookDispatches:output_type -> state.v1.DeletePlaybookDispatchesResponse - 224, // 462: state.v1.StateStoreService.StreamUndispatchedCaptures:output_type -> state.v1.StreamUndispatchedCapturesResponse - 226, // 463: state.v1.StateStoreService.EnqueueBindingTask:output_type -> state.v1.EnqueueBindingTaskResponse - 228, // 464: state.v1.StateStoreService.EnqueueCallTask:output_type -> state.v1.EnqueueCallTaskResponse - 230, // 465: state.v1.StateStoreService.WorkflowCallStatus:output_type -> state.v1.WorkflowCallStatusResponse - 261, // 466: state.v1.StateStoreService.GetPrincipal:output_type -> state.v1.GetPrincipalResponse - 264, // 467: state.v1.StateStoreService.ListPolicies:output_type -> state.v1.ListPoliciesResponse - 266, // 468: state.v1.StateStoreService.GetPoliciesVersion:output_type -> state.v1.GetPoliciesVersionResponse - 268, // 469: state.v1.StateStoreService.PutPolicy:output_type -> state.v1.PutPolicyResponse - 270, // 470: state.v1.StateStoreService.DeletePolicy:output_type -> state.v1.DeletePolicyResponse - 272, // 471: state.v1.StateStoreService.EnsureShippedOrgPolicies:output_type -> state.v1.EnsureShippedOrgPoliciesResponse - 275, // 472: state.v1.StateStoreService.RecordDenial:output_type -> state.v1.RecordDenialResponse - 277, // 473: state.v1.StateStoreService.ListDenials:output_type -> state.v1.ListDenialsResponse - 282, // 474: state.v1.StateStoreService.ListOrgs:output_type -> state.v1.ListOrgsResponse - 284, // 475: state.v1.StateStoreService.GetOrg:output_type -> state.v1.GetOrgResponse - 286, // 476: state.v1.StateStoreService.CreateOrg:output_type -> state.v1.CreateOrgResponse - 288, // 477: state.v1.StateStoreService.ListWorkspaces:output_type -> state.v1.ListWorkspacesResponse - 290, // 478: state.v1.StateStoreService.CreateWorkspace:output_type -> state.v1.CreateWorkspaceResponse - 292, // 479: state.v1.StateStoreService.ListMembers:output_type -> state.v1.ListMembersResponse - 294, // 480: state.v1.StateStoreService.SetMembership:output_type -> state.v1.SetMembershipResponse - 296, // 481: state.v1.StateStoreService.RemoveMembership:output_type -> state.v1.RemoveMembershipResponse - 363, // 482: state.v1.StateStoreService.ListOrgAgents:output_type -> state.v1.ListOrgAgentsResponse - 298, // 483: state.v1.StateStoreService.AssignAgent:output_type -> state.v1.AssignAgentResponse - 315, // 484: state.v1.StateStoreService.RaiseAlert:output_type -> state.v1.RaiseAlertResponse - 317, // 485: state.v1.StateStoreService.ResolveAlert:output_type -> state.v1.ResolveAlertResponse - 319, // 486: state.v1.StateStoreService.DismissAlert:output_type -> state.v1.DismissAlertResponse - 321, // 487: state.v1.StateStoreService.ListAlerts:output_type -> state.v1.ListAlertsResponse - 324, // 488: state.v1.StateStoreService.ClaimAlertDeliveries:output_type -> state.v1.ClaimAlertDeliveriesResponse - 326, // 489: state.v1.StateStoreService.RecordAlertAttempt:output_type -> state.v1.RecordAlertAttemptResponse - 332, // [332:490] is the sub-list for method output_type - 174, // [174:332] is the sub-list for method input_type - 174, // [174:174] is the sub-list for extension type_name - 174, // [174:174] is the sub-list for extension extendee - 0, // [0:174] is the sub-list for field type_name -} - -func init() { file_state_v1_state_proto_init() } -func file_state_v1_state_proto_init() { - if File_state_v1_state_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_state_proto_rawDesc), len(file_state_v1_state_proto_rawDesc)), - NumEnums: 0, - NumMessages: 369, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_state_v1_state_proto_goTypes, - DependencyIndexes: file_state_v1_state_proto_depIdxs, - MessageInfos: file_state_v1_state_proto_msgTypes, - }.Build() - File_state_v1_state_proto = out.File - file_state_v1_state_proto_goTypes = nil - file_state_v1_state_proto_depIdxs = nil -} diff --git a/internal/contracts/state/v1/state_grpc.pb.go b/internal/contracts/state/v1/state_grpc.pb.go deleted file mode 100644 index ff99f1e27..000000000 --- a/internal/contracts/state/v1/state_grpc.pb.go +++ /dev/null @@ -1,6363 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc (unknown) -// source: state/v1/state.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 ( - StateStoreService_RecentLogs_FullMethodName = "/state.v1.StateStoreService/RecentLogs" - StateStoreService_InstallPackage_FullMethodName = "/state.v1.StateStoreService/InstallPackage" - StateStoreService_ListCatalogue_FullMethodName = "/state.v1.StateStoreService/ListCatalogue" - StateStoreService_InstallFromCatalogue_FullMethodName = "/state.v1.StateStoreService/InstallFromCatalogue" - StateStoreService_GetInstalledPackage_FullMethodName = "/state.v1.StateStoreService/GetInstalledPackage" - StateStoreService_ListInstalledPackages_FullMethodName = "/state.v1.StateStoreService/ListInstalledPackages" - StateStoreService_AcceptPackageAuthority_FullMethodName = "/state.v1.StateStoreService/AcceptPackageAuthority" - StateStoreService_RemoveInstalledPackage_FullMethodName = "/state.v1.StateStoreService/RemoveInstalledPackage" - StateStoreService_UpdatePackage_FullMethodName = "/state.v1.StateStoreService/UpdatePackage" - StateStoreService_ApprovePackageUpdate_FullMethodName = "/state.v1.StateStoreService/ApprovePackageUpdate" - StateStoreService_RollbackPackage_FullMethodName = "/state.v1.StateStoreService/RollbackPackage" - StateStoreService_SetPackageUpdatePolicy_FullMethodName = "/state.v1.StateStoreService/SetPackageUpdatePolicy" - StateStoreService_RegisterTaskGrant_FullMethodName = "/state.v1.StateStoreService/RegisterTaskGrant" - StateStoreService_RevokeTaskGrant_FullMethodName = "/state.v1.StateStoreService/RevokeTaskGrant" - StateStoreService_ResolveTaskGrant_FullMethodName = "/state.v1.StateStoreService/ResolveTaskGrant" - StateStoreService_ListIdentities_FullMethodName = "/state.v1.StateStoreService/ListIdentities" - StateStoreService_GetAuthenticationSettings_FullMethodName = "/state.v1.StateStoreService/GetAuthenticationSettings" - StateStoreService_SaveAuthenticationSettings_FullMethodName = "/state.v1.StateStoreService/SaveAuthenticationSettings" - StateStoreService_BeginPasskey_FullMethodName = "/state.v1.StateStoreService/BeginPasskey" - StateStoreService_FinishPasskey_FullMethodName = "/state.v1.StateStoreService/FinishPasskey" - StateStoreService_ListPasskeys_FullMethodName = "/state.v1.StateStoreService/ListPasskeys" - StateStoreService_DeletePasskey_FullMethodName = "/state.v1.StateStoreService/DeletePasskey" - StateStoreService_OpenAccountSession_FullMethodName = "/state.v1.StateStoreService/OpenAccountSession" - StateStoreService_RequireFreshAccountSession_FullMethodName = "/state.v1.StateStoreService/RequireFreshAccountSession" - StateStoreService_CreateAccountRecovery_FullMethodName = "/state.v1.StateStoreService/CreateAccountRecovery" - StateStoreService_RecoverAccount_FullMethodName = "/state.v1.StateStoreService/RecoverAccount" - StateStoreService_AccountSetup_FullMethodName = "/state.v1.StateStoreService/AccountSetup" - StateStoreService_RegisterAccount_FullMethodName = "/state.v1.StateStoreService/RegisterAccount" - StateStoreService_SignInAccount_FullMethodName = "/state.v1.StateStoreService/SignInAccount" - StateStoreService_ResolveAccountSession_FullMethodName = "/state.v1.StateStoreService/ResolveAccountSession" - StateStoreService_SignOutAccount_FullMethodName = "/state.v1.StateStoreService/SignOutAccount" - StateStoreService_ChangeAccountPassword_FullMethodName = "/state.v1.StateStoreService/ChangeAccountPassword" - StateStoreService_GetIdentity_FullMethodName = "/state.v1.StateStoreService/GetIdentity" - StateStoreService_CreateIdentity_FullMethodName = "/state.v1.StateStoreService/CreateIdentity" - StateStoreService_RenameIdentity_FullMethodName = "/state.v1.StateStoreService/RenameIdentity" - StateStoreService_SuspendIdentity_FullMethodName = "/state.v1.StateStoreService/SuspendIdentity" - StateStoreService_ReactivateIdentity_FullMethodName = "/state.v1.StateStoreService/ReactivateIdentity" - StateStoreService_RetireIdentity_FullMethodName = "/state.v1.StateStoreService/RetireIdentity" - StateStoreService_ResolveIdentitySubject_FullMethodName = "/state.v1.StateStoreService/ResolveIdentitySubject" - StateStoreService_BindIdentitySubject_FullMethodName = "/state.v1.StateStoreService/BindIdentitySubject" - StateStoreService_ClaimIdentitySubject_FullMethodName = "/state.v1.StateStoreService/ClaimIdentitySubject" - StateStoreService_AddPersonalToken_FullMethodName = "/state.v1.StateStoreService/AddPersonalToken" - StateStoreService_ListPersonalTokens_FullMethodName = "/state.v1.StateStoreService/ListPersonalTokens" - StateStoreService_RevokePersonalToken_FullMethodName = "/state.v1.StateStoreService/RevokePersonalToken" - StateStoreService_EnqueueIssue_FullMethodName = "/state.v1.StateStoreService/EnqueueIssue" - StateStoreService_EnqueueChatTask_FullMethodName = "/state.v1.StateStoreService/EnqueueChatTask" - StateStoreService_ActiveTasksByOrigin_FullMethodName = "/state.v1.StateStoreService/ActiveTasksByOrigin" - StateStoreService_UnpostedOutcomes_FullMethodName = "/state.v1.StateStoreService/UnpostedOutcomes" - StateStoreService_MarkOutcomePosted_FullMethodName = "/state.v1.StateStoreService/MarkOutcomePosted" - StateStoreService_ClaimNext_FullMethodName = "/state.v1.StateStoreService/ClaimNext" - StateStoreService_ClaimByIssue_FullMethodName = "/state.v1.StateStoreService/ClaimByIssue" - StateStoreService_Transition_FullMethodName = "/state.v1.StateStoreService/Transition" - StateStoreService_Update_FullMethodName = "/state.v1.StateStoreService/Update" - StateStoreService_StartStep_FullMethodName = "/state.v1.StateStoreService/StartStep" - StateStoreService_RecordUsage_FullMethodName = "/state.v1.StateStoreService/RecordUsage" - StateStoreService_TaskModels_FullMethodName = "/state.v1.StateStoreService/TaskModels" - StateStoreService_TaskInstructions_FullMethodName = "/state.v1.StateStoreService/TaskInstructions" - StateStoreService_CallerModels_FullMethodName = "/state.v1.StateStoreService/CallerModels" - StateStoreService_FinishStep_FullMethodName = "/state.v1.StateStoreService/FinishStep" - StateStoreService_CancelExecution_FullMethodName = "/state.v1.StateStoreService/CancelExecution" - StateStoreService_ListSteps_FullMethodName = "/state.v1.StateStoreService/ListSteps" - StateStoreService_GetHarnessSecret_FullMethodName = "/state.v1.StateStoreService/GetHarnessSecret" - StateStoreService_PutHarnessSecret_FullMethodName = "/state.v1.StateStoreService/PutHarnessSecret" - StateStoreService_Requeue_FullMethodName = "/state.v1.StateStoreService/Requeue" - StateStoreService_ParkTask_FullMethodName = "/state.v1.StateStoreService/ParkTask" - StateStoreService_RecoverStale_FullMethodName = "/state.v1.StateStoreService/RecoverStale" - StateStoreService_ArchiveTask_FullMethodName = "/state.v1.StateStoreService/ArchiveTask" - StateStoreService_RetryTask_FullMethodName = "/state.v1.StateStoreService/RetryTask" - StateStoreService_RespondReviewGate_FullMethodName = "/state.v1.StateStoreService/RespondReviewGate" - StateStoreService_BeginRemediation_FullMethodName = "/state.v1.StateStoreService/BeginRemediation" - StateStoreService_UpdateReviewPayload_FullMethodName = "/state.v1.StateStoreService/UpdateReviewPayload" - StateStoreService_SetReviewCursors_FullMethodName = "/state.v1.StateStoreService/SetReviewCursors" - StateStoreService_TaskByIssue_FullMethodName = "/state.v1.StateStoreService/TaskByIssue" - StateStoreService_OpenTaskByPR_FullMethodName = "/state.v1.StateStoreService/OpenTaskByPR" - StateStoreService_TaskByID_FullMethodName = "/state.v1.StateStoreService/TaskByID" - StateStoreService_OpenPRs_FullMethodName = "/state.v1.StateStoreService/OpenPRs" - StateStoreService_ClearTerminalTasks_FullMethodName = "/state.v1.StateStoreService/ClearTerminalTasks" - StateStoreService_Tasks_FullMethodName = "/state.v1.StateStoreService/Tasks" - StateStoreService_StatusCounts_FullMethodName = "/state.v1.StateStoreService/StatusCounts" - StateStoreService_InsertEvent_FullMethodName = "/state.v1.StateStoreService/InsertEvent" - StateStoreService_EventsSince_FullMethodName = "/state.v1.StateStoreService/EventsSince" - StateStoreService_TaskEvents_FullMethodName = "/state.v1.StateStoreService/TaskEvents" - StateStoreService_WorkflowStats_FullMethodName = "/state.v1.StateStoreService/WorkflowStats" - StateStoreService_StageStats_FullMethodName = "/state.v1.StateStoreService/StageStats" - StateStoreService_TokensByDay_FullMethodName = "/state.v1.StateStoreService/TokensByDay" - StateStoreService_PutConfigSnapshot_FullMethodName = "/state.v1.StateStoreService/PutConfigSnapshot" - StateStoreService_GetConfigSnapshot_FullMethodName = "/state.v1.StateStoreService/GetConfigSnapshot" - StateStoreService_PutChannelStatus_FullMethodName = "/state.v1.StateStoreService/PutChannelStatus" - StateStoreService_ListChannelStatus_FullMethodName = "/state.v1.StateStoreService/ListChannelStatus" - StateStoreService_PutApplyStatus_FullMethodName = "/state.v1.StateStoreService/PutApplyStatus" - StateStoreService_ListApplyStatus_FullMethodName = "/state.v1.StateStoreService/ListApplyStatus" - StateStoreService_PutPresence_FullMethodName = "/state.v1.StateStoreService/PutPresence" - StateStoreService_RecordCaptureRefusal_FullMethodName = "/state.v1.StateStoreService/RecordCaptureRefusal" - StateStoreService_ListCaptureRefusals_FullMethodName = "/state.v1.StateStoreService/ListCaptureRefusals" - StateStoreService_ListPresence_FullMethodName = "/state.v1.StateStoreService/ListPresence" - StateStoreService_ReadTaskLog_FullMethodName = "/state.v1.StateStoreService/ReadTaskLog" - StateStoreService_StreamTaskLogContent_FullMethodName = "/state.v1.StateStoreService/StreamTaskLogContent" - StateStoreService_InsertCapture_FullMethodName = "/state.v1.StateStoreService/InsertCapture" - StateStoreService_StreamCaptures_FullMethodName = "/state.v1.StateStoreService/StreamCaptures" - StateStoreService_InsertMapping_FullMethodName = "/state.v1.StateStoreService/InsertMapping" - StateStoreService_GetMapping_FullMethodName = "/state.v1.StateStoreService/GetMapping" - StateStoreService_ListMappings_FullMethodName = "/state.v1.StateStoreService/ListMappings" - StateStoreService_UpdateMapping_FullMethodName = "/state.v1.StateStoreService/UpdateMapping" - StateStoreService_DeleteMapping_FullMethodName = "/state.v1.StateStoreService/DeleteMapping" - StateStoreService_RecordMappingMatch_FullMethodName = "/state.v1.StateStoreService/RecordMappingMatch" - StateStoreService_InsertEventType_FullMethodName = "/state.v1.StateStoreService/InsertEventType" - StateStoreService_UpdateEventType_FullMethodName = "/state.v1.StateStoreService/UpdateEventType" - StateStoreService_DeleteEventType_FullMethodName = "/state.v1.StateStoreService/DeleteEventType" - StateStoreService_ListEventTypes_FullMethodName = "/state.v1.StateStoreService/ListEventTypes" - StateStoreService_InsertBinding_FullMethodName = "/state.v1.StateStoreService/InsertBinding" - StateStoreService_GetBinding_FullMethodName = "/state.v1.StateStoreService/GetBinding" - StateStoreService_ListBindings_FullMethodName = "/state.v1.StateStoreService/ListBindings" - StateStoreService_ListDispatches_FullMethodName = "/state.v1.StateStoreService/ListDispatches" - StateStoreService_UpdateBinding_FullMethodName = "/state.v1.StateStoreService/UpdateBinding" - StateStoreService_DeleteBinding_FullMethodName = "/state.v1.StateStoreService/DeleteBinding" - StateStoreService_ApproveBinding_FullMethodName = "/state.v1.StateStoreService/ApproveBinding" - StateStoreService_PauseBinding_FullMethodName = "/state.v1.StateStoreService/PauseBinding" - StateStoreService_ResumeBinding_FullMethodName = "/state.v1.StateStoreService/ResumeBinding" - StateStoreService_InsertSource_FullMethodName = "/state.v1.StateStoreService/InsertSource" - StateStoreService_GetSource_FullMethodName = "/state.v1.StateStoreService/GetSource" - StateStoreService_ListSources_FullMethodName = "/state.v1.StateStoreService/ListSources" - StateStoreService_SetSourceSigning_FullMethodName = "/state.v1.StateStoreService/SetSourceSigning" - StateStoreService_SetSourceSecret_FullMethodName = "/state.v1.StateStoreService/SetSourceSecret" - StateStoreService_SetSourceName_FullMethodName = "/state.v1.StateStoreService/SetSourceName" - StateStoreService_SetSourceDeliveryHeader_FullMethodName = "/state.v1.StateStoreService/SetSourceDeliveryHeader" - StateStoreService_DeleteSource_FullMethodName = "/state.v1.StateStoreService/DeleteSource" - StateStoreService_ArmedBindingsForSource_FullMethodName = "/state.v1.StateStoreService/ArmedBindingsForSource" - StateStoreService_RecordDispatch_FullMethodName = "/state.v1.StateStoreService/RecordDispatch" - StateStoreService_RecordPlaybookDispatch_FullMethodName = "/state.v1.StateStoreService/RecordPlaybookDispatch" - StateStoreService_DeletePlaybookDispatches_FullMethodName = "/state.v1.StateStoreService/DeletePlaybookDispatches" - StateStoreService_StreamUndispatchedCaptures_FullMethodName = "/state.v1.StateStoreService/StreamUndispatchedCaptures" - StateStoreService_EnqueueBindingTask_FullMethodName = "/state.v1.StateStoreService/EnqueueBindingTask" - StateStoreService_EnqueueCallTask_FullMethodName = "/state.v1.StateStoreService/EnqueueCallTask" - StateStoreService_WorkflowCallStatus_FullMethodName = "/state.v1.StateStoreService/WorkflowCallStatus" - StateStoreService_GetPrincipal_FullMethodName = "/state.v1.StateStoreService/GetPrincipal" - StateStoreService_ListPolicies_FullMethodName = "/state.v1.StateStoreService/ListPolicies" - StateStoreService_GetPoliciesVersion_FullMethodName = "/state.v1.StateStoreService/GetPoliciesVersion" - StateStoreService_PutPolicy_FullMethodName = "/state.v1.StateStoreService/PutPolicy" - StateStoreService_DeletePolicy_FullMethodName = "/state.v1.StateStoreService/DeletePolicy" - StateStoreService_EnsureShippedOrgPolicies_FullMethodName = "/state.v1.StateStoreService/EnsureShippedOrgPolicies" - StateStoreService_RecordDenial_FullMethodName = "/state.v1.StateStoreService/RecordDenial" - StateStoreService_ListDenials_FullMethodName = "/state.v1.StateStoreService/ListDenials" - StateStoreService_ListOrgs_FullMethodName = "/state.v1.StateStoreService/ListOrgs" - StateStoreService_GetOrg_FullMethodName = "/state.v1.StateStoreService/GetOrg" - StateStoreService_CreateOrg_FullMethodName = "/state.v1.StateStoreService/CreateOrg" - StateStoreService_ListWorkspaces_FullMethodName = "/state.v1.StateStoreService/ListWorkspaces" - StateStoreService_CreateWorkspace_FullMethodName = "/state.v1.StateStoreService/CreateWorkspace" - StateStoreService_ListMembers_FullMethodName = "/state.v1.StateStoreService/ListMembers" - StateStoreService_SetMembership_FullMethodName = "/state.v1.StateStoreService/SetMembership" - StateStoreService_RemoveMembership_FullMethodName = "/state.v1.StateStoreService/RemoveMembership" - StateStoreService_ListOrgAgents_FullMethodName = "/state.v1.StateStoreService/ListOrgAgents" - StateStoreService_AssignAgent_FullMethodName = "/state.v1.StateStoreService/AssignAgent" - StateStoreService_RaiseAlert_FullMethodName = "/state.v1.StateStoreService/RaiseAlert" - StateStoreService_ResolveAlert_FullMethodName = "/state.v1.StateStoreService/ResolveAlert" - StateStoreService_DismissAlert_FullMethodName = "/state.v1.StateStoreService/DismissAlert" - StateStoreService_ListAlerts_FullMethodName = "/state.v1.StateStoreService/ListAlerts" - StateStoreService_ClaimAlertDeliveries_FullMethodName = "/state.v1.StateStoreService/ClaimAlertDeliveries" - StateStoreService_RecordAlertAttempt_FullMethodName = "/state.v1.StateStoreService/RecordAlertAttempt" -) - -// StateStoreServiceClient is the client API for StateStoreService 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. -// -// StateStore is the single gRPC service fronting archie's PostgreSQL database. -// See docs/prds/state-store-contract.md for the ownership split: the -// workflow-domain Store view (Update/Transition/InsertEvent) is consumer-owned -// in internal/domain/workflow, while the rest of this surface is -// producer-owned in internal/domain/storecontract. Both are served by the same -// service over internal/infrastructure/postgres; the proto bypasses the Go -// interfacebloat cap (max 8), like gateway.v1.ChatService does. -type StateStoreServiceClient interface { - RecentLogs(ctx context.Context, in *RecentLogsRequest, opts ...grpc.CallOption) (*RecentLogsResponse, error) - // Installed Archie packages. Administrative until org-scoped principals land. - InstallPackage(ctx context.Context, in *InstallPackageRequest, opts ...grpc.CallOption) (*InstallPackageResponse, error) - // ListCatalogue returns the packages the instance's verified catalogue - // offers; InstallFromCatalogue installs one by name at the digest it lists. - ListCatalogue(ctx context.Context, in *ListCatalogueRequest, opts ...grpc.CallOption) (*ListCatalogueResponse, error) - InstallFromCatalogue(ctx context.Context, in *InstallFromCatalogueRequest, opts ...grpc.CallOption) (*InstallFromCatalogueResponse, error) - GetInstalledPackage(ctx context.Context, in *GetInstalledPackageRequest, opts ...grpc.CallOption) (*GetInstalledPackageResponse, error) - ListInstalledPackages(ctx context.Context, in *ListInstalledPackagesRequest, opts ...grpc.CallOption) (*ListInstalledPackagesResponse, error) - // AcceptPackageAuthority records the operator's accepted authority against - // the pinned digest (the approve action; install is the create action). - // Administrative until org-scoped principals land. - AcceptPackageAuthority(ctx context.Context, in *AcceptPackageAuthorityRequest, opts ...grpc.CallOption) (*AcceptPackageAuthorityResponse, error) - RemoveInstalledPackage(ctx context.Context, in *RemoveInstalledPackageRequest, opts ...grpc.CallOption) (*RemoveInstalledPackageResponse, error) - // UpdatePackage moves a package to the digest the verified catalogue lists: - // a non-widening update applies, a widening one waits as pending. - // ApprovePackageUpdate applies the pending update and accepts its authority; - // RollbackPackage restores the previous digest and its accepted authority. - UpdatePackage(ctx context.Context, in *UpdatePackageRequest, opts ...grpc.CallOption) (*UpdatePackageResponse, error) - ApprovePackageUpdate(ctx context.Context, in *ApprovePackageUpdateRequest, opts ...grpc.CallOption) (*ApprovePackageUpdateResponse, error) - RollbackPackage(ctx context.Context, in *RollbackPackageRequest, opts ...grpc.CallOption) (*RollbackPackageResponse, error) - // SetPackageUpdatePolicy sets "manual" or "auto"; the State Store updates - // auto packages on a timer. - SetPackageUpdatePolicy(ctx context.Context, in *SetPackageUpdatePolicyRequest, opts ...grpc.CallOption) (*SetPackageUpdatePolicyResponse, error) - // Administrative task credential lifecycle. Worker credentials cannot call these. - RegisterTaskGrant(ctx context.Context, in *RegisterTaskGrantRequest, opts ...grpc.CallOption) (*RegisterTaskGrantResponse, error) - RevokeTaskGrant(ctx context.Context, in *RevokeTaskGrantRequest, opts ...grpc.CallOption) (*RevokeTaskGrantResponse, error) - ResolveTaskGrant(ctx context.Context, in *ResolveTaskGrantRequest, opts ...grpc.CallOption) (*ResolveTaskGrantResponse, error) - // Identity domain. Task-scoped grants cannot call these administrative RPCs. - ListIdentities(ctx context.Context, in *ListIdentitiesRequest, opts ...grpc.CallOption) (*ListIdentitiesResponse, error) - GetAuthenticationSettings(ctx context.Context, in *GetAuthenticationSettingsRequest, opts ...grpc.CallOption) (*GetAuthenticationSettingsResponse, error) - SaveAuthenticationSettings(ctx context.Context, in *SaveAuthenticationSettingsRequest, opts ...grpc.CallOption) (*SaveAuthenticationSettingsResponse, error) - BeginPasskey(ctx context.Context, in *BeginPasskeyRequest, opts ...grpc.CallOption) (*BeginPasskeyResponse, error) - FinishPasskey(ctx context.Context, in *FinishPasskeyRequest, opts ...grpc.CallOption) (*FinishPasskeyResponse, error) - ListPasskeys(ctx context.Context, in *ListPasskeysRequest, opts ...grpc.CallOption) (*ListPasskeysResponse, error) - DeletePasskey(ctx context.Context, in *DeletePasskeyRequest, opts ...grpc.CallOption) (*DeletePasskeyResponse, error) - OpenAccountSession(ctx context.Context, in *OpenAccountSessionRequest, opts ...grpc.CallOption) (*OpenAccountSessionResponse, error) - RequireFreshAccountSession(ctx context.Context, in *RequireFreshAccountSessionRequest, opts ...grpc.CallOption) (*RequireFreshAccountSessionResponse, error) - CreateAccountRecovery(ctx context.Context, in *CreateAccountRecoveryRequest, opts ...grpc.CallOption) (*CreateAccountRecoveryResponse, error) - RecoverAccount(ctx context.Context, in *RecoverAccountRequest, opts ...grpc.CallOption) (*RecoverAccountResponse, error) - AccountSetup(ctx context.Context, in *AccountSetupRequest, opts ...grpc.CallOption) (*AccountSetupResponse, error) - RegisterAccount(ctx context.Context, in *RegisterAccountRequest, opts ...grpc.CallOption) (*RegisterAccountResponse, error) - SignInAccount(ctx context.Context, in *SignInAccountRequest, opts ...grpc.CallOption) (*SignInAccountResponse, error) - ResolveAccountSession(ctx context.Context, in *ResolveAccountSessionRequest, opts ...grpc.CallOption) (*ResolveAccountSessionResponse, error) - SignOutAccount(ctx context.Context, in *SignOutAccountRequest, opts ...grpc.CallOption) (*SignOutAccountResponse, error) - ChangeAccountPassword(ctx context.Context, in *ChangeAccountPasswordRequest, opts ...grpc.CallOption) (*ChangeAccountPasswordResponse, error) - GetIdentity(ctx context.Context, in *GetIdentityRequest, opts ...grpc.CallOption) (*GetIdentityResponse, error) - CreateIdentity(ctx context.Context, in *CreateIdentityRequest, opts ...grpc.CallOption) (*CreateIdentityResponse, error) - RenameIdentity(ctx context.Context, in *RenameIdentityRequest, opts ...grpc.CallOption) (*RenameIdentityResponse, error) - SuspendIdentity(ctx context.Context, in *SuspendIdentityRequest, opts ...grpc.CallOption) (*SuspendIdentityResponse, error) - ReactivateIdentity(ctx context.Context, in *ReactivateIdentityRequest, opts ...grpc.CallOption) (*ReactivateIdentityResponse, error) - RetireIdentity(ctx context.Context, in *RetireIdentityRequest, opts ...grpc.CallOption) (*RetireIdentityResponse, error) - // Subject bindings. A verified provider subject is resolved to the identity it - // is bound to; the authenticating process calls these rather than owning the - // identity store. - ResolveIdentitySubject(ctx context.Context, in *ResolveIdentitySubjectRequest, opts ...grpc.CallOption) (*ResolveIdentitySubjectResponse, error) - BindIdentitySubject(ctx context.Context, in *BindIdentitySubjectRequest, opts ...grpc.CallOption) (*BindIdentitySubjectResponse, error) - ClaimIdentitySubject(ctx context.Context, in *ClaimIdentitySubjectRequest, opts ...grpc.CallOption) (*ClaimIdentitySubjectResponse, error) - // Personal API tokens act on the caller's own principal: the State Store - // refuses a call that carries none. - AddPersonalToken(ctx context.Context, in *AddPersonalTokenRequest, opts ...grpc.CallOption) (*AddPersonalTokenResponse, error) - ListPersonalTokens(ctx context.Context, in *ListPersonalTokensRequest, opts ...grpc.CallOption) (*ListPersonalTokensResponse, error) - RevokePersonalToken(ctx context.Context, in *RevokePersonalTokenRequest, opts ...grpc.CallOption) (*RevokePersonalTokenResponse, error) - // Lifecycle - EnqueueIssue(ctx context.Context, in *EnqueueIssueRequest, opts ...grpc.CallOption) (*EnqueueIssueResponse, error) - EnqueueChatTask(ctx context.Context, in *EnqueueChatTaskRequest, opts ...grpc.CallOption) (*EnqueueChatTaskResponse, error) - ActiveTasksByOrigin(ctx context.Context, in *ActiveTasksByOriginRequest, opts ...grpc.CallOption) (*ActiveTasksByOriginResponse, error) - // UnpostedOutcomes lists finished chat tasks whose outcome has not yet been - // posted to their conversation; MarkOutcomePosted records that it was. - UnpostedOutcomes(ctx context.Context, in *UnpostedOutcomesRequest, opts ...grpc.CallOption) (*UnpostedOutcomesResponse, error) - MarkOutcomePosted(ctx context.Context, in *MarkOutcomePostedRequest, opts ...grpc.CallOption) (*MarkOutcomePostedResponse, error) - ClaimNext(ctx context.Context, in *ClaimNextRequest, opts ...grpc.CallOption) (*ClaimNextResponse, error) - ClaimByIssue(ctx context.Context, in *ClaimByIssueRequest, opts ...grpc.CallOption) (*ClaimByIssueResponse, error) - Transition(ctx context.Context, in *TransitionRequest, opts ...grpc.CallOption) (*TransitionResponse, error) - Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) - // Step executions (docs/prds/execution-tree-state-machine.md). The run - // credential authorises both on its own execution only. - StartStep(ctx context.Context, in *StartStepRequest, opts ...grpc.CallOption) (*StartStepResponse, error) - // RecordUsage appends one model call's usage record. A run credential may - // record usage only for its own task. - RecordUsage(ctx context.Context, in *RecordUsageRequest, opts ...grpc.CallOption) (*RecordUsageResponse, error) - // TaskModels answers what a task's models resolve against: the aliases its - // org may use and the org's own providers. The org is the task's, never - // the caller's. - TaskModels(ctx context.Context, in *TaskModelsRequest, opts ...grpc.CallOption) (*TaskModelsResponse, error) - // TaskInstructions answers the instance and organisation instructions a - // task's agent runs follow. Organisation is empty for a system-org task. - TaskInstructions(ctx context.Context, in *TaskInstructionsRequest, opts ...grpc.CallOption) (*TaskInstructionsResponse, error) - // CallerModels answers the model aliases the caller's org may use. The org - // is the calling principal's; a call with none is the system org's. - CallerModels(ctx context.Context, in *CallerModelsRequest, opts ...grpc.CallOption) (*CallerModelsResponse, error) - FinishStep(ctx context.Context, in *FinishStepRequest, opts ...grpc.CallOption) (*FinishStepResponse, error) - // Cancellation. Deliberately administrative (deny-by-default for a - // task-scoped grant): a cancel is a dashboard, API and dispatch action - // decided by the Authorizer, not a worker call. - CancelExecution(ctx context.Context, in *CancelExecutionRequest, opts ...grpc.CallOption) (*CancelExecutionResponse, error) - // ListSteps is a dashboard/API/dispatch action (Authorizer: read on the - // run), not task-scoped-grant callable like StartStep/FinishStep. - ListSteps(ctx context.Context, in *ListStepsRequest, opts ...grpc.CallOption) (*ListStepsResponse, error) - // Harness OAuth secrets (docs/prds/external-agent-harness.md, - // Credentials). Administrative: the setup terminal (an `update` action on - // the secret, Authorizer-gated) and the egress proxy's token-endpoint - // interception (acting as the daemon, not a worker) are the only callers. - GetHarnessSecret(ctx context.Context, in *GetHarnessSecretRequest, opts ...grpc.CallOption) (*GetHarnessSecretResponse, error) - PutHarnessSecret(ctx context.Context, in *PutHarnessSecretRequest, opts ...grpc.CallOption) (*PutHarnessSecretResponse, error) - Requeue(ctx context.Context, in *RequeueRequest, opts ...grpc.CallOption) (*RequeueResponse, error) - ParkTask(ctx context.Context, in *ParkTaskRequest, opts ...grpc.CallOption) (*ParkTaskResponse, error) - RecoverStale(ctx context.Context, in *RecoverStaleRequest, opts ...grpc.CallOption) (*RecoverStaleResponse, error) - // Archive / Retry - ArchiveTask(ctx context.Context, in *ArchiveTaskRequest, opts ...grpc.CallOption) (*ArchiveTaskResponse, error) - RetryTask(ctx context.Context, in *RetryTaskRequest, opts ...grpc.CallOption) (*RetryTaskResponse, error) - // 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) - // Queries - TaskByIssue(ctx context.Context, in *TaskByIssueRequest, opts ...grpc.CallOption) (*TaskByIssueResponse, error) - OpenTaskByPR(ctx context.Context, in *OpenTaskByPRRequest, opts ...grpc.CallOption) (*OpenTaskByPRResponse, error) - TaskByID(ctx context.Context, in *TaskByIDRequest, opts ...grpc.CallOption) (*TaskByIDResponse, error) - OpenPRs(ctx context.Context, in *OpenPRsRequest, opts ...grpc.CallOption) (*OpenPRsResponse, error) - ClearTerminalTasks(ctx context.Context, in *ClearTerminalTasksRequest, opts ...grpc.CallOption) (*ClearTerminalTasksResponse, error) - Tasks(ctx context.Context, in *TasksRequest, opts ...grpc.CallOption) (*TasksResponse, error) - StatusCounts(ctx context.Context, in *StatusCountsRequest, opts ...grpc.CallOption) (*StatusCountsResponse, error) - // Events - InsertEvent(ctx context.Context, in *InsertEventRequest, opts ...grpc.CallOption) (*InsertEventResponse, error) - EventsSince(ctx context.Context, in *EventsSinceRequest, opts ...grpc.CallOption) (*EventsSinceResponse, error) - TaskEvents(ctx context.Context, in *TaskEventsRequest, opts ...grpc.CallOption) (*TaskEventsResponse, error) - WorkflowStats(ctx context.Context, in *WorkflowStatsRequest, opts ...grpc.CallOption) (*WorkflowStatsResponse, error) - StageStats(ctx context.Context, in *StageStatsRequest, opts ...grpc.CallOption) (*StageStatsResponse, error) - TokensByDay(ctx context.Context, in *TokensByDayRequest, opts ...grpc.CallOption) (*TokensByDayResponse, error) - // Configuration snapshot: the running configuration as the dashboard - // renders it, published by the owner of configuration for the process that - // displays it. PutConfigSnapshot is administrative; GetConfigSnapshot is - // the UI's read (docs/architecture/migration-decisions.md, "Dashboard - // configuration page"). - PutConfigSnapshot(ctx context.Context, in *PutConfigSnapshotRequest, opts ...grpc.CallOption) (*PutConfigSnapshotResponse, error) - GetConfigSnapshot(ctx context.Context, in *GetConfigSnapshotRequest, opts ...grpc.CallOption) (*GetConfigSnapshotResponse, error) - // Channel status is what the process HOSTING the channels observes about them: - // one row per channel, written by the Messaging Service and read by the UI - // process. Administrative like the config snapshot, and for the same reason -- - // a task-scoped grant reaches neither, so authorizesTaskScopedCall admits only - // the administrative token. It is runtime state rather than a settings - // document, which is why it is not a ControlPlaneService resource kind. - PutChannelStatus(ctx context.Context, in *PutChannelStatusRequest, opts ...grpc.CallOption) (*PutChannelStatusResponse, error) - ListChannelStatus(ctx context.Context, in *ListChannelStatusRequest, opts ...grpc.CallOption) (*ListChannelStatusResponse, error) - // Apply status: which version of a control-plane resource each process is - // running, and why it could not. Every process that applies a resource - // publishes; the UI process reads (docs/prds/control-plane-apply-status.md). - // Both are administrative. - PutApplyStatus(ctx context.Context, in *PutApplyStatusRequest, opts ...grpc.CallOption) (*PutApplyStatusResponse, error) - ListApplyStatus(ctx context.Context, in *ListApplyStatusRequest, opts ...grpc.CallOption) (*ListApplyStatusResponse, error) - // Presence: every running service instance re-stamps one record, so a - // record past the staleness window means that instance is down. - // Administrative. - PutPresence(ctx context.Context, in *PutPresenceRequest, opts ...grpc.CallOption) (*PutPresenceResponse, error) - // Capture refusals: events the network rules refused at the receiver, - // counted per source. Administrative. - RecordCaptureRefusal(ctx context.Context, in *RecordCaptureRefusalRequest, opts ...grpc.CallOption) (*RecordCaptureRefusalResponse, error) - ListCaptureRefusals(ctx context.Context, in *ListCaptureRefusalsRequest, opts ...grpc.CallOption) (*ListCaptureRefusalsResponse, error) - ListPresence(ctx context.Context, in *ListPresenceRequest, opts ...grpc.CallOption) (*ListPresenceResponse, error) - // Task log: one task attempt's persisted log. Task log files live in the - // state directory this process owns, so the dashboard reads them over this - // contract rather than opening them itself - // (docs/prds/ui-service-boundary.md). - ReadTaskLog(ctx context.Context, in *ReadTaskLogRequest, opts ...grpc.CallOption) (*ReadTaskLogResponse, error) - // StreamTaskLogContent returns one attempt's log verbatim, one chunk per - // message, for a download. A log file is unbounded input (it rotates at - // DefaultMaxSizeMB), so a unary response would exceed gRPC's 4MiB message - // cap on a real log -- the same reason ListCaptures was superseded by - // StreamCaptures. - StreamTaskLogContent(ctx context.Context, in *StreamTaskLogContentRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamTaskLogContentResponse], error) - // Capture - InsertCapture(ctx context.Context, in *InsertCaptureRequest, opts ...grpc.CallOption) (*InsertCaptureResponse, error) - // StreamCaptures returns one capture per message: a batch of large capture - // bodies can exceed gRPC's 4MiB unary message cap - // (docs/prds/state-store-contract.md). - StreamCaptures(ctx context.Context, in *StreamCapturesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamCapturesResponse], error) - // Mapping - InsertMapping(ctx context.Context, in *InsertMappingRequest, opts ...grpc.CallOption) (*InsertMappingResponse, error) - GetMapping(ctx context.Context, in *GetMappingRequest, opts ...grpc.CallOption) (*GetMappingResponse, error) - ListMappings(ctx context.Context, in *ListMappingsRequest, opts ...grpc.CallOption) (*ListMappingsResponse, error) - UpdateMapping(ctx context.Context, in *UpdateMappingRequest, opts ...grpc.CallOption) (*UpdateMappingResponse, error) - DeleteMapping(ctx context.Context, in *DeleteMappingRequest, opts ...grpc.CallOption) (*DeleteMappingResponse, error) - // RecordMappingMatch counts one event a mapping resolved; the same - // (mapping, capture) twice counts once. - RecordMappingMatch(ctx context.Context, in *RecordMappingMatchRequest, opts ...grpc.CallOption) (*RecordMappingMatchResponse, error) - // EventType (docs/prds/event-automation.md, "Event types"). Insert and - // Update refuse an overlapping or malformed type. - InsertEventType(ctx context.Context, in *InsertEventTypeRequest, opts ...grpc.CallOption) (*InsertEventTypeResponse, error) - UpdateEventType(ctx context.Context, in *UpdateEventTypeRequest, opts ...grpc.CallOption) (*UpdateEventTypeResponse, error) - DeleteEventType(ctx context.Context, in *DeleteEventTypeRequest, opts ...grpc.CallOption) (*DeleteEventTypeResponse, error) - ListEventTypes(ctx context.Context, in *ListEventTypesRequest, opts ...grpc.CallOption) (*ListEventTypesResponse, error) - // Binding - 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) - ListDispatches(ctx context.Context, in *ListDispatchesRequest, opts ...grpc.CallOption) (*ListDispatchesResponse, 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) - // Source (event-automation.md "Sources"): the capture endpoint and its - // signing setting. Secrets travel in plaintext; the store encrypts at rest. - 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) - // Dispatch - ArmedBindingsForSource(ctx context.Context, in *ArmedBindingsForSourceRequest, opts ...grpc.CallOption) (*ArmedBindingsForSourceResponse, error) - RecordDispatch(ctx context.Context, in *RecordDispatchRequest, opts ...grpc.CallOption) (*RecordDispatchResponse, error) - // Playbook dispatch ledger (eda-playbook-engine.md gap 2): one durable - // at-most-once record per (playbook, version, event, action) for the - // side-effecting positions. Administrative, like RecordDispatch: a - // task-scoped grant cannot reach either (see TaskGrants). - RecordPlaybookDispatch(ctx context.Context, in *RecordPlaybookDispatchRequest, opts ...grpc.CallOption) (*RecordPlaybookDispatchResponse, error) - DeletePlaybookDispatches(ctx context.Context, in *DeletePlaybookDispatchesRequest, opts ...grpc.CallOption) (*DeletePlaybookDispatchesResponse, error) - StreamUndispatchedCaptures(ctx context.Context, in *StreamUndispatchedCapturesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamUndispatchedCapturesResponse], error) - // BindingTaskCreator: claims the binding's dispatch of a capture and - // enqueues its task in one transaction, so a failure leaves neither and a - // replayed delivery is refused with AlreadyExists. - EnqueueBindingTask(ctx context.Context, in *EnqueueBindingTaskRequest, opts ...grpc.CallOption) (*EnqueueBindingTaskResponse, error) - // WorkflowCaller: a workflow.call step starts its callee and, with - // wait:true, reads it back while waiting. Both are the one sanctioned - // widening of a task-scoped grant -- the callee is the caller's child - // (docs/prds/workflow-calls.md). CallStatus re-checks the parent-child - // relation server-side, so the grant only names the caller. - EnqueueCallTask(ctx context.Context, in *EnqueueCallTaskRequest, opts ...grpc.CallOption) (*EnqueueCallTaskResponse, error) - WorkflowCallStatus(ctx context.Context, in *WorkflowCallStatusRequest, opts ...grpc.CallOption) (*WorkflowCallStatusResponse, error) - // Access: the stored policy chain and its denial records - // (docs/prds/orgs-and-access.md). ListPolicies is the engine's snapshot; - // the writes are administrative. RecordDenial is the dashboard's and - // dispatch's write path; ListDenials is the operator surface. - // The principal assembly the Authorizer evaluates: an identity, the org - // it serves, and its memberships (internal/domain/access). - GetPrincipal(ctx context.Context, in *GetPrincipalRequest, opts ...grpc.CallOption) (*GetPrincipalResponse, error) - ListPolicies(ctx context.Context, in *ListPoliciesRequest, opts ...grpc.CallOption) (*ListPoliciesResponse, error) - // GetPoliciesVersion is the instance-wide policy version an authorizer reads - // before each decision to know whether the chain it holds is current. A - // caller must read it before ListPolicies, never after. - GetPoliciesVersion(ctx context.Context, in *GetPoliciesVersionRequest, opts ...grpc.CallOption) (*GetPoliciesVersionResponse, error) - PutPolicy(ctx context.Context, in *PutPolicyRequest, opts ...grpc.CallOption) (*PutPolicyResponse, error) - DeletePolicy(ctx context.Context, in *DeletePolicyRequest, opts ...grpc.CallOption) (*DeletePolicyResponse, error) - EnsureShippedOrgPolicies(ctx context.Context, in *EnsureShippedOrgPoliciesRequest, opts ...grpc.CallOption) (*EnsureShippedOrgPoliciesResponse, error) - RecordDenial(ctx context.Context, in *RecordDenialRequest, opts ...grpc.CallOption) (*RecordDenialResponse, error) - ListDenials(ctx context.Context, in *ListDenialsRequest, opts ...grpc.CallOption) (*ListDenialsResponse, error) - // Orgs, workspaces, memberships and agent assignments - // (docs/prds/orgs-and-access.md). Every request names an org, but the - // State Store acts in the org the caller's principal carries: a request - // org that is not the caller's is ignored, so the contract cannot reach - // another tenant. Instance-admin widening is a later change. - ListOrgs(ctx context.Context, in *ListOrgsRequest, opts ...grpc.CallOption) (*ListOrgsResponse, error) - GetOrg(ctx context.Context, in *GetOrgRequest, opts ...grpc.CallOption) (*GetOrgResponse, error) - CreateOrg(ctx context.Context, in *CreateOrgRequest, opts ...grpc.CallOption) (*CreateOrgResponse, error) - ListWorkspaces(ctx context.Context, in *ListWorkspacesRequest, opts ...grpc.CallOption) (*ListWorkspacesResponse, error) - CreateWorkspace(ctx context.Context, in *CreateWorkspaceRequest, opts ...grpc.CallOption) (*CreateWorkspaceResponse, error) - ListMembers(ctx context.Context, in *ListMembersRequest, opts ...grpc.CallOption) (*ListMembersResponse, error) - SetMembership(ctx context.Context, in *SetMembershipRequest, opts ...grpc.CallOption) (*SetMembershipResponse, error) - RemoveMembership(ctx context.Context, in *RemoveMembershipRequest, opts ...grpc.CallOption) (*RemoveMembershipResponse, error) - ListOrgAgents(ctx context.Context, in *ListOrgAgentsRequest, opts ...grpc.CallOption) (*ListOrgAgentsResponse, error) - AssignAgent(ctx context.Context, in *AssignAgentRequest, opts ...grpc.CallOption) (*AssignAgentResponse, error) - // Operator alerts (internal/domain/alert). A caller acting for a principal - // reads, dismisses and raises only in that principal's org; a request org is - // ignored for it. A service acting for no one names the org itself. - // RaiseAlert and ResolveAlert are idempotent, so a periodic check can call - // them every tick. ClaimAlertDeliveries and RecordAlertAttempt serve the - // outbound webhook and refuse a caller scoped to an org. - RaiseAlert(ctx context.Context, in *RaiseAlertRequest, opts ...grpc.CallOption) (*RaiseAlertResponse, error) - ResolveAlert(ctx context.Context, in *ResolveAlertRequest, opts ...grpc.CallOption) (*ResolveAlertResponse, error) - DismissAlert(ctx context.Context, in *DismissAlertRequest, opts ...grpc.CallOption) (*DismissAlertResponse, error) - ListAlerts(ctx context.Context, in *ListAlertsRequest, opts ...grpc.CallOption) (*ListAlertsResponse, error) - ClaimAlertDeliveries(ctx context.Context, in *ClaimAlertDeliveriesRequest, opts ...grpc.CallOption) (*ClaimAlertDeliveriesResponse, error) - RecordAlertAttempt(ctx context.Context, in *RecordAlertAttemptRequest, opts ...grpc.CallOption) (*RecordAlertAttemptResponse, error) -} - -type stateStoreServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewStateStoreServiceClient(cc grpc.ClientConnInterface) StateStoreServiceClient { - return &stateStoreServiceClient{cc} -} - -func (c *stateStoreServiceClient) RecentLogs(ctx context.Context, in *RecentLogsRequest, opts ...grpc.CallOption) (*RecentLogsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RecentLogsResponse) - err := c.cc.Invoke(ctx, StateStoreService_RecentLogs_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) InstallPackage(ctx context.Context, in *InstallPackageRequest, opts ...grpc.CallOption) (*InstallPackageResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(InstallPackageResponse) - err := c.cc.Invoke(ctx, StateStoreService_InstallPackage_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListCatalogue(ctx context.Context, in *ListCatalogueRequest, opts ...grpc.CallOption) (*ListCatalogueResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListCatalogueResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListCatalogue_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) InstallFromCatalogue(ctx context.Context, in *InstallFromCatalogueRequest, opts ...grpc.CallOption) (*InstallFromCatalogueResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(InstallFromCatalogueResponse) - err := c.cc.Invoke(ctx, StateStoreService_InstallFromCatalogue_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) GetInstalledPackage(ctx context.Context, in *GetInstalledPackageRequest, opts ...grpc.CallOption) (*GetInstalledPackageResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetInstalledPackageResponse) - err := c.cc.Invoke(ctx, StateStoreService_GetInstalledPackage_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListInstalledPackages(ctx context.Context, in *ListInstalledPackagesRequest, opts ...grpc.CallOption) (*ListInstalledPackagesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListInstalledPackagesResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListInstalledPackages_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) AcceptPackageAuthority(ctx context.Context, in *AcceptPackageAuthorityRequest, opts ...grpc.CallOption) (*AcceptPackageAuthorityResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(AcceptPackageAuthorityResponse) - err := c.cc.Invoke(ctx, StateStoreService_AcceptPackageAuthority_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RemoveInstalledPackage(ctx context.Context, in *RemoveInstalledPackageRequest, opts ...grpc.CallOption) (*RemoveInstalledPackageResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RemoveInstalledPackageResponse) - err := c.cc.Invoke(ctx, StateStoreService_RemoveInstalledPackage_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) UpdatePackage(ctx context.Context, in *UpdatePackageRequest, opts ...grpc.CallOption) (*UpdatePackageResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(UpdatePackageResponse) - err := c.cc.Invoke(ctx, StateStoreService_UpdatePackage_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ApprovePackageUpdate(ctx context.Context, in *ApprovePackageUpdateRequest, opts ...grpc.CallOption) (*ApprovePackageUpdateResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ApprovePackageUpdateResponse) - err := c.cc.Invoke(ctx, StateStoreService_ApprovePackageUpdate_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RollbackPackage(ctx context.Context, in *RollbackPackageRequest, opts ...grpc.CallOption) (*RollbackPackageResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RollbackPackageResponse) - err := c.cc.Invoke(ctx, StateStoreService_RollbackPackage_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) SetPackageUpdatePolicy(ctx context.Context, in *SetPackageUpdatePolicyRequest, opts ...grpc.CallOption) (*SetPackageUpdatePolicyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetPackageUpdatePolicyResponse) - err := c.cc.Invoke(ctx, StateStoreService_SetPackageUpdatePolicy_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RegisterTaskGrant(ctx context.Context, in *RegisterTaskGrantRequest, opts ...grpc.CallOption) (*RegisterTaskGrantResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RegisterTaskGrantResponse) - err := c.cc.Invoke(ctx, StateStoreService_RegisterTaskGrant_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RevokeTaskGrant(ctx context.Context, in *RevokeTaskGrantRequest, opts ...grpc.CallOption) (*RevokeTaskGrantResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RevokeTaskGrantResponse) - err := c.cc.Invoke(ctx, StateStoreService_RevokeTaskGrant_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ResolveTaskGrant(ctx context.Context, in *ResolveTaskGrantRequest, opts ...grpc.CallOption) (*ResolveTaskGrantResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ResolveTaskGrantResponse) - err := c.cc.Invoke(ctx, StateStoreService_ResolveTaskGrant_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListIdentities(ctx context.Context, in *ListIdentitiesRequest, opts ...grpc.CallOption) (*ListIdentitiesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListIdentitiesResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListIdentities_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) GetAuthenticationSettings(ctx context.Context, in *GetAuthenticationSettingsRequest, opts ...grpc.CallOption) (*GetAuthenticationSettingsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetAuthenticationSettingsResponse) - err := c.cc.Invoke(ctx, StateStoreService_GetAuthenticationSettings_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) SaveAuthenticationSettings(ctx context.Context, in *SaveAuthenticationSettingsRequest, opts ...grpc.CallOption) (*SaveAuthenticationSettingsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SaveAuthenticationSettingsResponse) - err := c.cc.Invoke(ctx, StateStoreService_SaveAuthenticationSettings_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) BeginPasskey(ctx context.Context, in *BeginPasskeyRequest, opts ...grpc.CallOption) (*BeginPasskeyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(BeginPasskeyResponse) - err := c.cc.Invoke(ctx, StateStoreService_BeginPasskey_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) FinishPasskey(ctx context.Context, in *FinishPasskeyRequest, opts ...grpc.CallOption) (*FinishPasskeyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(FinishPasskeyResponse) - err := c.cc.Invoke(ctx, StateStoreService_FinishPasskey_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListPasskeys(ctx context.Context, in *ListPasskeysRequest, opts ...grpc.CallOption) (*ListPasskeysResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListPasskeysResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListPasskeys_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) DeletePasskey(ctx context.Context, in *DeletePasskeyRequest, opts ...grpc.CallOption) (*DeletePasskeyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(DeletePasskeyResponse) - err := c.cc.Invoke(ctx, StateStoreService_DeletePasskey_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) OpenAccountSession(ctx context.Context, in *OpenAccountSessionRequest, opts ...grpc.CallOption) (*OpenAccountSessionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(OpenAccountSessionResponse) - err := c.cc.Invoke(ctx, StateStoreService_OpenAccountSession_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RequireFreshAccountSession(ctx context.Context, in *RequireFreshAccountSessionRequest, opts ...grpc.CallOption) (*RequireFreshAccountSessionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RequireFreshAccountSessionResponse) - err := c.cc.Invoke(ctx, StateStoreService_RequireFreshAccountSession_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) CreateAccountRecovery(ctx context.Context, in *CreateAccountRecoveryRequest, opts ...grpc.CallOption) (*CreateAccountRecoveryResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateAccountRecoveryResponse) - err := c.cc.Invoke(ctx, StateStoreService_CreateAccountRecovery_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RecoverAccount(ctx context.Context, in *RecoverAccountRequest, opts ...grpc.CallOption) (*RecoverAccountResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RecoverAccountResponse) - err := c.cc.Invoke(ctx, StateStoreService_RecoverAccount_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) AccountSetup(ctx context.Context, in *AccountSetupRequest, opts ...grpc.CallOption) (*AccountSetupResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(AccountSetupResponse) - err := c.cc.Invoke(ctx, StateStoreService_AccountSetup_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RegisterAccount(ctx context.Context, in *RegisterAccountRequest, opts ...grpc.CallOption) (*RegisterAccountResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RegisterAccountResponse) - err := c.cc.Invoke(ctx, StateStoreService_RegisterAccount_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) SignInAccount(ctx context.Context, in *SignInAccountRequest, opts ...grpc.CallOption) (*SignInAccountResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SignInAccountResponse) - err := c.cc.Invoke(ctx, StateStoreService_SignInAccount_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ResolveAccountSession(ctx context.Context, in *ResolveAccountSessionRequest, opts ...grpc.CallOption) (*ResolveAccountSessionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ResolveAccountSessionResponse) - err := c.cc.Invoke(ctx, StateStoreService_ResolveAccountSession_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) SignOutAccount(ctx context.Context, in *SignOutAccountRequest, opts ...grpc.CallOption) (*SignOutAccountResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SignOutAccountResponse) - err := c.cc.Invoke(ctx, StateStoreService_SignOutAccount_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ChangeAccountPassword(ctx context.Context, in *ChangeAccountPasswordRequest, opts ...grpc.CallOption) (*ChangeAccountPasswordResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ChangeAccountPasswordResponse) - err := c.cc.Invoke(ctx, StateStoreService_ChangeAccountPassword_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) GetIdentity(ctx context.Context, in *GetIdentityRequest, opts ...grpc.CallOption) (*GetIdentityResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetIdentityResponse) - err := c.cc.Invoke(ctx, StateStoreService_GetIdentity_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) CreateIdentity(ctx context.Context, in *CreateIdentityRequest, opts ...grpc.CallOption) (*CreateIdentityResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateIdentityResponse) - err := c.cc.Invoke(ctx, StateStoreService_CreateIdentity_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RenameIdentity(ctx context.Context, in *RenameIdentityRequest, opts ...grpc.CallOption) (*RenameIdentityResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RenameIdentityResponse) - err := c.cc.Invoke(ctx, StateStoreService_RenameIdentity_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) SuspendIdentity(ctx context.Context, in *SuspendIdentityRequest, opts ...grpc.CallOption) (*SuspendIdentityResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SuspendIdentityResponse) - err := c.cc.Invoke(ctx, StateStoreService_SuspendIdentity_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ReactivateIdentity(ctx context.Context, in *ReactivateIdentityRequest, opts ...grpc.CallOption) (*ReactivateIdentityResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ReactivateIdentityResponse) - err := c.cc.Invoke(ctx, StateStoreService_ReactivateIdentity_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RetireIdentity(ctx context.Context, in *RetireIdentityRequest, opts ...grpc.CallOption) (*RetireIdentityResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RetireIdentityResponse) - err := c.cc.Invoke(ctx, StateStoreService_RetireIdentity_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ResolveIdentitySubject(ctx context.Context, in *ResolveIdentitySubjectRequest, opts ...grpc.CallOption) (*ResolveIdentitySubjectResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ResolveIdentitySubjectResponse) - err := c.cc.Invoke(ctx, StateStoreService_ResolveIdentitySubject_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) BindIdentitySubject(ctx context.Context, in *BindIdentitySubjectRequest, opts ...grpc.CallOption) (*BindIdentitySubjectResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(BindIdentitySubjectResponse) - err := c.cc.Invoke(ctx, StateStoreService_BindIdentitySubject_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ClaimIdentitySubject(ctx context.Context, in *ClaimIdentitySubjectRequest, opts ...grpc.CallOption) (*ClaimIdentitySubjectResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ClaimIdentitySubjectResponse) - err := c.cc.Invoke(ctx, StateStoreService_ClaimIdentitySubject_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) AddPersonalToken(ctx context.Context, in *AddPersonalTokenRequest, opts ...grpc.CallOption) (*AddPersonalTokenResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(AddPersonalTokenResponse) - err := c.cc.Invoke(ctx, StateStoreService_AddPersonalToken_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListPersonalTokens(ctx context.Context, in *ListPersonalTokensRequest, opts ...grpc.CallOption) (*ListPersonalTokensResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListPersonalTokensResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListPersonalTokens_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RevokePersonalToken(ctx context.Context, in *RevokePersonalTokenRequest, opts ...grpc.CallOption) (*RevokePersonalTokenResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RevokePersonalTokenResponse) - err := c.cc.Invoke(ctx, StateStoreService_RevokePersonalToken_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) EnqueueIssue(ctx context.Context, in *EnqueueIssueRequest, opts ...grpc.CallOption) (*EnqueueIssueResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(EnqueueIssueResponse) - err := c.cc.Invoke(ctx, StateStoreService_EnqueueIssue_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) EnqueueChatTask(ctx context.Context, in *EnqueueChatTaskRequest, opts ...grpc.CallOption) (*EnqueueChatTaskResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(EnqueueChatTaskResponse) - err := c.cc.Invoke(ctx, StateStoreService_EnqueueChatTask_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ActiveTasksByOrigin(ctx context.Context, in *ActiveTasksByOriginRequest, opts ...grpc.CallOption) (*ActiveTasksByOriginResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ActiveTasksByOriginResponse) - err := c.cc.Invoke(ctx, StateStoreService_ActiveTasksByOrigin_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) UnpostedOutcomes(ctx context.Context, in *UnpostedOutcomesRequest, opts ...grpc.CallOption) (*UnpostedOutcomesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(UnpostedOutcomesResponse) - err := c.cc.Invoke(ctx, StateStoreService_UnpostedOutcomes_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) MarkOutcomePosted(ctx context.Context, in *MarkOutcomePostedRequest, opts ...grpc.CallOption) (*MarkOutcomePostedResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MarkOutcomePostedResponse) - err := c.cc.Invoke(ctx, StateStoreService_MarkOutcomePosted_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ClaimNext(ctx context.Context, in *ClaimNextRequest, opts ...grpc.CallOption) (*ClaimNextResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ClaimNextResponse) - err := c.cc.Invoke(ctx, StateStoreService_ClaimNext_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ClaimByIssue(ctx context.Context, in *ClaimByIssueRequest, opts ...grpc.CallOption) (*ClaimByIssueResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ClaimByIssueResponse) - err := c.cc.Invoke(ctx, StateStoreService_ClaimByIssue_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) Transition(ctx context.Context, in *TransitionRequest, opts ...grpc.CallOption) (*TransitionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(TransitionResponse) - err := c.cc.Invoke(ctx, StateStoreService_Transition_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(UpdateResponse) - err := c.cc.Invoke(ctx, StateStoreService_Update_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) StartStep(ctx context.Context, in *StartStepRequest, opts ...grpc.CallOption) (*StartStepResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StartStepResponse) - err := c.cc.Invoke(ctx, StateStoreService_StartStep_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RecordUsage(ctx context.Context, in *RecordUsageRequest, opts ...grpc.CallOption) (*RecordUsageResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RecordUsageResponse) - err := c.cc.Invoke(ctx, StateStoreService_RecordUsage_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) TaskModels(ctx context.Context, in *TaskModelsRequest, opts ...grpc.CallOption) (*TaskModelsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(TaskModelsResponse) - err := c.cc.Invoke(ctx, StateStoreService_TaskModels_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) TaskInstructions(ctx context.Context, in *TaskInstructionsRequest, opts ...grpc.CallOption) (*TaskInstructionsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(TaskInstructionsResponse) - err := c.cc.Invoke(ctx, StateStoreService_TaskInstructions_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) CallerModels(ctx context.Context, in *CallerModelsRequest, opts ...grpc.CallOption) (*CallerModelsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CallerModelsResponse) - err := c.cc.Invoke(ctx, StateStoreService_CallerModels_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) FinishStep(ctx context.Context, in *FinishStepRequest, opts ...grpc.CallOption) (*FinishStepResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(FinishStepResponse) - err := c.cc.Invoke(ctx, StateStoreService_FinishStep_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) CancelExecution(ctx context.Context, in *CancelExecutionRequest, opts ...grpc.CallOption) (*CancelExecutionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CancelExecutionResponse) - err := c.cc.Invoke(ctx, StateStoreService_CancelExecution_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListSteps(ctx context.Context, in *ListStepsRequest, opts ...grpc.CallOption) (*ListStepsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListStepsResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListSteps_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) GetHarnessSecret(ctx context.Context, in *GetHarnessSecretRequest, opts ...grpc.CallOption) (*GetHarnessSecretResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetHarnessSecretResponse) - err := c.cc.Invoke(ctx, StateStoreService_GetHarnessSecret_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) PutHarnessSecret(ctx context.Context, in *PutHarnessSecretRequest, opts ...grpc.CallOption) (*PutHarnessSecretResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(PutHarnessSecretResponse) - err := c.cc.Invoke(ctx, StateStoreService_PutHarnessSecret_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) Requeue(ctx context.Context, in *RequeueRequest, opts ...grpc.CallOption) (*RequeueResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RequeueResponse) - err := c.cc.Invoke(ctx, StateStoreService_Requeue_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ParkTask(ctx context.Context, in *ParkTaskRequest, opts ...grpc.CallOption) (*ParkTaskResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ParkTaskResponse) - err := c.cc.Invoke(ctx, StateStoreService_ParkTask_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RecoverStale(ctx context.Context, in *RecoverStaleRequest, opts ...grpc.CallOption) (*RecoverStaleResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RecoverStaleResponse) - err := c.cc.Invoke(ctx, StateStoreService_RecoverStale_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ArchiveTask(ctx context.Context, in *ArchiveTaskRequest, opts ...grpc.CallOption) (*ArchiveTaskResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ArchiveTaskResponse) - err := c.cc.Invoke(ctx, StateStoreService_ArchiveTask_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RetryTask(ctx context.Context, in *RetryTaskRequest, opts ...grpc.CallOption) (*RetryTaskResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RetryTaskResponse) - err := c.cc.Invoke(ctx, StateStoreService_RetryTask_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_RespondReviewGate_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_BeginRemediation_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_UpdateReviewPayload_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_SetReviewCursors_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) TaskByIssue(ctx context.Context, in *TaskByIssueRequest, opts ...grpc.CallOption) (*TaskByIssueResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(TaskByIssueResponse) - err := c.cc.Invoke(ctx, StateStoreService_TaskByIssue_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) OpenTaskByPR(ctx context.Context, in *OpenTaskByPRRequest, opts ...grpc.CallOption) (*OpenTaskByPRResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(OpenTaskByPRResponse) - err := c.cc.Invoke(ctx, StateStoreService_OpenTaskByPR_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) TaskByID(ctx context.Context, in *TaskByIDRequest, opts ...grpc.CallOption) (*TaskByIDResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(TaskByIDResponse) - err := c.cc.Invoke(ctx, StateStoreService_TaskByID_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) OpenPRs(ctx context.Context, in *OpenPRsRequest, opts ...grpc.CallOption) (*OpenPRsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(OpenPRsResponse) - err := c.cc.Invoke(ctx, StateStoreService_OpenPRs_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ClearTerminalTasks(ctx context.Context, in *ClearTerminalTasksRequest, opts ...grpc.CallOption) (*ClearTerminalTasksResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ClearTerminalTasksResponse) - err := c.cc.Invoke(ctx, StateStoreService_ClearTerminalTasks_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) Tasks(ctx context.Context, in *TasksRequest, opts ...grpc.CallOption) (*TasksResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(TasksResponse) - err := c.cc.Invoke(ctx, StateStoreService_Tasks_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) StatusCounts(ctx context.Context, in *StatusCountsRequest, opts ...grpc.CallOption) (*StatusCountsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StatusCountsResponse) - err := c.cc.Invoke(ctx, StateStoreService_StatusCounts_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) InsertEvent(ctx context.Context, in *InsertEventRequest, opts ...grpc.CallOption) (*InsertEventResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(InsertEventResponse) - err := c.cc.Invoke(ctx, StateStoreService_InsertEvent_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) EventsSince(ctx context.Context, in *EventsSinceRequest, opts ...grpc.CallOption) (*EventsSinceResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(EventsSinceResponse) - err := c.cc.Invoke(ctx, StateStoreService_EventsSince_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) TaskEvents(ctx context.Context, in *TaskEventsRequest, opts ...grpc.CallOption) (*TaskEventsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(TaskEventsResponse) - err := c.cc.Invoke(ctx, StateStoreService_TaskEvents_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) WorkflowStats(ctx context.Context, in *WorkflowStatsRequest, opts ...grpc.CallOption) (*WorkflowStatsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(WorkflowStatsResponse) - err := c.cc.Invoke(ctx, StateStoreService_WorkflowStats_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) StageStats(ctx context.Context, in *StageStatsRequest, opts ...grpc.CallOption) (*StageStatsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(StageStatsResponse) - err := c.cc.Invoke(ctx, StateStoreService_StageStats_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) TokensByDay(ctx context.Context, in *TokensByDayRequest, opts ...grpc.CallOption) (*TokensByDayResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(TokensByDayResponse) - err := c.cc.Invoke(ctx, StateStoreService_TokensByDay_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) PutConfigSnapshot(ctx context.Context, in *PutConfigSnapshotRequest, opts ...grpc.CallOption) (*PutConfigSnapshotResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(PutConfigSnapshotResponse) - err := c.cc.Invoke(ctx, StateStoreService_PutConfigSnapshot_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) GetConfigSnapshot(ctx context.Context, in *GetConfigSnapshotRequest, opts ...grpc.CallOption) (*GetConfigSnapshotResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetConfigSnapshotResponse) - err := c.cc.Invoke(ctx, StateStoreService_GetConfigSnapshot_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) PutChannelStatus(ctx context.Context, in *PutChannelStatusRequest, opts ...grpc.CallOption) (*PutChannelStatusResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(PutChannelStatusResponse) - err := c.cc.Invoke(ctx, StateStoreService_PutChannelStatus_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListChannelStatus(ctx context.Context, in *ListChannelStatusRequest, opts ...grpc.CallOption) (*ListChannelStatusResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListChannelStatusResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListChannelStatus_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) PutApplyStatus(ctx context.Context, in *PutApplyStatusRequest, opts ...grpc.CallOption) (*PutApplyStatusResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(PutApplyStatusResponse) - err := c.cc.Invoke(ctx, StateStoreService_PutApplyStatus_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListApplyStatus(ctx context.Context, in *ListApplyStatusRequest, opts ...grpc.CallOption) (*ListApplyStatusResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListApplyStatusResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListApplyStatus_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) PutPresence(ctx context.Context, in *PutPresenceRequest, opts ...grpc.CallOption) (*PutPresenceResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(PutPresenceResponse) - err := c.cc.Invoke(ctx, StateStoreService_PutPresence_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RecordCaptureRefusal(ctx context.Context, in *RecordCaptureRefusalRequest, opts ...grpc.CallOption) (*RecordCaptureRefusalResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RecordCaptureRefusalResponse) - err := c.cc.Invoke(ctx, StateStoreService_RecordCaptureRefusal_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListCaptureRefusals(ctx context.Context, in *ListCaptureRefusalsRequest, opts ...grpc.CallOption) (*ListCaptureRefusalsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListCaptureRefusalsResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListCaptureRefusals_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListPresence(ctx context.Context, in *ListPresenceRequest, opts ...grpc.CallOption) (*ListPresenceResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListPresenceResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListPresence_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ReadTaskLog(ctx context.Context, in *ReadTaskLogRequest, opts ...grpc.CallOption) (*ReadTaskLogResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ReadTaskLogResponse) - err := c.cc.Invoke(ctx, StateStoreService_ReadTaskLog_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) StreamTaskLogContent(ctx context.Context, in *StreamTaskLogContentRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamTaskLogContentResponse], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &StateStoreService_ServiceDesc.Streams[0], StateStoreService_StreamTaskLogContent_FullMethodName, cOpts...) - if err != nil { - return nil, err - } - x := &grpc.GenericClientStream[StreamTaskLogContentRequest, StreamTaskLogContentResponse]{ClientStream: stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type StateStoreService_StreamTaskLogContentClient = grpc.ServerStreamingClient[StreamTaskLogContentResponse] - -func (c *stateStoreServiceClient) InsertCapture(ctx context.Context, in *InsertCaptureRequest, opts ...grpc.CallOption) (*InsertCaptureResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(InsertCaptureResponse) - err := c.cc.Invoke(ctx, StateStoreService_InsertCapture_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) StreamCaptures(ctx context.Context, in *StreamCapturesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamCapturesResponse], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &StateStoreService_ServiceDesc.Streams[1], StateStoreService_StreamCaptures_FullMethodName, cOpts...) - if err != nil { - return nil, err - } - x := &grpc.GenericClientStream[StreamCapturesRequest, StreamCapturesResponse]{ClientStream: stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type StateStoreService_StreamCapturesClient = grpc.ServerStreamingClient[StreamCapturesResponse] - -func (c *stateStoreServiceClient) InsertMapping(ctx context.Context, in *InsertMappingRequest, opts ...grpc.CallOption) (*InsertMappingResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(InsertMappingResponse) - err := c.cc.Invoke(ctx, StateStoreService_InsertMapping_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) GetMapping(ctx context.Context, in *GetMappingRequest, opts ...grpc.CallOption) (*GetMappingResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetMappingResponse) - err := c.cc.Invoke(ctx, StateStoreService_GetMapping_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListMappings(ctx context.Context, in *ListMappingsRequest, opts ...grpc.CallOption) (*ListMappingsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListMappingsResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListMappings_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) UpdateMapping(ctx context.Context, in *UpdateMappingRequest, opts ...grpc.CallOption) (*UpdateMappingResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(UpdateMappingResponse) - err := c.cc.Invoke(ctx, StateStoreService_UpdateMapping_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) DeleteMapping(ctx context.Context, in *DeleteMappingRequest, opts ...grpc.CallOption) (*DeleteMappingResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(DeleteMappingResponse) - err := c.cc.Invoke(ctx, StateStoreService_DeleteMapping_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RecordMappingMatch(ctx context.Context, in *RecordMappingMatchRequest, opts ...grpc.CallOption) (*RecordMappingMatchResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RecordMappingMatchResponse) - err := c.cc.Invoke(ctx, StateStoreService_RecordMappingMatch_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) InsertEventType(ctx context.Context, in *InsertEventTypeRequest, opts ...grpc.CallOption) (*InsertEventTypeResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(InsertEventTypeResponse) - err := c.cc.Invoke(ctx, StateStoreService_InsertEventType_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) UpdateEventType(ctx context.Context, in *UpdateEventTypeRequest, opts ...grpc.CallOption) (*UpdateEventTypeResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(UpdateEventTypeResponse) - err := c.cc.Invoke(ctx, StateStoreService_UpdateEventType_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) DeleteEventType(ctx context.Context, in *DeleteEventTypeRequest, opts ...grpc.CallOption) (*DeleteEventTypeResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(DeleteEventTypeResponse) - err := c.cc.Invoke(ctx, StateStoreService_DeleteEventType_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListEventTypes(ctx context.Context, in *ListEventTypesRequest, opts ...grpc.CallOption) (*ListEventTypesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListEventTypesResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListEventTypes_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_InsertBinding_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_GetBinding_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_ListBindings_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListDispatches(ctx context.Context, in *ListDispatchesRequest, opts ...grpc.CallOption) (*ListDispatchesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListDispatchesResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListDispatches_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_UpdateBinding_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_DeleteBinding_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_ApproveBinding_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_PauseBinding_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_ResumeBinding_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_InsertSource_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_GetSource_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_ListSources_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_SetSourceSigning_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_SetSourceSecret_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_SetSourceName_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_SetSourceDeliveryHeader_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_DeleteSource_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) 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, StateStoreService_ArmedBindingsForSource_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RecordDispatch(ctx context.Context, in *RecordDispatchRequest, opts ...grpc.CallOption) (*RecordDispatchResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RecordDispatchResponse) - err := c.cc.Invoke(ctx, StateStoreService_RecordDispatch_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RecordPlaybookDispatch(ctx context.Context, in *RecordPlaybookDispatchRequest, opts ...grpc.CallOption) (*RecordPlaybookDispatchResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RecordPlaybookDispatchResponse) - err := c.cc.Invoke(ctx, StateStoreService_RecordPlaybookDispatch_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) DeletePlaybookDispatches(ctx context.Context, in *DeletePlaybookDispatchesRequest, opts ...grpc.CallOption) (*DeletePlaybookDispatchesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(DeletePlaybookDispatchesResponse) - err := c.cc.Invoke(ctx, StateStoreService_DeletePlaybookDispatches_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) StreamUndispatchedCaptures(ctx context.Context, in *StreamUndispatchedCapturesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamUndispatchedCapturesResponse], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &StateStoreService_ServiceDesc.Streams[2], StateStoreService_StreamUndispatchedCaptures_FullMethodName, cOpts...) - if err != nil { - return nil, err - } - x := &grpc.GenericClientStream[StreamUndispatchedCapturesRequest, StreamUndispatchedCapturesResponse]{ClientStream: stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type StateStoreService_StreamUndispatchedCapturesClient = grpc.ServerStreamingClient[StreamUndispatchedCapturesResponse] - -func (c *stateStoreServiceClient) EnqueueBindingTask(ctx context.Context, in *EnqueueBindingTaskRequest, opts ...grpc.CallOption) (*EnqueueBindingTaskResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(EnqueueBindingTaskResponse) - err := c.cc.Invoke(ctx, StateStoreService_EnqueueBindingTask_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) EnqueueCallTask(ctx context.Context, in *EnqueueCallTaskRequest, opts ...grpc.CallOption) (*EnqueueCallTaskResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(EnqueueCallTaskResponse) - err := c.cc.Invoke(ctx, StateStoreService_EnqueueCallTask_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) WorkflowCallStatus(ctx context.Context, in *WorkflowCallStatusRequest, opts ...grpc.CallOption) (*WorkflowCallStatusResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(WorkflowCallStatusResponse) - err := c.cc.Invoke(ctx, StateStoreService_WorkflowCallStatus_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) GetPrincipal(ctx context.Context, in *GetPrincipalRequest, opts ...grpc.CallOption) (*GetPrincipalResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetPrincipalResponse) - err := c.cc.Invoke(ctx, StateStoreService_GetPrincipal_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListPolicies(ctx context.Context, in *ListPoliciesRequest, opts ...grpc.CallOption) (*ListPoliciesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListPoliciesResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListPolicies_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) GetPoliciesVersion(ctx context.Context, in *GetPoliciesVersionRequest, opts ...grpc.CallOption) (*GetPoliciesVersionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetPoliciesVersionResponse) - err := c.cc.Invoke(ctx, StateStoreService_GetPoliciesVersion_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) PutPolicy(ctx context.Context, in *PutPolicyRequest, opts ...grpc.CallOption) (*PutPolicyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(PutPolicyResponse) - err := c.cc.Invoke(ctx, StateStoreService_PutPolicy_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) DeletePolicy(ctx context.Context, in *DeletePolicyRequest, opts ...grpc.CallOption) (*DeletePolicyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(DeletePolicyResponse) - err := c.cc.Invoke(ctx, StateStoreService_DeletePolicy_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) EnsureShippedOrgPolicies(ctx context.Context, in *EnsureShippedOrgPoliciesRequest, opts ...grpc.CallOption) (*EnsureShippedOrgPoliciesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(EnsureShippedOrgPoliciesResponse) - err := c.cc.Invoke(ctx, StateStoreService_EnsureShippedOrgPolicies_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RecordDenial(ctx context.Context, in *RecordDenialRequest, opts ...grpc.CallOption) (*RecordDenialResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RecordDenialResponse) - err := c.cc.Invoke(ctx, StateStoreService_RecordDenial_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListDenials(ctx context.Context, in *ListDenialsRequest, opts ...grpc.CallOption) (*ListDenialsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListDenialsResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListDenials_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListOrgs(ctx context.Context, in *ListOrgsRequest, opts ...grpc.CallOption) (*ListOrgsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListOrgsResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListOrgs_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) GetOrg(ctx context.Context, in *GetOrgRequest, opts ...grpc.CallOption) (*GetOrgResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetOrgResponse) - err := c.cc.Invoke(ctx, StateStoreService_GetOrg_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) CreateOrg(ctx context.Context, in *CreateOrgRequest, opts ...grpc.CallOption) (*CreateOrgResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateOrgResponse) - err := c.cc.Invoke(ctx, StateStoreService_CreateOrg_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListWorkspaces(ctx context.Context, in *ListWorkspacesRequest, opts ...grpc.CallOption) (*ListWorkspacesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListWorkspacesResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListWorkspaces_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) CreateWorkspace(ctx context.Context, in *CreateWorkspaceRequest, opts ...grpc.CallOption) (*CreateWorkspaceResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateWorkspaceResponse) - err := c.cc.Invoke(ctx, StateStoreService_CreateWorkspace_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListMembers(ctx context.Context, in *ListMembersRequest, opts ...grpc.CallOption) (*ListMembersResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListMembersResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListMembers_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) SetMembership(ctx context.Context, in *SetMembershipRequest, opts ...grpc.CallOption) (*SetMembershipResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetMembershipResponse) - err := c.cc.Invoke(ctx, StateStoreService_SetMembership_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RemoveMembership(ctx context.Context, in *RemoveMembershipRequest, opts ...grpc.CallOption) (*RemoveMembershipResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RemoveMembershipResponse) - err := c.cc.Invoke(ctx, StateStoreService_RemoveMembership_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListOrgAgents(ctx context.Context, in *ListOrgAgentsRequest, opts ...grpc.CallOption) (*ListOrgAgentsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListOrgAgentsResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListOrgAgents_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) AssignAgent(ctx context.Context, in *AssignAgentRequest, opts ...grpc.CallOption) (*AssignAgentResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(AssignAgentResponse) - err := c.cc.Invoke(ctx, StateStoreService_AssignAgent_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RaiseAlert(ctx context.Context, in *RaiseAlertRequest, opts ...grpc.CallOption) (*RaiseAlertResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RaiseAlertResponse) - err := c.cc.Invoke(ctx, StateStoreService_RaiseAlert_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ResolveAlert(ctx context.Context, in *ResolveAlertRequest, opts ...grpc.CallOption) (*ResolveAlertResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ResolveAlertResponse) - err := c.cc.Invoke(ctx, StateStoreService_ResolveAlert_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) DismissAlert(ctx context.Context, in *DismissAlertRequest, opts ...grpc.CallOption) (*DismissAlertResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(DismissAlertResponse) - err := c.cc.Invoke(ctx, StateStoreService_DismissAlert_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ListAlerts(ctx context.Context, in *ListAlertsRequest, opts ...grpc.CallOption) (*ListAlertsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListAlertsResponse) - err := c.cc.Invoke(ctx, StateStoreService_ListAlerts_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) ClaimAlertDeliveries(ctx context.Context, in *ClaimAlertDeliveriesRequest, opts ...grpc.CallOption) (*ClaimAlertDeliveriesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ClaimAlertDeliveriesResponse) - err := c.cc.Invoke(ctx, StateStoreService_ClaimAlertDeliveries_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stateStoreServiceClient) RecordAlertAttempt(ctx context.Context, in *RecordAlertAttemptRequest, opts ...grpc.CallOption) (*RecordAlertAttemptResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RecordAlertAttemptResponse) - err := c.cc.Invoke(ctx, StateStoreService_RecordAlertAttempt_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// StateStoreServiceServer is the server API for StateStoreService service. -// All implementations must embed UnimplementedStateStoreServiceServer -// for forward compatibility. -// -// StateStore is the single gRPC service fronting archie's PostgreSQL database. -// See docs/prds/state-store-contract.md for the ownership split: the -// workflow-domain Store view (Update/Transition/InsertEvent) is consumer-owned -// in internal/domain/workflow, while the rest of this surface is -// producer-owned in internal/domain/storecontract. Both are served by the same -// service over internal/infrastructure/postgres; the proto bypasses the Go -// interfacebloat cap (max 8), like gateway.v1.ChatService does. -type StateStoreServiceServer interface { - RecentLogs(context.Context, *RecentLogsRequest) (*RecentLogsResponse, error) - // Installed Archie packages. Administrative until org-scoped principals land. - InstallPackage(context.Context, *InstallPackageRequest) (*InstallPackageResponse, error) - // ListCatalogue returns the packages the instance's verified catalogue - // offers; InstallFromCatalogue installs one by name at the digest it lists. - ListCatalogue(context.Context, *ListCatalogueRequest) (*ListCatalogueResponse, error) - InstallFromCatalogue(context.Context, *InstallFromCatalogueRequest) (*InstallFromCatalogueResponse, error) - GetInstalledPackage(context.Context, *GetInstalledPackageRequest) (*GetInstalledPackageResponse, error) - ListInstalledPackages(context.Context, *ListInstalledPackagesRequest) (*ListInstalledPackagesResponse, error) - // AcceptPackageAuthority records the operator's accepted authority against - // the pinned digest (the approve action; install is the create action). - // Administrative until org-scoped principals land. - AcceptPackageAuthority(context.Context, *AcceptPackageAuthorityRequest) (*AcceptPackageAuthorityResponse, error) - RemoveInstalledPackage(context.Context, *RemoveInstalledPackageRequest) (*RemoveInstalledPackageResponse, error) - // UpdatePackage moves a package to the digest the verified catalogue lists: - // a non-widening update applies, a widening one waits as pending. - // ApprovePackageUpdate applies the pending update and accepts its authority; - // RollbackPackage restores the previous digest and its accepted authority. - UpdatePackage(context.Context, *UpdatePackageRequest) (*UpdatePackageResponse, error) - ApprovePackageUpdate(context.Context, *ApprovePackageUpdateRequest) (*ApprovePackageUpdateResponse, error) - RollbackPackage(context.Context, *RollbackPackageRequest) (*RollbackPackageResponse, error) - // SetPackageUpdatePolicy sets "manual" or "auto"; the State Store updates - // auto packages on a timer. - SetPackageUpdatePolicy(context.Context, *SetPackageUpdatePolicyRequest) (*SetPackageUpdatePolicyResponse, error) - // Administrative task credential lifecycle. Worker credentials cannot call these. - RegisterTaskGrant(context.Context, *RegisterTaskGrantRequest) (*RegisterTaskGrantResponse, error) - RevokeTaskGrant(context.Context, *RevokeTaskGrantRequest) (*RevokeTaskGrantResponse, error) - ResolveTaskGrant(context.Context, *ResolveTaskGrantRequest) (*ResolveTaskGrantResponse, error) - // Identity domain. Task-scoped grants cannot call these administrative RPCs. - ListIdentities(context.Context, *ListIdentitiesRequest) (*ListIdentitiesResponse, error) - GetAuthenticationSettings(context.Context, *GetAuthenticationSettingsRequest) (*GetAuthenticationSettingsResponse, error) - SaveAuthenticationSettings(context.Context, *SaveAuthenticationSettingsRequest) (*SaveAuthenticationSettingsResponse, error) - BeginPasskey(context.Context, *BeginPasskeyRequest) (*BeginPasskeyResponse, error) - FinishPasskey(context.Context, *FinishPasskeyRequest) (*FinishPasskeyResponse, error) - ListPasskeys(context.Context, *ListPasskeysRequest) (*ListPasskeysResponse, error) - DeletePasskey(context.Context, *DeletePasskeyRequest) (*DeletePasskeyResponse, error) - OpenAccountSession(context.Context, *OpenAccountSessionRequest) (*OpenAccountSessionResponse, error) - RequireFreshAccountSession(context.Context, *RequireFreshAccountSessionRequest) (*RequireFreshAccountSessionResponse, error) - CreateAccountRecovery(context.Context, *CreateAccountRecoveryRequest) (*CreateAccountRecoveryResponse, error) - RecoverAccount(context.Context, *RecoverAccountRequest) (*RecoverAccountResponse, error) - AccountSetup(context.Context, *AccountSetupRequest) (*AccountSetupResponse, error) - RegisterAccount(context.Context, *RegisterAccountRequest) (*RegisterAccountResponse, error) - SignInAccount(context.Context, *SignInAccountRequest) (*SignInAccountResponse, error) - ResolveAccountSession(context.Context, *ResolveAccountSessionRequest) (*ResolveAccountSessionResponse, error) - SignOutAccount(context.Context, *SignOutAccountRequest) (*SignOutAccountResponse, error) - ChangeAccountPassword(context.Context, *ChangeAccountPasswordRequest) (*ChangeAccountPasswordResponse, error) - GetIdentity(context.Context, *GetIdentityRequest) (*GetIdentityResponse, error) - CreateIdentity(context.Context, *CreateIdentityRequest) (*CreateIdentityResponse, error) - RenameIdentity(context.Context, *RenameIdentityRequest) (*RenameIdentityResponse, error) - SuspendIdentity(context.Context, *SuspendIdentityRequest) (*SuspendIdentityResponse, error) - ReactivateIdentity(context.Context, *ReactivateIdentityRequest) (*ReactivateIdentityResponse, error) - RetireIdentity(context.Context, *RetireIdentityRequest) (*RetireIdentityResponse, error) - // Subject bindings. A verified provider subject is resolved to the identity it - // is bound to; the authenticating process calls these rather than owning the - // identity store. - ResolveIdentitySubject(context.Context, *ResolveIdentitySubjectRequest) (*ResolveIdentitySubjectResponse, error) - BindIdentitySubject(context.Context, *BindIdentitySubjectRequest) (*BindIdentitySubjectResponse, error) - ClaimIdentitySubject(context.Context, *ClaimIdentitySubjectRequest) (*ClaimIdentitySubjectResponse, error) - // Personal API tokens act on the caller's own principal: the State Store - // refuses a call that carries none. - AddPersonalToken(context.Context, *AddPersonalTokenRequest) (*AddPersonalTokenResponse, error) - ListPersonalTokens(context.Context, *ListPersonalTokensRequest) (*ListPersonalTokensResponse, error) - RevokePersonalToken(context.Context, *RevokePersonalTokenRequest) (*RevokePersonalTokenResponse, error) - // Lifecycle - EnqueueIssue(context.Context, *EnqueueIssueRequest) (*EnqueueIssueResponse, error) - EnqueueChatTask(context.Context, *EnqueueChatTaskRequest) (*EnqueueChatTaskResponse, error) - ActiveTasksByOrigin(context.Context, *ActiveTasksByOriginRequest) (*ActiveTasksByOriginResponse, error) - // UnpostedOutcomes lists finished chat tasks whose outcome has not yet been - // posted to their conversation; MarkOutcomePosted records that it was. - UnpostedOutcomes(context.Context, *UnpostedOutcomesRequest) (*UnpostedOutcomesResponse, error) - MarkOutcomePosted(context.Context, *MarkOutcomePostedRequest) (*MarkOutcomePostedResponse, error) - ClaimNext(context.Context, *ClaimNextRequest) (*ClaimNextResponse, error) - ClaimByIssue(context.Context, *ClaimByIssueRequest) (*ClaimByIssueResponse, error) - Transition(context.Context, *TransitionRequest) (*TransitionResponse, error) - Update(context.Context, *UpdateRequest) (*UpdateResponse, error) - // Step executions (docs/prds/execution-tree-state-machine.md). The run - // credential authorises both on its own execution only. - StartStep(context.Context, *StartStepRequest) (*StartStepResponse, error) - // RecordUsage appends one model call's usage record. A run credential may - // record usage only for its own task. - RecordUsage(context.Context, *RecordUsageRequest) (*RecordUsageResponse, error) - // TaskModels answers what a task's models resolve against: the aliases its - // org may use and the org's own providers. The org is the task's, never - // the caller's. - TaskModels(context.Context, *TaskModelsRequest) (*TaskModelsResponse, error) - // TaskInstructions answers the instance and organisation instructions a - // task's agent runs follow. Organisation is empty for a system-org task. - TaskInstructions(context.Context, *TaskInstructionsRequest) (*TaskInstructionsResponse, error) - // CallerModels answers the model aliases the caller's org may use. The org - // is the calling principal's; a call with none is the system org's. - CallerModels(context.Context, *CallerModelsRequest) (*CallerModelsResponse, error) - FinishStep(context.Context, *FinishStepRequest) (*FinishStepResponse, error) - // Cancellation. Deliberately administrative (deny-by-default for a - // task-scoped grant): a cancel is a dashboard, API and dispatch action - // decided by the Authorizer, not a worker call. - CancelExecution(context.Context, *CancelExecutionRequest) (*CancelExecutionResponse, error) - // ListSteps is a dashboard/API/dispatch action (Authorizer: read on the - // run), not task-scoped-grant callable like StartStep/FinishStep. - ListSteps(context.Context, *ListStepsRequest) (*ListStepsResponse, error) - // Harness OAuth secrets (docs/prds/external-agent-harness.md, - // Credentials). Administrative: the setup terminal (an `update` action on - // the secret, Authorizer-gated) and the egress proxy's token-endpoint - // interception (acting as the daemon, not a worker) are the only callers. - GetHarnessSecret(context.Context, *GetHarnessSecretRequest) (*GetHarnessSecretResponse, error) - PutHarnessSecret(context.Context, *PutHarnessSecretRequest) (*PutHarnessSecretResponse, error) - Requeue(context.Context, *RequeueRequest) (*RequeueResponse, error) - ParkTask(context.Context, *ParkTaskRequest) (*ParkTaskResponse, error) - RecoverStale(context.Context, *RecoverStaleRequest) (*RecoverStaleResponse, error) - // Archive / Retry - ArchiveTask(context.Context, *ArchiveTaskRequest) (*ArchiveTaskResponse, error) - RetryTask(context.Context, *RetryTaskRequest) (*RetryTaskResponse, error) - // 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) - // Queries - TaskByIssue(context.Context, *TaskByIssueRequest) (*TaskByIssueResponse, error) - OpenTaskByPR(context.Context, *OpenTaskByPRRequest) (*OpenTaskByPRResponse, error) - TaskByID(context.Context, *TaskByIDRequest) (*TaskByIDResponse, error) - OpenPRs(context.Context, *OpenPRsRequest) (*OpenPRsResponse, error) - ClearTerminalTasks(context.Context, *ClearTerminalTasksRequest) (*ClearTerminalTasksResponse, error) - Tasks(context.Context, *TasksRequest) (*TasksResponse, error) - StatusCounts(context.Context, *StatusCountsRequest) (*StatusCountsResponse, error) - // Events - InsertEvent(context.Context, *InsertEventRequest) (*InsertEventResponse, error) - EventsSince(context.Context, *EventsSinceRequest) (*EventsSinceResponse, error) - TaskEvents(context.Context, *TaskEventsRequest) (*TaskEventsResponse, error) - WorkflowStats(context.Context, *WorkflowStatsRequest) (*WorkflowStatsResponse, error) - StageStats(context.Context, *StageStatsRequest) (*StageStatsResponse, error) - TokensByDay(context.Context, *TokensByDayRequest) (*TokensByDayResponse, error) - // Configuration snapshot: the running configuration as the dashboard - // renders it, published by the owner of configuration for the process that - // displays it. PutConfigSnapshot is administrative; GetConfigSnapshot is - // the UI's read (docs/architecture/migration-decisions.md, "Dashboard - // configuration page"). - PutConfigSnapshot(context.Context, *PutConfigSnapshotRequest) (*PutConfigSnapshotResponse, error) - GetConfigSnapshot(context.Context, *GetConfigSnapshotRequest) (*GetConfigSnapshotResponse, error) - // Channel status is what the process HOSTING the channels observes about them: - // one row per channel, written by the Messaging Service and read by the UI - // process. Administrative like the config snapshot, and for the same reason -- - // a task-scoped grant reaches neither, so authorizesTaskScopedCall admits only - // the administrative token. It is runtime state rather than a settings - // document, which is why it is not a ControlPlaneService resource kind. - PutChannelStatus(context.Context, *PutChannelStatusRequest) (*PutChannelStatusResponse, error) - ListChannelStatus(context.Context, *ListChannelStatusRequest) (*ListChannelStatusResponse, error) - // Apply status: which version of a control-plane resource each process is - // running, and why it could not. Every process that applies a resource - // publishes; the UI process reads (docs/prds/control-plane-apply-status.md). - // Both are administrative. - PutApplyStatus(context.Context, *PutApplyStatusRequest) (*PutApplyStatusResponse, error) - ListApplyStatus(context.Context, *ListApplyStatusRequest) (*ListApplyStatusResponse, error) - // Presence: every running service instance re-stamps one record, so a - // record past the staleness window means that instance is down. - // Administrative. - PutPresence(context.Context, *PutPresenceRequest) (*PutPresenceResponse, error) - // Capture refusals: events the network rules refused at the receiver, - // counted per source. Administrative. - RecordCaptureRefusal(context.Context, *RecordCaptureRefusalRequest) (*RecordCaptureRefusalResponse, error) - ListCaptureRefusals(context.Context, *ListCaptureRefusalsRequest) (*ListCaptureRefusalsResponse, error) - ListPresence(context.Context, *ListPresenceRequest) (*ListPresenceResponse, error) - // Task log: one task attempt's persisted log. Task log files live in the - // state directory this process owns, so the dashboard reads them over this - // contract rather than opening them itself - // (docs/prds/ui-service-boundary.md). - ReadTaskLog(context.Context, *ReadTaskLogRequest) (*ReadTaskLogResponse, error) - // StreamTaskLogContent returns one attempt's log verbatim, one chunk per - // message, for a download. A log file is unbounded input (it rotates at - // DefaultMaxSizeMB), so a unary response would exceed gRPC's 4MiB message - // cap on a real log -- the same reason ListCaptures was superseded by - // StreamCaptures. - StreamTaskLogContent(*StreamTaskLogContentRequest, grpc.ServerStreamingServer[StreamTaskLogContentResponse]) error - // Capture - InsertCapture(context.Context, *InsertCaptureRequest) (*InsertCaptureResponse, error) - // StreamCaptures returns one capture per message: a batch of large capture - // bodies can exceed gRPC's 4MiB unary message cap - // (docs/prds/state-store-contract.md). - StreamCaptures(*StreamCapturesRequest, grpc.ServerStreamingServer[StreamCapturesResponse]) error - // Mapping - InsertMapping(context.Context, *InsertMappingRequest) (*InsertMappingResponse, error) - GetMapping(context.Context, *GetMappingRequest) (*GetMappingResponse, error) - ListMappings(context.Context, *ListMappingsRequest) (*ListMappingsResponse, error) - UpdateMapping(context.Context, *UpdateMappingRequest) (*UpdateMappingResponse, error) - DeleteMapping(context.Context, *DeleteMappingRequest) (*DeleteMappingResponse, error) - // RecordMappingMatch counts one event a mapping resolved; the same - // (mapping, capture) twice counts once. - RecordMappingMatch(context.Context, *RecordMappingMatchRequest) (*RecordMappingMatchResponse, error) - // EventType (docs/prds/event-automation.md, "Event types"). Insert and - // Update refuse an overlapping or malformed type. - InsertEventType(context.Context, *InsertEventTypeRequest) (*InsertEventTypeResponse, error) - UpdateEventType(context.Context, *UpdateEventTypeRequest) (*UpdateEventTypeResponse, error) - DeleteEventType(context.Context, *DeleteEventTypeRequest) (*DeleteEventTypeResponse, error) - ListEventTypes(context.Context, *ListEventTypesRequest) (*ListEventTypesResponse, error) - // Binding - InsertBinding(context.Context, *InsertBindingRequest) (*InsertBindingResponse, error) - GetBinding(context.Context, *GetBindingRequest) (*GetBindingResponse, error) - ListBindings(context.Context, *ListBindingsRequest) (*ListBindingsResponse, error) - ListDispatches(context.Context, *ListDispatchesRequest) (*ListDispatchesResponse, 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) - // Source (event-automation.md "Sources"): the capture endpoint and its - // signing setting. Secrets travel in plaintext; the store encrypts at rest. - 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) - // Dispatch - ArmedBindingsForSource(context.Context, *ArmedBindingsForSourceRequest) (*ArmedBindingsForSourceResponse, error) - RecordDispatch(context.Context, *RecordDispatchRequest) (*RecordDispatchResponse, error) - // Playbook dispatch ledger (eda-playbook-engine.md gap 2): one durable - // at-most-once record per (playbook, version, event, action) for the - // side-effecting positions. Administrative, like RecordDispatch: a - // task-scoped grant cannot reach either (see TaskGrants). - RecordPlaybookDispatch(context.Context, *RecordPlaybookDispatchRequest) (*RecordPlaybookDispatchResponse, error) - DeletePlaybookDispatches(context.Context, *DeletePlaybookDispatchesRequest) (*DeletePlaybookDispatchesResponse, error) - StreamUndispatchedCaptures(*StreamUndispatchedCapturesRequest, grpc.ServerStreamingServer[StreamUndispatchedCapturesResponse]) error - // BindingTaskCreator: claims the binding's dispatch of a capture and - // enqueues its task in one transaction, so a failure leaves neither and a - // replayed delivery is refused with AlreadyExists. - EnqueueBindingTask(context.Context, *EnqueueBindingTaskRequest) (*EnqueueBindingTaskResponse, error) - // WorkflowCaller: a workflow.call step starts its callee and, with - // wait:true, reads it back while waiting. Both are the one sanctioned - // widening of a task-scoped grant -- the callee is the caller's child - // (docs/prds/workflow-calls.md). CallStatus re-checks the parent-child - // relation server-side, so the grant only names the caller. - EnqueueCallTask(context.Context, *EnqueueCallTaskRequest) (*EnqueueCallTaskResponse, error) - WorkflowCallStatus(context.Context, *WorkflowCallStatusRequest) (*WorkflowCallStatusResponse, error) - // Access: the stored policy chain and its denial records - // (docs/prds/orgs-and-access.md). ListPolicies is the engine's snapshot; - // the writes are administrative. RecordDenial is the dashboard's and - // dispatch's write path; ListDenials is the operator surface. - // The principal assembly the Authorizer evaluates: an identity, the org - // it serves, and its memberships (internal/domain/access). - GetPrincipal(context.Context, *GetPrincipalRequest) (*GetPrincipalResponse, error) - ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error) - // GetPoliciesVersion is the instance-wide policy version an authorizer reads - // before each decision to know whether the chain it holds is current. A - // caller must read it before ListPolicies, never after. - GetPoliciesVersion(context.Context, *GetPoliciesVersionRequest) (*GetPoliciesVersionResponse, error) - PutPolicy(context.Context, *PutPolicyRequest) (*PutPolicyResponse, error) - DeletePolicy(context.Context, *DeletePolicyRequest) (*DeletePolicyResponse, error) - EnsureShippedOrgPolicies(context.Context, *EnsureShippedOrgPoliciesRequest) (*EnsureShippedOrgPoliciesResponse, error) - RecordDenial(context.Context, *RecordDenialRequest) (*RecordDenialResponse, error) - ListDenials(context.Context, *ListDenialsRequest) (*ListDenialsResponse, error) - // Orgs, workspaces, memberships and agent assignments - // (docs/prds/orgs-and-access.md). Every request names an org, but the - // State Store acts in the org the caller's principal carries: a request - // org that is not the caller's is ignored, so the contract cannot reach - // another tenant. Instance-admin widening is a later change. - ListOrgs(context.Context, *ListOrgsRequest) (*ListOrgsResponse, error) - GetOrg(context.Context, *GetOrgRequest) (*GetOrgResponse, error) - CreateOrg(context.Context, *CreateOrgRequest) (*CreateOrgResponse, error) - ListWorkspaces(context.Context, *ListWorkspacesRequest) (*ListWorkspacesResponse, error) - CreateWorkspace(context.Context, *CreateWorkspaceRequest) (*CreateWorkspaceResponse, error) - ListMembers(context.Context, *ListMembersRequest) (*ListMembersResponse, error) - SetMembership(context.Context, *SetMembershipRequest) (*SetMembershipResponse, error) - RemoveMembership(context.Context, *RemoveMembershipRequest) (*RemoveMembershipResponse, error) - ListOrgAgents(context.Context, *ListOrgAgentsRequest) (*ListOrgAgentsResponse, error) - AssignAgent(context.Context, *AssignAgentRequest) (*AssignAgentResponse, error) - // Operator alerts (internal/domain/alert). A caller acting for a principal - // reads, dismisses and raises only in that principal's org; a request org is - // ignored for it. A service acting for no one names the org itself. - // RaiseAlert and ResolveAlert are idempotent, so a periodic check can call - // them every tick. ClaimAlertDeliveries and RecordAlertAttempt serve the - // outbound webhook and refuse a caller scoped to an org. - RaiseAlert(context.Context, *RaiseAlertRequest) (*RaiseAlertResponse, error) - ResolveAlert(context.Context, *ResolveAlertRequest) (*ResolveAlertResponse, error) - DismissAlert(context.Context, *DismissAlertRequest) (*DismissAlertResponse, error) - ListAlerts(context.Context, *ListAlertsRequest) (*ListAlertsResponse, error) - ClaimAlertDeliveries(context.Context, *ClaimAlertDeliveriesRequest) (*ClaimAlertDeliveriesResponse, error) - RecordAlertAttempt(context.Context, *RecordAlertAttemptRequest) (*RecordAlertAttemptResponse, error) - mustEmbedUnimplementedStateStoreServiceServer() -} - -// UnimplementedStateStoreServiceServer 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 UnimplementedStateStoreServiceServer struct{} - -func (UnimplementedStateStoreServiceServer) RecentLogs(context.Context, *RecentLogsRequest) (*RecentLogsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RecentLogs not implemented") -} -func (UnimplementedStateStoreServiceServer) InstallPackage(context.Context, *InstallPackageRequest) (*InstallPackageResponse, error) { - return nil, status.Error(codes.Unimplemented, "method InstallPackage not implemented") -} -func (UnimplementedStateStoreServiceServer) ListCatalogue(context.Context, *ListCatalogueRequest) (*ListCatalogueResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListCatalogue not implemented") -} -func (UnimplementedStateStoreServiceServer) InstallFromCatalogue(context.Context, *InstallFromCatalogueRequest) (*InstallFromCatalogueResponse, error) { - return nil, status.Error(codes.Unimplemented, "method InstallFromCatalogue not implemented") -} -func (UnimplementedStateStoreServiceServer) GetInstalledPackage(context.Context, *GetInstalledPackageRequest) (*GetInstalledPackageResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetInstalledPackage not implemented") -} -func (UnimplementedStateStoreServiceServer) ListInstalledPackages(context.Context, *ListInstalledPackagesRequest) (*ListInstalledPackagesResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListInstalledPackages not implemented") -} -func (UnimplementedStateStoreServiceServer) AcceptPackageAuthority(context.Context, *AcceptPackageAuthorityRequest) (*AcceptPackageAuthorityResponse, error) { - return nil, status.Error(codes.Unimplemented, "method AcceptPackageAuthority not implemented") -} -func (UnimplementedStateStoreServiceServer) RemoveInstalledPackage(context.Context, *RemoveInstalledPackageRequest) (*RemoveInstalledPackageResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RemoveInstalledPackage not implemented") -} -func (UnimplementedStateStoreServiceServer) UpdatePackage(context.Context, *UpdatePackageRequest) (*UpdatePackageResponse, error) { - return nil, status.Error(codes.Unimplemented, "method UpdatePackage not implemented") -} -func (UnimplementedStateStoreServiceServer) ApprovePackageUpdate(context.Context, *ApprovePackageUpdateRequest) (*ApprovePackageUpdateResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ApprovePackageUpdate not implemented") -} -func (UnimplementedStateStoreServiceServer) RollbackPackage(context.Context, *RollbackPackageRequest) (*RollbackPackageResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RollbackPackage not implemented") -} -func (UnimplementedStateStoreServiceServer) SetPackageUpdatePolicy(context.Context, *SetPackageUpdatePolicyRequest) (*SetPackageUpdatePolicyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetPackageUpdatePolicy not implemented") -} -func (UnimplementedStateStoreServiceServer) RegisterTaskGrant(context.Context, *RegisterTaskGrantRequest) (*RegisterTaskGrantResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RegisterTaskGrant not implemented") -} -func (UnimplementedStateStoreServiceServer) RevokeTaskGrant(context.Context, *RevokeTaskGrantRequest) (*RevokeTaskGrantResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RevokeTaskGrant not implemented") -} -func (UnimplementedStateStoreServiceServer) ResolveTaskGrant(context.Context, *ResolveTaskGrantRequest) (*ResolveTaskGrantResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ResolveTaskGrant not implemented") -} -func (UnimplementedStateStoreServiceServer) ListIdentities(context.Context, *ListIdentitiesRequest) (*ListIdentitiesResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListIdentities not implemented") -} -func (UnimplementedStateStoreServiceServer) GetAuthenticationSettings(context.Context, *GetAuthenticationSettingsRequest) (*GetAuthenticationSettingsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetAuthenticationSettings not implemented") -} -func (UnimplementedStateStoreServiceServer) SaveAuthenticationSettings(context.Context, *SaveAuthenticationSettingsRequest) (*SaveAuthenticationSettingsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SaveAuthenticationSettings not implemented") -} -func (UnimplementedStateStoreServiceServer) BeginPasskey(context.Context, *BeginPasskeyRequest) (*BeginPasskeyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method BeginPasskey not implemented") -} -func (UnimplementedStateStoreServiceServer) FinishPasskey(context.Context, *FinishPasskeyRequest) (*FinishPasskeyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method FinishPasskey not implemented") -} -func (UnimplementedStateStoreServiceServer) ListPasskeys(context.Context, *ListPasskeysRequest) (*ListPasskeysResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListPasskeys not implemented") -} -func (UnimplementedStateStoreServiceServer) DeletePasskey(context.Context, *DeletePasskeyRequest) (*DeletePasskeyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method DeletePasskey not implemented") -} -func (UnimplementedStateStoreServiceServer) OpenAccountSession(context.Context, *OpenAccountSessionRequest) (*OpenAccountSessionResponse, error) { - return nil, status.Error(codes.Unimplemented, "method OpenAccountSession not implemented") -} -func (UnimplementedStateStoreServiceServer) RequireFreshAccountSession(context.Context, *RequireFreshAccountSessionRequest) (*RequireFreshAccountSessionResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RequireFreshAccountSession not implemented") -} -func (UnimplementedStateStoreServiceServer) CreateAccountRecovery(context.Context, *CreateAccountRecoveryRequest) (*CreateAccountRecoveryResponse, error) { - return nil, status.Error(codes.Unimplemented, "method CreateAccountRecovery not implemented") -} -func (UnimplementedStateStoreServiceServer) RecoverAccount(context.Context, *RecoverAccountRequest) (*RecoverAccountResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RecoverAccount not implemented") -} -func (UnimplementedStateStoreServiceServer) AccountSetup(context.Context, *AccountSetupRequest) (*AccountSetupResponse, error) { - return nil, status.Error(codes.Unimplemented, "method AccountSetup not implemented") -} -func (UnimplementedStateStoreServiceServer) RegisterAccount(context.Context, *RegisterAccountRequest) (*RegisterAccountResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RegisterAccount not implemented") -} -func (UnimplementedStateStoreServiceServer) SignInAccount(context.Context, *SignInAccountRequest) (*SignInAccountResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SignInAccount not implemented") -} -func (UnimplementedStateStoreServiceServer) ResolveAccountSession(context.Context, *ResolveAccountSessionRequest) (*ResolveAccountSessionResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ResolveAccountSession not implemented") -} -func (UnimplementedStateStoreServiceServer) SignOutAccount(context.Context, *SignOutAccountRequest) (*SignOutAccountResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SignOutAccount not implemented") -} -func (UnimplementedStateStoreServiceServer) ChangeAccountPassword(context.Context, *ChangeAccountPasswordRequest) (*ChangeAccountPasswordResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ChangeAccountPassword not implemented") -} -func (UnimplementedStateStoreServiceServer) GetIdentity(context.Context, *GetIdentityRequest) (*GetIdentityResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetIdentity not implemented") -} -func (UnimplementedStateStoreServiceServer) CreateIdentity(context.Context, *CreateIdentityRequest) (*CreateIdentityResponse, error) { - return nil, status.Error(codes.Unimplemented, "method CreateIdentity not implemented") -} -func (UnimplementedStateStoreServiceServer) RenameIdentity(context.Context, *RenameIdentityRequest) (*RenameIdentityResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RenameIdentity not implemented") -} -func (UnimplementedStateStoreServiceServer) SuspendIdentity(context.Context, *SuspendIdentityRequest) (*SuspendIdentityResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SuspendIdentity not implemented") -} -func (UnimplementedStateStoreServiceServer) ReactivateIdentity(context.Context, *ReactivateIdentityRequest) (*ReactivateIdentityResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ReactivateIdentity not implemented") -} -func (UnimplementedStateStoreServiceServer) RetireIdentity(context.Context, *RetireIdentityRequest) (*RetireIdentityResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RetireIdentity not implemented") -} -func (UnimplementedStateStoreServiceServer) ResolveIdentitySubject(context.Context, *ResolveIdentitySubjectRequest) (*ResolveIdentitySubjectResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ResolveIdentitySubject not implemented") -} -func (UnimplementedStateStoreServiceServer) BindIdentitySubject(context.Context, *BindIdentitySubjectRequest) (*BindIdentitySubjectResponse, error) { - return nil, status.Error(codes.Unimplemented, "method BindIdentitySubject not implemented") -} -func (UnimplementedStateStoreServiceServer) ClaimIdentitySubject(context.Context, *ClaimIdentitySubjectRequest) (*ClaimIdentitySubjectResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ClaimIdentitySubject not implemented") -} -func (UnimplementedStateStoreServiceServer) AddPersonalToken(context.Context, *AddPersonalTokenRequest) (*AddPersonalTokenResponse, error) { - return nil, status.Error(codes.Unimplemented, "method AddPersonalToken not implemented") -} -func (UnimplementedStateStoreServiceServer) ListPersonalTokens(context.Context, *ListPersonalTokensRequest) (*ListPersonalTokensResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListPersonalTokens not implemented") -} -func (UnimplementedStateStoreServiceServer) RevokePersonalToken(context.Context, *RevokePersonalTokenRequest) (*RevokePersonalTokenResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RevokePersonalToken not implemented") -} -func (UnimplementedStateStoreServiceServer) EnqueueIssue(context.Context, *EnqueueIssueRequest) (*EnqueueIssueResponse, error) { - return nil, status.Error(codes.Unimplemented, "method EnqueueIssue not implemented") -} -func (UnimplementedStateStoreServiceServer) EnqueueChatTask(context.Context, *EnqueueChatTaskRequest) (*EnqueueChatTaskResponse, error) { - return nil, status.Error(codes.Unimplemented, "method EnqueueChatTask not implemented") -} -func (UnimplementedStateStoreServiceServer) ActiveTasksByOrigin(context.Context, *ActiveTasksByOriginRequest) (*ActiveTasksByOriginResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ActiveTasksByOrigin not implemented") -} -func (UnimplementedStateStoreServiceServer) UnpostedOutcomes(context.Context, *UnpostedOutcomesRequest) (*UnpostedOutcomesResponse, error) { - return nil, status.Error(codes.Unimplemented, "method UnpostedOutcomes not implemented") -} -func (UnimplementedStateStoreServiceServer) MarkOutcomePosted(context.Context, *MarkOutcomePostedRequest) (*MarkOutcomePostedResponse, error) { - return nil, status.Error(codes.Unimplemented, "method MarkOutcomePosted not implemented") -} -func (UnimplementedStateStoreServiceServer) ClaimNext(context.Context, *ClaimNextRequest) (*ClaimNextResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ClaimNext not implemented") -} -func (UnimplementedStateStoreServiceServer) ClaimByIssue(context.Context, *ClaimByIssueRequest) (*ClaimByIssueResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ClaimByIssue not implemented") -} -func (UnimplementedStateStoreServiceServer) Transition(context.Context, *TransitionRequest) (*TransitionResponse, error) { - return nil, status.Error(codes.Unimplemented, "method Transition not implemented") -} -func (UnimplementedStateStoreServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) { - return nil, status.Error(codes.Unimplemented, "method Update not implemented") -} -func (UnimplementedStateStoreServiceServer) StartStep(context.Context, *StartStepRequest) (*StartStepResponse, error) { - return nil, status.Error(codes.Unimplemented, "method StartStep not implemented") -} -func (UnimplementedStateStoreServiceServer) RecordUsage(context.Context, *RecordUsageRequest) (*RecordUsageResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RecordUsage not implemented") -} -func (UnimplementedStateStoreServiceServer) TaskModels(context.Context, *TaskModelsRequest) (*TaskModelsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method TaskModels not implemented") -} -func (UnimplementedStateStoreServiceServer) TaskInstructions(context.Context, *TaskInstructionsRequest) (*TaskInstructionsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method TaskInstructions not implemented") -} -func (UnimplementedStateStoreServiceServer) CallerModels(context.Context, *CallerModelsRequest) (*CallerModelsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method CallerModels not implemented") -} -func (UnimplementedStateStoreServiceServer) FinishStep(context.Context, *FinishStepRequest) (*FinishStepResponse, error) { - return nil, status.Error(codes.Unimplemented, "method FinishStep not implemented") -} -func (UnimplementedStateStoreServiceServer) CancelExecution(context.Context, *CancelExecutionRequest) (*CancelExecutionResponse, error) { - return nil, status.Error(codes.Unimplemented, "method CancelExecution not implemented") -} -func (UnimplementedStateStoreServiceServer) ListSteps(context.Context, *ListStepsRequest) (*ListStepsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListSteps not implemented") -} -func (UnimplementedStateStoreServiceServer) GetHarnessSecret(context.Context, *GetHarnessSecretRequest) (*GetHarnessSecretResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetHarnessSecret not implemented") -} -func (UnimplementedStateStoreServiceServer) PutHarnessSecret(context.Context, *PutHarnessSecretRequest) (*PutHarnessSecretResponse, error) { - return nil, status.Error(codes.Unimplemented, "method PutHarnessSecret not implemented") -} -func (UnimplementedStateStoreServiceServer) Requeue(context.Context, *RequeueRequest) (*RequeueResponse, error) { - return nil, status.Error(codes.Unimplemented, "method Requeue not implemented") -} -func (UnimplementedStateStoreServiceServer) ParkTask(context.Context, *ParkTaskRequest) (*ParkTaskResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ParkTask not implemented") -} -func (UnimplementedStateStoreServiceServer) RecoverStale(context.Context, *RecoverStaleRequest) (*RecoverStaleResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RecoverStale not implemented") -} -func (UnimplementedStateStoreServiceServer) ArchiveTask(context.Context, *ArchiveTaskRequest) (*ArchiveTaskResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ArchiveTask not implemented") -} -func (UnimplementedStateStoreServiceServer) RetryTask(context.Context, *RetryTaskRequest) (*RetryTaskResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RetryTask not implemented") -} -func (UnimplementedStateStoreServiceServer) RespondReviewGate(context.Context, *RespondReviewGateRequest) (*RespondReviewGateResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RespondReviewGate not implemented") -} -func (UnimplementedStateStoreServiceServer) BeginRemediation(context.Context, *BeginRemediationRequest) (*BeginRemediationResponse, error) { - return nil, status.Error(codes.Unimplemented, "method BeginRemediation not implemented") -} -func (UnimplementedStateStoreServiceServer) UpdateReviewPayload(context.Context, *UpdateReviewPayloadRequest) (*UpdateReviewPayloadResponse, error) { - return nil, status.Error(codes.Unimplemented, "method UpdateReviewPayload not implemented") -} -func (UnimplementedStateStoreServiceServer) SetReviewCursors(context.Context, *SetReviewCursorsRequest) (*SetReviewCursorsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetReviewCursors not implemented") -} -func (UnimplementedStateStoreServiceServer) TaskByIssue(context.Context, *TaskByIssueRequest) (*TaskByIssueResponse, error) { - return nil, status.Error(codes.Unimplemented, "method TaskByIssue not implemented") -} -func (UnimplementedStateStoreServiceServer) OpenTaskByPR(context.Context, *OpenTaskByPRRequest) (*OpenTaskByPRResponse, error) { - return nil, status.Error(codes.Unimplemented, "method OpenTaskByPR not implemented") -} -func (UnimplementedStateStoreServiceServer) TaskByID(context.Context, *TaskByIDRequest) (*TaskByIDResponse, error) { - return nil, status.Error(codes.Unimplemented, "method TaskByID not implemented") -} -func (UnimplementedStateStoreServiceServer) OpenPRs(context.Context, *OpenPRsRequest) (*OpenPRsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method OpenPRs not implemented") -} -func (UnimplementedStateStoreServiceServer) ClearTerminalTasks(context.Context, *ClearTerminalTasksRequest) (*ClearTerminalTasksResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ClearTerminalTasks not implemented") -} -func (UnimplementedStateStoreServiceServer) Tasks(context.Context, *TasksRequest) (*TasksResponse, error) { - return nil, status.Error(codes.Unimplemented, "method Tasks not implemented") -} -func (UnimplementedStateStoreServiceServer) StatusCounts(context.Context, *StatusCountsRequest) (*StatusCountsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method StatusCounts not implemented") -} -func (UnimplementedStateStoreServiceServer) InsertEvent(context.Context, *InsertEventRequest) (*InsertEventResponse, error) { - return nil, status.Error(codes.Unimplemented, "method InsertEvent not implemented") -} -func (UnimplementedStateStoreServiceServer) EventsSince(context.Context, *EventsSinceRequest) (*EventsSinceResponse, error) { - return nil, status.Error(codes.Unimplemented, "method EventsSince not implemented") -} -func (UnimplementedStateStoreServiceServer) TaskEvents(context.Context, *TaskEventsRequest) (*TaskEventsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method TaskEvents not implemented") -} -func (UnimplementedStateStoreServiceServer) WorkflowStats(context.Context, *WorkflowStatsRequest) (*WorkflowStatsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method WorkflowStats not implemented") -} -func (UnimplementedStateStoreServiceServer) StageStats(context.Context, *StageStatsRequest) (*StageStatsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method StageStats not implemented") -} -func (UnimplementedStateStoreServiceServer) TokensByDay(context.Context, *TokensByDayRequest) (*TokensByDayResponse, error) { - return nil, status.Error(codes.Unimplemented, "method TokensByDay not implemented") -} -func (UnimplementedStateStoreServiceServer) PutConfigSnapshot(context.Context, *PutConfigSnapshotRequest) (*PutConfigSnapshotResponse, error) { - return nil, status.Error(codes.Unimplemented, "method PutConfigSnapshot not implemented") -} -func (UnimplementedStateStoreServiceServer) GetConfigSnapshot(context.Context, *GetConfigSnapshotRequest) (*GetConfigSnapshotResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetConfigSnapshot not implemented") -} -func (UnimplementedStateStoreServiceServer) PutChannelStatus(context.Context, *PutChannelStatusRequest) (*PutChannelStatusResponse, error) { - return nil, status.Error(codes.Unimplemented, "method PutChannelStatus not implemented") -} -func (UnimplementedStateStoreServiceServer) ListChannelStatus(context.Context, *ListChannelStatusRequest) (*ListChannelStatusResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListChannelStatus not implemented") -} -func (UnimplementedStateStoreServiceServer) PutApplyStatus(context.Context, *PutApplyStatusRequest) (*PutApplyStatusResponse, error) { - return nil, status.Error(codes.Unimplemented, "method PutApplyStatus not implemented") -} -func (UnimplementedStateStoreServiceServer) ListApplyStatus(context.Context, *ListApplyStatusRequest) (*ListApplyStatusResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListApplyStatus not implemented") -} -func (UnimplementedStateStoreServiceServer) PutPresence(context.Context, *PutPresenceRequest) (*PutPresenceResponse, error) { - return nil, status.Error(codes.Unimplemented, "method PutPresence not implemented") -} -func (UnimplementedStateStoreServiceServer) RecordCaptureRefusal(context.Context, *RecordCaptureRefusalRequest) (*RecordCaptureRefusalResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RecordCaptureRefusal not implemented") -} -func (UnimplementedStateStoreServiceServer) ListCaptureRefusals(context.Context, *ListCaptureRefusalsRequest) (*ListCaptureRefusalsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListCaptureRefusals not implemented") -} -func (UnimplementedStateStoreServiceServer) ListPresence(context.Context, *ListPresenceRequest) (*ListPresenceResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListPresence not implemented") -} -func (UnimplementedStateStoreServiceServer) ReadTaskLog(context.Context, *ReadTaskLogRequest) (*ReadTaskLogResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ReadTaskLog not implemented") -} -func (UnimplementedStateStoreServiceServer) StreamTaskLogContent(*StreamTaskLogContentRequest, grpc.ServerStreamingServer[StreamTaskLogContentResponse]) error { - return status.Error(codes.Unimplemented, "method StreamTaskLogContent not implemented") -} -func (UnimplementedStateStoreServiceServer) InsertCapture(context.Context, *InsertCaptureRequest) (*InsertCaptureResponse, error) { - return nil, status.Error(codes.Unimplemented, "method InsertCapture not implemented") -} -func (UnimplementedStateStoreServiceServer) StreamCaptures(*StreamCapturesRequest, grpc.ServerStreamingServer[StreamCapturesResponse]) error { - return status.Error(codes.Unimplemented, "method StreamCaptures not implemented") -} -func (UnimplementedStateStoreServiceServer) InsertMapping(context.Context, *InsertMappingRequest) (*InsertMappingResponse, error) { - return nil, status.Error(codes.Unimplemented, "method InsertMapping not implemented") -} -func (UnimplementedStateStoreServiceServer) GetMapping(context.Context, *GetMappingRequest) (*GetMappingResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetMapping not implemented") -} -func (UnimplementedStateStoreServiceServer) ListMappings(context.Context, *ListMappingsRequest) (*ListMappingsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListMappings not implemented") -} -func (UnimplementedStateStoreServiceServer) UpdateMapping(context.Context, *UpdateMappingRequest) (*UpdateMappingResponse, error) { - return nil, status.Error(codes.Unimplemented, "method UpdateMapping not implemented") -} -func (UnimplementedStateStoreServiceServer) DeleteMapping(context.Context, *DeleteMappingRequest) (*DeleteMappingResponse, error) { - return nil, status.Error(codes.Unimplemented, "method DeleteMapping not implemented") -} -func (UnimplementedStateStoreServiceServer) RecordMappingMatch(context.Context, *RecordMappingMatchRequest) (*RecordMappingMatchResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RecordMappingMatch not implemented") -} -func (UnimplementedStateStoreServiceServer) InsertEventType(context.Context, *InsertEventTypeRequest) (*InsertEventTypeResponse, error) { - return nil, status.Error(codes.Unimplemented, "method InsertEventType not implemented") -} -func (UnimplementedStateStoreServiceServer) UpdateEventType(context.Context, *UpdateEventTypeRequest) (*UpdateEventTypeResponse, error) { - return nil, status.Error(codes.Unimplemented, "method UpdateEventType not implemented") -} -func (UnimplementedStateStoreServiceServer) DeleteEventType(context.Context, *DeleteEventTypeRequest) (*DeleteEventTypeResponse, error) { - return nil, status.Error(codes.Unimplemented, "method DeleteEventType not implemented") -} -func (UnimplementedStateStoreServiceServer) ListEventTypes(context.Context, *ListEventTypesRequest) (*ListEventTypesResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListEventTypes not implemented") -} -func (UnimplementedStateStoreServiceServer) InsertBinding(context.Context, *InsertBindingRequest) (*InsertBindingResponse, error) { - return nil, status.Error(codes.Unimplemented, "method InsertBinding not implemented") -} -func (UnimplementedStateStoreServiceServer) GetBinding(context.Context, *GetBindingRequest) (*GetBindingResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetBinding not implemented") -} -func (UnimplementedStateStoreServiceServer) ListBindings(context.Context, *ListBindingsRequest) (*ListBindingsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListBindings not implemented") -} -func (UnimplementedStateStoreServiceServer) ListDispatches(context.Context, *ListDispatchesRequest) (*ListDispatchesResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListDispatches not implemented") -} -func (UnimplementedStateStoreServiceServer) UpdateBinding(context.Context, *UpdateBindingRequest) (*UpdateBindingResponse, error) { - return nil, status.Error(codes.Unimplemented, "method UpdateBinding not implemented") -} -func (UnimplementedStateStoreServiceServer) DeleteBinding(context.Context, *DeleteBindingRequest) (*DeleteBindingResponse, error) { - return nil, status.Error(codes.Unimplemented, "method DeleteBinding not implemented") -} -func (UnimplementedStateStoreServiceServer) ApproveBinding(context.Context, *ApproveBindingRequest) (*ApproveBindingResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ApproveBinding not implemented") -} -func (UnimplementedStateStoreServiceServer) PauseBinding(context.Context, *PauseBindingRequest) (*PauseBindingResponse, error) { - return nil, status.Error(codes.Unimplemented, "method PauseBinding not implemented") -} -func (UnimplementedStateStoreServiceServer) ResumeBinding(context.Context, *ResumeBindingRequest) (*ResumeBindingResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ResumeBinding not implemented") -} -func (UnimplementedStateStoreServiceServer) InsertSource(context.Context, *InsertSourceRequest) (*InsertSourceResponse, error) { - return nil, status.Error(codes.Unimplemented, "method InsertSource not implemented") -} -func (UnimplementedStateStoreServiceServer) GetSource(context.Context, *GetSourceRequest) (*GetSourceResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetSource not implemented") -} -func (UnimplementedStateStoreServiceServer) ListSources(context.Context, *ListSourcesRequest) (*ListSourcesResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListSources not implemented") -} -func (UnimplementedStateStoreServiceServer) SetSourceSigning(context.Context, *SetSourceSigningRequest) (*SetSourceSigningResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetSourceSigning not implemented") -} -func (UnimplementedStateStoreServiceServer) SetSourceSecret(context.Context, *SetSourceSecretRequest) (*SetSourceSecretResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetSourceSecret not implemented") -} -func (UnimplementedStateStoreServiceServer) SetSourceName(context.Context, *SetSourceNameRequest) (*SetSourceNameResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetSourceName not implemented") -} -func (UnimplementedStateStoreServiceServer) SetSourceDeliveryHeader(context.Context, *SetSourceDeliveryHeaderRequest) (*SetSourceDeliveryHeaderResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetSourceDeliveryHeader not implemented") -} -func (UnimplementedStateStoreServiceServer) DeleteSource(context.Context, *DeleteSourceRequest) (*DeleteSourceResponse, error) { - return nil, status.Error(codes.Unimplemented, "method DeleteSource not implemented") -} -func (UnimplementedStateStoreServiceServer) ArmedBindingsForSource(context.Context, *ArmedBindingsForSourceRequest) (*ArmedBindingsForSourceResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ArmedBindingsForSource not implemented") -} -func (UnimplementedStateStoreServiceServer) RecordDispatch(context.Context, *RecordDispatchRequest) (*RecordDispatchResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RecordDispatch not implemented") -} -func (UnimplementedStateStoreServiceServer) RecordPlaybookDispatch(context.Context, *RecordPlaybookDispatchRequest) (*RecordPlaybookDispatchResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RecordPlaybookDispatch not implemented") -} -func (UnimplementedStateStoreServiceServer) DeletePlaybookDispatches(context.Context, *DeletePlaybookDispatchesRequest) (*DeletePlaybookDispatchesResponse, error) { - return nil, status.Error(codes.Unimplemented, "method DeletePlaybookDispatches not implemented") -} -func (UnimplementedStateStoreServiceServer) StreamUndispatchedCaptures(*StreamUndispatchedCapturesRequest, grpc.ServerStreamingServer[StreamUndispatchedCapturesResponse]) error { - return status.Error(codes.Unimplemented, "method StreamUndispatchedCaptures not implemented") -} -func (UnimplementedStateStoreServiceServer) EnqueueBindingTask(context.Context, *EnqueueBindingTaskRequest) (*EnqueueBindingTaskResponse, error) { - return nil, status.Error(codes.Unimplemented, "method EnqueueBindingTask not implemented") -} -func (UnimplementedStateStoreServiceServer) EnqueueCallTask(context.Context, *EnqueueCallTaskRequest) (*EnqueueCallTaskResponse, error) { - return nil, status.Error(codes.Unimplemented, "method EnqueueCallTask not implemented") -} -func (UnimplementedStateStoreServiceServer) WorkflowCallStatus(context.Context, *WorkflowCallStatusRequest) (*WorkflowCallStatusResponse, error) { - return nil, status.Error(codes.Unimplemented, "method WorkflowCallStatus not implemented") -} -func (UnimplementedStateStoreServiceServer) GetPrincipal(context.Context, *GetPrincipalRequest) (*GetPrincipalResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetPrincipal not implemented") -} -func (UnimplementedStateStoreServiceServer) ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListPolicies not implemented") -} -func (UnimplementedStateStoreServiceServer) GetPoliciesVersion(context.Context, *GetPoliciesVersionRequest) (*GetPoliciesVersionResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetPoliciesVersion not implemented") -} -func (UnimplementedStateStoreServiceServer) PutPolicy(context.Context, *PutPolicyRequest) (*PutPolicyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method PutPolicy not implemented") -} -func (UnimplementedStateStoreServiceServer) DeletePolicy(context.Context, *DeletePolicyRequest) (*DeletePolicyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method DeletePolicy not implemented") -} -func (UnimplementedStateStoreServiceServer) EnsureShippedOrgPolicies(context.Context, *EnsureShippedOrgPoliciesRequest) (*EnsureShippedOrgPoliciesResponse, error) { - return nil, status.Error(codes.Unimplemented, "method EnsureShippedOrgPolicies not implemented") -} -func (UnimplementedStateStoreServiceServer) RecordDenial(context.Context, *RecordDenialRequest) (*RecordDenialResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RecordDenial not implemented") -} -func (UnimplementedStateStoreServiceServer) ListDenials(context.Context, *ListDenialsRequest) (*ListDenialsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListDenials not implemented") -} -func (UnimplementedStateStoreServiceServer) ListOrgs(context.Context, *ListOrgsRequest) (*ListOrgsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListOrgs not implemented") -} -func (UnimplementedStateStoreServiceServer) GetOrg(context.Context, *GetOrgRequest) (*GetOrgResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetOrg not implemented") -} -func (UnimplementedStateStoreServiceServer) CreateOrg(context.Context, *CreateOrgRequest) (*CreateOrgResponse, error) { - return nil, status.Error(codes.Unimplemented, "method CreateOrg not implemented") -} -func (UnimplementedStateStoreServiceServer) ListWorkspaces(context.Context, *ListWorkspacesRequest) (*ListWorkspacesResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListWorkspaces not implemented") -} -func (UnimplementedStateStoreServiceServer) CreateWorkspace(context.Context, *CreateWorkspaceRequest) (*CreateWorkspaceResponse, error) { - return nil, status.Error(codes.Unimplemented, "method CreateWorkspace not implemented") -} -func (UnimplementedStateStoreServiceServer) ListMembers(context.Context, *ListMembersRequest) (*ListMembersResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListMembers not implemented") -} -func (UnimplementedStateStoreServiceServer) SetMembership(context.Context, *SetMembershipRequest) (*SetMembershipResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetMembership not implemented") -} -func (UnimplementedStateStoreServiceServer) RemoveMembership(context.Context, *RemoveMembershipRequest) (*RemoveMembershipResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RemoveMembership not implemented") -} -func (UnimplementedStateStoreServiceServer) ListOrgAgents(context.Context, *ListOrgAgentsRequest) (*ListOrgAgentsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListOrgAgents not implemented") -} -func (UnimplementedStateStoreServiceServer) AssignAgent(context.Context, *AssignAgentRequest) (*AssignAgentResponse, error) { - return nil, status.Error(codes.Unimplemented, "method AssignAgent not implemented") -} -func (UnimplementedStateStoreServiceServer) RaiseAlert(context.Context, *RaiseAlertRequest) (*RaiseAlertResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RaiseAlert not implemented") -} -func (UnimplementedStateStoreServiceServer) ResolveAlert(context.Context, *ResolveAlertRequest) (*ResolveAlertResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ResolveAlert not implemented") -} -func (UnimplementedStateStoreServiceServer) DismissAlert(context.Context, *DismissAlertRequest) (*DismissAlertResponse, error) { - return nil, status.Error(codes.Unimplemented, "method DismissAlert not implemented") -} -func (UnimplementedStateStoreServiceServer) ListAlerts(context.Context, *ListAlertsRequest) (*ListAlertsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListAlerts not implemented") -} -func (UnimplementedStateStoreServiceServer) ClaimAlertDeliveries(context.Context, *ClaimAlertDeliveriesRequest) (*ClaimAlertDeliveriesResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ClaimAlertDeliveries not implemented") -} -func (UnimplementedStateStoreServiceServer) RecordAlertAttempt(context.Context, *RecordAlertAttemptRequest) (*RecordAlertAttemptResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RecordAlertAttempt not implemented") -} -func (UnimplementedStateStoreServiceServer) mustEmbedUnimplementedStateStoreServiceServer() {} -func (UnimplementedStateStoreServiceServer) testEmbeddedByValue() {} - -// UnsafeStateStoreServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to StateStoreServiceServer will -// result in compilation errors. -type UnsafeStateStoreServiceServer interface { - mustEmbedUnimplementedStateStoreServiceServer() -} - -func RegisterStateStoreServiceServer(s grpc.ServiceRegistrar, srv StateStoreServiceServer) { - // If the following call panics, it indicates UnimplementedStateStoreServiceServer 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(&StateStoreService_ServiceDesc, srv) -} - -func _StateStoreService_RecentLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RecentLogsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RecentLogs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RecentLogs_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RecentLogs(ctx, req.(*RecentLogsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_InstallPackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InstallPackageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).InstallPackage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_InstallPackage_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).InstallPackage(ctx, req.(*InstallPackageRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListCatalogue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListCatalogueRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListCatalogue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListCatalogue_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListCatalogue(ctx, req.(*ListCatalogueRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_InstallFromCatalogue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InstallFromCatalogueRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).InstallFromCatalogue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_InstallFromCatalogue_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).InstallFromCatalogue(ctx, req.(*InstallFromCatalogueRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_GetInstalledPackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetInstalledPackageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).GetInstalledPackage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_GetInstalledPackage_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).GetInstalledPackage(ctx, req.(*GetInstalledPackageRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListInstalledPackages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListInstalledPackagesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListInstalledPackages(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListInstalledPackages_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListInstalledPackages(ctx, req.(*ListInstalledPackagesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_AcceptPackageAuthority_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AcceptPackageAuthorityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).AcceptPackageAuthority(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_AcceptPackageAuthority_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).AcceptPackageAuthority(ctx, req.(*AcceptPackageAuthorityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RemoveInstalledPackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveInstalledPackageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RemoveInstalledPackage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RemoveInstalledPackage_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RemoveInstalledPackage(ctx, req.(*RemoveInstalledPackageRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_UpdatePackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdatePackageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).UpdatePackage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_UpdatePackage_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).UpdatePackage(ctx, req.(*UpdatePackageRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ApprovePackageUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ApprovePackageUpdateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ApprovePackageUpdate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ApprovePackageUpdate_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ApprovePackageUpdate(ctx, req.(*ApprovePackageUpdateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RollbackPackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RollbackPackageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RollbackPackage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RollbackPackage_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RollbackPackage(ctx, req.(*RollbackPackageRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_SetPackageUpdatePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetPackageUpdatePolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).SetPackageUpdatePolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_SetPackageUpdatePolicy_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).SetPackageUpdatePolicy(ctx, req.(*SetPackageUpdatePolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RegisterTaskGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RegisterTaskGrantRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RegisterTaskGrant(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RegisterTaskGrant_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RegisterTaskGrant(ctx, req.(*RegisterTaskGrantRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RevokeTaskGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RevokeTaskGrantRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RevokeTaskGrant(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RevokeTaskGrant_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RevokeTaskGrant(ctx, req.(*RevokeTaskGrantRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ResolveTaskGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResolveTaskGrantRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ResolveTaskGrant(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ResolveTaskGrant_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ResolveTaskGrant(ctx, req.(*ResolveTaskGrantRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListIdentities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListIdentitiesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListIdentities(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListIdentities_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListIdentities(ctx, req.(*ListIdentitiesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_GetAuthenticationSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAuthenticationSettingsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).GetAuthenticationSettings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_GetAuthenticationSettings_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).GetAuthenticationSettings(ctx, req.(*GetAuthenticationSettingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_SaveAuthenticationSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SaveAuthenticationSettingsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).SaveAuthenticationSettings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_SaveAuthenticationSettings_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).SaveAuthenticationSettings(ctx, req.(*SaveAuthenticationSettingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_BeginPasskey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BeginPasskeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).BeginPasskey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_BeginPasskey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).BeginPasskey(ctx, req.(*BeginPasskeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_FinishPasskey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FinishPasskeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).FinishPasskey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_FinishPasskey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).FinishPasskey(ctx, req.(*FinishPasskeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListPasskeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListPasskeysRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListPasskeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListPasskeys_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListPasskeys(ctx, req.(*ListPasskeysRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_DeletePasskey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeletePasskeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).DeletePasskey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_DeletePasskey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).DeletePasskey(ctx, req.(*DeletePasskeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_OpenAccountSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(OpenAccountSessionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).OpenAccountSession(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_OpenAccountSession_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).OpenAccountSession(ctx, req.(*OpenAccountSessionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RequireFreshAccountSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequireFreshAccountSessionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RequireFreshAccountSession(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RequireFreshAccountSession_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RequireFreshAccountSession(ctx, req.(*RequireFreshAccountSessionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_CreateAccountRecovery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateAccountRecoveryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).CreateAccountRecovery(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_CreateAccountRecovery_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).CreateAccountRecovery(ctx, req.(*CreateAccountRecoveryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RecoverAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RecoverAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RecoverAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RecoverAccount_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RecoverAccount(ctx, req.(*RecoverAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_AccountSetup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AccountSetupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).AccountSetup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_AccountSetup_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).AccountSetup(ctx, req.(*AccountSetupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RegisterAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RegisterAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RegisterAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RegisterAccount_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RegisterAccount(ctx, req.(*RegisterAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_SignInAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignInAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).SignInAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_SignInAccount_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).SignInAccount(ctx, req.(*SignInAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ResolveAccountSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResolveAccountSessionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ResolveAccountSession(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ResolveAccountSession_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ResolveAccountSession(ctx, req.(*ResolveAccountSessionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_SignOutAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignOutAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).SignOutAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_SignOutAccount_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).SignOutAccount(ctx, req.(*SignOutAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ChangeAccountPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ChangeAccountPasswordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ChangeAccountPassword(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ChangeAccountPassword_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ChangeAccountPassword(ctx, req.(*ChangeAccountPasswordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_GetIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetIdentityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).GetIdentity(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_GetIdentity_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).GetIdentity(ctx, req.(*GetIdentityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_CreateIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateIdentityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).CreateIdentity(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_CreateIdentity_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).CreateIdentity(ctx, req.(*CreateIdentityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RenameIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RenameIdentityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RenameIdentity(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RenameIdentity_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RenameIdentity(ctx, req.(*RenameIdentityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_SuspendIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SuspendIdentityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).SuspendIdentity(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_SuspendIdentity_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).SuspendIdentity(ctx, req.(*SuspendIdentityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ReactivateIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReactivateIdentityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ReactivateIdentity(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ReactivateIdentity_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ReactivateIdentity(ctx, req.(*ReactivateIdentityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RetireIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RetireIdentityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RetireIdentity(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RetireIdentity_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RetireIdentity(ctx, req.(*RetireIdentityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ResolveIdentitySubject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResolveIdentitySubjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ResolveIdentitySubject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ResolveIdentitySubject_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ResolveIdentitySubject(ctx, req.(*ResolveIdentitySubjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_BindIdentitySubject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BindIdentitySubjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).BindIdentitySubject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_BindIdentitySubject_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).BindIdentitySubject(ctx, req.(*BindIdentitySubjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ClaimIdentitySubject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClaimIdentitySubjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ClaimIdentitySubject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ClaimIdentitySubject_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ClaimIdentitySubject(ctx, req.(*ClaimIdentitySubjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_AddPersonalToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddPersonalTokenRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).AddPersonalToken(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_AddPersonalToken_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).AddPersonalToken(ctx, req.(*AddPersonalTokenRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListPersonalTokens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListPersonalTokensRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListPersonalTokens(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListPersonalTokens_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListPersonalTokens(ctx, req.(*ListPersonalTokensRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RevokePersonalToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RevokePersonalTokenRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RevokePersonalToken(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RevokePersonalToken_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RevokePersonalToken(ctx, req.(*RevokePersonalTokenRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_EnqueueIssue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EnqueueIssueRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).EnqueueIssue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_EnqueueIssue_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).EnqueueIssue(ctx, req.(*EnqueueIssueRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_EnqueueChatTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EnqueueChatTaskRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).EnqueueChatTask(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_EnqueueChatTask_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).EnqueueChatTask(ctx, req.(*EnqueueChatTaskRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ActiveTasksByOrigin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ActiveTasksByOriginRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ActiveTasksByOrigin(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ActiveTasksByOrigin_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ActiveTasksByOrigin(ctx, req.(*ActiveTasksByOriginRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_UnpostedOutcomes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnpostedOutcomesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).UnpostedOutcomes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_UnpostedOutcomes_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).UnpostedOutcomes(ctx, req.(*UnpostedOutcomesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_MarkOutcomePosted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MarkOutcomePostedRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).MarkOutcomePosted(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_MarkOutcomePosted_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).MarkOutcomePosted(ctx, req.(*MarkOutcomePostedRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ClaimNext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClaimNextRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ClaimNext(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ClaimNext_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ClaimNext(ctx, req.(*ClaimNextRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ClaimByIssue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClaimByIssueRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ClaimByIssue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ClaimByIssue_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ClaimByIssue(ctx, req.(*ClaimByIssueRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_Transition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TransitionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).Transition(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_Transition_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).Transition(ctx, req.(*TransitionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).Update(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_Update_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).Update(ctx, req.(*UpdateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_StartStep_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StartStepRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).StartStep(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_StartStep_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).StartStep(ctx, req.(*StartStepRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RecordUsage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RecordUsageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RecordUsage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RecordUsage_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RecordUsage(ctx, req.(*RecordUsageRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_TaskModels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TaskModelsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).TaskModels(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_TaskModels_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).TaskModels(ctx, req.(*TaskModelsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_TaskInstructions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TaskInstructionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).TaskInstructions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_TaskInstructions_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).TaskInstructions(ctx, req.(*TaskInstructionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_CallerModels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CallerModelsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).CallerModels(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_CallerModels_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).CallerModels(ctx, req.(*CallerModelsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_FinishStep_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FinishStepRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).FinishStep(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_FinishStep_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).FinishStep(ctx, req.(*FinishStepRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_CancelExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CancelExecutionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).CancelExecution(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_CancelExecution_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).CancelExecution(ctx, req.(*CancelExecutionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListSteps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListStepsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListSteps(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListSteps_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListSteps(ctx, req.(*ListStepsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_GetHarnessSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetHarnessSecretRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).GetHarnessSecret(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_GetHarnessSecret_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).GetHarnessSecret(ctx, req.(*GetHarnessSecretRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_PutHarnessSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PutHarnessSecretRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).PutHarnessSecret(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_PutHarnessSecret_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).PutHarnessSecret(ctx, req.(*PutHarnessSecretRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_Requeue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequeueRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).Requeue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_Requeue_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).Requeue(ctx, req.(*RequeueRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ParkTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ParkTaskRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ParkTask(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ParkTask_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ParkTask(ctx, req.(*ParkTaskRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RecoverStale_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RecoverStaleRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RecoverStale(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RecoverStale_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RecoverStale(ctx, req.(*RecoverStaleRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ArchiveTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ArchiveTaskRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ArchiveTask(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ArchiveTask_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ArchiveTask(ctx, req.(*ArchiveTaskRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RetryTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RetryTaskRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RetryTask(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RetryTask_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RetryTask(ctx, req.(*RetryTaskRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).RespondReviewGate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RespondReviewGate_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RespondReviewGate(ctx, req.(*RespondReviewGateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).BeginRemediation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_BeginRemediation_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).BeginRemediation(ctx, req.(*BeginRemediationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).UpdateReviewPayload(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_UpdateReviewPayload_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).UpdateReviewPayload(ctx, req.(*UpdateReviewPayloadRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).SetReviewCursors(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_SetReviewCursors_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).SetReviewCursors(ctx, req.(*SetReviewCursorsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_TaskByIssue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TaskByIssueRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).TaskByIssue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_TaskByIssue_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).TaskByIssue(ctx, req.(*TaskByIssueRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_OpenTaskByPR_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(OpenTaskByPRRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).OpenTaskByPR(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_OpenTaskByPR_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).OpenTaskByPR(ctx, req.(*OpenTaskByPRRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_TaskByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TaskByIDRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).TaskByID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_TaskByID_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).TaskByID(ctx, req.(*TaskByIDRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_OpenPRs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(OpenPRsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).OpenPRs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_OpenPRs_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).OpenPRs(ctx, req.(*OpenPRsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ClearTerminalTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClearTerminalTasksRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ClearTerminalTasks(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ClearTerminalTasks_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ClearTerminalTasks(ctx, req.(*ClearTerminalTasksRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_Tasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TasksRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).Tasks(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_Tasks_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).Tasks(ctx, req.(*TasksRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_StatusCounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StatusCountsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).StatusCounts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_StatusCounts_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).StatusCounts(ctx, req.(*StatusCountsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_InsertEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InsertEventRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).InsertEvent(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_InsertEvent_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).InsertEvent(ctx, req.(*InsertEventRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_EventsSince_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EventsSinceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).EventsSince(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_EventsSince_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).EventsSince(ctx, req.(*EventsSinceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_TaskEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TaskEventsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).TaskEvents(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_TaskEvents_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).TaskEvents(ctx, req.(*TaskEventsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_WorkflowStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WorkflowStatsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).WorkflowStats(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_WorkflowStats_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).WorkflowStats(ctx, req.(*WorkflowStatsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_StageStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StageStatsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).StageStats(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_StageStats_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).StageStats(ctx, req.(*StageStatsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_TokensByDay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TokensByDayRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).TokensByDay(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_TokensByDay_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).TokensByDay(ctx, req.(*TokensByDayRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_PutConfigSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PutConfigSnapshotRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).PutConfigSnapshot(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_PutConfigSnapshot_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).PutConfigSnapshot(ctx, req.(*PutConfigSnapshotRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_GetConfigSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetConfigSnapshotRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).GetConfigSnapshot(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_GetConfigSnapshot_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).GetConfigSnapshot(ctx, req.(*GetConfigSnapshotRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_PutChannelStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PutChannelStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).PutChannelStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_PutChannelStatus_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).PutChannelStatus(ctx, req.(*PutChannelStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListChannelStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListChannelStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListChannelStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListChannelStatus_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListChannelStatus(ctx, req.(*ListChannelStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_PutApplyStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PutApplyStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).PutApplyStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_PutApplyStatus_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).PutApplyStatus(ctx, req.(*PutApplyStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListApplyStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListApplyStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListApplyStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListApplyStatus_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListApplyStatus(ctx, req.(*ListApplyStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_PutPresence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PutPresenceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).PutPresence(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_PutPresence_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).PutPresence(ctx, req.(*PutPresenceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RecordCaptureRefusal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RecordCaptureRefusalRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RecordCaptureRefusal(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RecordCaptureRefusal_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RecordCaptureRefusal(ctx, req.(*RecordCaptureRefusalRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListCaptureRefusals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListCaptureRefusalsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListCaptureRefusals(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListCaptureRefusals_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListCaptureRefusals(ctx, req.(*ListCaptureRefusalsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListPresence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListPresenceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListPresence(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListPresence_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListPresence(ctx, req.(*ListPresenceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ReadTaskLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReadTaskLogRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ReadTaskLog(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ReadTaskLog_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ReadTaskLog(ctx, req.(*ReadTaskLogRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_StreamTaskLogContent_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(StreamTaskLogContentRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(StateStoreServiceServer).StreamTaskLogContent(m, &grpc.GenericServerStream[StreamTaskLogContentRequest, StreamTaskLogContentResponse]{ServerStream: stream}) -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type StateStoreService_StreamTaskLogContentServer = grpc.ServerStreamingServer[StreamTaskLogContentResponse] - -func _StateStoreService_InsertCapture_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InsertCaptureRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).InsertCapture(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_InsertCapture_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).InsertCapture(ctx, req.(*InsertCaptureRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_StreamCaptures_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(StreamCapturesRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(StateStoreServiceServer).StreamCaptures(m, &grpc.GenericServerStream[StreamCapturesRequest, StreamCapturesResponse]{ServerStream: stream}) -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type StateStoreService_StreamCapturesServer = grpc.ServerStreamingServer[StreamCapturesResponse] - -func _StateStoreService_InsertMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InsertMappingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).InsertMapping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_InsertMapping_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).InsertMapping(ctx, req.(*InsertMappingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_GetMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetMappingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).GetMapping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_GetMapping_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).GetMapping(ctx, req.(*GetMappingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListMappings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListMappingsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListMappings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListMappings_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListMappings(ctx, req.(*ListMappingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_UpdateMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateMappingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).UpdateMapping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_UpdateMapping_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).UpdateMapping(ctx, req.(*UpdateMappingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_DeleteMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteMappingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).DeleteMapping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_DeleteMapping_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).DeleteMapping(ctx, req.(*DeleteMappingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RecordMappingMatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RecordMappingMatchRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RecordMappingMatch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RecordMappingMatch_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RecordMappingMatch(ctx, req.(*RecordMappingMatchRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_InsertEventType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InsertEventTypeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).InsertEventType(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_InsertEventType_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).InsertEventType(ctx, req.(*InsertEventTypeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_UpdateEventType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateEventTypeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).UpdateEventType(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_UpdateEventType_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).UpdateEventType(ctx, req.(*UpdateEventTypeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_DeleteEventType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteEventTypeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).DeleteEventType(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_DeleteEventType_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).DeleteEventType(ctx, req.(*DeleteEventTypeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListEventTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListEventTypesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListEventTypes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListEventTypes_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListEventTypes(ctx, req.(*ListEventTypesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).InsertBinding(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_InsertBinding_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).InsertBinding(ctx, req.(*InsertBindingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).GetBinding(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_GetBinding_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).GetBinding(ctx, req.(*GetBindingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).ListBindings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListBindings_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListBindings(ctx, req.(*ListBindingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListDispatches_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListDispatchesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListDispatches(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListDispatches_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListDispatches(ctx, req.(*ListDispatchesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).UpdateBinding(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_UpdateBinding_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).UpdateBinding(ctx, req.(*UpdateBindingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).DeleteBinding(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_DeleteBinding_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).DeleteBinding(ctx, req.(*DeleteBindingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).ApproveBinding(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ApproveBinding_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ApproveBinding(ctx, req.(*ApproveBindingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).PauseBinding(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_PauseBinding_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).PauseBinding(ctx, req.(*PauseBindingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).ResumeBinding(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ResumeBinding_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ResumeBinding(ctx, req.(*ResumeBindingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).InsertSource(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_InsertSource_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).InsertSource(ctx, req.(*InsertSourceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).GetSource(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_GetSource_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).GetSource(ctx, req.(*GetSourceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).ListSources(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListSources_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListSources(ctx, req.(*ListSourcesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).SetSourceSigning(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_SetSourceSigning_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).SetSourceSigning(ctx, req.(*SetSourceSigningRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).SetSourceSecret(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_SetSourceSecret_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).SetSourceSecret(ctx, req.(*SetSourceSecretRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).SetSourceName(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_SetSourceName_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).SetSourceName(ctx, req.(*SetSourceNameRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).SetSourceDeliveryHeader(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_SetSourceDeliveryHeader_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).SetSourceDeliveryHeader(ctx, req.(*SetSourceDeliveryHeaderRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).DeleteSource(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_DeleteSource_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).DeleteSource(ctx, req.(*DeleteSourceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_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.(StateStoreServiceServer).ArmedBindingsForSource(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ArmedBindingsForSource_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ArmedBindingsForSource(ctx, req.(*ArmedBindingsForSourceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RecordDispatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RecordDispatchRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RecordDispatch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RecordDispatch_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RecordDispatch(ctx, req.(*RecordDispatchRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RecordPlaybookDispatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RecordPlaybookDispatchRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RecordPlaybookDispatch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RecordPlaybookDispatch_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RecordPlaybookDispatch(ctx, req.(*RecordPlaybookDispatchRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_DeletePlaybookDispatches_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeletePlaybookDispatchesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).DeletePlaybookDispatches(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_DeletePlaybookDispatches_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).DeletePlaybookDispatches(ctx, req.(*DeletePlaybookDispatchesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_StreamUndispatchedCaptures_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(StreamUndispatchedCapturesRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(StateStoreServiceServer).StreamUndispatchedCaptures(m, &grpc.GenericServerStream[StreamUndispatchedCapturesRequest, StreamUndispatchedCapturesResponse]{ServerStream: stream}) -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type StateStoreService_StreamUndispatchedCapturesServer = grpc.ServerStreamingServer[StreamUndispatchedCapturesResponse] - -func _StateStoreService_EnqueueBindingTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EnqueueBindingTaskRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).EnqueueBindingTask(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_EnqueueBindingTask_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).EnqueueBindingTask(ctx, req.(*EnqueueBindingTaskRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_EnqueueCallTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EnqueueCallTaskRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).EnqueueCallTask(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_EnqueueCallTask_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).EnqueueCallTask(ctx, req.(*EnqueueCallTaskRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_WorkflowCallStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WorkflowCallStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).WorkflowCallStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_WorkflowCallStatus_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).WorkflowCallStatus(ctx, req.(*WorkflowCallStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_GetPrincipal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPrincipalRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).GetPrincipal(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_GetPrincipal_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).GetPrincipal(ctx, req.(*GetPrincipalRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListPoliciesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListPolicies(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListPolicies_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListPolicies(ctx, req.(*ListPoliciesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_GetPoliciesVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPoliciesVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).GetPoliciesVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_GetPoliciesVersion_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).GetPoliciesVersion(ctx, req.(*GetPoliciesVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_PutPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PutPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).PutPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_PutPolicy_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).PutPolicy(ctx, req.(*PutPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_DeletePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeletePolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).DeletePolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_DeletePolicy_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).DeletePolicy(ctx, req.(*DeletePolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_EnsureShippedOrgPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EnsureShippedOrgPoliciesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).EnsureShippedOrgPolicies(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_EnsureShippedOrgPolicies_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).EnsureShippedOrgPolicies(ctx, req.(*EnsureShippedOrgPoliciesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RecordDenial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RecordDenialRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RecordDenial(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RecordDenial_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RecordDenial(ctx, req.(*RecordDenialRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListDenials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListDenialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListDenials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListDenials_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListDenials(ctx, req.(*ListDenialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListOrgs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListOrgsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListOrgs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListOrgs_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListOrgs(ctx, req.(*ListOrgsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_GetOrg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetOrgRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).GetOrg(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_GetOrg_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).GetOrg(ctx, req.(*GetOrgRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_CreateOrg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateOrgRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).CreateOrg(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_CreateOrg_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).CreateOrg(ctx, req.(*CreateOrgRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListWorkspaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListWorkspacesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListWorkspaces(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListWorkspaces_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListWorkspaces(ctx, req.(*ListWorkspacesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_CreateWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateWorkspaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).CreateWorkspace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_CreateWorkspace_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).CreateWorkspace(ctx, req.(*CreateWorkspaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListMembersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListMembers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListMembers_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListMembers(ctx, req.(*ListMembersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_SetMembership_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetMembershipRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).SetMembership(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_SetMembership_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).SetMembership(ctx, req.(*SetMembershipRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RemoveMembership_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveMembershipRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RemoveMembership(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RemoveMembership_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RemoveMembership(ctx, req.(*RemoveMembershipRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListOrgAgents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListOrgAgentsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListOrgAgents(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListOrgAgents_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListOrgAgents(ctx, req.(*ListOrgAgentsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_AssignAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AssignAgentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).AssignAgent(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_AssignAgent_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).AssignAgent(ctx, req.(*AssignAgentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RaiseAlert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RaiseAlertRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RaiseAlert(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RaiseAlert_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RaiseAlert(ctx, req.(*RaiseAlertRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ResolveAlert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResolveAlertRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ResolveAlert(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ResolveAlert_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ResolveAlert(ctx, req.(*ResolveAlertRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_DismissAlert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DismissAlertRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).DismissAlert(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_DismissAlert_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).DismissAlert(ctx, req.(*DismissAlertRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ListAlerts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListAlertsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ListAlerts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ListAlerts_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ListAlerts(ctx, req.(*ListAlertsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_ClaimAlertDeliveries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClaimAlertDeliveriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).ClaimAlertDeliveries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_ClaimAlertDeliveries_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).ClaimAlertDeliveries(ctx, req.(*ClaimAlertDeliveriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StateStoreService_RecordAlertAttempt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RecordAlertAttemptRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StateStoreServiceServer).RecordAlertAttempt(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StateStoreService_RecordAlertAttempt_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StateStoreServiceServer).RecordAlertAttempt(ctx, req.(*RecordAlertAttemptRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// StateStoreService_ServiceDesc is the grpc.ServiceDesc for StateStoreService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var StateStoreService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "state.v1.StateStoreService", - HandlerType: (*StateStoreServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "RecentLogs", - Handler: _StateStoreService_RecentLogs_Handler, - }, - { - MethodName: "InstallPackage", - Handler: _StateStoreService_InstallPackage_Handler, - }, - { - MethodName: "ListCatalogue", - Handler: _StateStoreService_ListCatalogue_Handler, - }, - { - MethodName: "InstallFromCatalogue", - Handler: _StateStoreService_InstallFromCatalogue_Handler, - }, - { - MethodName: "GetInstalledPackage", - Handler: _StateStoreService_GetInstalledPackage_Handler, - }, - { - MethodName: "ListInstalledPackages", - Handler: _StateStoreService_ListInstalledPackages_Handler, - }, - { - MethodName: "AcceptPackageAuthority", - Handler: _StateStoreService_AcceptPackageAuthority_Handler, - }, - { - MethodName: "RemoveInstalledPackage", - Handler: _StateStoreService_RemoveInstalledPackage_Handler, - }, - { - MethodName: "UpdatePackage", - Handler: _StateStoreService_UpdatePackage_Handler, - }, - { - MethodName: "ApprovePackageUpdate", - Handler: _StateStoreService_ApprovePackageUpdate_Handler, - }, - { - MethodName: "RollbackPackage", - Handler: _StateStoreService_RollbackPackage_Handler, - }, - { - MethodName: "SetPackageUpdatePolicy", - Handler: _StateStoreService_SetPackageUpdatePolicy_Handler, - }, - { - MethodName: "RegisterTaskGrant", - Handler: _StateStoreService_RegisterTaskGrant_Handler, - }, - { - MethodName: "RevokeTaskGrant", - Handler: _StateStoreService_RevokeTaskGrant_Handler, - }, - { - MethodName: "ResolveTaskGrant", - Handler: _StateStoreService_ResolveTaskGrant_Handler, - }, - { - MethodName: "ListIdentities", - Handler: _StateStoreService_ListIdentities_Handler, - }, - { - MethodName: "GetAuthenticationSettings", - Handler: _StateStoreService_GetAuthenticationSettings_Handler, - }, - { - MethodName: "SaveAuthenticationSettings", - Handler: _StateStoreService_SaveAuthenticationSettings_Handler, - }, - { - MethodName: "BeginPasskey", - Handler: _StateStoreService_BeginPasskey_Handler, - }, - { - MethodName: "FinishPasskey", - Handler: _StateStoreService_FinishPasskey_Handler, - }, - { - MethodName: "ListPasskeys", - Handler: _StateStoreService_ListPasskeys_Handler, - }, - { - MethodName: "DeletePasskey", - Handler: _StateStoreService_DeletePasskey_Handler, - }, - { - MethodName: "OpenAccountSession", - Handler: _StateStoreService_OpenAccountSession_Handler, - }, - { - MethodName: "RequireFreshAccountSession", - Handler: _StateStoreService_RequireFreshAccountSession_Handler, - }, - { - MethodName: "CreateAccountRecovery", - Handler: _StateStoreService_CreateAccountRecovery_Handler, - }, - { - MethodName: "RecoverAccount", - Handler: _StateStoreService_RecoverAccount_Handler, - }, - { - MethodName: "AccountSetup", - Handler: _StateStoreService_AccountSetup_Handler, - }, - { - MethodName: "RegisterAccount", - Handler: _StateStoreService_RegisterAccount_Handler, - }, - { - MethodName: "SignInAccount", - Handler: _StateStoreService_SignInAccount_Handler, - }, - { - MethodName: "ResolveAccountSession", - Handler: _StateStoreService_ResolveAccountSession_Handler, - }, - { - MethodName: "SignOutAccount", - Handler: _StateStoreService_SignOutAccount_Handler, - }, - { - MethodName: "ChangeAccountPassword", - Handler: _StateStoreService_ChangeAccountPassword_Handler, - }, - { - MethodName: "GetIdentity", - Handler: _StateStoreService_GetIdentity_Handler, - }, - { - MethodName: "CreateIdentity", - Handler: _StateStoreService_CreateIdentity_Handler, - }, - { - MethodName: "RenameIdentity", - Handler: _StateStoreService_RenameIdentity_Handler, - }, - { - MethodName: "SuspendIdentity", - Handler: _StateStoreService_SuspendIdentity_Handler, - }, - { - MethodName: "ReactivateIdentity", - Handler: _StateStoreService_ReactivateIdentity_Handler, - }, - { - MethodName: "RetireIdentity", - Handler: _StateStoreService_RetireIdentity_Handler, - }, - { - MethodName: "ResolveIdentitySubject", - Handler: _StateStoreService_ResolveIdentitySubject_Handler, - }, - { - MethodName: "BindIdentitySubject", - Handler: _StateStoreService_BindIdentitySubject_Handler, - }, - { - MethodName: "ClaimIdentitySubject", - Handler: _StateStoreService_ClaimIdentitySubject_Handler, - }, - { - MethodName: "AddPersonalToken", - Handler: _StateStoreService_AddPersonalToken_Handler, - }, - { - MethodName: "ListPersonalTokens", - Handler: _StateStoreService_ListPersonalTokens_Handler, - }, - { - MethodName: "RevokePersonalToken", - Handler: _StateStoreService_RevokePersonalToken_Handler, - }, - { - MethodName: "EnqueueIssue", - Handler: _StateStoreService_EnqueueIssue_Handler, - }, - { - MethodName: "EnqueueChatTask", - Handler: _StateStoreService_EnqueueChatTask_Handler, - }, - { - MethodName: "ActiveTasksByOrigin", - Handler: _StateStoreService_ActiveTasksByOrigin_Handler, - }, - { - MethodName: "UnpostedOutcomes", - Handler: _StateStoreService_UnpostedOutcomes_Handler, - }, - { - MethodName: "MarkOutcomePosted", - Handler: _StateStoreService_MarkOutcomePosted_Handler, - }, - { - MethodName: "ClaimNext", - Handler: _StateStoreService_ClaimNext_Handler, - }, - { - MethodName: "ClaimByIssue", - Handler: _StateStoreService_ClaimByIssue_Handler, - }, - { - MethodName: "Transition", - Handler: _StateStoreService_Transition_Handler, - }, - { - MethodName: "Update", - Handler: _StateStoreService_Update_Handler, - }, - { - MethodName: "StartStep", - Handler: _StateStoreService_StartStep_Handler, - }, - { - MethodName: "RecordUsage", - Handler: _StateStoreService_RecordUsage_Handler, - }, - { - MethodName: "TaskModels", - Handler: _StateStoreService_TaskModels_Handler, - }, - { - MethodName: "TaskInstructions", - Handler: _StateStoreService_TaskInstructions_Handler, - }, - { - MethodName: "CallerModels", - Handler: _StateStoreService_CallerModels_Handler, - }, - { - MethodName: "FinishStep", - Handler: _StateStoreService_FinishStep_Handler, - }, - { - MethodName: "CancelExecution", - Handler: _StateStoreService_CancelExecution_Handler, - }, - { - MethodName: "ListSteps", - Handler: _StateStoreService_ListSteps_Handler, - }, - { - MethodName: "GetHarnessSecret", - Handler: _StateStoreService_GetHarnessSecret_Handler, - }, - { - MethodName: "PutHarnessSecret", - Handler: _StateStoreService_PutHarnessSecret_Handler, - }, - { - MethodName: "Requeue", - Handler: _StateStoreService_Requeue_Handler, - }, - { - MethodName: "ParkTask", - Handler: _StateStoreService_ParkTask_Handler, - }, - { - MethodName: "RecoverStale", - Handler: _StateStoreService_RecoverStale_Handler, - }, - { - MethodName: "ArchiveTask", - Handler: _StateStoreService_ArchiveTask_Handler, - }, - { - MethodName: "RetryTask", - Handler: _StateStoreService_RetryTask_Handler, - }, - { - MethodName: "RespondReviewGate", - Handler: _StateStoreService_RespondReviewGate_Handler, - }, - { - MethodName: "BeginRemediation", - Handler: _StateStoreService_BeginRemediation_Handler, - }, - { - MethodName: "UpdateReviewPayload", - Handler: _StateStoreService_UpdateReviewPayload_Handler, - }, - { - MethodName: "SetReviewCursors", - Handler: _StateStoreService_SetReviewCursors_Handler, - }, - { - MethodName: "TaskByIssue", - Handler: _StateStoreService_TaskByIssue_Handler, - }, - { - MethodName: "OpenTaskByPR", - Handler: _StateStoreService_OpenTaskByPR_Handler, - }, - { - MethodName: "TaskByID", - Handler: _StateStoreService_TaskByID_Handler, - }, - { - MethodName: "OpenPRs", - Handler: _StateStoreService_OpenPRs_Handler, - }, - { - MethodName: "ClearTerminalTasks", - Handler: _StateStoreService_ClearTerminalTasks_Handler, - }, - { - MethodName: "Tasks", - Handler: _StateStoreService_Tasks_Handler, - }, - { - MethodName: "StatusCounts", - Handler: _StateStoreService_StatusCounts_Handler, - }, - { - MethodName: "InsertEvent", - Handler: _StateStoreService_InsertEvent_Handler, - }, - { - MethodName: "EventsSince", - Handler: _StateStoreService_EventsSince_Handler, - }, - { - MethodName: "TaskEvents", - Handler: _StateStoreService_TaskEvents_Handler, - }, - { - MethodName: "WorkflowStats", - Handler: _StateStoreService_WorkflowStats_Handler, - }, - { - MethodName: "StageStats", - Handler: _StateStoreService_StageStats_Handler, - }, - { - MethodName: "TokensByDay", - Handler: _StateStoreService_TokensByDay_Handler, - }, - { - MethodName: "PutConfigSnapshot", - Handler: _StateStoreService_PutConfigSnapshot_Handler, - }, - { - MethodName: "GetConfigSnapshot", - Handler: _StateStoreService_GetConfigSnapshot_Handler, - }, - { - MethodName: "PutChannelStatus", - Handler: _StateStoreService_PutChannelStatus_Handler, - }, - { - MethodName: "ListChannelStatus", - Handler: _StateStoreService_ListChannelStatus_Handler, - }, - { - MethodName: "PutApplyStatus", - Handler: _StateStoreService_PutApplyStatus_Handler, - }, - { - MethodName: "ListApplyStatus", - Handler: _StateStoreService_ListApplyStatus_Handler, - }, - { - MethodName: "PutPresence", - Handler: _StateStoreService_PutPresence_Handler, - }, - { - MethodName: "RecordCaptureRefusal", - Handler: _StateStoreService_RecordCaptureRefusal_Handler, - }, - { - MethodName: "ListCaptureRefusals", - Handler: _StateStoreService_ListCaptureRefusals_Handler, - }, - { - MethodName: "ListPresence", - Handler: _StateStoreService_ListPresence_Handler, - }, - { - MethodName: "ReadTaskLog", - Handler: _StateStoreService_ReadTaskLog_Handler, - }, - { - MethodName: "InsertCapture", - Handler: _StateStoreService_InsertCapture_Handler, - }, - { - MethodName: "InsertMapping", - Handler: _StateStoreService_InsertMapping_Handler, - }, - { - MethodName: "GetMapping", - Handler: _StateStoreService_GetMapping_Handler, - }, - { - MethodName: "ListMappings", - Handler: _StateStoreService_ListMappings_Handler, - }, - { - MethodName: "UpdateMapping", - Handler: _StateStoreService_UpdateMapping_Handler, - }, - { - MethodName: "DeleteMapping", - Handler: _StateStoreService_DeleteMapping_Handler, - }, - { - MethodName: "RecordMappingMatch", - Handler: _StateStoreService_RecordMappingMatch_Handler, - }, - { - MethodName: "InsertEventType", - Handler: _StateStoreService_InsertEventType_Handler, - }, - { - MethodName: "UpdateEventType", - Handler: _StateStoreService_UpdateEventType_Handler, - }, - { - MethodName: "DeleteEventType", - Handler: _StateStoreService_DeleteEventType_Handler, - }, - { - MethodName: "ListEventTypes", - Handler: _StateStoreService_ListEventTypes_Handler, - }, - { - MethodName: "InsertBinding", - Handler: _StateStoreService_InsertBinding_Handler, - }, - { - MethodName: "GetBinding", - Handler: _StateStoreService_GetBinding_Handler, - }, - { - MethodName: "ListBindings", - Handler: _StateStoreService_ListBindings_Handler, - }, - { - MethodName: "ListDispatches", - Handler: _StateStoreService_ListDispatches_Handler, - }, - { - MethodName: "UpdateBinding", - Handler: _StateStoreService_UpdateBinding_Handler, - }, - { - MethodName: "DeleteBinding", - Handler: _StateStoreService_DeleteBinding_Handler, - }, - { - MethodName: "ApproveBinding", - Handler: _StateStoreService_ApproveBinding_Handler, - }, - { - MethodName: "PauseBinding", - Handler: _StateStoreService_PauseBinding_Handler, - }, - { - MethodName: "ResumeBinding", - Handler: _StateStoreService_ResumeBinding_Handler, - }, - { - MethodName: "InsertSource", - Handler: _StateStoreService_InsertSource_Handler, - }, - { - MethodName: "GetSource", - Handler: _StateStoreService_GetSource_Handler, - }, - { - MethodName: "ListSources", - Handler: _StateStoreService_ListSources_Handler, - }, - { - MethodName: "SetSourceSigning", - Handler: _StateStoreService_SetSourceSigning_Handler, - }, - { - MethodName: "SetSourceSecret", - Handler: _StateStoreService_SetSourceSecret_Handler, - }, - { - MethodName: "SetSourceName", - Handler: _StateStoreService_SetSourceName_Handler, - }, - { - MethodName: "SetSourceDeliveryHeader", - Handler: _StateStoreService_SetSourceDeliveryHeader_Handler, - }, - { - MethodName: "DeleteSource", - Handler: _StateStoreService_DeleteSource_Handler, - }, - { - MethodName: "ArmedBindingsForSource", - Handler: _StateStoreService_ArmedBindingsForSource_Handler, - }, - { - MethodName: "RecordDispatch", - Handler: _StateStoreService_RecordDispatch_Handler, - }, - { - MethodName: "RecordPlaybookDispatch", - Handler: _StateStoreService_RecordPlaybookDispatch_Handler, - }, - { - MethodName: "DeletePlaybookDispatches", - Handler: _StateStoreService_DeletePlaybookDispatches_Handler, - }, - { - MethodName: "EnqueueBindingTask", - Handler: _StateStoreService_EnqueueBindingTask_Handler, - }, - { - MethodName: "EnqueueCallTask", - Handler: _StateStoreService_EnqueueCallTask_Handler, - }, - { - MethodName: "WorkflowCallStatus", - Handler: _StateStoreService_WorkflowCallStatus_Handler, - }, - { - MethodName: "GetPrincipal", - Handler: _StateStoreService_GetPrincipal_Handler, - }, - { - MethodName: "ListPolicies", - Handler: _StateStoreService_ListPolicies_Handler, - }, - { - MethodName: "GetPoliciesVersion", - Handler: _StateStoreService_GetPoliciesVersion_Handler, - }, - { - MethodName: "PutPolicy", - Handler: _StateStoreService_PutPolicy_Handler, - }, - { - MethodName: "DeletePolicy", - Handler: _StateStoreService_DeletePolicy_Handler, - }, - { - MethodName: "EnsureShippedOrgPolicies", - Handler: _StateStoreService_EnsureShippedOrgPolicies_Handler, - }, - { - MethodName: "RecordDenial", - Handler: _StateStoreService_RecordDenial_Handler, - }, - { - MethodName: "ListDenials", - Handler: _StateStoreService_ListDenials_Handler, - }, - { - MethodName: "ListOrgs", - Handler: _StateStoreService_ListOrgs_Handler, - }, - { - MethodName: "GetOrg", - Handler: _StateStoreService_GetOrg_Handler, - }, - { - MethodName: "CreateOrg", - Handler: _StateStoreService_CreateOrg_Handler, - }, - { - MethodName: "ListWorkspaces", - Handler: _StateStoreService_ListWorkspaces_Handler, - }, - { - MethodName: "CreateWorkspace", - Handler: _StateStoreService_CreateWorkspace_Handler, - }, - { - MethodName: "ListMembers", - Handler: _StateStoreService_ListMembers_Handler, - }, - { - MethodName: "SetMembership", - Handler: _StateStoreService_SetMembership_Handler, - }, - { - MethodName: "RemoveMembership", - Handler: _StateStoreService_RemoveMembership_Handler, - }, - { - MethodName: "ListOrgAgents", - Handler: _StateStoreService_ListOrgAgents_Handler, - }, - { - MethodName: "AssignAgent", - Handler: _StateStoreService_AssignAgent_Handler, - }, - { - MethodName: "RaiseAlert", - Handler: _StateStoreService_RaiseAlert_Handler, - }, - { - MethodName: "ResolveAlert", - Handler: _StateStoreService_ResolveAlert_Handler, - }, - { - MethodName: "DismissAlert", - Handler: _StateStoreService_DismissAlert_Handler, - }, - { - MethodName: "ListAlerts", - Handler: _StateStoreService_ListAlerts_Handler, - }, - { - MethodName: "ClaimAlertDeliveries", - Handler: _StateStoreService_ClaimAlertDeliveries_Handler, - }, - { - MethodName: "RecordAlertAttempt", - Handler: _StateStoreService_RecordAlertAttempt_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamTaskLogContent", - Handler: _StateStoreService_StreamTaskLogContent_Handler, - ServerStreams: true, - }, - { - StreamName: "StreamCaptures", - Handler: _StateStoreService_StreamCaptures_Handler, - ServerStreams: true, - }, - { - StreamName: "StreamUndispatchedCaptures", - Handler: _StateStoreService_StreamUndispatchedCaptures_Handler, - ServerStreams: true, - }, - }, - Metadata: "state/v1/state.proto", -} diff --git a/internal/contracts/state/v1/stats.pb.go b/internal/contracts/state/v1/stats.pb.go new file mode 100644 index 000000000..87d917855 --- /dev/null +++ b/internal/contracts/state/v1/stats.pb.go @@ -0,0 +1,710 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/stats.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// WorkflowStat mirrors storecontract.WorkflowStat. +type WorkflowStat struct { + state protoimpl.MessageState `protogen:"open.v1"` + Workflow string `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` + Runs int64 `protobuf:"varint,2,opt,name=runs,proto3" json:"runs,omitempty"` + Merged int64 `protobuf:"varint,3,opt,name=merged,proto3" json:"merged,omitempty"` + PrOpen int64 `protobuf:"varint,4,opt,name=pr_open,json=prOpen,proto3" json:"pr_open,omitempty"` + Parked int64 `protobuf:"varint,5,opt,name=parked,proto3" json:"parked,omitempty"` + AvgTokens int64 `protobuf:"varint,6,opt,name=avg_tokens,json=avgTokens,proto3" json:"avg_tokens,omitempty"` + AvgSteps float64 `protobuf:"fixed64,7,opt,name=avg_steps,json=avgSteps,proto3" json:"avg_steps,omitempty"` + TotalTokens int64 `protobuf:"varint,8,opt,name=total_tokens,json=totalTokens,proto3" json:"total_tokens,omitempty"` + Completed int64 `protobuf:"varint,9,opt,name=completed,proto3" json:"completed,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkflowStat) Reset() { + *x = WorkflowStat{} + mi := &file_state_v1_stats_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkflowStat) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowStat) ProtoMessage() {} + +func (x *WorkflowStat) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_stats_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowStat.ProtoReflect.Descriptor instead. +func (*WorkflowStat) Descriptor() ([]byte, []int) { + return file_state_v1_stats_proto_rawDescGZIP(), []int{0} +} + +func (x *WorkflowStat) GetWorkflow() string { + if x != nil { + return x.Workflow + } + return "" +} + +func (x *WorkflowStat) GetRuns() int64 { + if x != nil { + return x.Runs + } + return 0 +} + +func (x *WorkflowStat) GetMerged() int64 { + if x != nil { + return x.Merged + } + return 0 +} + +func (x *WorkflowStat) GetPrOpen() int64 { + if x != nil { + return x.PrOpen + } + return 0 +} + +func (x *WorkflowStat) GetParked() int64 { + if x != nil { + return x.Parked + } + return 0 +} + +func (x *WorkflowStat) GetAvgTokens() int64 { + if x != nil { + return x.AvgTokens + } + return 0 +} + +func (x *WorkflowStat) GetAvgSteps() float64 { + if x != nil { + return x.AvgSteps + } + return 0 +} + +func (x *WorkflowStat) GetTotalTokens() int64 { + if x != nil { + return x.TotalTokens + } + return 0 +} + +func (x *WorkflowStat) GetCompleted() int64 { + if x != nil { + return x.Completed + } + return 0 +} + +// StageStat mirrors storecontract.StageStat. +type StageStat struct { + state protoimpl.MessageState `protogen:"open.v1"` + Workflow string `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` + Stage string `protobuf:"bytes,2,opt,name=stage,proto3" json:"stage,omitempty"` + Runs int64 `protobuf:"varint,3,opt,name=runs,proto3" json:"runs,omitempty"` + AvgMs int64 `protobuf:"varint,4,opt,name=avg_ms,json=avgMs,proto3" json:"avg_ms,omitempty"` + Errors int64 `protobuf:"varint,5,opt,name=errors,proto3" json:"errors,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StageStat) Reset() { + *x = StageStat{} + mi := &file_state_v1_stats_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StageStat) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StageStat) ProtoMessage() {} + +func (x *StageStat) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_stats_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StageStat.ProtoReflect.Descriptor instead. +func (*StageStat) Descriptor() ([]byte, []int) { + return file_state_v1_stats_proto_rawDescGZIP(), []int{1} +} + +func (x *StageStat) GetWorkflow() string { + if x != nil { + return x.Workflow + } + return "" +} + +func (x *StageStat) GetStage() string { + if x != nil { + return x.Stage + } + return "" +} + +func (x *StageStat) GetRuns() int64 { + if x != nil { + return x.Runs + } + return 0 +} + +func (x *StageStat) GetAvgMs() int64 { + if x != nil { + return x.AvgMs + } + return 0 +} + +func (x *StageStat) GetErrors() int64 { + if x != nil { + return x.Errors + } + return 0 +} + +// DayTokens mirrors storecontract.DayTokens. +type DayTokens struct { + state protoimpl.MessageState `protogen:"open.v1"` + Day string `protobuf:"bytes,1,opt,name=day,proto3" json:"day,omitempty"` + Tokens int64 `protobuf:"varint,2,opt,name=tokens,proto3" json:"tokens,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DayTokens) Reset() { + *x = DayTokens{} + mi := &file_state_v1_stats_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DayTokens) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DayTokens) ProtoMessage() {} + +func (x *DayTokens) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_stats_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DayTokens.ProtoReflect.Descriptor instead. +func (*DayTokens) Descriptor() ([]byte, []int) { + return file_state_v1_stats_proto_rawDescGZIP(), []int{2} +} + +func (x *DayTokens) GetDay() string { + if x != nil { + return x.Day + } + return "" +} + +func (x *DayTokens) GetTokens() int64 { + if x != nil { + return x.Tokens + } + return 0 +} + +type StatusCountsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StatusCountsRequest) Reset() { + *x = StatusCountsRequest{} + mi := &file_state_v1_stats_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StatusCountsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatusCountsRequest) ProtoMessage() {} + +func (x *StatusCountsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_stats_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatusCountsRequest.ProtoReflect.Descriptor instead. +func (*StatusCountsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_stats_proto_rawDescGZIP(), []int{3} +} + +type StatusCountsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Counts map[string]int64 `protobuf:"bytes,1,rep,name=counts,proto3" json:"counts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StatusCountsResponse) Reset() { + *x = StatusCountsResponse{} + mi := &file_state_v1_stats_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StatusCountsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatusCountsResponse) ProtoMessage() {} + +func (x *StatusCountsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_stats_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatusCountsResponse.ProtoReflect.Descriptor instead. +func (*StatusCountsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_stats_proto_rawDescGZIP(), []int{4} +} + +func (x *StatusCountsResponse) GetCounts() map[string]int64 { + if x != nil { + return x.Counts + } + return nil +} + +type WorkflowStatsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkflowStatsRequest) Reset() { + *x = WorkflowStatsRequest{} + mi := &file_state_v1_stats_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkflowStatsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowStatsRequest) ProtoMessage() {} + +func (x *WorkflowStatsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_stats_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowStatsRequest.ProtoReflect.Descriptor instead. +func (*WorkflowStatsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_stats_proto_rawDescGZIP(), []int{5} +} + +type WorkflowStatsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Stats []*WorkflowStat `protobuf:"bytes,1,rep,name=stats,proto3" json:"stats,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkflowStatsResponse) Reset() { + *x = WorkflowStatsResponse{} + mi := &file_state_v1_stats_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkflowStatsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowStatsResponse) ProtoMessage() {} + +func (x *WorkflowStatsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_stats_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowStatsResponse.ProtoReflect.Descriptor instead. +func (*WorkflowStatsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_stats_proto_rawDescGZIP(), []int{6} +} + +func (x *WorkflowStatsResponse) GetStats() []*WorkflowStat { + if x != nil { + return x.Stats + } + return nil +} + +type StageStatsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StageStatsRequest) Reset() { + *x = StageStatsRequest{} + mi := &file_state_v1_stats_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StageStatsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StageStatsRequest) ProtoMessage() {} + +func (x *StageStatsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_stats_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StageStatsRequest.ProtoReflect.Descriptor instead. +func (*StageStatsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_stats_proto_rawDescGZIP(), []int{7} +} + +type StageStatsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Stats []*StageStat `protobuf:"bytes,1,rep,name=stats,proto3" json:"stats,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StageStatsResponse) Reset() { + *x = StageStatsResponse{} + mi := &file_state_v1_stats_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StageStatsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StageStatsResponse) ProtoMessage() {} + +func (x *StageStatsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_stats_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StageStatsResponse.ProtoReflect.Descriptor instead. +func (*StageStatsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_stats_proto_rawDescGZIP(), []int{8} +} + +func (x *StageStatsResponse) GetStats() []*StageStat { + if x != nil { + return x.Stats + } + return nil +} + +type TokensByDayRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Days int64 `protobuf:"varint,1,opt,name=days,proto3" json:"days,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TokensByDayRequest) Reset() { + *x = TokensByDayRequest{} + mi := &file_state_v1_stats_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TokensByDayRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokensByDayRequest) ProtoMessage() {} + +func (x *TokensByDayRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_stats_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokensByDayRequest.ProtoReflect.Descriptor instead. +func (*TokensByDayRequest) Descriptor() ([]byte, []int) { + return file_state_v1_stats_proto_rawDescGZIP(), []int{9} +} + +func (x *TokensByDayRequest) GetDays() int64 { + if x != nil { + return x.Days + } + return 0 +} + +type TokensByDayResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Tokens []*DayTokens `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TokensByDayResponse) Reset() { + *x = TokensByDayResponse{} + mi := &file_state_v1_stats_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TokensByDayResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokensByDayResponse) ProtoMessage() {} + +func (x *TokensByDayResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_stats_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokensByDayResponse.ProtoReflect.Descriptor instead. +func (*TokensByDayResponse) Descriptor() ([]byte, []int) { + return file_state_v1_stats_proto_rawDescGZIP(), []int{10} +} + +func (x *TokensByDayResponse) GetTokens() []*DayTokens { + if x != nil { + return x.Tokens + } + return nil +} + +var File_state_v1_stats_proto protoreflect.FileDescriptor + +const file_state_v1_stats_proto_rawDesc = "" + + "\n" + + "\x14state/v1/stats.proto\x12\bstate.v1\"\x84\x02\n" + + "\fWorkflowStat\x12\x1a\n" + + "\bworkflow\x18\x01 \x01(\tR\bworkflow\x12\x12\n" + + "\x04runs\x18\x02 \x01(\x03R\x04runs\x12\x16\n" + + "\x06merged\x18\x03 \x01(\x03R\x06merged\x12\x17\n" + + "\apr_open\x18\x04 \x01(\x03R\x06prOpen\x12\x16\n" + + "\x06parked\x18\x05 \x01(\x03R\x06parked\x12\x1d\n" + + "\n" + + "avg_tokens\x18\x06 \x01(\x03R\tavgTokens\x12\x1b\n" + + "\tavg_steps\x18\a \x01(\x01R\bavgSteps\x12!\n" + + "\ftotal_tokens\x18\b \x01(\x03R\vtotalTokens\x12\x1c\n" + + "\tcompleted\x18\t \x01(\x03R\tcompleted\"\x80\x01\n" + + "\tStageStat\x12\x1a\n" + + "\bworkflow\x18\x01 \x01(\tR\bworkflow\x12\x14\n" + + "\x05stage\x18\x02 \x01(\tR\x05stage\x12\x12\n" + + "\x04runs\x18\x03 \x01(\x03R\x04runs\x12\x15\n" + + "\x06avg_ms\x18\x04 \x01(\x03R\x05avgMs\x12\x16\n" + + "\x06errors\x18\x05 \x01(\x03R\x06errors\"5\n" + + "\tDayTokens\x12\x10\n" + + "\x03day\x18\x01 \x01(\tR\x03day\x12\x16\n" + + "\x06tokens\x18\x02 \x01(\x03R\x06tokens\"\x15\n" + + "\x13StatusCountsRequest\"\x95\x01\n" + + "\x14StatusCountsResponse\x12B\n" + + "\x06counts\x18\x01 \x03(\v2*.state.v1.StatusCountsResponse.CountsEntryR\x06counts\x1a9\n" + + "\vCountsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x03R\x05value:\x028\x01\"\x16\n" + + "\x14WorkflowStatsRequest\"E\n" + + "\x15WorkflowStatsResponse\x12,\n" + + "\x05stats\x18\x01 \x03(\v2\x16.state.v1.WorkflowStatR\x05stats\"\x13\n" + + "\x11StageStatsRequest\"?\n" + + "\x12StageStatsResponse\x12)\n" + + "\x05stats\x18\x01 \x03(\v2\x13.state.v1.StageStatR\x05stats\"(\n" + + "\x12TokensByDayRequest\x12\x12\n" + + "\x04days\x18\x01 \x01(\x03R\x04days\"B\n" + + "\x13TokensByDayResponse\x12+\n" + + "\x06tokens\x18\x01 \x03(\v2\x13.state.v1.DayTokensR\x06tokens2\xc4\x02\n" + + "\fStatsService\x12M\n" + + "\fStatusCounts\x12\x1d.state.v1.StatusCountsRequest\x1a\x1e.state.v1.StatusCountsResponse\x12P\n" + + "\rWorkflowStats\x12\x1e.state.v1.WorkflowStatsRequest\x1a\x1f.state.v1.WorkflowStatsResponse\x12G\n" + + "\n" + + "StageStats\x12\x1b.state.v1.StageStatsRequest\x1a\x1c.state.v1.StageStatsResponse\x12J\n" + + "\vTokensByDay\x12\x1c.state.v1.TokensByDayRequest\x1a\x1d.state.v1.TokensByDayResponseB\xa4\x01\n" + + "\fcom.state.v1B\n" + + "StatsProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_stats_proto_rawDescOnce sync.Once + file_state_v1_stats_proto_rawDescData []byte +) + +func file_state_v1_stats_proto_rawDescGZIP() []byte { + file_state_v1_stats_proto_rawDescOnce.Do(func() { + file_state_v1_stats_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_stats_proto_rawDesc), len(file_state_v1_stats_proto_rawDesc))) + }) + return file_state_v1_stats_proto_rawDescData +} + +var file_state_v1_stats_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_state_v1_stats_proto_goTypes = []any{ + (*WorkflowStat)(nil), // 0: state.v1.WorkflowStat + (*StageStat)(nil), // 1: state.v1.StageStat + (*DayTokens)(nil), // 2: state.v1.DayTokens + (*StatusCountsRequest)(nil), // 3: state.v1.StatusCountsRequest + (*StatusCountsResponse)(nil), // 4: state.v1.StatusCountsResponse + (*WorkflowStatsRequest)(nil), // 5: state.v1.WorkflowStatsRequest + (*WorkflowStatsResponse)(nil), // 6: state.v1.WorkflowStatsResponse + (*StageStatsRequest)(nil), // 7: state.v1.StageStatsRequest + (*StageStatsResponse)(nil), // 8: state.v1.StageStatsResponse + (*TokensByDayRequest)(nil), // 9: state.v1.TokensByDayRequest + (*TokensByDayResponse)(nil), // 10: state.v1.TokensByDayResponse + nil, // 11: state.v1.StatusCountsResponse.CountsEntry +} +var file_state_v1_stats_proto_depIdxs = []int32{ + 11, // 0: state.v1.StatusCountsResponse.counts:type_name -> state.v1.StatusCountsResponse.CountsEntry + 0, // 1: state.v1.WorkflowStatsResponse.stats:type_name -> state.v1.WorkflowStat + 1, // 2: state.v1.StageStatsResponse.stats:type_name -> state.v1.StageStat + 2, // 3: state.v1.TokensByDayResponse.tokens:type_name -> state.v1.DayTokens + 3, // 4: state.v1.StatsService.StatusCounts:input_type -> state.v1.StatusCountsRequest + 5, // 5: state.v1.StatsService.WorkflowStats:input_type -> state.v1.WorkflowStatsRequest + 7, // 6: state.v1.StatsService.StageStats:input_type -> state.v1.StageStatsRequest + 9, // 7: state.v1.StatsService.TokensByDay:input_type -> state.v1.TokensByDayRequest + 4, // 8: state.v1.StatsService.StatusCounts:output_type -> state.v1.StatusCountsResponse + 6, // 9: state.v1.StatsService.WorkflowStats:output_type -> state.v1.WorkflowStatsResponse + 8, // 10: state.v1.StatsService.StageStats:output_type -> state.v1.StageStatsResponse + 10, // 11: state.v1.StatsService.TokensByDay:output_type -> state.v1.TokensByDayResponse + 8, // [8:12] is the sub-list for method output_type + 4, // [4:8] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_state_v1_stats_proto_init() } +func file_state_v1_stats_proto_init() { + if File_state_v1_stats_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_stats_proto_rawDesc), len(file_state_v1_stats_proto_rawDesc)), + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_stats_proto_goTypes, + DependencyIndexes: file_state_v1_stats_proto_depIdxs, + MessageInfos: file_state_v1_stats_proto_msgTypes, + }.Build() + File_state_v1_stats_proto = out.File + file_state_v1_stats_proto_goTypes = nil + file_state_v1_stats_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/stats_grpc.pb.go b/internal/contracts/state/v1/stats_grpc.pb.go new file mode 100644 index 000000000..650f73aab --- /dev/null +++ b/internal/contracts/state/v1/stats_grpc.pb.go @@ -0,0 +1,235 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/stats.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 ( + StatsService_StatusCounts_FullMethodName = "/state.v1.StatsService/StatusCounts" + StatsService_WorkflowStats_FullMethodName = "/state.v1.StatsService/WorkflowStats" + StatsService_StageStats_FullMethodName = "/state.v1.StatsService/StageStats" + StatsService_TokensByDay_FullMethodName = "/state.v1.StatsService/TokensByDay" +) + +// StatsServiceClient is the client API for StatsService 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 StatsServiceClient interface { + StatusCounts(ctx context.Context, in *StatusCountsRequest, opts ...grpc.CallOption) (*StatusCountsResponse, error) + WorkflowStats(ctx context.Context, in *WorkflowStatsRequest, opts ...grpc.CallOption) (*WorkflowStatsResponse, error) + StageStats(ctx context.Context, in *StageStatsRequest, opts ...grpc.CallOption) (*StageStatsResponse, error) + TokensByDay(ctx context.Context, in *TokensByDayRequest, opts ...grpc.CallOption) (*TokensByDayResponse, error) +} + +type statsServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewStatsServiceClient(cc grpc.ClientConnInterface) StatsServiceClient { + return &statsServiceClient{cc} +} + +func (c *statsServiceClient) StatusCounts(ctx context.Context, in *StatusCountsRequest, opts ...grpc.CallOption) (*StatusCountsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(StatusCountsResponse) + err := c.cc.Invoke(ctx, StatsService_StatusCounts_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *statsServiceClient) WorkflowStats(ctx context.Context, in *WorkflowStatsRequest, opts ...grpc.CallOption) (*WorkflowStatsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(WorkflowStatsResponse) + err := c.cc.Invoke(ctx, StatsService_WorkflowStats_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *statsServiceClient) StageStats(ctx context.Context, in *StageStatsRequest, opts ...grpc.CallOption) (*StageStatsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(StageStatsResponse) + err := c.cc.Invoke(ctx, StatsService_StageStats_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *statsServiceClient) TokensByDay(ctx context.Context, in *TokensByDayRequest, opts ...grpc.CallOption) (*TokensByDayResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TokensByDayResponse) + err := c.cc.Invoke(ctx, StatsService_TokensByDay_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// StatsServiceServer is the server API for StatsService service. +// All implementations must embed UnimplementedStatsServiceServer +// for forward compatibility. +type StatsServiceServer interface { + StatusCounts(context.Context, *StatusCountsRequest) (*StatusCountsResponse, error) + WorkflowStats(context.Context, *WorkflowStatsRequest) (*WorkflowStatsResponse, error) + StageStats(context.Context, *StageStatsRequest) (*StageStatsResponse, error) + TokensByDay(context.Context, *TokensByDayRequest) (*TokensByDayResponse, error) + mustEmbedUnimplementedStatsServiceServer() +} + +// UnimplementedStatsServiceServer 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 UnimplementedStatsServiceServer struct{} + +func (UnimplementedStatsServiceServer) StatusCounts(context.Context, *StatusCountsRequest) (*StatusCountsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method StatusCounts not implemented") +} +func (UnimplementedStatsServiceServer) WorkflowStats(context.Context, *WorkflowStatsRequest) (*WorkflowStatsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method WorkflowStats not implemented") +} +func (UnimplementedStatsServiceServer) StageStats(context.Context, *StageStatsRequest) (*StageStatsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method StageStats not implemented") +} +func (UnimplementedStatsServiceServer) TokensByDay(context.Context, *TokensByDayRequest) (*TokensByDayResponse, error) { + return nil, status.Error(codes.Unimplemented, "method TokensByDay not implemented") +} +func (UnimplementedStatsServiceServer) mustEmbedUnimplementedStatsServiceServer() {} +func (UnimplementedStatsServiceServer) testEmbeddedByValue() {} + +// UnsafeStatsServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to StatsServiceServer will +// result in compilation errors. +type UnsafeStatsServiceServer interface { + mustEmbedUnimplementedStatsServiceServer() +} + +func RegisterStatsServiceServer(s grpc.ServiceRegistrar, srv StatsServiceServer) { + // If the following call panics, it indicates UnimplementedStatsServiceServer 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(&StatsService_ServiceDesc, srv) +} + +func _StatsService_StatusCounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatusCountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatsServiceServer).StatusCounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StatsService_StatusCounts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatsServiceServer).StatusCounts(ctx, req.(*StatusCountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StatsService_WorkflowStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WorkflowStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatsServiceServer).WorkflowStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StatsService_WorkflowStats_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatsServiceServer).WorkflowStats(ctx, req.(*WorkflowStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StatsService_StageStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StageStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatsServiceServer).StageStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StatsService_StageStats_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatsServiceServer).StageStats(ctx, req.(*StageStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StatsService_TokensByDay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TokensByDayRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatsServiceServer).TokensByDay(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StatsService_TokensByDay_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatsServiceServer).TokensByDay(ctx, req.(*TokensByDayRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// StatsService_ServiceDesc is the grpc.ServiceDesc for StatsService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var StatsService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.StatsService", + HandlerType: (*StatsServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "StatusCounts", + Handler: _StatsService_StatusCounts_Handler, + }, + { + MethodName: "WorkflowStats", + Handler: _StatsService_WorkflowStats_Handler, + }, + { + MethodName: "StageStats", + Handler: _StatsService_StageStats_Handler, + }, + { + MethodName: "TokensByDay", + Handler: _StatsService_TokensByDay_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "state/v1/stats.proto", +} diff --git a/internal/contracts/state/v1/status.pb.go b/internal/contracts/state/v1/status.pb.go new file mode 100644 index 000000000..0a8eb5752 --- /dev/null +++ b/internal/contracts/state/v1/status.pb.go @@ -0,0 +1,1377 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/status.proto + +package statev1 + +import ( + v1 "github.com/samcharles93/archie-core/internal/contracts/logging/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// ConfigSnapshot carries the dashboard's configuration projection. document +// is opaque to the store: its shape belongs to the producer and the page that +// reads it, and schema names that shape so a reader can refuse one it does +// not understand. It is secret-free at the producer -- the projection carries +// an API key's environment variable name and whether it resolved, never a +// value. +type ConfigSnapshot struct { + state protoimpl.MessageState `protogen:"open.v1"` + Schema string `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` + Document []byte `protobuf:"bytes,2,opt,name=document,proto3" json:"document,omitempty"` + PublishedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=published_at,json=publishedAt,proto3" json:"published_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfigSnapshot) Reset() { + *x = ConfigSnapshot{} + mi := &file_state_v1_status_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfigSnapshot) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfigSnapshot) ProtoMessage() {} + +func (x *ConfigSnapshot) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfigSnapshot.ProtoReflect.Descriptor instead. +func (*ConfigSnapshot) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{0} +} + +func (x *ConfigSnapshot) GetSchema() string { + if x != nil { + return x.Schema + } + return "" +} + +func (x *ConfigSnapshot) GetDocument() []byte { + if x != nil { + return x.Document + } + return nil +} + +func (x *ConfigSnapshot) GetPublishedAt() *timestamppb.Timestamp { + if x != nil { + return x.PublishedAt + } + return nil +} + +type PutConfigSnapshotRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Snapshot *ConfigSnapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PutConfigSnapshotRequest) Reset() { + *x = PutConfigSnapshotRequest{} + mi := &file_state_v1_status_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PutConfigSnapshotRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutConfigSnapshotRequest) ProtoMessage() {} + +func (x *PutConfigSnapshotRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutConfigSnapshotRequest.ProtoReflect.Descriptor instead. +func (*PutConfigSnapshotRequest) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{1} +} + +func (x *PutConfigSnapshotRequest) GetSnapshot() *ConfigSnapshot { + if x != nil { + return x.Snapshot + } + return nil +} + +type PutConfigSnapshotResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PutConfigSnapshotResponse) Reset() { + *x = PutConfigSnapshotResponse{} + mi := &file_state_v1_status_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PutConfigSnapshotResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutConfigSnapshotResponse) ProtoMessage() {} + +func (x *PutConfigSnapshotResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutConfigSnapshotResponse.ProtoReflect.Descriptor instead. +func (*PutConfigSnapshotResponse) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{2} +} + +type GetConfigSnapshotRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetConfigSnapshotRequest) Reset() { + *x = GetConfigSnapshotRequest{} + mi := &file_state_v1_status_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetConfigSnapshotRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConfigSnapshotRequest) ProtoMessage() {} + +func (x *GetConfigSnapshotRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConfigSnapshotRequest.ProtoReflect.Descriptor instead. +func (*GetConfigSnapshotRequest) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{3} +} + +type GetConfigSnapshotResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Snapshot *ConfigSnapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` + Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetConfigSnapshotResponse) Reset() { + *x = GetConfigSnapshotResponse{} + mi := &file_state_v1_status_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetConfigSnapshotResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConfigSnapshotResponse) ProtoMessage() {} + +func (x *GetConfigSnapshotResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConfigSnapshotResponse.ProtoReflect.Descriptor instead. +func (*GetConfigSnapshotResponse) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{4} +} + +func (x *GetConfigSnapshotResponse) GetSnapshot() *ConfigSnapshot { + if x != nil { + return x.Snapshot + } + return nil +} + +func (x *GetConfigSnapshotResponse) GetFound() bool { + if x != nil { + return x.Found + } + return false +} + +// ChannelStatus is one channel's runtime state, as the process hosting it +// observes it. ReloadSupported is a capability declaration, not a request: the +// service reports it, so a reader may offer a reload action -- but asking for one +// travels on its own surface, because a transient request and a durable state do +// not share a lifetime. +type ChannelStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` + Detail string `protobuf:"bytes,4,opt,name=detail,proto3" json:"detail,omitempty"` + Configured bool `protobuf:"varint,5,opt,name=configured,proto3" json:"configured,omitempty"` + ReloadSupported bool `protobuf:"varint,6,opt,name=reload_supported,json=reloadSupported,proto3" json:"reload_supported,omitempty"` + ObservedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=observed_at,json=observedAt,proto3" json:"observed_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChannelStatus) Reset() { + *x = ChannelStatus{} + mi := &file_state_v1_status_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChannelStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChannelStatus) ProtoMessage() {} + +func (x *ChannelStatus) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChannelStatus.ProtoReflect.Descriptor instead. +func (*ChannelStatus) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{5} +} + +func (x *ChannelStatus) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ChannelStatus) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ChannelStatus) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *ChannelStatus) GetDetail() string { + if x != nil { + return x.Detail + } + return "" +} + +func (x *ChannelStatus) GetConfigured() bool { + if x != nil { + return x.Configured + } + return false +} + +func (x *ChannelStatus) GetReloadSupported() bool { + if x != nil { + return x.ReloadSupported + } + return false +} + +func (x *ChannelStatus) GetObservedAt() *timestamppb.Timestamp { + if x != nil { + return x.ObservedAt + } + return nil +} + +type PutChannelStatusRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Channels []*ChannelStatus `protobuf:"bytes,1,rep,name=channels,proto3" json:"channels,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PutChannelStatusRequest) Reset() { + *x = PutChannelStatusRequest{} + mi := &file_state_v1_status_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PutChannelStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutChannelStatusRequest) ProtoMessage() {} + +func (x *PutChannelStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutChannelStatusRequest.ProtoReflect.Descriptor instead. +func (*PutChannelStatusRequest) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{6} +} + +func (x *PutChannelStatusRequest) GetChannels() []*ChannelStatus { + if x != nil { + return x.Channels + } + return nil +} + +type PutChannelStatusResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PutChannelStatusResponse) Reset() { + *x = PutChannelStatusResponse{} + mi := &file_state_v1_status_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PutChannelStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutChannelStatusResponse) ProtoMessage() {} + +func (x *PutChannelStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutChannelStatusResponse.ProtoReflect.Descriptor instead. +func (*PutChannelStatusResponse) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{7} +} + +type ListChannelStatusRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListChannelStatusRequest) Reset() { + *x = ListChannelStatusRequest{} + mi := &file_state_v1_status_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListChannelStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListChannelStatusRequest) ProtoMessage() {} + +func (x *ListChannelStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListChannelStatusRequest.ProtoReflect.Descriptor instead. +func (*ListChannelStatusRequest) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{8} +} + +type ListChannelStatusResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Channels []*ChannelStatus `protobuf:"bytes,1,rep,name=channels,proto3" json:"channels,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListChannelStatusResponse) Reset() { + *x = ListChannelStatusResponse{} + mi := &file_state_v1_status_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListChannelStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListChannelStatusResponse) ProtoMessage() {} + +func (x *ListChannelStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListChannelStatusResponse.ProtoReflect.Descriptor instead. +func (*ListChannelStatusResponse) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{9} +} + +func (x *ListChannelStatusResponse) GetChannels() []*ChannelStatus { + if x != nil { + return x.Channels + } + return nil +} + +// ApplyStatus is one process's report about one control-plane resource kind. +// applied_version is the version that process is running; error is set when it +// could not apply what the store returned, and leaves applied_version at the +// last version it did apply. reported_at is re-stamped on an interval, so a +// record older than the staleness window belongs to a process that has stopped +// running (docs/prds/control-plane-apply-status.md). +type ApplyStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + Process string `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + AppliedVersion int64 `protobuf:"varint,3,opt,name=applied_version,json=appliedVersion,proto3" json:"applied_version,omitempty"` + Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` + ReportedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=reported_at,json=reportedAt,proto3" json:"reported_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ApplyStatus) Reset() { + *x = ApplyStatus{} + mi := &file_state_v1_status_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApplyStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApplyStatus) ProtoMessage() {} + +func (x *ApplyStatus) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApplyStatus.ProtoReflect.Descriptor instead. +func (*ApplyStatus) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{10} +} + +func (x *ApplyStatus) GetProcess() string { + if x != nil { + return x.Process + } + return "" +} + +func (x *ApplyStatus) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *ApplyStatus) GetAppliedVersion() int64 { + if x != nil { + return x.AppliedVersion + } + return 0 +} + +func (x *ApplyStatus) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +func (x *ApplyStatus) GetReportedAt() *timestamppb.Timestamp { + if x != nil { + return x.ReportedAt + } + return nil +} + +type PutApplyStatusRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *ApplyStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PutApplyStatusRequest) Reset() { + *x = PutApplyStatusRequest{} + mi := &file_state_v1_status_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PutApplyStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutApplyStatusRequest) ProtoMessage() {} + +func (x *PutApplyStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutApplyStatusRequest.ProtoReflect.Descriptor instead. +func (*PutApplyStatusRequest) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{11} +} + +func (x *PutApplyStatusRequest) GetStatus() *ApplyStatus { + if x != nil { + return x.Status + } + return nil +} + +type PutApplyStatusResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PutApplyStatusResponse) Reset() { + *x = PutApplyStatusResponse{} + mi := &file_state_v1_status_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PutApplyStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutApplyStatusResponse) ProtoMessage() {} + +func (x *PutApplyStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutApplyStatusResponse.ProtoReflect.Descriptor instead. +func (*PutApplyStatusResponse) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{12} +} + +type ListApplyStatusRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListApplyStatusRequest) Reset() { + *x = ListApplyStatusRequest{} + mi := &file_state_v1_status_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListApplyStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListApplyStatusRequest) ProtoMessage() {} + +func (x *ListApplyStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListApplyStatusRequest.ProtoReflect.Descriptor instead. +func (*ListApplyStatusRequest) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{13} +} + +type ListApplyStatusResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Statuses []*ApplyStatus `protobuf:"bytes,1,rep,name=statuses,proto3" json:"statuses,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListApplyStatusResponse) Reset() { + *x = ListApplyStatusResponse{} + mi := &file_state_v1_status_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListApplyStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListApplyStatusResponse) ProtoMessage() {} + +func (x *ListApplyStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListApplyStatusResponse.ProtoReflect.Descriptor instead. +func (*ListApplyStatusResponse) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{14} +} + +func (x *ListApplyStatusResponse) GetStatuses() []*ApplyStatus { + if x != nil { + return x.Statuses + } + return nil +} + +// Presence is one running service instance. ready and detail summarise its +// readiness probes; detail names the degraded ones. +type DependencyCheck struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + Ready bool `protobuf:"varint,3,opt,name=ready,proto3" json:"ready,omitempty"` + Detail string `protobuf:"bytes,4,opt,name=detail,proto3" json:"detail,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DependencyCheck) Reset() { + *x = DependencyCheck{} + mi := &file_state_v1_status_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DependencyCheck) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DependencyCheck) ProtoMessage() {} + +func (x *DependencyCheck) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DependencyCheck.ProtoReflect.Descriptor instead. +func (*DependencyCheck) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{15} +} + +func (x *DependencyCheck) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DependencyCheck) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *DependencyCheck) GetReady() bool { + if x != nil { + return x.Ready + } + return false +} + +func (x *DependencyCheck) GetDetail() string { + if x != nil { + return x.Detail + } + return "" +} + +type Presence struct { + state protoimpl.MessageState `protogen:"open.v1"` + Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` + InstanceId string `protobuf:"bytes,2,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + InstallType string `protobuf:"bytes,4,opt,name=install_type,json=installType,proto3" json:"install_type,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + ReportedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=reported_at,json=reportedAt,proto3" json:"reported_at,omitempty"` + Ready bool `protobuf:"varint,7,opt,name=ready,proto3" json:"ready,omitempty"` + Detail string `protobuf:"bytes,8,opt,name=detail,proto3" json:"detail,omitempty"` + Checks []*DependencyCheck `protobuf:"bytes,9,rep,name=checks,proto3" json:"checks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Presence) Reset() { + *x = Presence{} + mi := &file_state_v1_status_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Presence) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Presence) ProtoMessage() {} + +func (x *Presence) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Presence.ProtoReflect.Descriptor instead. +func (*Presence) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{16} +} + +func (x *Presence) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *Presence) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *Presence) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Presence) GetInstallType() string { + if x != nil { + return x.InstallType + } + return "" +} + +func (x *Presence) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +func (x *Presence) GetReportedAt() *timestamppb.Timestamp { + if x != nil { + return x.ReportedAt + } + return nil +} + +func (x *Presence) GetReady() bool { + if x != nil { + return x.Ready + } + return false +} + +func (x *Presence) GetDetail() string { + if x != nil { + return x.Detail + } + return "" +} + +func (x *Presence) GetChecks() []*DependencyCheck { + if x != nil { + return x.Checks + } + return nil +} + +type PutPresenceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Presence *Presence `protobuf:"bytes,1,opt,name=presence,proto3" json:"presence,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PutPresenceRequest) Reset() { + *x = PutPresenceRequest{} + mi := &file_state_v1_status_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PutPresenceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutPresenceRequest) ProtoMessage() {} + +func (x *PutPresenceRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutPresenceRequest.ProtoReflect.Descriptor instead. +func (*PutPresenceRequest) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{17} +} + +func (x *PutPresenceRequest) GetPresence() *Presence { + if x != nil { + return x.Presence + } + return nil +} + +type PutPresenceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PutPresenceResponse) Reset() { + *x = PutPresenceResponse{} + mi := &file_state_v1_status_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PutPresenceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutPresenceResponse) ProtoMessage() {} + +func (x *PutPresenceResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutPresenceResponse.ProtoReflect.Descriptor instead. +func (*PutPresenceResponse) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{18} +} + +type ListPresenceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPresenceRequest) Reset() { + *x = ListPresenceRequest{} + mi := &file_state_v1_status_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPresenceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPresenceRequest) ProtoMessage() {} + +func (x *ListPresenceRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPresenceRequest.ProtoReflect.Descriptor instead. +func (*ListPresenceRequest) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{19} +} + +type ListPresenceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Presences []*Presence `protobuf:"bytes,1,rep,name=presences,proto3" json:"presences,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPresenceResponse) Reset() { + *x = ListPresenceResponse{} + mi := &file_state_v1_status_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPresenceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPresenceResponse) ProtoMessage() {} + +func (x *ListPresenceResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPresenceResponse.ProtoReflect.Descriptor instead. +func (*ListPresenceResponse) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{20} +} + +func (x *ListPresenceResponse) GetPresences() []*Presence { + if x != nil { + return x.Presences + } + return nil +} + +type RecentLogsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Query *v1.LogQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecentLogsRequest) Reset() { + *x = RecentLogsRequest{} + mi := &file_state_v1_status_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecentLogsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecentLogsRequest) ProtoMessage() {} + +func (x *RecentLogsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecentLogsRequest.ProtoReflect.Descriptor instead. +func (*RecentLogsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{21} +} + +func (x *RecentLogsRequest) GetQuery() *v1.LogQuery { + if x != nil { + return x.Query + } + return nil +} + +type RecentLogsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Snapshot *v1.LogSnapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecentLogsResponse) Reset() { + *x = RecentLogsResponse{} + mi := &file_state_v1_status_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecentLogsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecentLogsResponse) ProtoMessage() {} + +func (x *RecentLogsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_status_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecentLogsResponse.ProtoReflect.Descriptor instead. +func (*RecentLogsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_status_proto_rawDescGZIP(), []int{22} +} + +func (x *RecentLogsResponse) GetSnapshot() *v1.LogSnapshot { + if x != nil { + return x.Snapshot + } + return nil +} + +var File_state_v1_status_proto protoreflect.FileDescriptor + +const file_state_v1_status_proto_rawDesc = "" + + "\n" + + "\x15state/v1/status.proto\x12\bstate.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x18logging/v1/logging.proto\"\x83\x01\n" + + "\x0eConfigSnapshot\x12\x16\n" + + "\x06schema\x18\x01 \x01(\tR\x06schema\x12\x1a\n" + + "\bdocument\x18\x02 \x01(\fR\bdocument\x12=\n" + + "\fpublished_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\vpublishedAt\"P\n" + + "\x18PutConfigSnapshotRequest\x124\n" + + "\bsnapshot\x18\x01 \x01(\v2\x18.state.v1.ConfigSnapshotR\bsnapshot\"\x1b\n" + + "\x19PutConfigSnapshotResponse\"\x1a\n" + + "\x18GetConfigSnapshotRequest\"g\n" + + "\x19GetConfigSnapshotResponse\x124\n" + + "\bsnapshot\x18\x01 \x01(\v2\x18.state.v1.ConfigSnapshotR\bsnapshot\x12\x14\n" + + "\x05found\x18\x02 \x01(\bR\x05found\"\xe9\x01\n" + + "\rChannelStatus\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + + "\x05state\x18\x03 \x01(\tR\x05state\x12\x16\n" + + "\x06detail\x18\x04 \x01(\tR\x06detail\x12\x1e\n" + + "\n" + + "configured\x18\x05 \x01(\bR\n" + + "configured\x12)\n" + + "\x10reload_supported\x18\x06 \x01(\bR\x0freloadSupported\x12;\n" + + "\vobserved_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "observedAt\"N\n" + + "\x17PutChannelStatusRequest\x123\n" + + "\bchannels\x18\x01 \x03(\v2\x17.state.v1.ChannelStatusR\bchannels\"\x1a\n" + + "\x18PutChannelStatusResponse\"\x1a\n" + + "\x18ListChannelStatusRequest\"P\n" + + "\x19ListChannelStatusResponse\x123\n" + + "\bchannels\x18\x01 \x03(\v2\x17.state.v1.ChannelStatusR\bchannels\"\xb7\x01\n" + + "\vApplyStatus\x12\x18\n" + + "\aprocess\x18\x01 \x01(\tR\aprocess\x12\x12\n" + + "\x04kind\x18\x02 \x01(\tR\x04kind\x12'\n" + + "\x0fapplied_version\x18\x03 \x01(\x03R\x0eappliedVersion\x12\x14\n" + + "\x05error\x18\x04 \x01(\tR\x05error\x12;\n" + + "\vreported_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "reportedAt\"F\n" + + "\x15PutApplyStatusRequest\x12-\n" + + "\x06status\x18\x01 \x01(\v2\x15.state.v1.ApplyStatusR\x06status\"\x18\n" + + "\x16PutApplyStatusResponse\"\x18\n" + + "\x16ListApplyStatusRequest\"L\n" + + "\x17ListApplyStatusResponse\x121\n" + + "\bstatuses\x18\x01 \x03(\v2\x15.state.v1.ApplyStatusR\bstatuses\"k\n" + + "\x0fDependencyCheck\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" + + "\x06status\x18\x02 \x01(\tR\x06status\x12\x14\n" + + "\x05ready\x18\x03 \x01(\bR\x05ready\x12\x16\n" + + "\x06detail\x18\x04 \x01(\tR\x06detail\"\xdb\x02\n" + + "\bPresence\x12\x18\n" + + "\aservice\x18\x01 \x01(\tR\aservice\x12\x1f\n" + + "\vinstance_id\x18\x02 \x01(\tR\n" + + "instanceId\x12\x18\n" + + "\aversion\x18\x03 \x01(\tR\aversion\x12!\n" + + "\finstall_type\x18\x04 \x01(\tR\vinstallType\x129\n" + + "\n" + + "started_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tstartedAt\x12;\n" + + "\vreported_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "reportedAt\x12\x14\n" + + "\x05ready\x18\a \x01(\bR\x05ready\x12\x16\n" + + "\x06detail\x18\b \x01(\tR\x06detail\x121\n" + + "\x06checks\x18\t \x03(\v2\x19.state.v1.DependencyCheckR\x06checks\"D\n" + + "\x12PutPresenceRequest\x12.\n" + + "\bpresence\x18\x01 \x01(\v2\x12.state.v1.PresenceR\bpresence\"\x15\n" + + "\x13PutPresenceResponse\"\x15\n" + + "\x13ListPresenceRequest\"H\n" + + "\x14ListPresenceResponse\x120\n" + + "\tpresences\x18\x01 \x03(\v2\x12.state.v1.PresenceR\tpresences\"?\n" + + "\x11RecentLogsRequest\x12*\n" + + "\x05query\x18\x01 \x01(\v2\x14.logging.v1.LogQueryR\x05query\"I\n" + + "\x12RecentLogsResponse\x123\n" + + "\bsnapshot\x18\x01 \x01(\v2\x17.logging.v1.LogSnapshotR\bsnapshot2\x95\x06\n" + + "\rStatusService\x12G\n" + + "\n" + + "RecentLogs\x12\x1b.state.v1.RecentLogsRequest\x1a\x1c.state.v1.RecentLogsResponse\x12\\\n" + + "\x11PutConfigSnapshot\x12\".state.v1.PutConfigSnapshotRequest\x1a#.state.v1.PutConfigSnapshotResponse\x12\\\n" + + "\x11GetConfigSnapshot\x12\".state.v1.GetConfigSnapshotRequest\x1a#.state.v1.GetConfigSnapshotResponse\x12Y\n" + + "\x10PutChannelStatus\x12!.state.v1.PutChannelStatusRequest\x1a\".state.v1.PutChannelStatusResponse\x12\\\n" + + "\x11ListChannelStatus\x12\".state.v1.ListChannelStatusRequest\x1a#.state.v1.ListChannelStatusResponse\x12S\n" + + "\x0ePutApplyStatus\x12\x1f.state.v1.PutApplyStatusRequest\x1a .state.v1.PutApplyStatusResponse\x12V\n" + + "\x0fListApplyStatus\x12 .state.v1.ListApplyStatusRequest\x1a!.state.v1.ListApplyStatusResponse\x12J\n" + + "\vPutPresence\x12\x1c.state.v1.PutPresenceRequest\x1a\x1d.state.v1.PutPresenceResponse\x12M\n" + + "\fListPresence\x12\x1d.state.v1.ListPresenceRequest\x1a\x1e.state.v1.ListPresenceResponseB\xa5\x01\n" + + "\fcom.state.v1B\vStatusProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_status_proto_rawDescOnce sync.Once + file_state_v1_status_proto_rawDescData []byte +) + +func file_state_v1_status_proto_rawDescGZIP() []byte { + file_state_v1_status_proto_rawDescOnce.Do(func() { + file_state_v1_status_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_status_proto_rawDesc), len(file_state_v1_status_proto_rawDesc))) + }) + return file_state_v1_status_proto_rawDescData +} + +var file_state_v1_status_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_state_v1_status_proto_goTypes = []any{ + (*ConfigSnapshot)(nil), // 0: state.v1.ConfigSnapshot + (*PutConfigSnapshotRequest)(nil), // 1: state.v1.PutConfigSnapshotRequest + (*PutConfigSnapshotResponse)(nil), // 2: state.v1.PutConfigSnapshotResponse + (*GetConfigSnapshotRequest)(nil), // 3: state.v1.GetConfigSnapshotRequest + (*GetConfigSnapshotResponse)(nil), // 4: state.v1.GetConfigSnapshotResponse + (*ChannelStatus)(nil), // 5: state.v1.ChannelStatus + (*PutChannelStatusRequest)(nil), // 6: state.v1.PutChannelStatusRequest + (*PutChannelStatusResponse)(nil), // 7: state.v1.PutChannelStatusResponse + (*ListChannelStatusRequest)(nil), // 8: state.v1.ListChannelStatusRequest + (*ListChannelStatusResponse)(nil), // 9: state.v1.ListChannelStatusResponse + (*ApplyStatus)(nil), // 10: state.v1.ApplyStatus + (*PutApplyStatusRequest)(nil), // 11: state.v1.PutApplyStatusRequest + (*PutApplyStatusResponse)(nil), // 12: state.v1.PutApplyStatusResponse + (*ListApplyStatusRequest)(nil), // 13: state.v1.ListApplyStatusRequest + (*ListApplyStatusResponse)(nil), // 14: state.v1.ListApplyStatusResponse + (*DependencyCheck)(nil), // 15: state.v1.DependencyCheck + (*Presence)(nil), // 16: state.v1.Presence + (*PutPresenceRequest)(nil), // 17: state.v1.PutPresenceRequest + (*PutPresenceResponse)(nil), // 18: state.v1.PutPresenceResponse + (*ListPresenceRequest)(nil), // 19: state.v1.ListPresenceRequest + (*ListPresenceResponse)(nil), // 20: state.v1.ListPresenceResponse + (*RecentLogsRequest)(nil), // 21: state.v1.RecentLogsRequest + (*RecentLogsResponse)(nil), // 22: state.v1.RecentLogsResponse + (*timestamppb.Timestamp)(nil), // 23: google.protobuf.Timestamp + (*v1.LogQuery)(nil), // 24: logging.v1.LogQuery + (*v1.LogSnapshot)(nil), // 25: logging.v1.LogSnapshot +} +var file_state_v1_status_proto_depIdxs = []int32{ + 23, // 0: state.v1.ConfigSnapshot.published_at:type_name -> google.protobuf.Timestamp + 0, // 1: state.v1.PutConfigSnapshotRequest.snapshot:type_name -> state.v1.ConfigSnapshot + 0, // 2: state.v1.GetConfigSnapshotResponse.snapshot:type_name -> state.v1.ConfigSnapshot + 23, // 3: state.v1.ChannelStatus.observed_at:type_name -> google.protobuf.Timestamp + 5, // 4: state.v1.PutChannelStatusRequest.channels:type_name -> state.v1.ChannelStatus + 5, // 5: state.v1.ListChannelStatusResponse.channels:type_name -> state.v1.ChannelStatus + 23, // 6: state.v1.ApplyStatus.reported_at:type_name -> google.protobuf.Timestamp + 10, // 7: state.v1.PutApplyStatusRequest.status:type_name -> state.v1.ApplyStatus + 10, // 8: state.v1.ListApplyStatusResponse.statuses:type_name -> state.v1.ApplyStatus + 23, // 9: state.v1.Presence.started_at:type_name -> google.protobuf.Timestamp + 23, // 10: state.v1.Presence.reported_at:type_name -> google.protobuf.Timestamp + 15, // 11: state.v1.Presence.checks:type_name -> state.v1.DependencyCheck + 16, // 12: state.v1.PutPresenceRequest.presence:type_name -> state.v1.Presence + 16, // 13: state.v1.ListPresenceResponse.presences:type_name -> state.v1.Presence + 24, // 14: state.v1.RecentLogsRequest.query:type_name -> logging.v1.LogQuery + 25, // 15: state.v1.RecentLogsResponse.snapshot:type_name -> logging.v1.LogSnapshot + 21, // 16: state.v1.StatusService.RecentLogs:input_type -> state.v1.RecentLogsRequest + 1, // 17: state.v1.StatusService.PutConfigSnapshot:input_type -> state.v1.PutConfigSnapshotRequest + 3, // 18: state.v1.StatusService.GetConfigSnapshot:input_type -> state.v1.GetConfigSnapshotRequest + 6, // 19: state.v1.StatusService.PutChannelStatus:input_type -> state.v1.PutChannelStatusRequest + 8, // 20: state.v1.StatusService.ListChannelStatus:input_type -> state.v1.ListChannelStatusRequest + 11, // 21: state.v1.StatusService.PutApplyStatus:input_type -> state.v1.PutApplyStatusRequest + 13, // 22: state.v1.StatusService.ListApplyStatus:input_type -> state.v1.ListApplyStatusRequest + 17, // 23: state.v1.StatusService.PutPresence:input_type -> state.v1.PutPresenceRequest + 19, // 24: state.v1.StatusService.ListPresence:input_type -> state.v1.ListPresenceRequest + 22, // 25: state.v1.StatusService.RecentLogs:output_type -> state.v1.RecentLogsResponse + 2, // 26: state.v1.StatusService.PutConfigSnapshot:output_type -> state.v1.PutConfigSnapshotResponse + 4, // 27: state.v1.StatusService.GetConfigSnapshot:output_type -> state.v1.GetConfigSnapshotResponse + 7, // 28: state.v1.StatusService.PutChannelStatus:output_type -> state.v1.PutChannelStatusResponse + 9, // 29: state.v1.StatusService.ListChannelStatus:output_type -> state.v1.ListChannelStatusResponse + 12, // 30: state.v1.StatusService.PutApplyStatus:output_type -> state.v1.PutApplyStatusResponse + 14, // 31: state.v1.StatusService.ListApplyStatus:output_type -> state.v1.ListApplyStatusResponse + 18, // 32: state.v1.StatusService.PutPresence:output_type -> state.v1.PutPresenceResponse + 20, // 33: state.v1.StatusService.ListPresence:output_type -> state.v1.ListPresenceResponse + 25, // [25:34] is the sub-list for method output_type + 16, // [16:25] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_state_v1_status_proto_init() } +func file_state_v1_status_proto_init() { + if File_state_v1_status_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_status_proto_rawDesc), len(file_state_v1_status_proto_rawDesc)), + NumEnums: 0, + NumMessages: 23, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_status_proto_goTypes, + DependencyIndexes: file_state_v1_status_proto_depIdxs, + MessageInfos: file_state_v1_status_proto_msgTypes, + }.Build() + File_state_v1_status_proto = out.File + file_state_v1_status_proto_goTypes = nil + file_state_v1_status_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/status_grpc.pb.go b/internal/contracts/state/v1/status_grpc.pb.go new file mode 100644 index 000000000..6d95d4104 --- /dev/null +++ b/internal/contracts/state/v1/status_grpc.pb.go @@ -0,0 +1,461 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/status.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 ( + StatusService_RecentLogs_FullMethodName = "/state.v1.StatusService/RecentLogs" + StatusService_PutConfigSnapshot_FullMethodName = "/state.v1.StatusService/PutConfigSnapshot" + StatusService_GetConfigSnapshot_FullMethodName = "/state.v1.StatusService/GetConfigSnapshot" + StatusService_PutChannelStatus_FullMethodName = "/state.v1.StatusService/PutChannelStatus" + StatusService_ListChannelStatus_FullMethodName = "/state.v1.StatusService/ListChannelStatus" + StatusService_PutApplyStatus_FullMethodName = "/state.v1.StatusService/PutApplyStatus" + StatusService_ListApplyStatus_FullMethodName = "/state.v1.StatusService/ListApplyStatus" + StatusService_PutPresence_FullMethodName = "/state.v1.StatusService/PutPresence" + StatusService_ListPresence_FullMethodName = "/state.v1.StatusService/ListPresence" +) + +// StatusServiceClient is the client API for StatusService 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 StatusServiceClient interface { + RecentLogs(ctx context.Context, in *RecentLogsRequest, opts ...grpc.CallOption) (*RecentLogsResponse, error) + // Configuration snapshot: the running configuration as the dashboard + // renders it, published by the owner of configuration for the process that + // displays it. PutConfigSnapshot is administrative; GetConfigSnapshot is + // the UI's read (docs/architecture/migration-decisions.md, "Dashboard + // configuration page"). + PutConfigSnapshot(ctx context.Context, in *PutConfigSnapshotRequest, opts ...grpc.CallOption) (*PutConfigSnapshotResponse, error) + GetConfigSnapshot(ctx context.Context, in *GetConfigSnapshotRequest, opts ...grpc.CallOption) (*GetConfigSnapshotResponse, error) + // Channel status is what the process HOSTING the channels observes about them: + // one row per channel, written by the Messaging Service and read by the UI + // process. Administrative like the config snapshot, and for the same reason -- + // a task-scoped grant reaches neither, so authorizesTaskScopedCall admits only + // the administrative token. It is runtime state rather than a settings + // document, which is why it is not a ControlPlaneService resource kind. + PutChannelStatus(ctx context.Context, in *PutChannelStatusRequest, opts ...grpc.CallOption) (*PutChannelStatusResponse, error) + ListChannelStatus(ctx context.Context, in *ListChannelStatusRequest, opts ...grpc.CallOption) (*ListChannelStatusResponse, error) + // Apply status: which version of a control-plane resource each process is + // running, and why it could not. Every process that applies a resource + // publishes; the UI process reads (docs/prds/control-plane-apply-status.md). + // Both are administrative. + PutApplyStatus(ctx context.Context, in *PutApplyStatusRequest, opts ...grpc.CallOption) (*PutApplyStatusResponse, error) + ListApplyStatus(ctx context.Context, in *ListApplyStatusRequest, opts ...grpc.CallOption) (*ListApplyStatusResponse, error) + // Presence: every running service instance re-stamps one record, so a + // record past the staleness window means that instance is down. + // Administrative. + PutPresence(ctx context.Context, in *PutPresenceRequest, opts ...grpc.CallOption) (*PutPresenceResponse, error) + ListPresence(ctx context.Context, in *ListPresenceRequest, opts ...grpc.CallOption) (*ListPresenceResponse, error) +} + +type statusServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewStatusServiceClient(cc grpc.ClientConnInterface) StatusServiceClient { + return &statusServiceClient{cc} +} + +func (c *statusServiceClient) RecentLogs(ctx context.Context, in *RecentLogsRequest, opts ...grpc.CallOption) (*RecentLogsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RecentLogsResponse) + err := c.cc.Invoke(ctx, StatusService_RecentLogs_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *statusServiceClient) PutConfigSnapshot(ctx context.Context, in *PutConfigSnapshotRequest, opts ...grpc.CallOption) (*PutConfigSnapshotResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PutConfigSnapshotResponse) + err := c.cc.Invoke(ctx, StatusService_PutConfigSnapshot_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *statusServiceClient) GetConfigSnapshot(ctx context.Context, in *GetConfigSnapshotRequest, opts ...grpc.CallOption) (*GetConfigSnapshotResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetConfigSnapshotResponse) + err := c.cc.Invoke(ctx, StatusService_GetConfigSnapshot_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *statusServiceClient) PutChannelStatus(ctx context.Context, in *PutChannelStatusRequest, opts ...grpc.CallOption) (*PutChannelStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PutChannelStatusResponse) + err := c.cc.Invoke(ctx, StatusService_PutChannelStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *statusServiceClient) ListChannelStatus(ctx context.Context, in *ListChannelStatusRequest, opts ...grpc.CallOption) (*ListChannelStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListChannelStatusResponse) + err := c.cc.Invoke(ctx, StatusService_ListChannelStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *statusServiceClient) PutApplyStatus(ctx context.Context, in *PutApplyStatusRequest, opts ...grpc.CallOption) (*PutApplyStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PutApplyStatusResponse) + err := c.cc.Invoke(ctx, StatusService_PutApplyStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *statusServiceClient) ListApplyStatus(ctx context.Context, in *ListApplyStatusRequest, opts ...grpc.CallOption) (*ListApplyStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListApplyStatusResponse) + err := c.cc.Invoke(ctx, StatusService_ListApplyStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *statusServiceClient) PutPresence(ctx context.Context, in *PutPresenceRequest, opts ...grpc.CallOption) (*PutPresenceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PutPresenceResponse) + err := c.cc.Invoke(ctx, StatusService_PutPresence_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *statusServiceClient) ListPresence(ctx context.Context, in *ListPresenceRequest, opts ...grpc.CallOption) (*ListPresenceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPresenceResponse) + err := c.cc.Invoke(ctx, StatusService_ListPresence_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// StatusServiceServer is the server API for StatusService service. +// All implementations must embed UnimplementedStatusServiceServer +// for forward compatibility. +type StatusServiceServer interface { + RecentLogs(context.Context, *RecentLogsRequest) (*RecentLogsResponse, error) + // Configuration snapshot: the running configuration as the dashboard + // renders it, published by the owner of configuration for the process that + // displays it. PutConfigSnapshot is administrative; GetConfigSnapshot is + // the UI's read (docs/architecture/migration-decisions.md, "Dashboard + // configuration page"). + PutConfigSnapshot(context.Context, *PutConfigSnapshotRequest) (*PutConfigSnapshotResponse, error) + GetConfigSnapshot(context.Context, *GetConfigSnapshotRequest) (*GetConfigSnapshotResponse, error) + // Channel status is what the process HOSTING the channels observes about them: + // one row per channel, written by the Messaging Service and read by the UI + // process. Administrative like the config snapshot, and for the same reason -- + // a task-scoped grant reaches neither, so authorizesTaskScopedCall admits only + // the administrative token. It is runtime state rather than a settings + // document, which is why it is not a ControlPlaneService resource kind. + PutChannelStatus(context.Context, *PutChannelStatusRequest) (*PutChannelStatusResponse, error) + ListChannelStatus(context.Context, *ListChannelStatusRequest) (*ListChannelStatusResponse, error) + // Apply status: which version of a control-plane resource each process is + // running, and why it could not. Every process that applies a resource + // publishes; the UI process reads (docs/prds/control-plane-apply-status.md). + // Both are administrative. + PutApplyStatus(context.Context, *PutApplyStatusRequest) (*PutApplyStatusResponse, error) + ListApplyStatus(context.Context, *ListApplyStatusRequest) (*ListApplyStatusResponse, error) + // Presence: every running service instance re-stamps one record, so a + // record past the staleness window means that instance is down. + // Administrative. + PutPresence(context.Context, *PutPresenceRequest) (*PutPresenceResponse, error) + ListPresence(context.Context, *ListPresenceRequest) (*ListPresenceResponse, error) + mustEmbedUnimplementedStatusServiceServer() +} + +// UnimplementedStatusServiceServer 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 UnimplementedStatusServiceServer struct{} + +func (UnimplementedStatusServiceServer) RecentLogs(context.Context, *RecentLogsRequest) (*RecentLogsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RecentLogs not implemented") +} +func (UnimplementedStatusServiceServer) PutConfigSnapshot(context.Context, *PutConfigSnapshotRequest) (*PutConfigSnapshotResponse, error) { + return nil, status.Error(codes.Unimplemented, "method PutConfigSnapshot not implemented") +} +func (UnimplementedStatusServiceServer) GetConfigSnapshot(context.Context, *GetConfigSnapshotRequest) (*GetConfigSnapshotResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetConfigSnapshot not implemented") +} +func (UnimplementedStatusServiceServer) PutChannelStatus(context.Context, *PutChannelStatusRequest) (*PutChannelStatusResponse, error) { + return nil, status.Error(codes.Unimplemented, "method PutChannelStatus not implemented") +} +func (UnimplementedStatusServiceServer) ListChannelStatus(context.Context, *ListChannelStatusRequest) (*ListChannelStatusResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListChannelStatus not implemented") +} +func (UnimplementedStatusServiceServer) PutApplyStatus(context.Context, *PutApplyStatusRequest) (*PutApplyStatusResponse, error) { + return nil, status.Error(codes.Unimplemented, "method PutApplyStatus not implemented") +} +func (UnimplementedStatusServiceServer) ListApplyStatus(context.Context, *ListApplyStatusRequest) (*ListApplyStatusResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListApplyStatus not implemented") +} +func (UnimplementedStatusServiceServer) PutPresence(context.Context, *PutPresenceRequest) (*PutPresenceResponse, error) { + return nil, status.Error(codes.Unimplemented, "method PutPresence not implemented") +} +func (UnimplementedStatusServiceServer) ListPresence(context.Context, *ListPresenceRequest) (*ListPresenceResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListPresence not implemented") +} +func (UnimplementedStatusServiceServer) mustEmbedUnimplementedStatusServiceServer() {} +func (UnimplementedStatusServiceServer) testEmbeddedByValue() {} + +// UnsafeStatusServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to StatusServiceServer will +// result in compilation errors. +type UnsafeStatusServiceServer interface { + mustEmbedUnimplementedStatusServiceServer() +} + +func RegisterStatusServiceServer(s grpc.ServiceRegistrar, srv StatusServiceServer) { + // If the following call panics, it indicates UnimplementedStatusServiceServer 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(&StatusService_ServiceDesc, srv) +} + +func _StatusService_RecentLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RecentLogsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatusServiceServer).RecentLogs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StatusService_RecentLogs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatusServiceServer).RecentLogs(ctx, req.(*RecentLogsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StatusService_PutConfigSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PutConfigSnapshotRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatusServiceServer).PutConfigSnapshot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StatusService_PutConfigSnapshot_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatusServiceServer).PutConfigSnapshot(ctx, req.(*PutConfigSnapshotRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StatusService_GetConfigSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetConfigSnapshotRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatusServiceServer).GetConfigSnapshot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StatusService_GetConfigSnapshot_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatusServiceServer).GetConfigSnapshot(ctx, req.(*GetConfigSnapshotRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StatusService_PutChannelStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PutChannelStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatusServiceServer).PutChannelStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StatusService_PutChannelStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatusServiceServer).PutChannelStatus(ctx, req.(*PutChannelStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StatusService_ListChannelStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListChannelStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatusServiceServer).ListChannelStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StatusService_ListChannelStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatusServiceServer).ListChannelStatus(ctx, req.(*ListChannelStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StatusService_PutApplyStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PutApplyStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatusServiceServer).PutApplyStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StatusService_PutApplyStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatusServiceServer).PutApplyStatus(ctx, req.(*PutApplyStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StatusService_ListApplyStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListApplyStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatusServiceServer).ListApplyStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StatusService_ListApplyStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatusServiceServer).ListApplyStatus(ctx, req.(*ListApplyStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StatusService_PutPresence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PutPresenceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatusServiceServer).PutPresence(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StatusService_PutPresence_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatusServiceServer).PutPresence(ctx, req.(*PutPresenceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StatusService_ListPresence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPresenceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatusServiceServer).ListPresence(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StatusService_ListPresence_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatusServiceServer).ListPresence(ctx, req.(*ListPresenceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// StatusService_ServiceDesc is the grpc.ServiceDesc for StatusService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var StatusService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.StatusService", + HandlerType: (*StatusServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RecentLogs", + Handler: _StatusService_RecentLogs_Handler, + }, + { + MethodName: "PutConfigSnapshot", + Handler: _StatusService_PutConfigSnapshot_Handler, + }, + { + MethodName: "GetConfigSnapshot", + Handler: _StatusService_GetConfigSnapshot_Handler, + }, + { + MethodName: "PutChannelStatus", + Handler: _StatusService_PutChannelStatus_Handler, + }, + { + MethodName: "ListChannelStatus", + Handler: _StatusService_ListChannelStatus_Handler, + }, + { + MethodName: "PutApplyStatus", + Handler: _StatusService_PutApplyStatus_Handler, + }, + { + MethodName: "ListApplyStatus", + Handler: _StatusService_ListApplyStatus_Handler, + }, + { + MethodName: "PutPresence", + Handler: _StatusService_PutPresence_Handler, + }, + { + MethodName: "ListPresence", + Handler: _StatusService_ListPresence_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "state/v1/status.proto", +} diff --git a/internal/contracts/state/v1/task.pb.go b/internal/contracts/state/v1/task.pb.go new file mode 100644 index 000000000..50da7f47d --- /dev/null +++ b/internal/contracts/state/v1/task.pb.go @@ -0,0 +1,2978 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/task.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type EnqueueIssueRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` + Number int64 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` + Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` + Body string `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"` + Labels string `protobuf:"bytes,6,opt,name=labels,proto3" json:"labels,omitempty"` + Identity string `protobuf:"bytes,7,opt,name=identity,proto3" json:"identity,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnqueueIssueRequest) Reset() { + *x = EnqueueIssueRequest{} + mi := &file_state_v1_task_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnqueueIssueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnqueueIssueRequest) ProtoMessage() {} + +func (x *EnqueueIssueRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnqueueIssueRequest.ProtoReflect.Descriptor instead. +func (*EnqueueIssueRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{0} +} + +func (x *EnqueueIssueRequest) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *EnqueueIssueRequest) GetRepo() string { + if x != nil { + return x.Repo + } + return "" +} + +func (x *EnqueueIssueRequest) GetNumber() int64 { + if x != nil { + return x.Number + } + return 0 +} + +func (x *EnqueueIssueRequest) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *EnqueueIssueRequest) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +func (x *EnqueueIssueRequest) GetLabels() string { + if x != nil { + return x.Labels + } + return "" +} + +func (x *EnqueueIssueRequest) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +type EnqueueIssueResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Inserted bool `protobuf:"varint,1,opt,name=inserted,proto3" json:"inserted,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnqueueIssueResponse) Reset() { + *x = EnqueueIssueResponse{} + mi := &file_state_v1_task_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnqueueIssueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnqueueIssueResponse) ProtoMessage() {} + +func (x *EnqueueIssueResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnqueueIssueResponse.ProtoReflect.Descriptor instead. +func (*EnqueueIssueResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{1} +} + +func (x *EnqueueIssueResponse) GetInserted() bool { + if x != nil { + return x.Inserted + } + return false +} + +type ActiveTasksByOriginRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActiveTasksByOriginRequest) Reset() { + *x = ActiveTasksByOriginRequest{} + mi := &file_state_v1_task_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActiveTasksByOriginRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActiveTasksByOriginRequest) ProtoMessage() {} + +func (x *ActiveTasksByOriginRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActiveTasksByOriginRequest.ProtoReflect.Descriptor instead. +func (*ActiveTasksByOriginRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{2} +} + +func (x *ActiveTasksByOriginRequest) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +type ActiveTasksByOriginResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActiveTasksByOriginResponse) Reset() { + *x = ActiveTasksByOriginResponse{} + mi := &file_state_v1_task_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActiveTasksByOriginResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActiveTasksByOriginResponse) ProtoMessage() {} + +func (x *ActiveTasksByOriginResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActiveTasksByOriginResponse.ProtoReflect.Descriptor instead. +func (*ActiveTasksByOriginResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{3} +} + +func (x *ActiveTasksByOriginResponse) GetTasks() []*Task { + if x != nil { + return x.Tasks + } + return nil +} + +type UnpostedOutcomesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnpostedOutcomesRequest) Reset() { + *x = UnpostedOutcomesRequest{} + mi := &file_state_v1_task_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnpostedOutcomesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnpostedOutcomesRequest) ProtoMessage() {} + +func (x *UnpostedOutcomesRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnpostedOutcomesRequest.ProtoReflect.Descriptor instead. +func (*UnpostedOutcomesRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{4} +} + +type UnpostedOutcomesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnpostedOutcomesResponse) Reset() { + *x = UnpostedOutcomesResponse{} + mi := &file_state_v1_task_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnpostedOutcomesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnpostedOutcomesResponse) ProtoMessage() {} + +func (x *UnpostedOutcomesResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnpostedOutcomesResponse.ProtoReflect.Descriptor instead. +func (*UnpostedOutcomesResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{5} +} + +func (x *UnpostedOutcomesResponse) GetTasks() []*Task { + if x != nil { + return x.Tasks + } + return nil +} + +type MarkOutcomePostedRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + // status is the task status whose state was posted. + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MarkOutcomePostedRequest) Reset() { + *x = MarkOutcomePostedRequest{} + mi := &file_state_v1_task_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MarkOutcomePostedRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarkOutcomePostedRequest) ProtoMessage() {} + +func (x *MarkOutcomePostedRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MarkOutcomePostedRequest.ProtoReflect.Descriptor instead. +func (*MarkOutcomePostedRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{6} +} + +func (x *MarkOutcomePostedRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *MarkOutcomePostedRequest) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +type MarkOutcomePostedResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MarkOutcomePostedResponse) Reset() { + *x = MarkOutcomePostedResponse{} + mi := &file_state_v1_task_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MarkOutcomePostedResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarkOutcomePostedResponse) ProtoMessage() {} + +func (x *MarkOutcomePostedResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MarkOutcomePostedResponse.ProtoReflect.Descriptor instead. +func (*MarkOutcomePostedResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{7} +} + +type EnqueueChatTaskRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` + Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` + Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` + Workflow string `protobuf:"bytes,5,opt,name=workflow,proto3" json:"workflow,omitempty"` + Identity string `protobuf:"bytes,6,opt,name=identity,proto3" json:"identity,omitempty"` + // inputs_json assigns workflow inputs, a JSON object of the same form + // EnqueueBindingTaskRequest carries. A chat task sets them at insert + // time: it has no binding provenance to stamp afterwards. + InputsJson string `protobuf:"bytes,7,opt,name=inputs_json,json=inputsJson,proto3" json:"inputs_json,omitempty"` + // origin names the conversation that created the task; empty for none. + Origin string `protobuf:"bytes,8,opt,name=origin,proto3" json:"origin,omitempty"` + // draft_yaml, when set, makes the task a test run of that unsaved + // definition: it is pinned to it and writes nothing to a forge. + DraftYaml string `protobuf:"bytes,9,opt,name=draft_yaml,json=draftYaml,proto3" json:"draft_yaml,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnqueueChatTaskRequest) Reset() { + *x = EnqueueChatTaskRequest{} + mi := &file_state_v1_task_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnqueueChatTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnqueueChatTaskRequest) ProtoMessage() {} + +func (x *EnqueueChatTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnqueueChatTaskRequest.ProtoReflect.Descriptor instead. +func (*EnqueueChatTaskRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{8} +} + +func (x *EnqueueChatTaskRequest) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *EnqueueChatTaskRequest) GetRepo() string { + if x != nil { + return x.Repo + } + return "" +} + +func (x *EnqueueChatTaskRequest) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *EnqueueChatTaskRequest) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +func (x *EnqueueChatTaskRequest) GetWorkflow() string { + if x != nil { + return x.Workflow + } + return "" +} + +func (x *EnqueueChatTaskRequest) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *EnqueueChatTaskRequest) GetInputsJson() string { + if x != nil { + return x.InputsJson + } + return "" +} + +func (x *EnqueueChatTaskRequest) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *EnqueueChatTaskRequest) GetDraftYaml() string { + if x != nil { + return x.DraftYaml + } + return "" +} + +type EnqueueChatTaskResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnqueueChatTaskResponse) Reset() { + *x = EnqueueChatTaskResponse{} + mi := &file_state_v1_task_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnqueueChatTaskResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnqueueChatTaskResponse) ProtoMessage() {} + +func (x *EnqueueChatTaskResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnqueueChatTaskResponse.ProtoReflect.Descriptor instead. +func (*EnqueueChatTaskResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{9} +} + +func (x *EnqueueChatTaskResponse) GetTask() *Task { + if x != nil { + return x.Task + } + return nil +} + +type ClaimNextRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClaimNextRequest) Reset() { + *x = ClaimNextRequest{} + mi := &file_state_v1_task_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClaimNextRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClaimNextRequest) ProtoMessage() {} + +func (x *ClaimNextRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClaimNextRequest.ProtoReflect.Descriptor instead. +func (*ClaimNextRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{10} +} + +type ClaimNextResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` + Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClaimNextResponse) Reset() { + *x = ClaimNextResponse{} + mi := &file_state_v1_task_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClaimNextResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClaimNextResponse) ProtoMessage() {} + +func (x *ClaimNextResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClaimNextResponse.ProtoReflect.Descriptor instead. +func (*ClaimNextResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{11} +} + +func (x *ClaimNextResponse) GetTask() *Task { + if x != nil { + return x.Task + } + return nil +} + +func (x *ClaimNextResponse) GetFound() bool { + if x != nil { + return x.Found + } + return false +} + +type ClaimByIssueRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` + Number int64 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClaimByIssueRequest) Reset() { + *x = ClaimByIssueRequest{} + mi := &file_state_v1_task_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClaimByIssueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClaimByIssueRequest) ProtoMessage() {} + +func (x *ClaimByIssueRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClaimByIssueRequest.ProtoReflect.Descriptor instead. +func (*ClaimByIssueRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{12} +} + +func (x *ClaimByIssueRequest) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *ClaimByIssueRequest) GetRepo() string { + if x != nil { + return x.Repo + } + return "" +} + +func (x *ClaimByIssueRequest) GetNumber() int64 { + if x != nil { + return x.Number + } + return 0 +} + +type ClaimByIssueResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` + Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClaimByIssueResponse) Reset() { + *x = ClaimByIssueResponse{} + mi := &file_state_v1_task_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClaimByIssueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClaimByIssueResponse) ProtoMessage() {} + +func (x *ClaimByIssueResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClaimByIssueResponse.ProtoReflect.Descriptor instead. +func (*ClaimByIssueResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{13} +} + +func (x *ClaimByIssueResponse) GetTask() *Task { + if x != nil { + return x.Task + } + return nil +} + +func (x *ClaimByIssueResponse) GetFound() bool { + if x != nil { + return x.Found + } + return false +} + +type TransitionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + Detail string `protobuf:"bytes,4,opt,name=detail,proto3" json:"detail,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransitionRequest) Reset() { + *x = TransitionRequest{} + mi := &file_state_v1_task_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransitionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransitionRequest) ProtoMessage() {} + +func (x *TransitionRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransitionRequest.ProtoReflect.Descriptor instead. +func (*TransitionRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{14} +} + +func (x *TransitionRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *TransitionRequest) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *TransitionRequest) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *TransitionRequest) GetDetail() string { + if x != nil { + return x.Detail + } + return "" +} + +type TransitionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransitionResponse) Reset() { + *x = TransitionResponse{} + mi := &file_state_v1_task_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransitionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransitionResponse) ProtoMessage() {} + +func (x *TransitionResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransitionResponse.ProtoReflect.Descriptor instead. +func (*TransitionResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{15} +} + +type UpdateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateRequest) Reset() { + *x = UpdateRequest{} + mi := &file_state_v1_task_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateRequest) ProtoMessage() {} + +func (x *UpdateRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead. +func (*UpdateRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{16} +} + +func (x *UpdateRequest) GetTask() *Task { + if x != nil { + return x.Task + } + return nil +} + +type UpdateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateResponse) Reset() { + *x = UpdateResponse{} + mi := &file_state_v1_task_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateResponse) ProtoMessage() {} + +func (x *UpdateResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead. +func (*UpdateResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{17} +} + +type RequeueRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + FromStatus string `protobuf:"bytes,2,opt,name=from_status,json=fromStatus,proto3" json:"from_status,omitempty"` + Workflow string `protobuf:"bytes,3,opt,name=workflow,proto3" json:"workflow,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RequeueRequest) Reset() { + *x = RequeueRequest{} + mi := &file_state_v1_task_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequeueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequeueRequest) ProtoMessage() {} + +func (x *RequeueRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequeueRequest.ProtoReflect.Descriptor instead. +func (*RequeueRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{18} +} + +func (x *RequeueRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *RequeueRequest) GetFromStatus() string { + if x != nil { + return x.FromStatus + } + return "" +} + +func (x *RequeueRequest) GetWorkflow() string { + if x != nil { + return x.Workflow + } + return "" +} + +type RequeueResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RequeueResponse) Reset() { + *x = RequeueResponse{} + mi := &file_state_v1_task_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequeueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequeueResponse) ProtoMessage() {} + +func (x *RequeueResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequeueResponse.ProtoReflect.Descriptor instead. +func (*RequeueResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{19} +} + +type ParkTaskRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"` + Class string `protobuf:"bytes,4,opt,name=class,proto3" json:"class,omitempty"` + Blocker string `protobuf:"bytes,5,opt,name=blocker,proto3" json:"blocker,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ParkTaskRequest) Reset() { + *x = ParkTaskRequest{} + mi := &file_state_v1_task_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ParkTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParkTaskRequest) ProtoMessage() {} + +func (x *ParkTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParkTaskRequest.ProtoReflect.Descriptor instead. +func (*ParkTaskRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{20} +} + +func (x *ParkTaskRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *ParkTaskRequest) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *ParkTaskRequest) GetDetail() string { + if x != nil { + return x.Detail + } + return "" +} + +func (x *ParkTaskRequest) GetClass() string { + if x != nil { + return x.Class + } + return "" +} + +func (x *ParkTaskRequest) GetBlocker() string { + if x != nil { + return x.Blocker + } + return "" +} + +type ParkTaskResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ParkTaskResponse) Reset() { + *x = ParkTaskResponse{} + mi := &file_state_v1_task_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ParkTaskResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParkTaskResponse) ProtoMessage() {} + +func (x *ParkTaskResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParkTaskResponse.ProtoReflect.Descriptor instead. +func (*ParkTaskResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{21} +} + +type RecoverStaleRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecoverStaleRequest) Reset() { + *x = RecoverStaleRequest{} + mi := &file_state_v1_task_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecoverStaleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecoverStaleRequest) ProtoMessage() {} + +func (x *RecoverStaleRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecoverStaleRequest.ProtoReflect.Descriptor instead. +func (*RecoverStaleRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{22} +} + +type RecoverStaleResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecoverStaleResponse) Reset() { + *x = RecoverStaleResponse{} + mi := &file_state_v1_task_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecoverStaleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecoverStaleResponse) ProtoMessage() {} + +func (x *RecoverStaleResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecoverStaleResponse.ProtoReflect.Descriptor instead. +func (*RecoverStaleResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{23} +} + +func (x *RecoverStaleResponse) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +type ArchiveTaskRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + FromStatus string `protobuf:"bytes,2,opt,name=from_status,json=fromStatus,proto3" json:"from_status,omitempty"` + Audit *Event `protobuf:"bytes,3,opt,name=audit,proto3" json:"audit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ArchiveTaskRequest) Reset() { + *x = ArchiveTaskRequest{} + mi := &file_state_v1_task_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ArchiveTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArchiveTaskRequest) ProtoMessage() {} + +func (x *ArchiveTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArchiveTaskRequest.ProtoReflect.Descriptor instead. +func (*ArchiveTaskRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{24} +} + +func (x *ArchiveTaskRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *ArchiveTaskRequest) GetFromStatus() string { + if x != nil { + return x.FromStatus + } + return "" +} + +func (x *ArchiveTaskRequest) GetAudit() *Event { + if x != nil { + return x.Audit + } + return nil +} + +type ArchiveTaskResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + EventId int64 `protobuf:"varint,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ArchiveTaskResponse) Reset() { + *x = ArchiveTaskResponse{} + mi := &file_state_v1_task_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ArchiveTaskResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArchiveTaskResponse) ProtoMessage() {} + +func (x *ArchiveTaskResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArchiveTaskResponse.ProtoReflect.Descriptor instead. +func (*ArchiveTaskResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{25} +} + +func (x *ArchiveTaskResponse) GetEventId() int64 { + if x != nil { + return x.EventId + } + return 0 +} + +type RetryTaskRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + FromStatus string `protobuf:"bytes,2,opt,name=from_status,json=fromStatus,proto3" json:"from_status,omitempty"` + Workflow string `protobuf:"bytes,3,opt,name=workflow,proto3" json:"workflow,omitempty"` + // retry_mode is the operator's worktree choice (taskstate.RetryMode) the + // requeue persists. Empty reads as refresh_onto_base. + RetryMode string `protobuf:"bytes,4,opt,name=retry_mode,json=retryMode,proto3" json:"retry_mode,omitempty"` + // resume_from is the stage the attempt starts at, and resume_after the + // stage before it whose recorded results it starts with (task.Resume). + ResumeFrom string `protobuf:"bytes,5,opt,name=resume_from,json=resumeFrom,proto3" json:"resume_from,omitempty"` + ResumeAfter string `protobuf:"bytes,6,opt,name=resume_after,json=resumeAfter,proto3" json:"resume_after,omitempty"` + // current_definition clears the pinned definition so the next dispatch + // pins the workflow's current stored version. + CurrentDefinition bool `protobuf:"varint,7,opt,name=current_definition,json=currentDefinition,proto3" json:"current_definition,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RetryTaskRequest) Reset() { + *x = RetryTaskRequest{} + mi := &file_state_v1_task_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RetryTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RetryTaskRequest) ProtoMessage() {} + +func (x *RetryTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RetryTaskRequest.ProtoReflect.Descriptor instead. +func (*RetryTaskRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{26} +} + +func (x *RetryTaskRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *RetryTaskRequest) GetFromStatus() string { + if x != nil { + return x.FromStatus + } + return "" +} + +func (x *RetryTaskRequest) GetWorkflow() string { + if x != nil { + return x.Workflow + } + return "" +} + +func (x *RetryTaskRequest) GetRetryMode() string { + if x != nil { + return x.RetryMode + } + return "" +} + +func (x *RetryTaskRequest) GetResumeFrom() string { + if x != nil { + return x.ResumeFrom + } + return "" +} + +func (x *RetryTaskRequest) GetResumeAfter() string { + if x != nil { + return x.ResumeAfter + } + return "" +} + +func (x *RetryTaskRequest) GetCurrentDefinition() bool { + if x != nil { + return x.CurrentDefinition + } + return false +} + +type RetryTaskResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RetryTaskResponse) Reset() { + *x = RetryTaskResponse{} + mi := &file_state_v1_task_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RetryTaskResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RetryTaskResponse) ProtoMessage() {} + +func (x *RetryTaskResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RetryTaskResponse.ProtoReflect.Descriptor instead. +func (*RetryTaskResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{27} +} + +type TaskByIssueRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` + Number int64 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TaskByIssueRequest) Reset() { + *x = TaskByIssueRequest{} + mi := &file_state_v1_task_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TaskByIssueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskByIssueRequest) ProtoMessage() {} + +func (x *TaskByIssueRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskByIssueRequest.ProtoReflect.Descriptor instead. +func (*TaskByIssueRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{28} +} + +func (x *TaskByIssueRequest) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *TaskByIssueRequest) GetRepo() string { + if x != nil { + return x.Repo + } + return "" +} + +func (x *TaskByIssueRequest) GetNumber() int64 { + if x != nil { + return x.Number + } + return 0 +} + +type TaskByIssueResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` + Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TaskByIssueResponse) Reset() { + *x = TaskByIssueResponse{} + mi := &file_state_v1_task_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TaskByIssueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskByIssueResponse) ProtoMessage() {} + +func (x *TaskByIssueResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskByIssueResponse.ProtoReflect.Descriptor instead. +func (*TaskByIssueResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{29} +} + +func (x *TaskByIssueResponse) GetTask() *Task { + if x != nil { + return x.Task + } + return nil +} + +func (x *TaskByIssueResponse) GetFound() bool { + if x != nil { + return x.Found + } + return false +} + +type OpenTaskByPRRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` + Number int64 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OpenTaskByPRRequest) Reset() { + *x = OpenTaskByPRRequest{} + mi := &file_state_v1_task_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OpenTaskByPRRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenTaskByPRRequest) ProtoMessage() {} + +func (x *OpenTaskByPRRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenTaskByPRRequest.ProtoReflect.Descriptor instead. +func (*OpenTaskByPRRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{30} +} + +func (x *OpenTaskByPRRequest) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *OpenTaskByPRRequest) GetRepo() string { + if x != nil { + return x.Repo + } + return "" +} + +func (x *OpenTaskByPRRequest) GetNumber() int64 { + if x != nil { + return x.Number + } + return 0 +} + +type OpenTaskByPRResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` + Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OpenTaskByPRResponse) Reset() { + *x = OpenTaskByPRResponse{} + mi := &file_state_v1_task_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OpenTaskByPRResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenTaskByPRResponse) ProtoMessage() {} + +func (x *OpenTaskByPRResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenTaskByPRResponse.ProtoReflect.Descriptor instead. +func (*OpenTaskByPRResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{31} +} + +func (x *OpenTaskByPRResponse) GetTask() *Task { + if x != nil { + return x.Task + } + return nil +} + +func (x *OpenTaskByPRResponse) GetFound() bool { + if x != nil { + return x.Found + } + return false +} + +type TaskByIDRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TaskByIDRequest) Reset() { + *x = TaskByIDRequest{} + mi := &file_state_v1_task_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TaskByIDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskByIDRequest) ProtoMessage() {} + +func (x *TaskByIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskByIDRequest.ProtoReflect.Descriptor instead. +func (*TaskByIDRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{32} +} + +func (x *TaskByIDRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +type TaskByIDResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` + Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TaskByIDResponse) Reset() { + *x = TaskByIDResponse{} + mi := &file_state_v1_task_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TaskByIDResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskByIDResponse) ProtoMessage() {} + +func (x *TaskByIDResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskByIDResponse.ProtoReflect.Descriptor instead. +func (*TaskByIDResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{33} +} + +func (x *TaskByIDResponse) GetTask() *Task { + if x != nil { + return x.Task + } + return nil +} + +func (x *TaskByIDResponse) GetFound() bool { + if x != nil { + return x.Found + } + return false +} + +type OpenPRsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OpenPRsRequest) Reset() { + *x = OpenPRsRequest{} + mi := &file_state_v1_task_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OpenPRsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenPRsRequest) ProtoMessage() {} + +func (x *OpenPRsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenPRsRequest.ProtoReflect.Descriptor instead. +func (*OpenPRsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{34} +} + +type OpenPRsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OpenPRsResponse) Reset() { + *x = OpenPRsResponse{} + mi := &file_state_v1_task_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OpenPRsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenPRsResponse) ProtoMessage() {} + +func (x *OpenPRsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenPRsResponse.ProtoReflect.Descriptor instead. +func (*OpenPRsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{35} +} + +func (x *OpenPRsResponse) GetTasks() []*Task { + if x != nil { + return x.Tasks + } + return nil +} + +type ClearTerminalTasksRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClearTerminalTasksRequest) Reset() { + *x = ClearTerminalTasksRequest{} + mi := &file_state_v1_task_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClearTerminalTasksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClearTerminalTasksRequest) ProtoMessage() {} + +func (x *ClearTerminalTasksRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClearTerminalTasksRequest.ProtoReflect.Descriptor instead. +func (*ClearTerminalTasksRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{36} +} + +type ClearTerminalTasksResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClearTerminalTasksResponse) Reset() { + *x = ClearTerminalTasksResponse{} + mi := &file_state_v1_task_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClearTerminalTasksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClearTerminalTasksResponse) ProtoMessage() {} + +func (x *ClearTerminalTasksResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClearTerminalTasksResponse.ProtoReflect.Descriptor instead. +func (*ClearTerminalTasksResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{37} +} + +func (x *ClearTerminalTasksResponse) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +// TasksRequest selects one page of tasks, most recently updated first. Empty +// statuses matches every status; after_id 0 starts at the newest task. +type TasksRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` + Statuses []string `protobuf:"bytes,2,rep,name=statuses,proto3" json:"statuses,omitempty"` + AfterUpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=after_updated_at,json=afterUpdatedAt,proto3" json:"after_updated_at,omitempty"` + AfterId int64 `protobuf:"varint,4,opt,name=after_id,json=afterId,proto3" json:"after_id,omitempty"` + // workflow, when set, keeps only that workflow's tasks. + Workflow string `protobuf:"bytes,5,opt,name=workflow,proto3" json:"workflow,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TasksRequest) Reset() { + *x = TasksRequest{} + mi := &file_state_v1_task_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TasksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TasksRequest) ProtoMessage() {} + +func (x *TasksRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TasksRequest.ProtoReflect.Descriptor instead. +func (*TasksRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{38} +} + +func (x *TasksRequest) GetLimit() int64 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *TasksRequest) GetStatuses() []string { + if x != nil { + return x.Statuses + } + return nil +} + +func (x *TasksRequest) GetAfterUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.AfterUpdatedAt + } + return nil +} + +func (x *TasksRequest) GetAfterId() int64 { + if x != nil { + return x.AfterId + } + return 0 +} + +func (x *TasksRequest) GetWorkflow() string { + if x != nil { + return x.Workflow + } + return "" +} + +type TasksResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TasksResponse) Reset() { + *x = TasksResponse{} + mi := &file_state_v1_task_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TasksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TasksResponse) ProtoMessage() {} + +func (x *TasksResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TasksResponse.ProtoReflect.Descriptor instead. +func (*TasksResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{39} +} + +func (x *TasksResponse) GetTasks() []*Task { + if x != nil { + return x.Tasks + } + return nil +} + +// workflow.call: the caller's grant names the caller; the store derives the +// rest from the caller's row (docs/prds/workflow-calls.md). +type EnqueueCallTaskRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + CallerTaskId int64 `protobuf:"varint,1,opt,name=caller_task_id,json=callerTaskId,proto3" json:"caller_task_id,omitempty"` + Workflow string `protobuf:"bytes,2,opt,name=workflow,proto3" json:"workflow,omitempty"` + InputsJson string `protobuf:"bytes,3,opt,name=inputs_json,json=inputsJson,proto3" json:"inputs_json,omitempty"` + // call_key is the call site's durable identity: the call step's declared + // path within the run, plus the workflow it starts (so one task running a + // second definition at a colliding path does not reuse the first callee's + // child). The store stamps it on the child and, when the caller already + // started a child under it, returns that child instead of starting a second + // one. Required: a retry of one call site carries the same key, so the retry + // cannot duplicate the child's work. + CallKey string `protobuf:"bytes,4,opt,name=call_key,json=callKey,proto3" json:"call_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnqueueCallTaskRequest) Reset() { + *x = EnqueueCallTaskRequest{} + mi := &file_state_v1_task_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnqueueCallTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnqueueCallTaskRequest) ProtoMessage() {} + +func (x *EnqueueCallTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnqueueCallTaskRequest.ProtoReflect.Descriptor instead. +func (*EnqueueCallTaskRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{40} +} + +func (x *EnqueueCallTaskRequest) GetCallerTaskId() int64 { + if x != nil { + return x.CallerTaskId + } + return 0 +} + +func (x *EnqueueCallTaskRequest) GetWorkflow() string { + if x != nil { + return x.Workflow + } + return "" +} + +func (x *EnqueueCallTaskRequest) GetInputsJson() string { + if x != nil { + return x.InputsJson + } + return "" +} + +func (x *EnqueueCallTaskRequest) GetCallKey() string { + if x != nil { + return x.CallKey + } + return "" +} + +type EnqueueCallTaskResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` + Accepted bool `protobuf:"varint,2,opt,name=accepted,proto3" json:"accepted,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnqueueCallTaskResponse) Reset() { + *x = EnqueueCallTaskResponse{} + mi := &file_state_v1_task_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnqueueCallTaskResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnqueueCallTaskResponse) ProtoMessage() {} + +func (x *EnqueueCallTaskResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnqueueCallTaskResponse.ProtoReflect.Descriptor instead. +func (*EnqueueCallTaskResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{41} +} + +func (x *EnqueueCallTaskResponse) GetTask() *Task { + if x != nil { + return x.Task + } + return nil +} + +func (x *EnqueueCallTaskResponse) GetAccepted() bool { + if x != nil { + return x.Accepted + } + return false +} + +type WorkflowCallStatusRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + CallerTaskId int64 `protobuf:"varint,1,opt,name=caller_task_id,json=callerTaskId,proto3" json:"caller_task_id,omitempty"` + CallTaskId int64 `protobuf:"varint,2,opt,name=call_task_id,json=callTaskId,proto3" json:"call_task_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkflowCallStatusRequest) Reset() { + *x = WorkflowCallStatusRequest{} + mi := &file_state_v1_task_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkflowCallStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowCallStatusRequest) ProtoMessage() {} + +func (x *WorkflowCallStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowCallStatusRequest.ProtoReflect.Descriptor instead. +func (*WorkflowCallStatusRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{42} +} + +func (x *WorkflowCallStatusRequest) GetCallerTaskId() int64 { + if x != nil { + return x.CallerTaskId + } + return 0 +} + +func (x *WorkflowCallStatusRequest) GetCallTaskId() int64 { + if x != nil { + return x.CallTaskId + } + return 0 +} + +type WorkflowCallStatusResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // status is the callee's task status and detail its latest transition + // detail (empty before the callee first moves). outputs_json is the + // callee's written outputs (task.EncodeOutputs), so a wait:true caller can + // publish one as its own (docs/prds/workflow-call-outputs.md, "Storage and + // wire"). + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"` + OutputsJson string `protobuf:"bytes,3,opt,name=outputs_json,json=outputsJson,proto3" json:"outputs_json,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkflowCallStatusResponse) Reset() { + *x = WorkflowCallStatusResponse{} + mi := &file_state_v1_task_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkflowCallStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowCallStatusResponse) ProtoMessage() {} + +func (x *WorkflowCallStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowCallStatusResponse.ProtoReflect.Descriptor instead. +func (*WorkflowCallStatusResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{43} +} + +func (x *WorkflowCallStatusResponse) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *WorkflowCallStatusResponse) GetDetail() string { + if x != nil { + return x.Detail + } + return "" +} + +func (x *WorkflowCallStatusResponse) GetOutputsJson() string { + if x != nil { + return x.OutputsJson + } + return "" +} + +type TaskModelsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TaskModelsRequest) Reset() { + *x = TaskModelsRequest{} + mi := &file_state_v1_task_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TaskModelsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskModelsRequest) ProtoMessage() {} + +func (x *TaskModelsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskModelsRequest.ProtoReflect.Descriptor instead. +func (*TaskModelsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{44} +} + +func (x *TaskModelsRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +type TaskInstructionsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TaskInstructionsRequest) Reset() { + *x = TaskInstructionsRequest{} + mi := &file_state_v1_task_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TaskInstructionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskInstructionsRequest) ProtoMessage() {} + +func (x *TaskInstructionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskInstructionsRequest.ProtoReflect.Descriptor instead. +func (*TaskInstructionsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{45} +} + +func (x *TaskInstructionsRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +type TaskInstructionsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Instance string `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + Organisation string `protobuf:"bytes,2,opt,name=organisation,proto3" json:"organisation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TaskInstructionsResponse) Reset() { + *x = TaskInstructionsResponse{} + mi := &file_state_v1_task_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TaskInstructionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskInstructionsResponse) ProtoMessage() {} + +func (x *TaskInstructionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[46] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskInstructionsResponse.ProtoReflect.Descriptor instead. +func (*TaskInstructionsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{46} +} + +func (x *TaskInstructionsResponse) GetInstance() string { + if x != nil { + return x.Instance + } + return "" +} + +func (x *TaskInstructionsResponse) GetOrganisation() string { + if x != nil { + return x.Organisation + } + return "" +} + +type TaskModelsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + Aliases map[string]string `protobuf:"bytes,2,rep,name=aliases,proto3" json:"aliases,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Providers map[string]*ModelProvider `protobuf:"bytes,3,rep,name=providers,proto3" json:"providers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TaskModelsResponse) Reset() { + *x = TaskModelsResponse{} + mi := &file_state_v1_task_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TaskModelsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskModelsResponse) ProtoMessage() {} + +func (x *TaskModelsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[47] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskModelsResponse.ProtoReflect.Descriptor instead. +func (*TaskModelsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{47} +} + +func (x *TaskModelsResponse) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *TaskModelsResponse) GetAliases() map[string]string { + if x != nil { + return x.Aliases + } + return nil +} + +func (x *TaskModelsResponse) GetProviders() map[string]*ModelProvider { + if x != nil { + return x.Providers + } + return nil +} + +// ModelProvider is an org's own provider. Its key is the org's credential +// binding named after it. +type ModelProvider struct { + state protoimpl.MessageState `protogen:"open.v1"` + Class string `protobuf:"bytes,1,opt,name=class,proto3" json:"class,omitempty"` + BaseUrl string `protobuf:"bytes,2,opt,name=base_url,json=baseUrl,proto3" json:"base_url,omitempty"` + ApiKeyEnv string `protobuf:"bytes,3,opt,name=api_key_env,json=apiKeyEnv,proto3" json:"api_key_env,omitempty"` + // The provider's credential reference: where its key lives, never the key + // itself. A daemon resolves a model egress credential from it; without it + // every provider arrives credential-less and no runtime can be built. + ApiKeyEngine string `protobuf:"bytes,4,opt,name=api_key_engine,json=apiKeyEngine,proto3" json:"api_key_engine,omitempty"` + ApiKeyKey string `protobuf:"bytes,5,opt,name=api_key_key,json=apiKeyKey,proto3" json:"api_key_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModelProvider) Reset() { + *x = ModelProvider{} + mi := &file_state_v1_task_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModelProvider) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModelProvider) ProtoMessage() {} + +func (x *ModelProvider) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_proto_msgTypes[48] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ModelProvider.ProtoReflect.Descriptor instead. +func (*ModelProvider) Descriptor() ([]byte, []int) { + return file_state_v1_task_proto_rawDescGZIP(), []int{48} +} + +func (x *ModelProvider) GetClass() string { + if x != nil { + return x.Class + } + return "" +} + +func (x *ModelProvider) GetBaseUrl() string { + if x != nil { + return x.BaseUrl + } + return "" +} + +func (x *ModelProvider) GetApiKeyEnv() string { + if x != nil { + return x.ApiKeyEnv + } + return "" +} + +func (x *ModelProvider) GetApiKeyEngine() string { + if x != nil { + return x.ApiKeyEngine + } + return "" +} + +func (x *ModelProvider) GetApiKeyKey() string { + if x != nil { + return x.ApiKeyKey + } + return "" +} + +var File_state_v1_task_proto protoreflect.FileDescriptor + +const file_state_v1_task_proto_rawDesc = "" + + "\n" + + "\x13state/v1/task.proto\x12\bstate.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x14state/v1/types.proto\"\xb5\x01\n" + + "\x13EnqueueIssueRequest\x12\x14\n" + + "\x05owner\x18\x01 \x01(\tR\x05owner\x12\x12\n" + + "\x04repo\x18\x02 \x01(\tR\x04repo\x12\x16\n" + + "\x06number\x18\x03 \x01(\x03R\x06number\x12\x14\n" + + "\x05title\x18\x04 \x01(\tR\x05title\x12\x12\n" + + "\x04body\x18\x05 \x01(\tR\x04body\x12\x16\n" + + "\x06labels\x18\x06 \x01(\tR\x06labels\x12\x1a\n" + + "\bidentity\x18\a \x01(\tR\bidentity\"2\n" + + "\x14EnqueueIssueResponse\x12\x1a\n" + + "\binserted\x18\x01 \x01(\bR\binserted\"4\n" + + "\x1aActiveTasksByOriginRequest\x12\x16\n" + + "\x06origin\x18\x01 \x01(\tR\x06origin\"C\n" + + "\x1bActiveTasksByOriginResponse\x12$\n" + + "\x05tasks\x18\x01 \x03(\v2\x0e.state.v1.TaskR\x05tasks\"\x19\n" + + "\x17UnpostedOutcomesRequest\"@\n" + + "\x18UnpostedOutcomesResponse\x12$\n" + + "\x05tasks\x18\x01 \x03(\v2\x0e.state.v1.TaskR\x05tasks\"K\n" + + "\x18MarkOutcomePostedRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x16\n" + + "\x06status\x18\x02 \x01(\tR\x06status\"\x1b\n" + + "\x19MarkOutcomePostedResponse\"\xfc\x01\n" + + "\x16EnqueueChatTaskRequest\x12\x14\n" + + "\x05owner\x18\x01 \x01(\tR\x05owner\x12\x12\n" + + "\x04repo\x18\x02 \x01(\tR\x04repo\x12\x14\n" + + "\x05title\x18\x03 \x01(\tR\x05title\x12\x12\n" + + "\x04body\x18\x04 \x01(\tR\x04body\x12\x1a\n" + + "\bworkflow\x18\x05 \x01(\tR\bworkflow\x12\x1a\n" + + "\bidentity\x18\x06 \x01(\tR\bidentity\x12\x1f\n" + + "\vinputs_json\x18\a \x01(\tR\n" + + "inputsJson\x12\x16\n" + + "\x06origin\x18\b \x01(\tR\x06origin\x12\x1d\n" + + "\n" + + "draft_yaml\x18\t \x01(\tR\tdraftYaml\"=\n" + + "\x17EnqueueChatTaskResponse\x12\"\n" + + "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\"\x12\n" + + "\x10ClaimNextRequest\"M\n" + + "\x11ClaimNextResponse\x12\"\n" + + "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\x12\x14\n" + + "\x05found\x18\x02 \x01(\bR\x05found\"W\n" + + "\x13ClaimByIssueRequest\x12\x14\n" + + "\x05owner\x18\x01 \x01(\tR\x05owner\x12\x12\n" + + "\x04repo\x18\x02 \x01(\tR\x04repo\x12\x16\n" + + "\x06number\x18\x03 \x01(\x03R\x06number\"P\n" + + "\x14ClaimByIssueResponse\x12\"\n" + + "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\x12\x14\n" + + "\x05found\x18\x02 \x01(\bR\x05found\"h\n" + + "\x11TransitionRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x12\n" + + "\x04from\x18\x02 \x01(\tR\x04from\x12\x0e\n" + + "\x02to\x18\x03 \x01(\tR\x02to\x12\x16\n" + + "\x06detail\x18\x04 \x01(\tR\x06detail\"\x14\n" + + "\x12TransitionResponse\"3\n" + + "\rUpdateRequest\x12\"\n" + + "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\"\x10\n" + + "\x0eUpdateResponse\"f\n" + + "\x0eRequeueRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x1f\n" + + "\vfrom_status\x18\x02 \x01(\tR\n" + + "fromStatus\x12\x1a\n" + + "\bworkflow\x18\x03 \x01(\tR\bworkflow\"\x11\n" + + "\x0fRequeueResponse\"\x86\x01\n" + + "\x0fParkTaskRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x12\n" + + "\x04from\x18\x02 \x01(\tR\x04from\x12\x16\n" + + "\x06detail\x18\x03 \x01(\tR\x06detail\x12\x14\n" + + "\x05class\x18\x04 \x01(\tR\x05class\x12\x18\n" + + "\ablocker\x18\x05 \x01(\tR\ablocker\"\x12\n" + + "\x10ParkTaskResponse\"\x15\n" + + "\x13RecoverStaleRequest\",\n" + + "\x14RecoverStaleResponse\x12\x14\n" + + "\x05count\x18\x01 \x01(\x03R\x05count\"u\n" + + "\x12ArchiveTaskRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x1f\n" + + "\vfrom_status\x18\x02 \x01(\tR\n" + + "fromStatus\x12%\n" + + "\x05audit\x18\x03 \x01(\v2\x0f.state.v1.EventR\x05audit\"0\n" + + "\x13ArchiveTaskResponse\x12\x19\n" + + "\bevent_id\x18\x01 \x01(\x03R\aeventId\"\xfa\x01\n" + + "\x10RetryTaskRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x1f\n" + + "\vfrom_status\x18\x02 \x01(\tR\n" + + "fromStatus\x12\x1a\n" + + "\bworkflow\x18\x03 \x01(\tR\bworkflow\x12\x1d\n" + + "\n" + + "retry_mode\x18\x04 \x01(\tR\tretryMode\x12\x1f\n" + + "\vresume_from\x18\x05 \x01(\tR\n" + + "resumeFrom\x12!\n" + + "\fresume_after\x18\x06 \x01(\tR\vresumeAfter\x12-\n" + + "\x12current_definition\x18\a \x01(\bR\x11currentDefinition\"\x13\n" + + "\x11RetryTaskResponse\"V\n" + + "\x12TaskByIssueRequest\x12\x14\n" + + "\x05owner\x18\x01 \x01(\tR\x05owner\x12\x12\n" + + "\x04repo\x18\x02 \x01(\tR\x04repo\x12\x16\n" + + "\x06number\x18\x03 \x01(\x03R\x06number\"O\n" + + "\x13TaskByIssueResponse\x12\"\n" + + "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\x12\x14\n" + + "\x05found\x18\x02 \x01(\bR\x05found\"W\n" + + "\x13OpenTaskByPRRequest\x12\x14\n" + + "\x05owner\x18\x01 \x01(\tR\x05owner\x12\x12\n" + + "\x04repo\x18\x02 \x01(\tR\x04repo\x12\x16\n" + + "\x06number\x18\x03 \x01(\x03R\x06number\"P\n" + + "\x14OpenTaskByPRResponse\x12\"\n" + + "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\x12\x14\n" + + "\x05found\x18\x02 \x01(\bR\x05found\"*\n" + + "\x0fTaskByIDRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\"L\n" + + "\x10TaskByIDResponse\x12\"\n" + + "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\x12\x14\n" + + "\x05found\x18\x02 \x01(\bR\x05found\"\x10\n" + + "\x0eOpenPRsRequest\"7\n" + + "\x0fOpenPRsResponse\x12$\n" + + "\x05tasks\x18\x01 \x03(\v2\x0e.state.v1.TaskR\x05tasks\"\x1b\n" + + "\x19ClearTerminalTasksRequest\"2\n" + + "\x1aClearTerminalTasksResponse\x12\x14\n" + + "\x05count\x18\x01 \x01(\x03R\x05count\"\xbd\x01\n" + + "\fTasksRequest\x12\x14\n" + + "\x05limit\x18\x01 \x01(\x03R\x05limit\x12\x1a\n" + + "\bstatuses\x18\x02 \x03(\tR\bstatuses\x12D\n" + + "\x10after_updated_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x0eafterUpdatedAt\x12\x19\n" + + "\bafter_id\x18\x04 \x01(\x03R\aafterId\x12\x1a\n" + + "\bworkflow\x18\x05 \x01(\tR\bworkflow\"5\n" + + "\rTasksResponse\x12$\n" + + "\x05tasks\x18\x01 \x03(\v2\x0e.state.v1.TaskR\x05tasks\"\x96\x01\n" + + "\x16EnqueueCallTaskRequest\x12$\n" + + "\x0ecaller_task_id\x18\x01 \x01(\x03R\fcallerTaskId\x12\x1a\n" + + "\bworkflow\x18\x02 \x01(\tR\bworkflow\x12\x1f\n" + + "\vinputs_json\x18\x03 \x01(\tR\n" + + "inputsJson\x12\x19\n" + + "\bcall_key\x18\x04 \x01(\tR\acallKey\"Y\n" + + "\x17EnqueueCallTaskResponse\x12\"\n" + + "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task\x12\x1a\n" + + "\baccepted\x18\x02 \x01(\bR\baccepted\"c\n" + + "\x19WorkflowCallStatusRequest\x12$\n" + + "\x0ecaller_task_id\x18\x01 \x01(\x03R\fcallerTaskId\x12 \n" + + "\fcall_task_id\x18\x02 \x01(\x03R\n" + + "callTaskId\"o\n" + + "\x1aWorkflowCallStatusResponse\x12\x16\n" + + "\x06status\x18\x01 \x01(\tR\x06status\x12\x16\n" + + "\x06detail\x18\x02 \x01(\tR\x06detail\x12!\n" + + "\foutputs_json\x18\x03 \x01(\tR\voutputsJson\",\n" + + "\x11TaskModelsRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\"2\n" + + "\x17TaskInstructionsRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\"Z\n" + + "\x18TaskInstructionsResponse\x12\x1a\n" + + "\binstance\x18\x01 \x01(\tR\binstance\x12\"\n" + + "\forganisation\x18\x02 \x01(\tR\forganisation\"\xce\x02\n" + + "\x12TaskModelsResponse\x12\x15\n" + + "\x06org_id\x18\x01 \x01(\tR\x05orgId\x12C\n" + + "\aaliases\x18\x02 \x03(\v2).state.v1.TaskModelsResponse.AliasesEntryR\aaliases\x12I\n" + + "\tproviders\x18\x03 \x03(\v2+.state.v1.TaskModelsResponse.ProvidersEntryR\tproviders\x1a:\n" + + "\fAliasesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aU\n" + + "\x0eProvidersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12-\n" + + "\x05value\x18\x02 \x01(\v2\x17.state.v1.ModelProviderR\x05value:\x028\x01\"\xa6\x01\n" + + "\rModelProvider\x12\x14\n" + + "\x05class\x18\x01 \x01(\tR\x05class\x12\x19\n" + + "\bbase_url\x18\x02 \x01(\tR\abaseUrl\x12\x1e\n" + + "\vapi_key_env\x18\x03 \x01(\tR\tapiKeyEnv\x12$\n" + + "\x0eapi_key_engine\x18\x04 \x01(\tR\fapiKeyEngine\x12\x1e\n" + + "\vapi_key_key\x18\x05 \x01(\tR\tapiKeyKey2\xe6\x0e\n" + + "\vTaskService\x12M\n" + + "\fEnqueueIssue\x12\x1d.state.v1.EnqueueIssueRequest\x1a\x1e.state.v1.EnqueueIssueResponse\x12V\n" + + "\x0fEnqueueChatTask\x12 .state.v1.EnqueueChatTaskRequest\x1a!.state.v1.EnqueueChatTaskResponse\x12b\n" + + "\x13ActiveTasksByOrigin\x12$.state.v1.ActiveTasksByOriginRequest\x1a%.state.v1.ActiveTasksByOriginResponse\x12Y\n" + + "\x10UnpostedOutcomes\x12!.state.v1.UnpostedOutcomesRequest\x1a\".state.v1.UnpostedOutcomesResponse\x12\\\n" + + "\x11MarkOutcomePosted\x12\".state.v1.MarkOutcomePostedRequest\x1a#.state.v1.MarkOutcomePostedResponse\x12D\n" + + "\tClaimNext\x12\x1a.state.v1.ClaimNextRequest\x1a\x1b.state.v1.ClaimNextResponse\x12M\n" + + "\fClaimByIssue\x12\x1d.state.v1.ClaimByIssueRequest\x1a\x1e.state.v1.ClaimByIssueResponse\x12G\n" + + "\n" + + "Transition\x12\x1b.state.v1.TransitionRequest\x1a\x1c.state.v1.TransitionResponse\x12;\n" + + "\x06Update\x12\x17.state.v1.UpdateRequest\x1a\x18.state.v1.UpdateResponse\x12G\n" + + "\n" + + "TaskModels\x12\x1b.state.v1.TaskModelsRequest\x1a\x1c.state.v1.TaskModelsResponse\x12Y\n" + + "\x10TaskInstructions\x12!.state.v1.TaskInstructionsRequest\x1a\".state.v1.TaskInstructionsResponse\x12>\n" + + "\aRequeue\x12\x18.state.v1.RequeueRequest\x1a\x19.state.v1.RequeueResponse\x12A\n" + + "\bParkTask\x12\x19.state.v1.ParkTaskRequest\x1a\x1a.state.v1.ParkTaskResponse\x12M\n" + + "\fRecoverStale\x12\x1d.state.v1.RecoverStaleRequest\x1a\x1e.state.v1.RecoverStaleResponse\x12J\n" + + "\vArchiveTask\x12\x1c.state.v1.ArchiveTaskRequest\x1a\x1d.state.v1.ArchiveTaskResponse\x12D\n" + + "\tRetryTask\x12\x1a.state.v1.RetryTaskRequest\x1a\x1b.state.v1.RetryTaskResponse\x12J\n" + + "\vTaskByIssue\x12\x1c.state.v1.TaskByIssueRequest\x1a\x1d.state.v1.TaskByIssueResponse\x12M\n" + + "\fOpenTaskByPR\x12\x1d.state.v1.OpenTaskByPRRequest\x1a\x1e.state.v1.OpenTaskByPRResponse\x12A\n" + + "\bTaskByID\x12\x19.state.v1.TaskByIDRequest\x1a\x1a.state.v1.TaskByIDResponse\x12>\n" + + "\aOpenPRs\x12\x18.state.v1.OpenPRsRequest\x1a\x19.state.v1.OpenPRsResponse\x12_\n" + + "\x12ClearTerminalTasks\x12#.state.v1.ClearTerminalTasksRequest\x1a$.state.v1.ClearTerminalTasksResponse\x128\n" + + "\x05Tasks\x12\x16.state.v1.TasksRequest\x1a\x17.state.v1.TasksResponse\x12V\n" + + "\x0fEnqueueCallTask\x12 .state.v1.EnqueueCallTaskRequest\x1a!.state.v1.EnqueueCallTaskResponse\x12_\n" + + "\x12WorkflowCallStatus\x12#.state.v1.WorkflowCallStatusRequest\x1a$.state.v1.WorkflowCallStatusResponseB\xa3\x01\n" + + "\fcom.state.v1B\tTaskProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_task_proto_rawDescOnce sync.Once + file_state_v1_task_proto_rawDescData []byte +) + +func file_state_v1_task_proto_rawDescGZIP() []byte { + file_state_v1_task_proto_rawDescOnce.Do(func() { + file_state_v1_task_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_task_proto_rawDesc), len(file_state_v1_task_proto_rawDesc))) + }) + return file_state_v1_task_proto_rawDescData +} + +var file_state_v1_task_proto_msgTypes = make([]protoimpl.MessageInfo, 51) +var file_state_v1_task_proto_goTypes = []any{ + (*EnqueueIssueRequest)(nil), // 0: state.v1.EnqueueIssueRequest + (*EnqueueIssueResponse)(nil), // 1: state.v1.EnqueueIssueResponse + (*ActiveTasksByOriginRequest)(nil), // 2: state.v1.ActiveTasksByOriginRequest + (*ActiveTasksByOriginResponse)(nil), // 3: state.v1.ActiveTasksByOriginResponse + (*UnpostedOutcomesRequest)(nil), // 4: state.v1.UnpostedOutcomesRequest + (*UnpostedOutcomesResponse)(nil), // 5: state.v1.UnpostedOutcomesResponse + (*MarkOutcomePostedRequest)(nil), // 6: state.v1.MarkOutcomePostedRequest + (*MarkOutcomePostedResponse)(nil), // 7: state.v1.MarkOutcomePostedResponse + (*EnqueueChatTaskRequest)(nil), // 8: state.v1.EnqueueChatTaskRequest + (*EnqueueChatTaskResponse)(nil), // 9: state.v1.EnqueueChatTaskResponse + (*ClaimNextRequest)(nil), // 10: state.v1.ClaimNextRequest + (*ClaimNextResponse)(nil), // 11: state.v1.ClaimNextResponse + (*ClaimByIssueRequest)(nil), // 12: state.v1.ClaimByIssueRequest + (*ClaimByIssueResponse)(nil), // 13: state.v1.ClaimByIssueResponse + (*TransitionRequest)(nil), // 14: state.v1.TransitionRequest + (*TransitionResponse)(nil), // 15: state.v1.TransitionResponse + (*UpdateRequest)(nil), // 16: state.v1.UpdateRequest + (*UpdateResponse)(nil), // 17: state.v1.UpdateResponse + (*RequeueRequest)(nil), // 18: state.v1.RequeueRequest + (*RequeueResponse)(nil), // 19: state.v1.RequeueResponse + (*ParkTaskRequest)(nil), // 20: state.v1.ParkTaskRequest + (*ParkTaskResponse)(nil), // 21: state.v1.ParkTaskResponse + (*RecoverStaleRequest)(nil), // 22: state.v1.RecoverStaleRequest + (*RecoverStaleResponse)(nil), // 23: state.v1.RecoverStaleResponse + (*ArchiveTaskRequest)(nil), // 24: state.v1.ArchiveTaskRequest + (*ArchiveTaskResponse)(nil), // 25: state.v1.ArchiveTaskResponse + (*RetryTaskRequest)(nil), // 26: state.v1.RetryTaskRequest + (*RetryTaskResponse)(nil), // 27: state.v1.RetryTaskResponse + (*TaskByIssueRequest)(nil), // 28: state.v1.TaskByIssueRequest + (*TaskByIssueResponse)(nil), // 29: state.v1.TaskByIssueResponse + (*OpenTaskByPRRequest)(nil), // 30: state.v1.OpenTaskByPRRequest + (*OpenTaskByPRResponse)(nil), // 31: state.v1.OpenTaskByPRResponse + (*TaskByIDRequest)(nil), // 32: state.v1.TaskByIDRequest + (*TaskByIDResponse)(nil), // 33: state.v1.TaskByIDResponse + (*OpenPRsRequest)(nil), // 34: state.v1.OpenPRsRequest + (*OpenPRsResponse)(nil), // 35: state.v1.OpenPRsResponse + (*ClearTerminalTasksRequest)(nil), // 36: state.v1.ClearTerminalTasksRequest + (*ClearTerminalTasksResponse)(nil), // 37: state.v1.ClearTerminalTasksResponse + (*TasksRequest)(nil), // 38: state.v1.TasksRequest + (*TasksResponse)(nil), // 39: state.v1.TasksResponse + (*EnqueueCallTaskRequest)(nil), // 40: state.v1.EnqueueCallTaskRequest + (*EnqueueCallTaskResponse)(nil), // 41: state.v1.EnqueueCallTaskResponse + (*WorkflowCallStatusRequest)(nil), // 42: state.v1.WorkflowCallStatusRequest + (*WorkflowCallStatusResponse)(nil), // 43: state.v1.WorkflowCallStatusResponse + (*TaskModelsRequest)(nil), // 44: state.v1.TaskModelsRequest + (*TaskInstructionsRequest)(nil), // 45: state.v1.TaskInstructionsRequest + (*TaskInstructionsResponse)(nil), // 46: state.v1.TaskInstructionsResponse + (*TaskModelsResponse)(nil), // 47: state.v1.TaskModelsResponse + (*ModelProvider)(nil), // 48: state.v1.ModelProvider + nil, // 49: state.v1.TaskModelsResponse.AliasesEntry + nil, // 50: state.v1.TaskModelsResponse.ProvidersEntry + (*Task)(nil), // 51: state.v1.Task + (*Event)(nil), // 52: state.v1.Event + (*timestamppb.Timestamp)(nil), // 53: google.protobuf.Timestamp +} +var file_state_v1_task_proto_depIdxs = []int32{ + 51, // 0: state.v1.ActiveTasksByOriginResponse.tasks:type_name -> state.v1.Task + 51, // 1: state.v1.UnpostedOutcomesResponse.tasks:type_name -> state.v1.Task + 51, // 2: state.v1.EnqueueChatTaskResponse.task:type_name -> state.v1.Task + 51, // 3: state.v1.ClaimNextResponse.task:type_name -> state.v1.Task + 51, // 4: state.v1.ClaimByIssueResponse.task:type_name -> state.v1.Task + 51, // 5: state.v1.UpdateRequest.task:type_name -> state.v1.Task + 52, // 6: state.v1.ArchiveTaskRequest.audit:type_name -> state.v1.Event + 51, // 7: state.v1.TaskByIssueResponse.task:type_name -> state.v1.Task + 51, // 8: state.v1.OpenTaskByPRResponse.task:type_name -> state.v1.Task + 51, // 9: state.v1.TaskByIDResponse.task:type_name -> state.v1.Task + 51, // 10: state.v1.OpenPRsResponse.tasks:type_name -> state.v1.Task + 53, // 11: state.v1.TasksRequest.after_updated_at:type_name -> google.protobuf.Timestamp + 51, // 12: state.v1.TasksResponse.tasks:type_name -> state.v1.Task + 51, // 13: state.v1.EnqueueCallTaskResponse.task:type_name -> state.v1.Task + 49, // 14: state.v1.TaskModelsResponse.aliases:type_name -> state.v1.TaskModelsResponse.AliasesEntry + 50, // 15: state.v1.TaskModelsResponse.providers:type_name -> state.v1.TaskModelsResponse.ProvidersEntry + 48, // 16: state.v1.TaskModelsResponse.ProvidersEntry.value:type_name -> state.v1.ModelProvider + 0, // 17: state.v1.TaskService.EnqueueIssue:input_type -> state.v1.EnqueueIssueRequest + 8, // 18: state.v1.TaskService.EnqueueChatTask:input_type -> state.v1.EnqueueChatTaskRequest + 2, // 19: state.v1.TaskService.ActiveTasksByOrigin:input_type -> state.v1.ActiveTasksByOriginRequest + 4, // 20: state.v1.TaskService.UnpostedOutcomes:input_type -> state.v1.UnpostedOutcomesRequest + 6, // 21: state.v1.TaskService.MarkOutcomePosted:input_type -> state.v1.MarkOutcomePostedRequest + 10, // 22: state.v1.TaskService.ClaimNext:input_type -> state.v1.ClaimNextRequest + 12, // 23: state.v1.TaskService.ClaimByIssue:input_type -> state.v1.ClaimByIssueRequest + 14, // 24: state.v1.TaskService.Transition:input_type -> state.v1.TransitionRequest + 16, // 25: state.v1.TaskService.Update:input_type -> state.v1.UpdateRequest + 44, // 26: state.v1.TaskService.TaskModels:input_type -> state.v1.TaskModelsRequest + 45, // 27: state.v1.TaskService.TaskInstructions:input_type -> state.v1.TaskInstructionsRequest + 18, // 28: state.v1.TaskService.Requeue:input_type -> state.v1.RequeueRequest + 20, // 29: state.v1.TaskService.ParkTask:input_type -> state.v1.ParkTaskRequest + 22, // 30: state.v1.TaskService.RecoverStale:input_type -> state.v1.RecoverStaleRequest + 24, // 31: state.v1.TaskService.ArchiveTask:input_type -> state.v1.ArchiveTaskRequest + 26, // 32: state.v1.TaskService.RetryTask:input_type -> state.v1.RetryTaskRequest + 28, // 33: state.v1.TaskService.TaskByIssue:input_type -> state.v1.TaskByIssueRequest + 30, // 34: state.v1.TaskService.OpenTaskByPR:input_type -> state.v1.OpenTaskByPRRequest + 32, // 35: state.v1.TaskService.TaskByID:input_type -> state.v1.TaskByIDRequest + 34, // 36: state.v1.TaskService.OpenPRs:input_type -> state.v1.OpenPRsRequest + 36, // 37: state.v1.TaskService.ClearTerminalTasks:input_type -> state.v1.ClearTerminalTasksRequest + 38, // 38: state.v1.TaskService.Tasks:input_type -> state.v1.TasksRequest + 40, // 39: state.v1.TaskService.EnqueueCallTask:input_type -> state.v1.EnqueueCallTaskRequest + 42, // 40: state.v1.TaskService.WorkflowCallStatus:input_type -> state.v1.WorkflowCallStatusRequest + 1, // 41: state.v1.TaskService.EnqueueIssue:output_type -> state.v1.EnqueueIssueResponse + 9, // 42: state.v1.TaskService.EnqueueChatTask:output_type -> state.v1.EnqueueChatTaskResponse + 3, // 43: state.v1.TaskService.ActiveTasksByOrigin:output_type -> state.v1.ActiveTasksByOriginResponse + 5, // 44: state.v1.TaskService.UnpostedOutcomes:output_type -> state.v1.UnpostedOutcomesResponse + 7, // 45: state.v1.TaskService.MarkOutcomePosted:output_type -> state.v1.MarkOutcomePostedResponse + 11, // 46: state.v1.TaskService.ClaimNext:output_type -> state.v1.ClaimNextResponse + 13, // 47: state.v1.TaskService.ClaimByIssue:output_type -> state.v1.ClaimByIssueResponse + 15, // 48: state.v1.TaskService.Transition:output_type -> state.v1.TransitionResponse + 17, // 49: state.v1.TaskService.Update:output_type -> state.v1.UpdateResponse + 47, // 50: state.v1.TaskService.TaskModels:output_type -> state.v1.TaskModelsResponse + 46, // 51: state.v1.TaskService.TaskInstructions:output_type -> state.v1.TaskInstructionsResponse + 19, // 52: state.v1.TaskService.Requeue:output_type -> state.v1.RequeueResponse + 21, // 53: state.v1.TaskService.ParkTask:output_type -> state.v1.ParkTaskResponse + 23, // 54: state.v1.TaskService.RecoverStale:output_type -> state.v1.RecoverStaleResponse + 25, // 55: state.v1.TaskService.ArchiveTask:output_type -> state.v1.ArchiveTaskResponse + 27, // 56: state.v1.TaskService.RetryTask:output_type -> state.v1.RetryTaskResponse + 29, // 57: state.v1.TaskService.TaskByIssue:output_type -> state.v1.TaskByIssueResponse + 31, // 58: state.v1.TaskService.OpenTaskByPR:output_type -> state.v1.OpenTaskByPRResponse + 33, // 59: state.v1.TaskService.TaskByID:output_type -> state.v1.TaskByIDResponse + 35, // 60: state.v1.TaskService.OpenPRs:output_type -> state.v1.OpenPRsResponse + 37, // 61: state.v1.TaskService.ClearTerminalTasks:output_type -> state.v1.ClearTerminalTasksResponse + 39, // 62: state.v1.TaskService.Tasks:output_type -> state.v1.TasksResponse + 41, // 63: state.v1.TaskService.EnqueueCallTask:output_type -> state.v1.EnqueueCallTaskResponse + 43, // 64: state.v1.TaskService.WorkflowCallStatus:output_type -> state.v1.WorkflowCallStatusResponse + 41, // [41:65] is the sub-list for method output_type + 17, // [17:41] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name +} + +func init() { file_state_v1_task_proto_init() } +func file_state_v1_task_proto_init() { + if File_state_v1_task_proto != nil { + return + } + file_state_v1_types_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_task_proto_rawDesc), len(file_state_v1_task_proto_rawDesc)), + NumEnums: 0, + NumMessages: 51, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_task_proto_goTypes, + DependencyIndexes: file_state_v1_task_proto_depIdxs, + MessageInfos: file_state_v1_task_proto_msgTypes, + }.Build() + File_state_v1_task_proto = out.File + file_state_v1_task_proto_goTypes = nil + file_state_v1_task_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/task_event.pb.go b/internal/contracts/state/v1/task_event.pb.go new file mode 100644 index 000000000..11b412264 --- /dev/null +++ b/internal/contracts/state/v1/task_event.pb.go @@ -0,0 +1,388 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/task_event.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type InsertEventRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InsertEventRequest) Reset() { + *x = InsertEventRequest{} + mi := &file_state_v1_task_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InsertEventRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InsertEventRequest) ProtoMessage() {} + +func (x *InsertEventRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_event_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InsertEventRequest.ProtoReflect.Descriptor instead. +func (*InsertEventRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_event_proto_rawDescGZIP(), []int{0} +} + +func (x *InsertEventRequest) GetEvent() *Event { + if x != nil { + return x.Event + } + return nil +} + +type InsertEventResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InsertEventResponse) Reset() { + *x = InsertEventResponse{} + mi := &file_state_v1_task_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InsertEventResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InsertEventResponse) ProtoMessage() {} + +func (x *InsertEventResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_event_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InsertEventResponse.ProtoReflect.Descriptor instead. +func (*InsertEventResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_event_proto_rawDescGZIP(), []int{1} +} + +func (x *InsertEventResponse) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +type EventsSinceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // since_id is the opaque resume cursor returned by the previous page (the SSE + // id: field, echoed back as Last-Event-ID). Empty means "from the + // beginning". The field keeps its name and number so the wire name stays + // put; only its type widened, from the SQLite rowid to the fixed-width + // "|" cursor. + SinceId string `protobuf:"bytes,1,opt,name=since_id,json=sinceId,proto3" json:"since_id,omitempty"` + Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EventsSinceRequest) Reset() { + *x = EventsSinceRequest{} + mi := &file_state_v1_task_event_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EventsSinceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventsSinceRequest) ProtoMessage() {} + +func (x *EventsSinceRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_event_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventsSinceRequest.ProtoReflect.Descriptor instead. +func (*EventsSinceRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_event_proto_rawDescGZIP(), []int{2} +} + +func (x *EventsSinceRequest) GetSinceId() string { + if x != nil { + return x.SinceId + } + return "" +} + +func (x *EventsSinceRequest) GetLimit() int64 { + if x != nil { + return x.Limit + } + return 0 +} + +type EventsSinceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EventsSinceResponse) Reset() { + *x = EventsSinceResponse{} + mi := &file_state_v1_task_event_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EventsSinceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventsSinceResponse) ProtoMessage() {} + +func (x *EventsSinceResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_event_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventsSinceResponse.ProtoReflect.Descriptor instead. +func (*EventsSinceResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_event_proto_rawDescGZIP(), []int{3} +} + +func (x *EventsSinceResponse) GetEvents() []*Event { + if x != nil { + return x.Events + } + return nil +} + +type TaskEventsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TaskEventsRequest) Reset() { + *x = TaskEventsRequest{} + mi := &file_state_v1_task_event_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TaskEventsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskEventsRequest) ProtoMessage() {} + +func (x *TaskEventsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_event_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskEventsRequest.ProtoReflect.Descriptor instead. +func (*TaskEventsRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_event_proto_rawDescGZIP(), []int{4} +} + +func (x *TaskEventsRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +type TaskEventsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TaskEventsResponse) Reset() { + *x = TaskEventsResponse{} + mi := &file_state_v1_task_event_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TaskEventsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskEventsResponse) ProtoMessage() {} + +func (x *TaskEventsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_event_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskEventsResponse.ProtoReflect.Descriptor instead. +func (*TaskEventsResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_event_proto_rawDescGZIP(), []int{5} +} + +func (x *TaskEventsResponse) GetEvents() []*Event { + if x != nil { + return x.Events + } + return nil +} + +var File_state_v1_task_event_proto protoreflect.FileDescriptor + +const file_state_v1_task_event_proto_rawDesc = "" + + "\n" + + "\x19state/v1/task_event.proto\x12\bstate.v1\x1a\x14state/v1/types.proto\";\n" + + "\x12InsertEventRequest\x12%\n" + + "\x05event\x18\x01 \x01(\v2\x0f.state.v1.EventR\x05event\"%\n" + + "\x13InsertEventResponse\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\"E\n" + + "\x12EventsSinceRequest\x12\x19\n" + + "\bsince_id\x18\x01 \x01(\tR\asinceId\x12\x14\n" + + "\x05limit\x18\x02 \x01(\x03R\x05limit\">\n" + + "\x13EventsSinceResponse\x12'\n" + + "\x06events\x18\x01 \x03(\v2\x0f.state.v1.EventR\x06events\",\n" + + "\x11TaskEventsRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\"=\n" + + "\x12TaskEventsResponse\x12'\n" + + "\x06events\x18\x01 \x03(\v2\x0f.state.v1.EventR\x06events2\xf3\x01\n" + + "\x10TaskEventService\x12J\n" + + "\vInsertEvent\x12\x1c.state.v1.InsertEventRequest\x1a\x1d.state.v1.InsertEventResponse\x12J\n" + + "\vEventsSince\x12\x1c.state.v1.EventsSinceRequest\x1a\x1d.state.v1.EventsSinceResponse\x12G\n" + + "\n" + + "TaskEvents\x12\x1b.state.v1.TaskEventsRequest\x1a\x1c.state.v1.TaskEventsResponseB\xa8\x01\n" + + "\fcom.state.v1B\x0eTaskEventProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_task_event_proto_rawDescOnce sync.Once + file_state_v1_task_event_proto_rawDescData []byte +) + +func file_state_v1_task_event_proto_rawDescGZIP() []byte { + file_state_v1_task_event_proto_rawDescOnce.Do(func() { + file_state_v1_task_event_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_task_event_proto_rawDesc), len(file_state_v1_task_event_proto_rawDesc))) + }) + return file_state_v1_task_event_proto_rawDescData +} + +var file_state_v1_task_event_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_state_v1_task_event_proto_goTypes = []any{ + (*InsertEventRequest)(nil), // 0: state.v1.InsertEventRequest + (*InsertEventResponse)(nil), // 1: state.v1.InsertEventResponse + (*EventsSinceRequest)(nil), // 2: state.v1.EventsSinceRequest + (*EventsSinceResponse)(nil), // 3: state.v1.EventsSinceResponse + (*TaskEventsRequest)(nil), // 4: state.v1.TaskEventsRequest + (*TaskEventsResponse)(nil), // 5: state.v1.TaskEventsResponse + (*Event)(nil), // 6: state.v1.Event +} +var file_state_v1_task_event_proto_depIdxs = []int32{ + 6, // 0: state.v1.InsertEventRequest.event:type_name -> state.v1.Event + 6, // 1: state.v1.EventsSinceResponse.events:type_name -> state.v1.Event + 6, // 2: state.v1.TaskEventsResponse.events:type_name -> state.v1.Event + 0, // 3: state.v1.TaskEventService.InsertEvent:input_type -> state.v1.InsertEventRequest + 2, // 4: state.v1.TaskEventService.EventsSince:input_type -> state.v1.EventsSinceRequest + 4, // 5: state.v1.TaskEventService.TaskEvents:input_type -> state.v1.TaskEventsRequest + 1, // 6: state.v1.TaskEventService.InsertEvent:output_type -> state.v1.InsertEventResponse + 3, // 7: state.v1.TaskEventService.EventsSince:output_type -> state.v1.EventsSinceResponse + 5, // 8: state.v1.TaskEventService.TaskEvents:output_type -> state.v1.TaskEventsResponse + 6, // [6:9] is the sub-list for method output_type + 3, // [3:6] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_state_v1_task_event_proto_init() } +func file_state_v1_task_event_proto_init() { + if File_state_v1_task_event_proto != nil { + return + } + file_state_v1_types_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_task_event_proto_rawDesc), len(file_state_v1_task_event_proto_rawDesc)), + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_task_event_proto_goTypes, + DependencyIndexes: file_state_v1_task_event_proto_depIdxs, + MessageInfos: file_state_v1_task_event_proto_msgTypes, + }.Build() + File_state_v1_task_event_proto = out.File + file_state_v1_task_event_proto_goTypes = nil + file_state_v1_task_event_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/task_event_grpc.pb.go b/internal/contracts/state/v1/task_event_grpc.pb.go new file mode 100644 index 000000000..13ed53c16 --- /dev/null +++ b/internal/contracts/state/v1/task_event_grpc.pb.go @@ -0,0 +1,197 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/task_event.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 ( + TaskEventService_InsertEvent_FullMethodName = "/state.v1.TaskEventService/InsertEvent" + TaskEventService_EventsSince_FullMethodName = "/state.v1.TaskEventService/EventsSince" + TaskEventService_TaskEvents_FullMethodName = "/state.v1.TaskEventService/TaskEvents" +) + +// TaskEventServiceClient is the client API for TaskEventService 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 TaskEventServiceClient interface { + InsertEvent(ctx context.Context, in *InsertEventRequest, opts ...grpc.CallOption) (*InsertEventResponse, error) + EventsSince(ctx context.Context, in *EventsSinceRequest, opts ...grpc.CallOption) (*EventsSinceResponse, error) + TaskEvents(ctx context.Context, in *TaskEventsRequest, opts ...grpc.CallOption) (*TaskEventsResponse, error) +} + +type taskEventServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTaskEventServiceClient(cc grpc.ClientConnInterface) TaskEventServiceClient { + return &taskEventServiceClient{cc} +} + +func (c *taskEventServiceClient) InsertEvent(ctx context.Context, in *InsertEventRequest, opts ...grpc.CallOption) (*InsertEventResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(InsertEventResponse) + err := c.cc.Invoke(ctx, TaskEventService_InsertEvent_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskEventServiceClient) EventsSince(ctx context.Context, in *EventsSinceRequest, opts ...grpc.CallOption) (*EventsSinceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(EventsSinceResponse) + err := c.cc.Invoke(ctx, TaskEventService_EventsSince_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskEventServiceClient) TaskEvents(ctx context.Context, in *TaskEventsRequest, opts ...grpc.CallOption) (*TaskEventsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TaskEventsResponse) + err := c.cc.Invoke(ctx, TaskEventService_TaskEvents_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TaskEventServiceServer is the server API for TaskEventService service. +// All implementations must embed UnimplementedTaskEventServiceServer +// for forward compatibility. +type TaskEventServiceServer interface { + InsertEvent(context.Context, *InsertEventRequest) (*InsertEventResponse, error) + EventsSince(context.Context, *EventsSinceRequest) (*EventsSinceResponse, error) + TaskEvents(context.Context, *TaskEventsRequest) (*TaskEventsResponse, error) + mustEmbedUnimplementedTaskEventServiceServer() +} + +// UnimplementedTaskEventServiceServer 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 UnimplementedTaskEventServiceServer struct{} + +func (UnimplementedTaskEventServiceServer) InsertEvent(context.Context, *InsertEventRequest) (*InsertEventResponse, error) { + return nil, status.Error(codes.Unimplemented, "method InsertEvent not implemented") +} +func (UnimplementedTaskEventServiceServer) EventsSince(context.Context, *EventsSinceRequest) (*EventsSinceResponse, error) { + return nil, status.Error(codes.Unimplemented, "method EventsSince not implemented") +} +func (UnimplementedTaskEventServiceServer) TaskEvents(context.Context, *TaskEventsRequest) (*TaskEventsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method TaskEvents not implemented") +} +func (UnimplementedTaskEventServiceServer) mustEmbedUnimplementedTaskEventServiceServer() {} +func (UnimplementedTaskEventServiceServer) testEmbeddedByValue() {} + +// UnsafeTaskEventServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TaskEventServiceServer will +// result in compilation errors. +type UnsafeTaskEventServiceServer interface { + mustEmbedUnimplementedTaskEventServiceServer() +} + +func RegisterTaskEventServiceServer(s grpc.ServiceRegistrar, srv TaskEventServiceServer) { + // If the following call panics, it indicates UnimplementedTaskEventServiceServer 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(&TaskEventService_ServiceDesc, srv) +} + +func _TaskEventService_InsertEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InsertEventRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskEventServiceServer).InsertEvent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskEventService_InsertEvent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskEventServiceServer).InsertEvent(ctx, req.(*InsertEventRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskEventService_EventsSince_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EventsSinceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskEventServiceServer).EventsSince(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskEventService_EventsSince_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskEventServiceServer).EventsSince(ctx, req.(*EventsSinceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskEventService_TaskEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TaskEventsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskEventServiceServer).TaskEvents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskEventService_TaskEvents_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskEventServiceServer).TaskEvents(ctx, req.(*TaskEventsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TaskEventService_ServiceDesc is the grpc.ServiceDesc for TaskEventService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TaskEventService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.TaskEventService", + HandlerType: (*TaskEventServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "InsertEvent", + Handler: _TaskEventService_InsertEvent_Handler, + }, + { + MethodName: "EventsSince", + Handler: _TaskEventService_EventsSince_Handler, + }, + { + MethodName: "TaskEvents", + Handler: _TaskEventService_TaskEvents_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "state/v1/task_event.proto", +} diff --git a/internal/contracts/state/v1/task_grant.pb.go b/internal/contracts/state/v1/task_grant.pb.go new file mode 100644 index 000000000..c668861a9 --- /dev/null +++ b/internal/contracts/state/v1/task_grant.pb.go @@ -0,0 +1,390 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/task_grant.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RegisterTaskGrantRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + LifetimeSeconds int64 `protobuf:"varint,3,opt,name=lifetime_seconds,json=lifetimeSeconds,proto3" json:"lifetime_seconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegisterTaskGrantRequest) Reset() { + *x = RegisterTaskGrantRequest{} + mi := &file_state_v1_task_grant_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegisterTaskGrantRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterTaskGrantRequest) ProtoMessage() {} + +func (x *RegisterTaskGrantRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_grant_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterTaskGrantRequest.ProtoReflect.Descriptor instead. +func (*RegisterTaskGrantRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_grant_proto_rawDescGZIP(), []int{0} +} + +func (x *RegisterTaskGrantRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *RegisterTaskGrantRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *RegisterTaskGrantRequest) GetLifetimeSeconds() int64 { + if x != nil { + return x.LifetimeSeconds + } + return 0 +} + +type RegisterTaskGrantResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegisterTaskGrantResponse) Reset() { + *x = RegisterTaskGrantResponse{} + mi := &file_state_v1_task_grant_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegisterTaskGrantResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterTaskGrantResponse) ProtoMessage() {} + +func (x *RegisterTaskGrantResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_grant_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterTaskGrantResponse.ProtoReflect.Descriptor instead. +func (*RegisterTaskGrantResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_grant_proto_rawDescGZIP(), []int{1} +} + +type RevokeTaskGrantRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RevokeTaskGrantRequest) Reset() { + *x = RevokeTaskGrantRequest{} + mi := &file_state_v1_task_grant_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RevokeTaskGrantRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokeTaskGrantRequest) ProtoMessage() {} + +func (x *RevokeTaskGrantRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_grant_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevokeTaskGrantRequest.ProtoReflect.Descriptor instead. +func (*RevokeTaskGrantRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_grant_proto_rawDescGZIP(), []int{2} +} + +func (x *RevokeTaskGrantRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +type RevokeTaskGrantResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RevokeTaskGrantResponse) Reset() { + *x = RevokeTaskGrantResponse{} + mi := &file_state_v1_task_grant_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RevokeTaskGrantResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokeTaskGrantResponse) ProtoMessage() {} + +func (x *RevokeTaskGrantResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_grant_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevokeTaskGrantResponse.ProtoReflect.Descriptor instead. +func (*RevokeTaskGrantResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_grant_proto_rawDescGZIP(), []int{3} +} + +// ResolveTaskGrantRequest names a run credential; the response is the task +// it was issued for. +type ResolveTaskGrantRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResolveTaskGrantRequest) Reset() { + *x = ResolveTaskGrantRequest{} + mi := &file_state_v1_task_grant_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResolveTaskGrantRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResolveTaskGrantRequest) ProtoMessage() {} + +func (x *ResolveTaskGrantRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_grant_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResolveTaskGrantRequest.ProtoReflect.Descriptor instead. +func (*ResolveTaskGrantRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_grant_proto_rawDescGZIP(), []int{4} +} + +func (x *ResolveTaskGrantRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +type ResolveTaskGrantResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + // Canonical execution identity; empty names the instance root RPC route. + ExecutionIdentity string `protobuf:"bytes,2,opt,name=execution_identity,json=executionIdentity,proto3" json:"execution_identity,omitempty"` + // Canonical principal, including the instance root. + PrincipalId string `protobuf:"bytes,3,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResolveTaskGrantResponse) Reset() { + *x = ResolveTaskGrantResponse{} + mi := &file_state_v1_task_grant_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResolveTaskGrantResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResolveTaskGrantResponse) ProtoMessage() {} + +func (x *ResolveTaskGrantResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_grant_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResolveTaskGrantResponse.ProtoReflect.Descriptor instead. +func (*ResolveTaskGrantResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_grant_proto_rawDescGZIP(), []int{5} +} + +func (x *ResolveTaskGrantResponse) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *ResolveTaskGrantResponse) GetExecutionIdentity() string { + if x != nil { + return x.ExecutionIdentity + } + return "" +} + +func (x *ResolveTaskGrantResponse) GetPrincipalId() string { + if x != nil { + return x.PrincipalId + } + return "" +} + +var File_state_v1_task_grant_proto protoreflect.FileDescriptor + +const file_state_v1_task_grant_proto_rawDesc = "" + + "\n" + + "\x19state/v1/task_grant.proto\x12\bstate.v1\"t\n" + + "\x18RegisterTaskGrantRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x14\n" + + "\x05token\x18\x02 \x01(\tR\x05token\x12)\n" + + "\x10lifetime_seconds\x18\x03 \x01(\x03R\x0flifetimeSeconds\"\x1b\n" + + "\x19RegisterTaskGrantResponse\".\n" + + "\x16RevokeTaskGrantRequest\x12\x14\n" + + "\x05token\x18\x01 \x01(\tR\x05token\"\x19\n" + + "\x17RevokeTaskGrantResponse\"/\n" + + "\x17ResolveTaskGrantRequest\x12\x14\n" + + "\x05token\x18\x01 \x01(\tR\x05token\"\x85\x01\n" + + "\x18ResolveTaskGrantResponse\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12-\n" + + "\x12execution_identity\x18\x02 \x01(\tR\x11executionIdentity\x12!\n" + + "\fprincipal_id\x18\x03 \x01(\tR\vprincipalId2\xa3\x02\n" + + "\x10TaskGrantService\x12\\\n" + + "\x11RegisterTaskGrant\x12\".state.v1.RegisterTaskGrantRequest\x1a#.state.v1.RegisterTaskGrantResponse\x12V\n" + + "\x0fRevokeTaskGrant\x12 .state.v1.RevokeTaskGrantRequest\x1a!.state.v1.RevokeTaskGrantResponse\x12Y\n" + + "\x10ResolveTaskGrant\x12!.state.v1.ResolveTaskGrantRequest\x1a\".state.v1.ResolveTaskGrantResponseB\xa8\x01\n" + + "\fcom.state.v1B\x0eTaskGrantProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_task_grant_proto_rawDescOnce sync.Once + file_state_v1_task_grant_proto_rawDescData []byte +) + +func file_state_v1_task_grant_proto_rawDescGZIP() []byte { + file_state_v1_task_grant_proto_rawDescOnce.Do(func() { + file_state_v1_task_grant_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_task_grant_proto_rawDesc), len(file_state_v1_task_grant_proto_rawDesc))) + }) + return file_state_v1_task_grant_proto_rawDescData +} + +var file_state_v1_task_grant_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_state_v1_task_grant_proto_goTypes = []any{ + (*RegisterTaskGrantRequest)(nil), // 0: state.v1.RegisterTaskGrantRequest + (*RegisterTaskGrantResponse)(nil), // 1: state.v1.RegisterTaskGrantResponse + (*RevokeTaskGrantRequest)(nil), // 2: state.v1.RevokeTaskGrantRequest + (*RevokeTaskGrantResponse)(nil), // 3: state.v1.RevokeTaskGrantResponse + (*ResolveTaskGrantRequest)(nil), // 4: state.v1.ResolveTaskGrantRequest + (*ResolveTaskGrantResponse)(nil), // 5: state.v1.ResolveTaskGrantResponse +} +var file_state_v1_task_grant_proto_depIdxs = []int32{ + 0, // 0: state.v1.TaskGrantService.RegisterTaskGrant:input_type -> state.v1.RegisterTaskGrantRequest + 2, // 1: state.v1.TaskGrantService.RevokeTaskGrant:input_type -> state.v1.RevokeTaskGrantRequest + 4, // 2: state.v1.TaskGrantService.ResolveTaskGrant:input_type -> state.v1.ResolveTaskGrantRequest + 1, // 3: state.v1.TaskGrantService.RegisterTaskGrant:output_type -> state.v1.RegisterTaskGrantResponse + 3, // 4: state.v1.TaskGrantService.RevokeTaskGrant:output_type -> state.v1.RevokeTaskGrantResponse + 5, // 5: state.v1.TaskGrantService.ResolveTaskGrant:output_type -> state.v1.ResolveTaskGrantResponse + 3, // [3:6] is the sub-list for method output_type + 0, // [0:3] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_state_v1_task_grant_proto_init() } +func file_state_v1_task_grant_proto_init() { + if File_state_v1_task_grant_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_task_grant_proto_rawDesc), len(file_state_v1_task_grant_proto_rawDesc)), + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_task_grant_proto_goTypes, + DependencyIndexes: file_state_v1_task_grant_proto_depIdxs, + MessageInfos: file_state_v1_task_grant_proto_msgTypes, + }.Build() + File_state_v1_task_grant_proto = out.File + file_state_v1_task_grant_proto_goTypes = nil + file_state_v1_task_grant_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/task_grant_grpc.pb.go b/internal/contracts/state/v1/task_grant_grpc.pb.go new file mode 100644 index 000000000..06f5e3cbd --- /dev/null +++ b/internal/contracts/state/v1/task_grant_grpc.pb.go @@ -0,0 +1,201 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/task_grant.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 ( + TaskGrantService_RegisterTaskGrant_FullMethodName = "/state.v1.TaskGrantService/RegisterTaskGrant" + TaskGrantService_RevokeTaskGrant_FullMethodName = "/state.v1.TaskGrantService/RevokeTaskGrant" + TaskGrantService_ResolveTaskGrant_FullMethodName = "/state.v1.TaskGrantService/ResolveTaskGrant" +) + +// TaskGrantServiceClient is the client API for TaskGrantService 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. +// +// Administrative task credential lifecycle. Worker credentials cannot call these. +type TaskGrantServiceClient interface { + RegisterTaskGrant(ctx context.Context, in *RegisterTaskGrantRequest, opts ...grpc.CallOption) (*RegisterTaskGrantResponse, error) + RevokeTaskGrant(ctx context.Context, in *RevokeTaskGrantRequest, opts ...grpc.CallOption) (*RevokeTaskGrantResponse, error) + ResolveTaskGrant(ctx context.Context, in *ResolveTaskGrantRequest, opts ...grpc.CallOption) (*ResolveTaskGrantResponse, error) +} + +type taskGrantServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTaskGrantServiceClient(cc grpc.ClientConnInterface) TaskGrantServiceClient { + return &taskGrantServiceClient{cc} +} + +func (c *taskGrantServiceClient) RegisterTaskGrant(ctx context.Context, in *RegisterTaskGrantRequest, opts ...grpc.CallOption) (*RegisterTaskGrantResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RegisterTaskGrantResponse) + err := c.cc.Invoke(ctx, TaskGrantService_RegisterTaskGrant_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskGrantServiceClient) RevokeTaskGrant(ctx context.Context, in *RevokeTaskGrantRequest, opts ...grpc.CallOption) (*RevokeTaskGrantResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RevokeTaskGrantResponse) + err := c.cc.Invoke(ctx, TaskGrantService_RevokeTaskGrant_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskGrantServiceClient) ResolveTaskGrant(ctx context.Context, in *ResolveTaskGrantRequest, opts ...grpc.CallOption) (*ResolveTaskGrantResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ResolveTaskGrantResponse) + err := c.cc.Invoke(ctx, TaskGrantService_ResolveTaskGrant_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TaskGrantServiceServer is the server API for TaskGrantService service. +// All implementations must embed UnimplementedTaskGrantServiceServer +// for forward compatibility. +// +// Administrative task credential lifecycle. Worker credentials cannot call these. +type TaskGrantServiceServer interface { + RegisterTaskGrant(context.Context, *RegisterTaskGrantRequest) (*RegisterTaskGrantResponse, error) + RevokeTaskGrant(context.Context, *RevokeTaskGrantRequest) (*RevokeTaskGrantResponse, error) + ResolveTaskGrant(context.Context, *ResolveTaskGrantRequest) (*ResolveTaskGrantResponse, error) + mustEmbedUnimplementedTaskGrantServiceServer() +} + +// UnimplementedTaskGrantServiceServer 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 UnimplementedTaskGrantServiceServer struct{} + +func (UnimplementedTaskGrantServiceServer) RegisterTaskGrant(context.Context, *RegisterTaskGrantRequest) (*RegisterTaskGrantResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RegisterTaskGrant not implemented") +} +func (UnimplementedTaskGrantServiceServer) RevokeTaskGrant(context.Context, *RevokeTaskGrantRequest) (*RevokeTaskGrantResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RevokeTaskGrant not implemented") +} +func (UnimplementedTaskGrantServiceServer) ResolveTaskGrant(context.Context, *ResolveTaskGrantRequest) (*ResolveTaskGrantResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ResolveTaskGrant not implemented") +} +func (UnimplementedTaskGrantServiceServer) mustEmbedUnimplementedTaskGrantServiceServer() {} +func (UnimplementedTaskGrantServiceServer) testEmbeddedByValue() {} + +// UnsafeTaskGrantServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TaskGrantServiceServer will +// result in compilation errors. +type UnsafeTaskGrantServiceServer interface { + mustEmbedUnimplementedTaskGrantServiceServer() +} + +func RegisterTaskGrantServiceServer(s grpc.ServiceRegistrar, srv TaskGrantServiceServer) { + // If the following call panics, it indicates UnimplementedTaskGrantServiceServer 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(&TaskGrantService_ServiceDesc, srv) +} + +func _TaskGrantService_RegisterTaskGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterTaskGrantRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskGrantServiceServer).RegisterTaskGrant(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskGrantService_RegisterTaskGrant_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskGrantServiceServer).RegisterTaskGrant(ctx, req.(*RegisterTaskGrantRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskGrantService_RevokeTaskGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RevokeTaskGrantRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskGrantServiceServer).RevokeTaskGrant(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskGrantService_RevokeTaskGrant_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskGrantServiceServer).RevokeTaskGrant(ctx, req.(*RevokeTaskGrantRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskGrantService_ResolveTaskGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResolveTaskGrantRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskGrantServiceServer).ResolveTaskGrant(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskGrantService_ResolveTaskGrant_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskGrantServiceServer).ResolveTaskGrant(ctx, req.(*ResolveTaskGrantRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TaskGrantService_ServiceDesc is the grpc.ServiceDesc for TaskGrantService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TaskGrantService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.TaskGrantService", + HandlerType: (*TaskGrantServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RegisterTaskGrant", + Handler: _TaskGrantService_RegisterTaskGrant_Handler, + }, + { + MethodName: "RevokeTaskGrant", + Handler: _TaskGrantService_RevokeTaskGrant_Handler, + }, + { + MethodName: "ResolveTaskGrant", + Handler: _TaskGrantService_ResolveTaskGrant_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "state/v1/task_grant.proto", +} diff --git a/internal/contracts/state/v1/task_grpc.pb.go b/internal/contracts/state/v1/task_grpc.pb.go new file mode 100644 index 000000000..36eda9edb --- /dev/null +++ b/internal/contracts/state/v1/task_grpc.pb.go @@ -0,0 +1,1019 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/task.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 ( + TaskService_EnqueueIssue_FullMethodName = "/state.v1.TaskService/EnqueueIssue" + TaskService_EnqueueChatTask_FullMethodName = "/state.v1.TaskService/EnqueueChatTask" + TaskService_ActiveTasksByOrigin_FullMethodName = "/state.v1.TaskService/ActiveTasksByOrigin" + TaskService_UnpostedOutcomes_FullMethodName = "/state.v1.TaskService/UnpostedOutcomes" + TaskService_MarkOutcomePosted_FullMethodName = "/state.v1.TaskService/MarkOutcomePosted" + TaskService_ClaimNext_FullMethodName = "/state.v1.TaskService/ClaimNext" + TaskService_ClaimByIssue_FullMethodName = "/state.v1.TaskService/ClaimByIssue" + TaskService_Transition_FullMethodName = "/state.v1.TaskService/Transition" + TaskService_Update_FullMethodName = "/state.v1.TaskService/Update" + TaskService_TaskModels_FullMethodName = "/state.v1.TaskService/TaskModels" + TaskService_TaskInstructions_FullMethodName = "/state.v1.TaskService/TaskInstructions" + TaskService_Requeue_FullMethodName = "/state.v1.TaskService/Requeue" + TaskService_ParkTask_FullMethodName = "/state.v1.TaskService/ParkTask" + TaskService_RecoverStale_FullMethodName = "/state.v1.TaskService/RecoverStale" + TaskService_ArchiveTask_FullMethodName = "/state.v1.TaskService/ArchiveTask" + TaskService_RetryTask_FullMethodName = "/state.v1.TaskService/RetryTask" + TaskService_TaskByIssue_FullMethodName = "/state.v1.TaskService/TaskByIssue" + TaskService_OpenTaskByPR_FullMethodName = "/state.v1.TaskService/OpenTaskByPR" + TaskService_TaskByID_FullMethodName = "/state.v1.TaskService/TaskByID" + TaskService_OpenPRs_FullMethodName = "/state.v1.TaskService/OpenPRs" + TaskService_ClearTerminalTasks_FullMethodName = "/state.v1.TaskService/ClearTerminalTasks" + TaskService_Tasks_FullMethodName = "/state.v1.TaskService/Tasks" + TaskService_EnqueueCallTask_FullMethodName = "/state.v1.TaskService/EnqueueCallTask" + TaskService_WorkflowCallStatus_FullMethodName = "/state.v1.TaskService/WorkflowCallStatus" +) + +// TaskServiceClient is the client API for TaskService 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 TaskServiceClient interface { + EnqueueIssue(ctx context.Context, in *EnqueueIssueRequest, opts ...grpc.CallOption) (*EnqueueIssueResponse, error) + EnqueueChatTask(ctx context.Context, in *EnqueueChatTaskRequest, opts ...grpc.CallOption) (*EnqueueChatTaskResponse, error) + ActiveTasksByOrigin(ctx context.Context, in *ActiveTasksByOriginRequest, opts ...grpc.CallOption) (*ActiveTasksByOriginResponse, error) + // UnpostedOutcomes lists finished chat tasks whose outcome has not yet been + // posted to their conversation; MarkOutcomePosted records that it was. + UnpostedOutcomes(ctx context.Context, in *UnpostedOutcomesRequest, opts ...grpc.CallOption) (*UnpostedOutcomesResponse, error) + MarkOutcomePosted(ctx context.Context, in *MarkOutcomePostedRequest, opts ...grpc.CallOption) (*MarkOutcomePostedResponse, error) + ClaimNext(ctx context.Context, in *ClaimNextRequest, opts ...grpc.CallOption) (*ClaimNextResponse, error) + ClaimByIssue(ctx context.Context, in *ClaimByIssueRequest, opts ...grpc.CallOption) (*ClaimByIssueResponse, error) + Transition(ctx context.Context, in *TransitionRequest, opts ...grpc.CallOption) (*TransitionResponse, error) + Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) + // TaskModels answers what a task's models resolve against: the aliases its + // org may use and the org's own providers. The org is the task's, never + // the caller's. + TaskModels(ctx context.Context, in *TaskModelsRequest, opts ...grpc.CallOption) (*TaskModelsResponse, error) + // TaskInstructions answers the instance and organisation instructions a + // task's agent runs follow. Organisation is empty for a system-org task. + TaskInstructions(ctx context.Context, in *TaskInstructionsRequest, opts ...grpc.CallOption) (*TaskInstructionsResponse, error) + Requeue(ctx context.Context, in *RequeueRequest, opts ...grpc.CallOption) (*RequeueResponse, error) + ParkTask(ctx context.Context, in *ParkTaskRequest, opts ...grpc.CallOption) (*ParkTaskResponse, error) + RecoverStale(ctx context.Context, in *RecoverStaleRequest, opts ...grpc.CallOption) (*RecoverStaleResponse, error) + ArchiveTask(ctx context.Context, in *ArchiveTaskRequest, opts ...grpc.CallOption) (*ArchiveTaskResponse, error) + RetryTask(ctx context.Context, in *RetryTaskRequest, opts ...grpc.CallOption) (*RetryTaskResponse, error) + TaskByIssue(ctx context.Context, in *TaskByIssueRequest, opts ...grpc.CallOption) (*TaskByIssueResponse, error) + OpenTaskByPR(ctx context.Context, in *OpenTaskByPRRequest, opts ...grpc.CallOption) (*OpenTaskByPRResponse, error) + TaskByID(ctx context.Context, in *TaskByIDRequest, opts ...grpc.CallOption) (*TaskByIDResponse, error) + OpenPRs(ctx context.Context, in *OpenPRsRequest, opts ...grpc.CallOption) (*OpenPRsResponse, error) + ClearTerminalTasks(ctx context.Context, in *ClearTerminalTasksRequest, opts ...grpc.CallOption) (*ClearTerminalTasksResponse, error) + Tasks(ctx context.Context, in *TasksRequest, opts ...grpc.CallOption) (*TasksResponse, error) + // WorkflowCaller: a workflow.call step starts its callee and, with + // wait:true, reads it back while waiting. Both are the one sanctioned + // widening of a task-scoped grant -- the callee is the caller's child + // (docs/prds/workflow-calls.md). CallStatus re-checks the parent-child + // relation server-side, so the grant only names the caller. + EnqueueCallTask(ctx context.Context, in *EnqueueCallTaskRequest, opts ...grpc.CallOption) (*EnqueueCallTaskResponse, error) + WorkflowCallStatus(ctx context.Context, in *WorkflowCallStatusRequest, opts ...grpc.CallOption) (*WorkflowCallStatusResponse, error) +} + +type taskServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTaskServiceClient(cc grpc.ClientConnInterface) TaskServiceClient { + return &taskServiceClient{cc} +} + +func (c *taskServiceClient) EnqueueIssue(ctx context.Context, in *EnqueueIssueRequest, opts ...grpc.CallOption) (*EnqueueIssueResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(EnqueueIssueResponse) + err := c.cc.Invoke(ctx, TaskService_EnqueueIssue_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) EnqueueChatTask(ctx context.Context, in *EnqueueChatTaskRequest, opts ...grpc.CallOption) (*EnqueueChatTaskResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(EnqueueChatTaskResponse) + err := c.cc.Invoke(ctx, TaskService_EnqueueChatTask_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) ActiveTasksByOrigin(ctx context.Context, in *ActiveTasksByOriginRequest, opts ...grpc.CallOption) (*ActiveTasksByOriginResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ActiveTasksByOriginResponse) + err := c.cc.Invoke(ctx, TaskService_ActiveTasksByOrigin_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) UnpostedOutcomes(ctx context.Context, in *UnpostedOutcomesRequest, opts ...grpc.CallOption) (*UnpostedOutcomesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UnpostedOutcomesResponse) + err := c.cc.Invoke(ctx, TaskService_UnpostedOutcomes_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) MarkOutcomePosted(ctx context.Context, in *MarkOutcomePostedRequest, opts ...grpc.CallOption) (*MarkOutcomePostedResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MarkOutcomePostedResponse) + err := c.cc.Invoke(ctx, TaskService_MarkOutcomePosted_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) ClaimNext(ctx context.Context, in *ClaimNextRequest, opts ...grpc.CallOption) (*ClaimNextResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ClaimNextResponse) + err := c.cc.Invoke(ctx, TaskService_ClaimNext_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) ClaimByIssue(ctx context.Context, in *ClaimByIssueRequest, opts ...grpc.CallOption) (*ClaimByIssueResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ClaimByIssueResponse) + err := c.cc.Invoke(ctx, TaskService_ClaimByIssue_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) Transition(ctx context.Context, in *TransitionRequest, opts ...grpc.CallOption) (*TransitionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TransitionResponse) + err := c.cc.Invoke(ctx, TaskService_Transition_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdateResponse) + err := c.cc.Invoke(ctx, TaskService_Update_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) TaskModels(ctx context.Context, in *TaskModelsRequest, opts ...grpc.CallOption) (*TaskModelsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TaskModelsResponse) + err := c.cc.Invoke(ctx, TaskService_TaskModels_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) TaskInstructions(ctx context.Context, in *TaskInstructionsRequest, opts ...grpc.CallOption) (*TaskInstructionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TaskInstructionsResponse) + err := c.cc.Invoke(ctx, TaskService_TaskInstructions_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) Requeue(ctx context.Context, in *RequeueRequest, opts ...grpc.CallOption) (*RequeueResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RequeueResponse) + err := c.cc.Invoke(ctx, TaskService_Requeue_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) ParkTask(ctx context.Context, in *ParkTaskRequest, opts ...grpc.CallOption) (*ParkTaskResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ParkTaskResponse) + err := c.cc.Invoke(ctx, TaskService_ParkTask_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) RecoverStale(ctx context.Context, in *RecoverStaleRequest, opts ...grpc.CallOption) (*RecoverStaleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RecoverStaleResponse) + err := c.cc.Invoke(ctx, TaskService_RecoverStale_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) ArchiveTask(ctx context.Context, in *ArchiveTaskRequest, opts ...grpc.CallOption) (*ArchiveTaskResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ArchiveTaskResponse) + err := c.cc.Invoke(ctx, TaskService_ArchiveTask_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) RetryTask(ctx context.Context, in *RetryTaskRequest, opts ...grpc.CallOption) (*RetryTaskResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RetryTaskResponse) + err := c.cc.Invoke(ctx, TaskService_RetryTask_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) TaskByIssue(ctx context.Context, in *TaskByIssueRequest, opts ...grpc.CallOption) (*TaskByIssueResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TaskByIssueResponse) + err := c.cc.Invoke(ctx, TaskService_TaskByIssue_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) OpenTaskByPR(ctx context.Context, in *OpenTaskByPRRequest, opts ...grpc.CallOption) (*OpenTaskByPRResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(OpenTaskByPRResponse) + err := c.cc.Invoke(ctx, TaskService_OpenTaskByPR_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) TaskByID(ctx context.Context, in *TaskByIDRequest, opts ...grpc.CallOption) (*TaskByIDResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TaskByIDResponse) + err := c.cc.Invoke(ctx, TaskService_TaskByID_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) OpenPRs(ctx context.Context, in *OpenPRsRequest, opts ...grpc.CallOption) (*OpenPRsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(OpenPRsResponse) + err := c.cc.Invoke(ctx, TaskService_OpenPRs_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) ClearTerminalTasks(ctx context.Context, in *ClearTerminalTasksRequest, opts ...grpc.CallOption) (*ClearTerminalTasksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ClearTerminalTasksResponse) + err := c.cc.Invoke(ctx, TaskService_ClearTerminalTasks_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) Tasks(ctx context.Context, in *TasksRequest, opts ...grpc.CallOption) (*TasksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TasksResponse) + err := c.cc.Invoke(ctx, TaskService_Tasks_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) EnqueueCallTask(ctx context.Context, in *EnqueueCallTaskRequest, opts ...grpc.CallOption) (*EnqueueCallTaskResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(EnqueueCallTaskResponse) + err := c.cc.Invoke(ctx, TaskService_EnqueueCallTask_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) WorkflowCallStatus(ctx context.Context, in *WorkflowCallStatusRequest, opts ...grpc.CallOption) (*WorkflowCallStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(WorkflowCallStatusResponse) + err := c.cc.Invoke(ctx, TaskService_WorkflowCallStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TaskServiceServer is the server API for TaskService service. +// All implementations must embed UnimplementedTaskServiceServer +// for forward compatibility. +type TaskServiceServer interface { + EnqueueIssue(context.Context, *EnqueueIssueRequest) (*EnqueueIssueResponse, error) + EnqueueChatTask(context.Context, *EnqueueChatTaskRequest) (*EnqueueChatTaskResponse, error) + ActiveTasksByOrigin(context.Context, *ActiveTasksByOriginRequest) (*ActiveTasksByOriginResponse, error) + // UnpostedOutcomes lists finished chat tasks whose outcome has not yet been + // posted to their conversation; MarkOutcomePosted records that it was. + UnpostedOutcomes(context.Context, *UnpostedOutcomesRequest) (*UnpostedOutcomesResponse, error) + MarkOutcomePosted(context.Context, *MarkOutcomePostedRequest) (*MarkOutcomePostedResponse, error) + ClaimNext(context.Context, *ClaimNextRequest) (*ClaimNextResponse, error) + ClaimByIssue(context.Context, *ClaimByIssueRequest) (*ClaimByIssueResponse, error) + Transition(context.Context, *TransitionRequest) (*TransitionResponse, error) + Update(context.Context, *UpdateRequest) (*UpdateResponse, error) + // TaskModels answers what a task's models resolve against: the aliases its + // org may use and the org's own providers. The org is the task's, never + // the caller's. + TaskModels(context.Context, *TaskModelsRequest) (*TaskModelsResponse, error) + // TaskInstructions answers the instance and organisation instructions a + // task's agent runs follow. Organisation is empty for a system-org task. + TaskInstructions(context.Context, *TaskInstructionsRequest) (*TaskInstructionsResponse, error) + Requeue(context.Context, *RequeueRequest) (*RequeueResponse, error) + ParkTask(context.Context, *ParkTaskRequest) (*ParkTaskResponse, error) + RecoverStale(context.Context, *RecoverStaleRequest) (*RecoverStaleResponse, error) + ArchiveTask(context.Context, *ArchiveTaskRequest) (*ArchiveTaskResponse, error) + RetryTask(context.Context, *RetryTaskRequest) (*RetryTaskResponse, error) + TaskByIssue(context.Context, *TaskByIssueRequest) (*TaskByIssueResponse, error) + OpenTaskByPR(context.Context, *OpenTaskByPRRequest) (*OpenTaskByPRResponse, error) + TaskByID(context.Context, *TaskByIDRequest) (*TaskByIDResponse, error) + OpenPRs(context.Context, *OpenPRsRequest) (*OpenPRsResponse, error) + ClearTerminalTasks(context.Context, *ClearTerminalTasksRequest) (*ClearTerminalTasksResponse, error) + Tasks(context.Context, *TasksRequest) (*TasksResponse, error) + // WorkflowCaller: a workflow.call step starts its callee and, with + // wait:true, reads it back while waiting. Both are the one sanctioned + // widening of a task-scoped grant -- the callee is the caller's child + // (docs/prds/workflow-calls.md). CallStatus re-checks the parent-child + // relation server-side, so the grant only names the caller. + EnqueueCallTask(context.Context, *EnqueueCallTaskRequest) (*EnqueueCallTaskResponse, error) + WorkflowCallStatus(context.Context, *WorkflowCallStatusRequest) (*WorkflowCallStatusResponse, error) + mustEmbedUnimplementedTaskServiceServer() +} + +// UnimplementedTaskServiceServer 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 UnimplementedTaskServiceServer struct{} + +func (UnimplementedTaskServiceServer) EnqueueIssue(context.Context, *EnqueueIssueRequest) (*EnqueueIssueResponse, error) { + return nil, status.Error(codes.Unimplemented, "method EnqueueIssue not implemented") +} +func (UnimplementedTaskServiceServer) EnqueueChatTask(context.Context, *EnqueueChatTaskRequest) (*EnqueueChatTaskResponse, error) { + return nil, status.Error(codes.Unimplemented, "method EnqueueChatTask not implemented") +} +func (UnimplementedTaskServiceServer) ActiveTasksByOrigin(context.Context, *ActiveTasksByOriginRequest) (*ActiveTasksByOriginResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ActiveTasksByOrigin not implemented") +} +func (UnimplementedTaskServiceServer) UnpostedOutcomes(context.Context, *UnpostedOutcomesRequest) (*UnpostedOutcomesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method UnpostedOutcomes not implemented") +} +func (UnimplementedTaskServiceServer) MarkOutcomePosted(context.Context, *MarkOutcomePostedRequest) (*MarkOutcomePostedResponse, error) { + return nil, status.Error(codes.Unimplemented, "method MarkOutcomePosted not implemented") +} +func (UnimplementedTaskServiceServer) ClaimNext(context.Context, *ClaimNextRequest) (*ClaimNextResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ClaimNext not implemented") +} +func (UnimplementedTaskServiceServer) ClaimByIssue(context.Context, *ClaimByIssueRequest) (*ClaimByIssueResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ClaimByIssue not implemented") +} +func (UnimplementedTaskServiceServer) Transition(context.Context, *TransitionRequest) (*TransitionResponse, error) { + return nil, status.Error(codes.Unimplemented, "method Transition not implemented") +} +func (UnimplementedTaskServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) { + return nil, status.Error(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedTaskServiceServer) TaskModels(context.Context, *TaskModelsRequest) (*TaskModelsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method TaskModels not implemented") +} +func (UnimplementedTaskServiceServer) TaskInstructions(context.Context, *TaskInstructionsRequest) (*TaskInstructionsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method TaskInstructions not implemented") +} +func (UnimplementedTaskServiceServer) Requeue(context.Context, *RequeueRequest) (*RequeueResponse, error) { + return nil, status.Error(codes.Unimplemented, "method Requeue not implemented") +} +func (UnimplementedTaskServiceServer) ParkTask(context.Context, *ParkTaskRequest) (*ParkTaskResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ParkTask not implemented") +} +func (UnimplementedTaskServiceServer) RecoverStale(context.Context, *RecoverStaleRequest) (*RecoverStaleResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RecoverStale not implemented") +} +func (UnimplementedTaskServiceServer) ArchiveTask(context.Context, *ArchiveTaskRequest) (*ArchiveTaskResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ArchiveTask not implemented") +} +func (UnimplementedTaskServiceServer) RetryTask(context.Context, *RetryTaskRequest) (*RetryTaskResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RetryTask not implemented") +} +func (UnimplementedTaskServiceServer) TaskByIssue(context.Context, *TaskByIssueRequest) (*TaskByIssueResponse, error) { + return nil, status.Error(codes.Unimplemented, "method TaskByIssue not implemented") +} +func (UnimplementedTaskServiceServer) OpenTaskByPR(context.Context, *OpenTaskByPRRequest) (*OpenTaskByPRResponse, error) { + return nil, status.Error(codes.Unimplemented, "method OpenTaskByPR not implemented") +} +func (UnimplementedTaskServiceServer) TaskByID(context.Context, *TaskByIDRequest) (*TaskByIDResponse, error) { + return nil, status.Error(codes.Unimplemented, "method TaskByID not implemented") +} +func (UnimplementedTaskServiceServer) OpenPRs(context.Context, *OpenPRsRequest) (*OpenPRsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method OpenPRs not implemented") +} +func (UnimplementedTaskServiceServer) ClearTerminalTasks(context.Context, *ClearTerminalTasksRequest) (*ClearTerminalTasksResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ClearTerminalTasks not implemented") +} +func (UnimplementedTaskServiceServer) Tasks(context.Context, *TasksRequest) (*TasksResponse, error) { + return nil, status.Error(codes.Unimplemented, "method Tasks not implemented") +} +func (UnimplementedTaskServiceServer) EnqueueCallTask(context.Context, *EnqueueCallTaskRequest) (*EnqueueCallTaskResponse, error) { + return nil, status.Error(codes.Unimplemented, "method EnqueueCallTask not implemented") +} +func (UnimplementedTaskServiceServer) WorkflowCallStatus(context.Context, *WorkflowCallStatusRequest) (*WorkflowCallStatusResponse, error) { + return nil, status.Error(codes.Unimplemented, "method WorkflowCallStatus not implemented") +} +func (UnimplementedTaskServiceServer) mustEmbedUnimplementedTaskServiceServer() {} +func (UnimplementedTaskServiceServer) testEmbeddedByValue() {} + +// UnsafeTaskServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TaskServiceServer will +// result in compilation errors. +type UnsafeTaskServiceServer interface { + mustEmbedUnimplementedTaskServiceServer() +} + +func RegisterTaskServiceServer(s grpc.ServiceRegistrar, srv TaskServiceServer) { + // If the following call panics, it indicates UnimplementedTaskServiceServer 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(&TaskService_ServiceDesc, srv) +} + +func _TaskService_EnqueueIssue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EnqueueIssueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).EnqueueIssue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_EnqueueIssue_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).EnqueueIssue(ctx, req.(*EnqueueIssueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_EnqueueChatTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EnqueueChatTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).EnqueueChatTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_EnqueueChatTask_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).EnqueueChatTask(ctx, req.(*EnqueueChatTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_ActiveTasksByOrigin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ActiveTasksByOriginRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).ActiveTasksByOrigin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_ActiveTasksByOrigin_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).ActiveTasksByOrigin(ctx, req.(*ActiveTasksByOriginRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_UnpostedOutcomes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnpostedOutcomesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).UnpostedOutcomes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_UnpostedOutcomes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).UnpostedOutcomes(ctx, req.(*UnpostedOutcomesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_MarkOutcomePosted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MarkOutcomePostedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).MarkOutcomePosted(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_MarkOutcomePosted_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).MarkOutcomePosted(ctx, req.(*MarkOutcomePostedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_ClaimNext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClaimNextRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).ClaimNext(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_ClaimNext_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).ClaimNext(ctx, req.(*ClaimNextRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_ClaimByIssue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClaimByIssueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).ClaimByIssue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_ClaimByIssue_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).ClaimByIssue(ctx, req.(*ClaimByIssueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_Transition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TransitionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).Transition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_Transition_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).Transition(ctx, req.(*TransitionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).Update(ctx, req.(*UpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_TaskModels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TaskModelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).TaskModels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_TaskModels_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).TaskModels(ctx, req.(*TaskModelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_TaskInstructions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TaskInstructionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).TaskInstructions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_TaskInstructions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).TaskInstructions(ctx, req.(*TaskInstructionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_Requeue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequeueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).Requeue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_Requeue_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).Requeue(ctx, req.(*RequeueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_ParkTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ParkTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).ParkTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_ParkTask_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).ParkTask(ctx, req.(*ParkTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_RecoverStale_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RecoverStaleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).RecoverStale(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_RecoverStale_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).RecoverStale(ctx, req.(*RecoverStaleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_ArchiveTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).ArchiveTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_ArchiveTask_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).ArchiveTask(ctx, req.(*ArchiveTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_RetryTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RetryTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).RetryTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_RetryTask_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).RetryTask(ctx, req.(*RetryTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_TaskByIssue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TaskByIssueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).TaskByIssue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_TaskByIssue_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).TaskByIssue(ctx, req.(*TaskByIssueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_OpenTaskByPR_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OpenTaskByPRRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).OpenTaskByPR(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_OpenTaskByPR_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).OpenTaskByPR(ctx, req.(*OpenTaskByPRRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_TaskByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TaskByIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).TaskByID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_TaskByID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).TaskByID(ctx, req.(*TaskByIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_OpenPRs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OpenPRsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).OpenPRs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_OpenPRs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).OpenPRs(ctx, req.(*OpenPRsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_ClearTerminalTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClearTerminalTasksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).ClearTerminalTasks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_ClearTerminalTasks_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).ClearTerminalTasks(ctx, req.(*ClearTerminalTasksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_Tasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TasksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).Tasks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_Tasks_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).Tasks(ctx, req.(*TasksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_EnqueueCallTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EnqueueCallTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).EnqueueCallTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_EnqueueCallTask_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).EnqueueCallTask(ctx, req.(*EnqueueCallTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_WorkflowCallStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WorkflowCallStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).WorkflowCallStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_WorkflowCallStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).WorkflowCallStatus(ctx, req.(*WorkflowCallStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TaskService_ServiceDesc is the grpc.ServiceDesc for TaskService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TaskService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.TaskService", + HandlerType: (*TaskServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "EnqueueIssue", + Handler: _TaskService_EnqueueIssue_Handler, + }, + { + MethodName: "EnqueueChatTask", + Handler: _TaskService_EnqueueChatTask_Handler, + }, + { + MethodName: "ActiveTasksByOrigin", + Handler: _TaskService_ActiveTasksByOrigin_Handler, + }, + { + MethodName: "UnpostedOutcomes", + Handler: _TaskService_UnpostedOutcomes_Handler, + }, + { + MethodName: "MarkOutcomePosted", + Handler: _TaskService_MarkOutcomePosted_Handler, + }, + { + MethodName: "ClaimNext", + Handler: _TaskService_ClaimNext_Handler, + }, + { + MethodName: "ClaimByIssue", + Handler: _TaskService_ClaimByIssue_Handler, + }, + { + MethodName: "Transition", + Handler: _TaskService_Transition_Handler, + }, + { + MethodName: "Update", + Handler: _TaskService_Update_Handler, + }, + { + MethodName: "TaskModels", + Handler: _TaskService_TaskModels_Handler, + }, + { + MethodName: "TaskInstructions", + Handler: _TaskService_TaskInstructions_Handler, + }, + { + MethodName: "Requeue", + Handler: _TaskService_Requeue_Handler, + }, + { + MethodName: "ParkTask", + Handler: _TaskService_ParkTask_Handler, + }, + { + MethodName: "RecoverStale", + Handler: _TaskService_RecoverStale_Handler, + }, + { + MethodName: "ArchiveTask", + Handler: _TaskService_ArchiveTask_Handler, + }, + { + MethodName: "RetryTask", + Handler: _TaskService_RetryTask_Handler, + }, + { + MethodName: "TaskByIssue", + Handler: _TaskService_TaskByIssue_Handler, + }, + { + MethodName: "OpenTaskByPR", + Handler: _TaskService_OpenTaskByPR_Handler, + }, + { + MethodName: "TaskByID", + Handler: _TaskService_TaskByID_Handler, + }, + { + MethodName: "OpenPRs", + Handler: _TaskService_OpenPRs_Handler, + }, + { + MethodName: "ClearTerminalTasks", + Handler: _TaskService_ClearTerminalTasks_Handler, + }, + { + MethodName: "Tasks", + Handler: _TaskService_Tasks_Handler, + }, + { + MethodName: "EnqueueCallTask", + Handler: _TaskService_EnqueueCallTask_Handler, + }, + { + MethodName: "WorkflowCallStatus", + Handler: _TaskService_WorkflowCallStatus_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "state/v1/task.proto", +} diff --git a/internal/contracts/state/v1/task_log.pb.go b/internal/contracts/state/v1/task_log.pb.go new file mode 100644 index 000000000..cb71d9d1e --- /dev/null +++ b/internal/contracts/state/v1/task_log.pb.go @@ -0,0 +1,566 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/task_log.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// TaskLogEntry mirrors internal/logging.Entry: one decoded log line. fields +// carries every remaining key as a JSON object string, the same way Event +// carries its data, so structured context survives the hop without this +// contract having to know what a call site attached. +type TaskLogEntry struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"` + Level string `protobuf:"bytes,3,opt,name=level,proto3" json:"level,omitempty"` + Msg string `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"` + FieldsJson string `protobuf:"bytes,5,opt,name=fields_json,json=fieldsJson,proto3" json:"fields_json,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TaskLogEntry) Reset() { + *x = TaskLogEntry{} + mi := &file_state_v1_task_log_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TaskLogEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskLogEntry) ProtoMessage() {} + +func (x *TaskLogEntry) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_log_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskLogEntry.ProtoReflect.Descriptor instead. +func (*TaskLogEntry) Descriptor() ([]byte, []int) { + return file_state_v1_task_log_proto_rawDescGZIP(), []int{0} +} + +func (x *TaskLogEntry) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *TaskLogEntry) GetTime() *timestamppb.Timestamp { + if x != nil { + return x.Time + } + return nil +} + +func (x *TaskLogEntry) GetLevel() string { + if x != nil { + return x.Level + } + return "" +} + +func (x *TaskLogEntry) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +func (x *TaskLogEntry) GetFieldsJson() string { + if x != nil { + return x.FieldsJson + } + return "" +} + +// ReadTaskLog returns a page of one task attempt's decoded log. attempt is the +// attempt the caller resolved (the dashboard sends the task's current attempt +// when the request omitted one). levels, component, contains, since and until +// carry the whole query the logging package's Tail accepts -- the wire mirrors +// that query rather than a subset of it, so a filter cannot silently stop +// working by crossing the boundary. limit is caller-capped +// (docs/prds/state-store-contract.md §8: the log cap is 2000). +type ReadTaskLogRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Attempt int64 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` + Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` + Levels []string `protobuf:"bytes,4,rep,name=levels,proto3" json:"levels,omitempty"` + Component string `protobuf:"bytes,5,opt,name=component,proto3" json:"component,omitempty"` + Contains string `protobuf:"bytes,6,opt,name=contains,proto3" json:"contains,omitempty"` + Since *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=since,proto3" json:"since,omitempty"` + Until *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=until,proto3" json:"until,omitempty"` + // stage filters on an entry's own "stage" field. Only entries a stage + // tagged carry one -- agent and tool output is logged without a stage, so a + // stage filter narrows the file rather than covering it. Empty means any. + Stage string `protobuf:"bytes,9,opt,name=stage,proto3" json:"stage,omitempty"` + // before_id is the byte-offset cursor a previous page returned as cursor: the + // read returns the most recent matching entries ending at or before it. Zero + // reads the tail, which is the page the dashboard opens on. + BeforeId int64 `protobuf:"varint,10,opt,name=before_id,json=beforeId,proto3" json:"before_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReadTaskLogRequest) Reset() { + *x = ReadTaskLogRequest{} + mi := &file_state_v1_task_log_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReadTaskLogRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadTaskLogRequest) ProtoMessage() {} + +func (x *ReadTaskLogRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_log_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadTaskLogRequest.ProtoReflect.Descriptor instead. +func (*ReadTaskLogRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_log_proto_rawDescGZIP(), []int{1} +} + +func (x *ReadTaskLogRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *ReadTaskLogRequest) GetAttempt() int64 { + if x != nil { + return x.Attempt + } + return 0 +} + +func (x *ReadTaskLogRequest) GetLimit() int64 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *ReadTaskLogRequest) GetLevels() []string { + if x != nil { + return x.Levels + } + return nil +} + +func (x *ReadTaskLogRequest) GetComponent() string { + if x != nil { + return x.Component + } + return "" +} + +func (x *ReadTaskLogRequest) GetContains() string { + if x != nil { + return x.Contains + } + return "" +} + +func (x *ReadTaskLogRequest) GetSince() *timestamppb.Timestamp { + if x != nil { + return x.Since + } + return nil +} + +func (x *ReadTaskLogRequest) GetUntil() *timestamppb.Timestamp { + if x != nil { + return x.Until + } + return nil +} + +func (x *ReadTaskLogRequest) GetStage() string { + if x != nil { + return x.Stage + } + return "" +} + +func (x *ReadTaskLogRequest) GetBeforeId() int64 { + if x != nil { + return x.BeforeId + } + return 0 +} + +// found=false is not an error: the task has no log file for that attempt. +// That is a different condition from a process that cannot read logs at all +// (codes.Unavailable), and the dashboard reports them differently. +type ReadTaskLogResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Entries []*TaskLogEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` + Truncated bool `protobuf:"varint,2,opt,name=truncated,proto3" json:"truncated,omitempty"` + Attempt int64 `protobuf:"varint,3,opt,name=attempt,proto3" json:"attempt,omitempty"` + Found bool `protobuf:"varint,4,opt,name=found,proto3" json:"found,omitempty"` + Components []string `protobuf:"bytes,5,rep,name=components,proto3" json:"components,omitempty"` + // file is the path read, so the page can name where the log came from. It + // is the state directory's own layout, reported to an already-authenticated + // operator; no caller is expected to open it. + File string `protobuf:"bytes,6,opt,name=file,proto3" json:"file,omitempty"` + // more_available reports matching entries did not fit in this page; cursor + // is the before_id for the next older one. truncated is separate: it means + // the log is larger than the readable scan window, so its oldest entries + // cannot be reached by paging at all. + MoreAvailable bool `protobuf:"varint,7,opt,name=more_available,json=moreAvailable,proto3" json:"more_available,omitempty"` + Cursor int64 `protobuf:"varint,8,opt,name=cursor,proto3" json:"cursor,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReadTaskLogResponse) Reset() { + *x = ReadTaskLogResponse{} + mi := &file_state_v1_task_log_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReadTaskLogResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadTaskLogResponse) ProtoMessage() {} + +func (x *ReadTaskLogResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_log_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadTaskLogResponse.ProtoReflect.Descriptor instead. +func (*ReadTaskLogResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_log_proto_rawDescGZIP(), []int{2} +} + +func (x *ReadTaskLogResponse) GetEntries() []*TaskLogEntry { + if x != nil { + return x.Entries + } + return nil +} + +func (x *ReadTaskLogResponse) GetTruncated() bool { + if x != nil { + return x.Truncated + } + return false +} + +func (x *ReadTaskLogResponse) GetAttempt() int64 { + if x != nil { + return x.Attempt + } + return 0 +} + +func (x *ReadTaskLogResponse) GetFound() bool { + if x != nil { + return x.Found + } + return false +} + +func (x *ReadTaskLogResponse) GetComponents() []string { + if x != nil { + return x.Components + } + return nil +} + +func (x *ReadTaskLogResponse) GetFile() string { + if x != nil { + return x.File + } + return "" +} + +func (x *ReadTaskLogResponse) GetMoreAvailable() bool { + if x != nil { + return x.MoreAvailable + } + return false +} + +func (x *ReadTaskLogResponse) GetCursor() int64 { + if x != nil { + return x.Cursor + } + return 0 +} + +// StreamTaskLogContent returns one attempt's log verbatim, for a download. The +// bytes are the file's own JSONL, not a re-encoding of it: this contract +// transports the log, it does not restate the format. found=false, with no +// chunks, means the attempt has no log file -- not an error. +type StreamTaskLogContentRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Attempt int64 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StreamTaskLogContentRequest) Reset() { + *x = StreamTaskLogContentRequest{} + mi := &file_state_v1_task_log_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamTaskLogContentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamTaskLogContentRequest) ProtoMessage() {} + +func (x *StreamTaskLogContentRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_log_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamTaskLogContentRequest.ProtoReflect.Descriptor instead. +func (*StreamTaskLogContentRequest) Descriptor() ([]byte, []int) { + return file_state_v1_task_log_proto_rawDescGZIP(), []int{3} +} + +func (x *StreamTaskLogContentRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *StreamTaskLogContentRequest) GetAttempt() int64 { + if x != nil { + return x.Attempt + } + return 0 +} + +type StreamTaskLogContentResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` + Attempt int64 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` + Found bool `protobuf:"varint,3,opt,name=found,proto3" json:"found,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StreamTaskLogContentResponse) Reset() { + *x = StreamTaskLogContentResponse{} + mi := &file_state_v1_task_log_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamTaskLogContentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamTaskLogContentResponse) ProtoMessage() {} + +func (x *StreamTaskLogContentResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_task_log_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamTaskLogContentResponse.ProtoReflect.Descriptor instead. +func (*StreamTaskLogContentResponse) Descriptor() ([]byte, []int) { + return file_state_v1_task_log_proto_rawDescGZIP(), []int{4} +} + +func (x *StreamTaskLogContentResponse) GetChunk() []byte { + if x != nil { + return x.Chunk + } + return nil +} + +func (x *StreamTaskLogContentResponse) GetAttempt() int64 { + if x != nil { + return x.Attempt + } + return 0 +} + +func (x *StreamTaskLogContentResponse) GetFound() bool { + if x != nil { + return x.Found + } + return false +} + +var File_state_v1_task_log_proto protoreflect.FileDescriptor + +const file_state_v1_task_log_proto_rawDesc = "" + + "\n" + + "\x17state/v1/task_log.proto\x12\bstate.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x97\x01\n" + + "\fTaskLogEntry\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12.\n" + + "\x04time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x04time\x12\x14\n" + + "\x05level\x18\x03 \x01(\tR\x05level\x12\x10\n" + + "\x03msg\x18\x04 \x01(\tR\x03msg\x12\x1f\n" + + "\vfields_json\x18\x05 \x01(\tR\n" + + "fieldsJson\"\xc6\x02\n" + + "\x12ReadTaskLogRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x18\n" + + "\aattempt\x18\x02 \x01(\x03R\aattempt\x12\x14\n" + + "\x05limit\x18\x03 \x01(\x03R\x05limit\x12\x16\n" + + "\x06levels\x18\x04 \x03(\tR\x06levels\x12\x1c\n" + + "\tcomponent\x18\x05 \x01(\tR\tcomponent\x12\x1a\n" + + "\bcontains\x18\x06 \x01(\tR\bcontains\x120\n" + + "\x05since\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\x05since\x120\n" + + "\x05until\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\x05until\x12\x14\n" + + "\x05stage\x18\t \x01(\tR\x05stage\x12\x1b\n" + + "\tbefore_id\x18\n" + + " \x01(\x03R\bbeforeId\"\x88\x02\n" + + "\x13ReadTaskLogResponse\x120\n" + + "\aentries\x18\x01 \x03(\v2\x16.state.v1.TaskLogEntryR\aentries\x12\x1c\n" + + "\ttruncated\x18\x02 \x01(\bR\ttruncated\x12\x18\n" + + "\aattempt\x18\x03 \x01(\x03R\aattempt\x12\x14\n" + + "\x05found\x18\x04 \x01(\bR\x05found\x12\x1e\n" + + "\n" + + "components\x18\x05 \x03(\tR\n" + + "components\x12\x12\n" + + "\x04file\x18\x06 \x01(\tR\x04file\x12%\n" + + "\x0emore_available\x18\a \x01(\bR\rmoreAvailable\x12\x16\n" + + "\x06cursor\x18\b \x01(\x03R\x06cursor\"P\n" + + "\x1bStreamTaskLogContentRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x18\n" + + "\aattempt\x18\x02 \x01(\x03R\aattempt\"d\n" + + "\x1cStreamTaskLogContentResponse\x12\x14\n" + + "\x05chunk\x18\x01 \x01(\fR\x05chunk\x12\x18\n" + + "\aattempt\x18\x02 \x01(\x03R\aattempt\x12\x14\n" + + "\x05found\x18\x03 \x01(\bR\x05found2\xc5\x01\n" + + "\x0eTaskLogService\x12J\n" + + "\vReadTaskLog\x12\x1c.state.v1.ReadTaskLogRequest\x1a\x1d.state.v1.ReadTaskLogResponse\x12g\n" + + "\x14StreamTaskLogContent\x12%.state.v1.StreamTaskLogContentRequest\x1a&.state.v1.StreamTaskLogContentResponse0\x01B\xa6\x01\n" + + "\fcom.state.v1B\fTaskLogProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_task_log_proto_rawDescOnce sync.Once + file_state_v1_task_log_proto_rawDescData []byte +) + +func file_state_v1_task_log_proto_rawDescGZIP() []byte { + file_state_v1_task_log_proto_rawDescOnce.Do(func() { + file_state_v1_task_log_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_task_log_proto_rawDesc), len(file_state_v1_task_log_proto_rawDesc))) + }) + return file_state_v1_task_log_proto_rawDescData +} + +var file_state_v1_task_log_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_state_v1_task_log_proto_goTypes = []any{ + (*TaskLogEntry)(nil), // 0: state.v1.TaskLogEntry + (*ReadTaskLogRequest)(nil), // 1: state.v1.ReadTaskLogRequest + (*ReadTaskLogResponse)(nil), // 2: state.v1.ReadTaskLogResponse + (*StreamTaskLogContentRequest)(nil), // 3: state.v1.StreamTaskLogContentRequest + (*StreamTaskLogContentResponse)(nil), // 4: state.v1.StreamTaskLogContentResponse + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp +} +var file_state_v1_task_log_proto_depIdxs = []int32{ + 5, // 0: state.v1.TaskLogEntry.time:type_name -> google.protobuf.Timestamp + 5, // 1: state.v1.ReadTaskLogRequest.since:type_name -> google.protobuf.Timestamp + 5, // 2: state.v1.ReadTaskLogRequest.until:type_name -> google.protobuf.Timestamp + 0, // 3: state.v1.ReadTaskLogResponse.entries:type_name -> state.v1.TaskLogEntry + 1, // 4: state.v1.TaskLogService.ReadTaskLog:input_type -> state.v1.ReadTaskLogRequest + 3, // 5: state.v1.TaskLogService.StreamTaskLogContent:input_type -> state.v1.StreamTaskLogContentRequest + 2, // 6: state.v1.TaskLogService.ReadTaskLog:output_type -> state.v1.ReadTaskLogResponse + 4, // 7: state.v1.TaskLogService.StreamTaskLogContent:output_type -> state.v1.StreamTaskLogContentResponse + 6, // [6:8] is the sub-list for method output_type + 4, // [4:6] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_state_v1_task_log_proto_init() } +func file_state_v1_task_log_proto_init() { + if File_state_v1_task_log_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_task_log_proto_rawDesc), len(file_state_v1_task_log_proto_rawDesc)), + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_state_v1_task_log_proto_goTypes, + DependencyIndexes: file_state_v1_task_log_proto_depIdxs, + MessageInfos: file_state_v1_task_log_proto_msgTypes, + }.Build() + File_state_v1_task_log_proto = out.File + file_state_v1_task_log_proto_goTypes = nil + file_state_v1_task_log_proto_depIdxs = nil +} diff --git a/internal/contracts/state/v1/task_log_grpc.pb.go b/internal/contracts/state/v1/task_log_grpc.pb.go new file mode 100644 index 000000000..72740e2f9 --- /dev/null +++ b/internal/contracts/state/v1/task_log_grpc.pb.go @@ -0,0 +1,183 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc (unknown) +// source: state/v1/task_log.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 ( + TaskLogService_ReadTaskLog_FullMethodName = "/state.v1.TaskLogService/ReadTaskLog" + TaskLogService_StreamTaskLogContent_FullMethodName = "/state.v1.TaskLogService/StreamTaskLogContent" +) + +// TaskLogServiceClient is the client API for TaskLogService 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. +// +// One task attempt's persisted log. Task log files live in the state +// directory this process owns, so the dashboard reads them over this contract +// rather than opening them itself +// (deployments/README.md). +type TaskLogServiceClient interface { + ReadTaskLog(ctx context.Context, in *ReadTaskLogRequest, opts ...grpc.CallOption) (*ReadTaskLogResponse, error) + // StreamTaskLogContent returns one attempt's log verbatim, one chunk per + // message, for a download. A log file is unbounded input (it rotates at + // DefaultMaxSizeMB), so a unary response would exceed gRPC's 4MiB message + // cap on a real log -- the same reason ListCaptures was superseded by + // StreamCaptures. + StreamTaskLogContent(ctx context.Context, in *StreamTaskLogContentRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamTaskLogContentResponse], error) +} + +type taskLogServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTaskLogServiceClient(cc grpc.ClientConnInterface) TaskLogServiceClient { + return &taskLogServiceClient{cc} +} + +func (c *taskLogServiceClient) ReadTaskLog(ctx context.Context, in *ReadTaskLogRequest, opts ...grpc.CallOption) (*ReadTaskLogResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ReadTaskLogResponse) + err := c.cc.Invoke(ctx, TaskLogService_ReadTaskLog_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskLogServiceClient) StreamTaskLogContent(ctx context.Context, in *StreamTaskLogContentRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamTaskLogContentResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &TaskLogService_ServiceDesc.Streams[0], TaskLogService_StreamTaskLogContent_FullMethodName, cOpts...) + if err != nil { + return nil, err + } + x := &grpc.GenericClientStream[StreamTaskLogContentRequest, StreamTaskLogContentResponse]{ClientStream: stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type TaskLogService_StreamTaskLogContentClient = grpc.ServerStreamingClient[StreamTaskLogContentResponse] + +// TaskLogServiceServer is the server API for TaskLogService service. +// All implementations must embed UnimplementedTaskLogServiceServer +// for forward compatibility. +// +// One task attempt's persisted log. Task log files live in the state +// directory this process owns, so the dashboard reads them over this contract +// rather than opening them itself +// (deployments/README.md). +type TaskLogServiceServer interface { + ReadTaskLog(context.Context, *ReadTaskLogRequest) (*ReadTaskLogResponse, error) + // StreamTaskLogContent returns one attempt's log verbatim, one chunk per + // message, for a download. A log file is unbounded input (it rotates at + // DefaultMaxSizeMB), so a unary response would exceed gRPC's 4MiB message + // cap on a real log -- the same reason ListCaptures was superseded by + // StreamCaptures. + StreamTaskLogContent(*StreamTaskLogContentRequest, grpc.ServerStreamingServer[StreamTaskLogContentResponse]) error + mustEmbedUnimplementedTaskLogServiceServer() +} + +// UnimplementedTaskLogServiceServer 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 UnimplementedTaskLogServiceServer struct{} + +func (UnimplementedTaskLogServiceServer) ReadTaskLog(context.Context, *ReadTaskLogRequest) (*ReadTaskLogResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ReadTaskLog not implemented") +} +func (UnimplementedTaskLogServiceServer) StreamTaskLogContent(*StreamTaskLogContentRequest, grpc.ServerStreamingServer[StreamTaskLogContentResponse]) error { + return status.Error(codes.Unimplemented, "method StreamTaskLogContent not implemented") +} +func (UnimplementedTaskLogServiceServer) mustEmbedUnimplementedTaskLogServiceServer() {} +func (UnimplementedTaskLogServiceServer) testEmbeddedByValue() {} + +// UnsafeTaskLogServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TaskLogServiceServer will +// result in compilation errors. +type UnsafeTaskLogServiceServer interface { + mustEmbedUnimplementedTaskLogServiceServer() +} + +func RegisterTaskLogServiceServer(s grpc.ServiceRegistrar, srv TaskLogServiceServer) { + // If the following call panics, it indicates UnimplementedTaskLogServiceServer 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(&TaskLogService_ServiceDesc, srv) +} + +func _TaskLogService_ReadTaskLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadTaskLogRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskLogServiceServer).ReadTaskLog(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskLogService_ReadTaskLog_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskLogServiceServer).ReadTaskLog(ctx, req.(*ReadTaskLogRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskLogService_StreamTaskLogContent_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamTaskLogContentRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(TaskLogServiceServer).StreamTaskLogContent(m, &grpc.GenericServerStream[StreamTaskLogContentRequest, StreamTaskLogContentResponse]{ServerStream: stream}) +} + +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type TaskLogService_StreamTaskLogContentServer = grpc.ServerStreamingServer[StreamTaskLogContentResponse] + +// TaskLogService_ServiceDesc is the grpc.ServiceDesc for TaskLogService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TaskLogService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "state.v1.TaskLogService", + HandlerType: (*TaskLogServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ReadTaskLog", + Handler: _TaskLogService_ReadTaskLog_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamTaskLogContent", + Handler: _TaskLogService_StreamTaskLogContent_Handler, + ServerStreams: true, + }, + }, + Metadata: "state/v1/task_log.proto", +} diff --git a/internal/contracts/state/v1/types.pb.go b/internal/contracts/state/v1/types.pb.go new file mode 100644 index 000000000..486a18e36 --- /dev/null +++ b/internal/contracts/state/v1/types.pb.go @@ -0,0 +1,927 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: state/v1/types.proto + +package statev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Identity struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Lifecycle string `protobuf:"bytes,4,opt,name=lifecycle,proto3" json:"lifecycle,omitempty"` + Version int64 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Identity) Reset() { + *x = Identity{} + mi := &file_state_v1_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Identity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Identity) ProtoMessage() {} + +func (x *Identity) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_types_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Identity.ProtoReflect.Descriptor instead. +func (*Identity) Descriptor() ([]byte, []int) { + return file_state_v1_types_proto_rawDescGZIP(), []int{0} +} + +func (x *Identity) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Identity) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Identity) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Identity) GetLifecycle() string { + if x != nil { + return x.Lifecycle + } + return "" +} + +func (x *Identity) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *Identity) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Identity) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +// Task mirrors internal/domain/workflow.Task. +type Task struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + Repo string `protobuf:"bytes,3,opt,name=repo,proto3" json:"repo,omitempty"` + IssueNumber int64 `protobuf:"varint,4,opt,name=issue_number,json=issueNumber,proto3" json:"issue_number,omitempty"` + Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` + Body string `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"` + Labels string `protobuf:"bytes,7,opt,name=labels,proto3" json:"labels,omitempty"` + Status string `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"` + Workflow string `protobuf:"bytes,9,opt,name=workflow,proto3" json:"workflow,omitempty"` + // Retired: the per-task "current stage" column was overwritten as + // workflow.Run advanced and carried no history. step_executions is the + // durable per-step record now (docs/prds/execution-tree-state-machine.md); + // ListSteps is its read. + // + // Deprecated: Marked as deprecated in state/v1/types.proto. + Stage string `protobuf:"bytes,10,opt,name=stage,proto3" json:"stage,omitempty"` + Branch string `protobuf:"bytes,11,opt,name=branch,proto3" json:"branch,omitempty"` + Plan string `protobuf:"bytes,12,opt,name=plan,proto3" json:"plan,omitempty"` + Notes string `protobuf:"bytes,13,opt,name=notes,proto3" json:"notes,omitempty"` + PrNumber int64 `protobuf:"varint,14,opt,name=pr_number,json=prNumber,proto3" json:"pr_number,omitempty"` + TokensUsed int64 `protobuf:"varint,15,opt,name=tokens_used,json=tokensUsed,proto3" json:"tokens_used,omitempty"` + Iterations int64 `protobuf:"varint,16,opt,name=iterations,proto3" json:"iterations,omitempty"` + Attempt int64 `protobuf:"varint,17,opt,name=attempt,proto3" json:"attempt,omitempty"` + ParkReason string `protobuf:"bytes,18,opt,name=park_reason,json=parkReason,proto3" json:"park_reason,omitempty"` + RetryCount int64 `protobuf:"varint,19,opt,name=retry_count,json=retryCount,proto3" json:"retry_count,omitempty"` + WatchCommentId int64 `protobuf:"varint,20,opt,name=watch_comment_id,json=watchCommentId,proto3" json:"watch_comment_id,omitempty"` + Source string `protobuf:"bytes,21,opt,name=source,proto3" json:"source,omitempty"` + Identity string `protobuf:"bytes,22,opt,name=identity,proto3" json:"identity,omitempty"` + BindingId string `protobuf:"bytes,23,opt,name=binding_id,json=bindingId,proto3" json:"binding_id,omitempty"` + BindingVersion int64 `protobuf:"varint,24,opt,name=binding_version,json=bindingVersion,proto3" json:"binding_version,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,25,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,26,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + // review_payload is the JSON-encoded review unit the remediate workflow's + // current run must address (docs/prds/pr-review-remediation.md decision 4). + ReviewPayload string `protobuf:"bytes,27,opt,name=review_payload,json=reviewPayload,proto3" json:"review_payload,omitempty"` + // The workflow pin: the exact definition version this run started with. + // It has to cross the wire for the daemon's digest guard to hold, because + // a retry reads the task back over this contract before deciding whether + // to reuse the pinned YAML (docs/prds/runtime-control-plane.md:95). + WorkflowDefinitionVersion int64 `protobuf:"varint,28,opt,name=workflow_definition_version,json=workflowDefinitionVersion,proto3" json:"workflow_definition_version,omitempty"` + WorkflowDefinitionDigest string `protobuf:"bytes,29,opt,name=workflow_definition_digest,json=workflowDefinitionDigest,proto3" json:"workflow_definition_digest,omitempty"` + WorkflowDefinitionYaml string `protobuf:"bytes,30,opt,name=workflow_definition_yaml,json=workflowDefinitionYaml,proto3" json:"workflow_definition_yaml,omitempty"` + // review_cursor is the poll backstop's high-water mark over forge review + // IDs for this task. It is separate from watch_comment_id (the review- + // comment cursor) because the two forge sequences are independent; one + // combined cursor would silently skip reviews once a larger comment ID + // landed (docs/prds/pr-review-remediation.md decision 2). + ReviewCursor int64 `protobuf:"varint,31,opt,name=review_cursor,json=reviewCursor,proto3" json:"review_cursor,omitempty"` + // park_class is the producer-recorded answer to "what kind of + // intervention does this park need?" (taskstate.ParkClass: + // needs_decision, transient, terminal). Store-side normalization makes + // empty and unknown values needs_decision, so the class is advisory on + // the wire and authoritative only as recorded at the park site. + ParkClass string `protobuf:"bytes,32,opt,name=park_class,json=parkClass,proto3" json:"park_class,omitempty"` + // remediation_rounds counts review-triggered remediation rounds + // separately from retry_count, so an operator's manual retries no + // longer draw down the review-remediation budget (and vice versa). + RemediationRounds int32 `protobuf:"varint,33,opt,name=remediation_rounds,json=remediationRounds,proto3" json:"remediation_rounds,omitempty"` + // inputs_json is the JSON object of workflow inputs a binding dispatch + // resolved (task.EncodeInputs); empty for a task no binding started. + InputsJson string `protobuf:"bytes,34,opt,name=inputs_json,json=inputsJson,proto3" json:"inputs_json,omitempty"` + // org is the org the task belongs to, derived store-side from the task's + // identity when the row is written; a task of a single-operator install + // belongs to the default org (docs/prds/orgs-and-access.md). + Org string `protobuf:"bytes,35,opt,name=org,proto3" json:"org,omitempty"` + // The workflow.call linkage (docs/prds/workflow-calls.md): the task whose + // workflow.call step started this one (0 on a root run) and how many + // call hops this row is from that root. Columns default, so an older + // writer reads as a depth-0 root run. + CallParentTaskId int64 `protobuf:"varint,36,opt,name=call_parent_task_id,json=callParentTaskId,proto3" json:"call_parent_task_id,omitempty"` + CallDepth int32 `protobuf:"varint,37,opt,name=call_depth,json=callDepth,proto3" json:"call_depth,omitempty"` + // outputs_json is the JSON object of declared-output values this run wrote + // (task.EncodeOutputs), empty for a run that wrote none. The container's + // Update sends the whole row, so a column the message cannot carry is a + // column that write drops (docs/prds/workflow-call-outputs.md, "Storage and + // wire"). + OutputsJson string `protobuf:"bytes,38,opt,name=outputs_json,json=outputsJson,proto3" json:"outputs_json,omitempty"` + // review_gate is the operator-approval gate's whole conversation with the + // operator (docs/prds/pr-review-operator-response.md): the offer the gate + // wrote before waiting, and the answer the response path filled in. It is + // opaque here -- internal/domain/workflow/prreview owns the encoding -- but + // it must cross so the dashboard can render the offer and the resumed run + // can read the answer. + ReviewGate string `protobuf:"bytes,39,opt,name=review_gate,json=reviewGate,proto3" json:"review_gate,omitempty"` + // rereview_rounds counts granted operator re-reviews, capped by + // prreview.MaxRereviewRounds in the guarded response write. It is separate + // from retry_count and remediation_rounds for the same reason those are + // separate from each other. + RereviewRounds int64 `protobuf:"varint,40,opt,name=rereview_rounds,json=rereviewRounds,proto3" json:"rereview_rounds,omitempty"` + // retry_mode is the operator's worktree choice for the next dispatch + // (taskstate.RetryMode: refresh_onto_base, continue_pushed_work). The retry + // action writes it and the daemon's prepareWorkspace reads it, so it must + // cross the wire for a retry to land on the source the operator chose. The + // empty string reads as refresh_onto_base. + RetryMode string `protobuf:"bytes,41,opt,name=retry_mode,json=retryMode,proto3" json:"retry_mode,omitempty"` + // resume_from is the stage the next attempt starts at; empty runs every + // stage. resume_results are the step results (JSON) it starts with. + ResumeFrom string `protobuf:"bytes,42,opt,name=resume_from,json=resumeFrom,proto3" json:"resume_from,omitempty"` + ResumeResults []byte `protobuf:"bytes,43,opt,name=resume_results,json=resumeResults,proto3" json:"resume_results,omitempty"` + // origin names the conversation that created the task; empty for none. + Origin string `protobuf:"bytes,44,opt,name=origin,proto3" json:"origin,omitempty"` + // workspace is the workspace of its org the task belongs to; read-only + // here. + Workspace string `protobuf:"bytes,45,opt,name=workspace,proto3" json:"workspace,omitempty"` + // binding_signature and binding_addr are the signature result and address + // of the captured event that started a binding task. + BindingSignature string `protobuf:"bytes,46,opt,name=binding_signature,json=bindingSignature,proto3" json:"binding_signature,omitempty"` + BindingAddr string `protobuf:"bytes,47,opt,name=binding_addr,json=bindingAddr,proto3" json:"binding_addr,omitempty"` + // park_blocker names what a parked task is missing (taskstate.Blocker), + // recorded at the park site; empty when the park has no known fix. + ParkBlocker string `protobuf:"bytes,48,opt,name=park_blocker,json=parkBlocker,proto3" json:"park_blocker,omitempty"` + // plan_document is the structured plan (JSON) plan was rendered from. + PlanDocument string `protobuf:"bytes,50,opt,name=plan_document,json=planDocument,proto3" json:"plan_document,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Task) Reset() { + *x = Task{} + mi := &file_state_v1_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Task) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Task) ProtoMessage() {} + +func (x *Task) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_types_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Task.ProtoReflect.Descriptor instead. +func (*Task) Descriptor() ([]byte, []int) { + return file_state_v1_types_proto_rawDescGZIP(), []int{1} +} + +func (x *Task) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Task) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *Task) GetRepo() string { + if x != nil { + return x.Repo + } + return "" +} + +func (x *Task) GetIssueNumber() int64 { + if x != nil { + return x.IssueNumber + } + return 0 +} + +func (x *Task) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *Task) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +func (x *Task) GetLabels() string { + if x != nil { + return x.Labels + } + return "" +} + +func (x *Task) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *Task) GetWorkflow() string { + if x != nil { + return x.Workflow + } + return "" +} + +// Deprecated: Marked as deprecated in state/v1/types.proto. +func (x *Task) GetStage() string { + if x != nil { + return x.Stage + } + return "" +} + +func (x *Task) GetBranch() string { + if x != nil { + return x.Branch + } + return "" +} + +func (x *Task) GetPlan() string { + if x != nil { + return x.Plan + } + return "" +} + +func (x *Task) GetNotes() string { + if x != nil { + return x.Notes + } + return "" +} + +func (x *Task) GetPrNumber() int64 { + if x != nil { + return x.PrNumber + } + return 0 +} + +func (x *Task) GetTokensUsed() int64 { + if x != nil { + return x.TokensUsed + } + return 0 +} + +func (x *Task) GetIterations() int64 { + if x != nil { + return x.Iterations + } + return 0 +} + +func (x *Task) GetAttempt() int64 { + if x != nil { + return x.Attempt + } + return 0 +} + +func (x *Task) GetParkReason() string { + if x != nil { + return x.ParkReason + } + return "" +} + +func (x *Task) GetRetryCount() int64 { + if x != nil { + return x.RetryCount + } + return 0 +} + +func (x *Task) GetWatchCommentId() int64 { + if x != nil { + return x.WatchCommentId + } + return 0 +} + +func (x *Task) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +func (x *Task) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *Task) GetBindingId() string { + if x != nil { + return x.BindingId + } + return "" +} + +func (x *Task) GetBindingVersion() int64 { + if x != nil { + return x.BindingVersion + } + return 0 +} + +func (x *Task) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Task) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *Task) GetReviewPayload() string { + if x != nil { + return x.ReviewPayload + } + return "" +} + +func (x *Task) GetWorkflowDefinitionVersion() int64 { + if x != nil { + return x.WorkflowDefinitionVersion + } + return 0 +} + +func (x *Task) GetWorkflowDefinitionDigest() string { + if x != nil { + return x.WorkflowDefinitionDigest + } + return "" +} + +func (x *Task) GetWorkflowDefinitionYaml() string { + if x != nil { + return x.WorkflowDefinitionYaml + } + return "" +} + +func (x *Task) GetReviewCursor() int64 { + if x != nil { + return x.ReviewCursor + } + return 0 +} + +func (x *Task) GetParkClass() string { + if x != nil { + return x.ParkClass + } + return "" +} + +func (x *Task) GetRemediationRounds() int32 { + if x != nil { + return x.RemediationRounds + } + return 0 +} + +func (x *Task) GetInputsJson() string { + if x != nil { + return x.InputsJson + } + return "" +} + +func (x *Task) GetOrg() string { + if x != nil { + return x.Org + } + return "" +} + +func (x *Task) GetCallParentTaskId() int64 { + if x != nil { + return x.CallParentTaskId + } + return 0 +} + +func (x *Task) GetCallDepth() int32 { + if x != nil { + return x.CallDepth + } + return 0 +} + +func (x *Task) GetOutputsJson() string { + if x != nil { + return x.OutputsJson + } + return "" +} + +func (x *Task) GetReviewGate() string { + if x != nil { + return x.ReviewGate + } + return "" +} + +func (x *Task) GetRereviewRounds() int64 { + if x != nil { + return x.RereviewRounds + } + return 0 +} + +func (x *Task) GetRetryMode() string { + if x != nil { + return x.RetryMode + } + return "" +} + +func (x *Task) GetResumeFrom() string { + if x != nil { + return x.ResumeFrom + } + return "" +} + +func (x *Task) GetResumeResults() []byte { + if x != nil { + return x.ResumeResults + } + return nil +} + +func (x *Task) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *Task) GetWorkspace() string { + if x != nil { + return x.Workspace + } + return "" +} + +func (x *Task) GetBindingSignature() string { + if x != nil { + return x.BindingSignature + } + return "" +} + +func (x *Task) GetBindingAddr() string { + if x != nil { + return x.BindingAddr + } + return "" +} + +func (x *Task) GetParkBlocker() string { + if x != nil { + return x.ParkBlocker + } + return "" +} + +func (x *Task) GetPlanDocument() string { + if x != nil { + return x.PlanDocument + } + return "" +} + +// Event mirrors internal/events.Event. Data is carried as a JSON object +// string (matching the store's own on-disk representation) rather than +// google.protobuf.Struct, to stay a direct mirror of the existing column. +type Event struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + At *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=at,proto3" json:"at,omitempty"` + Kind string `protobuf:"bytes,3,opt,name=kind,proto3" json:"kind,omitempty"` + TaskId int64 `protobuf:"varint,4,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Repo string `protobuf:"bytes,5,opt,name=repo,proto3" json:"repo,omitempty"` + Issue int64 `protobuf:"varint,6,opt,name=issue,proto3" json:"issue,omitempty"` + Workflow string `protobuf:"bytes,7,opt,name=workflow,proto3" json:"workflow,omitempty"` + Stage string `protobuf:"bytes,8,opt,name=stage,proto3" json:"stage,omitempty"` + // attempt is the run this event belongs to. Zero means UNATTRIBUTED, not a + // first attempt: rows written before the field existed, and the deliberately + // task-agnostic producers, all carry zero. A reader must report those as + // unattributable rather than presenting them as one run. + Attempt int64 `protobuf:"varint,11,opt,name=attempt,proto3" json:"attempt,omitempty"` + Detail string `protobuf:"bytes,9,opt,name=detail,proto3" json:"detail,omitempty"` + DataJson string `protobuf:"bytes,10,opt,name=data_json,json=dataJson,proto3" json:"data_json,omitempty"` + // Attribution. actor_id is the identity that performed the action and + // actor_kind its kind, so a reader can tell an agent's action from a person's + // without resolving the identity. principal_id is the identity whose authority + // the action used, which is a different fact when an agent acts under a + // person's standing approval; empty means unattributed. All three must cross + // this boundary: a record whose attribution survives only in `detail` is not + // queryable, which is the attribution this design exists to replace. + ActorId string `protobuf:"bytes,12,opt,name=actor_id,json=actorId,proto3" json:"actor_id,omitempty"` + ActorKind string `protobuf:"bytes,13,opt,name=actor_kind,json=actorKind,proto3" json:"actor_kind,omitempty"` + PrincipalId string `protobuf:"bytes,14,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Event) Reset() { + *x = Event{} + mi := &file_state_v1_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +func (x *Event) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_types_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_state_v1_types_proto_rawDescGZIP(), []int{2} +} + +func (x *Event) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Event) GetAt() *timestamppb.Timestamp { + if x != nil { + return x.At + } + return nil +} + +func (x *Event) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Event) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *Event) GetRepo() string { + if x != nil { + return x.Repo + } + return "" +} + +func (x *Event) GetIssue() int64 { + if x != nil { + return x.Issue + } + return 0 +} + +func (x *Event) GetWorkflow() string { + if x != nil { + return x.Workflow + } + return "" +} + +func (x *Event) GetStage() string { + if x != nil { + return x.Stage + } + return "" +} + +func (x *Event) GetAttempt() int64 { + if x != nil { + return x.Attempt + } + return 0 +} + +func (x *Event) GetDetail() string { + if x != nil { + return x.Detail + } + return "" +} + +func (x *Event) GetDataJson() string { + if x != nil { + return x.DataJson + } + return "" +} + +func (x *Event) GetActorId() string { + if x != nil { + return x.ActorId + } + return "" +} + +func (x *Event) GetActorKind() string { + if x != nil { + return x.ActorKind + } + return "" +} + +func (x *Event) GetPrincipalId() string { + if x != nil { + return x.PrincipalId + } + return "" +} + +var File_state_v1_types_proto protoreflect.FileDescriptor + +const file_state_v1_types_proto_rawDesc = "" + + "\n" + + "\x14state/v1/types.proto\x12\bstate.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xff\x01\n" + + "\bIdentity\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04kind\x18\x02 \x01(\tR\x04kind\x12!\n" + + "\fdisplay_name\x18\x03 \x01(\tR\vdisplayName\x12\x1c\n" + + "\tlifecycle\x18\x04 \x01(\tR\tlifecycle\x12\x18\n" + + "\aversion\x18\x05 \x01(\x03R\aversion\x129\n" + + "\n" + + "created_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\x91\r\n" + + "\x04Task\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x14\n" + + "\x05owner\x18\x02 \x01(\tR\x05owner\x12\x12\n" + + "\x04repo\x18\x03 \x01(\tR\x04repo\x12!\n" + + "\fissue_number\x18\x04 \x01(\x03R\vissueNumber\x12\x14\n" + + "\x05title\x18\x05 \x01(\tR\x05title\x12\x12\n" + + "\x04body\x18\x06 \x01(\tR\x04body\x12\x16\n" + + "\x06labels\x18\a \x01(\tR\x06labels\x12\x16\n" + + "\x06status\x18\b \x01(\tR\x06status\x12\x1a\n" + + "\bworkflow\x18\t \x01(\tR\bworkflow\x12\x18\n" + + "\x05stage\x18\n" + + " \x01(\tB\x02\x18\x01R\x05stage\x12\x16\n" + + "\x06branch\x18\v \x01(\tR\x06branch\x12\x12\n" + + "\x04plan\x18\f \x01(\tR\x04plan\x12\x14\n" + + "\x05notes\x18\r \x01(\tR\x05notes\x12\x1b\n" + + "\tpr_number\x18\x0e \x01(\x03R\bprNumber\x12\x1f\n" + + "\vtokens_used\x18\x0f \x01(\x03R\n" + + "tokensUsed\x12\x1e\n" + + "\n" + + "iterations\x18\x10 \x01(\x03R\n" + + "iterations\x12\x18\n" + + "\aattempt\x18\x11 \x01(\x03R\aattempt\x12\x1f\n" + + "\vpark_reason\x18\x12 \x01(\tR\n" + + "parkReason\x12\x1f\n" + + "\vretry_count\x18\x13 \x01(\x03R\n" + + "retryCount\x12(\n" + + "\x10watch_comment_id\x18\x14 \x01(\x03R\x0ewatchCommentId\x12\x16\n" + + "\x06source\x18\x15 \x01(\tR\x06source\x12\x1a\n" + + "\bidentity\x18\x16 \x01(\tR\bidentity\x12\x1d\n" + + "\n" + + "binding_id\x18\x17 \x01(\tR\tbindingId\x12'\n" + + "\x0fbinding_version\x18\x18 \x01(\x03R\x0ebindingVersion\x129\n" + + "\n" + + "created_at\x18\x19 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x1a \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12%\n" + + "\x0ereview_payload\x18\x1b \x01(\tR\rreviewPayload\x12>\n" + + "\x1bworkflow_definition_version\x18\x1c \x01(\x03R\x19workflowDefinitionVersion\x12<\n" + + "\x1aworkflow_definition_digest\x18\x1d \x01(\tR\x18workflowDefinitionDigest\x128\n" + + "\x18workflow_definition_yaml\x18\x1e \x01(\tR\x16workflowDefinitionYaml\x12#\n" + + "\rreview_cursor\x18\x1f \x01(\x03R\freviewCursor\x12\x1d\n" + + "\n" + + "park_class\x18 \x01(\tR\tparkClass\x12-\n" + + "\x12remediation_rounds\x18! \x01(\x05R\x11remediationRounds\x12\x1f\n" + + "\vinputs_json\x18\" \x01(\tR\n" + + "inputsJson\x12\x10\n" + + "\x03org\x18# \x01(\tR\x03org\x12-\n" + + "\x13call_parent_task_id\x18$ \x01(\x03R\x10callParentTaskId\x12\x1d\n" + + "\n" + + "call_depth\x18% \x01(\x05R\tcallDepth\x12!\n" + + "\foutputs_json\x18& \x01(\tR\voutputsJson\x12\x1f\n" + + "\vreview_gate\x18' \x01(\tR\n" + + "reviewGate\x12'\n" + + "\x0frereview_rounds\x18( \x01(\x03R\x0erereviewRounds\x12\x1d\n" + + "\n" + + "retry_mode\x18) \x01(\tR\tretryMode\x12\x1f\n" + + "\vresume_from\x18* \x01(\tR\n" + + "resumeFrom\x12%\n" + + "\x0eresume_results\x18+ \x01(\fR\rresumeResults\x12\x16\n" + + "\x06origin\x18, \x01(\tR\x06origin\x12\x1c\n" + + "\tworkspace\x18- \x01(\tR\tworkspace\x12+\n" + + "\x11binding_signature\x18. \x01(\tR\x10bindingSignature\x12!\n" + + "\fbinding_addr\x18/ \x01(\tR\vbindingAddr\x12!\n" + + "\fpark_blocker\x180 \x01(\tR\vparkBlocker\x12#\n" + + "\rplan_document\x182 \x01(\tR\fplanDocumentJ\x04\b1\x102R\tplan_view\"\xf8\x02\n" + + "\x05Event\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12*\n" + + "\x02at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x02at\x12\x12\n" + + "\x04kind\x18\x03 \x01(\tR\x04kind\x12\x17\n" + + "\atask_id\x18\x04 \x01(\x03R\x06taskId\x12\x12\n" + + "\x04repo\x18\x05 \x01(\tR\x04repo\x12\x14\n" + + "\x05issue\x18\x06 \x01(\x03R\x05issue\x12\x1a\n" + + "\bworkflow\x18\a \x01(\tR\bworkflow\x12\x14\n" + + "\x05stage\x18\b \x01(\tR\x05stage\x12\x18\n" + + "\aattempt\x18\v \x01(\x03R\aattempt\x12\x16\n" + + "\x06detail\x18\t \x01(\tR\x06detail\x12\x1b\n" + + "\tdata_json\x18\n" + + " \x01(\tR\bdataJson\x12\x19\n" + + "\bactor_id\x18\f \x01(\tR\aactorId\x12\x1d\n" + + "\n" + + "actor_kind\x18\r \x01(\tR\tactorKind\x12!\n" + + "\fprincipal_id\x18\x0e \x01(\tR\vprincipalIdB\xa4\x01\n" + + "\fcom.state.v1B\n" + + "TypesProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" + +var ( + file_state_v1_types_proto_rawDescOnce sync.Once + file_state_v1_types_proto_rawDescData []byte +) + +func file_state_v1_types_proto_rawDescGZIP() []byte { + file_state_v1_types_proto_rawDescOnce.Do(func() { + file_state_v1_types_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_types_proto_rawDesc), len(file_state_v1_types_proto_rawDesc))) + }) + return file_state_v1_types_proto_rawDescData +} + +var file_state_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_state_v1_types_proto_goTypes = []any{ + (*Identity)(nil), // 0: state.v1.Identity + (*Task)(nil), // 1: state.v1.Task + (*Event)(nil), // 2: state.v1.Event + (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp +} +var file_state_v1_types_proto_depIdxs = []int32{ + 3, // 0: state.v1.Identity.created_at:type_name -> google.protobuf.Timestamp + 3, // 1: state.v1.Identity.updated_at:type_name -> google.protobuf.Timestamp + 3, // 2: state.v1.Task.created_at:type_name -> google.protobuf.Timestamp + 3, // 3: state.v1.Task.updated_at:type_name -> google.protobuf.Timestamp + 3, // 4: state.v1.Event.at:type_name -> google.protobuf.Timestamp + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_state_v1_types_proto_init() } +func file_state_v1_types_proto_init() { + if File_state_v1_types_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_types_proto_rawDesc), len(file_state_v1_types_proto_rawDesc)), + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_state_v1_types_proto_goTypes, + DependencyIndexes: file_state_v1_types_proto_depIdxs, + MessageInfos: file_state_v1_types_proto_msgTypes, + }.Build() + File_state_v1_types_proto = out.File + file_state_v1_types_proto_goTypes = nil + file_state_v1_types_proto_depIdxs = nil +} diff --git a/internal/infrastructure/staterpc/access.go b/internal/infrastructure/staterpc/access.go index 68a2fd4a7..67f859069 100644 --- a/internal/infrastructure/staterpc/access.go +++ b/internal/infrastructure/staterpc/access.go @@ -68,7 +68,7 @@ func accessDenialValue(d *pb.AccessDenial) access.Denial { return value } -func (s *server) GetPrincipal(ctx context.Context, request *pb.GetPrincipalRequest) (*pb.GetPrincipalResponse, error) { +func (s *accessServer) GetPrincipal(ctx context.Context, request *pb.GetPrincipalRequest) (*pb.GetPrincipalResponse, error) { if s.deps.Principals == nil { return nil, status.Error(codes.Unavailable, "identity store unavailable") } @@ -98,7 +98,7 @@ func (s *server) GetPrincipal(ctx context.Context, request *pb.GetPrincipalReque }}, nil } -func (s *server) ListPolicies(ctx context.Context, _ *pb.ListPoliciesRequest) (*pb.ListPoliciesResponse, error) { +func (s *accessServer) ListPolicies(ctx context.Context, _ *pb.ListPoliciesRequest) (*pb.ListPoliciesResponse, error) { if s.deps.Policies == nil { return nil, errPoliciesUnavailable } @@ -113,7 +113,7 @@ func (s *server) ListPolicies(ctx context.Context, _ *pb.ListPoliciesRequest) (* return &pb.ListPoliciesResponse{Policies: out}, nil } -func (s *server) GetPoliciesVersion(ctx context.Context, _ *pb.GetPoliciesVersionRequest) (*pb.GetPoliciesVersionResponse, error) { +func (s *accessServer) GetPoliciesVersion(ctx context.Context, _ *pb.GetPoliciesVersionRequest) (*pb.GetPoliciesVersionResponse, error) { if s.deps.Policies == nil { return nil, errPoliciesUnavailable } @@ -124,7 +124,7 @@ func (s *server) GetPoliciesVersion(ctx context.Context, _ *pb.GetPoliciesVersio return &pb.GetPoliciesVersionResponse{Version: version}, nil } -func (s *server) PutPolicy(ctx context.Context, request *pb.PutPolicyRequest) (*pb.PutPolicyResponse, error) { +func (s *accessServer) PutPolicy(ctx context.Context, request *pb.PutPolicyRequest) (*pb.PutPolicyResponse, error) { if s.deps.Policies == nil { return nil, errPoliciesUnavailable } @@ -135,7 +135,7 @@ func (s *server) PutPolicy(ctx context.Context, request *pb.PutPolicyRequest) (* return &pb.PutPolicyResponse{Version: version}, nil } -func (s *server) DeletePolicy(ctx context.Context, request *pb.DeletePolicyRequest) (*pb.DeletePolicyResponse, error) { +func (s *accessServer) DeletePolicy(ctx context.Context, request *pb.DeletePolicyRequest) (*pb.DeletePolicyResponse, error) { if s.deps.Policies == nil { return nil, errPoliciesUnavailable } @@ -145,7 +145,7 @@ func (s *server) DeletePolicy(ctx context.Context, request *pb.DeletePolicyReque return &pb.DeletePolicyResponse{}, nil } -func (s *server) EnsureShippedOrgPolicies(ctx context.Context, request *pb.EnsureShippedOrgPoliciesRequest) (*pb.EnsureShippedOrgPoliciesResponse, error) { +func (s *accessServer) EnsureShippedOrgPolicies(ctx context.Context, request *pb.EnsureShippedOrgPoliciesRequest) (*pb.EnsureShippedOrgPoliciesResponse, error) { if s.deps.Policies == nil { return nil, errPoliciesUnavailable } @@ -155,7 +155,7 @@ func (s *server) EnsureShippedOrgPolicies(ctx context.Context, request *pb.Ensur return &pb.EnsureShippedOrgPoliciesResponse{}, nil } -func (s *server) RecordDenial(ctx context.Context, request *pb.RecordDenialRequest) (*pb.RecordDenialResponse, error) { +func (s *accessServer) RecordDenial(ctx context.Context, request *pb.RecordDenialRequest) (*pb.RecordDenialResponse, error) { if s.deps.Denials == nil { return nil, errDenialsUnavailable } @@ -165,7 +165,7 @@ func (s *server) RecordDenial(ctx context.Context, request *pb.RecordDenialReque return &pb.RecordDenialResponse{}, nil } -func (s *server) ListDenials(ctx context.Context, request *pb.ListDenialsRequest) (*pb.ListDenialsResponse, error) { +func (s *accessServer) ListDenials(ctx context.Context, request *pb.ListDenialsRequest) (*pb.ListDenialsResponse, error) { if s.deps.Denials == nil { return nil, errDenialsUnavailable } diff --git a/internal/infrastructure/staterpc/access_client.go b/internal/infrastructure/staterpc/access_client.go index 74788d831..f93f98494 100644 --- a/internal/infrastructure/staterpc/access_client.go +++ b/internal/infrastructure/staterpc/access_client.go @@ -20,7 +20,7 @@ var ( ) func (c *Client) PrincipalFor(ctx context.Context, id identity.IdentityID) (access.Principal, error) { - r, err := c.client.GetPrincipal(ctx, &pb.GetPrincipalRequest{IdentityId: string(id)}) + r, err := c.access.GetPrincipal(ctx, &pb.GetPrincipalRequest{IdentityId: string(id)}) if err != nil { return access.Principal{}, unmapError(err) } @@ -45,7 +45,7 @@ func (c *Client) PrincipalFor(ctx context.Context, id identity.IdentityID) (acce } func (c *Client) ListPolicies(ctx context.Context) ([]access.Policy, error) { - r, err := c.client.ListPolicies(ctx, &pb.ListPoliciesRequest{}) + r, err := c.access.ListPolicies(ctx, &pb.ListPoliciesRequest{}) if err != nil { return nil, unmapError(err) } @@ -53,7 +53,7 @@ func (c *Client) ListPolicies(ctx context.Context) ([]access.Policy, error) { } func (c *Client) PoliciesVersion(ctx context.Context) (int64, error) { - r, err := c.client.GetPoliciesVersion(ctx, &pb.GetPoliciesVersionRequest{}) + r, err := c.access.GetPoliciesVersion(ctx, &pb.GetPoliciesVersionRequest{}) if err != nil { return 0, unmapError(err) } @@ -61,7 +61,7 @@ func (c *Client) PoliciesVersion(ctx context.Context) (int64, error) { } func (c *Client) PutPolicy(ctx context.Context, p access.Policy) (int64, error) { - r, err := c.client.PutPolicy(ctx, &pb.PutPolicyRequest{Policy: accessPolicyProto(p)}) + r, err := c.access.PutPolicy(ctx, &pb.PutPolicyRequest{Policy: accessPolicyProto(p)}) if err != nil { return 0, unmapError(err) } @@ -69,16 +69,16 @@ func (c *Client) PutPolicy(ctx context.Context, p access.Policy) (int64, error) } func (c *Client) DeletePolicy(ctx context.Context, p access.Policy) error { - _, err := c.client.DeletePolicy(ctx, &pb.DeletePolicyRequest{Policy: accessPolicyProto(p)}) + _, err := c.access.DeletePolicy(ctx, &pb.DeletePolicyRequest{Policy: accessPolicyProto(p)}) return unmapError(err) } func (c *Client) EnsureShippedOrgPolicies(ctx context.Context, orgID org.OrgID) error { - _, err := c.client.EnsureShippedOrgPolicies(ctx, &pb.EnsureShippedOrgPoliciesRequest{OrgId: string(orgID)}) + _, err := c.access.EnsureShippedOrgPolicies(ctx, &pb.EnsureShippedOrgPoliciesRequest{OrgId: string(orgID)}) return unmapError(err) } func (c *Client) RecordDenial(ctx context.Context, d access.Denial) error { - _, err := c.client.RecordDenial(ctx, &pb.RecordDenialRequest{Denial: accessDenialProto(d)}) + _, err := c.access.RecordDenial(ctx, &pb.RecordDenialRequest{Denial: accessDenialProto(d)}) return unmapError(err) } diff --git a/internal/infrastructure/staterpc/account_security.go b/internal/infrastructure/staterpc/account_security.go index 40fc8e2a7..b61f047ec 100644 --- a/internal/infrastructure/staterpc/account_security.go +++ b/internal/infrastructure/staterpc/account_security.go @@ -19,7 +19,7 @@ func (s *server) accountSecurity() (identity.AccountSecurity, error) { return store, nil } -func (s *server) OpenAccountSession(ctx context.Context, r *pb.OpenAccountSessionRequest) (*pb.OpenAccountSessionResponse, error) { +func (s *accountServer) OpenAccountSession(ctx context.Context, r *pb.OpenAccountSessionRequest) (*pb.OpenAccountSessionResponse, error) { store, err := s.accountSecurity() if err != nil { return nil, err @@ -31,7 +31,7 @@ func (s *server) OpenAccountSession(ctx context.Context, r *pb.OpenAccountSessio return &pb.OpenAccountSessionResponse{Identity: identityProto(value.Identity), Token: value.Token, ExpiresAt: timestamp(value.Expires)}, nil } -func (s *server) RequireFreshAccountSession(ctx context.Context, r *pb.RequireFreshAccountSessionRequest) (*pb.RequireFreshAccountSessionResponse, error) { +func (s *accountServer) RequireFreshAccountSession(ctx context.Context, r *pb.RequireFreshAccountSessionRequest) (*pb.RequireFreshAccountSessionResponse, error) { store, err := s.accountSecurity() if err != nil { return nil, err @@ -39,7 +39,7 @@ func (s *server) RequireFreshAccountSession(ctx context.Context, r *pb.RequireFr return &pb.RequireFreshAccountSessionResponse{}, accountStatus(store.RequireFreshAccountSession(ctx, r.Token)) } -func (s *server) CreateAccountRecovery(ctx context.Context, _ *pb.CreateAccountRecoveryRequest) (*pb.CreateAccountRecoveryResponse, error) { +func (s *accountServer) CreateAccountRecovery(ctx context.Context, _ *pb.CreateAccountRecoveryRequest) (*pb.CreateAccountRecoveryResponse, error) { store, err := s.accountSecurity() if err != nil { return nil, err @@ -51,7 +51,7 @@ func (s *server) CreateAccountRecovery(ctx context.Context, _ *pb.CreateAccountR return &pb.CreateAccountRecoveryResponse{Code: code}, nil } -func (s *server) RecoverAccount(ctx context.Context, r *pb.RecoverAccountRequest) (*pb.RecoverAccountResponse, error) { +func (s *accountServer) RecoverAccount(ctx context.Context, r *pb.RecoverAccountRequest) (*pb.RecoverAccountResponse, error) { store, err := s.accountSecurity() if err != nil { return nil, err @@ -60,7 +60,7 @@ func (s *server) RecoverAccount(ctx context.Context, r *pb.RecoverAccountRequest } func (c *Client) OpenAccountSession(ctx context.Context, expires time.Time) (identity.AccountSession, error) { - r, err := c.client.OpenAccountSession(ctx, &pb.OpenAccountSessionRequest{ExpiresAt: timestamp(expires)}) + r, err := c.account.OpenAccountSession(ctx, &pb.OpenAccountSessionRequest{ExpiresAt: timestamp(expires)}) if err != nil { return identity.AccountSession{}, accountClientError(err) } @@ -68,12 +68,12 @@ func (c *Client) OpenAccountSession(ctx context.Context, expires time.Time) (ide } func (c *Client) RequireFreshAccountSession(ctx context.Context, token string) error { - _, err := c.client.RequireFreshAccountSession(ctx, &pb.RequireFreshAccountSessionRequest{Token: token}) + _, err := c.account.RequireFreshAccountSession(ctx, &pb.RequireFreshAccountSessionRequest{Token: token}) return accountClientError(err) } func (c *Client) CreateAccountRecovery(ctx context.Context) (string, error) { - r, err := c.client.CreateAccountRecovery(ctx, &pb.CreateAccountRecoveryRequest{}) + r, err := c.account.CreateAccountRecovery(ctx, &pb.CreateAccountRecoveryRequest{}) if err != nil { return "", accountClientError(err) } @@ -81,6 +81,6 @@ func (c *Client) CreateAccountRecovery(ctx context.Context) (string, error) { } func (c *Client) RecoverAccount(ctx context.Context, email, code, password string) error { - _, err := c.client.RecoverAccount(ctx, &pb.RecoverAccountRequest{Email: email, Code: code, Password: password}) + _, err := c.account.RecoverAccount(ctx, &pb.RecoverAccountRequest{Email: email, Code: code, Password: password}) return accountClientError(err) } diff --git a/internal/infrastructure/staterpc/accounts.go b/internal/infrastructure/staterpc/accounts.go index 5b0c7d286..ff876323b 100644 --- a/internal/infrastructure/staterpc/accounts.go +++ b/internal/infrastructure/staterpc/accounts.go @@ -45,7 +45,7 @@ func (s *server) accountStore() (identity.Accounts, error) { return s.deps.Accounts, nil } -func (s *server) AccountSetup(ctx context.Context, _ *pb.AccountSetupRequest) (*pb.AccountSetupResponse, error) { +func (s *accountServer) AccountSetup(ctx context.Context, _ *pb.AccountSetupRequest) (*pb.AccountSetupResponse, error) { store, err := s.accountStore() if err != nil { return nil, err @@ -54,7 +54,7 @@ func (s *server) AccountSetup(ctx context.Context, _ *pb.AccountSetupRequest) (* return &pb.AccountSetupResponse{Required: required}, accountStatus(err) } -func (s *server) RegisterAccount(ctx context.Context, r *pb.RegisterAccountRequest) (*pb.RegisterAccountResponse, error) { +func (s *accountServer) RegisterAccount(ctx context.Context, r *pb.RegisterAccountRequest) (*pb.RegisterAccountResponse, error) { store, err := s.accountStore() if err != nil { return nil, err @@ -71,7 +71,7 @@ func (s *server) RegisterAccount(ctx context.Context, r *pb.RegisterAccountReque return &pb.RegisterAccountResponse{Identity: identityProto(value)}, nil } -func (s *server) SignInAccount(ctx context.Context, r *pb.SignInAccountRequest) (*pb.SignInAccountResponse, error) { +func (s *accountServer) SignInAccount(ctx context.Context, r *pb.SignInAccountRequest) (*pb.SignInAccountResponse, error) { store, err := s.accountStore() if err != nil { return nil, err @@ -83,7 +83,7 @@ func (s *server) SignInAccount(ctx context.Context, r *pb.SignInAccountRequest) return &pb.SignInAccountResponse{Identity: identityProto(value.Identity), Token: value.Token, ExpiresAt: timestamp(value.Expires)}, nil } -func (s *server) ResolveAccountSession(ctx context.Context, r *pb.ResolveAccountSessionRequest) (*pb.ResolveAccountSessionResponse, error) { +func (s *accountServer) ResolveAccountSession(ctx context.Context, r *pb.ResolveAccountSessionRequest) (*pb.ResolveAccountSessionResponse, error) { store, err := s.accountStore() if err != nil { return nil, err @@ -95,7 +95,7 @@ func (s *server) ResolveAccountSession(ctx context.Context, r *pb.ResolveAccount return &pb.ResolveAccountSessionResponse{Identity: identityProto(value)}, nil } -func (s *server) SignOutAccount(ctx context.Context, r *pb.SignOutAccountRequest) (*pb.SignOutAccountResponse, error) { +func (s *accountServer) SignOutAccount(ctx context.Context, r *pb.SignOutAccountRequest) (*pb.SignOutAccountResponse, error) { store, err := s.accountStore() if err != nil { return nil, err @@ -103,7 +103,7 @@ func (s *server) SignOutAccount(ctx context.Context, r *pb.SignOutAccountRequest return &pb.SignOutAccountResponse{}, accountStatus(store.SignOutAccount(ctx, r.Token)) } -func (s *server) ChangeAccountPassword(ctx context.Context, r *pb.ChangeAccountPasswordRequest) (*pb.ChangeAccountPasswordResponse, error) { +func (s *accountServer) ChangeAccountPassword(ctx context.Context, r *pb.ChangeAccountPasswordRequest) (*pb.ChangeAccountPasswordResponse, error) { store, err := s.accountStore() if err != nil { return nil, err @@ -112,12 +112,12 @@ func (s *server) ChangeAccountPassword(ctx context.Context, r *pb.ChangeAccountP } func (c *Client) AccountSetupRequired(ctx context.Context) (bool, error) { - r, err := c.client.AccountSetup(ctx, &pb.AccountSetupRequest{}) + r, err := c.account.AccountSetup(ctx, &pb.AccountSetupRequest{}) return r.GetRequired(), accountClientError(err) } func (c *Client) RegisterAccount(ctx context.Context, r identity.AccountRegistration, bootstrap bool) (identity.Identity, error) { - out, err := c.client.RegisterAccount(ctx, &pb.RegisterAccountRequest{Email: r.Email, DisplayName: r.DisplayName, Password: r.Password, Role: r.Role, Bootstrap: bootstrap, OrganisationName: r.OrganisationName, WorkspaceName: r.WorkspaceName, PublicUrl: r.PublicURL}) + out, err := c.account.RegisterAccount(ctx, &pb.RegisterAccountRequest{Email: r.Email, DisplayName: r.DisplayName, Password: r.Password, Role: r.Role, Bootstrap: bootstrap, OrganisationName: r.OrganisationName, WorkspaceName: r.WorkspaceName, PublicUrl: r.PublicURL}) if err != nil { return identity.Identity{}, accountClientError(err) } @@ -125,7 +125,7 @@ func (c *Client) RegisterAccount(ctx context.Context, r identity.AccountRegistra } func (c *Client) SignInAccount(ctx context.Context, email, password string) (identity.AccountSession, error) { - r, err := c.client.SignInAccount(ctx, &pb.SignInAccountRequest{Email: email, Password: password}) + r, err := c.account.SignInAccount(ctx, &pb.SignInAccountRequest{Email: email, Password: password}) if err != nil { return identity.AccountSession{}, accountClientError(err) } @@ -133,7 +133,7 @@ func (c *Client) SignInAccount(ctx context.Context, email, password string) (ide } func (c *Client) ResolveAccountSession(ctx context.Context, token string) (identity.Identity, error) { - r, err := c.client.ResolveAccountSession(ctx, &pb.ResolveAccountSessionRequest{Token: token}) + r, err := c.account.ResolveAccountSession(ctx, &pb.ResolveAccountSessionRequest{Token: token}) if err != nil { return identity.Identity{}, accountClientError(err) } @@ -141,12 +141,12 @@ func (c *Client) ResolveAccountSession(ctx context.Context, token string) (ident } func (c *Client) SignOutAccount(ctx context.Context, token string) error { - _, err := c.client.SignOutAccount(ctx, &pb.SignOutAccountRequest{Token: token}) + _, err := c.account.SignOutAccount(ctx, &pb.SignOutAccountRequest{Token: token}) return accountClientError(err) } func (c *Client) ChangeAccountPassword(ctx context.Context, current, next string) error { - _, err := c.client.ChangeAccountPassword(ctx, &pb.ChangeAccountPasswordRequest{CurrentPassword: current, NewPassword: next}) + _, err := c.account.ChangeAccountPassword(ctx, &pb.ChangeAccountPasswordRequest{CurrentPassword: current, NewPassword: next}) return accountClientError(err) } diff --git a/internal/infrastructure/staterpc/accounts_test.go b/internal/infrastructure/staterpc/accounts_test.go index 4f4cdd3a9..a73033eac 100644 --- a/internal/infrastructure/staterpc/accounts_test.go +++ b/internal/infrastructure/staterpc/accounts_test.go @@ -51,7 +51,7 @@ func TestAccountManagementUsesPolicy(t *testing.T) { if tc.extra != "" { policies = append(policies, access.Policy{ID: "custom-members", Level: access.LevelOrg, OrgID: "acme", Text: tc.extra}) } - srv := &server{deps: Deps{Accounts: accountRegistrationStore{}, Policies: accountPolicyStore{policies: policies}}} + srv := &accountServer{server: &server{deps: Deps{Accounts: accountRegistrationStore{}, Policies: accountPolicyStore{policies: policies}}}} _, err := srv.RegisterAccount(ctx, &pb.RegisterAccountRequest{Email: "new@example.com", Role: "viewer"}) if got := status.Code(err); got != tc.want { t.Fatalf("code=%s want=%s err=%v", got, tc.want, err) @@ -62,22 +62,22 @@ func TestAccountManagementUsesPolicy(t *testing.T) { func TestTaskCredentialsCannotManageAccounts(t *testing.T) { for _, method := range []string{ - pb.StateStoreService_AccountSetup_FullMethodName, - pb.StateStoreService_RegisterAccount_FullMethodName, - pb.StateStoreService_SignInAccount_FullMethodName, - pb.StateStoreService_ResolveAccountSession_FullMethodName, - pb.StateStoreService_SignOutAccount_FullMethodName, - pb.StateStoreService_ChangeAccountPassword_FullMethodName, - pb.StateStoreService_GetAuthenticationSettings_FullMethodName, - pb.StateStoreService_SaveAuthenticationSettings_FullMethodName, - pb.StateStoreService_BeginPasskey_FullMethodName, - pb.StateStoreService_FinishPasskey_FullMethodName, - pb.StateStoreService_ListPasskeys_FullMethodName, - pb.StateStoreService_DeletePasskey_FullMethodName, - pb.StateStoreService_OpenAccountSession_FullMethodName, - pb.StateStoreService_RequireFreshAccountSession_FullMethodName, - pb.StateStoreService_CreateAccountRecovery_FullMethodName, - pb.StateStoreService_RecoverAccount_FullMethodName, + pb.AccountService_AccountSetup_FullMethodName, + pb.AccountService_RegisterAccount_FullMethodName, + pb.AccountService_SignInAccount_FullMethodName, + pb.AccountService_ResolveAccountSession_FullMethodName, + pb.AccountService_SignOutAccount_FullMethodName, + pb.AccountService_ChangeAccountPassword_FullMethodName, + pb.AccountService_GetAuthenticationSettings_FullMethodName, + pb.AccountService_SaveAuthenticationSettings_FullMethodName, + pb.AccountService_BeginPasskey_FullMethodName, + pb.AccountService_FinishPasskey_FullMethodName, + pb.AccountService_ListPasskeys_FullMethodName, + pb.AccountService_DeletePasskey_FullMethodName, + pb.AccountService_OpenAccountSession_FullMethodName, + pb.AccountService_RequireFreshAccountSession_FullMethodName, + pb.AccountService_CreateAccountRecovery_FullMethodName, + pb.AccountService_RecoverAccount_FullMethodName, } { t.Run(method, func(t *testing.T) { if authorizesTaskScopedCall(method, nil, 7) { diff --git a/internal/infrastructure/staterpc/alerts.go b/internal/infrastructure/staterpc/alerts.go index 1fb5d6e57..d8d7fa933 100644 --- a/internal/infrastructure/staterpc/alerts.go +++ b/internal/infrastructure/staterpc/alerts.go @@ -81,7 +81,7 @@ func alertDeliveryValue(d *pb.AlertDelivery) alert.Delivery { } } -func (s *server) RaiseAlert(ctx context.Context, r *pb.RaiseAlertRequest) (*pb.RaiseAlertResponse, error) { +func (s *alertServer) RaiseAlert(ctx context.Context, r *pb.RaiseAlertRequest) (*pb.RaiseAlertResponse, error) { if s.deps.Alerts == nil { return nil, errAlertsUnavailable } @@ -100,7 +100,7 @@ func (s *server) RaiseAlert(ctx context.Context, r *pb.RaiseAlertRequest) (*pb.R return &pb.RaiseAlertResponse{Alert: alertProto(stored)}, nil } -func (s *server) ResolveAlert(ctx context.Context, r *pb.ResolveAlertRequest) (*pb.ResolveAlertResponse, error) { +func (s *alertServer) ResolveAlert(ctx context.Context, r *pb.ResolveAlertRequest) (*pb.ResolveAlertResponse, error) { if s.deps.Alerts == nil { return nil, errAlertsUnavailable } @@ -115,7 +115,7 @@ func (s *server) ResolveAlert(ctx context.Context, r *pb.ResolveAlertRequest) (* return &pb.ResolveAlertResponse{}, nil } -func (s *server) DismissAlert(ctx context.Context, r *pb.DismissAlertRequest) (*pb.DismissAlertResponse, error) { +func (s *alertServer) DismissAlert(ctx context.Context, r *pb.DismissAlertRequest) (*pb.DismissAlertResponse, error) { if s.deps.Alerts == nil { return nil, errAlertsUnavailable } @@ -129,7 +129,7 @@ func (s *server) DismissAlert(ctx context.Context, r *pb.DismissAlertRequest) (* return &pb.DismissAlertResponse{}, nil } -func (s *server) ListAlerts(ctx context.Context, r *pb.ListAlertsRequest) (*pb.ListAlertsResponse, error) { +func (s *alertServer) ListAlerts(ctx context.Context, r *pb.ListAlertsRequest) (*pb.ListAlertsResponse, error) { if s.deps.Alerts == nil { return nil, errAlertsUnavailable } @@ -157,7 +157,7 @@ func requireUnscoped(ctx context.Context) error { return nil } -func (s *server) ClaimAlertDeliveries(ctx context.Context, r *pb.ClaimAlertDeliveriesRequest) (*pb.ClaimAlertDeliveriesResponse, error) { +func (s *alertServer) ClaimAlertDeliveries(ctx context.Context, r *pb.ClaimAlertDeliveriesRequest) (*pb.ClaimAlertDeliveriesResponse, error) { if s.deps.Alerts == nil { return nil, errAlertsUnavailable } @@ -173,7 +173,7 @@ func (s *server) ClaimAlertDeliveries(ctx context.Context, r *pb.ClaimAlertDeliv })}, nil } -func (s *server) RecordAlertAttempt(ctx context.Context, r *pb.RecordAlertAttemptRequest) (*pb.RecordAlertAttemptResponse, error) { +func (s *alertServer) RecordAlertAttempt(ctx context.Context, r *pb.RecordAlertAttemptRequest) (*pb.RecordAlertAttemptResponse, error) { if s.deps.Alerts == nil { return nil, errAlertsUnavailable } diff --git a/internal/infrastructure/staterpc/alerts_client.go b/internal/infrastructure/staterpc/alerts_client.go index 5bf6079d7..181cf437d 100644 --- a/internal/infrastructure/staterpc/alerts_client.go +++ b/internal/infrastructure/staterpc/alerts_client.go @@ -12,7 +12,7 @@ import ( var _ alert.Store = (*Client)(nil) func (c *Client) RaiseAlert(ctx context.Context, in alert.Input) (alert.Alert, error) { - r, err := c.client.RaiseAlert(ctx, &pb.RaiseAlertRequest{ + r, err := c.alert.RaiseAlert(ctx, &pb.RaiseAlertRequest{ OrgId: string(in.Org), Kind: in.Kind, Subject: in.Subject, Severity: string(in.Severity), Title: in.Title, Body: in.Body, Link: in.Link, Condition: in.Condition, }) @@ -23,12 +23,12 @@ func (c *Client) RaiseAlert(ctx context.Context, in alert.Input) (alert.Alert, e } func (c *Client) ResolveAlert(ctx context.Context, key alert.Key, _ string) error { - _, err := c.client.ResolveAlert(ctx, &pb.ResolveAlertRequest{OrgId: string(key.Org), Kind: key.Kind, Subject: key.Subject}) + _, err := c.alert.ResolveAlert(ctx, &pb.ResolveAlertRequest{OrgId: string(key.Org), Kind: key.Kind, Subject: key.Subject}) return unmapError(err) } func (c *Client) DismissAlert(ctx context.Context, orgID org.OrgID, id int64, _ string) error { - _, err := c.client.DismissAlert(ctx, &pb.DismissAlertRequest{OrgId: string(orgID), Id: id}) + _, err := c.alert.DismissAlert(ctx, &pb.DismissAlertRequest{OrgId: string(orgID), Id: id}) return unmapError(err) } @@ -37,7 +37,7 @@ func (c *Client) ListAlerts(ctx context.Context, orgID org.OrgID, filter alert.F for i, st := range filter.States { states[i] = string(st) } - r, err := c.client.ListAlerts(ctx, &pb.ListAlertsRequest{OrgId: string(orgID), States: states, Limit: int32(filter.Limit)}) + r, err := c.alert.ListAlerts(ctx, &pb.ListAlertsRequest{OrgId: string(orgID), States: states, Limit: int32(filter.Limit)}) if err != nil { return nil, unmapError(err) } @@ -45,7 +45,7 @@ func (c *Client) ListAlerts(ctx context.Context, orgID org.OrgID, filter alert.F } func (c *Client) ClaimAlertDeliveries(ctx context.Context, limit int) ([]alert.Due, error) { - r, err := c.client.ClaimAlertDeliveries(ctx, &pb.ClaimAlertDeliveriesRequest{Limit: int32(limit)}) + r, err := c.alert.ClaimAlertDeliveries(ctx, &pb.ClaimAlertDeliveriesRequest{Limit: int32(limit)}) if err != nil { return nil, unmapError(err) } @@ -58,7 +58,7 @@ func (c *Client) ClaimAlertDeliveries(ctx context.Context, limit int) ([]alert.D } func (c *Client) RecordAlertAttempt(ctx context.Context, o alert.Outcome) error { - _, err := c.client.RecordAlertAttempt(ctx, &pb.RecordAlertAttemptRequest{ + _, err := c.alert.RecordAlertAttempt(ctx, &pb.RecordAlertAttemptRequest{ DeliveryId: o.DeliveryID, Skipped: o.Skipped, StatusCode: int64(o.StatusCode), Error: o.Error, }) return unmapError(err) diff --git a/internal/infrastructure/staterpc/alerts_test.go b/internal/infrastructure/staterpc/alerts_test.go index 392cd21ed..5c4f12b72 100644 --- a/internal/infrastructure/staterpc/alerts_test.go +++ b/internal/infrastructure/staterpc/alerts_test.go @@ -144,7 +144,7 @@ func TestAlerts(t *testing.T) { } for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { - s := &server{deps: Deps{Alerts: &fakeAlerts{alerts: map[alert.Key]*alert.Alert{}}}} + s := &alertServer{server: &server{deps: Deps{Alerts: &fakeAlerts{alerts: map[alert.Key]*alert.Alert{}}}}} for i, step := range tc.steps { ctx := context.Background() if step.as != "" { @@ -162,7 +162,7 @@ func TestAlerts(t *testing.T) { } } -func runAlertStep(ctx context.Context, s *server, step alertStep) ([]string, error) { +func runAlertStep(ctx context.Context, s *alertServer, step alertStep) ([]string, error) { switch step.op { case "raise", "event": _, err := s.RaiseAlert(ctx, &pb.RaiseAlertRequest{ diff --git a/internal/infrastructure/staterpc/authentication.go b/internal/infrastructure/staterpc/authentication.go index edcafe9f4..e67f944cc 100644 --- a/internal/infrastructure/staterpc/authentication.go +++ b/internal/infrastructure/staterpc/authentication.go @@ -18,7 +18,7 @@ func authenticationValue(v *pb.AuthenticationSettings) identity.AuthenticationSe return identity.AuthenticationSettings{PublicURL: v.GetPublicUrl(), OIDCIssuer: v.GetOidcIssuer(), OIDCAudience: v.GetOidcAudience(), OIDCClientID: v.GetOidcClientId()} } -func (s *server) GetAuthenticationSettings(ctx context.Context, _ *pb.GetAuthenticationSettingsRequest) (*pb.GetAuthenticationSettingsResponse, error) { +func (s *accountServer) GetAuthenticationSettings(ctx context.Context, _ *pb.GetAuthenticationSettingsRequest) (*pb.GetAuthenticationSettingsResponse, error) { store, ok := s.deps.Accounts.(identity.AuthenticationSettingsStore) if !ok { return nil, status.Error(codes.Unavailable, "authentication settings unavailable") @@ -30,7 +30,7 @@ func (s *server) GetAuthenticationSettings(ctx context.Context, _ *pb.GetAuthent return &pb.GetAuthenticationSettingsResponse{Settings: authenticationProto(value)}, nil } -func (s *server) SaveAuthenticationSettings(ctx context.Context, r *pb.SaveAuthenticationSettingsRequest) (*pb.SaveAuthenticationSettingsResponse, error) { +func (s *accountServer) SaveAuthenticationSettings(ctx context.Context, r *pb.SaveAuthenticationSettingsRequest) (*pb.SaveAuthenticationSettingsResponse, error) { store, ok := s.deps.Accounts.(identity.AuthenticationSettingsStore) if !ok { return nil, status.Error(codes.Unavailable, "authentication settings unavailable") @@ -39,7 +39,7 @@ func (s *server) SaveAuthenticationSettings(ctx context.Context, r *pb.SaveAuthe } func (c *Client) AuthenticationSettings(ctx context.Context) (identity.AuthenticationSettings, error) { - r, err := c.client.GetAuthenticationSettings(ctx, &pb.GetAuthenticationSettingsRequest{}) + r, err := c.account.GetAuthenticationSettings(ctx, &pb.GetAuthenticationSettingsRequest{}) if err != nil { return identity.AuthenticationSettings{}, accountClientError(err) } @@ -47,7 +47,7 @@ func (c *Client) AuthenticationSettings(ctx context.Context) (identity.Authentic } func (c *Client) SaveAuthenticationSettings(ctx context.Context, v identity.AuthenticationSettings) error { - _, err := c.client.SaveAuthenticationSettings(ctx, &pb.SaveAuthenticationSettingsRequest{Settings: authenticationProto(v)}) + _, err := c.account.SaveAuthenticationSettings(ctx, &pb.SaveAuthenticationSettingsRequest{Settings: authenticationProto(v)}) return accountClientError(err) } @@ -59,7 +59,7 @@ func (s *server) passkeyStore() (identity.Passkeys, error) { return v, nil } -func (s *server) BeginPasskey(ctx context.Context, r *pb.BeginPasskeyRequest) (*pb.BeginPasskeyResponse, error) { +func (s *accountServer) BeginPasskey(ctx context.Context, r *pb.BeginPasskeyRequest) (*pb.BeginPasskeyResponse, error) { store, err := s.passkeyStore() if err != nil { return nil, err @@ -71,7 +71,7 @@ func (s *server) BeginPasskey(ctx context.Context, r *pb.BeginPasskeyRequest) (* return &pb.BeginPasskeyResponse{Token: value.Token, Options: value.Options}, nil } -func (s *server) FinishPasskey(ctx context.Context, r *pb.FinishPasskeyRequest) (*pb.FinishPasskeyResponse, error) { +func (s *accountServer) FinishPasskey(ctx context.Context, r *pb.FinishPasskeyRequest) (*pb.FinishPasskeyResponse, error) { store, err := s.passkeyStore() if err != nil { return nil, err @@ -83,7 +83,7 @@ func (s *server) FinishPasskey(ctx context.Context, r *pb.FinishPasskeyRequest) return &pb.FinishPasskeyResponse{Identity: identityProto(value.Identity), Token: value.Token, ExpiresAt: timestamp(value.Expires)}, nil } -func (s *server) ListPasskeys(ctx context.Context, _ *pb.ListPasskeysRequest) (*pb.ListPasskeysResponse, error) { +func (s *accountServer) ListPasskeys(ctx context.Context, _ *pb.ListPasskeysRequest) (*pb.ListPasskeysResponse, error) { store, err := s.passkeyStore() if err != nil { return nil, err @@ -99,7 +99,7 @@ func (s *server) ListPasskeys(ctx context.Context, _ *pb.ListPasskeysRequest) (* return out, nil } -func (s *server) DeletePasskey(ctx context.Context, r *pb.DeletePasskeyRequest) (*pb.DeletePasskeyResponse, error) { +func (s *accountServer) DeletePasskey(ctx context.Context, r *pb.DeletePasskeyRequest) (*pb.DeletePasskeyResponse, error) { store, err := s.passkeyStore() if err != nil { return nil, err @@ -108,7 +108,7 @@ func (s *server) DeletePasskey(ctx context.Context, r *pb.DeletePasskeyRequest) } func (c *Client) BeginPasskey(ctx context.Context, registration bool) (identity.PasskeyCeremony, error) { - r, err := c.client.BeginPasskey(ctx, &pb.BeginPasskeyRequest{Registration: registration}) + r, err := c.account.BeginPasskey(ctx, &pb.BeginPasskeyRequest{Registration: registration}) if err != nil { return identity.PasskeyCeremony{}, accountClientError(err) } @@ -116,7 +116,7 @@ func (c *Client) BeginPasskey(ctx context.Context, registration bool) (identity. } func (c *Client) FinishPasskey(ctx context.Context, token string, credential []byte, registration bool, name string) (identity.AccountSession, error) { - r, err := c.client.FinishPasskey(ctx, &pb.FinishPasskeyRequest{Token: token, Credential: credential, Registration: registration, Name: name}) + r, err := c.account.FinishPasskey(ctx, &pb.FinishPasskeyRequest{Token: token, Credential: credential, Registration: registration, Name: name}) if err != nil { return identity.AccountSession{}, accountClientError(err) } @@ -124,7 +124,7 @@ func (c *Client) FinishPasskey(ctx context.Context, token string, credential []b } func (c *Client) ListPasskeys(ctx context.Context) ([]identity.Passkey, error) { - r, err := c.client.ListPasskeys(ctx, &pb.ListPasskeysRequest{}) + r, err := c.account.ListPasskeys(ctx, &pb.ListPasskeysRequest{}) if err != nil { return nil, accountClientError(err) } @@ -136,6 +136,6 @@ func (c *Client) ListPasskeys(ctx context.Context) ([]identity.Passkey, error) { } func (c *Client) DeletePasskey(ctx context.Context, id string) error { - _, err := c.client.DeletePasskey(ctx, &pb.DeletePasskeyRequest{Id: id}) + _, err := c.account.DeletePasskey(ctx, &pb.DeletePasskeyRequest{Id: id}) return accountClientError(err) } diff --git a/internal/infrastructure/staterpc/callers_test.go b/internal/infrastructure/staterpc/callers_test.go index 8d6f1f850..26044393c 100644 --- a/internal/infrastructure/staterpc/callers_test.go +++ b/internal/infrastructure/staterpc/callers_test.go @@ -57,7 +57,7 @@ func TestCallerAttribution(t *testing.T) { t.Fatal(err) } callers := rpcidentity.Callers{Principals: principalsByID{"alice": "acme"}} - update := &grpc.UnaryServerInfo{FullMethod: pb.StateStoreService_Update_FullMethodName} + update := &grpc.UnaryServerInfo{FullMethod: pb.TaskService_Update_FullMethodName} // A plaintext peer reached a loopback listener; a TLS peer without a // verified chain presented no client certificate. plaintext := &peer.Peer{} diff --git a/internal/infrastructure/staterpc/client.go b/internal/infrastructure/staterpc/client.go index 6606669a7..078fd7b9f 100644 --- a/internal/infrastructure/staterpc/client.go +++ b/internal/infrastructure/staterpc/client.go @@ -26,19 +26,62 @@ import ( "github.com/samcharles93/archie-core/internal/logging" ) -// Client is the single remote adapter wrapping one StateStoreServiceClient, +// Client is the single remote adapter over the State Store services, // asserted against whichever narrow Go interfaces its caller needs -- exactly // as gatewayrpc.Client asserts both messaging.ChatContract and // messaging.SessionStore. type Client struct { - client pb.StateStoreServiceClient - controlPlane controlpb.ControlPlaneServiceClient + packages pb.PackageServiceClient + taskGrant pb.TaskGrantServiceClient + harnessSecret pb.HarnessSecretServiceClient + account pb.AccountServiceClient + identity pb.IdentityServiceClient + task pb.TaskServiceClient + execution pb.ExecutionServiceClient + review pb.ReviewServiceClient + taskEvent pb.TaskEventServiceClient + stats pb.StatsServiceClient + taskLog pb.TaskLogServiceClient + status pb.StatusServiceClient + capture pb.CaptureServiceClient + mapping pb.MappingServiceClient + eventType pb.EventTypeServiceClient + binding pb.BindingServiceClient + dispatch pb.DispatchServiceClient + source pb.SourceServiceClient + access pb.AccessServiceClient + org pb.OrgServiceClient + alert pb.AlertServiceClient + controlPlane controlpb.ControlPlaneServiceClient } -// NewClient wraps conn's generated client. Close is a no-op: the store +// NewClient wraps conn's generated clients. Close is a no-op: the store // service owns its own DB lifecycle. func NewClient(conn grpc.ClientConnInterface) *Client { - return &Client{client: pb.NewStateStoreServiceClient(conn), controlPlane: controlpb.NewControlPlaneServiceClient(conn)} + return &Client{ + packages: pb.NewPackageServiceClient(conn), + taskGrant: pb.NewTaskGrantServiceClient(conn), + harnessSecret: pb.NewHarnessSecretServiceClient(conn), + account: pb.NewAccountServiceClient(conn), + identity: pb.NewIdentityServiceClient(conn), + task: pb.NewTaskServiceClient(conn), + execution: pb.NewExecutionServiceClient(conn), + review: pb.NewReviewServiceClient(conn), + taskEvent: pb.NewTaskEventServiceClient(conn), + stats: pb.NewStatsServiceClient(conn), + taskLog: pb.NewTaskLogServiceClient(conn), + status: pb.NewStatusServiceClient(conn), + capture: pb.NewCaptureServiceClient(conn), + mapping: pb.NewMappingServiceClient(conn), + eventType: pb.NewEventTypeServiceClient(conn), + binding: pb.NewBindingServiceClient(conn), + dispatch: pb.NewDispatchServiceClient(conn), + source: pb.NewSourceServiceClient(conn), + access: pb.NewAccessServiceClient(conn), + org: pb.NewOrgServiceClient(conn), + alert: pb.NewAlertServiceClient(conn), + controlPlane: controlpb.NewControlPlaneServiceClient(conn), + } } // ControlPlane returns the generic control-plane RPC client on the same authenticated connection. @@ -75,7 +118,7 @@ var ( // Lifecycle func (c *Client) EnqueueIssue(ctx context.Context, owner, repo string, number int, title, body, labels, identity string) (bool, error) { - r, err := c.client.EnqueueIssue(ctx, &pb.EnqueueIssueRequest{Owner: owner, Repo: repo, Number: int64(number), Title: title, Body: body, Labels: labels, Identity: identity}) + r, err := c.task.EnqueueIssue(ctx, &pb.EnqueueIssueRequest{Owner: owner, Repo: repo, Number: int64(number), Title: title, Body: body, Labels: labels, Identity: identity}) if err != nil { return false, unmapError(err) } @@ -83,7 +126,7 @@ func (c *Client) EnqueueIssue(ctx context.Context, owner, repo string, number in } func (c *Client) ActiveTasksByOrigin(ctx context.Context, origin string) ([]*task.Task, error) { - r, err := c.client.ActiveTasksByOrigin(ctx, &pb.ActiveTasksByOriginRequest{Origin: origin}) + r, err := c.task.ActiveTasksByOrigin(ctx, &pb.ActiveTasksByOriginRequest{Origin: origin}) if err != nil { return nil, unmapError(err) } @@ -91,7 +134,7 @@ func (c *Client) ActiveTasksByOrigin(ctx context.Context, origin string) ([]*tas } func (c *Client) UnpostedOutcomes(ctx context.Context) ([]*task.Task, error) { - r, err := c.client.UnpostedOutcomes(ctx, &pb.UnpostedOutcomesRequest{}) + r, err := c.task.UnpostedOutcomes(ctx, &pb.UnpostedOutcomesRequest{}) if err != nil { return nil, unmapError(err) } @@ -99,7 +142,7 @@ func (c *Client) UnpostedOutcomes(ctx context.Context) ([]*task.Task, error) { } func (c *Client) MarkOutcomePosted(ctx context.Context, taskID int64, status string) error { - _, err := c.client.MarkOutcomePosted(ctx, &pb.MarkOutcomePostedRequest{TaskId: taskID, Status: status}) + _, err := c.task.MarkOutcomePosted(ctx, &pb.MarkOutcomePostedRequest{TaskId: taskID, Status: status}) return unmapError(err) } @@ -108,7 +151,7 @@ func (c *Client) EnqueueChatTask(ctx context.Context, owner, repo, title, body, if err != nil { return nil, err } - r, err := c.client.EnqueueChatTask(ctx, &pb.EnqueueChatTaskRequest{Owner: owner, Repo: repo, Title: title, Body: body, Workflow: wf, Identity: identity, InputsJson: encoded, Origin: origin, DraftYaml: draft}) + r, err := c.task.EnqueueChatTask(ctx, &pb.EnqueueChatTaskRequest{Owner: owner, Repo: repo, Title: title, Body: body, Workflow: wf, Identity: identity, InputsJson: encoded, Origin: origin, DraftYaml: draft}) if err != nil { return nil, unmapError(err) } @@ -116,7 +159,7 @@ func (c *Client) EnqueueChatTask(ctx context.Context, owner, repo, title, body, } func (c *Client) ClaimNext(ctx context.Context) (*task.Task, error) { - r, err := c.client.ClaimNext(ctx, &pb.ClaimNextRequest{}) + r, err := c.task.ClaimNext(ctx, &pb.ClaimNextRequest{}) if err != nil { return nil, unmapError(err) } @@ -127,7 +170,7 @@ func (c *Client) ClaimNext(ctx context.Context) (*task.Task, error) { } func (c *Client) ClaimByIssue(ctx context.Context, owner, repo string, number int) (*task.Task, error) { - r, err := c.client.ClaimByIssue(ctx, &pb.ClaimByIssueRequest{Owner: owner, Repo: repo, Number: int64(number)}) + r, err := c.task.ClaimByIssue(ctx, &pb.ClaimByIssueRequest{Owner: owner, Repo: repo, Number: int64(number)}) if err != nil { return nil, unmapError(err) } @@ -138,13 +181,13 @@ func (c *Client) ClaimByIssue(ctx context.Context, owner, repo string, number in } func (c *Client) Transition(ctx context.Context, taskID int64, from, to, detail string) error { - _, err := c.client.Transition(ctx, &pb.TransitionRequest{TaskId: taskID, From: from, To: to, Detail: detail}) + _, err := c.task.Transition(ctx, &pb.TransitionRequest{TaskId: taskID, From: from, To: to, Detail: detail}) return unmapError(err) } // TaskModels returns what the task's org resolves models against. func (c *Client) TaskModels(ctx context.Context, taskID int64) (config.OrgModels, error) { - r, err := c.client.TaskModels(ctx, &pb.TaskModelsRequest{TaskId: taskID}) + r, err := c.task.TaskModels(ctx, &pb.TaskModelsRequest{TaskId: taskID}) if err != nil { return config.OrgModels{}, unmapError(err) } @@ -158,7 +201,7 @@ func (c *Client) TaskModels(ctx context.Context, taskID int64) (config.OrgModels // TaskInstructions returns the instance and organisation instructions for the // task's org. func (c *Client) TaskInstructions(ctx context.Context, taskID int64) (instance, organisation string, err error) { - r, err := c.client.TaskInstructions(ctx, &pb.TaskInstructionsRequest{TaskId: taskID}) + r, err := c.task.TaskInstructions(ctx, &pb.TaskInstructionsRequest{TaskId: taskID}) if err != nil { return "", "", unmapError(err) } @@ -168,7 +211,7 @@ func (c *Client) TaskInstructions(ctx context.Context, taskID int64) (instance, // CallerModels returns the calling principal's org and the aliases it may // use. func (c *Client) CallerModels(ctx context.Context) (string, map[string]string, error) { - r, err := c.client.CallerModels(ctx, &pb.CallerModelsRequest{}) + r, err := c.org.CallerModels(ctx, &pb.CallerModelsRequest{}) if err != nil { return "", nil, unmapError(err) } @@ -177,14 +220,14 @@ func (c *Client) CallerModels(ctx context.Context) (string, map[string]string, e // RecordUsage appends one model call's usage record. func (c *Client) RecordUsage(ctx context.Context, r usage.Record) error { - _, err := c.client.RecordUsage(ctx, &pb.RecordUsageRequest{Record: usageProto(r)}) + _, err := c.execution.RecordUsage(ctx, &pb.RecordUsageRequest{Record: usageProto(r)}) return unmapError(err) } // StartStep and FinishStep record step executions and return the persisted // event. func (c *Client) StartStep(ctx context.Context, s task.StepStart) (int64, events.Event, error) { - r, err := c.client.StartStep(ctx, &pb.StartStepRequest{ + r, err := c.execution.StartStep(ctx, &pb.StartStepRequest{ ExecutionId: s.ExecutionID, Attempt: int64(s.Attempt), ParentId: s.ParentID, Kind: s.Kind, Name: s.Name, CalledExecutionId: s.CalledExecutionID, @@ -205,7 +248,7 @@ func (c *Client) StartStep(ctx context.Context, s task.StepStart) (int64, events // and returns the callees it cancelled; the caller cancels the runs' // in-memory contexts afterwards. func (c *Client) CancelExecution(ctx context.Context, taskID int64, reason, to string) ([]int64, error) { - r, err := c.client.CancelExecution(ctx, &pb.CancelExecutionRequest{TaskId: taskID, Reason: reason, To: to}) + r, err := c.execution.CancelExecution(ctx, &pb.CancelExecutionRequest{TaskId: taskID, Reason: reason, To: to}) if err != nil { return nil, unmapError(err) } @@ -213,7 +256,7 @@ func (c *Client) CancelExecution(ctx context.Context, taskID int64, reason, to s } func (c *Client) FinishStep(ctx context.Context, s task.StepFinish) (events.Event, error) { - r, err := c.client.FinishStep(ctx, &pb.FinishStepRequest{ + r, err := c.execution.FinishStep(ctx, &pb.FinishStepRequest{ ExecutionId: s.ExecutionID, StepId: s.StepID, From: string(s.From), To: string(s.To), Detail: s.Detail, TokensUsed: s.TokensUsed, Results: s.Results, }) @@ -228,7 +271,7 @@ func (c *Client) FinishStep(ctx context.Context, s task.StepFinish) (events.Even } func (c *Client) ListSteps(ctx context.Context, executionID int64, attempt int) ([]task.StepExecution, error) { - r, err := c.client.ListSteps(ctx, &pb.ListStepsRequest{ExecutionId: executionID, Attempt: int64(attempt)}) + r, err := c.execution.ListSteps(ctx, &pb.ListStepsRequest{ExecutionId: executionID, Attempt: int64(attempt)}) if err != nil { return nil, unmapError(err) } @@ -240,22 +283,22 @@ func (c *Client) ListSteps(ctx context.Context, executionID int64, attempt int) } func (c *Client) Update(ctx context.Context, t *task.Task) error { - _, err := c.client.Update(ctx, &pb.UpdateRequest{Task: taskProto(t)}) + _, err := c.task.Update(ctx, &pb.UpdateRequest{Task: taskProto(t)}) return unmapError(err) } func (c *Client) Requeue(ctx context.Context, taskID int64, fromStatus, wf string) error { - _, err := c.client.Requeue(ctx, &pb.RequeueRequest{TaskId: taskID, FromStatus: fromStatus, Workflow: wf}) + _, err := c.task.Requeue(ctx, &pb.RequeueRequest{TaskId: taskID, FromStatus: fromStatus, Workflow: wf}) return unmapError(err) } func (c *Client) ParkTask(ctx context.Context, taskID int64, from, detail, class, blocker string) error { - _, err := c.client.ParkTask(ctx, &pb.ParkTaskRequest{TaskId: taskID, From: from, Detail: detail, Class: class, Blocker: blocker}) + _, err := c.task.ParkTask(ctx, &pb.ParkTaskRequest{TaskId: taskID, From: from, Detail: detail, Class: class, Blocker: blocker}) return unmapError(err) } func (c *Client) RecoverStale(ctx context.Context) (int64, error) { - r, err := c.client.RecoverStale(ctx, &pb.RecoverStaleRequest{}) + r, err := c.task.RecoverStale(ctx, &pb.RecoverStaleRequest{}) if err != nil { return 0, unmapError(err) } @@ -265,7 +308,7 @@ func (c *Client) RecoverStale(ctx context.Context) (int64, error) { // Archive / Retry func (c *Client) ArchiveTask(ctx context.Context, taskID int64, fromStatus string, audit events.Event) (int64, error) { - r, err := c.client.ArchiveTask(ctx, &pb.ArchiveTaskRequest{TaskId: taskID, FromStatus: fromStatus, Audit: eventProto(audit)}) + r, err := c.task.ArchiveTask(ctx, &pb.ArchiveTaskRequest{TaskId: taskID, FromStatus: fromStatus, Audit: eventProto(audit)}) if err != nil { return 0, unmapError(err) } @@ -273,7 +316,7 @@ func (c *Client) ArchiveTask(ctx context.Context, taskID int64, fromStatus strin } func (c *Client) RetryTask(ctx context.Context, taskID int64, fromStatus, wf, retryMode string, resume task.Resume, currentDefinition bool) error { - _, err := c.client.RetryTask(ctx, &pb.RetryTaskRequest{ + _, err := c.task.RetryTask(ctx, &pb.RetryTaskRequest{ TaskId: taskID, FromStatus: fromStatus, Workflow: wf, RetryMode: retryMode, ResumeFrom: resume.From, ResumeAfter: resume.After, CurrentDefinition: currentDefinition, }) @@ -281,31 +324,31 @@ func (c *Client) RetryTask(ctx context.Context, taskID int64, fromStatus, wf, re } func (c *Client) RespondReviewGate(ctx context.Context, taskID int64, fromStatus, gate string, rereview bool, maxRounds int) error { - _, err := c.client.RespondReviewGate(ctx, &pb.RespondReviewGateRequest{ + _, err := c.review.RespondReviewGate(ctx, &pb.RespondReviewGateRequest{ TaskId: taskID, FromStatus: fromStatus, Gate: gate, Rereview: rereview, Cap: int64(maxRounds), }) return unmapError(err) } func (c *Client) BeginRemediation(ctx context.Context, taskID int64, payload string) error { - _, err := c.client.BeginRemediation(ctx, &pb.BeginRemediationRequest{TaskId: taskID, Payload: payload}) + _, err := c.review.BeginRemediation(ctx, &pb.BeginRemediationRequest{TaskId: taskID, Payload: payload}) return unmapError(err) } func (c *Client) UpdateReviewPayload(ctx context.Context, taskID int64, payload string) error { - _, err := c.client.UpdateReviewPayload(ctx, &pb.UpdateReviewPayloadRequest{TaskId: taskID, Payload: payload}) + _, err := c.review.UpdateReviewPayload(ctx, &pb.UpdateReviewPayloadRequest{TaskId: taskID, Payload: payload}) return unmapError(err) } func (c *Client) SetReviewCursors(ctx context.Context, taskID, reviewCursor, commentCursor int64) error { - _, err := c.client.SetReviewCursors(ctx, &pb.SetReviewCursorsRequest{TaskId: taskID, ReviewCursor: reviewCursor, CommentCursor: commentCursor}) + _, err := c.review.SetReviewCursors(ctx, &pb.SetReviewCursorsRequest{TaskId: taskID, ReviewCursor: reviewCursor, CommentCursor: commentCursor}) return unmapError(err) } // Queries func (c *Client) TaskByIssue(ctx context.Context, owner, repo string, number int) (*task.Task, error) { - r, err := c.client.TaskByIssue(ctx, &pb.TaskByIssueRequest{Owner: owner, Repo: repo, Number: int64(number)}) + r, err := c.task.TaskByIssue(ctx, &pb.TaskByIssueRequest{Owner: owner, Repo: repo, Number: int64(number)}) if err != nil { return nil, unmapError(err) } @@ -316,7 +359,7 @@ func (c *Client) TaskByIssue(ctx context.Context, owner, repo string, number int } func (c *Client) OpenTaskByPR(ctx context.Context, owner, repo string, number int) (*task.Task, error) { - r, err := c.client.OpenTaskByPR(ctx, &pb.OpenTaskByPRRequest{Owner: owner, Repo: repo, Number: int64(number)}) + r, err := c.task.OpenTaskByPR(ctx, &pb.OpenTaskByPRRequest{Owner: owner, Repo: repo, Number: int64(number)}) if err != nil { return nil, unmapError(err) } @@ -327,7 +370,7 @@ func (c *Client) OpenTaskByPR(ctx context.Context, owner, repo string, number in } func (c *Client) TaskByID(ctx context.Context, taskID int64) (*task.Task, error) { - r, err := c.client.TaskByID(ctx, &pb.TaskByIDRequest{TaskId: taskID}) + r, err := c.task.TaskByID(ctx, &pb.TaskByIDRequest{TaskId: taskID}) if err != nil { return nil, unmapError(err) } @@ -338,7 +381,7 @@ func (c *Client) TaskByID(ctx context.Context, taskID int64) (*task.Task, error) } func (c *Client) OpenPRs(ctx context.Context) ([]task.Task, error) { - r, err := c.client.OpenPRs(ctx, &pb.OpenPRsRequest{}) + r, err := c.task.OpenPRs(ctx, &pb.OpenPRsRequest{}) if err != nil { return nil, unmapError(err) } @@ -346,7 +389,7 @@ func (c *Client) OpenPRs(ctx context.Context) ([]task.Task, error) { } func (c *Client) ClearTerminalTasks(ctx context.Context) (int64, error) { - r, err := c.client.ClearTerminalTasks(ctx, &pb.ClearTerminalTasksRequest{}) + r, err := c.task.ClearTerminalTasks(ctx, &pb.ClearTerminalTasksRequest{}) if err != nil { return 0, unmapError(err) } @@ -360,7 +403,7 @@ func (c *Client) Tasks(ctx context.Context, limit int) ([]task.Task, error) { // TasksPage returns one page of tasks, most recently updated first. func (c *Client) TasksPage(ctx context.Context, page storecontract.TaskPage) ([]task.Task, error) { - r, err := c.client.Tasks(ctx, &pb.TasksRequest{ + r, err := c.task.Tasks(ctx, &pb.TasksRequest{ Limit: int64(page.Limit), Statuses: page.Statuses, Workflow: page.Workflow, AfterUpdatedAt: timestamp(page.After.UpdatedAt), AfterId: page.After.ID, }) @@ -371,7 +414,7 @@ func (c *Client) TasksPage(ctx context.Context, page storecontract.TaskPage) ([] } func (c *Client) StatusCounts(ctx context.Context) (map[string]int, error) { - r, err := c.client.StatusCounts(ctx, &pb.StatusCountsRequest{}) + r, err := c.stats.StatusCounts(ctx, &pb.StatusCountsRequest{}) if err != nil { return nil, unmapError(err) } @@ -385,7 +428,7 @@ func (c *Client) StatusCounts(ctx context.Context) (map[string]int, error) { // Events func (c *Client) InsertEvent(ctx context.Context, e events.Event) (int64, error) { - r, err := c.client.InsertEvent(ctx, &pb.InsertEventRequest{Event: eventProto(e)}) + r, err := c.taskEvent.InsertEvent(ctx, &pb.InsertEventRequest{Event: eventProto(e)}) if err != nil { return 0, unmapError(err) } @@ -393,7 +436,7 @@ func (c *Client) InsertEvent(ctx context.Context, e events.Event) (int64, error) } func (c *Client) EventsSince(ctx context.Context, cursor string, limit int) ([]events.Event, error) { - r, err := c.client.EventsSince(ctx, &pb.EventsSinceRequest{SinceId: cursor, Limit: int64(limit)}) + r, err := c.taskEvent.EventsSince(ctx, &pb.EventsSinceRequest{SinceId: cursor, Limit: int64(limit)}) if err != nil { return nil, unmapError(err) } @@ -401,7 +444,7 @@ func (c *Client) EventsSince(ctx context.Context, cursor string, limit int) ([]e } func (c *Client) TaskEvents(ctx context.Context, taskID int64) ([]events.Event, error) { - r, err := c.client.TaskEvents(ctx, &pb.TaskEventsRequest{TaskId: taskID}) + r, err := c.taskEvent.TaskEvents(ctx, &pb.TaskEventsRequest{TaskId: taskID}) if err != nil { return nil, unmapError(err) } @@ -409,7 +452,7 @@ func (c *Client) TaskEvents(ctx context.Context, taskID int64) ([]events.Event, } func (c *Client) WorkflowStats(ctx context.Context) ([]storecontract.WorkflowStat, error) { - r, err := c.client.WorkflowStats(ctx, &pb.WorkflowStatsRequest{}) + r, err := c.stats.WorkflowStats(ctx, &pb.WorkflowStatsRequest{}) if err != nil { return nil, unmapError(err) } @@ -417,7 +460,7 @@ func (c *Client) WorkflowStats(ctx context.Context) ([]storecontract.WorkflowSta } func (c *Client) StageStats(ctx context.Context) ([]storecontract.StageStat, error) { - r, err := c.client.StageStats(ctx, &pb.StageStatsRequest{}) + r, err := c.stats.StageStats(ctx, &pb.StageStatsRequest{}) if err != nil { return nil, unmapError(err) } @@ -425,7 +468,7 @@ func (c *Client) StageStats(ctx context.Context) ([]storecontract.StageStat, err } func (c *Client) TokensByDay(ctx context.Context, days int) ([]storecontract.DayTokens, error) { - r, err := c.client.TokensByDay(ctx, &pb.TokensByDayRequest{Days: int64(days)}) + r, err := c.stats.TokensByDay(ctx, &pb.TokensByDayRequest{Days: int64(days)}) if err != nil { return nil, unmapError(err) } @@ -435,7 +478,7 @@ func (c *Client) TokensByDay(ctx context.Context, days int) ([]storecontract.Day // Capture func (c *Client) InsertCapture(ctx context.Context, ce storecontract.CapturedEvent, retention time.Duration, maxEvents int) (string, error) { - r, err := c.client.InsertCapture(ctx, &pb.InsertCaptureRequest{Capture: capturedEventProto(ce), RetentionSeconds: int64(retention.Seconds()), MaxEvents: int64(maxEvents)}) + r, err := c.capture.InsertCapture(ctx, &pb.InsertCaptureRequest{Capture: capturedEventProto(ce), RetentionSeconds: int64(retention.Seconds()), MaxEvents: int64(maxEvents)}) if err != nil { return "", unmapError(err) } @@ -446,7 +489,7 @@ func (c *Client) InsertCapture(ctx context.Context, ce storecontract.CapturedEve // server admits it on the administrative token only; a task-scoped grant // cannot reach it (see TaskGrants). func (c *Client) PutConfigSnapshot(ctx context.Context, snapshot storecontract.ConfigSnapshot) error { - _, err := c.client.PutConfigSnapshot(ctx, &pb.PutConfigSnapshotRequest{Snapshot: configSnapshotProto(snapshot)}) + _, err := c.status.PutConfigSnapshot(ctx, &pb.PutConfigSnapshotRequest{Snapshot: configSnapshotProto(snapshot)}) if err != nil { return unmapError(err) } @@ -456,7 +499,7 @@ func (c *Client) PutConfigSnapshot(ctx context.Context, snapshot storecontract.C // ConfigSnapshot reads the published projection. found is false, with a nil // error, before a daemon has published one. func (c *Client) ConfigSnapshot(ctx context.Context) (storecontract.ConfigSnapshot, bool, error) { - reply, err := c.client.GetConfigSnapshot(ctx, &pb.GetConfigSnapshotRequest{}) + reply, err := c.status.GetConfigSnapshot(ctx, &pb.GetConfigSnapshotRequest{}) if err != nil { return storecontract.ConfigSnapshot{}, false, unmapError(err) } @@ -470,7 +513,7 @@ func (c *Client) ConfigSnapshot(ctx context.Context) (storecontract.ConfigSnapsh // Administrative, like the config snapshot pair: the server admits it on the // administrative token only, so a task-scoped grant cannot reach it. func (c *Client) PutChannelStatus(ctx context.Context, channels []storecontract.ChannelStatus) error { - _, err := c.client.PutChannelStatus(ctx, &pb.PutChannelStatusRequest{Channels: channelStatusesProto(channels)}) + _, err := c.status.PutChannelStatus(ctx, &pb.PutChannelStatusRequest{Channels: channelStatusesProto(channels)}) if err != nil { return unmapError(err) } @@ -479,7 +522,7 @@ func (c *Client) PutChannelStatus(ctx context.Context, channels []storecontract. // ChannelStatus reads every reported channel. func (c *Client) ChannelStatus(ctx context.Context) ([]storecontract.ChannelStatus, error) { - reply, err := c.client.ListChannelStatus(ctx, &pb.ListChannelStatusRequest{}) + reply, err := c.status.ListChannelStatus(ctx, &pb.ListChannelStatusRequest{}) if err != nil { return nil, unmapError(err) } @@ -490,7 +533,7 @@ func (c *Client) ChannelStatus(ctx context.Context) ([]storecontract.ChannelStat // Administrative, like the config snapshot pair: a task-scoped grant cannot // reach it. func (c *Client) PutApplyStatus(ctx context.Context, status storecontract.ApplyStatus) error { - _, err := c.client.PutApplyStatus(ctx, &pb.PutApplyStatusRequest{Status: applyStatusProto(status)}) + _, err := c.status.PutApplyStatus(ctx, &pb.PutApplyStatusRequest{Status: applyStatusProto(status)}) if err != nil { return unmapError(err) } @@ -500,7 +543,7 @@ func (c *Client) PutApplyStatus(ctx context.Context, status storecontract.ApplyS // ListApplyStatus reads every process's report. An empty slice means nothing // has reported yet, which is not an error. func (c *Client) ListApplyStatus(ctx context.Context) ([]storecontract.ApplyStatus, error) { - reply, err := c.client.ListApplyStatus(ctx, &pb.ListApplyStatusRequest{}) + reply, err := c.status.ListApplyStatus(ctx, &pb.ListApplyStatusRequest{}) if err != nil { return nil, unmapError(err) } @@ -513,7 +556,7 @@ func (c *Client) ListApplyStatus(ctx context.Context) ([]storecontract.ApplyStat // PutPresence re-stamps this service instance's record. Administrative. func (c *Client) PutPresence(ctx context.Context, presence storecontract.Presence) error { - _, err := c.client.PutPresence(ctx, &pb.PutPresenceRequest{Presence: presenceProto(presence)}) + _, err := c.status.PutPresence(ctx, &pb.PutPresenceRequest{Presence: presenceProto(presence)}) if err != nil { return unmapError(err) } @@ -522,7 +565,7 @@ func (c *Client) PutPresence(ctx context.Context, presence storecontract.Presenc // ListPresence reads every service instance's record. func (c *Client) ListPresence(ctx context.Context) ([]storecontract.Presence, error) { - reply, err := c.client.ListPresence(ctx, &pb.ListPresenceRequest{}) + reply, err := c.status.ListPresence(ctx, &pb.ListPresenceRequest{}) if err != nil { return nil, unmapError(err) } @@ -535,13 +578,13 @@ func (c *Client) ListPresence(ctx context.Context) ([]storecontract.Presence, er // RecordCaptureRefusal counts one event the network rules refused. func (c *Client) RecordCaptureRefusal(ctx context.Context, source, addr string, at time.Time) error { - _, err := c.client.RecordCaptureRefusal(ctx, &pb.RecordCaptureRefusalRequest{Source: source, Addr: addr, RefusedAt: timestamp(at)}) + _, err := c.capture.RecordCaptureRefusal(ctx, &pb.RecordCaptureRefusalRequest{Source: source, Addr: addr, RefusedAt: timestamp(at)}) return unmapError(err) } // CaptureRefusals reads each source's refusals since a time. func (c *Client) CaptureRefusals(ctx context.Context, since time.Time) ([]storecontract.CaptureRefusals, error) { - reply, err := c.client.ListCaptureRefusals(ctx, &pb.ListCaptureRefusalsRequest{Since: timestamp(since)}) + reply, err := c.capture.ListCaptureRefusals(ctx, &pb.ListCaptureRefusalsRequest{Since: timestamp(since)}) if err != nil { return nil, unmapError(err) } @@ -555,7 +598,7 @@ func (c *Client) CaptureRefusals(ctx context.Context, since time.Time) ([]storec // ListCaptures streams one capture per message; see StreamCaptures in // server.go. func (c *Client) ListCaptures(ctx context.Context, limit int) ([]storecontract.CapturedEvent, error) { - stream, err := c.client.StreamCaptures(ctx, &pb.StreamCapturesRequest{Limit: int64(limit)}) + stream, err := c.capture.StreamCaptures(ctx, &pb.StreamCapturesRequest{Limit: int64(limit)}) if err != nil { return nil, unmapError(err) } @@ -575,7 +618,7 @@ func (c *Client) ListCaptures(ctx context.Context, limit int) ([]storecontract.C // Mapping func (c *Client) InsertMapping(ctx context.Context, m mapping.Mapping) (string, error) { - r, err := c.client.InsertMapping(ctx, &pb.InsertMappingRequest{Mapping: mappingProto(m)}) + r, err := c.mapping.InsertMapping(ctx, &pb.InsertMappingRequest{Mapping: mappingProto(m)}) if err != nil { return "", unmapError(err) } @@ -583,7 +626,7 @@ func (c *Client) InsertMapping(ctx context.Context, m mapping.Mapping) (string, } func (c *Client) GetMapping(ctx context.Context, id string) (*mapping.Mapping, error) { - r, err := c.client.GetMapping(ctx, &pb.GetMappingRequest{Id: id}) + r, err := c.mapping.GetMapping(ctx, &pb.GetMappingRequest{Id: id}) if err != nil { return nil, unmapError(err) } @@ -595,7 +638,7 @@ func (c *Client) GetMapping(ctx context.Context, id string) (*mapping.Mapping, e } func (c *Client) ListMappings(ctx context.Context) ([]mapping.Mapping, error) { - r, err := c.client.ListMappings(ctx, &pb.ListMappingsRequest{}) + r, err := c.mapping.ListMappings(ctx, &pb.ListMappingsRequest{}) if err != nil { return nil, unmapError(err) } @@ -603,24 +646,24 @@ func (c *Client) ListMappings(ctx context.Context) ([]mapping.Mapping, error) { } func (c *Client) UpdateMapping(ctx context.Context, m mapping.Mapping) error { - _, err := c.client.UpdateMapping(ctx, &pb.UpdateMappingRequest{Mapping: mappingProto(m)}) + _, err := c.mapping.UpdateMapping(ctx, &pb.UpdateMappingRequest{Mapping: mappingProto(m)}) return unmapError(err) } func (c *Client) DeleteMapping(ctx context.Context, id string) error { - _, err := c.client.DeleteMapping(ctx, &pb.DeleteMappingRequest{Id: id}) + _, err := c.mapping.DeleteMapping(ctx, &pb.DeleteMappingRequest{Id: id}) return unmapError(err) } func (c *Client) RecordMappingMatch(ctx context.Context, mappingID, captureID string) error { - _, err := c.client.RecordMappingMatch(ctx, &pb.RecordMappingMatchRequest{MappingId: mappingID, CaptureId: captureID}) + _, err := c.mapping.RecordMappingMatch(ctx, &pb.RecordMappingMatchRequest{MappingId: mappingID, CaptureId: captureID}) return unmapError(err) } // Binding func (c *Client) InsertBinding(ctx context.Context, b binding.Binding) (string, error) { - r, err := c.client.InsertBinding(ctx, &pb.InsertBindingRequest{Binding: bindingProto(b)}) + r, err := c.binding.InsertBinding(ctx, &pb.InsertBindingRequest{Binding: bindingProto(b)}) if err != nil { return "", unmapError(err) } @@ -628,7 +671,7 @@ func (c *Client) InsertBinding(ctx context.Context, b binding.Binding) (string, } func (c *Client) GetBinding(ctx context.Context, id string) (*binding.Binding, error) { - r, err := c.client.GetBinding(ctx, &pb.GetBindingRequest{Id: id}) + r, err := c.binding.GetBinding(ctx, &pb.GetBindingRequest{Id: id}) if err != nil { return nil, unmapError(err) } @@ -640,7 +683,7 @@ func (c *Client) GetBinding(ctx context.Context, id string) (*binding.Binding, e } func (c *Client) ListBindings(ctx context.Context) ([]binding.Binding, error) { - r, err := c.client.ListBindings(ctx, &pb.ListBindingsRequest{}) + r, err := c.binding.ListBindings(ctx, &pb.ListBindingsRequest{}) if err != nil { return nil, unmapError(err) } @@ -648,7 +691,7 @@ func (c *Client) ListBindings(ctx context.Context) ([]binding.Binding, error) { } func (c *Client) ListDispatches(ctx context.Context, filter storecontract.DispatchFilter) ([]storecontract.Dispatch, error) { - r, err := c.client.ListDispatches(ctx, &pb.ListDispatchesRequest{ + r, err := c.dispatch.ListDispatches(ctx, &pb.ListDispatchesRequest{ BindingId: filter.BindingID, CaptureId: filter.CaptureID, TaskId: filter.TaskID, Limit: int32(filter.Limit), // the store clamps it }) if err != nil { @@ -663,39 +706,39 @@ func (c *Client) ListDispatches(ctx context.Context, filter storecontract.Dispat } func (c *Client) UpdateBinding(ctx context.Context, b binding.Binding) error { - _, err := c.client.UpdateBinding(ctx, &pb.UpdateBindingRequest{Binding: bindingProto(b)}) + _, err := c.binding.UpdateBinding(ctx, &pb.UpdateBindingRequest{Binding: bindingProto(b)}) return unmapError(err) } func (c *Client) DeleteBinding(ctx context.Context, id string) error { - _, err := c.client.DeleteBinding(ctx, &pb.DeleteBindingRequest{Id: id}) + _, err := c.binding.DeleteBinding(ctx, &pb.DeleteBindingRequest{Id: id}) return unmapError(err) } func (c *Client) PauseBinding(ctx context.Context, id string) error { - _, err := c.client.PauseBinding(ctx, &pb.PauseBindingRequest{Id: id}) + _, err := c.binding.PauseBinding(ctx, &pb.PauseBindingRequest{Id: id}) return unmapError(err) } func (c *Client) ResumeBinding(ctx context.Context, id string) error { - _, err := c.client.ResumeBinding(ctx, &pb.ResumeBindingRequest{Id: id}) + _, err := c.binding.ResumeBinding(ctx, &pb.ResumeBindingRequest{Id: id}) return unmapError(err) } func (c *Client) ApproveBinding(ctx context.Context, id string) error { - _, err := c.client.ApproveBinding(ctx, &pb.ApproveBindingRequest{Id: id}) + _, err := c.binding.ApproveBinding(ctx, &pb.ApproveBindingRequest{Id: id}) return unmapError(err) } // Source func (c *Client) InsertSource(ctx context.Context, s source.Source) error { - _, err := c.client.InsertSource(ctx, &pb.InsertSourceRequest{Source: sourceProto(s)}) + _, err := c.source.InsertSource(ctx, &pb.InsertSourceRequest{Source: sourceProto(s)}) return unmapError(err) } func (c *Client) GetSource(ctx context.Context, path string) (*source.Source, error) { - r, err := c.client.GetSource(ctx, &pb.GetSourceRequest{Path: path}) + r, err := c.source.GetSource(ctx, &pb.GetSourceRequest{Path: path}) if err != nil { return nil, unmapError(err) } @@ -707,7 +750,7 @@ func (c *Client) GetSource(ctx context.Context, path string) (*source.Source, er } func (c *Client) ListSources(ctx context.Context) ([]source.Source, error) { - r, err := c.client.ListSources(ctx, &pb.ListSourcesRequest{}) + r, err := c.source.ListSources(ctx, &pb.ListSourcesRequest{}) if err != nil { return nil, unmapError(err) } @@ -715,34 +758,34 @@ func (c *Client) ListSources(ctx context.Context) ([]source.Source, error) { } func (c *Client) SetSourceSigning(ctx context.Context, path string, from, to source.Signing) error { - _, err := c.client.SetSourceSigning(ctx, &pb.SetSourceSigningRequest{Path: path, From: string(from), To: string(to)}) + _, err := c.source.SetSourceSigning(ctx, &pb.SetSourceSigningRequest{Path: path, From: string(from), To: string(to)}) return unmapError(err) } func (c *Client) SetSourceName(ctx context.Context, path, name string) error { - _, err := c.client.SetSourceName(ctx, &pb.SetSourceNameRequest{Path: path, Name: name}) + _, err := c.source.SetSourceName(ctx, &pb.SetSourceNameRequest{Path: path, Name: name}) return unmapError(err) } func (c *Client) SetSourceDeliveryHeader(ctx context.Context, path, header string) error { - _, err := c.client.SetSourceDeliveryHeader(ctx, &pb.SetSourceDeliveryHeaderRequest{Path: path, Header: header}) + _, err := c.source.SetSourceDeliveryHeader(ctx, &pb.SetSourceDeliveryHeaderRequest{Path: path, Header: header}) return unmapError(err) } func (c *Client) DeleteSource(ctx context.Context, path string) error { - _, err := c.client.DeleteSource(ctx, &pb.DeleteSourceRequest{Path: path}) + _, err := c.source.DeleteSource(ctx, &pb.DeleteSourceRequest{Path: path}) return unmapError(err) } func (c *Client) SetSourceSecret(ctx context.Context, path, secret string) error { - _, err := c.client.SetSourceSecret(ctx, &pb.SetSourceSecretRequest{Path: path, Secret: secret}) + _, err := c.source.SetSourceSecret(ctx, &pb.SetSourceSecretRequest{Path: path, Secret: secret}) return unmapError(err) } // Dispatch func (c *Client) ArmedBindingsForSource(ctx context.Context, source string) ([]binding.Binding, error) { - r, err := c.client.ArmedBindingsForSource(ctx, &pb.ArmedBindingsForSourceRequest{Source: source}) + r, err := c.binding.ArmedBindingsForSource(ctx, &pb.ArmedBindingsForSourceRequest{Source: source}) if err != nil { return nil, unmapError(err) } @@ -750,25 +793,25 @@ func (c *Client) ArmedBindingsForSource(ctx context.Context, source string) ([]b } func (c *Client) RecordDispatch(ctx context.Context, bindingID string, bindingVersion int64, captureID string, taskID int64, reason string) error { - _, err := c.client.RecordDispatch(ctx, &pb.RecordDispatchRequest{BindingId: bindingID, BindingVersion: bindingVersion, CaptureId: captureID, TaskId: taskID, Reason: reason}) + _, err := c.dispatch.RecordDispatch(ctx, &pb.RecordDispatchRequest{BindingId: bindingID, BindingVersion: bindingVersion, CaptureId: captureID, TaskId: taskID, Reason: reason}) return unmapError(err) } // Playbook dispatch func (c *Client) RecordPlaybookDispatch(ctx context.Context, playbookID, playbookVersion, eventID, actionID string) error { - _, err := c.client.RecordPlaybookDispatch(ctx, &pb.RecordPlaybookDispatchRequest{PlaybookId: playbookID, PlaybookVersion: playbookVersion, EventId: eventID, ActionId: actionID}) + _, err := c.dispatch.RecordPlaybookDispatch(ctx, &pb.RecordPlaybookDispatchRequest{PlaybookId: playbookID, PlaybookVersion: playbookVersion, EventId: eventID, ActionId: actionID}) return unmapError(err) } func (c *Client) DeletePlaybookDispatches(ctx context.Context, playbookID string) error { - _, err := c.client.DeletePlaybookDispatches(ctx, &pb.DeletePlaybookDispatchesRequest{PlaybookId: playbookID}) + _, err := c.dispatch.DeletePlaybookDispatches(ctx, &pb.DeletePlaybookDispatchesRequest{PlaybookId: playbookID}) return unmapError(err) } // ListUndispatchedCaptures streams for the same reason as ListCaptures. func (c *Client) ListUndispatchedCaptures(ctx context.Context, bindings []string, limit int) ([]storecontract.CapturedEvent, error) { - stream, err := c.client.StreamUndispatchedCaptures(ctx, &pb.StreamUndispatchedCapturesRequest{Bindings: bindings, Limit: int64(limit)}) + stream, err := c.capture.StreamUndispatchedCaptures(ctx, &pb.StreamUndispatchedCapturesRequest{Bindings: bindings, Limit: int64(limit)}) if err != nil { return nil, unmapError(err) } @@ -792,7 +835,7 @@ func (c *Client) EnqueueBindingTask(ctx context.Context, owner, repo, title, bod if err != nil { return nil, err } - r, err := c.client.EnqueueBindingTask(ctx, &pb.EnqueueBindingTaskRequest{Owner: owner, Repo: repo, Title: title, Body: body, Workflow: wf, Identity: identity, BindingId: bindingID, BindingVersion: int64(bindingVersion), InputsJson: encoded, CaptureId: captureID}) + r, err := c.dispatch.EnqueueBindingTask(ctx, &pb.EnqueueBindingTaskRequest{Owner: owner, Repo: repo, Title: title, Body: body, Workflow: wf, Identity: identity, BindingId: bindingID, BindingVersion: int64(bindingVersion), InputsJson: encoded, CaptureId: captureID}) if err != nil { return nil, unmapError(err) } @@ -809,7 +852,7 @@ func (c *Client) StartCall(ctx context.Context, callerTaskID int64, callKey, wf if err != nil { return nil, err } - r, err := c.client.EnqueueCallTask(ctx, &pb.EnqueueCallTaskRequest{CallerTaskId: callerTaskID, CallKey: callKey, Workflow: wf, InputsJson: encoded}) + r, err := c.task.EnqueueCallTask(ctx, &pb.EnqueueCallTaskRequest{CallerTaskId: callerTaskID, CallKey: callKey, Workflow: wf, InputsJson: encoded}) if err != nil { return nil, unmapError(err) } @@ -817,7 +860,7 @@ func (c *Client) StartCall(ctx context.Context, callerTaskID int64, callKey, wf } func (c *Client) CallStatus(ctx context.Context, callerTaskID, callTaskID int64) (string, string, map[string]any, error) { - r, err := c.client.WorkflowCallStatus(ctx, &pb.WorkflowCallStatusRequest{CallerTaskId: callerTaskID, CallTaskId: callTaskID}) + r, err := c.task.WorkflowCallStatus(ctx, &pb.WorkflowCallStatusRequest{CallerTaskId: callerTaskID, CallTaskId: callTaskID}) if err != nil { return "", "", nil, unmapError(err) } @@ -831,7 +874,7 @@ func (c *Client) CallStatus(ctx context.Context, callerTaskID, callTaskID int64) // all comes back as an unavailable error, not as an empty page, so a caller // can tell the two apart. func (c *Client) TaskLog(ctx context.Context, taskID int64, attempt int, q logging.Query) (logging.TaskLogPage, error) { - r, err := c.client.ReadTaskLog(ctx, taskLogRequestProto(taskID, attempt, q)) + r, err := c.taskLog.ReadTaskLog(ctx, taskLogRequestProto(taskID, attempt, q)) if err != nil { return logging.TaskLogPage{}, unmapError(err) } @@ -863,7 +906,7 @@ func (c *Client) TaskLog(ctx context.Context, taskID int64, attempt int, q loggi // TaskLogContent streams one attempt's log verbatim into w, for a download. // found is false, with a nil error, when the attempt has no log file. func (c *Client) TaskLogContent(ctx context.Context, taskID int64, attempt int, w io.Writer) (bool, error) { - stream, err := c.client.StreamTaskLogContent(ctx, &pb.StreamTaskLogContentRequest{TaskId: taskID, Attempt: int64(attempt)}) + stream, err := c.taskLog.StreamTaskLogContent(ctx, &pb.StreamTaskLogContentRequest{TaskId: taskID, Attempt: int64(attempt)}) if err != nil { return false, unmapError(err) } @@ -889,7 +932,7 @@ func (c *Client) TaskLogContent(ctx context.Context, taskID int64, attempt int, // GetHarnessSecret returns the stored OAuth token set for an org/service // credential binding, or storecontract.ErrHarnessSecretNotFound. func (c *Client) GetHarnessSecret(ctx context.Context, org, service string) (harnesssecret.Secret, error) { - r, err := c.client.GetHarnessSecret(ctx, &pb.GetHarnessSecretRequest{Service: service, RunCredential: harnesssecret.RunCredential(ctx)}) + r, err := c.harnessSecret.GetHarnessSecret(ctx, &pb.GetHarnessSecretRequest{Service: service, RunCredential: harnesssecret.RunCredential(ctx)}) if err != nil { return harnesssecret.Secret{}, unmapError(err) } @@ -905,6 +948,6 @@ func (c *Client) GetHarnessSecret(ctx context.Context, org, service string) (har // set, called by the setup terminal's first capture and by the egress // proxy's every refresh. func (c *Client) PutHarnessSecret(ctx context.Context, s harnesssecret.Secret) error { - _, err := c.client.PutHarnessSecret(ctx, &pb.PutHarnessSecretRequest{Secret: harnessSecretProto(s), RunCredential: harnesssecret.RunCredential(ctx)}) + _, err := c.harnessSecret.PutHarnessSecret(ctx, &pb.PutHarnessSecretRequest{Secret: harnessSecretProto(s), RunCredential: harnesssecret.RunCredential(ctx)}) return unmapError(err) } diff --git a/internal/infrastructure/staterpc/eventtypes.go b/internal/infrastructure/staterpc/eventtypes.go index ffbe3ed87..e5db3742d 100644 --- a/internal/infrastructure/staterpc/eventtypes.go +++ b/internal/infrastructure/staterpc/eventtypes.go @@ -70,7 +70,7 @@ func (s *server) eventTypes() (storecontract.EventTypeStore, error) { return s.deps.EventTypes, nil } -func (s *server) InsertEventType(ctx context.Context, r *pb.InsertEventTypeRequest) (*pb.InsertEventTypeResponse, error) { +func (s *eventTypeServer) InsertEventType(ctx context.Context, r *pb.InsertEventTypeRequest) (*pb.InsertEventTypeResponse, error) { et, err := s.eventTypes() if err != nil { return nil, err @@ -82,7 +82,7 @@ func (s *server) InsertEventType(ctx context.Context, r *pb.InsertEventTypeReque return &pb.InsertEventTypeResponse{Id: id}, nil } -func (s *server) UpdateEventType(ctx context.Context, r *pb.UpdateEventTypeRequest) (*pb.UpdateEventTypeResponse, error) { +func (s *eventTypeServer) UpdateEventType(ctx context.Context, r *pb.UpdateEventTypeRequest) (*pb.UpdateEventTypeResponse, error) { et, err := s.eventTypes() if err != nil { return nil, err @@ -93,7 +93,7 @@ func (s *server) UpdateEventType(ctx context.Context, r *pb.UpdateEventTypeReque return &pb.UpdateEventTypeResponse{}, nil } -func (s *server) DeleteEventType(ctx context.Context, r *pb.DeleteEventTypeRequest) (*pb.DeleteEventTypeResponse, error) { +func (s *eventTypeServer) DeleteEventType(ctx context.Context, r *pb.DeleteEventTypeRequest) (*pb.DeleteEventTypeResponse, error) { et, err := s.eventTypes() if err != nil { return nil, err @@ -104,7 +104,7 @@ func (s *server) DeleteEventType(ctx context.Context, r *pb.DeleteEventTypeReque return &pb.DeleteEventTypeResponse{}, nil } -func (s *server) ListEventTypes(ctx context.Context, _ *pb.ListEventTypesRequest) (*pb.ListEventTypesResponse, error) { +func (s *eventTypeServer) ListEventTypes(ctx context.Context, _ *pb.ListEventTypesRequest) (*pb.ListEventTypesResponse, error) { et, err := s.eventTypes() if err != nil { return nil, err @@ -119,7 +119,7 @@ func (s *server) ListEventTypes(ctx context.Context, _ *pb.ListEventTypesRequest // Client func (c *Client) InsertEventType(ctx context.Context, t eventtype.EventType) (string, error) { - r, err := c.client.InsertEventType(ctx, &pb.InsertEventTypeRequest{EventType: eventTypeProto(t)}) + r, err := c.eventType.InsertEventType(ctx, &pb.InsertEventTypeRequest{EventType: eventTypeProto(t)}) if err != nil { return "", unmapError(err) } @@ -127,17 +127,17 @@ func (c *Client) InsertEventType(ctx context.Context, t eventtype.EventType) (st } func (c *Client) UpdateEventType(ctx context.Context, t eventtype.EventType) error { - _, err := c.client.UpdateEventType(ctx, &pb.UpdateEventTypeRequest{EventType: eventTypeProto(t)}) + _, err := c.eventType.UpdateEventType(ctx, &pb.UpdateEventTypeRequest{EventType: eventTypeProto(t)}) return unmapError(err) } func (c *Client) DeleteEventType(ctx context.Context, id string) error { - _, err := c.client.DeleteEventType(ctx, &pb.DeleteEventTypeRequest{Id: id}) + _, err := c.eventType.DeleteEventType(ctx, &pb.DeleteEventTypeRequest{Id: id}) return unmapError(err) } func (c *Client) ListEventTypes(ctx context.Context) ([]eventtype.EventType, error) { - r, err := c.client.ListEventTypes(ctx, &pb.ListEventTypesRequest{}) + r, err := c.eventType.ListEventTypes(ctx, &pb.ListEventTypesRequest{}) if err != nil { return nil, unmapError(err) } diff --git a/internal/infrastructure/staterpc/harness_secret_test.go b/internal/infrastructure/staterpc/harness_secret_test.go index 1d7503d0b..1f4a778bd 100644 --- a/internal/infrastructure/staterpc/harness_secret_test.go +++ b/internal/infrastructure/staterpc/harness_secret_test.go @@ -36,7 +36,7 @@ func TestHarnessSecretsUseCallerOrg(t *testing.T) { for _, caller := range []org.OrgID{"acme", org.DefaultOrgID, ""} { t.Run(string(caller), func(t *testing.T) { capture := &harnessCapture{} - s := &server{deps: Deps{HarnessSecrets: capture}} + s := &harnessSecretServer{server: &server{deps: Deps{HarnessSecrets: capture}}} ctx := org.WithOrg(context.Background(), caller) // A stale or malicious client still sending field 1 cannot choose the org. wire := protowire.AppendString(protowire.AppendTag(nil, 1, protowire.BytesType), "victim") @@ -94,7 +94,7 @@ func TestHarnessSecretsUseTaskGrant(t *testing.T) { t.Fatal(err) } capture := &harnessCapture{} - s := &server{deps: Deps{Grants: grants, Tasks: harnessTasks{err: tt.taskErr}, HarnessSecrets: capture}} + s := &harnessSecretServer{server: &server{deps: Deps{Grants: grants, Tasks: harnessTasks{err: tt.taskErr}, HarnessSecrets: capture}}} ctx := org.WithScope(t.Context(), tt.scope) for _, write := range []bool{false, true} { capture.got = harnesssecret.Secret{} @@ -119,8 +119,8 @@ func TestHarnessSecretsUseTaskGrant(t *testing.T) { } type harnessRPC struct { - pb.StateStoreServiceClient - server *server + pb.HarnessSecretServiceClient + server *harnessSecretServer } func (h harnessRPC) GetHarnessSecret(ctx context.Context, r *pb.GetHarnessSecretRequest, _ ...grpc.CallOption) (*pb.GetHarnessSecretResponse, error) { @@ -138,7 +138,7 @@ func TestHarnessSecretClientGrant(t *testing.T) { t.Fatal(err) } capture := &harnessCapture{} - c := &Client{client: harnessRPC{server: &server{deps: Deps{Grants: grants, Tasks: harnessTasks{}, HarnessSecrets: capture}}}} + c := &Client{harnessSecret: harnessRPC{server: &harnessSecretServer{server: &server{deps: Deps{Grants: grants, Tasks: harnessTasks{}, HarnessSecrets: capture}}}}} ctx := harnesssecret.WithRunCredential(t.Context(), token) for _, tt := range []struct { name, org string diff --git a/internal/infrastructure/staterpc/identities.go b/internal/infrastructure/staterpc/identities.go index 687ce1a4d..843725ba6 100644 --- a/internal/infrastructure/staterpc/identities.go +++ b/internal/infrastructure/staterpc/identities.go @@ -13,7 +13,7 @@ import ( "github.com/samcharles93/archie-core/internal/domain/org" ) -func (s *server) ListIdentities(ctx context.Context, _ *pb.ListIdentitiesRequest) (*pb.ListIdentitiesResponse, error) { +func (s *identityServer) ListIdentities(ctx context.Context, _ *pb.ListIdentitiesRequest) (*pb.ListIdentitiesResponse, error) { if s.deps.Identities == nil { return nil, status.Error(codes.Unavailable, "identity store unavailable") } @@ -28,7 +28,7 @@ func (s *server) ListIdentities(ctx context.Context, _ *pb.ListIdentitiesRequest return &pb.ListIdentitiesResponse{Identities: out}, nil } -func (s *server) GetIdentity(ctx context.Context, request *pb.GetIdentityRequest) (*pb.GetIdentityResponse, error) { +func (s *identityServer) GetIdentity(ctx context.Context, request *pb.GetIdentityRequest) (*pb.GetIdentityResponse, error) { value, err := s.deps.Identities.Get(ctx, identity.IdentityID(request.Id)) if errors.Is(err, identity.ErrNotFound) { value, err = s.deps.Identities.ResolveLegacyName(ctx, request.Id) @@ -39,7 +39,7 @@ func (s *server) GetIdentity(ctx context.Context, request *pb.GetIdentityRequest return &pb.GetIdentityResponse{Identity: identityProto(value)}, nil } -func (s *server) CreateIdentity(ctx context.Context, request *pb.CreateIdentityRequest) (*pb.CreateIdentityResponse, error) { +func (s *identityServer) CreateIdentity(ctx context.Context, request *pb.CreateIdentityRequest) (*pb.CreateIdentityResponse, error) { value, err := identity.New(identity.IdentityID(request.Id), identity.Kind(request.Kind), request.DisplayName) if err == nil { value, err = s.deps.Identities.Create(ctx, value, identityAudit(request.Audit)) @@ -50,27 +50,27 @@ func (s *server) CreateIdentity(ctx context.Context, request *pb.CreateIdentityR return &pb.CreateIdentityResponse{Identity: identityProto(value)}, nil } -func (s *server) RenameIdentity(ctx context.Context, request *pb.RenameIdentityRequest) (*pb.RenameIdentityResponse, error) { +func (s *identityServer) RenameIdentity(ctx context.Context, request *pb.RenameIdentityRequest) (*pb.RenameIdentityResponse, error) { value, err := s.applyIdentityCommand(ctx, request.Id, request.ExpectedVersion, request.Audit, identity.Command{Type: identity.CommandRename, DisplayName: request.DisplayName}) return &pb.RenameIdentityResponse{Identity: identityProto(value)}, err } -func (s *server) SuspendIdentity(ctx context.Context, request *pb.SuspendIdentityRequest) (*pb.SuspendIdentityResponse, error) { +func (s *identityServer) SuspendIdentity(ctx context.Context, request *pb.SuspendIdentityRequest) (*pb.SuspendIdentityResponse, error) { value, err := s.applyIdentityCommand(ctx, request.Id, request.ExpectedVersion, request.Audit, identity.Command{Type: identity.CommandSuspend}) return &pb.SuspendIdentityResponse{Identity: identityProto(value)}, err } -func (s *server) ReactivateIdentity(ctx context.Context, request *pb.ReactivateIdentityRequest) (*pb.ReactivateIdentityResponse, error) { +func (s *identityServer) ReactivateIdentity(ctx context.Context, request *pb.ReactivateIdentityRequest) (*pb.ReactivateIdentityResponse, error) { value, err := s.applyIdentityCommand(ctx, request.Id, request.ExpectedVersion, request.Audit, identity.Command{Type: identity.CommandReactivate}) return &pb.ReactivateIdentityResponse{Identity: identityProto(value)}, err } -func (s *server) RetireIdentity(ctx context.Context, request *pb.RetireIdentityRequest) (*pb.RetireIdentityResponse, error) { +func (s *identityServer) RetireIdentity(ctx context.Context, request *pb.RetireIdentityRequest) (*pb.RetireIdentityResponse, error) { value, err := s.applyIdentityCommand(ctx, request.Id, request.ExpectedVersion, request.Audit, identity.Command{Type: identity.CommandRetire}) return &pb.RetireIdentityResponse{Identity: identityProto(value)}, err } -func (s *server) ResolveIdentitySubject(ctx context.Context, request *pb.ResolveIdentitySubjectRequest) (*pb.ResolveIdentitySubjectResponse, error) { +func (s *identityServer) ResolveIdentitySubject(ctx context.Context, request *pb.ResolveIdentitySubjectRequest) (*pb.ResolveIdentitySubjectResponse, error) { if s.deps.SubjectBindings == nil { return nil, status.Error(codes.Unavailable, "identity subject bindings unavailable") } @@ -81,7 +81,7 @@ func (s *server) ResolveIdentitySubject(ctx context.Context, request *pb.Resolve return &pb.ResolveIdentitySubjectResponse{Identity: identityProto(value)}, nil } -func (s *server) ClaimIdentitySubject(ctx context.Context, request *pb.ClaimIdentitySubjectRequest) (*pb.ClaimIdentitySubjectResponse, error) { +func (s *identityServer) ClaimIdentitySubject(ctx context.Context, request *pb.ClaimIdentitySubjectRequest) (*pb.ClaimIdentitySubjectResponse, error) { if s.deps.SubjectBindings == nil { return nil, status.Error(codes.Unavailable, "identity subject bindings unavailable") } @@ -94,7 +94,7 @@ func (s *server) ClaimIdentitySubject(ctx context.Context, request *pb.ClaimIden return &pb.ClaimIdentitySubjectResponse{Identity: identityProto(value)}, nil } -func (s *server) BindIdentitySubject(ctx context.Context, request *pb.BindIdentitySubjectRequest) (*pb.BindIdentitySubjectResponse, error) { +func (s *identityServer) BindIdentitySubject(ctx context.Context, request *pb.BindIdentitySubjectRequest) (*pb.BindIdentitySubjectResponse, error) { if s.deps.SubjectBindings == nil { return nil, status.Error(codes.Unavailable, "identity subject bindings unavailable") } @@ -110,7 +110,7 @@ func (s *server) BindIdentitySubject(ctx context.Context, request *pb.BindIdenti } func (c *Client) ResolveSubject(ctx context.Context, subject identity.Subject) (identity.Identity, error) { - response, err := c.client.ResolveIdentitySubject(ctx, &pb.ResolveIdentitySubjectRequest{Issuer: subject.Issuer, Subject: subject.Subject}) + response, err := c.identity.ResolveIdentitySubject(ctx, &pb.ResolveIdentitySubjectRequest{Issuer: subject.Issuer, Subject: subject.Subject}) if err != nil { return identity.Identity{}, identityClientError(err) } @@ -118,7 +118,7 @@ func (c *Client) ResolveSubject(ctx context.Context, subject identity.Subject) ( } func (c *Client) ClaimSubject(ctx context.Context, placeholder, subject identity.Subject) (identity.Identity, error) { - response, err := c.client.ClaimIdentitySubject(ctx, &pb.ClaimIdentitySubjectRequest{Issuer: subject.Issuer, Placeholder: placeholder.Subject, Subject: subject.Subject}) + response, err := c.identity.ClaimIdentitySubject(ctx, &pb.ClaimIdentitySubjectRequest{Issuer: subject.Issuer, Placeholder: placeholder.Subject, Subject: subject.Subject}) if err != nil { return identity.Identity{}, identityClientError(err) } @@ -126,7 +126,7 @@ func (c *Client) ClaimSubject(ctx context.Context, placeholder, subject identity } func (c *Client) BindSubject(ctx context.Context, id identity.IdentityID, subject identity.Subject, audit identity.Audit) error { - _, err := c.client.BindIdentitySubject(ctx, &pb.BindIdentitySubjectRequest{Id: string(id), Issuer: subject.Issuer, Subject: subject.Subject, Audit: auditProto(audit)}) + _, err := c.identity.BindIdentitySubject(ctx, &pb.BindIdentitySubjectRequest{Id: string(id), Issuer: subject.Issuer, Subject: subject.Subject, Audit: auditProto(audit)}) return identityClientError(err) } @@ -140,7 +140,7 @@ func (s *server) applyIdentityCommand(ctx context.Context, id string, version in } func (c *Client) List(ctx context.Context) ([]identity.Identity, error) { - response, err := c.client.ListIdentities(ctx, &pb.ListIdentitiesRequest{}) + response, err := c.identity.ListIdentities(ctx, &pb.ListIdentitiesRequest{}) if err != nil { return nil, identityClientError(err) } @@ -152,7 +152,7 @@ func (c *Client) List(ctx context.Context) ([]identity.Identity, error) { } func (c *Client) Get(ctx context.Context, id identity.IdentityID) (identity.Identity, error) { - response, err := c.client.GetIdentity(ctx, &pb.GetIdentityRequest{Id: string(id)}) + response, err := c.identity.GetIdentity(ctx, &pb.GetIdentityRequest{Id: string(id)}) if err != nil { return identity.Identity{}, identityClientError(err) } @@ -164,7 +164,7 @@ func (c *Client) ResolveLegacyName(ctx context.Context, name string) (identity.I } func (c *Client) Create(ctx context.Context, value identity.Identity, audit identity.Audit) (identity.Identity, error) { - response, err := c.client.CreateIdentity(ctx, &pb.CreateIdentityRequest{Id: string(value.ID), Kind: string(value.Kind), DisplayName: value.DisplayName, Audit: auditProto(audit)}) + response, err := c.identity.CreateIdentity(ctx, &pb.CreateIdentityRequest{Id: string(value.ID), Kind: string(value.Kind), DisplayName: value.DisplayName, Audit: auditProto(audit)}) if err != nil { return identity.Identity{}, identityClientError(err) } @@ -176,25 +176,25 @@ func (c *Client) Apply(ctx context.Context, id identity.IdentityID, version int6 var err error switch command.Type { case identity.CommandRename: - response, callErr := c.client.RenameIdentity(ctx, &pb.RenameIdentityRequest{Id: string(id), ExpectedVersion: version, DisplayName: command.DisplayName, Audit: auditProto(audit)}) + response, callErr := c.identity.RenameIdentity(ctx, &pb.RenameIdentityRequest{Id: string(id), ExpectedVersion: version, DisplayName: command.DisplayName, Audit: auditProto(audit)}) err = callErr if response != nil { value = response.Identity } case identity.CommandSuspend: - response, callErr := c.client.SuspendIdentity(ctx, &pb.SuspendIdentityRequest{Id: string(id), ExpectedVersion: version, Audit: auditProto(audit)}) + response, callErr := c.identity.SuspendIdentity(ctx, &pb.SuspendIdentityRequest{Id: string(id), ExpectedVersion: version, Audit: auditProto(audit)}) err = callErr if response != nil { value = response.Identity } case identity.CommandReactivate: - response, callErr := c.client.ReactivateIdentity(ctx, &pb.ReactivateIdentityRequest{Id: string(id), ExpectedVersion: version, Audit: auditProto(audit)}) + response, callErr := c.identity.ReactivateIdentity(ctx, &pb.ReactivateIdentityRequest{Id: string(id), ExpectedVersion: version, Audit: auditProto(audit)}) err = callErr if response != nil { value = response.Identity } case identity.CommandRetire: - response, callErr := c.client.RetireIdentity(ctx, &pb.RetireIdentityRequest{Id: string(id), ExpectedVersion: version, Audit: auditProto(audit)}) + response, callErr := c.identity.RetireIdentity(ctx, &pb.RetireIdentityRequest{Id: string(id), ExpectedVersion: version, Audit: auditProto(audit)}) err = callErr if response != nil { value = response.Identity diff --git a/internal/infrastructure/staterpc/identity_start_test.go b/internal/infrastructure/staterpc/identity_start_test.go index f4543204b..eac7f025b 100644 --- a/internal/infrastructure/staterpc/identity_start_test.go +++ b/internal/infrastructure/staterpc/identity_start_test.go @@ -48,7 +48,7 @@ func TestIdentityStartIsAudited(t *testing.T) { t.Run(tt.name, func(t *testing.T) { tasks := &auditTasks{failInsert: tt.failInsert} grants := &TaskGrants{Store: credentials{}} - s := &server{deps: Deps{Tasks: tasks, Grants: grants, RootIdentity: "root", Identities: executionIdentityRepo{}}} + s := &taskGrantServer{server: &server{deps: Deps{Tasks: tasks, Grants: grants, RootIdentity: "root", Identities: executionIdentityRepo{}}}} ctx := access.WithActor(context.Background(), "archied") _, err := s.RegisterTaskGrant(ctx, &pb.RegisterTaskGrantRequest{TaskId: 7, Token: token, LifetimeSeconds: 60}) live, _ := grants.taskFor(ctx, token) diff --git a/internal/infrastructure/staterpc/logs.go b/internal/infrastructure/staterpc/logs.go index f3a5720db..95b0e0949 100644 --- a/internal/infrastructure/staterpc/logs.go +++ b/internal/infrastructure/staterpc/logs.go @@ -8,12 +8,12 @@ import ( "github.com/samcharles93/archie-core/internal/logging" ) -func (s *server) RecentLogs(_ context.Context, r *pb.RecentLogsRequest) (*pb.RecentLogsResponse, error) { +func (s *statusServer) RecentLogs(_ context.Context, r *pb.RecentLogsRequest) (*pb.RecentLogsResponse, error) { snapshot, err := logrpc.Encode(s.deps.LogFeed.Read(logrpc.Query(r.Query))) return &pb.RecentLogsResponse{Snapshot: snapshot}, err } func (c *Client) RecentLogs(ctx context.Context, q logging.Query) (logging.Result, error) { - response, err := c.client.RecentLogs(ctx, &pb.RecentLogsRequest{Query: logrpc.Request(q)}) + response, err := c.status.RecentLogs(ctx, &pb.RecentLogsRequest{Query: logrpc.Request(q)}) return logrpc.Decode(response.GetSnapshot(), err) } diff --git a/internal/infrastructure/staterpc/orgs.go b/internal/infrastructure/staterpc/orgs.go index b54a8108b..a13f4c6a5 100644 --- a/internal/infrastructure/staterpc/orgs.go +++ b/internal/infrastructure/staterpc/orgs.go @@ -63,7 +63,7 @@ func memberProto(m org.Member) *pb.Member { } } -func (s *server) ListOrgs(ctx context.Context, _ *pb.ListOrgsRequest) (*pb.ListOrgsResponse, error) { +func (s *orgServer) ListOrgs(ctx context.Context, _ *pb.ListOrgsRequest) (*pb.ListOrgsResponse, error) { if s.deps.Orgs == nil { return nil, errOrgsUnavailable } @@ -109,7 +109,7 @@ func orgFor(ctx context.Context, requested string) org.OrgID { return caller } -func (s *server) GetOrg(ctx context.Context, r *pb.GetOrgRequest) (*pb.GetOrgResponse, error) { +func (s *orgServer) GetOrg(ctx context.Context, r *pb.GetOrgRequest) (*pb.GetOrgResponse, error) { if s.deps.Orgs == nil { return nil, errOrgsUnavailable } @@ -120,7 +120,7 @@ func (s *server) GetOrg(ctx context.Context, r *pb.GetOrgRequest) (*pb.GetOrgRes return &pb.GetOrgResponse{Org: orgProto(value)}, nil } -func (s *server) CreateOrg(ctx context.Context, r *pb.CreateOrgRequest) (*pb.CreateOrgResponse, error) { +func (s *orgServer) CreateOrg(ctx context.Context, r *pb.CreateOrgRequest) (*pb.CreateOrgResponse, error) { if s.deps.Orgs == nil { return nil, errOrgsUnavailable } @@ -140,7 +140,7 @@ func (s *server) CreateOrg(ctx context.Context, r *pb.CreateOrgRequest) (*pb.Cre return &pb.CreateOrgResponse{Org: orgProto(value)}, nil } -func (s *server) ListWorkspaces(ctx context.Context, r *pb.ListWorkspacesRequest) (*pb.ListWorkspacesResponse, error) { +func (s *orgServer) ListWorkspaces(ctx context.Context, r *pb.ListWorkspacesRequest) (*pb.ListWorkspacesResponse, error) { if s.deps.Orgs == nil { return nil, errOrgsUnavailable } @@ -155,7 +155,7 @@ func (s *server) ListWorkspaces(ctx context.Context, r *pb.ListWorkspacesRequest return &pb.ListWorkspacesResponse{Workspaces: out}, nil } -func (s *server) CreateWorkspace(ctx context.Context, r *pb.CreateWorkspaceRequest) (*pb.CreateWorkspaceResponse, error) { +func (s *orgServer) CreateWorkspace(ctx context.Context, r *pb.CreateWorkspaceRequest) (*pb.CreateWorkspaceResponse, error) { if s.deps.Orgs == nil { return nil, errOrgsUnavailable } @@ -167,7 +167,7 @@ func (s *server) CreateWorkspace(ctx context.Context, r *pb.CreateWorkspaceReque return &pb.CreateWorkspaceResponse{Workspace: workspaceProto(created)}, nil } -func (s *server) ListMembers(ctx context.Context, r *pb.ListMembersRequest) (*pb.ListMembersResponse, error) { +func (s *orgServer) ListMembers(ctx context.Context, r *pb.ListMembersRequest) (*pb.ListMembersResponse, error) { if s.deps.Orgs == nil { return nil, errOrgsUnavailable } @@ -182,7 +182,7 @@ func (s *server) ListMembers(ctx context.Context, r *pb.ListMembersRequest) (*pb return &pb.ListMembersResponse{Members: out}, nil } -func (s *server) SetMembership(ctx context.Context, r *pb.SetMembershipRequest) (*pb.SetMembershipResponse, error) { +func (s *orgServer) SetMembership(ctx context.Context, r *pb.SetMembershipRequest) (*pb.SetMembershipResponse, error) { if s.deps.Orgs == nil { return nil, errOrgsUnavailable } @@ -198,7 +198,7 @@ func (s *server) SetMembership(ctx context.Context, r *pb.SetMembershipRequest) return &pb.SetMembershipResponse{}, nil } -func (s *server) RemoveMembership(ctx context.Context, r *pb.RemoveMembershipRequest) (*pb.RemoveMembershipResponse, error) { +func (s *orgServer) RemoveMembership(ctx context.Context, r *pb.RemoveMembershipRequest) (*pb.RemoveMembershipResponse, error) { if s.deps.Orgs == nil { return nil, errOrgsUnavailable } @@ -213,7 +213,7 @@ func (s *server) RemoveMembership(ctx context.Context, r *pb.RemoveMembershipReq return &pb.RemoveMembershipResponse{}, nil } -func (s *server) AssignAgent(ctx context.Context, r *pb.AssignAgentRequest) (*pb.AssignAgentResponse, error) { +func (s *orgServer) AssignAgent(ctx context.Context, r *pb.AssignAgentRequest) (*pb.AssignAgentResponse, error) { if s.deps.Orgs == nil { return nil, errOrgsUnavailable } @@ -227,7 +227,7 @@ func (s *server) AssignAgent(ctx context.Context, r *pb.AssignAgentRequest) (*pb return &pb.AssignAgentResponse{}, nil } -func (s *server) ListOrgAgents(ctx context.Context, r *pb.ListOrgAgentsRequest) (*pb.ListOrgAgentsResponse, error) { +func (s *orgServer) ListOrgAgents(ctx context.Context, r *pb.ListOrgAgentsRequest) (*pb.ListOrgAgentsResponse, error) { if s.deps.Orgs == nil { return nil, errOrgsUnavailable } diff --git a/internal/infrastructure/staterpc/orgs_client.go b/internal/infrastructure/staterpc/orgs_client.go index 15ecd2f02..dfd405157 100644 --- a/internal/infrastructure/staterpc/orgs_client.go +++ b/internal/infrastructure/staterpc/orgs_client.go @@ -12,7 +12,7 @@ import ( var _ org.API = (*Client)(nil) func (c *Client) CreateOrg(ctx context.Context, value org.Org, owner identity.IdentityID) (org.Org, error) { - r, err := c.client.CreateOrg(ctx, &pb.CreateOrgRequest{Id: string(value.ID), Name: value.Name, OwnerIdentityId: string(owner)}) + r, err := c.org.CreateOrg(ctx, &pb.CreateOrgRequest{Id: string(value.ID), Name: value.Name, OwnerIdentityId: string(owner)}) if err != nil { return org.Org{}, unmapError(err) } @@ -20,7 +20,7 @@ func (c *Client) CreateOrg(ctx context.Context, value org.Org, owner identity.Id } func (c *Client) GetOrg(ctx context.Context, id org.OrgID) (org.Org, error) { - r, err := c.client.GetOrg(ctx, &pb.GetOrgRequest{OrgId: string(id)}) + r, err := c.org.GetOrg(ctx, &pb.GetOrgRequest{OrgId: string(id)}) if err != nil { return org.Org{}, unmapError(err) } @@ -28,7 +28,7 @@ func (c *Client) GetOrg(ctx context.Context, id org.OrgID) (org.Org, error) { } func (c *Client) ListOrgs(ctx context.Context) ([]org.Org, error) { - r, err := c.client.ListOrgs(ctx, &pb.ListOrgsRequest{}) + r, err := c.org.ListOrgs(ctx, &pb.ListOrgsRequest{}) if err != nil { return nil, unmapError(err) } @@ -36,7 +36,7 @@ func (c *Client) ListOrgs(ctx context.Context) ([]org.Org, error) { } func (c *Client) CreateWorkspace(ctx context.Context, value org.Workspace) (org.Workspace, error) { - r, err := c.client.CreateWorkspace(ctx, &pb.CreateWorkspaceRequest{ + r, err := c.org.CreateWorkspace(ctx, &pb.CreateWorkspaceRequest{ OrgId: string(value.OrgID), Id: string(value.ID), Name: value.Name, Environment: value.Environment, }) if err != nil { @@ -46,7 +46,7 @@ func (c *Client) CreateWorkspace(ctx context.Context, value org.Workspace) (org. } func (c *Client) ListWorkspaces(ctx context.Context, id org.OrgID) ([]org.Workspace, error) { - r, err := c.client.ListWorkspaces(ctx, &pb.ListWorkspacesRequest{OrgId: string(id)}) + r, err := c.org.ListWorkspaces(ctx, &pb.ListWorkspacesRequest{OrgId: string(id)}) if err != nil { return nil, unmapError(err) } @@ -54,7 +54,7 @@ func (c *Client) ListWorkspaces(ctx context.Context, id org.OrgID) ([]org.Worksp } func (c *Client) EnsureMembership(ctx context.Context, value org.Membership) error { - _, err := c.client.SetMembership(ctx, &pb.SetMembershipRequest{ + _, err := c.org.SetMembership(ctx, &pb.SetMembershipRequest{ OrgId: string(value.OrgID), IdentityId: string(value.IdentityID), WorkspaceId: string(value.WorkspaceID), Role: string(value.Role), }) @@ -62,7 +62,7 @@ func (c *Client) EnsureMembership(ctx context.Context, value org.Membership) err } func (c *Client) ListMembers(ctx context.Context, id org.OrgID) ([]org.Member, error) { - r, err := c.client.ListMembers(ctx, &pb.ListMembersRequest{OrgId: string(id)}) + r, err := c.org.ListMembers(ctx, &pb.ListMembersRequest{OrgId: string(id)}) if err != nil { return nil, unmapError(err) } @@ -75,19 +75,19 @@ func (c *Client) ListMembers(ctx context.Context, id org.OrgID) ([]org.Member, e } func (c *Client) RemoveMembership(ctx context.Context, value org.Membership) error { - _, err := c.client.RemoveMembership(ctx, &pb.RemoveMembershipRequest{ + _, err := c.org.RemoveMembership(ctx, &pb.RemoveMembershipRequest{ OrgId: string(value.OrgID), IdentityId: string(value.IdentityID), WorkspaceId: string(value.WorkspaceID), }) return unmapError(err) } func (c *Client) AssignAgent(ctx context.Context, value org.AgentAssignment) error { - _, err := c.client.AssignAgent(ctx, &pb.AssignAgentRequest{OrgId: string(value.OrgID), IdentityId: string(value.IdentityID)}) + _, err := c.org.AssignAgent(ctx, &pb.AssignAgentRequest{OrgId: string(value.OrgID), IdentityId: string(value.IdentityID)}) return unmapError(err) } func (c *Client) ListOrgAgents(ctx context.Context, id org.OrgID) ([]org.AgentAssignment, error) { - r, err := c.client.ListOrgAgents(ctx, &pb.ListOrgAgentsRequest{OrgId: string(id)}) + r, err := c.org.ListOrgAgents(ctx, &pb.ListOrgAgentsRequest{OrgId: string(id)}) if err != nil { return nil, unmapError(err) } diff --git a/internal/infrastructure/staterpc/orgs_test.go b/internal/infrastructure/staterpc/orgs_test.go index f178a2b47..fc75b6d50 100644 --- a/internal/infrastructure/staterpc/orgs_test.go +++ b/internal/infrastructure/staterpc/orgs_test.go @@ -77,7 +77,7 @@ func (*fakeOrgs) OrgForIdentity(context.Context, identity.IdentityID) (org.OrgID // move a call into another org. func TestOrgRPCsActInTheCallersOrg(t *testing.T) { repo := &fakeOrgs{} - s := &server{deps: Deps{Orgs: repo, Log: slog.New(slog.DiscardHandler)}} + s := &orgServer{server: &server{deps: Deps{Orgs: repo, Log: slog.New(slog.DiscardHandler)}}} ctx := org.WithScope(org.WithOrg(context.Background(), "acme"), "acme") got, err := s.GetOrg(ctx, &pb.GetOrgRequest{OrgId: "other"}) @@ -123,7 +123,7 @@ func TestOrgRPCsActInTheCallersOrg(t *testing.T) { // TestSetMembershipRefusesUnknownRole pins that the store's role validation // reaches the wire as InvalidArgument and names the role. func TestSetMembershipRefusesUnknownRole(t *testing.T) { - s := &server{deps: Deps{Orgs: &fakeOrgs{}, Log: slog.New(slog.DiscardHandler)}} + s := &orgServer{server: &server{deps: Deps{Orgs: &fakeOrgs{}, Log: slog.New(slog.DiscardHandler)}}} _, err := s.SetMembership(org.WithOrg(context.Background(), "acme"), &pb.SetMembershipRequest{IdentityId: "sam", Role: "superuser"}) if status.Code(err) != codes.InvalidArgument || !strings.Contains(status.Convert(err).Message(), "superuser") { t.Fatalf("err = %v, want InvalidArgument naming the role", err) diff --git a/internal/infrastructure/staterpc/packages.go b/internal/infrastructure/staterpc/packages.go index 222d10d0b..534e29446 100644 --- a/internal/infrastructure/staterpc/packages.go +++ b/internal/infrastructure/staterpc/packages.go @@ -12,7 +12,7 @@ import ( "github.com/samcharles93/archie-core/internal/domain/storepkg" ) -func (s *server) InstallPackage(ctx context.Context, request *pb.InstallPackageRequest) (*pb.InstallPackageResponse, error) { +func (s *packageServer) InstallPackage(ctx context.Context, request *pb.InstallPackageRequest) (*pb.InstallPackageResponse, error) { if s.deps.Packages == nil { return nil, status.Error(codes.Unavailable, "package store unavailable") } @@ -23,7 +23,7 @@ func (s *server) InstallPackage(ctx context.Context, request *pb.InstallPackageR return &pb.InstallPackageResponse{Package: packageProto(p, true)}, nil } -func (s *server) GetInstalledPackage(ctx context.Context, request *pb.GetInstalledPackageRequest) (*pb.GetInstalledPackageResponse, error) { +func (s *packageServer) GetInstalledPackage(ctx context.Context, request *pb.GetInstalledPackageRequest) (*pb.GetInstalledPackageResponse, error) { if s.deps.Packages == nil { return nil, status.Error(codes.Unavailable, "package store unavailable") } @@ -34,7 +34,7 @@ func (s *server) GetInstalledPackage(ctx context.Context, request *pb.GetInstall return &pb.GetInstalledPackageResponse{Package: packageProto(p, true)}, nil } -func (s *server) ListInstalledPackages(ctx context.Context, request *pb.ListInstalledPackagesRequest) (*pb.ListInstalledPackagesResponse, error) { +func (s *packageServer) ListInstalledPackages(ctx context.Context, request *pb.ListInstalledPackagesRequest) (*pb.ListInstalledPackagesResponse, error) { if s.deps.Packages == nil { return nil, status.Error(codes.Unavailable, "package store unavailable") } @@ -49,7 +49,7 @@ func (s *server) ListInstalledPackages(ctx context.Context, request *pb.ListInst return result, nil } -func (s *server) AcceptPackageAuthority(ctx context.Context, request *pb.AcceptPackageAuthorityRequest) (*pb.AcceptPackageAuthorityResponse, error) { +func (s *packageServer) AcceptPackageAuthority(ctx context.Context, request *pb.AcceptPackageAuthorityRequest) (*pb.AcceptPackageAuthorityResponse, error) { if s.deps.Packages == nil { return nil, status.Error(codes.Unavailable, "package store unavailable") } @@ -60,7 +60,7 @@ func (s *server) AcceptPackageAuthority(ctx context.Context, request *pb.AcceptP return &pb.AcceptPackageAuthorityResponse{Package: packageProto(p, true)}, nil } -func (s *server) RemoveInstalledPackage(ctx context.Context, request *pb.RemoveInstalledPackageRequest) (*pb.RemoveInstalledPackageResponse, error) { +func (s *packageServer) RemoveInstalledPackage(ctx context.Context, request *pb.RemoveInstalledPackageRequest) (*pb.RemoveInstalledPackageResponse, error) { if s.deps.Packages == nil { return nil, status.Error(codes.Unavailable, "package store unavailable") } @@ -71,7 +71,7 @@ func (s *server) RemoveInstalledPackage(ctx context.Context, request *pb.RemoveI } func (c *Client) InstallPackage(ctx context.Context, name, reference, digest string) (storepkg.Installed, error) { - response, err := c.client.InstallPackage(ctx, &pb.InstallPackageRequest{Name: name, Reference: reference, Digest: digest}) + response, err := c.packages.InstallPackage(ctx, &pb.InstallPackageRequest{Name: name, Reference: reference, Digest: digest}) if err != nil { return storepkg.Installed{}, unmapError(err) } @@ -79,7 +79,7 @@ func (c *Client) InstallPackage(ctx context.Context, name, reference, digest str } func (c *Client) GetInstalled(ctx context.Context, name string) (storepkg.Installed, error) { - response, err := c.client.GetInstalledPackage(ctx, &pb.GetInstalledPackageRequest{Name: name}) + response, err := c.packages.GetInstalledPackage(ctx, &pb.GetInstalledPackageRequest{Name: name}) if err != nil { return storepkg.Installed{}, unmapError(err) } @@ -87,7 +87,7 @@ func (c *Client) GetInstalled(ctx context.Context, name string) (storepkg.Instal } func (c *Client) ListInstalled(ctx context.Context) ([]storepkg.Installed, error) { - response, err := c.client.ListInstalledPackages(ctx, &pb.ListInstalledPackagesRequest{}) + response, err := c.packages.ListInstalledPackages(ctx, &pb.ListInstalledPackagesRequest{}) if err != nil { return nil, unmapError(err) } @@ -103,12 +103,12 @@ func (c *Client) ListInstalled(ctx context.Context) ([]storepkg.Installed, error } func (c *Client) RemoveInstalled(ctx context.Context, name string) error { - _, err := c.client.RemoveInstalledPackage(ctx, &pb.RemoveInstalledPackageRequest{Name: name}) + _, err := c.packages.RemoveInstalledPackage(ctx, &pb.RemoveInstalledPackageRequest{Name: name}) return unmapError(err) } func (c *Client) AcceptPackageAuthority(ctx context.Context, name string, accepted storepkg.Authority) (storepkg.Installed, error) { - response, err := c.client.AcceptPackageAuthority(ctx, &pb.AcceptPackageAuthorityRequest{ + response, err := c.packages.AcceptPackageAuthority(ctx, &pb.AcceptPackageAuthorityRequest{ Name: name, Accepted: authorityProto(accepted), }) if err != nil { @@ -201,7 +201,7 @@ func authorityPtr(value *pb.PackageAuthority) *storepkg.Authority { return &authority } -func (s *server) ListCatalogue(ctx context.Context, _ *pb.ListCatalogueRequest) (*pb.ListCatalogueResponse, error) { +func (s *packageServer) ListCatalogue(ctx context.Context, _ *pb.ListCatalogueRequest) (*pb.ListCatalogueResponse, error) { if s.deps.Packages == nil { return nil, status.Error(codes.Unavailable, "package store unavailable") } @@ -219,7 +219,7 @@ func (s *server) ListCatalogue(ctx context.Context, _ *pb.ListCatalogueRequest) return &pb.ListCatalogueResponse{Packages: out}, nil } -func (s *server) InstallFromCatalogue(ctx context.Context, request *pb.InstallFromCatalogueRequest) (*pb.InstallFromCatalogueResponse, error) { +func (s *packageServer) InstallFromCatalogue(ctx context.Context, request *pb.InstallFromCatalogueRequest) (*pb.InstallFromCatalogueResponse, error) { if s.deps.Packages == nil { return nil, status.Error(codes.Unavailable, "package store unavailable") } @@ -231,7 +231,7 @@ func (s *server) InstallFromCatalogue(ctx context.Context, request *pb.InstallFr } func (c *Client) ListCatalogue(ctx context.Context) (storepkg.Catalogue, error) { - response, err := c.client.ListCatalogue(ctx, &pb.ListCatalogueRequest{}) + response, err := c.packages.ListCatalogue(ctx, &pb.ListCatalogueRequest{}) if err != nil { return storepkg.Catalogue{}, unmapError(err) } @@ -246,14 +246,14 @@ func (c *Client) ListCatalogue(ctx context.Context) (storepkg.Catalogue, error) } func (c *Client) InstallFromCatalogue(ctx context.Context, name string) (storepkg.Installed, error) { - response, err := c.client.InstallFromCatalogue(ctx, &pb.InstallFromCatalogueRequest{Name: name}) + response, err := c.packages.InstallFromCatalogue(ctx, &pb.InstallFromCatalogueRequest{Name: name}) if err != nil { return storepkg.Installed{}, unmapError(err) } return packageValue(response.GetPackage()) } -func (s *server) UpdatePackage(ctx context.Context, request *pb.UpdatePackageRequest) (*pb.UpdatePackageResponse, error) { +func (s *packageServer) UpdatePackage(ctx context.Context, request *pb.UpdatePackageRequest) (*pb.UpdatePackageResponse, error) { if s.deps.Packages == nil { return nil, status.Error(codes.Unavailable, "package store unavailable") } @@ -264,7 +264,7 @@ func (s *server) UpdatePackage(ctx context.Context, request *pb.UpdatePackageReq return &pb.UpdatePackageResponse{Package: packageProto(p, true)}, nil } -func (s *server) ApprovePackageUpdate(ctx context.Context, request *pb.ApprovePackageUpdateRequest) (*pb.ApprovePackageUpdateResponse, error) { +func (s *packageServer) ApprovePackageUpdate(ctx context.Context, request *pb.ApprovePackageUpdateRequest) (*pb.ApprovePackageUpdateResponse, error) { if s.deps.Packages == nil { return nil, status.Error(codes.Unavailable, "package store unavailable") } @@ -275,7 +275,7 @@ func (s *server) ApprovePackageUpdate(ctx context.Context, request *pb.ApprovePa return &pb.ApprovePackageUpdateResponse{Package: packageProto(p, true)}, nil } -func (s *server) RollbackPackage(ctx context.Context, request *pb.RollbackPackageRequest) (*pb.RollbackPackageResponse, error) { +func (s *packageServer) RollbackPackage(ctx context.Context, request *pb.RollbackPackageRequest) (*pb.RollbackPackageResponse, error) { if s.deps.Packages == nil { return nil, status.Error(codes.Unavailable, "package store unavailable") } @@ -287,7 +287,7 @@ func (s *server) RollbackPackage(ctx context.Context, request *pb.RollbackPackag } func (c *Client) UpdatePackage(ctx context.Context, name string) (storepkg.Installed, error) { - response, err := c.client.UpdatePackage(ctx, &pb.UpdatePackageRequest{Name: name}) + response, err := c.packages.UpdatePackage(ctx, &pb.UpdatePackageRequest{Name: name}) if err != nil { return storepkg.Installed{}, unmapError(err) } @@ -295,7 +295,7 @@ func (c *Client) UpdatePackage(ctx context.Context, name string) (storepkg.Insta } func (c *Client) ApprovePackageUpdate(ctx context.Context, name string) (storepkg.Installed, error) { - response, err := c.client.ApprovePackageUpdate(ctx, &pb.ApprovePackageUpdateRequest{Name: name}) + response, err := c.packages.ApprovePackageUpdate(ctx, &pb.ApprovePackageUpdateRequest{Name: name}) if err != nil { return storepkg.Installed{}, unmapError(err) } @@ -303,14 +303,14 @@ func (c *Client) ApprovePackageUpdate(ctx context.Context, name string) (storepk } func (c *Client) RollbackPackage(ctx context.Context, name string) (storepkg.Installed, error) { - response, err := c.client.RollbackPackage(ctx, &pb.RollbackPackageRequest{Name: name}) + response, err := c.packages.RollbackPackage(ctx, &pb.RollbackPackageRequest{Name: name}) if err != nil { return storepkg.Installed{}, unmapError(err) } return packageValue(response.GetPackage()) } -func (s *server) SetPackageUpdatePolicy(ctx context.Context, request *pb.SetPackageUpdatePolicyRequest) (*pb.SetPackageUpdatePolicyResponse, error) { +func (s *packageServer) SetPackageUpdatePolicy(ctx context.Context, request *pb.SetPackageUpdatePolicyRequest) (*pb.SetPackageUpdatePolicyResponse, error) { if s.deps.Packages == nil { return nil, status.Error(codes.Unavailable, "package store unavailable") } @@ -322,7 +322,7 @@ func (s *server) SetPackageUpdatePolicy(ctx context.Context, request *pb.SetPack } func (c *Client) SetPackageUpdatePolicy(ctx context.Context, name, policy string) (storepkg.Installed, error) { - response, err := c.client.SetPackageUpdatePolicy(ctx, &pb.SetPackageUpdatePolicyRequest{Name: name, Policy: policy}) + response, err := c.packages.SetPackageUpdatePolicy(ctx, &pb.SetPackageUpdatePolicyRequest{Name: name, Policy: policy}) if err != nil { return storepkg.Installed{}, unmapError(err) } diff --git a/internal/infrastructure/staterpc/personal_tokens.go b/internal/infrastructure/staterpc/personal_tokens.go index 9d60c631d..bc34624db 100644 --- a/internal/infrastructure/staterpc/personal_tokens.go +++ b/internal/infrastructure/staterpc/personal_tokens.go @@ -38,7 +38,7 @@ func tokenAudit(ctx context.Context, owner identity.IdentityID, id string) ident return identity.Audit{ActorID: owner, Source: access.SourceFromContext(ctx), RequestID: "personal-token:" + id} } -func (s *server) AddPersonalToken(ctx context.Context, r *pb.AddPersonalTokenRequest) (*pb.AddPersonalTokenResponse, error) { +func (s *accountServer) AddPersonalToken(ctx context.Context, r *pb.AddPersonalTokenRequest) (*pb.AddPersonalTokenResponse, error) { owner, err := s.tokenOwner(ctx) if err != nil { return nil, err @@ -53,7 +53,7 @@ func (s *server) AddPersonalToken(ctx context.Context, r *pb.AddPersonalTokenReq return &pb.AddPersonalTokenResponse{}, nil } -func (s *server) ListPersonalTokens(ctx context.Context, _ *pb.ListPersonalTokensRequest) (*pb.ListPersonalTokensResponse, error) { +func (s *accountServer) ListPersonalTokens(ctx context.Context, _ *pb.ListPersonalTokensRequest) (*pb.ListPersonalTokensResponse, error) { owner, err := s.tokenOwner(ctx) if err != nil { return nil, err @@ -69,7 +69,7 @@ func (s *server) ListPersonalTokens(ctx context.Context, _ *pb.ListPersonalToken return &pb.ListPersonalTokensResponse{Tokens: out}, nil } -func (s *server) RevokePersonalToken(ctx context.Context, r *pb.RevokePersonalTokenRequest) (*pb.RevokePersonalTokenResponse, error) { +func (s *accountServer) RevokePersonalToken(ctx context.Context, r *pb.RevokePersonalTokenRequest) (*pb.RevokePersonalTokenResponse, error) { owner, err := s.tokenOwner(ctx) if err != nil { return nil, err @@ -85,12 +85,12 @@ func (s *server) RevokePersonalToken(ctx context.Context, r *pb.RevokePersonalTo } func (c *Client) AddPersonalToken(ctx context.Context, subject identity.Subject) error { - _, err := c.client.AddPersonalToken(ctx, &pb.AddPersonalTokenRequest{Id: subject.Subject}) + _, err := c.account.AddPersonalToken(ctx, &pb.AddPersonalTokenRequest{Id: subject.Subject}) return identityClientError(err) } func (c *Client) ListPersonalTokens(ctx context.Context) ([]identity.PersonalToken, error) { - r, err := c.client.ListPersonalTokens(ctx, &pb.ListPersonalTokensRequest{}) + r, err := c.account.ListPersonalTokens(ctx, &pb.ListPersonalTokensRequest{}) if err != nil { return nil, identityClientError(err) } @@ -102,6 +102,6 @@ func (c *Client) ListPersonalTokens(ctx context.Context) ([]identity.PersonalTok } func (c *Client) RevokePersonalToken(ctx context.Context, id string) error { - _, err := c.client.RevokePersonalToken(ctx, &pb.RevokePersonalTokenRequest{Id: id}) + _, err := c.account.RevokePersonalToken(ctx, &pb.RevokePersonalTokenRequest{Id: id}) return identityClientError(err) } diff --git a/internal/infrastructure/staterpc/personal_tokens_test.go b/internal/infrastructure/staterpc/personal_tokens_test.go index 516138c90..fe2d82ada 100644 --- a/internal/infrastructure/staterpc/personal_tokens_test.go +++ b/internal/infrastructure/staterpc/personal_tokens_test.go @@ -36,7 +36,7 @@ func TestPersonalTokenOwner(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { store := &tokenCalls{} - s := &server{deps: Deps{PersonalTokens: store}} + s := &accountServer{server: &server{deps: Deps{PersonalTokens: store}}} ctx := context.Background() if tt.principal != nil { ctx = access.WithPrincipal(ctx, *tt.principal) diff --git a/internal/infrastructure/staterpc/server.go b/internal/infrastructure/staterpc/server.go index 365f92b31..19e49a423 100644 --- a/internal/infrastructure/staterpc/server.go +++ b/internal/infrastructure/staterpc/server.go @@ -160,12 +160,118 @@ type Deps struct { Log *slog.Logger } +// server holds what every State Store service shares; each contract has its +// own server type embedding it. type server struct { - pb.UnimplementedStateStoreServiceServer deps Deps } -// RegisterServer registers the StateStore gRPC service against registrar, +type packageServer struct { + pb.UnimplementedPackageServiceServer + *server +} + +type taskGrantServer struct { + pb.UnimplementedTaskGrantServiceServer + *server +} + +type harnessSecretServer struct { + pb.UnimplementedHarnessSecretServiceServer + *server +} + +type accountServer struct { + pb.UnimplementedAccountServiceServer + *server +} + +type identityServer struct { + pb.UnimplementedIdentityServiceServer + *server +} + +type taskServer struct { + pb.UnimplementedTaskServiceServer + *server +} + +type executionServer struct { + pb.UnimplementedExecutionServiceServer + *server +} + +type reviewServer struct { + pb.UnimplementedReviewServiceServer + *server +} + +type taskEventServer struct { + pb.UnimplementedTaskEventServiceServer + *server +} + +type statsServer struct { + pb.UnimplementedStatsServiceServer + *server +} + +type taskLogServer struct { + pb.UnimplementedTaskLogServiceServer + *server +} + +type statusServer struct { + pb.UnimplementedStatusServiceServer + *server +} + +type captureServer struct { + pb.UnimplementedCaptureServiceServer + *server +} + +type mappingServer struct { + pb.UnimplementedMappingServiceServer + *server +} + +type eventTypeServer struct { + pb.UnimplementedEventTypeServiceServer + *server +} + +type bindingServer struct { + pb.UnimplementedBindingServiceServer + *server +} + +type dispatchServer struct { + pb.UnimplementedDispatchServiceServer + *server +} + +type sourceServer struct { + pb.UnimplementedSourceServiceServer + *server +} + +type accessServer struct { + pb.UnimplementedAccessServiceServer + *server +} + +type orgServer struct { + pb.UnimplementedOrgServiceServer + *server +} + +type alertServer struct { + pb.UnimplementedAlertServiceServer + *server +} + +// RegisterServer registers the State Store gRPC services against registrar, // backed by deps. Optionally wrap registrar's interceptor chain with // TokenInterceptor for the bridge-address (agent-consumed) topology; the caller // decides. @@ -173,7 +279,28 @@ func RegisterServer(registrar grpc.ServiceRegistrar, deps Deps) { if deps.Log == nil { deps.Log = slog.New(slog.DiscardHandler) } - pb.RegisterStateStoreServiceServer(registrar, &server{deps: deps}) + s := &server{deps: deps} + pb.RegisterPackageServiceServer(registrar, &packageServer{server: s}) + pb.RegisterTaskGrantServiceServer(registrar, &taskGrantServer{server: s}) + pb.RegisterHarnessSecretServiceServer(registrar, &harnessSecretServer{server: s}) + pb.RegisterAccountServiceServer(registrar, &accountServer{server: s}) + pb.RegisterIdentityServiceServer(registrar, &identityServer{server: s}) + pb.RegisterTaskServiceServer(registrar, &taskServer{server: s}) + pb.RegisterExecutionServiceServer(registrar, &executionServer{server: s}) + pb.RegisterReviewServiceServer(registrar, &reviewServer{server: s}) + pb.RegisterTaskEventServiceServer(registrar, &taskEventServer{server: s}) + pb.RegisterStatsServiceServer(registrar, &statsServer{server: s}) + pb.RegisterTaskLogServiceServer(registrar, &taskLogServer{server: s}) + pb.RegisterStatusServiceServer(registrar, &statusServer{server: s}) + pb.RegisterCaptureServiceServer(registrar, &captureServer{server: s}) + pb.RegisterMappingServiceServer(registrar, &mappingServer{server: s}) + pb.RegisterEventTypeServiceServer(registrar, &eventTypeServer{server: s}) + pb.RegisterBindingServiceServer(registrar, &bindingServer{server: s}) + pb.RegisterDispatchServiceServer(registrar, &dispatchServer{server: s}) + pb.RegisterSourceServiceServer(registrar, &sourceServer{server: s}) + pb.RegisterAccessServiceServer(registrar, &accessServer{server: s}) + pb.RegisterOrgServiceServer(registrar, &orgServer{server: s}) + pb.RegisterAlertServiceServer(registrar, &alertServer{server: s}) if deps.ControlPlane != nil { controlpb.RegisterControlPlaneServiceServer(registrar, deps.ControlPlane) } @@ -193,7 +320,7 @@ func validationFailure(err error) error { // Lifecycle -func (s *server) EnqueueIssue(ctx context.Context, r *pb.EnqueueIssueRequest) (*pb.EnqueueIssueResponse, error) { +func (s *taskServer) EnqueueIssue(ctx context.Context, r *pb.EnqueueIssueRequest) (*pb.EnqueueIssueResponse, error) { inserted, err := s.deps.Tasks.EnqueueIssue(ctx, r.Owner, r.Repo, int(r.Number), r.Title, r.Body, r.Labels, r.Identity) if err != nil { return nil, s.logErr("EnqueueIssue", err) @@ -201,7 +328,7 @@ func (s *server) EnqueueIssue(ctx context.Context, r *pb.EnqueueIssueRequest) (* return &pb.EnqueueIssueResponse{Inserted: inserted}, nil } -func (s *server) ActiveTasksByOrigin(ctx context.Context, r *pb.ActiveTasksByOriginRequest) (*pb.ActiveTasksByOriginResponse, error) { +func (s *taskServer) ActiveTasksByOrigin(ctx context.Context, r *pb.ActiveTasksByOriginRequest) (*pb.ActiveTasksByOriginResponse, error) { tasks, err := s.deps.Tasks.ActiveTasksByOrigin(ctx, r.Origin) if err != nil { return nil, s.logErr("ActiveTasksByOrigin", err) @@ -213,7 +340,7 @@ func (s *server) ActiveTasksByOrigin(ctx context.Context, r *pb.ActiveTasksByOri return &pb.ActiveTasksByOriginResponse{Tasks: out}, nil } -func (s *server) UnpostedOutcomes(ctx context.Context, _ *pb.UnpostedOutcomesRequest) (*pb.UnpostedOutcomesResponse, error) { +func (s *taskServer) UnpostedOutcomes(ctx context.Context, _ *pb.UnpostedOutcomesRequest) (*pb.UnpostedOutcomesResponse, error) { tasks, err := s.deps.Tasks.UnpostedOutcomes(ctx) if err != nil { return nil, s.logErr("UnpostedOutcomes", err) @@ -225,14 +352,14 @@ func (s *server) UnpostedOutcomes(ctx context.Context, _ *pb.UnpostedOutcomesReq return &pb.UnpostedOutcomesResponse{Tasks: out}, nil } -func (s *server) MarkOutcomePosted(ctx context.Context, r *pb.MarkOutcomePostedRequest) (*pb.MarkOutcomePostedResponse, error) { +func (s *taskServer) MarkOutcomePosted(ctx context.Context, r *pb.MarkOutcomePostedRequest) (*pb.MarkOutcomePostedResponse, error) { if err := s.deps.Tasks.MarkOutcomePosted(ctx, r.TaskId, r.Status); err != nil { return nil, s.logErr("MarkOutcomePosted", err) } return &pb.MarkOutcomePostedResponse{}, nil } -func (s *server) EnqueueChatTask(ctx context.Context, r *pb.EnqueueChatTaskRequest) (*pb.EnqueueChatTaskResponse, error) { +func (s *taskServer) EnqueueChatTask(ctx context.Context, r *pb.EnqueueChatTaskRequest) (*pb.EnqueueChatTaskResponse, error) { inputs, err := task.DecodeInputs(r.InputsJson) if err != nil { return nil, status.Error(codes.InvalidArgument, err.Error()) @@ -244,7 +371,7 @@ func (s *server) EnqueueChatTask(ctx context.Context, r *pb.EnqueueChatTaskReque return &pb.EnqueueChatTaskResponse{Task: taskProto(t)}, nil } -func (s *server) ClaimNext(ctx context.Context, _ *pb.ClaimNextRequest) (*pb.ClaimNextResponse, error) { +func (s *taskServer) ClaimNext(ctx context.Context, _ *pb.ClaimNextRequest) (*pb.ClaimNextResponse, error) { t, err := s.deps.Tasks.ClaimNext(ctx) if err != nil { return nil, s.logErr("ClaimNext", err) @@ -252,7 +379,7 @@ func (s *server) ClaimNext(ctx context.Context, _ *pb.ClaimNextRequest) (*pb.Cla return &pb.ClaimNextResponse{Task: taskProto(t), Found: t != nil}, nil } -func (s *server) ClaimByIssue(ctx context.Context, r *pb.ClaimByIssueRequest) (*pb.ClaimByIssueResponse, error) { +func (s *taskServer) ClaimByIssue(ctx context.Context, r *pb.ClaimByIssueRequest) (*pb.ClaimByIssueResponse, error) { t, err := s.deps.Tasks.ClaimByIssue(ctx, r.Owner, r.Repo, int(r.Number)) if err != nil { return nil, s.logErr("ClaimByIssue", err) @@ -260,7 +387,7 @@ func (s *server) ClaimByIssue(ctx context.Context, r *pb.ClaimByIssueRequest) (* return &pb.ClaimByIssueResponse{Task: taskProto(t), Found: t != nil}, nil } -func (s *server) Transition(ctx context.Context, r *pb.TransitionRequest) (*pb.TransitionResponse, error) { +func (s *taskServer) Transition(ctx context.Context, r *pb.TransitionRequest) (*pb.TransitionResponse, error) { if err := s.deps.Tasks.Transition(ctx, r.TaskId, r.From, r.To, r.Detail); err != nil { return nil, s.logErr("Transition", err) } @@ -268,7 +395,7 @@ func (s *server) Transition(ctx context.Context, r *pb.TransitionRequest) (*pb.T } // StartStep and FinishStep write a step transition and return its event. -func (s *server) StartStep(ctx context.Context, r *pb.StartStepRequest) (*pb.StartStepResponse, error) { +func (s *executionServer) StartStep(ctx context.Context, r *pb.StartStepRequest) (*pb.StartStepResponse, error) { if s.deps.Steps == nil { return nil, status.Error(codes.Unavailable, "step recorder unavailable") } @@ -284,7 +411,7 @@ func (s *server) StartStep(ctx context.Context, r *pb.StartStepRequest) (*pb.Sta } // RecordUsage appends one model call's usage record. -func (s *server) RecordUsage(ctx context.Context, r *pb.RecordUsageRequest) (*pb.RecordUsageResponse, error) { +func (s *executionServer) RecordUsage(ctx context.Context, r *pb.RecordUsageRequest) (*pb.RecordUsageResponse, error) { if s.deps.Usage == nil { return nil, status.Error(codes.Unavailable, "usage recorder unavailable") } @@ -302,7 +429,7 @@ func (s *server) RecordUsage(ctx context.Context, r *pb.RecordUsageRequest) (*pb } // TaskModels answers what the task's org resolves models against. -func (s *server) TaskModels(ctx context.Context, r *pb.TaskModelsRequest) (*pb.TaskModelsResponse, error) { +func (s *taskServer) TaskModels(ctx context.Context, r *pb.TaskModelsRequest) (*pb.TaskModelsResponse, error) { if s.deps.OrgModels == nil { return nil, status.Error(codes.Unavailable, "model aliases unavailable") } @@ -327,7 +454,7 @@ func (s *server) TaskModels(ctx context.Context, r *pb.TaskModelsRequest) (*pb.T // TaskInstructions answers the instance and organisation instructions for the // task's org. -func (s *server) TaskInstructions(ctx context.Context, r *pb.TaskInstructionsRequest) (*pb.TaskInstructionsResponse, error) { +func (s *taskServer) TaskInstructions(ctx context.Context, r *pb.TaskInstructionsRequest) (*pb.TaskInstructionsResponse, error) { if s.deps.OrgInstructions == nil { return nil, status.Error(codes.Unavailable, "instructions unavailable") } @@ -346,7 +473,7 @@ func (s *server) TaskInstructions(ctx context.Context, r *pb.TaskInstructionsReq } // CallerModels answers the aliases the calling principal's org may use. -func (s *server) CallerModels(ctx context.Context, _ *pb.CallerModelsRequest) (*pb.CallerModelsResponse, error) { +func (s *orgServer) CallerModels(ctx context.Context, _ *pb.CallerModelsRequest) (*pb.CallerModelsResponse, error) { if s.deps.OrgModels == nil { return nil, status.Error(codes.Unavailable, "model aliases unavailable") } @@ -362,7 +489,7 @@ func (s *server) CallerModels(ctx context.Context, _ *pb.CallerModelsRequest) (* // the store records the cancellation and returns the callees it cancelled // with it; the caller delivers it by cancelling the runs' in-memory contexts // afterwards. -func (s *server) CancelExecution(ctx context.Context, r *pb.CancelExecutionRequest) (*pb.CancelExecutionResponse, error) { +func (s *executionServer) CancelExecution(ctx context.Context, r *pb.CancelExecutionRequest) (*pb.CancelExecutionResponse, error) { if s.deps.Canceller == nil { return nil, status.Error(codes.Unavailable, "execution canceller unavailable") } @@ -373,7 +500,7 @@ func (s *server) CancelExecution(ctx context.Context, r *pb.CancelExecutionReque return &pb.CancelExecutionResponse{CancelledCalleeIds: ids}, nil } -func (s *server) FinishStep(ctx context.Context, r *pb.FinishStepRequest) (*pb.FinishStepResponse, error) { +func (s *executionServer) FinishStep(ctx context.Context, r *pb.FinishStepRequest) (*pb.FinishStepResponse, error) { if s.deps.Steps == nil { return nil, status.Error(codes.Unavailable, "step recorder unavailable") } @@ -388,7 +515,7 @@ func (s *server) FinishStep(ctx context.Context, r *pb.FinishStepRequest) (*pb.F return &pb.FinishStepResponse{Event: eventProto(event)}, nil } -func (s *server) ListSteps(ctx context.Context, r *pb.ListStepsRequest) (*pb.ListStepsResponse, error) { +func (s *executionServer) ListSteps(ctx context.Context, r *pb.ListStepsRequest) (*pb.ListStepsResponse, error) { if s.deps.StepReader == nil { return nil, status.Error(codes.Unavailable, "step reader unavailable") } @@ -425,7 +552,7 @@ func (s *server) harnessOrg(ctx context.Context, credential string) (string, err return target, nil } -func (s *server) GetHarnessSecret(ctx context.Context, r *pb.GetHarnessSecretRequest) (*pb.GetHarnessSecretResponse, error) { +func (s *harnessSecretServer) GetHarnessSecret(ctx context.Context, r *pb.GetHarnessSecretRequest) (*pb.GetHarnessSecretResponse, error) { if s.deps.HarnessSecrets == nil { return nil, status.Error(codes.Unavailable, "harness secret store unavailable") } @@ -440,7 +567,7 @@ func (s *server) GetHarnessSecret(ctx context.Context, r *pb.GetHarnessSecretReq return &pb.GetHarnessSecretResponse{Secret: harnessSecretProto(secret), Org: orgID}, nil } -func (s *server) PutHarnessSecret(ctx context.Context, r *pb.PutHarnessSecretRequest) (*pb.PutHarnessSecretResponse, error) { +func (s *harnessSecretServer) PutHarnessSecret(ctx context.Context, r *pb.PutHarnessSecretRequest) (*pb.PutHarnessSecretResponse, error) { if s.deps.HarnessSecrets == nil { return nil, status.Error(codes.Unavailable, "harness secret store unavailable") } @@ -456,7 +583,7 @@ func (s *server) PutHarnessSecret(ctx context.Context, r *pb.PutHarnessSecretReq return &pb.PutHarnessSecretResponse{}, nil } -func (s *server) Update(ctx context.Context, r *pb.UpdateRequest) (*pb.UpdateResponse, error) { +func (s *taskServer) Update(ctx context.Context, r *pb.UpdateRequest) (*pb.UpdateResponse, error) { if r.Task == nil { return nil, status.Error(codes.InvalidArgument, "task is required") } @@ -466,21 +593,21 @@ func (s *server) Update(ctx context.Context, r *pb.UpdateRequest) (*pb.UpdateRes return &pb.UpdateResponse{}, nil } -func (s *server) Requeue(ctx context.Context, r *pb.RequeueRequest) (*pb.RequeueResponse, error) { +func (s *taskServer) Requeue(ctx context.Context, r *pb.RequeueRequest) (*pb.RequeueResponse, error) { if err := s.deps.Tasks.Requeue(ctx, r.TaskId, r.FromStatus, r.Workflow); err != nil { return nil, s.logErr("Requeue", err) } return &pb.RequeueResponse{}, nil } -func (s *server) ParkTask(ctx context.Context, r *pb.ParkTaskRequest) (*pb.ParkTaskResponse, error) { +func (s *taskServer) ParkTask(ctx context.Context, r *pb.ParkTaskRequest) (*pb.ParkTaskResponse, error) { if err := s.deps.Tasks.ParkTask(ctx, r.TaskId, r.From, r.Detail, r.Class, r.Blocker); err != nil { return nil, s.logErr("ParkTask", err) } return &pb.ParkTaskResponse{}, nil } -func (s *server) RecoverStale(ctx context.Context, _ *pb.RecoverStaleRequest) (*pb.RecoverStaleResponse, error) { +func (s *taskServer) RecoverStale(ctx context.Context, _ *pb.RecoverStaleRequest) (*pb.RecoverStaleResponse, error) { n, err := s.deps.Tasks.RecoverStale(ctx) if err != nil { return nil, s.logErr("RecoverStale", err) @@ -490,7 +617,7 @@ func (s *server) RecoverStale(ctx context.Context, _ *pb.RecoverStaleRequest) (* // Archive / Retry -func (s *server) ArchiveTask(ctx context.Context, r *pb.ArchiveTaskRequest) (*pb.ArchiveTaskResponse, error) { +func (s *taskServer) ArchiveTask(ctx context.Context, r *pb.ArchiveTaskRequest) (*pb.ArchiveTaskResponse, error) { eventID, err := s.deps.Tasks.ArchiveTask(ctx, r.TaskId, r.FromStatus, eventValue(r.Audit)) if err != nil { return nil, s.logErr("ArchiveTask", err) @@ -498,35 +625,35 @@ func (s *server) ArchiveTask(ctx context.Context, r *pb.ArchiveTaskRequest) (*pb return &pb.ArchiveTaskResponse{EventId: eventID}, nil } -func (s *server) RetryTask(ctx context.Context, r *pb.RetryTaskRequest) (*pb.RetryTaskResponse, error) { +func (s *taskServer) RetryTask(ctx context.Context, r *pb.RetryTaskRequest) (*pb.RetryTaskResponse, error) { if err := s.deps.Tasks.RetryTask(ctx, r.TaskId, r.FromStatus, r.Workflow, r.RetryMode, task.Resume{From: r.ResumeFrom, After: r.ResumeAfter}, r.CurrentDefinition); err != nil { return nil, s.logErr("RetryTask", err) } return &pb.RetryTaskResponse{}, nil } -func (s *server) RespondReviewGate(ctx context.Context, r *pb.RespondReviewGateRequest) (*pb.RespondReviewGateResponse, error) { +func (s *reviewServer) RespondReviewGate(ctx context.Context, r *pb.RespondReviewGateRequest) (*pb.RespondReviewGateResponse, error) { if err := s.deps.Tasks.RespondReviewGate(ctx, r.TaskId, r.FromStatus, r.Gate, r.Rereview, int(r.Cap)); err != nil { return nil, s.logErr("RespondReviewGate", err) } return &pb.RespondReviewGateResponse{}, nil } -func (s *server) BeginRemediation(ctx context.Context, r *pb.BeginRemediationRequest) (*pb.BeginRemediationResponse, error) { +func (s *reviewServer) BeginRemediation(ctx context.Context, r *pb.BeginRemediationRequest) (*pb.BeginRemediationResponse, error) { if err := s.deps.Tasks.BeginRemediation(ctx, r.TaskId, r.Payload); err != nil { return nil, s.logErr("BeginRemediation", err) } return &pb.BeginRemediationResponse{}, nil } -func (s *server) UpdateReviewPayload(ctx context.Context, r *pb.UpdateReviewPayloadRequest) (*pb.UpdateReviewPayloadResponse, error) { +func (s *reviewServer) UpdateReviewPayload(ctx context.Context, r *pb.UpdateReviewPayloadRequest) (*pb.UpdateReviewPayloadResponse, error) { if err := s.deps.Tasks.UpdateReviewPayload(ctx, r.TaskId, r.Payload); err != nil { return nil, s.logErr("UpdateReviewPayload", err) } return &pb.UpdateReviewPayloadResponse{}, nil } -func (s *server) SetReviewCursors(ctx context.Context, r *pb.SetReviewCursorsRequest) (*pb.SetReviewCursorsResponse, error) { +func (s *reviewServer) SetReviewCursors(ctx context.Context, r *pb.SetReviewCursorsRequest) (*pb.SetReviewCursorsResponse, error) { if err := s.deps.Tasks.SetReviewCursors(ctx, r.TaskId, r.ReviewCursor, r.CommentCursor); err != nil { return nil, s.logErr("SetReviewCursors", err) } @@ -535,7 +662,7 @@ func (s *server) SetReviewCursors(ctx context.Context, r *pb.SetReviewCursorsReq // Queries -func (s *server) TaskByIssue(ctx context.Context, r *pb.TaskByIssueRequest) (*pb.TaskByIssueResponse, error) { +func (s *taskServer) TaskByIssue(ctx context.Context, r *pb.TaskByIssueRequest) (*pb.TaskByIssueResponse, error) { t, err := s.deps.Tasks.TaskByIssue(ctx, r.Owner, r.Repo, int(r.Number)) if err != nil { return nil, s.logErr("TaskByIssue", err) @@ -543,7 +670,7 @@ func (s *server) TaskByIssue(ctx context.Context, r *pb.TaskByIssueRequest) (*pb return &pb.TaskByIssueResponse{Task: taskProto(t), Found: t != nil}, nil } -func (s *server) OpenTaskByPR(ctx context.Context, r *pb.OpenTaskByPRRequest) (*pb.OpenTaskByPRResponse, error) { +func (s *taskServer) OpenTaskByPR(ctx context.Context, r *pb.OpenTaskByPRRequest) (*pb.OpenTaskByPRResponse, error) { t, err := s.deps.Tasks.OpenTaskByPR(ctx, r.Owner, r.Repo, int(r.Number)) if err != nil { return nil, s.logErr("OpenTaskByPR", err) @@ -551,7 +678,7 @@ func (s *server) OpenTaskByPR(ctx context.Context, r *pb.OpenTaskByPRRequest) (* return &pb.OpenTaskByPRResponse{Task: taskProto(t), Found: t != nil}, nil } -func (s *server) TaskByID(ctx context.Context, r *pb.TaskByIDRequest) (*pb.TaskByIDResponse, error) { +func (s *taskServer) TaskByID(ctx context.Context, r *pb.TaskByIDRequest) (*pb.TaskByIDResponse, error) { t, err := s.deps.Tasks.TaskByID(ctx, r.TaskId) if err != nil { return nil, s.logErr("TaskByID", err) @@ -559,7 +686,7 @@ func (s *server) TaskByID(ctx context.Context, r *pb.TaskByIDRequest) (*pb.TaskB return &pb.TaskByIDResponse{Task: taskProto(t), Found: t != nil}, nil } -func (s *server) OpenPRs(ctx context.Context, _ *pb.OpenPRsRequest) (*pb.OpenPRsResponse, error) { +func (s *taskServer) OpenPRs(ctx context.Context, _ *pb.OpenPRsRequest) (*pb.OpenPRsResponse, error) { tasks, err := s.deps.Tasks.OpenPRs(ctx) if err != nil { return nil, s.logErr("OpenPRs", err) @@ -571,7 +698,7 @@ func (s *server) OpenPRs(ctx context.Context, _ *pb.OpenPRsRequest) (*pb.OpenPRs return &pb.OpenPRsResponse{Tasks: out}, nil } -func (s *server) ClearTerminalTasks(ctx context.Context, _ *pb.ClearTerminalTasksRequest) (*pb.ClearTerminalTasksResponse, error) { +func (s *taskServer) ClearTerminalTasks(ctx context.Context, _ *pb.ClearTerminalTasksRequest) (*pb.ClearTerminalTasksResponse, error) { n, err := s.deps.Tasks.ClearTerminalTasks(ctx) if err != nil { return nil, s.logErr("ClearTerminalTasks", err) @@ -579,7 +706,7 @@ func (s *server) ClearTerminalTasks(ctx context.Context, _ *pb.ClearTerminalTask return &pb.ClearTerminalTasksResponse{Count: n}, nil } -func (s *server) Tasks(ctx context.Context, r *pb.TasksRequest) (*pb.TasksResponse, error) { +func (s *taskServer) Tasks(ctx context.Context, r *pb.TasksRequest) (*pb.TasksResponse, error) { tasks, err := s.deps.Tasks.TasksPage(ctx, storecontract.TaskPage{ Statuses: r.Statuses, Workflow: r.Workflow, Limit: int(r.Limit), After: storecontract.TaskCursor{UpdatedAt: timeValue(r.AfterUpdatedAt), ID: r.AfterId}, @@ -594,7 +721,7 @@ func (s *server) Tasks(ctx context.Context, r *pb.TasksRequest) (*pb.TasksRespon return &pb.TasksResponse{Tasks: out}, nil } -func (s *server) StatusCounts(ctx context.Context, _ *pb.StatusCountsRequest) (*pb.StatusCountsResponse, error) { +func (s *statsServer) StatusCounts(ctx context.Context, _ *pb.StatusCountsRequest) (*pb.StatusCountsResponse, error) { counts, err := s.deps.Tasks.StatusCounts(ctx) if err != nil { return nil, s.logErr("StatusCounts", err) @@ -608,7 +735,7 @@ func (s *server) StatusCounts(ctx context.Context, _ *pb.StatusCountsRequest) (* // Events -func (s *server) InsertEvent(ctx context.Context, r *pb.InsertEventRequest) (*pb.InsertEventResponse, error) { +func (s *taskEventServer) InsertEvent(ctx context.Context, r *pb.InsertEventRequest) (*pb.InsertEventResponse, error) { id, err := s.deps.Tasks.InsertEvent(ctx, eventValue(r.Event)) if err != nil { return nil, s.logErr("InsertEvent", err) @@ -616,7 +743,7 @@ func (s *server) InsertEvent(ctx context.Context, r *pb.InsertEventRequest) (*pb return &pb.InsertEventResponse{Id: id}, nil } -func (s *server) EventsSince(ctx context.Context, r *pb.EventsSinceRequest) (*pb.EventsSinceResponse, error) { +func (s *taskEventServer) EventsSince(ctx context.Context, r *pb.EventsSinceRequest) (*pb.EventsSinceResponse, error) { evs, err := s.deps.Tasks.EventsSince(ctx, r.SinceId, int(r.Limit)) if err != nil { return nil, s.logErr("EventsSince", err) @@ -624,7 +751,7 @@ func (s *server) EventsSince(ctx context.Context, r *pb.EventsSinceRequest) (*pb return &pb.EventsSinceResponse{Events: mapValues(evs, eventProto)}, nil } -func (s *server) TaskEvents(ctx context.Context, r *pb.TaskEventsRequest) (*pb.TaskEventsResponse, error) { +func (s *taskEventServer) TaskEvents(ctx context.Context, r *pb.TaskEventsRequest) (*pb.TaskEventsResponse, error) { evs, err := s.deps.Tasks.TaskEvents(ctx, r.TaskId) if err != nil { return nil, s.logErr("TaskEvents", err) @@ -632,7 +759,7 @@ func (s *server) TaskEvents(ctx context.Context, r *pb.TaskEventsRequest) (*pb.T return &pb.TaskEventsResponse{Events: mapValues(evs, eventProto)}, nil } -func (s *server) WorkflowStats(ctx context.Context, _ *pb.WorkflowStatsRequest) (*pb.WorkflowStatsResponse, error) { +func (s *statsServer) WorkflowStats(ctx context.Context, _ *pb.WorkflowStatsRequest) (*pb.WorkflowStatsResponse, error) { stats, err := s.deps.Tasks.WorkflowStats(ctx) if err != nil { return nil, s.logErr("WorkflowStats", err) @@ -640,7 +767,7 @@ func (s *server) WorkflowStats(ctx context.Context, _ *pb.WorkflowStatsRequest) return &pb.WorkflowStatsResponse{Stats: mapValues(stats, workflowStatProto)}, nil } -func (s *server) StageStats(ctx context.Context, _ *pb.StageStatsRequest) (*pb.StageStatsResponse, error) { +func (s *statsServer) StageStats(ctx context.Context, _ *pb.StageStatsRequest) (*pb.StageStatsResponse, error) { stats, err := s.deps.Tasks.StageStats(ctx) if err != nil { return nil, s.logErr("StageStats", err) @@ -648,7 +775,7 @@ func (s *server) StageStats(ctx context.Context, _ *pb.StageStatsRequest) (*pb.S return &pb.StageStatsResponse{Stats: mapValues(stats, stageStatProto)}, nil } -func (s *server) TokensByDay(ctx context.Context, r *pb.TokensByDayRequest) (*pb.TokensByDayResponse, error) { +func (s *statsServer) TokensByDay(ctx context.Context, r *pb.TokensByDayRequest) (*pb.TokensByDayResponse, error) { tokens, err := s.deps.Tasks.TokensByDay(ctx, int(r.Days)) if err != nil { return nil, s.logErr("TokensByDay", err) @@ -672,7 +799,7 @@ func (s *server) applyStatus() (storecontract.ApplyStatusStore, error) { return s.deps.ApplyStatus, nil } -func (s *server) PutApplyStatus(ctx context.Context, r *pb.PutApplyStatusRequest) (*pb.PutApplyStatusResponse, error) { +func (s *statusServer) PutApplyStatus(ctx context.Context, r *pb.PutApplyStatusRequest) (*pb.PutApplyStatusResponse, error) { as, err := s.applyStatus() if err != nil { return nil, err @@ -683,7 +810,7 @@ func (s *server) PutApplyStatus(ctx context.Context, r *pb.PutApplyStatusRequest return &pb.PutApplyStatusResponse{}, nil } -func (s *server) ListApplyStatus(ctx context.Context, _ *pb.ListApplyStatusRequest) (*pb.ListApplyStatusResponse, error) { +func (s *statusServer) ListApplyStatus(ctx context.Context, _ *pb.ListApplyStatusRequest) (*pb.ListApplyStatusResponse, error) { as, err := s.applyStatus() if err != nil { return nil, err @@ -706,7 +833,7 @@ func (s *server) configSnapshots() (storecontract.ConfigSnapshotStore, error) { return s.deps.ConfigSnapshots, nil } -func (s *server) PutConfigSnapshot(ctx context.Context, r *pb.PutConfigSnapshotRequest) (*pb.PutConfigSnapshotResponse, error) { +func (s *statusServer) PutConfigSnapshot(ctx context.Context, r *pb.PutConfigSnapshotRequest) (*pb.PutConfigSnapshotResponse, error) { cs, err := s.configSnapshots() if err != nil { return nil, err @@ -717,7 +844,7 @@ func (s *server) PutConfigSnapshot(ctx context.Context, r *pb.PutConfigSnapshotR return &pb.PutConfigSnapshotResponse{}, nil } -func (s *server) GetConfigSnapshot(ctx context.Context, _ *pb.GetConfigSnapshotRequest) (*pb.GetConfigSnapshotResponse, error) { +func (s *statusServer) GetConfigSnapshot(ctx context.Context, _ *pb.GetConfigSnapshotRequest) (*pb.GetConfigSnapshotResponse, error) { cs, err := s.configSnapshots() if err != nil { return nil, err @@ -739,7 +866,7 @@ func (s *server) presence() (storecontract.PresenceStore, error) { return s.deps.Presence, nil } -func (s *server) PutPresence(ctx context.Context, r *pb.PutPresenceRequest) (*pb.PutPresenceResponse, error) { +func (s *statusServer) PutPresence(ctx context.Context, r *pb.PutPresenceRequest) (*pb.PutPresenceResponse, error) { ps, err := s.presence() if err != nil { return nil, err @@ -758,7 +885,7 @@ func (s *server) PutPresence(ctx context.Context, r *pb.PutPresenceRequest) (*pb return &pb.PutPresenceResponse{}, nil } -func (s *server) ListPresence(ctx context.Context, _ *pb.ListPresenceRequest) (*pb.ListPresenceResponse, error) { +func (s *statusServer) ListPresence(ctx context.Context, _ *pb.ListPresenceRequest) (*pb.ListPresenceResponse, error) { ps, err := s.presence() if err != nil { return nil, err @@ -774,7 +901,7 @@ func (s *server) ListPresence(ctx context.Context, _ *pb.ListPresenceRequest) (* return &pb.ListPresenceResponse{Presences: out}, nil } -func (s *server) RecordCaptureRefusal(ctx context.Context, r *pb.RecordCaptureRefusalRequest) (*pb.RecordCaptureRefusalResponse, error) { +func (s *captureServer) RecordCaptureRefusal(ctx context.Context, r *pb.RecordCaptureRefusalRequest) (*pb.RecordCaptureRefusalResponse, error) { if s.deps.Refusals == nil { return nil, errRefusalsUnavailable } @@ -784,7 +911,7 @@ func (s *server) RecordCaptureRefusal(ctx context.Context, r *pb.RecordCaptureRe return &pb.RecordCaptureRefusalResponse{}, nil } -func (s *server) ListCaptureRefusals(ctx context.Context, r *pb.ListCaptureRefusalsRequest) (*pb.ListCaptureRefusalsResponse, error) { +func (s *captureServer) ListCaptureRefusals(ctx context.Context, r *pb.ListCaptureRefusalsRequest) (*pb.ListCaptureRefusalsResponse, error) { if s.deps.Refusals == nil { return nil, errRefusalsUnavailable } @@ -806,7 +933,7 @@ func (s *server) channelStatuses() (storecontract.ChannelStatusStore, error) { return s.deps.ChannelStatus, nil } -func (s *server) PutChannelStatus(ctx context.Context, r *pb.PutChannelStatusRequest) (*pb.PutChannelStatusResponse, error) { +func (s *statusServer) PutChannelStatus(ctx context.Context, r *pb.PutChannelStatusRequest) (*pb.PutChannelStatusResponse, error) { cs, err := s.channelStatuses() if err != nil { return nil, err @@ -817,7 +944,7 @@ func (s *server) PutChannelStatus(ctx context.Context, r *pb.PutChannelStatusReq return &pb.PutChannelStatusResponse{}, nil } -func (s *server) ListChannelStatus(ctx context.Context, _ *pb.ListChannelStatusRequest) (*pb.ListChannelStatusResponse, error) { +func (s *statusServer) ListChannelStatus(ctx context.Context, _ *pb.ListChannelStatusRequest) (*pb.ListChannelStatusResponse, error) { cs, err := s.channelStatuses() if err != nil { return nil, err @@ -829,7 +956,7 @@ func (s *server) ListChannelStatus(ctx context.Context, _ *pb.ListChannelStatusR return &pb.ListChannelStatusResponse{Channels: channelStatusesProto(channels)}, nil } -func (s *server) InsertCapture(ctx context.Context, r *pb.InsertCaptureRequest) (*pb.InsertCaptureResponse, error) { +func (s *captureServer) InsertCapture(ctx context.Context, r *pb.InsertCaptureRequest) (*pb.InsertCaptureResponse, error) { cs, err := s.capture() if err != nil { return nil, err @@ -843,7 +970,7 @@ func (s *server) InsertCapture(ctx context.Context, r *pb.InsertCaptureRequest) // StreamCaptures streams one capture per message: a batch of large capture // bodies in one unary response can exceed gRPC's 4MiB message cap -func (s *server) StreamCaptures(r *pb.StreamCapturesRequest, stream pb.StateStoreService_StreamCapturesServer) error { +func (s *captureServer) StreamCaptures(r *pb.StreamCapturesRequest, stream pb.CaptureService_StreamCapturesServer) error { cs, err := s.capture() if err != nil { return err @@ -869,7 +996,7 @@ func (s *server) mapping() (storecontract.MappingStore, error) { return s.deps.Mappings, nil } -func (s *server) InsertMapping(ctx context.Context, r *pb.InsertMappingRequest) (*pb.InsertMappingResponse, error) { +func (s *mappingServer) InsertMapping(ctx context.Context, r *pb.InsertMappingRequest) (*pb.InsertMappingResponse, error) { ms, err := s.mapping() if err != nil { return nil, err @@ -885,7 +1012,7 @@ func (s *server) InsertMapping(ctx context.Context, r *pb.InsertMappingRequest) return &pb.InsertMappingResponse{Id: id}, nil } -func (s *server) GetMapping(ctx context.Context, r *pb.GetMappingRequest) (*pb.GetMappingResponse, error) { +func (s *mappingServer) GetMapping(ctx context.Context, r *pb.GetMappingRequest) (*pb.GetMappingResponse, error) { ms, err := s.mapping() if err != nil { return nil, err @@ -897,7 +1024,7 @@ func (s *server) GetMapping(ctx context.Context, r *pb.GetMappingRequest) (*pb.G return &pb.GetMappingResponse{Mapping: mappingProtoPtr(m), Found: m != nil}, nil } -func (s *server) ListMappings(ctx context.Context, _ *pb.ListMappingsRequest) (*pb.ListMappingsResponse, error) { +func (s *mappingServer) ListMappings(ctx context.Context, _ *pb.ListMappingsRequest) (*pb.ListMappingsResponse, error) { ms, err := s.mapping() if err != nil { return nil, err @@ -909,7 +1036,7 @@ func (s *server) ListMappings(ctx context.Context, _ *pb.ListMappingsRequest) (* return &pb.ListMappingsResponse{Mappings: mapValues(mappings, mappingProto)}, nil } -func (s *server) UpdateMapping(ctx context.Context, r *pb.UpdateMappingRequest) (*pb.UpdateMappingResponse, error) { +func (s *mappingServer) UpdateMapping(ctx context.Context, r *pb.UpdateMappingRequest) (*pb.UpdateMappingResponse, error) { ms, err := s.mapping() if err != nil { return nil, err @@ -924,7 +1051,7 @@ func (s *server) UpdateMapping(ctx context.Context, r *pb.UpdateMappingRequest) return &pb.UpdateMappingResponse{}, nil } -func (s *server) DeleteMapping(ctx context.Context, r *pb.DeleteMappingRequest) (*pb.DeleteMappingResponse, error) { +func (s *mappingServer) DeleteMapping(ctx context.Context, r *pb.DeleteMappingRequest) (*pb.DeleteMappingResponse, error) { ms, err := s.mapping() if err != nil { return nil, err @@ -935,7 +1062,7 @@ func (s *server) DeleteMapping(ctx context.Context, r *pb.DeleteMappingRequest) return &pb.DeleteMappingResponse{}, nil } -func (s *server) RecordMappingMatch(ctx context.Context, r *pb.RecordMappingMatchRequest) (*pb.RecordMappingMatchResponse, error) { +func (s *mappingServer) RecordMappingMatch(ctx context.Context, r *pb.RecordMappingMatchRequest) (*pb.RecordMappingMatchResponse, error) { if s.deps.MappingMatches == nil { return nil, status.Error(codes.Unavailable, "mapping match recorder unavailable") } @@ -954,7 +1081,7 @@ func (s *server) binding() (storecontract.BindingStore, error) { return s.deps.Bindings, nil } -func (s *server) InsertBinding(ctx context.Context, r *pb.InsertBindingRequest) (*pb.InsertBindingResponse, error) { +func (s *bindingServer) InsertBinding(ctx context.Context, r *pb.InsertBindingRequest) (*pb.InsertBindingResponse, error) { bs, err := s.binding() if err != nil { return nil, err @@ -970,7 +1097,7 @@ func (s *server) InsertBinding(ctx context.Context, r *pb.InsertBindingRequest) return &pb.InsertBindingResponse{Id: id}, nil } -func (s *server) GetBinding(ctx context.Context, r *pb.GetBindingRequest) (*pb.GetBindingResponse, error) { +func (s *bindingServer) GetBinding(ctx context.Context, r *pb.GetBindingRequest) (*pb.GetBindingResponse, error) { bs, err := s.binding() if err != nil { return nil, err @@ -982,7 +1109,7 @@ func (s *server) GetBinding(ctx context.Context, r *pb.GetBindingRequest) (*pb.G return &pb.GetBindingResponse{Binding: bindingProtoPtr(b), Found: b != nil}, nil } -func (s *server) ListBindings(ctx context.Context, _ *pb.ListBindingsRequest) (*pb.ListBindingsResponse, error) { +func (s *bindingServer) ListBindings(ctx context.Context, _ *pb.ListBindingsRequest) (*pb.ListBindingsResponse, error) { bs, err := s.binding() if err != nil { return nil, err @@ -994,7 +1121,7 @@ func (s *server) ListBindings(ctx context.Context, _ *pb.ListBindingsRequest) (* return &pb.ListBindingsResponse{Bindings: mapValues(bindings, bindingProto)}, nil } -func (s *server) UpdateBinding(ctx context.Context, r *pb.UpdateBindingRequest) (*pb.UpdateBindingResponse, error) { +func (s *bindingServer) UpdateBinding(ctx context.Context, r *pb.UpdateBindingRequest) (*pb.UpdateBindingResponse, error) { bs, err := s.binding() if err != nil { return nil, err @@ -1009,7 +1136,7 @@ func (s *server) UpdateBinding(ctx context.Context, r *pb.UpdateBindingRequest) return &pb.UpdateBindingResponse{}, nil } -func (s *server) DeleteBinding(ctx context.Context, r *pb.DeleteBindingRequest) (*pb.DeleteBindingResponse, error) { +func (s *bindingServer) DeleteBinding(ctx context.Context, r *pb.DeleteBindingRequest) (*pb.DeleteBindingResponse, error) { bs, err := s.binding() if err != nil { return nil, err @@ -1020,7 +1147,7 @@ func (s *server) DeleteBinding(ctx context.Context, r *pb.DeleteBindingRequest) return &pb.DeleteBindingResponse{}, nil } -func (s *server) PauseBinding(ctx context.Context, r *pb.PauseBindingRequest) (*pb.PauseBindingResponse, error) { +func (s *bindingServer) PauseBinding(ctx context.Context, r *pb.PauseBindingRequest) (*pb.PauseBindingResponse, error) { bs, err := s.binding() if err != nil { return nil, err @@ -1031,7 +1158,7 @@ func (s *server) PauseBinding(ctx context.Context, r *pb.PauseBindingRequest) (* return &pb.PauseBindingResponse{}, nil } -func (s *server) ResumeBinding(ctx context.Context, r *pb.ResumeBindingRequest) (*pb.ResumeBindingResponse, error) { +func (s *bindingServer) ResumeBinding(ctx context.Context, r *pb.ResumeBindingRequest) (*pb.ResumeBindingResponse, error) { bs, err := s.binding() if err != nil { return nil, err @@ -1042,7 +1169,7 @@ func (s *server) ResumeBinding(ctx context.Context, r *pb.ResumeBindingRequest) return &pb.ResumeBindingResponse{}, nil } -func (s *server) ApproveBinding(ctx context.Context, r *pb.ApproveBindingRequest) (*pb.ApproveBindingResponse, error) { +func (s *bindingServer) ApproveBinding(ctx context.Context, r *pb.ApproveBindingRequest) (*pb.ApproveBindingResponse, error) { bs, err := s.binding() if err != nil { return nil, err @@ -1062,7 +1189,7 @@ func (s *server) sources() (storecontract.SourceStore, error) { return s.deps.Sources, nil } -func (s *server) InsertSource(ctx context.Context, r *pb.InsertSourceRequest) (*pb.InsertSourceResponse, error) { +func (s *sourceServer) InsertSource(ctx context.Context, r *pb.InsertSourceRequest) (*pb.InsertSourceResponse, error) { ss, err := s.sources() if err != nil { return nil, err @@ -1073,7 +1200,7 @@ func (s *server) InsertSource(ctx context.Context, r *pb.InsertSourceRequest) (* return &pb.InsertSourceResponse{}, nil } -func (s *server) GetSource(ctx context.Context, r *pb.GetSourceRequest) (*pb.GetSourceResponse, error) { +func (s *sourceServer) GetSource(ctx context.Context, r *pb.GetSourceRequest) (*pb.GetSourceResponse, error) { ss, err := s.sources() if err != nil { return nil, err @@ -1088,7 +1215,7 @@ func (s *server) GetSource(ctx context.Context, r *pb.GetSourceRequest) (*pb.Get return &pb.GetSourceResponse{Source: sourceProto(*src), Found: true}, nil } -func (s *server) ListSources(ctx context.Context, _ *pb.ListSourcesRequest) (*pb.ListSourcesResponse, error) { +func (s *sourceServer) ListSources(ctx context.Context, _ *pb.ListSourcesRequest) (*pb.ListSourcesResponse, error) { ss, err := s.sources() if err != nil { return nil, err @@ -1100,7 +1227,7 @@ func (s *server) ListSources(ctx context.Context, _ *pb.ListSourcesRequest) (*pb return &pb.ListSourcesResponse{Sources: mapValues(list, sourceProto)}, nil } -func (s *server) SetSourceSigning(ctx context.Context, r *pb.SetSourceSigningRequest) (*pb.SetSourceSigningResponse, error) { +func (s *sourceServer) SetSourceSigning(ctx context.Context, r *pb.SetSourceSigningRequest) (*pb.SetSourceSigningResponse, error) { ss, err := s.sources() if err != nil { return nil, err @@ -1111,7 +1238,7 @@ func (s *server) SetSourceSigning(ctx context.Context, r *pb.SetSourceSigningReq return &pb.SetSourceSigningResponse{}, nil } -func (s *server) SetSourceSecret(ctx context.Context, r *pb.SetSourceSecretRequest) (*pb.SetSourceSecretResponse, error) { +func (s *sourceServer) SetSourceSecret(ctx context.Context, r *pb.SetSourceSecretRequest) (*pb.SetSourceSecretResponse, error) { ss, err := s.sources() if err != nil { return nil, err @@ -1122,7 +1249,7 @@ func (s *server) SetSourceSecret(ctx context.Context, r *pb.SetSourceSecretReque return &pb.SetSourceSecretResponse{}, nil } -func (s *server) SetSourceName(ctx context.Context, r *pb.SetSourceNameRequest) (*pb.SetSourceNameResponse, error) { +func (s *sourceServer) SetSourceName(ctx context.Context, r *pb.SetSourceNameRequest) (*pb.SetSourceNameResponse, error) { ss, err := s.sources() if err != nil { return nil, err @@ -1133,7 +1260,7 @@ func (s *server) SetSourceName(ctx context.Context, r *pb.SetSourceNameRequest) return &pb.SetSourceNameResponse{}, nil } -func (s *server) SetSourceDeliveryHeader(ctx context.Context, r *pb.SetSourceDeliveryHeaderRequest) (*pb.SetSourceDeliveryHeaderResponse, error) { +func (s *sourceServer) SetSourceDeliveryHeader(ctx context.Context, r *pb.SetSourceDeliveryHeaderRequest) (*pb.SetSourceDeliveryHeaderResponse, error) { ss, err := s.sources() if err != nil { return nil, err @@ -1144,7 +1271,7 @@ func (s *server) SetSourceDeliveryHeader(ctx context.Context, r *pb.SetSourceDel return &pb.SetSourceDeliveryHeaderResponse{}, nil } -func (s *server) DeleteSource(ctx context.Context, r *pb.DeleteSourceRequest) (*pb.DeleteSourceResponse, error) { +func (s *sourceServer) DeleteSource(ctx context.Context, r *pb.DeleteSourceRequest) (*pb.DeleteSourceResponse, error) { ss, err := s.sources() if err != nil { return nil, err @@ -1157,7 +1284,7 @@ func (s *server) DeleteSource(ctx context.Context, r *pb.DeleteSourceRequest) (* // Dispatch -func (s *server) ArmedBindingsForSource(ctx context.Context, r *pb.ArmedBindingsForSourceRequest) (*pb.ArmedBindingsForSourceResponse, error) { +func (s *bindingServer) ArmedBindingsForSource(ctx context.Context, r *pb.ArmedBindingsForSourceRequest) (*pb.ArmedBindingsForSourceResponse, error) { if s.deps.BindingDispatcher == nil { return nil, errBindingDispatchUnavailable } @@ -1168,7 +1295,7 @@ func (s *server) ArmedBindingsForSource(ctx context.Context, r *pb.ArmedBindings return &pb.ArmedBindingsForSourceResponse{Bindings: mapValues(bindings, bindingProto)}, nil } -func (s *server) RecordDispatch(ctx context.Context, r *pb.RecordDispatchRequest) (*pb.RecordDispatchResponse, error) { +func (s *dispatchServer) RecordDispatch(ctx context.Context, r *pb.RecordDispatchRequest) (*pb.RecordDispatchResponse, error) { if s.deps.BindingDispatcher == nil { return nil, errBindingDispatchUnavailable } @@ -1178,7 +1305,7 @@ func (s *server) RecordDispatch(ctx context.Context, r *pb.RecordDispatchRequest return &pb.RecordDispatchResponse{}, nil } -func (s *server) ListDispatches(ctx context.Context, r *pb.ListDispatchesRequest) (*pb.ListDispatchesResponse, error) { +func (s *dispatchServer) ListDispatches(ctx context.Context, r *pb.ListDispatchesRequest) (*pb.ListDispatchesResponse, error) { bs, err := s.binding() if err != nil { return nil, err @@ -1203,7 +1330,7 @@ func (s *server) ListDispatches(ctx context.Context, r *pb.ListDispatchesRequest // Playbook dispatch -func (s *server) RecordPlaybookDispatch(ctx context.Context, r *pb.RecordPlaybookDispatchRequest) (*pb.RecordPlaybookDispatchResponse, error) { +func (s *dispatchServer) RecordPlaybookDispatch(ctx context.Context, r *pb.RecordPlaybookDispatchRequest) (*pb.RecordPlaybookDispatchResponse, error) { if s.deps.PlaybookDispatcher == nil { return nil, errPlaybookDispatcherUnavailable } @@ -1213,7 +1340,7 @@ func (s *server) RecordPlaybookDispatch(ctx context.Context, r *pb.RecordPlayboo return &pb.RecordPlaybookDispatchResponse{}, nil } -func (s *server) DeletePlaybookDispatches(ctx context.Context, r *pb.DeletePlaybookDispatchesRequest) (*pb.DeletePlaybookDispatchesResponse, error) { +func (s *dispatchServer) DeletePlaybookDispatches(ctx context.Context, r *pb.DeletePlaybookDispatchesRequest) (*pb.DeletePlaybookDispatchesResponse, error) { if s.deps.PlaybookDispatcher == nil { return nil, errPlaybookDispatcherUnavailable } @@ -1224,7 +1351,7 @@ func (s *server) DeletePlaybookDispatches(ctx context.Context, r *pb.DeletePlayb } // StreamUndispatchedCaptures streams for the same reason as StreamCaptures. -func (s *server) StreamUndispatchedCaptures(r *pb.StreamUndispatchedCapturesRequest, stream pb.StateStoreService_StreamUndispatchedCapturesServer) error { +func (s *captureServer) StreamUndispatchedCaptures(r *pb.StreamUndispatchedCapturesRequest, stream pb.CaptureService_StreamUndispatchedCapturesServer) error { if s.deps.BindingDispatcher == nil { return errBindingDispatchUnavailable } @@ -1242,7 +1369,7 @@ func (s *server) StreamUndispatchedCaptures(r *pb.StreamUndispatchedCapturesRequ // BindingTaskCreator -func (s *server) EnqueueBindingTask(ctx context.Context, r *pb.EnqueueBindingTaskRequest) (*pb.EnqueueBindingTaskResponse, error) { +func (s *dispatchServer) EnqueueBindingTask(ctx context.Context, r *pb.EnqueueBindingTaskRequest) (*pb.EnqueueBindingTaskResponse, error) { if s.deps.BindingTaskCreator == nil { return nil, errBindingTaskCreatorUnavailable } @@ -1262,7 +1389,7 @@ func (s *server) EnqueueBindingTask(ctx context.Context, r *pb.EnqueueBindingTas // caller; the store's own row checks are what make both calls answer only // for this caller's own callees. -func (s *server) EnqueueCallTask(ctx context.Context, r *pb.EnqueueCallTaskRequest) (*pb.EnqueueCallTaskResponse, error) { +func (s *taskServer) EnqueueCallTask(ctx context.Context, r *pb.EnqueueCallTaskRequest) (*pb.EnqueueCallTaskResponse, error) { if s.deps.WorkflowCalls == nil { return nil, errWorkflowCallerUnavailable } @@ -1285,7 +1412,7 @@ func (s *server) EnqueueCallTask(ctx context.Context, r *pb.EnqueueCallTaskReque return &pb.EnqueueCallTaskResponse{Task: taskProto(t), Accepted: true}, nil } -func (s *server) WorkflowCallStatus(ctx context.Context, r *pb.WorkflowCallStatusRequest) (*pb.WorkflowCallStatusResponse, error) { +func (s *taskServer) WorkflowCallStatus(ctx context.Context, r *pb.WorkflowCallStatusRequest) (*pb.WorkflowCallStatusResponse, error) { if s.deps.WorkflowCalls == nil { return nil, errWorkflowCallerUnavailable } @@ -1305,7 +1432,7 @@ func (s *server) taskLogs() (storecontract.TaskLogStore, error) { return s.deps.TaskLogs, nil } -func (s *server) ReadTaskLog(ctx context.Context, r *pb.ReadTaskLogRequest) (*pb.ReadTaskLogResponse, error) { +func (s *taskLogServer) ReadTaskLog(ctx context.Context, r *pb.ReadTaskLogRequest) (*pb.ReadTaskLogResponse, error) { logs, err := s.taskLogs() if err != nil { return nil, err @@ -1338,7 +1465,7 @@ func (s *server) ReadTaskLog(ctx context.Context, r *pb.ReadTaskLogRequest) (*pb // StreamTaskLogContent sends one attempt's log verbatim, one chunk per // message, for a download. A single reply reports found=false with no chunks: // the attempt has no log file, which is a normal state rather than a failure. -func (s *server) StreamTaskLogContent(r *pb.StreamTaskLogContentRequest, stream pb.StateStoreService_StreamTaskLogContentServer) error { +func (s *taskLogServer) StreamTaskLogContent(r *pb.StreamTaskLogContentRequest, stream pb.TaskLogService_StreamTaskLogContentServer) error { logs, err := s.taskLogs() if err != nil { return err @@ -1370,7 +1497,7 @@ func (s *server) StreamTaskLogContent(r *pb.StreamTaskLogContentRequest, stream // file into this writer: the reader keeps its own chunk size, and the bytes // are never all held at once. type chunkWriter struct { - stream pb.StateStoreService_StreamTaskLogContentServer + stream pb.TaskLogService_StreamTaskLogContentServer attempt int64 pending []byte // sent records whether any chunk reached the client, which is how the diff --git a/internal/infrastructure/staterpc/service_logs_test.go b/internal/infrastructure/staterpc/service_logs_test.go index 42f92f8ff..54617d226 100644 --- a/internal/infrastructure/staterpc/service_logs_test.go +++ b/internal/infrastructure/staterpc/service_logs_test.go @@ -33,7 +33,7 @@ func TestServiceLogsRequireService(t *testing.T) { } { t.Run(tt.name, func(t *testing.T) { ctx := peer.NewContext(metadata.NewIncomingContext(t.Context(), metadata.Pairs(tokenMetadataKey, tt.token)), tt.peer) - _, err := grants.UnaryInterceptor()(ctx, &pb.RecentLogsRequest{}, &grpc.UnaryServerInfo{FullMethod: pb.StateStoreService_RecentLogs_FullMethodName}, func(context.Context, any) (any, error) { return &pb.RecentLogsResponse{}, nil }) + _, err := grants.UnaryInterceptor()(ctx, &pb.RecentLogsRequest{}, &grpc.UnaryServerInfo{FullMethod: pb.StatusService_RecentLogs_FullMethodName}, func(context.Context, any) (any, error) { return &pb.RecentLogsResponse{}, nil }) if status.Code(err) != tt.code { t.Fatalf("code %s want %s", status.Code(err), tt.code) } diff --git a/internal/infrastructure/staterpc/task_grants.go b/internal/infrastructure/staterpc/task_grants.go index e44252035..a5d2f3658 100644 --- a/internal/infrastructure/staterpc/task_grants.go +++ b/internal/infrastructure/staterpc/task_grants.go @@ -89,7 +89,7 @@ func authorizesTaskScopedCall(fullMethod string, req any, taskID int64) bool { // taskScopedTargets maps each RPC a task grant may call to the task ID its // request targets. var taskScopedTargets = map[string]func(any) int64{ - pb.StateStoreService_PutPresence_FullMethodName: func(req any) int64 { + pb.StatusService_PutPresence_FullMethodName: func(req any) int64 { r, ok := req.(*pb.PutPresenceRequest) if !ok || r.Presence == nil || r.Presence.Service != presence.Agent { return 0 @@ -100,56 +100,56 @@ var taskScopedTargets = map[string]func(any) int64{ } return id }, - pb.StateStoreService_Update_FullMethodName: func(req any) int64 { + pb.TaskService_Update_FullMethodName: func(req any) int64 { r, ok := req.(*pb.UpdateRequest) if !ok || r.Task == nil { return 0 } return r.Task.Id }, - pb.StateStoreService_Transition_FullMethodName: func(req any) int64 { + pb.TaskService_Transition_FullMethodName: func(req any) int64 { r, ok := req.(*pb.TransitionRequest) if !ok { return 0 } return r.TaskId }, - pb.StateStoreService_InsertEvent_FullMethodName: func(req any) int64 { + pb.TaskEventService_InsertEvent_FullMethodName: func(req any) int64 { r, ok := req.(*pb.InsertEventRequest) if !ok || r.Event == nil { return 0 } return r.Event.TaskId }, - pb.StateStoreService_StartStep_FullMethodName: func(req any) int64 { + pb.ExecutionService_StartStep_FullMethodName: func(req any) int64 { r, ok := req.(*pb.StartStepRequest) if !ok { return 0 } return r.ExecutionId }, - pb.StateStoreService_RecordUsage_FullMethodName: func(req any) int64 { + pb.ExecutionService_RecordUsage_FullMethodName: func(req any) int64 { r, ok := req.(*pb.RecordUsageRequest) if !ok || r.Record == nil { return 0 } return r.Record.TaskId }, - pb.StateStoreService_FinishStep_FullMethodName: func(req any) int64 { + pb.ExecutionService_FinishStep_FullMethodName: func(req any) int64 { r, ok := req.(*pb.FinishStepRequest) if !ok { return 0 } return r.ExecutionId }, - pb.StateStoreService_EnqueueCallTask_FullMethodName: func(req any) int64 { + pb.TaskService_EnqueueCallTask_FullMethodName: func(req any) int64 { r, ok := req.(*pb.EnqueueCallTaskRequest) if !ok { return 0 } return r.CallerTaskId }, - pb.StateStoreService_WorkflowCallStatus_FullMethodName: func(req any) int64 { + pb.TaskService_WorkflowCallStatus_FullMethodName: func(req any) int64 { r, ok := req.(*pb.WorkflowCallStatusRequest) if !ok { return 0 @@ -213,7 +213,7 @@ func (g *TaskGrants) StreamInterceptor() grpc.StreamServerInterceptor { } } -func (s *server) RegisterTaskGrant(ctx context.Context, r *pb.RegisterTaskGrantRequest) (*pb.RegisterTaskGrantResponse, error) { +func (s *taskGrantServer) RegisterTaskGrant(ctx context.Context, r *pb.RegisterTaskGrantRequest) (*pb.RegisterTaskGrantResponse, error) { if s.deps.Grants == nil { return nil, status.Error(codes.Unavailable, "task grants unavailable") } @@ -232,7 +232,7 @@ func (s *server) RegisterTaskGrant(ctx context.Context, r *pb.RegisterTaskGrantR return &pb.RegisterTaskGrantResponse{}, nil } -func (s *server) RevokeTaskGrant(ctx context.Context, r *pb.RevokeTaskGrantRequest) (*pb.RevokeTaskGrantResponse, error) { +func (s *taskGrantServer) RevokeTaskGrant(ctx context.Context, r *pb.RevokeTaskGrantRequest) (*pb.RevokeTaskGrantResponse, error) { if s.deps.Grants == nil { return nil, status.Error(codes.Unavailable, "task grants unavailable") } @@ -245,7 +245,7 @@ func (s *server) RevokeTaskGrant(ctx context.Context, r *pb.RevokeTaskGrantReque // ResolveTaskGrant answers which task a run credential belongs to, for the // services that verify one (archied's worktree push). Task grants cannot call // it: it is not in taskScopedTargets. -func (s *server) ResolveTaskGrant(ctx context.Context, r *pb.ResolveTaskGrantRequest) (*pb.ResolveTaskGrantResponse, error) { +func (s *taskGrantServer) ResolveTaskGrant(ctx context.Context, r *pb.ResolveTaskGrantRequest) (*pb.ResolveTaskGrantResponse, error) { if s.deps.Grants == nil { return nil, status.Error(codes.Unavailable, "task grants unavailable") } @@ -279,7 +279,7 @@ func (c *Client) RegisterTaskGrant(ctx context.Context, taskID int64, lifetime t return "", err } token := hex.EncodeToString(bytes[:]) - _, err := c.client.RegisterTaskGrant(ctx, &pb.RegisterTaskGrantRequest{TaskId: taskID, Token: token, LifetimeSeconds: int64(lifetime / time.Second)}) + _, err := c.taskGrant.RegisterTaskGrant(ctx, &pb.RegisterTaskGrantRequest{TaskId: taskID, Token: token, LifetimeSeconds: int64(lifetime / time.Second)}) if err != nil { return "", unmapError(err) } @@ -287,13 +287,13 @@ func (c *Client) RegisterTaskGrant(ctx context.Context, taskID int64, lifetime t } func (c *Client) RevokeTaskGrant(ctx context.Context, token string) error { - _, err := c.client.RevokeTaskGrant(ctx, &pb.RevokeTaskGrantRequest{Token: token}) + _, err := c.taskGrant.RevokeTaskGrant(ctx, &pb.RevokeTaskGrantRequest{Token: token}) return unmapError(err) } // ResolveTaskGrant returns the task a run credential was issued for. func (c *Client) ResolveTaskGrant(ctx context.Context, token string) (int64, error) { - r, err := c.client.ResolveTaskGrant(ctx, &pb.ResolveTaskGrantRequest{Token: token}) + r, err := c.taskGrant.ResolveTaskGrant(ctx, &pb.ResolveTaskGrantRequest{Token: token}) if status.Code(err) == codes.NotFound { return 0, storecontract.ErrRunCredentialUnknown } @@ -335,7 +335,7 @@ func (g *GrantIssuer) Issue(task *task.Task, limit time.Duration) (string, func( // TaskForCredential returns the task a run credential was issued for. func (c *Client) TaskForCredential(ctx context.Context, token string) (*task.Task, error) { - r, err := c.client.ResolveTaskGrant(ctx, &pb.ResolveTaskGrantRequest{Token: token}) + r, err := c.taskGrant.ResolveTaskGrant(ctx, &pb.ResolveTaskGrantRequest{Token: token}) if err != nil { return nil, unmapError(err) } @@ -412,7 +412,7 @@ func (s *server) executionPrincipal(ctx context.Context, t *task.Task) (identity // TaskPrincipalForCredential resolves the task and its canonical execution principal. func (c *Client) TaskPrincipalForCredential(ctx context.Context, token string) (*task.Task, identity.IdentityID, error) { - r, err := c.client.ResolveTaskGrant(ctx, &pb.ResolveTaskGrantRequest{Token: token}) + r, err := c.taskGrant.ResolveTaskGrant(ctx, &pb.ResolveTaskGrantRequest{Token: token}) if err != nil { return nil, "", unmapError(err) } diff --git a/internal/infrastructure/staterpc/task_pin_test.go b/internal/infrastructure/staterpc/task_pin_test.go index 3a809924f..3dba6279d 100644 --- a/internal/infrastructure/staterpc/task_pin_test.go +++ b/internal/infrastructure/staterpc/task_pin_test.go @@ -37,7 +37,7 @@ func TestTaskCredentialCannotReplaceItsPin(t *testing.T) { WorkflowDefinitionVersion: 4, WorkflowDefinitionDigest: "digest-b", WorkflowDefinitionYaml: "yaml-b", }} var got *pb.Task - _, err := intercept(ctx, req, &grpc.UnaryServerInfo{FullMethod: pb.StateStoreService_Update_FullMethodName}, + _, err := intercept(ctx, req, &grpc.UnaryServerInfo{FullMethod: pb.TaskService_Update_FullMethodName}, func(_ context.Context, r any) (any, error) { update, ok := r.(*pb.UpdateRequest) if !ok { diff --git a/internal/infrastructure/staterpc/usage_grant_test.go b/internal/infrastructure/staterpc/usage_grant_test.go index a399b60e0..f7d40d4a2 100644 --- a/internal/infrastructure/staterpc/usage_grant_test.go +++ b/internal/infrastructure/staterpc/usage_grant_test.go @@ -21,7 +21,7 @@ func TestRecordUsageAuthority(t *testing.T) { } { t.Run(tt.name, func(t *testing.T) { req := &pb.RecordUsageRequest{Record: tt.record} - if got := authorizesTaskScopedCall(pb.StateStoreService_RecordUsage_FullMethodName, req, 7); got != tt.allowed { + if got := authorizesTaskScopedCall(pb.ExecutionService_RecordUsage_FullMethodName, req, 7); got != tt.allowed { t.Fatalf("authorized = %v, want %v", got, tt.allowed) } }) diff --git a/internal/infrastructure/staterpc/usage_org_test.go b/internal/infrastructure/staterpc/usage_org_test.go index 1d235d9b2..b26ff1b21 100644 --- a/internal/infrastructure/staterpc/usage_org_test.go +++ b/internal/infrastructure/staterpc/usage_org_test.go @@ -24,7 +24,7 @@ func TestRecordUsageBillsTheCallersOrg(t *testing.T) { } { t.Run(tt.name, func(t *testing.T) { capture := &usageCapture{} - s := &server{deps: Deps{Usage: capture}} + s := &executionServer{server: &server{deps: Deps{Usage: capture}}} ctx := context.Background() if tt.caller != "" { ctx = org.WithOrg(ctx, org.OrgID(tt.caller)) diff --git a/internal/infrastructure/staterpc/worker_presence_test.go b/internal/infrastructure/staterpc/worker_presence_test.go index 5108ef86f..ebcd43423 100644 --- a/internal/infrastructure/staterpc/worker_presence_test.go +++ b/internal/infrastructure/staterpc/worker_presence_test.go @@ -20,7 +20,7 @@ func TestWorkerPresenceAuthority(t *testing.T) { } { t.Run(tt.name, func(t *testing.T) { req := &pb.PutPresenceRequest{Presence: &pb.Presence{Service: tt.service, InstanceId: tt.instance}} - if got := authorizesTaskScopedCall(pb.StateStoreService_PutPresence_FullMethodName, req, 7); got != tt.allowed { + if got := authorizesTaskScopedCall(pb.StatusService_PutPresence_FullMethodName, req, 7); got != tt.allowed { t.Fatalf("authorized = %v, want %v", got, tt.allowed) } }) diff --git a/proto/buf.yaml b/proto/buf.yaml index 684fac70e..1e4fe0553 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -6,7 +6,12 @@ lint: - STANDARD breaking: use: - - FILE + - PACKAGE + # StateStoreService split into one service per domain in state.v1; its RPCs + # and messages kept their names and numbers. A package-level deletion + # cannot be path-ignored. + except: + - PACKAGE_SERVICE_NO_DELETE # Two intentional wire breaks, both widening an id-shaped field from int64 to # string in place, on the same field numbers and names. The PocketBase # migration moved the event-capture contract's record ids to PocketBase's @@ -36,14 +41,14 @@ breaking: # clients ship from this repository. ignore_only: FIELD_SAME_TYPE: - - state/v1/state.proto + - state/v1 RPC_NO_DELETE: - - state/v1/state.proto + - state/v1 - gateway/v1/chat.proto MESSAGE_NO_DELETE: - - state/v1/state.proto + - state/v1 - gateway/v1/chat.proto FIELD_NO_DELETE: - - state/v1/state.proto + - state/v1 - controlplane/v1/controlplane.proto - gateway/v1/chat.proto diff --git a/proto/state/v1/access.proto b/proto/state/v1/access.proto new file mode 100644 index 000000000..72eee4944 --- /dev/null +++ b/proto/state/v1/access.proto @@ -0,0 +1,91 @@ +syntax = "proto3"; + +package state.v1; + +import "google/protobuf/timestamp.proto"; + +// The stored policy chain and its denial records +// (docs/prds/orgs-and-access.md). ListPolicies is the engine's snapshot; +// the writes are administrative. RecordDenial is the dashboard's and +// dispatch's write path; ListDenials is the operator surface. +service AccessService { + // The principal assembly the Authorizer evaluates: an identity, the org + // it serves, and its memberships (internal/domain/access). + rpc GetPrincipal(GetPrincipalRequest) returns (GetPrincipalResponse); + rpc ListPolicies(ListPoliciesRequest) returns (ListPoliciesResponse); + // GetPoliciesVersion is the instance-wide policy version an authorizer reads + // before each decision to know whether the chain it holds is current. A + // caller must read it before ListPolicies, never after. + rpc GetPoliciesVersion(GetPoliciesVersionRequest) returns (GetPoliciesVersionResponse); + rpc PutPolicy(PutPolicyRequest) returns (PutPolicyResponse); + rpc DeletePolicy(DeletePolicyRequest) returns (DeletePolicyResponse); + rpc EnsureShippedOrgPolicies(EnsureShippedOrgPoliciesRequest) returns (EnsureShippedOrgPoliciesResponse); + rpc RecordDenial(RecordDenialRequest) returns (RecordDenialResponse); + rpc ListDenials(ListDenialsRequest) returns (ListDenialsResponse); +} + +message GetPrincipalRequest { string identity_id = 1; } +// PrincipalMembership mirrors org.Membership: an identity's role in an org, +// or in one workspace of it. +message PrincipalMembership { + string org_id = 1; + string workspace_id = 2; + string role = 3; +} +// PrincipalWorkspace is one workspace of the principal's org, as policies +// read it. +message PrincipalWorkspace { + string workspace_id = 1; + string environment = 2; +} +message AccessPrincipal { + string identity_id = 1; + string org_id = 2; + repeated PrincipalMembership memberships = 3; + // workspaces are the workspaces of org_id. + repeated PrincipalWorkspace workspaces = 4; +} +message GetPrincipalResponse { AccessPrincipal principal = 1; } +// AccessPolicy mirrors internal/domain/access.Policy: one Cedar policy +// document and the level-scope tuple that places it in the chain. +message AccessPolicy { + string policy_id = 1; + string level = 2; + string org_id = 3; + string workspace_id = 4; + string object_kind = 5; + string object_id = 6; + string text = 7; +} +message ListPoliciesRequest {} +message ListPoliciesResponse { repeated AccessPolicy policies = 1; } +message GetPoliciesVersionRequest {} +message GetPoliciesVersionResponse { int64 version = 1; } +message PutPolicyRequest { AccessPolicy policy = 1; } +message PutPolicyResponse { int64 version = 1; } +message DeletePolicyRequest { AccessPolicy policy = 1; } +message DeletePolicyResponse {} +message EnsureShippedOrgPoliciesRequest { string org_id = 1; } +message EnsureShippedOrgPoliciesResponse {} +// AccessDenial mirrors internal/domain/access.Denial: one refusal with the +// level that decided it and the deciding policies. The store coalesces +// identical denials within a minute into one row with a count. +message AccessDenial { + string org_id = 1; + string principal = 2; + string action = 3; + string resource_kind = 4; + string resource_id = 5; + string level = 6; + repeated string policies = 7; + int64 count = 8; + google.protobuf.Timestamp at = 9; +} +message RecordDenialRequest { AccessDenial denial = 1; } +message RecordDenialResponse {} +message ListDenialsRequest { + reserved 1; + reserved "org_id"; + int32 limit = 2; +} +message ListDenialsResponse { repeated AccessDenial denials = 1; } diff --git a/proto/state/v1/account.proto b/proto/state/v1/account.proto new file mode 100644 index 000000000..89309d753 --- /dev/null +++ b/proto/state/v1/account.proto @@ -0,0 +1,95 @@ +syntax = "proto3"; + +package state.v1; + +import "google/protobuf/timestamp.proto"; +import "state/v1/types.proto"; + +service AccountService { + rpc GetAuthenticationSettings(GetAuthenticationSettingsRequest) returns (GetAuthenticationSettingsResponse); + rpc SaveAuthenticationSettings(SaveAuthenticationSettingsRequest) returns (SaveAuthenticationSettingsResponse); + rpc BeginPasskey(BeginPasskeyRequest) returns (BeginPasskeyResponse); + rpc FinishPasskey(FinishPasskeyRequest) returns (FinishPasskeyResponse); + rpc ListPasskeys(ListPasskeysRequest) returns (ListPasskeysResponse); + rpc DeletePasskey(DeletePasskeyRequest) returns (DeletePasskeyResponse); + rpc OpenAccountSession(OpenAccountSessionRequest) returns (OpenAccountSessionResponse); + rpc RequireFreshAccountSession(RequireFreshAccountSessionRequest) returns (RequireFreshAccountSessionResponse); + rpc CreateAccountRecovery(CreateAccountRecoveryRequest) returns (CreateAccountRecoveryResponse); + rpc RecoverAccount(RecoverAccountRequest) returns (RecoverAccountResponse); + rpc AccountSetup(AccountSetupRequest) returns (AccountSetupResponse); + rpc RegisterAccount(RegisterAccountRequest) returns (RegisterAccountResponse); + rpc SignInAccount(SignInAccountRequest) returns (SignInAccountResponse); + rpc ResolveAccountSession(ResolveAccountSessionRequest) returns (ResolveAccountSessionResponse); + rpc SignOutAccount(SignOutAccountRequest) returns (SignOutAccountResponse); + rpc ChangeAccountPassword(ChangeAccountPasswordRequest) returns (ChangeAccountPasswordResponse); + // Personal API tokens act on the caller's own principal: the State Store + // refuses a call that carries none. + rpc AddPersonalToken(AddPersonalTokenRequest) returns (AddPersonalTokenResponse); + rpc ListPersonalTokens(ListPersonalTokensRequest) returns (ListPersonalTokensResponse); + rpc RevokePersonalToken(RevokePersonalTokenRequest) returns (RevokePersonalTokenResponse); +} + +// PersonalToken identifies a token by the SHA-256 it binds as; the token +// itself never reaches the State Store. +message PersonalToken { + string id = 1; + google.protobuf.Timestamp created_at = 2; +} +message AddPersonalTokenRequest { string id = 1; } +message AddPersonalTokenResponse {} +message ListPersonalTokensRequest {} +message ListPersonalTokensResponse { repeated PersonalToken tokens = 1; } +message RevokePersonalTokenRequest { string id = 1; } +message RevokePersonalTokenResponse {} +message AccountSetupRequest {} +message AccountSetupResponse { bool required = 1; } +message RegisterAccountRequest { + string email = 1; + string display_name = 2; + string password = 3; + string role = 4; + bool bootstrap = 5; + string organisation_name = 6; + string workspace_name = 7; + string public_url = 8; +} +message RegisterAccountResponse { Identity identity = 1; } +message SignInAccountRequest { string email = 1; string password = 2; } +message SignInAccountResponse { + Identity identity = 1; + string token = 2; + google.protobuf.Timestamp expires_at = 3; +} +message ResolveAccountSessionRequest { string token = 1; } +message ResolveAccountSessionResponse { Identity identity = 1; } +message SignOutAccountRequest { string token = 1; } +message SignOutAccountResponse {} +message ChangeAccountPasswordRequest { string current_password = 1; string new_password = 2; } +message ChangeAccountPasswordResponse {} +message AuthenticationSettings { + string public_url = 1; + string oidc_issuer = 2; + string oidc_audience = 3; + string oidc_client_id = 4; +} +message GetAuthenticationSettingsRequest {} +message GetAuthenticationSettingsResponse { AuthenticationSettings settings = 1; } +message SaveAuthenticationSettingsRequest { AuthenticationSettings settings = 1; } +message SaveAuthenticationSettingsResponse {} +message BeginPasskeyRequest { bool registration = 1; } +message BeginPasskeyResponse { string token = 1; bytes options = 2; } +message FinishPasskeyRequest { string token = 1; bytes credential = 2; bool registration = 3; string name = 4; } +message FinishPasskeyResponse { Identity identity = 1; string token = 2; google.protobuf.Timestamp expires_at = 3; } +message Passkey { string id = 1; string name = 2; } +message ListPasskeysRequest {} +message ListPasskeysResponse { repeated Passkey passkeys = 1; } +message DeletePasskeyRequest { string id = 1; } +message DeletePasskeyResponse {} +message OpenAccountSessionRequest { google.protobuf.Timestamp expires_at = 1; } +message OpenAccountSessionResponse { Identity identity = 1; string token = 2; google.protobuf.Timestamp expires_at = 3; } +message RequireFreshAccountSessionRequest { string token = 1; } +message RequireFreshAccountSessionResponse {} +message CreateAccountRecoveryRequest {} +message CreateAccountRecoveryResponse { string code = 1; } +message RecoverAccountRequest { string email = 1; string code = 2; string password = 3; } +message RecoverAccountResponse {} diff --git a/proto/state/v1/alert.proto b/proto/state/v1/alert.proto new file mode 100644 index 000000000..b4267c0a7 --- /dev/null +++ b/proto/state/v1/alert.proto @@ -0,0 +1,103 @@ +syntax = "proto3"; + +package state.v1; + +import "google/protobuf/timestamp.proto"; + +// Operator alerts (internal/domain/alert). A caller acting for a principal +// reads, dismisses and raises only in that principal's org; a request org is +// ignored for it. A service acting for no one names the org itself. +// RaiseAlert and ResolveAlert are idempotent, so a periodic check can call +// them every tick. ClaimAlertDeliveries and RecordAlertAttempt serve the +// outbound webhook and refuse a caller scoped to an org. +service AlertService { + rpc RaiseAlert(RaiseAlertRequest) returns (RaiseAlertResponse); + rpc ResolveAlert(ResolveAlertRequest) returns (ResolveAlertResponse); + rpc DismissAlert(DismissAlertRequest) returns (DismissAlertResponse); + rpc ListAlerts(ListAlertsRequest) returns (ListAlertsResponse); + rpc ClaimAlertDeliveries(ClaimAlertDeliveriesRequest) returns (ClaimAlertDeliveriesResponse); + rpc RecordAlertAttempt(RecordAlertAttemptRequest) returns (RecordAlertAttemptResponse); +} + +// Alert mirrors internal/domain/alert.Alert. Severity is info, warning or +// action; state is open, resolved or dismissed. +message Alert { + int64 id = 1; + string org_id = 2; + string kind = 3; + string subject = 4; + string severity = 5; + string title = 6; + string body = 7; + string link = 8; + bool condition = 9; + string state = 10; + google.protobuf.Timestamp first_raised = 11; + google.protobuf.Timestamp last_seen = 12; + int64 count = 13; + string closed_by = 14; + google.protobuf.Timestamp closed_at = 15; + repeated AlertDelivery deliveries = 16; +} +// AlertDelivery is one outbound notice an alert owed. Event is raised or +// resolved; state is pending, delivered, failed or skipped. +message AlertDelivery { + int64 id = 1; + string event = 2; + string state = 3; + google.protobuf.Timestamp created_at = 4; + repeated AlertAttempt attempts = 5; +} +message AlertAttempt { + int64 n = 1; + google.protobuf.Timestamp at = 2; + int64 status_code = 3; + string error = 4; +} +message RaiseAlertRequest { + string org_id = 1; + string kind = 2; + string subject = 3; + string severity = 4; + string title = 5; + string body = 6; + string link = 7; + // condition is true when the raiser resolves the alert itself once the + // condition clears; an event alert stays until dismissed. + bool condition = 8; +} +message RaiseAlertResponse { Alert alert = 1; } +message ResolveAlertRequest { + string org_id = 1; + string kind = 2; + string subject = 3; +} +message ResolveAlertResponse {} +message DismissAlertRequest { + string org_id = 1; + int64 id = 2; +} +message DismissAlertResponse {} +message ListAlertsRequest { + string org_id = 1; + // states defaults to open. + repeated string states = 2; + int32 limit = 3; +} +message ListAlertsResponse { repeated Alert alerts = 1; } +message ClaimAlertDeliveriesRequest { int32 limit = 1; } +message DueAlertDelivery { + AlertDelivery delivery = 1; + Alert alert = 2; + // attempt is the number of this try, counting from one. + int64 attempt = 3; +} +message ClaimAlertDeliveriesResponse { repeated DueAlertDelivery due = 1; } +message RecordAlertAttemptRequest { + int64 delivery_id = 1; + bool skipped = 2; + int64 status_code = 3; + // error is empty on success. + string error = 4; +} +message RecordAlertAttemptResponse {} diff --git a/proto/state/v1/binding.proto b/proto/state/v1/binding.proto new file mode 100644 index 000000000..0e2b3019f --- /dev/null +++ b/proto/state/v1/binding.proto @@ -0,0 +1,69 @@ +syntax = "proto3"; + +package state.v1; + +import "google/protobuf/timestamp.proto"; + +service BindingService { + rpc InsertBinding(InsertBindingRequest) returns (InsertBindingResponse); + rpc GetBinding(GetBindingRequest) returns (GetBindingResponse); + rpc ListBindings(ListBindingsRequest) returns (ListBindingsResponse); + rpc UpdateBinding(UpdateBindingRequest) returns (UpdateBindingResponse); + rpc DeleteBinding(DeleteBindingRequest) returns (DeleteBindingResponse); + rpc ApproveBinding(ApproveBindingRequest) returns (ApproveBindingResponse); + rpc PauseBinding(PauseBindingRequest) returns (PauseBindingResponse); + rpc ResumeBinding(ResumeBindingRequest) returns (ResumeBindingResponse); + rpc ArmedBindingsForSource(ArmedBindingsForSourceRequest) returns (ArmedBindingsForSourceResponse); +} + +// BindingMatcher mirrors internal/domain/binding.Matcher. +message BindingMatcher { + string source = 1; +} +// Binding mirrors internal/domain/binding.Binding. +message Binding { + string id = 1; + string name = 2; + BindingMatcher matcher = 3; + string mapping_id = 4; + string workflow = 5; + string owner = 6; + string repo = 7; + int64 version = 8; + string status = 9; + reserved 10; + reserved "secret"; + google.protobuf.Timestamp created_at = 11; + google.protobuf.Timestamp updated_at = 12; + string filter = 13; + // inputs_json assigns workflow inputs, a JSON object of + // {"param": name} or {"value": constant} per input. + string inputs_json = 14; + // repo_param names the mapped parameter holding "owner/name". + string repo_param = 15; + // org_id is the org that owns the binding; it is read-only here. + string org_id = 16; + // workspace_id is its source's workspace; read-only here. + string workspace_id = 17; +} +message InsertBindingRequest { Binding binding = 1; } +message InsertBindingResponse { string id = 1; } +message GetBindingRequest { string id = 1; } +message GetBindingResponse { + Binding binding = 1; + bool found = 2; +} +message ListBindingsRequest {} +message ListBindingsResponse { repeated Binding bindings = 1; } +message UpdateBindingRequest { Binding binding = 1; } +message UpdateBindingResponse {} +message DeleteBindingRequest { string id = 1; } +message DeleteBindingResponse {} +message ApproveBindingRequest { string id = 1; } +message ApproveBindingResponse {} +message PauseBindingRequest { string id = 1; } +message PauseBindingResponse {} +message ResumeBindingRequest { string id = 1; } +message ResumeBindingResponse {} +message ArmedBindingsForSourceRequest { string source = 1; } +message ArmedBindingsForSourceResponse { repeated Binding bindings = 1; } diff --git a/proto/state/v1/capture.proto b/proto/state/v1/capture.proto new file mode 100644 index 000000000..d71a0ca2a --- /dev/null +++ b/proto/state/v1/capture.proto @@ -0,0 +1,72 @@ +syntax = "proto3"; + +package state.v1; + +import "google/protobuf/timestamp.proto"; + +service CaptureService { + // Capture refusals: events the network rules refused at the receiver, + // counted per source. Administrative. + rpc RecordCaptureRefusal(RecordCaptureRefusalRequest) returns (RecordCaptureRefusalResponse); + rpc ListCaptureRefusals(ListCaptureRefusalsRequest) returns (ListCaptureRefusalsResponse); + rpc InsertCapture(InsertCaptureRequest) returns (InsertCaptureResponse); + // StreamCaptures returns one capture per message: a batch of large capture + // bodies can exceed gRPC's 4MiB unary message cap + // (docs/prds/state-store-contract.md). + rpc StreamCaptures(StreamCapturesRequest) returns (stream StreamCapturesResponse); + rpc StreamUndispatchedCaptures(StreamUndispatchedCapturesRequest) returns (stream StreamUndispatchedCapturesResponse); +} + +// CapturedEvent mirrors storecontract.CapturedEvent. +message CapturedEvent { + string id = 1; + google.protobuf.Timestamp received_at = 2; + string source = 3; + string remote_addr = 4; + string content_type = 5; + string headers = 6; + string body = 7; + bool authenticated = 8; + // event_type is the ID of the event type the capture was identified as on + // arrival; empty is unidentified. + string event_type = 9; + // unsigned marks an event taken on an approved unsigned source. + bool unsigned = 10; + // delivery names the sender's delivery; a retry of one delivery shares it. + // Intake sets it from the source's delivery header; empty takes the + // capture ID. + string delivery = 11; +} +message RecordCaptureRefusalRequest { + string source = 1; + string addr = 2; + google.protobuf.Timestamp refused_at = 3; +} +message RecordCaptureRefusalResponse {} +message ListCaptureRefusalsRequest { google.protobuf.Timestamp since = 1; } +message CaptureRefusals { + string source = 1; + int64 refused = 2; + int64 accepted = 3; + repeated string addrs = 4; +} +message ListCaptureRefusalsResponse { repeated CaptureRefusals sources = 1; } +message InsertCaptureRequest { + CapturedEvent capture = 1; + int64 retention_seconds = 2; + int64 max_events = 3; +} +message InsertCaptureResponse { string id = 1; } +message StreamCapturesRequest { int64 limit = 1; } +// Streamed one capture per message; see StreamCaptures above. +message StreamCapturesResponse { CapturedEvent capture = 1; } +message StreamUndispatchedCapturesRequest { + reserved 1; + reserved "sources"; + // Bindings are the ids of the armed bindings, on enabled workflows, the + // captures are listed for. + repeated string bindings = 3; + int64 limit = 2; +} +// Streamed one capture per message; see StreamUndispatchedCaptures above. +message StreamUndispatchedCapturesResponse { CapturedEvent capture = 1; } diff --git a/proto/state/v1/dispatch.proto b/proto/state/v1/dispatch.proto new file mode 100644 index 000000000..d86400545 --- /dev/null +++ b/proto/state/v1/dispatch.proto @@ -0,0 +1,72 @@ +syntax = "proto3"; + +package state.v1; + +import "google/protobuf/timestamp.proto"; +import "state/v1/types.proto"; + +service DispatchService { + rpc ListDispatches(ListDispatchesRequest) returns (ListDispatchesResponse); + rpc RecordDispatch(RecordDispatchRequest) returns (RecordDispatchResponse); + // Playbook dispatch ledger (eda-playbook-engine.md gap 2): one durable + // at-most-once record per (playbook, version, event, action) for the + // side-effecting positions. Administrative, like RecordDispatch: a + // task-scoped grant cannot reach either (see TaskGrants). + rpc RecordPlaybookDispatch(RecordPlaybookDispatchRequest) returns (RecordPlaybookDispatchResponse); + rpc DeletePlaybookDispatches(DeletePlaybookDispatchesRequest) returns (DeletePlaybookDispatchesResponse); + // BindingTaskCreator: claims the binding's dispatch of a capture and + // enqueues its task in one transaction, so a failure leaves neither and a + // replayed delivery is refused with AlreadyExists. + rpc EnqueueBindingTask(EnqueueBindingTaskRequest) returns (EnqueueBindingTaskResponse); +} + +message RecordDispatchRequest { + string binding_id = 1; + int64 binding_version = 2; + string capture_id = 3; + // task_id addresses the tasks table. + int64 task_id = 4; + // reason is empty for a dispatch and names why an evaluated capture + // started no task. + string reason = 5; +} +message RecordDispatchResponse {} +// ListDispatchesRequest filters the binding dispatch ledger; empty fields +// match any row. +message ListDispatchesRequest { + string binding_id = 1; + string capture_id = 2; + int64 task_id = 3; + int32 limit = 4; +} +message Dispatch { + string binding_id = 1; + int64 binding_version = 2; + string capture_id = 3; + int64 task_id = 4; + string reason = 5; + google.protobuf.Timestamp dispatched_at = 6; +} +message ListDispatchesResponse { repeated Dispatch dispatches = 1; } +message RecordPlaybookDispatchRequest { + string playbook_id = 1; + string playbook_version = 2; + string event_id = 3; + string action_id = 4; +} +message RecordPlaybookDispatchResponse {} +message DeletePlaybookDispatchesRequest { string playbook_id = 1; } +message DeletePlaybookDispatchesResponse {} +message EnqueueBindingTaskRequest { + string owner = 1; + string repo = 2; + string title = 3; + string body = 4; + string workflow = 5; + string identity = 6; + string binding_id = 7; + int64 binding_version = 8; + string inputs_json = 9; + string capture_id = 10; +} +message EnqueueBindingTaskResponse { Task task = 1; } diff --git a/proto/state/v1/event_type.proto b/proto/state/v1/event_type.proto new file mode 100644 index 000000000..f54f23c09 --- /dev/null +++ b/proto/state/v1/event_type.proto @@ -0,0 +1,47 @@ +syntax = "proto3"; + +package state.v1; + +import "google/protobuf/timestamp.proto"; + +// Event types. Insert and Update refuse an overlapping or malformed type. +service EventTypeService { + rpc InsertEventType(InsertEventTypeRequest) returns (InsertEventTypeResponse); + rpc UpdateEventType(UpdateEventTypeRequest) returns (UpdateEventTypeResponse); + rpc DeleteEventType(DeleteEventTypeRequest) returns (DeleteEventTypeResponse); + rpc ListEventTypes(ListEventTypesRequest) returns (ListEventTypesResponse); +} + +// EventTypeHeaderCondition mirrors internal/domain/eventtype.HeaderCondition. +message EventTypeHeaderCondition { + string name = 1; + string value = 2; +} +// EventTypePayloadCondition mirrors internal/domain/eventtype.PayloadCondition. +message EventTypePayloadCondition { + string path = 1; + string op = 2; + string value = 3; +} +// EventType mirrors internal/domain/eventtype.EventType. header_conditions and +// payload_conditions are its rule; schema maps each payload path to its type. +message EventType { + string id = 1; + string source = 2; + string name = 3; + repeated EventTypeHeaderCondition header_conditions = 4; + repeated EventTypePayloadCondition payload_conditions = 5; + map schema = 6; + google.protobuf.Timestamp created_at = 7; + google.protobuf.Timestamp updated_at = 8; + // workspace_id is its source's workspace; read-only here. + string workspace_id = 9; +} +message InsertEventTypeRequest { EventType event_type = 1; } +message InsertEventTypeResponse { string id = 1; } +message UpdateEventTypeRequest { EventType event_type = 1; } +message UpdateEventTypeResponse {} +message DeleteEventTypeRequest { string id = 1; } +message DeleteEventTypeResponse {} +message ListEventTypesRequest {} +message ListEventTypesResponse { repeated EventType event_types = 1; } diff --git a/proto/state/v1/execution.proto b/proto/state/v1/execution.proto new file mode 100644 index 000000000..dbe5df6aa --- /dev/null +++ b/proto/state/v1/execution.proto @@ -0,0 +1,128 @@ +syntax = "proto3"; + +package state.v1; + +import "google/protobuf/timestamp.proto"; +import "state/v1/types.proto"; + +service ExecutionService { + // Step executions (docs/prds/execution-tree-state-machine.md). The run + // credential authorises both on its own execution only. + rpc StartStep(StartStepRequest) returns (StartStepResponse); + // RecordUsage appends one model call's usage record. A run credential may + // record usage only for its own task. + rpc RecordUsage(RecordUsageRequest) returns (RecordUsageResponse); + rpc FinishStep(FinishStepRequest) returns (FinishStepResponse); + // Cancellation. Deliberately administrative (deny-by-default for a + // task-scoped grant): a cancel is a dashboard, API and dispatch action + // decided by the Authorizer, not a worker call. + rpc CancelExecution(CancelExecutionRequest) returns (CancelExecutionResponse); + // ListSteps is a dashboard/API/dispatch action (Authorizer: read on the + // run), not task-scoped-grant callable like StartStep/FinishStep. + rpc ListSteps(ListStepsRequest) returns (ListStepsResponse); +} + +message StartStepRequest { + // execution_id is the WorkflowExecution (the tasks row) the step belongs + // to, and the task ID the run credential is scoped to. + int64 execution_id = 1; + int64 attempt = 2; + // parent_id is 0 when the step is a stage; otherwise it names the enclosing + // StepExecution, from which the store derives depth. + int64 parent_id = 3; + // kind is stage, agent or call. + string kind = 4; + string name = 5; + // called_execution_id names the WorkflowExecution a `call` step started; + // the store verifies it is this execution's own callee. + int64 called_execution_id = 6; +} +message StartStepResponse { + int64 step_id = 1; + // event is the transition's stage_start row, already persisted; the caller + // publishes it to its bus after the write commits (the daemon's event sink + // skips already-persisted rows by their assigned ID). + Event event = 2; +} +message FinishStepRequest { + // execution_id names the run the step belongs to. The grant check verifies + // it against the credential, and the store verifies the step really is that + // execution's, so a caller cannot move another run's step by naming it. + int64 execution_id = 1; + int64 step_id = 2; + string from = 3; + string to = 4; + string detail = 5; + int64 tokens_used = 6; + // results is the run's step results (JSON, by step id) after a stage the + // run moves past; empty otherwise. A resumed attempt starts from them. + bytes results = 7; +} +message FinishStepResponse { + // event is the transition's stage_finish row, already persisted. + Event event = 1; +} +message CancelExecutionRequest { + int64 task_id = 1; + // reason records why the run was stopped, in the execution's park reason + // when the cancel lands there, and on every step event it writes. + string reason = 2; + // to is the execution's destination: the transition table routes it, and + // the operator actions name parked or closed_wont_do. + string to = 3; +} +message CancelExecutionResponse { + reserved 1; + reserved "cancelled_step_ids"; + // cancelled_callee_ids are the executions the caller was waiting on that + // were cancelled with it, nested callees included; the caller stops their + // runs as well as its own. + repeated int64 cancelled_callee_ids = 2; +} +// StepExecution mirrors internal/domain/workflow/task.StepExecution. +message StepExecution { + int64 id = 1; + int64 execution_id = 2; + int64 attempt = 3; + // parent_id is 0 for a stage at the tree's root. + int64 parent_id = 4; + int32 depth = 5; + string kind = 6; + string name = 7; + string status = 8; + string detail = 9; + int64 tokens_used = 10; + google.protobuf.Timestamp started_at = 11; + google.protobuf.Timestamp finished_at = 12; + // called_execution_id is the callee task a workflow.call step started. + int64 called_execution_id = 13; +} +message ListStepsRequest { + int64 execution_id = 1; + // attempt selects one attempt's steps; 0 lists every attempt of the + // execution, oldest first -- the dashboard's run-detail rail renders every + // attempt from a single call rather than one per attempt. + int64 attempt = 2; +} +message ListStepsResponse { repeated StepExecution steps = 1; } +// UsageRecord mirrors usage.Record. A task's record belongs to the task's +// org; any other belongs to the calling principal's org. +message UsageRecord { + reserved 1; + reserved "org_id"; + // source is task, chat or curator. + string source = 2; + int64 task_id = 3; + int64 attempt = 4; + string workflow = 5; + string step = 6; + string alias = 7; + string provider = 8; + string model = 9; + int64 input_tokens = 10; + int64 output_tokens = 11; + int64 cached_tokens = 12; + google.protobuf.Timestamp at = 13; +} +message RecordUsageRequest { UsageRecord record = 1; } +message RecordUsageResponse {} diff --git a/proto/state/v1/harness_secret.proto b/proto/state/v1/harness_secret.proto new file mode 100644 index 000000000..440cfca44 --- /dev/null +++ b/proto/state/v1/harness_secret.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; + +package state.v1; + +import "google/protobuf/timestamp.proto"; + +// Harness OAuth secrets (docs/prds/external-agent-harness.md, +// Credentials). Administrative: the setup terminal (an `update` action on +// the secret, Authorizer-gated) and the egress proxy's token-endpoint +// interception (acting as the daemon, not a worker) are the only callers. +service HarnessSecretService { + rpc GetHarnessSecret(GetHarnessSecretRequest) returns (GetHarnessSecretResponse); + rpc PutHarnessSecret(PutHarnessSecretRequest) returns (PutHarnessSecretResponse); +} + +// HarnessSecret mirrors internal/domain/harnesssecret.Secret -- one org's +// captured OAuth token set for a credential binding's service +// (docs/prds/external-agent-harness.md, Credentials). +message HarnessSecret { + reserved 1; + reserved "org"; + string service = 2; + string access_token = 3; + string refresh_token = 4; + string token_type = 5; + google.protobuf.Timestamp expires_at = 6; + google.protobuf.Timestamp updated_at = 7; + repeated string scopes = 8; +} +message GetHarnessSecretRequest { + reserved 1; + reserved "org"; + string service = 2; + string run_credential = 3; +} +message GetHarnessSecretResponse { + HarnessSecret secret = 1; + string org = 2; +} +message PutHarnessSecretRequest { + HarnessSecret secret = 1; + string run_credential = 2; +} +message PutHarnessSecretResponse {} diff --git a/proto/state/v1/identity.proto b/proto/state/v1/identity.proto new file mode 100644 index 000000000..6315aface --- /dev/null +++ b/proto/state/v1/identity.proto @@ -0,0 +1,70 @@ +syntax = "proto3"; + +package state.v1; + +import "state/v1/types.proto"; + +// Task-scoped grants cannot call these administrative RPCs. +service IdentityService { + rpc ListIdentities(ListIdentitiesRequest) returns (ListIdentitiesResponse); + rpc GetIdentity(GetIdentityRequest) returns (GetIdentityResponse); + rpc CreateIdentity(CreateIdentityRequest) returns (CreateIdentityResponse); + rpc RenameIdentity(RenameIdentityRequest) returns (RenameIdentityResponse); + rpc SuspendIdentity(SuspendIdentityRequest) returns (SuspendIdentityResponse); + rpc ReactivateIdentity(ReactivateIdentityRequest) returns (ReactivateIdentityResponse); + rpc RetireIdentity(RetireIdentityRequest) returns (RetireIdentityResponse); + // Subject bindings. A verified provider subject is resolved to the identity it + // is bound to; the authenticating process calls these rather than owning the + // identity store. + rpc ResolveIdentitySubject(ResolveIdentitySubjectRequest) returns (ResolveIdentitySubjectResponse); + rpc BindIdentitySubject(BindIdentitySubjectRequest) returns (BindIdentitySubjectResponse); + rpc ClaimIdentitySubject(ClaimIdentitySubjectRequest) returns (ClaimIdentitySubjectResponse); +} + +message IdentityAudit { + string actor_id = 1; + string source = 2; + string request_id = 3; +} +message ListIdentitiesRequest {} +message ListIdentitiesResponse { repeated Identity identities = 1; } +message GetIdentityRequest { string id = 1; } +message GetIdentityResponse { Identity identity = 1; } +message CreateIdentityRequest { + string id = 1; + string kind = 2; + string display_name = 3; + IdentityAudit audit = 4; +} +message RenameIdentityRequest { + string id = 1; + int64 expected_version = 2; + string display_name = 3; + IdentityAudit audit = 4; +} +message SuspendIdentityRequest { string id = 1; int64 expected_version = 2; IdentityAudit audit = 3; } +message ReactivateIdentityRequest { string id = 1; int64 expected_version = 2; IdentityAudit audit = 3; } +message RetireIdentityRequest { string id = 1; int64 expected_version = 2; IdentityAudit audit = 3; } +message CreateIdentityResponse { Identity identity = 1; } +message RenameIdentityResponse { Identity identity = 1; } +message SuspendIdentityResponse { Identity identity = 1; } +message ReactivateIdentityResponse { Identity identity = 1; } +message RetireIdentityResponse { Identity identity = 1; } +message ResolveIdentitySubjectRequest { + string issuer = 1; + string subject = 2; +} +message ResolveIdentitySubjectResponse { Identity identity = 1; } +message BindIdentitySubjectRequest { + string id = 1; + string issuer = 2; + string subject = 3; + IdentityAudit audit = 4; +} +message BindIdentitySubjectResponse { Identity identity = 1; } +message ClaimIdentitySubjectRequest { + string issuer = 1; + string placeholder = 2; + string subject = 3; +} +message ClaimIdentitySubjectResponse { Identity identity = 1; } diff --git a/proto/state/v1/mapping.proto b/proto/state/v1/mapping.proto new file mode 100644 index 000000000..a4d5c7a33 --- /dev/null +++ b/proto/state/v1/mapping.proto @@ -0,0 +1,57 @@ +syntax = "proto3"; + +package state.v1; + +import "google/protobuf/timestamp.proto"; + +service MappingService { + rpc InsertMapping(InsertMappingRequest) returns (InsertMappingResponse); + rpc GetMapping(GetMappingRequest) returns (GetMappingResponse); + rpc ListMappings(ListMappingsRequest) returns (ListMappingsResponse); + rpc UpdateMapping(UpdateMappingRequest) returns (UpdateMappingResponse); + rpc DeleteMapping(DeleteMappingRequest) returns (DeleteMappingResponse); + // RecordMappingMatch counts one event a mapping resolved; the same + // (mapping, capture) twice counts once. + rpc RecordMappingMatch(RecordMappingMatchRequest) returns (RecordMappingMatchResponse); +} + +// MappingField mirrors internal/domain/mapping.Field. +message MappingField { + string name = 1; + string path = 2; + string type = 3; + bool required = 4; +} +// Mapping mirrors internal/domain/mapping.Mapping. +message Mapping { + string id = 1; + string name = 2; + string source_hint = 3; + repeated MappingField fields = 4; + google.protobuf.Timestamp created_at = 5; + google.protobuf.Timestamp updated_at = 6; + string event_type_id = 7; + // match_count and last_matched_at are read-only: the store counts them. + int64 match_count = 8; + google.protobuf.Timestamp last_matched_at = 9; + // workspace_id is its event type's workspace; read-only here. + string workspace_id = 10; +} +message InsertMappingRequest { Mapping mapping = 1; } +message InsertMappingResponse { string id = 1; } +message GetMappingRequest { string id = 1; } +message GetMappingResponse { + Mapping mapping = 1; + bool found = 2; +} +message ListMappingsRequest {} +message ListMappingsResponse { repeated Mapping mappings = 1; } +message UpdateMappingRequest { Mapping mapping = 1; } +message UpdateMappingResponse {} +message DeleteMappingRequest { string id = 1; } +message DeleteMappingResponse {} +message RecordMappingMatchRequest { + string mapping_id = 1; + string capture_id = 2; +} +message RecordMappingMatchResponse {} diff --git a/proto/state/v1/org.proto b/proto/state/v1/org.proto new file mode 100644 index 000000000..6b56df344 --- /dev/null +++ b/proto/state/v1/org.proto @@ -0,0 +1,98 @@ +syntax = "proto3"; + +package state.v1; + +service OrgService { + // CallerModels answers the model aliases the caller's org may use. The org + // is the calling principal's; a call with none is the system org's. + rpc CallerModels(CallerModelsRequest) returns (CallerModelsResponse); + // Orgs, workspaces, memberships and agent assignments + // (docs/prds/orgs-and-access.md). Every request names an org, but the + // State Store acts in the org the caller's principal carries: a request + // org that is not the caller's is ignored, so the contract cannot reach + // another tenant. Instance-admin widening is a later change. + rpc ListOrgs(ListOrgsRequest) returns (ListOrgsResponse); + rpc GetOrg(GetOrgRequest) returns (GetOrgResponse); + rpc CreateOrg(CreateOrgRequest) returns (CreateOrgResponse); + rpc ListWorkspaces(ListWorkspacesRequest) returns (ListWorkspacesResponse); + rpc CreateWorkspace(CreateWorkspaceRequest) returns (CreateWorkspaceResponse); + rpc ListMembers(ListMembersRequest) returns (ListMembersResponse); + rpc SetMembership(SetMembershipRequest) returns (SetMembershipResponse); + rpc RemoveMembership(RemoveMembershipRequest) returns (RemoveMembershipResponse); + rpc ListOrgAgents(ListOrgAgentsRequest) returns (ListOrgAgentsResponse); + rpc AssignAgent(AssignAgentRequest) returns (AssignAgentResponse); +} + +// Org mirrors internal/domain/org.Org: one tenant. +message Org { + string id = 1; + string name = 2; +} +// Workspace mirrors internal/domain/org.Workspace: a division of an org. +message Workspace { + string id = 1; + string org_id = 2; + string name = 3; + string environment = 4; +} +// Member mirrors internal/domain/org.Member: a membership with the identity +// it names, as the dashboard lists it. +message Member { + string identity_id = 1; + string kind = 2; + string display_name = 3; + string workspace_id = 4; + string role = 5; +} +message ListOrgsRequest {} +message ListOrgsResponse { repeated Org orgs = 1; } +message GetOrgRequest { string org_id = 1; } +message GetOrgResponse { Org org = 1; } +// CreateOrgRequest creates an org with its default workspace and its first +// owner. Only an instance admin may. +message CreateOrgRequest { + string id = 1; + string name = 2; + string owner_identity_id = 3; +} +message CreateOrgResponse { Org org = 1; } +message ListWorkspacesRequest { string org_id = 1; } +message ListWorkspacesResponse { repeated Workspace workspaces = 1; } +message CreateWorkspaceRequest { + string org_id = 1; + string id = 2; + string name = 3; + string environment = 4; +} +message CreateWorkspaceResponse { Workspace workspace = 1; } +message ListMembersRequest { string org_id = 1; } +message ListMembersResponse { repeated Member members = 1; } +message SetMembershipRequest { + string org_id = 1; + string identity_id = 2; + string workspace_id = 3; + string role = 4; +} +message SetMembershipResponse {} +message RemoveMembershipRequest { + string org_id = 1; + string identity_id = 2; + string workspace_id = 3; +} +message RemoveMembershipResponse {} +message AssignAgentRequest { + string org_id = 1; + string identity_id = 2; +} +message AssignAgentResponse {} +message CallerModelsRequest {} +message CallerModelsResponse { + string org_id = 1; + map aliases = 2; +} +message ListOrgAgentsRequest { string org_id = 1; } +message AgentAssignment { + string identity_id = 1; + string org_id = 2; +} +message ListOrgAgentsResponse { repeated AgentAssignment agents = 1; } diff --git a/proto/state/v1/package.proto b/proto/state/v1/package.proto new file mode 100644 index 000000000..1cd0d0ad5 --- /dev/null +++ b/proto/state/v1/package.proto @@ -0,0 +1,122 @@ +syntax = "proto3"; + +package state.v1; + +// Installed Archie packages. Administrative until org-scoped principals land. +service PackageService { + rpc InstallPackage(InstallPackageRequest) returns (InstallPackageResponse); + // ListCatalogue returns the packages the instance's verified catalogue + // offers; InstallFromCatalogue installs one by name at the digest it lists. + rpc ListCatalogue(ListCatalogueRequest) returns (ListCatalogueResponse); + rpc InstallFromCatalogue(InstallFromCatalogueRequest) returns (InstallFromCatalogueResponse); + rpc GetInstalledPackage(GetInstalledPackageRequest) returns (GetInstalledPackageResponse); + rpc ListInstalledPackages(ListInstalledPackagesRequest) returns (ListInstalledPackagesResponse); + // AcceptPackageAuthority records the operator's accepted authority against + // the pinned digest (the approve action; install is the create action). + // Administrative until org-scoped principals land. + rpc AcceptPackageAuthority(AcceptPackageAuthorityRequest) returns (AcceptPackageAuthorityResponse); + rpc RemoveInstalledPackage(RemoveInstalledPackageRequest) returns (RemoveInstalledPackageResponse); + // UpdatePackage moves a package to the digest the verified catalogue lists: + // a non-widening update applies, a widening one waits as pending. + // ApprovePackageUpdate applies the pending update and accepts its authority; + // RollbackPackage restores the previous digest and its accepted authority. + rpc UpdatePackage(UpdatePackageRequest) returns (UpdatePackageResponse); + rpc ApprovePackageUpdate(ApprovePackageUpdateRequest) returns (ApprovePackageUpdateResponse); + rpc RollbackPackage(RollbackPackageRequest) returns (RollbackPackageResponse); + // SetPackageUpdatePolicy sets "manual" or "auto"; the State Store updates + // auto packages on a timer. + rpc SetPackageUpdatePolicy(SetPackageUpdatePolicyRequest) returns (SetPackageUpdatePolicyResponse); +} + +message InstalledPackage { + string org_id = 1; + string name = 2; + string reference = 3; + string digest = 4; + bytes descriptor_json = 5; + bytes layer = 6; + string update_policy = 7; + // The operator's accepted authority, recorded against the pinned digest. + // Absent until the operator accepts (docs/prds/store.md, "Authority"). + PackageAuthority accepted_authority = 8; + // An update waiting for approval of widened authority; the live pin above + // is unchanged until then. + PackagePin pending = 9; + // The pin the last update or rollback replaced, with the authority accepted + // against it. + PackagePin previous = 10; + PackageAuthority previous_accepted_authority = 11; + // What the pending update declares. + PackageAuthority pending_authority = 12; +} +message PackagePin { + string reference = 1; + string digest = 2; +} +// PackageAuthority mirrors storepkg.Authority: the grants a package needs to +// operate. An acceptance record is an upper bound, checked field by field. +message PackageAuthority { + repeated string credential_services = 1; + repeated string egress_hosts = 2; + repeated string forge_permissions = 3; + repeated string triggers = 4; + repeated string tools = 5; + repeated string env = 6; +} +// Package and denial requests act in the org the State Store derives from the +// caller's principal, else the default org. +message InstallPackageRequest { + reserved 1; + reserved "org_id"; + string name = 2; + string reference = 3; + string digest = 4; +} +message InstallPackageResponse { InstalledPackage package = 1; } +message CatalogueEntry { + string name = 1; + string surface = 2; + string version = 3; + string description = 4; + string reference = 5; + string digest = 6; +} +message ListCatalogueRequest {} +message ListCatalogueResponse { repeated CatalogueEntry packages = 1; } +message InstallFromCatalogueRequest { string name = 1; } +message InstallFromCatalogueResponse { InstalledPackage package = 1; } +message GetInstalledPackageRequest { + reserved 1; + reserved "org_id"; + string name = 2; +} +message GetInstalledPackageResponse { InstalledPackage package = 1; } +message ListInstalledPackagesRequest { + reserved 1; + reserved "org_id"; +} +message ListInstalledPackagesResponse { repeated InstalledPackage packages = 1; } +message AcceptPackageAuthorityRequest { + reserved 1; + reserved "org_id"; + string name = 2; + PackageAuthority accepted = 3; +} +message AcceptPackageAuthorityResponse { InstalledPackage package = 1; } +message RemoveInstalledPackageRequest { + reserved 1; + reserved "org_id"; + string name = 2; +} +message RemoveInstalledPackageResponse {} +message UpdatePackageRequest { string name = 1; } +message UpdatePackageResponse { InstalledPackage package = 1; } +message ApprovePackageUpdateRequest { string name = 1; } +message ApprovePackageUpdateResponse { InstalledPackage package = 1; } +message RollbackPackageRequest { string name = 1; } +message RollbackPackageResponse { InstalledPackage package = 1; } +message SetPackageUpdatePolicyRequest { + string name = 1; + string policy = 2; +} +message SetPackageUpdatePolicyResponse { InstalledPackage package = 1; } diff --git a/proto/state/v1/review.proto b/proto/state/v1/review.proto new file mode 100644 index 000000000..5f279b294 --- /dev/null +++ b/proto/state/v1/review.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; + +package state.v1; + +service ReviewService { + // 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. + rpc RespondReviewGate(RespondReviewGateRequest) returns (RespondReviewGateResponse); + rpc BeginRemediation(BeginRemediationRequest) returns (BeginRemediationResponse); + rpc UpdateReviewPayload(UpdateReviewPayloadRequest) returns (UpdateReviewPayloadResponse); + rpc SetReviewCursors(SetReviewCursorsRequest) returns (SetReviewCursorsResponse); +} + +message RespondReviewGateRequest { + int64 task_id = 1; + string from_status = 2; + // gate is the whole review_gate document the caller computed: the offer + // with the answer filled in. The store persists it unread. + string gate = 3; + // rereview increments rereview_rounds in the same write; an approve must + // pass false and bumps nothing. + bool rereview = 4; + // cap is the domain's re-review bound (prreview.MaxRereviewRounds). It + // crosses so the guard is enforced where the row is locked rather than by + // the caller's stale read. + int64 cap = 5; +} +message RespondReviewGateResponse {} +message BeginRemediationRequest { + int64 task_id = 1; + string payload = 2; +} +message BeginRemediationResponse {} +// UpdateReviewPayloadRequest merges payload's comments into the unclaimed +// review unit with the same review id, active or pending. +message UpdateReviewPayloadRequest { + int64 task_id = 1; + string payload = 2; +} +message UpdateReviewPayloadResponse {} +message SetReviewCursorsRequest { + int64 task_id = 1; + int64 review_cursor = 2; + int64 comment_cursor = 3; +} +message SetReviewCursorsResponse {} diff --git a/proto/state/v1/source.proto b/proto/state/v1/source.proto new file mode 100644 index 000000000..2bba02ed6 --- /dev/null +++ b/proto/state/v1/source.proto @@ -0,0 +1,65 @@ +syntax = "proto3"; + +package state.v1; + +import "google/protobuf/timestamp.proto"; + +// Sources: the capture endpoint and its signing setting. Secrets travel in +// plaintext; the store encrypts at rest. +service SourceService { + rpc InsertSource(InsertSourceRequest) returns (InsertSourceResponse); + rpc GetSource(GetSourceRequest) returns (GetSourceResponse); + rpc ListSources(ListSourcesRequest) returns (ListSourcesResponse); + rpc SetSourceSigning(SetSourceSigningRequest) returns (SetSourceSigningResponse); + rpc SetSourceSecret(SetSourceSecretRequest) returns (SetSourceSecretResponse); + rpc SetSourceName(SetSourceNameRequest) returns (SetSourceNameResponse); + rpc SetSourceDeliveryHeader(SetSourceDeliveryHeaderRequest) returns (SetSourceDeliveryHeaderResponse); + rpc DeleteSource(DeleteSourceRequest) returns (DeleteSourceResponse); +} + +// Source mirrors internal/domain/source.Source. +message Source { + string path = 1; + string signing = 2; + string secret = 3; + google.protobuf.Timestamp created_at = 4; + google.protobuf.Timestamp updated_at = 5; + string name = 6; + string delivery_header = 7; + // org_id is the source's owning org, read-only here. workspace_id is the + // org's workspace it is created in, the default one when empty. + string org_id = 8; + string workspace_id = 9; +} +message SetSourceNameRequest { + string path = 1; + string name = 2; +} +message SetSourceNameResponse {} +message SetSourceDeliveryHeaderRequest { + string path = 1; + string header = 2; +} +message SetSourceDeliveryHeaderResponse {} +message DeleteSourceRequest { string path = 1; } +message DeleteSourceResponse {} +message InsertSourceRequest { Source source = 1; } +message InsertSourceResponse {} +message GetSourceRequest { string path = 1; } +message GetSourceResponse { + Source source = 1; + bool found = 2; +} +message ListSourcesRequest {} +message ListSourcesResponse { repeated Source sources = 1; } +message SetSourceSigningRequest { + string path = 1; + string from = 2; + string to = 3; +} +message SetSourceSigningResponse {} +message SetSourceSecretRequest { + string path = 1; + string secret = 2; +} +message SetSourceSecretResponse {} diff --git a/proto/state/v1/state.proto b/proto/state/v1/state.proto deleted file mode 100644 index d3a430aa4..000000000 --- a/proto/state/v1/state.proto +++ /dev/null @@ -1,1851 +0,0 @@ -syntax = "proto3"; - -package state.v1; - -import "logging/v1/logging.proto"; - -import "google/protobuf/timestamp.proto"; - -// StateStore is the single gRPC service fronting archie's PostgreSQL database. -// See docs/prds/state-store-contract.md for the ownership split: the -// workflow-domain Store view (Update/Transition/InsertEvent) is consumer-owned -// in internal/domain/workflow, while the rest of this surface is -// producer-owned in internal/domain/storecontract. Both are served by the same -// service over internal/infrastructure/postgres; the proto bypasses the Go -// interfacebloat cap (max 8), like gateway.v1.ChatService does. -service StateStoreService { - rpc RecentLogs(RecentLogsRequest) returns (RecentLogsResponse); - // Installed Archie packages. Administrative until org-scoped principals land. - rpc InstallPackage(InstallPackageRequest) returns (InstallPackageResponse); - // ListCatalogue returns the packages the instance's verified catalogue - // offers; InstallFromCatalogue installs one by name at the digest it lists. - rpc ListCatalogue(ListCatalogueRequest) returns (ListCatalogueResponse); - rpc InstallFromCatalogue(InstallFromCatalogueRequest) returns (InstallFromCatalogueResponse); - rpc GetInstalledPackage(GetInstalledPackageRequest) returns (GetInstalledPackageResponse); - rpc ListInstalledPackages(ListInstalledPackagesRequest) returns (ListInstalledPackagesResponse); - // AcceptPackageAuthority records the operator's accepted authority against - // the pinned digest (the approve action; install is the create action). - // Administrative until org-scoped principals land. - rpc AcceptPackageAuthority(AcceptPackageAuthorityRequest) returns (AcceptPackageAuthorityResponse); - rpc RemoveInstalledPackage(RemoveInstalledPackageRequest) returns (RemoveInstalledPackageResponse); - // UpdatePackage moves a package to the digest the verified catalogue lists: - // a non-widening update applies, a widening one waits as pending. - // ApprovePackageUpdate applies the pending update and accepts its authority; - // RollbackPackage restores the previous digest and its accepted authority. - rpc UpdatePackage(UpdatePackageRequest) returns (UpdatePackageResponse); - rpc ApprovePackageUpdate(ApprovePackageUpdateRequest) returns (ApprovePackageUpdateResponse); - rpc RollbackPackage(RollbackPackageRequest) returns (RollbackPackageResponse); - // SetPackageUpdatePolicy sets "manual" or "auto"; the State Store updates - // auto packages on a timer. - rpc SetPackageUpdatePolicy(SetPackageUpdatePolicyRequest) returns (SetPackageUpdatePolicyResponse); - // Administrative task credential lifecycle. Worker credentials cannot call these. - rpc RegisterTaskGrant(RegisterTaskGrantRequest) returns (RegisterTaskGrantResponse); - rpc RevokeTaskGrant(RevokeTaskGrantRequest) returns (RevokeTaskGrantResponse); - rpc ResolveTaskGrant(ResolveTaskGrantRequest) returns (ResolveTaskGrantResponse); - // Identity domain. Task-scoped grants cannot call these administrative RPCs. - rpc ListIdentities(ListIdentitiesRequest) returns (ListIdentitiesResponse); - rpc GetAuthenticationSettings(GetAuthenticationSettingsRequest) returns (GetAuthenticationSettingsResponse); - rpc SaveAuthenticationSettings(SaveAuthenticationSettingsRequest) returns (SaveAuthenticationSettingsResponse); - rpc BeginPasskey(BeginPasskeyRequest) returns (BeginPasskeyResponse); - rpc FinishPasskey(FinishPasskeyRequest) returns (FinishPasskeyResponse); - rpc ListPasskeys(ListPasskeysRequest) returns (ListPasskeysResponse); - rpc DeletePasskey(DeletePasskeyRequest) returns (DeletePasskeyResponse); - rpc OpenAccountSession(OpenAccountSessionRequest) returns (OpenAccountSessionResponse); - rpc RequireFreshAccountSession(RequireFreshAccountSessionRequest) returns (RequireFreshAccountSessionResponse); - rpc CreateAccountRecovery(CreateAccountRecoveryRequest) returns (CreateAccountRecoveryResponse); - rpc RecoverAccount(RecoverAccountRequest) returns (RecoverAccountResponse); - rpc AccountSetup(AccountSetupRequest) returns (AccountSetupResponse); - rpc RegisterAccount(RegisterAccountRequest) returns (RegisterAccountResponse); - rpc SignInAccount(SignInAccountRequest) returns (SignInAccountResponse); - rpc ResolveAccountSession(ResolveAccountSessionRequest) returns (ResolveAccountSessionResponse); - rpc SignOutAccount(SignOutAccountRequest) returns (SignOutAccountResponse); - rpc ChangeAccountPassword(ChangeAccountPasswordRequest) returns (ChangeAccountPasswordResponse); - rpc GetIdentity(GetIdentityRequest) returns (GetIdentityResponse); - rpc CreateIdentity(CreateIdentityRequest) returns (CreateIdentityResponse); - rpc RenameIdentity(RenameIdentityRequest) returns (RenameIdentityResponse); - rpc SuspendIdentity(SuspendIdentityRequest) returns (SuspendIdentityResponse); - rpc ReactivateIdentity(ReactivateIdentityRequest) returns (ReactivateIdentityResponse); - rpc RetireIdentity(RetireIdentityRequest) returns (RetireIdentityResponse); - // Subject bindings. A verified provider subject is resolved to the identity it - // is bound to; the authenticating process calls these rather than owning the - // identity store. - rpc ResolveIdentitySubject(ResolveIdentitySubjectRequest) returns (ResolveIdentitySubjectResponse); - rpc BindIdentitySubject(BindIdentitySubjectRequest) returns (BindIdentitySubjectResponse); - rpc ClaimIdentitySubject(ClaimIdentitySubjectRequest) returns (ClaimIdentitySubjectResponse); - // Personal API tokens act on the caller's own principal: the State Store - // refuses a call that carries none. - rpc AddPersonalToken(AddPersonalTokenRequest) returns (AddPersonalTokenResponse); - rpc ListPersonalTokens(ListPersonalTokensRequest) returns (ListPersonalTokensResponse); - rpc RevokePersonalToken(RevokePersonalTokenRequest) returns (RevokePersonalTokenResponse); - // Lifecycle - rpc EnqueueIssue(EnqueueIssueRequest) returns (EnqueueIssueResponse); - rpc EnqueueChatTask(EnqueueChatTaskRequest) returns (EnqueueChatTaskResponse); - rpc ActiveTasksByOrigin(ActiveTasksByOriginRequest) returns (ActiveTasksByOriginResponse); - // UnpostedOutcomes lists finished chat tasks whose outcome has not yet been - // posted to their conversation; MarkOutcomePosted records that it was. - rpc UnpostedOutcomes(UnpostedOutcomesRequest) returns (UnpostedOutcomesResponse); - rpc MarkOutcomePosted(MarkOutcomePostedRequest) returns (MarkOutcomePostedResponse); - rpc ClaimNext(ClaimNextRequest) returns (ClaimNextResponse); - rpc ClaimByIssue(ClaimByIssueRequest) returns (ClaimByIssueResponse); - rpc Transition(TransitionRequest) returns (TransitionResponse); - rpc Update(UpdateRequest) returns (UpdateResponse); - // Step executions (docs/prds/execution-tree-state-machine.md). The run - // credential authorises both on its own execution only. - rpc StartStep(StartStepRequest) returns (StartStepResponse); - // RecordUsage appends one model call's usage record. A run credential may - // record usage only for its own task. - rpc RecordUsage(RecordUsageRequest) returns (RecordUsageResponse); - // TaskModels answers what a task's models resolve against: the aliases its - // org may use and the org's own providers. The org is the task's, never - // the caller's. - rpc TaskModels(TaskModelsRequest) returns (TaskModelsResponse); - // TaskInstructions answers the instance and organisation instructions a - // task's agent runs follow. Organisation is empty for a system-org task. - rpc TaskInstructions(TaskInstructionsRequest) returns (TaskInstructionsResponse); - // CallerModels answers the model aliases the caller's org may use. The org - // is the calling principal's; a call with none is the system org's. - rpc CallerModels(CallerModelsRequest) returns (CallerModelsResponse); - rpc FinishStep(FinishStepRequest) returns (FinishStepResponse); - // Cancellation. Deliberately administrative (deny-by-default for a - // task-scoped grant): a cancel is a dashboard, API and dispatch action - // decided by the Authorizer, not a worker call. - rpc CancelExecution(CancelExecutionRequest) returns (CancelExecutionResponse); - // ListSteps is a dashboard/API/dispatch action (Authorizer: read on the - // run), not task-scoped-grant callable like StartStep/FinishStep. - rpc ListSteps(ListStepsRequest) returns (ListStepsResponse); - // Harness OAuth secrets (docs/prds/external-agent-harness.md, - // Credentials). Administrative: the setup terminal (an `update` action on - // the secret, Authorizer-gated) and the egress proxy's token-endpoint - // interception (acting as the daemon, not a worker) are the only callers. - rpc GetHarnessSecret(GetHarnessSecretRequest) returns (GetHarnessSecretResponse); - rpc PutHarnessSecret(PutHarnessSecretRequest) returns (PutHarnessSecretResponse); - rpc Requeue(RequeueRequest) returns (RequeueResponse); - rpc ParkTask(ParkTaskRequest) returns (ParkTaskResponse); - rpc RecoverStale(RecoverStaleRequest) returns (RecoverStaleResponse); - - // Archive / Retry - rpc ArchiveTask(ArchiveTaskRequest) returns (ArchiveTaskResponse); - rpc RetryTask(RetryTaskRequest) returns (RetryTaskResponse); - // 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. - rpc RespondReviewGate(RespondReviewGateRequest) returns (RespondReviewGateResponse); - rpc BeginRemediation(BeginRemediationRequest) returns (BeginRemediationResponse); - rpc UpdateReviewPayload(UpdateReviewPayloadRequest) returns (UpdateReviewPayloadResponse); - rpc SetReviewCursors(SetReviewCursorsRequest) returns (SetReviewCursorsResponse); - - // Queries - rpc TaskByIssue(TaskByIssueRequest) returns (TaskByIssueResponse); - rpc OpenTaskByPR(OpenTaskByPRRequest) returns (OpenTaskByPRResponse); - rpc TaskByID(TaskByIDRequest) returns (TaskByIDResponse); - rpc OpenPRs(OpenPRsRequest) returns (OpenPRsResponse); - rpc ClearTerminalTasks(ClearTerminalTasksRequest) returns (ClearTerminalTasksResponse); - rpc Tasks(TasksRequest) returns (TasksResponse); - rpc StatusCounts(StatusCountsRequest) returns (StatusCountsResponse); - - // Events - rpc InsertEvent(InsertEventRequest) returns (InsertEventResponse); - rpc EventsSince(EventsSinceRequest) returns (EventsSinceResponse); - rpc TaskEvents(TaskEventsRequest) returns (TaskEventsResponse); - rpc WorkflowStats(WorkflowStatsRequest) returns (WorkflowStatsResponse); - rpc StageStats(StageStatsRequest) returns (StageStatsResponse); - rpc TokensByDay(TokensByDayRequest) returns (TokensByDayResponse); - - // Configuration snapshot: the running configuration as the dashboard - // renders it, published by the owner of configuration for the process that - // displays it. PutConfigSnapshot is administrative; GetConfigSnapshot is - // the UI's read (docs/architecture/migration-decisions.md, "Dashboard - // configuration page"). - rpc PutConfigSnapshot(PutConfigSnapshotRequest) returns (PutConfigSnapshotResponse); - rpc GetConfigSnapshot(GetConfigSnapshotRequest) returns (GetConfigSnapshotResponse); - - // Channel status is what the process HOSTING the channels observes about them: - // one row per channel, written by the Messaging Service and read by the UI - // process. Administrative like the config snapshot, and for the same reason -- - // a task-scoped grant reaches neither, so authorizesTaskScopedCall admits only - // the administrative token. It is runtime state rather than a settings - // document, which is why it is not a ControlPlaneService resource kind. - rpc PutChannelStatus(PutChannelStatusRequest) returns (PutChannelStatusResponse); - rpc ListChannelStatus(ListChannelStatusRequest) returns (ListChannelStatusResponse); - - // Apply status: which version of a control-plane resource each process is - // running, and why it could not. Every process that applies a resource - // publishes; the UI process reads (docs/prds/control-plane-apply-status.md). - // Both are administrative. - rpc PutApplyStatus(PutApplyStatusRequest) returns (PutApplyStatusResponse); - rpc ListApplyStatus(ListApplyStatusRequest) returns (ListApplyStatusResponse); - - // Presence: every running service instance re-stamps one record, so a - // record past the staleness window means that instance is down. - // Administrative. - rpc PutPresence(PutPresenceRequest) returns (PutPresenceResponse); - // Capture refusals: events the network rules refused at the receiver, - // counted per source. Administrative. - rpc RecordCaptureRefusal(RecordCaptureRefusalRequest) returns (RecordCaptureRefusalResponse); - rpc ListCaptureRefusals(ListCaptureRefusalsRequest) returns (ListCaptureRefusalsResponse); - rpc ListPresence(ListPresenceRequest) returns (ListPresenceResponse); - - // Task log: one task attempt's persisted log. Task log files live in the - // state directory this process owns, so the dashboard reads them over this - // contract rather than opening them itself - // (docs/prds/ui-service-boundary.md). - rpc ReadTaskLog(ReadTaskLogRequest) returns (ReadTaskLogResponse); - // StreamTaskLogContent returns one attempt's log verbatim, one chunk per - // message, for a download. A log file is unbounded input (it rotates at - // DefaultMaxSizeMB), so a unary response would exceed gRPC's 4MiB message - // cap on a real log -- the same reason ListCaptures was superseded by - // StreamCaptures. - rpc StreamTaskLogContent(StreamTaskLogContentRequest) returns (stream StreamTaskLogContentResponse); - - // Capture - rpc InsertCapture(InsertCaptureRequest) returns (InsertCaptureResponse); - // StreamCaptures returns one capture per message: a batch of large capture - // bodies can exceed gRPC's 4MiB unary message cap - // (docs/prds/state-store-contract.md). - rpc StreamCaptures(StreamCapturesRequest) returns (stream StreamCapturesResponse); - - // Mapping - rpc InsertMapping(InsertMappingRequest) returns (InsertMappingResponse); - rpc GetMapping(GetMappingRequest) returns (GetMappingResponse); - rpc ListMappings(ListMappingsRequest) returns (ListMappingsResponse); - rpc UpdateMapping(UpdateMappingRequest) returns (UpdateMappingResponse); - rpc DeleteMapping(DeleteMappingRequest) returns (DeleteMappingResponse); - // RecordMappingMatch counts one event a mapping resolved; the same - // (mapping, capture) twice counts once. - rpc RecordMappingMatch(RecordMappingMatchRequest) returns (RecordMappingMatchResponse); - - // EventType (docs/prds/event-automation.md, "Event types"). Insert and - // Update refuse an overlapping or malformed type. - rpc InsertEventType(InsertEventTypeRequest) returns (InsertEventTypeResponse); - rpc UpdateEventType(UpdateEventTypeRequest) returns (UpdateEventTypeResponse); - rpc DeleteEventType(DeleteEventTypeRequest) returns (DeleteEventTypeResponse); - rpc ListEventTypes(ListEventTypesRequest) returns (ListEventTypesResponse); - - // Binding - rpc InsertBinding(InsertBindingRequest) returns (InsertBindingResponse); - rpc GetBinding(GetBindingRequest) returns (GetBindingResponse); - rpc ListBindings(ListBindingsRequest) returns (ListBindingsResponse); - rpc ListDispatches(ListDispatchesRequest) returns (ListDispatchesResponse); - rpc UpdateBinding(UpdateBindingRequest) returns (UpdateBindingResponse); - rpc DeleteBinding(DeleteBindingRequest) returns (DeleteBindingResponse); - rpc ApproveBinding(ApproveBindingRequest) returns (ApproveBindingResponse); - rpc PauseBinding(PauseBindingRequest) returns (PauseBindingResponse); - rpc ResumeBinding(ResumeBindingRequest) returns (ResumeBindingResponse); - - // Source (event-automation.md "Sources"): the capture endpoint and its - // signing setting. Secrets travel in plaintext; the store encrypts at rest. - rpc InsertSource(InsertSourceRequest) returns (InsertSourceResponse); - rpc GetSource(GetSourceRequest) returns (GetSourceResponse); - rpc ListSources(ListSourcesRequest) returns (ListSourcesResponse); - rpc SetSourceSigning(SetSourceSigningRequest) returns (SetSourceSigningResponse); - rpc SetSourceSecret(SetSourceSecretRequest) returns (SetSourceSecretResponse); - rpc SetSourceName(SetSourceNameRequest) returns (SetSourceNameResponse); - rpc SetSourceDeliveryHeader(SetSourceDeliveryHeaderRequest) returns (SetSourceDeliveryHeaderResponse); - rpc DeleteSource(DeleteSourceRequest) returns (DeleteSourceResponse); - - // Dispatch - rpc ArmedBindingsForSource(ArmedBindingsForSourceRequest) returns (ArmedBindingsForSourceResponse); - rpc RecordDispatch(RecordDispatchRequest) returns (RecordDispatchResponse); - // Playbook dispatch ledger (eda-playbook-engine.md gap 2): one durable - // at-most-once record per (playbook, version, event, action) for the - // side-effecting positions. Administrative, like RecordDispatch: a - // task-scoped grant cannot reach either (see TaskGrants). - rpc RecordPlaybookDispatch(RecordPlaybookDispatchRequest) returns (RecordPlaybookDispatchResponse); - rpc DeletePlaybookDispatches(DeletePlaybookDispatchesRequest) returns (DeletePlaybookDispatchesResponse); - rpc StreamUndispatchedCaptures(StreamUndispatchedCapturesRequest) returns (stream StreamUndispatchedCapturesResponse); - - // BindingTaskCreator: claims the binding's dispatch of a capture and - // enqueues its task in one transaction, so a failure leaves neither and a - // replayed delivery is refused with AlreadyExists. - rpc EnqueueBindingTask(EnqueueBindingTaskRequest) returns (EnqueueBindingTaskResponse); - - // WorkflowCaller: a workflow.call step starts its callee and, with - // wait:true, reads it back while waiting. Both are the one sanctioned - // widening of a task-scoped grant -- the callee is the caller's child - // (docs/prds/workflow-calls.md). CallStatus re-checks the parent-child - // relation server-side, so the grant only names the caller. - rpc EnqueueCallTask(EnqueueCallTaskRequest) returns (EnqueueCallTaskResponse); - rpc WorkflowCallStatus(WorkflowCallStatusRequest) returns (WorkflowCallStatusResponse); - - // Access: the stored policy chain and its denial records - // (docs/prds/orgs-and-access.md). ListPolicies is the engine's snapshot; - // the writes are administrative. RecordDenial is the dashboard's and - // dispatch's write path; ListDenials is the operator surface. - // The principal assembly the Authorizer evaluates: an identity, the org - // it serves, and its memberships (internal/domain/access). - rpc GetPrincipal(GetPrincipalRequest) returns (GetPrincipalResponse); - rpc ListPolicies(ListPoliciesRequest) returns (ListPoliciesResponse); - // GetPoliciesVersion is the instance-wide policy version an authorizer reads - // before each decision to know whether the chain it holds is current. A - // caller must read it before ListPolicies, never after. - rpc GetPoliciesVersion(GetPoliciesVersionRequest) returns (GetPoliciesVersionResponse); - rpc PutPolicy(PutPolicyRequest) returns (PutPolicyResponse); - rpc DeletePolicy(DeletePolicyRequest) returns (DeletePolicyResponse); - rpc EnsureShippedOrgPolicies(EnsureShippedOrgPoliciesRequest) returns (EnsureShippedOrgPoliciesResponse); - rpc RecordDenial(RecordDenialRequest) returns (RecordDenialResponse); - rpc ListDenials(ListDenialsRequest) returns (ListDenialsResponse); - - // Orgs, workspaces, memberships and agent assignments - // (docs/prds/orgs-and-access.md). Every request names an org, but the - // State Store acts in the org the caller's principal carries: a request - // org that is not the caller's is ignored, so the contract cannot reach - // another tenant. Instance-admin widening is a later change. - rpc ListOrgs(ListOrgsRequest) returns (ListOrgsResponse); - rpc GetOrg(GetOrgRequest) returns (GetOrgResponse); - rpc CreateOrg(CreateOrgRequest) returns (CreateOrgResponse); - rpc ListWorkspaces(ListWorkspacesRequest) returns (ListWorkspacesResponse); - rpc CreateWorkspace(CreateWorkspaceRequest) returns (CreateWorkspaceResponse); - rpc ListMembers(ListMembersRequest) returns (ListMembersResponse); - rpc SetMembership(SetMembershipRequest) returns (SetMembershipResponse); - rpc RemoveMembership(RemoveMembershipRequest) returns (RemoveMembershipResponse); - rpc ListOrgAgents(ListOrgAgentsRequest) returns (ListOrgAgentsResponse); - rpc AssignAgent(AssignAgentRequest) returns (AssignAgentResponse); - - // Operator alerts (internal/domain/alert). A caller acting for a principal - // reads, dismisses and raises only in that principal's org; a request org is - // ignored for it. A service acting for no one names the org itself. - // RaiseAlert and ResolveAlert are idempotent, so a periodic check can call - // them every tick. ClaimAlertDeliveries and RecordAlertAttempt serve the - // outbound webhook and refuse a caller scoped to an org. - rpc RaiseAlert(RaiseAlertRequest) returns (RaiseAlertResponse); - rpc ResolveAlert(ResolveAlertRequest) returns (ResolveAlertResponse); - rpc DismissAlert(DismissAlertRequest) returns (DismissAlertResponse); - rpc ListAlerts(ListAlertsRequest) returns (ListAlertsResponse); - rpc ClaimAlertDeliveries(ClaimAlertDeliveriesRequest) returns (ClaimAlertDeliveriesResponse); - rpc RecordAlertAttempt(RecordAlertAttemptRequest) returns (RecordAlertAttemptResponse); -} - -message RegisterTaskGrantRequest { - int64 task_id = 1; - string token = 2; - int64 lifetime_seconds = 3; -} -message RegisterTaskGrantResponse {} -message RevokeTaskGrantRequest { - string token = 1; -} -message RevokeTaskGrantResponse {} -// ResolveTaskGrantRequest names a run credential; the response is the task -// it was issued for. -message ResolveTaskGrantRequest { string token = 1; } -message ResolveTaskGrantResponse { - int64 task_id = 1; - // Canonical execution identity; empty names the instance root RPC route. - string execution_identity = 2; - // Canonical principal, including the instance root. - string principal_id = 3; -} - -message Identity { - string id = 1; - string kind = 2; - string display_name = 3; - string lifecycle = 4; - int64 version = 5; - google.protobuf.Timestamp created_at = 6; - google.protobuf.Timestamp updated_at = 7; -} -message IdentityAudit { - string actor_id = 1; - string source = 2; - string request_id = 3; -} -message ListIdentitiesRequest {} -message ListIdentitiesResponse { repeated Identity identities = 1; } -message GetIdentityRequest { string id = 1; } -message GetIdentityResponse { Identity identity = 1; } -message CreateIdentityRequest { - string id = 1; - string kind = 2; - string display_name = 3; - IdentityAudit audit = 4; -} -message RenameIdentityRequest { - string id = 1; - int64 expected_version = 2; - string display_name = 3; - IdentityAudit audit = 4; -} -message SuspendIdentityRequest { string id = 1; int64 expected_version = 2; IdentityAudit audit = 3; } -message ReactivateIdentityRequest { string id = 1; int64 expected_version = 2; IdentityAudit audit = 3; } -message RetireIdentityRequest { string id = 1; int64 expected_version = 2; IdentityAudit audit = 3; } -message CreateIdentityResponse { Identity identity = 1; } -message RenameIdentityResponse { Identity identity = 1; } -message SuspendIdentityResponse { Identity identity = 1; } -message ReactivateIdentityResponse { Identity identity = 1; } -message RetireIdentityResponse { Identity identity = 1; } -message ResolveIdentitySubjectRequest { - string issuer = 1; - string subject = 2; -} -message ResolveIdentitySubjectResponse { Identity identity = 1; } -message BindIdentitySubjectRequest { - string id = 1; - string issuer = 2; - string subject = 3; - IdentityAudit audit = 4; -} -message BindIdentitySubjectResponse { Identity identity = 1; } -message ClaimIdentitySubjectRequest { - string issuer = 1; - string placeholder = 2; - string subject = 3; -} -message ClaimIdentitySubjectResponse { Identity identity = 1; } - -// PersonalToken identifies a token by the SHA-256 it binds as; the token -// itself never reaches the State Store. -message PersonalToken { - string id = 1; - google.protobuf.Timestamp created_at = 2; -} -message AddPersonalTokenRequest { string id = 1; } -message AddPersonalTokenResponse {} -message ListPersonalTokensRequest {} -message ListPersonalTokensResponse { repeated PersonalToken tokens = 1; } -message RevokePersonalTokenRequest { string id = 1; } -message RevokePersonalTokenResponse {} - -// Task mirrors internal/domain/workflow.Task. -message Task { - int64 id = 1; - string owner = 2; - string repo = 3; - int64 issue_number = 4; - string title = 5; - string body = 6; - string labels = 7; - string status = 8; - string workflow = 9; - // Retired: the per-task "current stage" column was overwritten as - // workflow.Run advanced and carried no history. step_executions is the - // durable per-step record now (docs/prds/execution-tree-state-machine.md); - // ListSteps is its read. - string stage = 10 [deprecated = true]; - string branch = 11; - string plan = 12; - string notes = 13; - int64 pr_number = 14; - int64 tokens_used = 15; - int64 iterations = 16; - int64 attempt = 17; - string park_reason = 18; - int64 retry_count = 19; - int64 watch_comment_id = 20; - string source = 21; - string identity = 22; - string binding_id = 23; - int64 binding_version = 24; - google.protobuf.Timestamp created_at = 25; - google.protobuf.Timestamp updated_at = 26; - // review_payload is the JSON-encoded review unit the remediate workflow's - // current run must address (docs/prds/pr-review-remediation.md decision 4). - string review_payload = 27; - // The workflow pin: the exact definition version this run started with. - // It has to cross the wire for the daemon's digest guard to hold, because - // a retry reads the task back over this contract before deciding whether - // to reuse the pinned YAML (docs/prds/runtime-control-plane.md:95). - int64 workflow_definition_version = 28; - string workflow_definition_digest = 29; - string workflow_definition_yaml = 30; - // review_cursor is the poll backstop's high-water mark over forge review - // IDs for this task. It is separate from watch_comment_id (the review- - // comment cursor) because the two forge sequences are independent; one - // combined cursor would silently skip reviews once a larger comment ID - // landed (docs/prds/pr-review-remediation.md decision 2). - int64 review_cursor = 31; - // park_class is the producer-recorded answer to "what kind of - // intervention does this park need?" (taskstate.ParkClass: - // needs_decision, transient, terminal). Store-side normalization makes - // empty and unknown values needs_decision, so the class is advisory on - // the wire and authoritative only as recorded at the park site. - string park_class = 32; - // remediation_rounds counts review-triggered remediation rounds - // separately from retry_count, so an operator's manual retries no - // longer draw down the review-remediation budget (and vice versa). - int32 remediation_rounds = 33; - // inputs_json is the JSON object of workflow inputs a binding dispatch - // resolved (task.EncodeInputs); empty for a task no binding started. - string inputs_json = 34; - // org is the org the task belongs to, derived store-side from the task's - // identity when the row is written; a task of a single-operator install - // belongs to the default org (docs/prds/orgs-and-access.md). - string org = 35; - // The workflow.call linkage (docs/prds/workflow-calls.md): the task whose - // workflow.call step started this one (0 on a root run) and how many - // call hops this row is from that root. Columns default, so an older - // writer reads as a depth-0 root run. - int64 call_parent_task_id = 36; - int32 call_depth = 37; - // outputs_json is the JSON object of declared-output values this run wrote - // (task.EncodeOutputs), empty for a run that wrote none. The container's - // Update sends the whole row, so a column the message cannot carry is a - // column that write drops (docs/prds/workflow-call-outputs.md, "Storage and - // wire"). - string outputs_json = 38; - // review_gate is the operator-approval gate's whole conversation with the - // operator (docs/prds/pr-review-operator-response.md): the offer the gate - // wrote before waiting, and the answer the response path filled in. It is - // opaque here -- internal/domain/workflow/prreview owns the encoding -- but - // it must cross so the dashboard can render the offer and the resumed run - // can read the answer. - string review_gate = 39; - // rereview_rounds counts granted operator re-reviews, capped by - // prreview.MaxRereviewRounds in the guarded response write. It is separate - // from retry_count and remediation_rounds for the same reason those are - // separate from each other. - int64 rereview_rounds = 40; - // retry_mode is the operator's worktree choice for the next dispatch - // (taskstate.RetryMode: refresh_onto_base, continue_pushed_work). The retry - // action writes it and the daemon's prepareWorkspace reads it, so it must - // cross the wire for a retry to land on the source the operator chose. The - // empty string reads as refresh_onto_base. - string retry_mode = 41; - // resume_from is the stage the next attempt starts at; empty runs every - // stage. resume_results are the step results (JSON) it starts with. - string resume_from = 42; - bytes resume_results = 43; - // origin names the conversation that created the task; empty for none. - string origin = 44; - // workspace is the workspace of its org the task belongs to; read-only - // here. - string workspace = 45; - // binding_signature and binding_addr are the signature result and address - // of the captured event that started a binding task. - string binding_signature = 46; - string binding_addr = 47; - // park_blocker names what a parked task is missing (taskstate.Blocker), - // recorded at the park site; empty when the park has no known fix. - string park_blocker = 48; - reserved 49; - reserved "plan_view"; - // plan_document is the structured plan (JSON) plan was rendered from. - string plan_document = 50; -} - -// Event mirrors internal/events.Event. Data is carried as a JSON object -// string (matching the store's own on-disk representation) rather than -// google.protobuf.Struct, to stay a direct mirror of the existing column. -message Event { - int64 id = 1; - google.protobuf.Timestamp at = 2; - string kind = 3; - int64 task_id = 4; - string repo = 5; - int64 issue = 6; - string workflow = 7; - string stage = 8; - // attempt is the run this event belongs to. Zero means UNATTRIBUTED, not a - // first attempt: rows written before the field existed, and the deliberately - // task-agnostic producers, all carry zero. A reader must report those as - // unattributable rather than presenting them as one run. - int64 attempt = 11; - string detail = 9; - string data_json = 10; - // Attribution. actor_id is the identity that performed the action and - // actor_kind its kind, so a reader can tell an agent's action from a person's - // without resolving the identity. principal_id is the identity whose authority - // the action used, which is a different fact when an agent acts under a - // person's standing approval; empty means unattributed. All three must cross - // this boundary: a record whose attribution survives only in `detail` is not - // queryable, which is the attribution this design exists to replace. - string actor_id = 12; - string actor_kind = 13; - string principal_id = 14; -} - -// CapturedEvent mirrors storecontract.CapturedEvent. -message CapturedEvent { - string id = 1; - google.protobuf.Timestamp received_at = 2; - string source = 3; - string remote_addr = 4; - string content_type = 5; - string headers = 6; - string body = 7; - bool authenticated = 8; - // event_type is the ID of the event type the capture was identified as on - // arrival; empty is unidentified. - string event_type = 9; - // unsigned marks an event taken on an approved unsigned source. - bool unsigned = 10; - // delivery names the sender's delivery; a retry of one delivery shares it. - // Intake sets it from the source's delivery header; empty takes the - // capture ID. - string delivery = 11; -} - -// EventTypeHeaderCondition mirrors internal/domain/eventtype.HeaderCondition. -message EventTypeHeaderCondition { - string name = 1; - string value = 2; -} - -// EventTypePayloadCondition mirrors internal/domain/eventtype.PayloadCondition. -message EventTypePayloadCondition { - string path = 1; - string op = 2; - string value = 3; -} - -// EventType mirrors internal/domain/eventtype.EventType. header_conditions and -// payload_conditions are its rule; schema maps each payload path to its type. -message EventType { - string id = 1; - string source = 2; - string name = 3; - repeated EventTypeHeaderCondition header_conditions = 4; - repeated EventTypePayloadCondition payload_conditions = 5; - map schema = 6; - google.protobuf.Timestamp created_at = 7; - google.protobuf.Timestamp updated_at = 8; - // workspace_id is its source's workspace; read-only here. - string workspace_id = 9; -} - -// MappingField mirrors internal/domain/mapping.Field. -message MappingField { - string name = 1; - string path = 2; - string type = 3; - bool required = 4; -} - -// Mapping mirrors internal/domain/mapping.Mapping. -message Mapping { - string id = 1; - string name = 2; - string source_hint = 3; - repeated MappingField fields = 4; - google.protobuf.Timestamp created_at = 5; - google.protobuf.Timestamp updated_at = 6; - string event_type_id = 7; - // match_count and last_matched_at are read-only: the store counts them. - int64 match_count = 8; - google.protobuf.Timestamp last_matched_at = 9; - // workspace_id is its event type's workspace; read-only here. - string workspace_id = 10; -} - -// BindingMatcher mirrors internal/domain/binding.Matcher. -message BindingMatcher { - string source = 1; -} - -// Binding mirrors internal/domain/binding.Binding. -message Binding { - string id = 1; - string name = 2; - BindingMatcher matcher = 3; - string mapping_id = 4; - string workflow = 5; - string owner = 6; - string repo = 7; - int64 version = 8; - string status = 9; - reserved 10; - reserved "secret"; - google.protobuf.Timestamp created_at = 11; - google.protobuf.Timestamp updated_at = 12; - string filter = 13; - // inputs_json assigns workflow inputs, a JSON object of - // {"param": name} or {"value": constant} per input. - string inputs_json = 14; - // repo_param names the mapped parameter holding "owner/name". - string repo_param = 15; - // org_id is the org that owns the binding; it is read-only here. - string org_id = 16; - // workspace_id is its source's workspace; read-only here. - string workspace_id = 17; -} - -// Source mirrors internal/domain/source.Source. -message Source { - string path = 1; - string signing = 2; - string secret = 3; - google.protobuf.Timestamp created_at = 4; - google.protobuf.Timestamp updated_at = 5; - string name = 6; - string delivery_header = 7; - // org_id is the source's owning org, read-only here. workspace_id is the - // org's workspace it is created in, the default one when empty. - string org_id = 8; - string workspace_id = 9; -} - -// WorkflowStat mirrors storecontract.WorkflowStat. -message WorkflowStat { - string workflow = 1; - int64 runs = 2; - int64 merged = 3; - int64 pr_open = 4; - int64 parked = 5; - int64 avg_tokens = 6; - double avg_steps = 7; - int64 total_tokens = 8; - int64 completed = 9; -} - -// StageStat mirrors storecontract.StageStat. -message StageStat { - string workflow = 1; - string stage = 2; - int64 runs = 3; - int64 avg_ms = 4; - int64 errors = 5; -} - -// DayTokens mirrors storecontract.DayTokens. -message DayTokens { - string day = 1; - int64 tokens = 2; -} - -message EnqueueIssueRequest { - string owner = 1; - string repo = 2; - int64 number = 3; - string title = 4; - string body = 5; - string labels = 6; - string identity = 7; -} -message EnqueueIssueResponse { bool inserted = 1; } - -message ActiveTasksByOriginRequest { string origin = 1; } -message ActiveTasksByOriginResponse { repeated Task tasks = 1; } - -message UnpostedOutcomesRequest {} -message UnpostedOutcomesResponse { repeated Task tasks = 1; } -message MarkOutcomePostedRequest { - int64 task_id = 1; - // status is the task status whose state was posted. - string status = 2; -} -message MarkOutcomePostedResponse {} - -message EnqueueChatTaskRequest { - string owner = 1; - string repo = 2; - string title = 3; - string body = 4; - string workflow = 5; - string identity = 6; - // inputs_json assigns workflow inputs, a JSON object of the same form - // EnqueueBindingTaskRequest carries. A chat task sets them at insert - // time: it has no binding provenance to stamp afterwards. - string inputs_json = 7; - // origin names the conversation that created the task; empty for none. - string origin = 8; - // draft_yaml, when set, makes the task a test run of that unsaved - // definition: it is pinned to it and writes nothing to a forge. - string draft_yaml = 9; -} -message EnqueueChatTaskResponse { Task task = 1; } - -message ClaimNextRequest {} -message ClaimNextResponse { - Task task = 1; - bool found = 2; -} - -message ClaimByIssueRequest { - string owner = 1; - string repo = 2; - int64 number = 3; -} -message ClaimByIssueResponse { - Task task = 1; - bool found = 2; -} - -message TransitionRequest { - int64 task_id = 1; - string from = 2; - string to = 3; - string detail = 4; -} -message TransitionResponse {} - -message StartStepRequest { - // execution_id is the WorkflowExecution (the tasks row) the step belongs - // to, and the task ID the run credential is scoped to. - int64 execution_id = 1; - int64 attempt = 2; - // parent_id is 0 when the step is a stage; otherwise it names the enclosing - // StepExecution, from which the store derives depth. - int64 parent_id = 3; - // kind is stage, agent or call. - string kind = 4; - string name = 5; - // called_execution_id names the WorkflowExecution a `call` step started; - // the store verifies it is this execution's own callee. - int64 called_execution_id = 6; -} -message StartStepResponse { - int64 step_id = 1; - // event is the transition's stage_start row, already persisted; the caller - // publishes it to its bus after the write commits (the daemon's event sink - // skips already-persisted rows by their assigned ID). - Event event = 2; -} - -message FinishStepRequest { - // execution_id names the run the step belongs to. The grant check verifies - // it against the credential, and the store verifies the step really is that - // execution's, so a caller cannot move another run's step by naming it. - int64 execution_id = 1; - int64 step_id = 2; - string from = 3; - string to = 4; - string detail = 5; - int64 tokens_used = 6; - // results is the run's step results (JSON, by step id) after a stage the - // run moves past; empty otherwise. A resumed attempt starts from them. - bytes results = 7; -} -message FinishStepResponse { - // event is the transition's stage_finish row, already persisted. - Event event = 1; -} - -message CancelExecutionRequest { - int64 task_id = 1; - // reason records why the run was stopped, in the execution's park reason - // when the cancel lands there, and on every step event it writes. - string reason = 2; - // to is the execution's destination: the transition table routes it, and - // the operator actions name parked or closed_wont_do. - string to = 3; -} -message CancelExecutionResponse { - reserved 1; - reserved "cancelled_step_ids"; - // cancelled_callee_ids are the executions the caller was waiting on that - // were cancelled with it, nested callees included; the caller stops their - // runs as well as its own. - repeated int64 cancelled_callee_ids = 2; -} - -// StepExecution mirrors internal/domain/workflow/task.StepExecution. -message StepExecution { - int64 id = 1; - int64 execution_id = 2; - int64 attempt = 3; - // parent_id is 0 for a stage at the tree's root. - int64 parent_id = 4; - int32 depth = 5; - string kind = 6; - string name = 7; - string status = 8; - string detail = 9; - int64 tokens_used = 10; - google.protobuf.Timestamp started_at = 11; - google.protobuf.Timestamp finished_at = 12; - // called_execution_id is the callee task a workflow.call step started. - int64 called_execution_id = 13; -} - -message ListStepsRequest { - int64 execution_id = 1; - // attempt selects one attempt's steps; 0 lists every attempt of the - // execution, oldest first -- the dashboard's run-detail rail renders every - // attempt from a single call rather than one per attempt. - int64 attempt = 2; -} -message ListStepsResponse { repeated StepExecution steps = 1; } - -// HarnessSecret mirrors internal/domain/harnesssecret.Secret -- one org's -// captured OAuth token set for a credential binding's service -// (docs/prds/external-agent-harness.md, Credentials). -message HarnessSecret { - reserved 1; - reserved "org"; - string service = 2; - string access_token = 3; - string refresh_token = 4; - string token_type = 5; - google.protobuf.Timestamp expires_at = 6; - google.protobuf.Timestamp updated_at = 7; - repeated string scopes = 8; -} - -message GetHarnessSecretRequest { - reserved 1; - reserved "org"; - string service = 2; - string run_credential = 3; -} -message GetHarnessSecretResponse { - HarnessSecret secret = 1; - string org = 2; -} - -message PutHarnessSecretRequest { - HarnessSecret secret = 1; - string run_credential = 2; -} -message PutHarnessSecretResponse {} - -message UpdateRequest { Task task = 1; } -message UpdateResponse {} - -message RequeueRequest { - int64 task_id = 1; - string from_status = 2; - string workflow = 3; -} -message RequeueResponse {} - -message ParkTaskRequest { - int64 task_id = 1; - string from = 2; - string detail = 3; - string class = 4; - string blocker = 5; -} -message ParkTaskResponse {} - -message RecoverStaleRequest {} -message RecoverStaleResponse { int64 count = 1; } - -message ArchiveTaskRequest { - int64 task_id = 1; - string from_status = 2; - Event audit = 3; -} -message ArchiveTaskResponse { int64 event_id = 1; } - -message RetryTaskRequest { - int64 task_id = 1; - string from_status = 2; - string workflow = 3; - // retry_mode is the operator's worktree choice (taskstate.RetryMode) the - // requeue persists. Empty reads as refresh_onto_base. - string retry_mode = 4; - // resume_from is the stage the attempt starts at, and resume_after the - // stage before it whose recorded results it starts with (task.Resume). - string resume_from = 5; - string resume_after = 6; - // current_definition clears the pinned definition so the next dispatch - // pins the workflow's current stored version. - bool current_definition = 7; -} -message RetryTaskResponse {} - -message RespondReviewGateRequest { - int64 task_id = 1; - string from_status = 2; - // gate is the whole review_gate document the caller computed: the offer - // with the answer filled in. The store persists it unread. - string gate = 3; - // rereview increments rereview_rounds in the same write; an approve must - // pass false and bumps nothing. - bool rereview = 4; - // cap is the domain's re-review bound (prreview.MaxRereviewRounds). It - // crosses so the guard is enforced where the row is locked rather than by - // the caller's stale read. - int64 cap = 5; -} -message RespondReviewGateResponse {} - -message BeginRemediationRequest { - int64 task_id = 1; - string payload = 2; -} -message BeginRemediationResponse {} - -// UpdateReviewPayloadRequest merges payload's comments into the unclaimed -// review unit with the same review id, active or pending. -message UpdateReviewPayloadRequest { - int64 task_id = 1; - string payload = 2; -} -message UpdateReviewPayloadResponse {} - -message SetReviewCursorsRequest { - int64 task_id = 1; - int64 review_cursor = 2; - int64 comment_cursor = 3; -} -message SetReviewCursorsResponse {} - -message TaskByIssueRequest { - string owner = 1; - string repo = 2; - int64 number = 3; -} -message TaskByIssueResponse { - Task task = 1; - bool found = 2; -} - -message OpenTaskByPRRequest { - string owner = 1; - string repo = 2; - int64 number = 3; -} -message OpenTaskByPRResponse { - Task task = 1; - bool found = 2; -} - -message TaskByIDRequest { int64 task_id = 1; } -message TaskByIDResponse { - Task task = 1; - bool found = 2; -} - -message OpenPRsRequest {} -message OpenPRsResponse { repeated Task tasks = 1; } - -message ClearTerminalTasksRequest {} -message ClearTerminalTasksResponse { int64 count = 1; } - -// TasksRequest selects one page of tasks, most recently updated first. Empty -// statuses matches every status; after_id 0 starts at the newest task. -message TasksRequest { - int64 limit = 1; - repeated string statuses = 2; - google.protobuf.Timestamp after_updated_at = 3; - int64 after_id = 4; - // workflow, when set, keeps only that workflow's tasks. - string workflow = 5; -} -message TasksResponse { repeated Task tasks = 1; } - -message StatusCountsRequest {} -message StatusCountsResponse { map counts = 1; } - -message InsertEventRequest { Event event = 1; } -message InsertEventResponse { int64 id = 1; } - -message EventsSinceRequest { - // since_id is the opaque resume cursor returned by the previous page (the SSE - // id: field, echoed back as Last-Event-ID). Empty means "from the - // beginning". The field keeps its name and number so the wire name stays - // put; only its type widened, from the SQLite rowid to the fixed-width - // "|" cursor. - string since_id = 1; - int64 limit = 2; -} -message EventsSinceResponse { repeated Event events = 1; } - -message TaskEventsRequest { int64 task_id = 1; } -message TaskEventsResponse { repeated Event events = 1; } - -message WorkflowStatsRequest {} -message WorkflowStatsResponse { repeated WorkflowStat stats = 1; } - -message StageStatsRequest {} -message StageStatsResponse { repeated StageStat stats = 1; } - -message TokensByDayRequest { int64 days = 1; } -message TokensByDayResponse { repeated DayTokens tokens = 1; } - -// ConfigSnapshot carries the dashboard's configuration projection. document -// is opaque to the store: its shape belongs to the producer and the page that -// reads it, and schema names that shape so a reader can refuse one it does -// not understand. It is secret-free at the producer -- the projection carries -// an API key's environment variable name and whether it resolved, never a -// value. -message ConfigSnapshot { - string schema = 1; - bytes document = 2; - google.protobuf.Timestamp published_at = 3; -} -message PutConfigSnapshotRequest { ConfigSnapshot snapshot = 1; } -message PutConfigSnapshotResponse {} -message GetConfigSnapshotRequest {} -message GetConfigSnapshotResponse { - ConfigSnapshot snapshot = 1; - bool found = 2; -} - -// ChannelStatus is one channel's runtime state, as the process hosting it -// observes it. ReloadSupported is a capability declaration, not a request: the -// service reports it, so a reader may offer a reload action -- but asking for one -// travels on its own surface, because a transient request and a durable state do -// not share a lifetime. -message ChannelStatus { - string id = 1; - string name = 2; - string state = 3; - string detail = 4; - bool configured = 5; - bool reload_supported = 6; - google.protobuf.Timestamp observed_at = 7; -} -message PutChannelStatusRequest { repeated ChannelStatus channels = 1; } -message PutChannelStatusResponse {} -message ListChannelStatusRequest {} -message ListChannelStatusResponse { repeated ChannelStatus channels = 1; } - -// ApplyStatus is one process's report about one control-plane resource kind. -// applied_version is the version that process is running; error is set when it -// could not apply what the store returned, and leaves applied_version at the -// last version it did apply. reported_at is re-stamped on an interval, so a -// record older than the staleness window belongs to a process that has stopped -// running (docs/prds/control-plane-apply-status.md). -message ApplyStatus { - string process = 1; - string kind = 2; - int64 applied_version = 3; - string error = 4; - google.protobuf.Timestamp reported_at = 5; -} -message PutApplyStatusRequest { ApplyStatus status = 1; } -message PutApplyStatusResponse {} -message ListApplyStatusRequest {} -message ListApplyStatusResponse { repeated ApplyStatus statuses = 1; } - -// Presence is one running service instance. ready and detail summarise its -// readiness probes; detail names the degraded ones. -message DependencyCheck { - string name = 1; - string status = 2; - bool ready = 3; - string detail = 4; -} -message Presence { - string service = 1; - string instance_id = 2; - string version = 3; - string install_type = 4; - google.protobuf.Timestamp started_at = 5; - google.protobuf.Timestamp reported_at = 6; - bool ready = 7; - string detail = 8; - repeated DependencyCheck checks = 9; -} -message RecordCaptureRefusalRequest { - string source = 1; - string addr = 2; - google.protobuf.Timestamp refused_at = 3; -} -message RecordCaptureRefusalResponse {} -message ListCaptureRefusalsRequest { google.protobuf.Timestamp since = 1; } -message CaptureRefusals { - string source = 1; - int64 refused = 2; - int64 accepted = 3; - repeated string addrs = 4; -} -message ListCaptureRefusalsResponse { repeated CaptureRefusals sources = 1; } -message PutPresenceRequest { Presence presence = 1; } -message PutPresenceResponse {} -message ListPresenceRequest {} -message ListPresenceResponse { repeated Presence presences = 1; } - -// TaskLogEntry mirrors internal/logging.Entry: one decoded log line. fields -// carries every remaining key as a JSON object string, the same way Event -// carries its data, so structured context survives the hop without this -// contract having to know what a call site attached. -message TaskLogEntry { - int64 id = 1; - google.protobuf.Timestamp time = 2; - string level = 3; - string msg = 4; - string fields_json = 5; -} - -// ReadTaskLog returns a page of one task attempt's decoded log. attempt is the -// attempt the caller resolved (the dashboard sends the task's current attempt -// when the request omitted one). levels, component, contains, since and until -// carry the whole query the logging package's Tail accepts -- the wire mirrors -// that query rather than a subset of it, so a filter cannot silently stop -// working by crossing the boundary. limit is caller-capped -// (docs/prds/state-store-contract.md §8: the log cap is 2000). -message ReadTaskLogRequest { - int64 task_id = 1; - int64 attempt = 2; - int64 limit = 3; - repeated string levels = 4; - string component = 5; - string contains = 6; - google.protobuf.Timestamp since = 7; - google.protobuf.Timestamp until = 8; - // stage filters on an entry's own "stage" field. Only entries a stage - // tagged carry one -- agent and tool output is logged without a stage, so a - // stage filter narrows the file rather than covering it. Empty means any. - string stage = 9; - // before_id is the byte-offset cursor a previous page returned as cursor: the - // read returns the most recent matching entries ending at or before it. Zero - // reads the tail, which is the page the dashboard opens on. - int64 before_id = 10; -} -// found=false is not an error: the task has no log file for that attempt. -// That is a different condition from a process that cannot read logs at all -// (codes.Unavailable), and the dashboard reports them differently. -message ReadTaskLogResponse { - repeated TaskLogEntry entries = 1; - bool truncated = 2; - int64 attempt = 3; - bool found = 4; - repeated string components = 5; - // file is the path read, so the page can name where the log came from. It - // is the state directory's own layout, reported to an already-authenticated - // operator; no caller is expected to open it. - string file = 6; - // more_available reports matching entries did not fit in this page; cursor - // is the before_id for the next older one. truncated is separate: it means - // the log is larger than the readable scan window, so its oldest entries - // cannot be reached by paging at all. - bool more_available = 7; - int64 cursor = 8; -} - -// StreamTaskLogContent returns one attempt's log verbatim, for a download. The -// bytes are the file's own JSONL, not a re-encoding of it: this contract -// transports the log, it does not restate the format. found=false, with no -// chunks, means the attempt has no log file -- not an error. -message StreamTaskLogContentRequest { - int64 task_id = 1; - int64 attempt = 2; -} -message StreamTaskLogContentResponse { - bytes chunk = 1; - int64 attempt = 2; - bool found = 3; -} - -message InsertCaptureRequest { - CapturedEvent capture = 1; - int64 retention_seconds = 2; - int64 max_events = 3; -} -message InsertCaptureResponse { string id = 1; } - -message StreamCapturesRequest { int64 limit = 1; } -// Streamed one capture per message; see StreamCaptures above. -message StreamCapturesResponse { CapturedEvent capture = 1; } - -message InsertMappingRequest { Mapping mapping = 1; } -message InsertMappingResponse { string id = 1; } - -message GetMappingRequest { string id = 1; } -message GetMappingResponse { - Mapping mapping = 1; - bool found = 2; -} - -message ListMappingsRequest {} -message ListMappingsResponse { repeated Mapping mappings = 1; } - -message UpdateMappingRequest { Mapping mapping = 1; } -message UpdateMappingResponse {} - -message DeleteMappingRequest { string id = 1; } -message DeleteMappingResponse {} - -message RecordMappingMatchRequest { - string mapping_id = 1; - string capture_id = 2; -} -message RecordMappingMatchResponse {} - -message InsertEventTypeRequest { EventType event_type = 1; } -message InsertEventTypeResponse { string id = 1; } - -message UpdateEventTypeRequest { EventType event_type = 1; } -message UpdateEventTypeResponse {} - -message DeleteEventTypeRequest { string id = 1; } -message DeleteEventTypeResponse {} - -message ListEventTypesRequest {} -message ListEventTypesResponse { repeated EventType event_types = 1; } - -message InsertBindingRequest { Binding binding = 1; } -message InsertBindingResponse { string id = 1; } - -message GetBindingRequest { string id = 1; } -message GetBindingResponse { - Binding binding = 1; - bool found = 2; -} - -message ListBindingsRequest {} -message ListBindingsResponse { repeated Binding bindings = 1; } - -message UpdateBindingRequest { Binding binding = 1; } -message UpdateBindingResponse {} - -message DeleteBindingRequest { string id = 1; } -message DeleteBindingResponse {} - -message ApproveBindingRequest { string id = 1; } -message ApproveBindingResponse {} -message SetSourceNameRequest { - string path = 1; - string name = 2; -} -message SetSourceNameResponse {} -message SetSourceDeliveryHeaderRequest { - string path = 1; - string header = 2; -} -message SetSourceDeliveryHeaderResponse {} -message DeleteSourceRequest { string path = 1; } -message DeleteSourceResponse {} -message PauseBindingRequest { string id = 1; } -message PauseBindingResponse {} -message ResumeBindingRequest { string id = 1; } -message ResumeBindingResponse {} - -message InsertSourceRequest { Source source = 1; } -message InsertSourceResponse {} - -message GetSourceRequest { string path = 1; } -message GetSourceResponse { - Source source = 1; - bool found = 2; -} - -message ListSourcesRequest {} -message ListSourcesResponse { repeated Source sources = 1; } - -message SetSourceSigningRequest { - string path = 1; - string from = 2; - string to = 3; -} -message SetSourceSigningResponse {} - -message SetSourceSecretRequest { - string path = 1; - string secret = 2; -} -message SetSourceSecretResponse {} - -message ArmedBindingsForSourceRequest { string source = 1; } -message ArmedBindingsForSourceResponse { repeated Binding bindings = 1; } - -message RecordDispatchRequest { - string binding_id = 1; - int64 binding_version = 2; - string capture_id = 3; - // task_id addresses the tasks table. - int64 task_id = 4; - // reason is empty for a dispatch and names why an evaluated capture - // started no task. - string reason = 5; -} -message RecordDispatchResponse {} - -// ListDispatchesRequest filters the binding dispatch ledger; empty fields -// match any row. -message ListDispatchesRequest { - string binding_id = 1; - string capture_id = 2; - int64 task_id = 3; - int32 limit = 4; -} -message Dispatch { - string binding_id = 1; - int64 binding_version = 2; - string capture_id = 3; - int64 task_id = 4; - string reason = 5; - google.protobuf.Timestamp dispatched_at = 6; -} -message ListDispatchesResponse { repeated Dispatch dispatches = 1; } - -message RecordPlaybookDispatchRequest { - string playbook_id = 1; - string playbook_version = 2; - string event_id = 3; - string action_id = 4; -} -message RecordPlaybookDispatchResponse {} - -message DeletePlaybookDispatchesRequest { string playbook_id = 1; } -message DeletePlaybookDispatchesResponse {} - -message StreamUndispatchedCapturesRequest { - reserved 1; - reserved "sources"; - // Bindings are the ids of the armed bindings, on enabled workflows, the - // captures are listed for. - repeated string bindings = 3; - int64 limit = 2; -} -// Streamed one capture per message; see StreamUndispatchedCaptures above. -message StreamUndispatchedCapturesResponse { CapturedEvent capture = 1; } - -message EnqueueBindingTaskRequest { - string owner = 1; - string repo = 2; - string title = 3; - string body = 4; - string workflow = 5; - string identity = 6; - string binding_id = 7; - int64 binding_version = 8; - string inputs_json = 9; - string capture_id = 10; -} -message EnqueueBindingTaskResponse { Task task = 1; } - -// workflow.call: the caller's grant names the caller; the store derives the -// rest from the caller's row (docs/prds/workflow-calls.md). -message EnqueueCallTaskRequest { - int64 caller_task_id = 1; - string workflow = 2; - string inputs_json = 3; - // call_key is the call site's durable identity: the call step's declared - // path within the run, plus the workflow it starts (so one task running a - // second definition at a colliding path does not reuse the first callee's - // child). The store stamps it on the child and, when the caller already - // started a child under it, returns that child instead of starting a second - // one. Required: a retry of one call site carries the same key, so the retry - // cannot duplicate the child's work. - string call_key = 4; -} -message EnqueueCallTaskResponse { - Task task = 1; - bool accepted = 2; -} - -message WorkflowCallStatusRequest { - int64 caller_task_id = 1; - int64 call_task_id = 2; -} -message WorkflowCallStatusResponse { - // status is the callee's task status and detail its latest transition - // detail (empty before the callee first moves). outputs_json is the - // callee's written outputs (task.EncodeOutputs), so a wait:true caller can - // publish one as its own (docs/prds/workflow-call-outputs.md, "Storage and - // wire"). - string status = 1; - string detail = 2; - string outputs_json = 3; -} - -message InstalledPackage { - string org_id = 1; - string name = 2; - string reference = 3; - string digest = 4; - bytes descriptor_json = 5; - bytes layer = 6; - string update_policy = 7; - // The operator's accepted authority, recorded against the pinned digest. - // Absent until the operator accepts (docs/prds/store.md, "Authority"). - PackageAuthority accepted_authority = 8; - // An update waiting for approval of widened authority; the live pin above - // is unchanged until then. - PackagePin pending = 9; - // The pin the last update or rollback replaced, with the authority accepted - // against it. - PackagePin previous = 10; - PackageAuthority previous_accepted_authority = 11; - // What the pending update declares. - PackageAuthority pending_authority = 12; -} -message PackagePin { - string reference = 1; - string digest = 2; -} -// PackageAuthority mirrors storepkg.Authority: the grants a package needs to -// operate. An acceptance record is an upper bound, checked field by field. -message PackageAuthority { - repeated string credential_services = 1; - repeated string egress_hosts = 2; - repeated string forge_permissions = 3; - repeated string triggers = 4; - repeated string tools = 5; - repeated string env = 6; -} -// Package and denial requests act in the org the State Store derives from the -// caller's principal, else the default org. -message InstallPackageRequest { - reserved 1; - reserved "org_id"; - string name = 2; - string reference = 3; - string digest = 4; -} -message InstallPackageResponse { InstalledPackage package = 1; } -message CatalogueEntry { - string name = 1; - string surface = 2; - string version = 3; - string description = 4; - string reference = 5; - string digest = 6; -} -message ListCatalogueRequest {} -message ListCatalogueResponse { repeated CatalogueEntry packages = 1; } -message InstallFromCatalogueRequest { string name = 1; } -message InstallFromCatalogueResponse { InstalledPackage package = 1; } -message GetInstalledPackageRequest { - reserved 1; - reserved "org_id"; - string name = 2; -} -message GetInstalledPackageResponse { InstalledPackage package = 1; } -message ListInstalledPackagesRequest { - reserved 1; - reserved "org_id"; -} -message ListInstalledPackagesResponse { repeated InstalledPackage packages = 1; } -message AcceptPackageAuthorityRequest { - reserved 1; - reserved "org_id"; - string name = 2; - PackageAuthority accepted = 3; -} -message AcceptPackageAuthorityResponse { InstalledPackage package = 1; } -message RemoveInstalledPackageRequest { - reserved 1; - reserved "org_id"; - string name = 2; -} -message RemoveInstalledPackageResponse {} -message UpdatePackageRequest { string name = 1; } -message UpdatePackageResponse { InstalledPackage package = 1; } -message ApprovePackageUpdateRequest { string name = 1; } -message ApprovePackageUpdateResponse { InstalledPackage package = 1; } -message RollbackPackageRequest { string name = 1; } -message RollbackPackageResponse { InstalledPackage package = 1; } -message SetPackageUpdatePolicyRequest { - string name = 1; - string policy = 2; -} -message SetPackageUpdatePolicyResponse { InstalledPackage package = 1; } - -// Task mirrors internal/domain/workflow.Task. - -message GetPrincipalRequest { string identity_id = 1; } -// PrincipalMembership mirrors org.Membership: an identity's role in an org, -// or in one workspace of it. -message PrincipalMembership { - string org_id = 1; - string workspace_id = 2; - string role = 3; -} -// PrincipalWorkspace is one workspace of the principal's org, as policies -// read it. -message PrincipalWorkspace { - string workspace_id = 1; - string environment = 2; -} -message AccessPrincipal { - string identity_id = 1; - string org_id = 2; - repeated PrincipalMembership memberships = 3; - // workspaces are the workspaces of org_id. - repeated PrincipalWorkspace workspaces = 4; -} -message GetPrincipalResponse { AccessPrincipal principal = 1; } - -// AccessPolicy mirrors internal/domain/access.Policy: one Cedar policy -// document and the level-scope tuple that places it in the chain. -message AccessPolicy { - string policy_id = 1; - string level = 2; - string org_id = 3; - string workspace_id = 4; - string object_kind = 5; - string object_id = 6; - string text = 7; -} -message ListPoliciesRequest {} -message ListPoliciesResponse { repeated AccessPolicy policies = 1; } -message GetPoliciesVersionRequest {} -message GetPoliciesVersionResponse { int64 version = 1; } -message PutPolicyRequest { AccessPolicy policy = 1; } -message PutPolicyResponse { int64 version = 1; } -message DeletePolicyRequest { AccessPolicy policy = 1; } -message DeletePolicyResponse {} -message EnsureShippedOrgPoliciesRequest { string org_id = 1; } -message EnsureShippedOrgPoliciesResponse {} -// AccessDenial mirrors internal/domain/access.Denial: one refusal with the -// level that decided it and the deciding policies. The store coalesces -// identical denials within a minute into one row with a count. -message AccessDenial { - string org_id = 1; - string principal = 2; - string action = 3; - string resource_kind = 4; - string resource_id = 5; - string level = 6; - repeated string policies = 7; - int64 count = 8; - google.protobuf.Timestamp at = 9; -} -message RecordDenialRequest { AccessDenial denial = 1; } -message RecordDenialResponse {} -message ListDenialsRequest { - reserved 1; - reserved "org_id"; - int32 limit = 2; -} -message ListDenialsResponse { repeated AccessDenial denials = 1; } - -// Org mirrors internal/domain/org.Org: one tenant. -message Org { - string id = 1; - string name = 2; -} -// Workspace mirrors internal/domain/org.Workspace: a division of an org. -message Workspace { - string id = 1; - string org_id = 2; - string name = 3; - string environment = 4; -} -// Member mirrors internal/domain/org.Member: a membership with the identity -// it names, as the dashboard lists it. -message Member { - string identity_id = 1; - string kind = 2; - string display_name = 3; - string workspace_id = 4; - string role = 5; -} -message ListOrgsRequest {} -message ListOrgsResponse { repeated Org orgs = 1; } -message GetOrgRequest { string org_id = 1; } -message GetOrgResponse { Org org = 1; } -// CreateOrgRequest creates an org with its default workspace and its first -// owner. Only an instance admin may. -message CreateOrgRequest { - string id = 1; - string name = 2; - string owner_identity_id = 3; -} -message CreateOrgResponse { Org org = 1; } -message ListWorkspacesRequest { string org_id = 1; } -message ListWorkspacesResponse { repeated Workspace workspaces = 1; } -message CreateWorkspaceRequest { - string org_id = 1; - string id = 2; - string name = 3; - string environment = 4; -} -message CreateWorkspaceResponse { Workspace workspace = 1; } -message ListMembersRequest { string org_id = 1; } -message ListMembersResponse { repeated Member members = 1; } -message SetMembershipRequest { - string org_id = 1; - string identity_id = 2; - string workspace_id = 3; - string role = 4; -} -message SetMembershipResponse {} -message RemoveMembershipRequest { - string org_id = 1; - string identity_id = 2; - string workspace_id = 3; -} -message RemoveMembershipResponse {} -message AssignAgentRequest { - string org_id = 1; - string identity_id = 2; -} -message AssignAgentResponse {} - -message RecentLogsRequest { logging.v1.LogQuery query = 1; } -message RecentLogsResponse { logging.v1.LogSnapshot snapshot = 1; } - -// UsageRecord mirrors usage.Record. A task's record belongs to the task's -// org; any other belongs to the calling principal's org. -message UsageRecord { - reserved 1; - reserved "org_id"; - // source is task, chat or curator. - string source = 2; - int64 task_id = 3; - int64 attempt = 4; - string workflow = 5; - string step = 6; - string alias = 7; - string provider = 8; - string model = 9; - int64 input_tokens = 10; - int64 output_tokens = 11; - int64 cached_tokens = 12; - google.protobuf.Timestamp at = 13; -} -message RecordUsageRequest { UsageRecord record = 1; } -message RecordUsageResponse {} -message TaskModelsRequest { int64 task_id = 1; } -message TaskInstructionsRequest { int64 task_id = 1; } -message TaskInstructionsResponse { - string instance = 1; - string organisation = 2; -} -message TaskModelsResponse { - string org_id = 1; - map aliases = 2; - map providers = 3; -} -// ModelProvider is an org's own provider. Its key is the org's credential -// binding named after it. -message ModelProvider { - string class = 1; - string base_url = 2; - string api_key_env = 3; - // The provider's credential reference: where its key lives, never the key - // itself. A daemon resolves a model egress credential from it; without it - // every provider arrives credential-less and no runtime can be built. - string api_key_engine = 4; - string api_key_key = 5; -} -message CallerModelsRequest {} -message CallerModelsResponse { - string org_id = 1; - map aliases = 2; -} - -// Alert mirrors internal/domain/alert.Alert. Severity is info, warning or -// action; state is open, resolved or dismissed. -message Alert { - int64 id = 1; - string org_id = 2; - string kind = 3; - string subject = 4; - string severity = 5; - string title = 6; - string body = 7; - string link = 8; - bool condition = 9; - string state = 10; - google.protobuf.Timestamp first_raised = 11; - google.protobuf.Timestamp last_seen = 12; - int64 count = 13; - string closed_by = 14; - google.protobuf.Timestamp closed_at = 15; - repeated AlertDelivery deliveries = 16; -} -// AlertDelivery is one outbound notice an alert owed. Event is raised or -// resolved; state is pending, delivered, failed or skipped. -message AlertDelivery { - int64 id = 1; - string event = 2; - string state = 3; - google.protobuf.Timestamp created_at = 4; - repeated AlertAttempt attempts = 5; -} -message AlertAttempt { - int64 n = 1; - google.protobuf.Timestamp at = 2; - int64 status_code = 3; - string error = 4; -} -message RaiseAlertRequest { - string org_id = 1; - string kind = 2; - string subject = 3; - string severity = 4; - string title = 5; - string body = 6; - string link = 7; - // condition is true when the raiser resolves the alert itself once the - // condition clears; an event alert stays until dismissed. - bool condition = 8; -} -message RaiseAlertResponse { Alert alert = 1; } -message ResolveAlertRequest { - string org_id = 1; - string kind = 2; - string subject = 3; -} -message ResolveAlertResponse {} -message DismissAlertRequest { - string org_id = 1; - int64 id = 2; -} -message DismissAlertResponse {} -message ListAlertsRequest { - string org_id = 1; - // states defaults to open. - repeated string states = 2; - int32 limit = 3; -} -message ListAlertsResponse { repeated Alert alerts = 1; } -message ClaimAlertDeliveriesRequest { int32 limit = 1; } -message DueAlertDelivery { - AlertDelivery delivery = 1; - Alert alert = 2; - // attempt is the number of this try, counting from one. - int64 attempt = 3; -} -message ClaimAlertDeliveriesResponse { repeated DueAlertDelivery due = 1; } -message RecordAlertAttemptRequest { - int64 delivery_id = 1; - bool skipped = 2; - int64 status_code = 3; - // error is empty on success. - string error = 4; -} -message RecordAlertAttemptResponse {} - -message AccountSetupRequest {} -message AccountSetupResponse { bool required = 1; } -message RegisterAccountRequest { - string email = 1; - string display_name = 2; - string password = 3; - string role = 4; - bool bootstrap = 5; - string organisation_name = 6; - string workspace_name = 7; - string public_url = 8; -} -message RegisterAccountResponse { Identity identity = 1; } -message SignInAccountRequest { string email = 1; string password = 2; } -message SignInAccountResponse { - Identity identity = 1; - string token = 2; - google.protobuf.Timestamp expires_at = 3; -} -message ResolveAccountSessionRequest { string token = 1; } -message ResolveAccountSessionResponse { Identity identity = 1; } -message SignOutAccountRequest { string token = 1; } -message SignOutAccountResponse {} -message ChangeAccountPasswordRequest { string current_password = 1; string new_password = 2; } -message ChangeAccountPasswordResponse {} - -message AuthenticationSettings { - string public_url = 1; - string oidc_issuer = 2; - string oidc_audience = 3; - string oidc_client_id = 4; -} -message GetAuthenticationSettingsRequest {} -message GetAuthenticationSettingsResponse { AuthenticationSettings settings = 1; } -message SaveAuthenticationSettingsRequest { AuthenticationSettings settings = 1; } -message SaveAuthenticationSettingsResponse {} - -message BeginPasskeyRequest { bool registration = 1; } -message BeginPasskeyResponse { string token = 1; bytes options = 2; } -message FinishPasskeyRequest { string token = 1; bytes credential = 2; bool registration = 3; string name = 4; } -message FinishPasskeyResponse { Identity identity = 1; string token = 2; google.protobuf.Timestamp expires_at = 3; } -message Passkey { string id = 1; string name = 2; } -message ListPasskeysRequest {} -message ListPasskeysResponse { repeated Passkey passkeys = 1; } -message DeletePasskeyRequest { string id = 1; } -message DeletePasskeyResponse {} - -message OpenAccountSessionRequest { google.protobuf.Timestamp expires_at = 1; } -message OpenAccountSessionResponse { Identity identity = 1; string token = 2; google.protobuf.Timestamp expires_at = 3; } -message RequireFreshAccountSessionRequest { string token = 1; } -message RequireFreshAccountSessionResponse {} -message CreateAccountRecoveryRequest {} -message CreateAccountRecoveryResponse { string code = 1; } -message RecoverAccountRequest { string email = 1; string code = 2; string password = 3; } -message RecoverAccountResponse {} - -message ListOrgAgentsRequest { string org_id = 1; } -message AgentAssignment { - string identity_id = 1; - string org_id = 2; -} -message ListOrgAgentsResponse { repeated AgentAssignment agents = 1; } diff --git a/proto/state/v1/stats.proto b/proto/state/v1/stats.proto new file mode 100644 index 000000000..345bec97d --- /dev/null +++ b/proto/state/v1/stats.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; + +package state.v1; + +service StatsService { + rpc StatusCounts(StatusCountsRequest) returns (StatusCountsResponse); + rpc WorkflowStats(WorkflowStatsRequest) returns (WorkflowStatsResponse); + rpc StageStats(StageStatsRequest) returns (StageStatsResponse); + rpc TokensByDay(TokensByDayRequest) returns (TokensByDayResponse); +} + +// WorkflowStat mirrors storecontract.WorkflowStat. +message WorkflowStat { + string workflow = 1; + int64 runs = 2; + int64 merged = 3; + int64 pr_open = 4; + int64 parked = 5; + int64 avg_tokens = 6; + double avg_steps = 7; + int64 total_tokens = 8; + int64 completed = 9; +} +// StageStat mirrors storecontract.StageStat. +message StageStat { + string workflow = 1; + string stage = 2; + int64 runs = 3; + int64 avg_ms = 4; + int64 errors = 5; +} +// DayTokens mirrors storecontract.DayTokens. +message DayTokens { + string day = 1; + int64 tokens = 2; +} +message StatusCountsRequest {} +message StatusCountsResponse { map counts = 1; } +message WorkflowStatsRequest {} +message WorkflowStatsResponse { repeated WorkflowStat stats = 1; } +message StageStatsRequest {} +message StageStatsResponse { repeated StageStat stats = 1; } +message TokensByDayRequest { int64 days = 1; } +message TokensByDayResponse { repeated DayTokens tokens = 1; } diff --git a/proto/state/v1/status.proto b/proto/state/v1/status.proto new file mode 100644 index 000000000..52ff0e141 --- /dev/null +++ b/proto/state/v1/status.proto @@ -0,0 +1,115 @@ +syntax = "proto3"; + +package state.v1; + +import "google/protobuf/timestamp.proto"; +import "logging/v1/logging.proto"; + +service StatusService { + rpc RecentLogs(RecentLogsRequest) returns (RecentLogsResponse); + // Configuration snapshot: the running configuration as the dashboard + // renders it, published by the owner of configuration for the process that + // displays it. PutConfigSnapshot is administrative; GetConfigSnapshot is + // the UI's read (docs/architecture/migration-decisions.md, "Dashboard + // configuration page"). + rpc PutConfigSnapshot(PutConfigSnapshotRequest) returns (PutConfigSnapshotResponse); + rpc GetConfigSnapshot(GetConfigSnapshotRequest) returns (GetConfigSnapshotResponse); + // Channel status is what the process HOSTING the channels observes about them: + // one row per channel, written by the Messaging Service and read by the UI + // process. Administrative like the config snapshot, and for the same reason -- + // a task-scoped grant reaches neither, so authorizesTaskScopedCall admits only + // the administrative token. It is runtime state rather than a settings + // document, which is why it is not a ControlPlaneService resource kind. + rpc PutChannelStatus(PutChannelStatusRequest) returns (PutChannelStatusResponse); + rpc ListChannelStatus(ListChannelStatusRequest) returns (ListChannelStatusResponse); + // Apply status: which version of a control-plane resource each process is + // running, and why it could not. Every process that applies a resource + // publishes; the UI process reads (docs/prds/control-plane-apply-status.md). + // Both are administrative. + rpc PutApplyStatus(PutApplyStatusRequest) returns (PutApplyStatusResponse); + rpc ListApplyStatus(ListApplyStatusRequest) returns (ListApplyStatusResponse); + // Presence: every running service instance re-stamps one record, so a + // record past the staleness window means that instance is down. + // Administrative. + rpc PutPresence(PutPresenceRequest) returns (PutPresenceResponse); + rpc ListPresence(ListPresenceRequest) returns (ListPresenceResponse); +} + +// ConfigSnapshot carries the dashboard's configuration projection. document +// is opaque to the store: its shape belongs to the producer and the page that +// reads it, and schema names that shape so a reader can refuse one it does +// not understand. It is secret-free at the producer -- the projection carries +// an API key's environment variable name and whether it resolved, never a +// value. +message ConfigSnapshot { + string schema = 1; + bytes document = 2; + google.protobuf.Timestamp published_at = 3; +} +message PutConfigSnapshotRequest { ConfigSnapshot snapshot = 1; } +message PutConfigSnapshotResponse {} +message GetConfigSnapshotRequest {} +message GetConfigSnapshotResponse { + ConfigSnapshot snapshot = 1; + bool found = 2; +} +// ChannelStatus is one channel's runtime state, as the process hosting it +// observes it. ReloadSupported is a capability declaration, not a request: the +// service reports it, so a reader may offer a reload action -- but asking for one +// travels on its own surface, because a transient request and a durable state do +// not share a lifetime. +message ChannelStatus { + string id = 1; + string name = 2; + string state = 3; + string detail = 4; + bool configured = 5; + bool reload_supported = 6; + google.protobuf.Timestamp observed_at = 7; +} +message PutChannelStatusRequest { repeated ChannelStatus channels = 1; } +message PutChannelStatusResponse {} +message ListChannelStatusRequest {} +message ListChannelStatusResponse { repeated ChannelStatus channels = 1; } +// ApplyStatus is one process's report about one control-plane resource kind. +// applied_version is the version that process is running; error is set when it +// could not apply what the store returned, and leaves applied_version at the +// last version it did apply. reported_at is re-stamped on an interval, so a +// record older than the staleness window belongs to a process that has stopped +// running (docs/prds/control-plane-apply-status.md). +message ApplyStatus { + string process = 1; + string kind = 2; + int64 applied_version = 3; + string error = 4; + google.protobuf.Timestamp reported_at = 5; +} +message PutApplyStatusRequest { ApplyStatus status = 1; } +message PutApplyStatusResponse {} +message ListApplyStatusRequest {} +message ListApplyStatusResponse { repeated ApplyStatus statuses = 1; } +// Presence is one running service instance. ready and detail summarise its +// readiness probes; detail names the degraded ones. +message DependencyCheck { + string name = 1; + string status = 2; + bool ready = 3; + string detail = 4; +} +message Presence { + string service = 1; + string instance_id = 2; + string version = 3; + string install_type = 4; + google.protobuf.Timestamp started_at = 5; + google.protobuf.Timestamp reported_at = 6; + bool ready = 7; + string detail = 8; + repeated DependencyCheck checks = 9; +} +message PutPresenceRequest { Presence presence = 1; } +message PutPresenceResponse {} +message ListPresenceRequest {} +message ListPresenceResponse { repeated Presence presences = 1; } +message RecentLogsRequest { logging.v1.LogQuery query = 1; } +message RecentLogsResponse { logging.v1.LogSnapshot snapshot = 1; } diff --git a/proto/state/v1/task.proto b/proto/state/v1/task.proto new file mode 100644 index 000000000..464e2e95e --- /dev/null +++ b/proto/state/v1/task.proto @@ -0,0 +1,239 @@ +syntax = "proto3"; + +package state.v1; + +import "google/protobuf/timestamp.proto"; +import "state/v1/types.proto"; + +service TaskService { + rpc EnqueueIssue(EnqueueIssueRequest) returns (EnqueueIssueResponse); + rpc EnqueueChatTask(EnqueueChatTaskRequest) returns (EnqueueChatTaskResponse); + rpc ActiveTasksByOrigin(ActiveTasksByOriginRequest) returns (ActiveTasksByOriginResponse); + // UnpostedOutcomes lists finished chat tasks whose outcome has not yet been + // posted to their conversation; MarkOutcomePosted records that it was. + rpc UnpostedOutcomes(UnpostedOutcomesRequest) returns (UnpostedOutcomesResponse); + rpc MarkOutcomePosted(MarkOutcomePostedRequest) returns (MarkOutcomePostedResponse); + rpc ClaimNext(ClaimNextRequest) returns (ClaimNextResponse); + rpc ClaimByIssue(ClaimByIssueRequest) returns (ClaimByIssueResponse); + rpc Transition(TransitionRequest) returns (TransitionResponse); + rpc Update(UpdateRequest) returns (UpdateResponse); + // TaskModels answers what a task's models resolve against: the aliases its + // org may use and the org's own providers. The org is the task's, never + // the caller's. + rpc TaskModels(TaskModelsRequest) returns (TaskModelsResponse); + // TaskInstructions answers the instance and organisation instructions a + // task's agent runs follow. Organisation is empty for a system-org task. + rpc TaskInstructions(TaskInstructionsRequest) returns (TaskInstructionsResponse); + rpc Requeue(RequeueRequest) returns (RequeueResponse); + rpc ParkTask(ParkTaskRequest) returns (ParkTaskResponse); + rpc RecoverStale(RecoverStaleRequest) returns (RecoverStaleResponse); + rpc ArchiveTask(ArchiveTaskRequest) returns (ArchiveTaskResponse); + rpc RetryTask(RetryTaskRequest) returns (RetryTaskResponse); + rpc TaskByIssue(TaskByIssueRequest) returns (TaskByIssueResponse); + rpc OpenTaskByPR(OpenTaskByPRRequest) returns (OpenTaskByPRResponse); + rpc TaskByID(TaskByIDRequest) returns (TaskByIDResponse); + rpc OpenPRs(OpenPRsRequest) returns (OpenPRsResponse); + rpc ClearTerminalTasks(ClearTerminalTasksRequest) returns (ClearTerminalTasksResponse); + rpc Tasks(TasksRequest) returns (TasksResponse); + // WorkflowCaller: a workflow.call step starts its callee and, with + // wait:true, reads it back while waiting. Both are the one sanctioned + // widening of a task-scoped grant -- the callee is the caller's child + // (docs/prds/workflow-calls.md). CallStatus re-checks the parent-child + // relation server-side, so the grant only names the caller. + rpc EnqueueCallTask(EnqueueCallTaskRequest) returns (EnqueueCallTaskResponse); + rpc WorkflowCallStatus(WorkflowCallStatusRequest) returns (WorkflowCallStatusResponse); +} + +message EnqueueIssueRequest { + string owner = 1; + string repo = 2; + int64 number = 3; + string title = 4; + string body = 5; + string labels = 6; + string identity = 7; +} +message EnqueueIssueResponse { bool inserted = 1; } +message ActiveTasksByOriginRequest { string origin = 1; } +message ActiveTasksByOriginResponse { repeated Task tasks = 1; } +message UnpostedOutcomesRequest {} +message UnpostedOutcomesResponse { repeated Task tasks = 1; } +message MarkOutcomePostedRequest { + int64 task_id = 1; + // status is the task status whose state was posted. + string status = 2; +} +message MarkOutcomePostedResponse {} +message EnqueueChatTaskRequest { + string owner = 1; + string repo = 2; + string title = 3; + string body = 4; + string workflow = 5; + string identity = 6; + // inputs_json assigns workflow inputs, a JSON object of the same form + // EnqueueBindingTaskRequest carries. A chat task sets them at insert + // time: it has no binding provenance to stamp afterwards. + string inputs_json = 7; + // origin names the conversation that created the task; empty for none. + string origin = 8; + // draft_yaml, when set, makes the task a test run of that unsaved + // definition: it is pinned to it and writes nothing to a forge. + string draft_yaml = 9; +} +message EnqueueChatTaskResponse { Task task = 1; } +message ClaimNextRequest {} +message ClaimNextResponse { + Task task = 1; + bool found = 2; +} +message ClaimByIssueRequest { + string owner = 1; + string repo = 2; + int64 number = 3; +} +message ClaimByIssueResponse { + Task task = 1; + bool found = 2; +} +message TransitionRequest { + int64 task_id = 1; + string from = 2; + string to = 3; + string detail = 4; +} +message TransitionResponse {} +message UpdateRequest { Task task = 1; } +message UpdateResponse {} +message RequeueRequest { + int64 task_id = 1; + string from_status = 2; + string workflow = 3; +} +message RequeueResponse {} +message ParkTaskRequest { + int64 task_id = 1; + string from = 2; + string detail = 3; + string class = 4; + string blocker = 5; +} +message ParkTaskResponse {} +message RecoverStaleRequest {} +message RecoverStaleResponse { int64 count = 1; } +message ArchiveTaskRequest { + int64 task_id = 1; + string from_status = 2; + Event audit = 3; +} +message ArchiveTaskResponse { int64 event_id = 1; } +message RetryTaskRequest { + int64 task_id = 1; + string from_status = 2; + string workflow = 3; + // retry_mode is the operator's worktree choice (taskstate.RetryMode) the + // requeue persists. Empty reads as refresh_onto_base. + string retry_mode = 4; + // resume_from is the stage the attempt starts at, and resume_after the + // stage before it whose recorded results it starts with (task.Resume). + string resume_from = 5; + string resume_after = 6; + // current_definition clears the pinned definition so the next dispatch + // pins the workflow's current stored version. + bool current_definition = 7; +} +message RetryTaskResponse {} +message TaskByIssueRequest { + string owner = 1; + string repo = 2; + int64 number = 3; +} +message TaskByIssueResponse { + Task task = 1; + bool found = 2; +} +message OpenTaskByPRRequest { + string owner = 1; + string repo = 2; + int64 number = 3; +} +message OpenTaskByPRResponse { + Task task = 1; + bool found = 2; +} +message TaskByIDRequest { int64 task_id = 1; } +message TaskByIDResponse { + Task task = 1; + bool found = 2; +} +message OpenPRsRequest {} +message OpenPRsResponse { repeated Task tasks = 1; } +message ClearTerminalTasksRequest {} +message ClearTerminalTasksResponse { int64 count = 1; } +// TasksRequest selects one page of tasks, most recently updated first. Empty +// statuses matches every status; after_id 0 starts at the newest task. +message TasksRequest { + int64 limit = 1; + repeated string statuses = 2; + google.protobuf.Timestamp after_updated_at = 3; + int64 after_id = 4; + // workflow, when set, keeps only that workflow's tasks. + string workflow = 5; +} +message TasksResponse { repeated Task tasks = 1; } +// workflow.call: the caller's grant names the caller; the store derives the +// rest from the caller's row (docs/prds/workflow-calls.md). +message EnqueueCallTaskRequest { + int64 caller_task_id = 1; + string workflow = 2; + string inputs_json = 3; + // call_key is the call site's durable identity: the call step's declared + // path within the run, plus the workflow it starts (so one task running a + // second definition at a colliding path does not reuse the first callee's + // child). The store stamps it on the child and, when the caller already + // started a child under it, returns that child instead of starting a second + // one. Required: a retry of one call site carries the same key, so the retry + // cannot duplicate the child's work. + string call_key = 4; +} +message EnqueueCallTaskResponse { + Task task = 1; + bool accepted = 2; +} +message WorkflowCallStatusRequest { + int64 caller_task_id = 1; + int64 call_task_id = 2; +} +message WorkflowCallStatusResponse { + // status is the callee's task status and detail its latest transition + // detail (empty before the callee first moves). outputs_json is the + // callee's written outputs (task.EncodeOutputs), so a wait:true caller can + // publish one as its own (docs/prds/workflow-call-outputs.md, "Storage and + // wire"). + string status = 1; + string detail = 2; + string outputs_json = 3; +} +message TaskModelsRequest { int64 task_id = 1; } +message TaskInstructionsRequest { int64 task_id = 1; } +message TaskInstructionsResponse { + string instance = 1; + string organisation = 2; +} +message TaskModelsResponse { + string org_id = 1; + map aliases = 2; + map providers = 3; +} +// ModelProvider is an org's own provider. Its key is the org's credential +// binding named after it. +message ModelProvider { + string class = 1; + string base_url = 2; + string api_key_env = 3; + // The provider's credential reference: where its key lives, never the key + // itself. A daemon resolves a model egress credential from it; without it + // every provider arrives credential-less and no runtime can be built. + string api_key_engine = 4; + string api_key_key = 5; +} diff --git a/proto/state/v1/task_event.proto b/proto/state/v1/task_event.proto new file mode 100644 index 000000000..7f851e938 --- /dev/null +++ b/proto/state/v1/task_event.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package state.v1; + +import "state/v1/types.proto"; + +service TaskEventService { + rpc InsertEvent(InsertEventRequest) returns (InsertEventResponse); + rpc EventsSince(EventsSinceRequest) returns (EventsSinceResponse); + rpc TaskEvents(TaskEventsRequest) returns (TaskEventsResponse); +} + +message InsertEventRequest { Event event = 1; } +message InsertEventResponse { int64 id = 1; } +message EventsSinceRequest { + // since_id is the opaque resume cursor returned by the previous page (the SSE + // id: field, echoed back as Last-Event-ID). Empty means "from the + // beginning". The field keeps its name and number so the wire name stays + // put; only its type widened, from the SQLite rowid to the fixed-width + // "|" cursor. + string since_id = 1; + int64 limit = 2; +} +message EventsSinceResponse { repeated Event events = 1; } +message TaskEventsRequest { int64 task_id = 1; } +message TaskEventsResponse { repeated Event events = 1; } diff --git a/proto/state/v1/task_grant.proto b/proto/state/v1/task_grant.proto new file mode 100644 index 000000000..9cb899112 --- /dev/null +++ b/proto/state/v1/task_grant.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +package state.v1; + +// Administrative task credential lifecycle. Worker credentials cannot call these. +service TaskGrantService { + rpc RegisterTaskGrant(RegisterTaskGrantRequest) returns (RegisterTaskGrantResponse); + rpc RevokeTaskGrant(RevokeTaskGrantRequest) returns (RevokeTaskGrantResponse); + rpc ResolveTaskGrant(ResolveTaskGrantRequest) returns (ResolveTaskGrantResponse); +} + +message RegisterTaskGrantRequest { + int64 task_id = 1; + string token = 2; + int64 lifetime_seconds = 3; +} +message RegisterTaskGrantResponse {} +message RevokeTaskGrantRequest { + string token = 1; +} +message RevokeTaskGrantResponse {} +// ResolveTaskGrantRequest names a run credential; the response is the task +// it was issued for. +message ResolveTaskGrantRequest { string token = 1; } +message ResolveTaskGrantResponse { + int64 task_id = 1; + // Canonical execution identity; empty names the instance root RPC route. + string execution_identity = 2; + // Canonical principal, including the instance root. + string principal_id = 3; +} diff --git a/proto/state/v1/task_log.proto b/proto/state/v1/task_log.proto new file mode 100644 index 000000000..297f1b08a --- /dev/null +++ b/proto/state/v1/task_log.proto @@ -0,0 +1,89 @@ +syntax = "proto3"; + +package state.v1; + +import "google/protobuf/timestamp.proto"; + +// One task attempt's persisted log. Task log files live in the state +// directory this process owns, so the dashboard reads them over this contract +// rather than opening them itself +// (deployments/README.md). +service TaskLogService { + rpc ReadTaskLog(ReadTaskLogRequest) returns (ReadTaskLogResponse); + // StreamTaskLogContent returns one attempt's log verbatim, one chunk per + // message, for a download. A log file is unbounded input (it rotates at + // DefaultMaxSizeMB), so a unary response would exceed gRPC's 4MiB message + // cap on a real log -- the same reason ListCaptures was superseded by + // StreamCaptures. + rpc StreamTaskLogContent(StreamTaskLogContentRequest) returns (stream StreamTaskLogContentResponse); +} + +// TaskLogEntry mirrors internal/logging.Entry: one decoded log line. fields +// carries every remaining key as a JSON object string, the same way Event +// carries its data, so structured context survives the hop without this +// contract having to know what a call site attached. +message TaskLogEntry { + int64 id = 1; + google.protobuf.Timestamp time = 2; + string level = 3; + string msg = 4; + string fields_json = 5; +} +// ReadTaskLog returns a page of one task attempt's decoded log. attempt is the +// attempt the caller resolved (the dashboard sends the task's current attempt +// when the request omitted one). levels, component, contains, since and until +// carry the whole query the logging package's Tail accepts -- the wire mirrors +// that query rather than a subset of it, so a filter cannot silently stop +// working by crossing the boundary. limit is caller-capped +// (docs/prds/state-store-contract.md §8: the log cap is 2000). +message ReadTaskLogRequest { + int64 task_id = 1; + int64 attempt = 2; + int64 limit = 3; + repeated string levels = 4; + string component = 5; + string contains = 6; + google.protobuf.Timestamp since = 7; + google.protobuf.Timestamp until = 8; + // stage filters on an entry's own "stage" field. Only entries a stage + // tagged carry one -- agent and tool output is logged without a stage, so a + // stage filter narrows the file rather than covering it. Empty means any. + string stage = 9; + // before_id is the byte-offset cursor a previous page returned as cursor: the + // read returns the most recent matching entries ending at or before it. Zero + // reads the tail, which is the page the dashboard opens on. + int64 before_id = 10; +} +// found=false is not an error: the task has no log file for that attempt. +// That is a different condition from a process that cannot read logs at all +// (codes.Unavailable), and the dashboard reports them differently. +message ReadTaskLogResponse { + repeated TaskLogEntry entries = 1; + bool truncated = 2; + int64 attempt = 3; + bool found = 4; + repeated string components = 5; + // file is the path read, so the page can name where the log came from. It + // is the state directory's own layout, reported to an already-authenticated + // operator; no caller is expected to open it. + string file = 6; + // more_available reports matching entries did not fit in this page; cursor + // is the before_id for the next older one. truncated is separate: it means + // the log is larger than the readable scan window, so its oldest entries + // cannot be reached by paging at all. + bool more_available = 7; + int64 cursor = 8; +} +// StreamTaskLogContent returns one attempt's log verbatim, for a download. The +// bytes are the file's own JSONL, not a re-encoding of it: this contract +// transports the log, it does not restate the format. found=false, with no +// chunks, means the attempt has no log file -- not an error. +message StreamTaskLogContentRequest { + int64 task_id = 1; + int64 attempt = 2; +} +message StreamTaskLogContentResponse { + bytes chunk = 1; + int64 attempt = 2; + bool found = 3; +} diff --git a/proto/state/v1/types.proto b/proto/state/v1/types.proto new file mode 100644 index 000000000..9f330b313 --- /dev/null +++ b/proto/state/v1/types.proto @@ -0,0 +1,161 @@ +syntax = "proto3"; + +package state.v1; + +import "google/protobuf/timestamp.proto"; + +message Identity { + string id = 1; + string kind = 2; + string display_name = 3; + string lifecycle = 4; + int64 version = 5; + google.protobuf.Timestamp created_at = 6; + google.protobuf.Timestamp updated_at = 7; +} +// Task mirrors internal/domain/workflow.Task. +message Task { + int64 id = 1; + string owner = 2; + string repo = 3; + int64 issue_number = 4; + string title = 5; + string body = 6; + string labels = 7; + string status = 8; + string workflow = 9; + // Retired: the per-task "current stage" column was overwritten as + // workflow.Run advanced and carried no history. step_executions is the + // durable per-step record now (docs/prds/execution-tree-state-machine.md); + // ListSteps is its read. + string stage = 10 [deprecated = true]; + string branch = 11; + string plan = 12; + string notes = 13; + int64 pr_number = 14; + int64 tokens_used = 15; + int64 iterations = 16; + int64 attempt = 17; + string park_reason = 18; + int64 retry_count = 19; + int64 watch_comment_id = 20; + string source = 21; + string identity = 22; + string binding_id = 23; + int64 binding_version = 24; + google.protobuf.Timestamp created_at = 25; + google.protobuf.Timestamp updated_at = 26; + // review_payload is the JSON-encoded review unit the remediate workflow's + // current run must address (docs/prds/pr-review-remediation.md decision 4). + string review_payload = 27; + // The workflow pin: the exact definition version this run started with. + // It has to cross the wire for the daemon's digest guard to hold, because + // a retry reads the task back over this contract before deciding whether + // to reuse the pinned YAML (docs/prds/runtime-control-plane.md:95). + int64 workflow_definition_version = 28; + string workflow_definition_digest = 29; + string workflow_definition_yaml = 30; + // review_cursor is the poll backstop's high-water mark over forge review + // IDs for this task. It is separate from watch_comment_id (the review- + // comment cursor) because the two forge sequences are independent; one + // combined cursor would silently skip reviews once a larger comment ID + // landed (docs/prds/pr-review-remediation.md decision 2). + int64 review_cursor = 31; + // park_class is the producer-recorded answer to "what kind of + // intervention does this park need?" (taskstate.ParkClass: + // needs_decision, transient, terminal). Store-side normalization makes + // empty and unknown values needs_decision, so the class is advisory on + // the wire and authoritative only as recorded at the park site. + string park_class = 32; + // remediation_rounds counts review-triggered remediation rounds + // separately from retry_count, so an operator's manual retries no + // longer draw down the review-remediation budget (and vice versa). + int32 remediation_rounds = 33; + // inputs_json is the JSON object of workflow inputs a binding dispatch + // resolved (task.EncodeInputs); empty for a task no binding started. + string inputs_json = 34; + // org is the org the task belongs to, derived store-side from the task's + // identity when the row is written; a task of a single-operator install + // belongs to the default org (docs/prds/orgs-and-access.md). + string org = 35; + // The workflow.call linkage (docs/prds/workflow-calls.md): the task whose + // workflow.call step started this one (0 on a root run) and how many + // call hops this row is from that root. Columns default, so an older + // writer reads as a depth-0 root run. + int64 call_parent_task_id = 36; + int32 call_depth = 37; + // outputs_json is the JSON object of declared-output values this run wrote + // (task.EncodeOutputs), empty for a run that wrote none. The container's + // Update sends the whole row, so a column the message cannot carry is a + // column that write drops (docs/prds/workflow-call-outputs.md, "Storage and + // wire"). + string outputs_json = 38; + // review_gate is the operator-approval gate's whole conversation with the + // operator (docs/prds/pr-review-operator-response.md): the offer the gate + // wrote before waiting, and the answer the response path filled in. It is + // opaque here -- internal/domain/workflow/prreview owns the encoding -- but + // it must cross so the dashboard can render the offer and the resumed run + // can read the answer. + string review_gate = 39; + // rereview_rounds counts granted operator re-reviews, capped by + // prreview.MaxRereviewRounds in the guarded response write. It is separate + // from retry_count and remediation_rounds for the same reason those are + // separate from each other. + int64 rereview_rounds = 40; + // retry_mode is the operator's worktree choice for the next dispatch + // (taskstate.RetryMode: refresh_onto_base, continue_pushed_work). The retry + // action writes it and the daemon's prepareWorkspace reads it, so it must + // cross the wire for a retry to land on the source the operator chose. The + // empty string reads as refresh_onto_base. + string retry_mode = 41; + // resume_from is the stage the next attempt starts at; empty runs every + // stage. resume_results are the step results (JSON) it starts with. + string resume_from = 42; + bytes resume_results = 43; + // origin names the conversation that created the task; empty for none. + string origin = 44; + // workspace is the workspace of its org the task belongs to; read-only + // here. + string workspace = 45; + // binding_signature and binding_addr are the signature result and address + // of the captured event that started a binding task. + string binding_signature = 46; + string binding_addr = 47; + // park_blocker names what a parked task is missing (taskstate.Blocker), + // recorded at the park site; empty when the park has no known fix. + string park_blocker = 48; + reserved 49; + reserved "plan_view"; + // plan_document is the structured plan (JSON) plan was rendered from. + string plan_document = 50; +} +// Event mirrors internal/events.Event. Data is carried as a JSON object +// string (matching the store's own on-disk representation) rather than +// google.protobuf.Struct, to stay a direct mirror of the existing column. +message Event { + int64 id = 1; + google.protobuf.Timestamp at = 2; + string kind = 3; + int64 task_id = 4; + string repo = 5; + int64 issue = 6; + string workflow = 7; + string stage = 8; + // attempt is the run this event belongs to. Zero means UNATTRIBUTED, not a + // first attempt: rows written before the field existed, and the deliberately + // task-agnostic producers, all carry zero. A reader must report those as + // unattributable rather than presenting them as one run. + int64 attempt = 11; + string detail = 9; + string data_json = 10; + // Attribution. actor_id is the identity that performed the action and + // actor_kind its kind, so a reader can tell an agent's action from a person's + // without resolving the identity. principal_id is the identity whose authority + // the action used, which is a different fact when an agent acts under a + // person's standing approval; empty means unattributed. All three must cross + // this boundary: a record whose attribution survives only in `detail` is not + // queryable, which is the attribution this design exists to replace. + string actor_id = 12; + string actor_kind = 13; + string principal_id = 14; +}