From 75d2b47df3b6e4362003c72808688211c8659e22 Mon Sep 17 00:00:00 2001 From: Gert Drapers <1533850+gertd@users.noreply.github.com> Date: Wed, 7 Aug 2024 19:31:17 -0700 Subject: [PATCH 1/2] update go-grpc --- aserto/api/v1/account.pb.go | 6 +- aserto/api/v1/change.pb.go | 4 +- aserto/api/v1/connection.pb.go | 259 ++-- aserto/api/v1/fields.pb.go | 6 +- aserto/api/v1/identity_context.pb.go | 6 +- aserto/api/v1/invite.pb.go | 6 +- aserto/api/v1/log.pb.go | 4 +- aserto/api/v1/metadata.pb.go | 8 +- aserto/api/v1/name_availability.pb.go | 4 +- aserto/api/v1/nats.pb.go | 6 +- aserto/api/v1/pagination.pb.go | 8 +- aserto/api/v1/policy_builder.pb.go | 6 +- aserto/api/v1/policy_context.pb.go | 6 +- aserto/api/v1/policy_image.pb.go | 6 +- aserto/api/v1/policy_repo.pb.go | 6 +- aserto/api/v1/policyref.pb.go | 8 +- aserto/api/v1/registry.pb.go | 12 +- aserto/api/v1/registry_org.pb.go | 6 +- aserto/api/v1/scc_org.pb.go | 6 +- aserto/api/v1/tenant.pb.go | 8 +- aserto/api/v1/user.pb.go | 24 +- aserto/api/v2/connection_events.pb.go | 10 +- aserto/api/v2/identity.pb.go | 8 +- aserto/api/v2/instance.pb.go | 8 +- aserto/api/v2/instance_events.pb.go | 8 +- aserto/api/v2/management.pb.go | 16 +- aserto/api/v2/pagination.pb.go | 8 +- aserto/api/v2/policy.pb.go | 8 +- aserto/api/v2/policyref_events.pb.go | 8 +- aserto/api/v2/repository.pb.go | 6 +- aserto/api/v2/source.pb.go | 6 +- aserto/api/v2/user.pb.go | 6 +- aserto/api/v2/workflows.pb.go | 12 +- .../authorizer/authorizer/v1/authorizer.pb.go | 1104 +++++++++++++++++ .../authorizer/v1/authorizer.pb.gw.go | 318 +++++ .../authorizer/v1/authorizer_grpc.pb.go | 195 +++ .../authorizer/directory/v1/directory.pb.go | 172 +-- .../directory/v1/directory.pb.gw.go | 19 +- .../directory/v1/directory_grpc.pb.go | 209 ++-- aserto/authorizer/policy/v1/policy.pb.go | 20 +- aserto/authorizer/policy/v1/policy.pb.gw.go | 9 +- aserto/authorizer/policy/v1/policy_grpc.pb.go | 34 +- aserto/common/info/v1/info.pb.go | 14 +- aserto/common/info/v1/info.pb.gw.go | 9 +- aserto/common/info/v1/info_grpc.pb.go | 28 +- aserto/decision_logs/v1/decision_logs.pb.go | 44 +- .../decision_logs/v1/decision_logs.pb.gw.go | 9 +- .../decision_logs/v1/decision_logs_grpc.pb.go | 87 +- aserto/discovery/v1/discovery.pb.go | 10 +- aserto/discovery/v1/discovery.pb.gw.go | 9 +- aserto/discovery/v1/discovery_grpc.pb.go | 28 +- aserto/discovery/v2/discovery.pb.go | 10 +- aserto/discovery/v2/discovery.pb.gw.go | 9 +- aserto/discovery/v2/discovery_grpc.pb.go | 28 +- aserto/funnel/v1/funnel.pb.go | 16 +- aserto/funnel/v1/funnel.pb.gw.go | 9 +- aserto/funnel/v1/funnel_grpc.pb.go | 34 +- aserto/idpplugin/v1/idpplugin.pb.go | 30 +- aserto/idpplugin/v1/idpplugin.pb.gw.go | 29 +- aserto/idpplugin/v1/idpplugin_grpc.pb.go | 200 +-- aserto/management/v2/control_plane.pb.go | 12 +- aserto/management/v2/control_plane.pb.gw.go | 9 +- aserto/management/v2/control_plane_grpc.pb.go | 31 +- aserto/management/v2/controller.pb.go | 8 +- aserto/management/v2/controller.pb.gw.go | 9 +- aserto/management/v2/controller_grpc.pb.go | 72 +- aserto/options/v1/events.pb.go | 6 +- aserto/options/v1/ids.pb.go | 4 +- aserto/registry/v1/registry.pb.go | 52 +- aserto/registry/v1/registry.pb.gw.go | 9 +- aserto/registry/v1/registry_grpc.pb.go | 61 +- aserto/registry_tenant/v1/policy.pb.go | 28 +- aserto/registry_tenant/v1/policy.pb.gw.go | 9 +- aserto/registry_tenant/v1/policy_grpc.pb.go | 43 +- aserto/registry_tenant/v1/policy_repo.pb.go | 28 +- .../registry_tenant/v1/policy_repo.pb.gw.go | 9 +- .../registry_tenant/v1/policy_repo_grpc.pb.go | 43 +- aserto/registry_tenant/v1/tenant.pb.go | 12 +- aserto/registry_tenant/v1/tenant.pb.gw.go | 9 +- aserto/registry_tenant/v1/tenant_grpc.pb.go | 31 +- aserto/scribe/v2/scribe.pb.go | 8 +- aserto/scribe/v2/scribe.pb.gw.go | 19 +- aserto/scribe/v2/scribe_grpc.pb.go | 86 +- aserto/tenant/account/v1/account.pb.go | 22 +- aserto/tenant/account/v1/account.pb.gw.go | 9 +- aserto/tenant/account/v1/account_grpc.pb.go | 37 +- aserto/tenant/connection/v1/connection.pb.go | 36 +- .../tenant/connection/v1/connection.pb.gw.go | 9 +- .../connection/v1/connection_grpc.pb.go | 49 +- aserto/tenant/onboarding/v1/onboarding.pb.go | 16 +- .../tenant/onboarding/v1/onboarding.pb.gw.go | 9 +- .../onboarding/v1/onboarding_grpc.pb.go | 34 +- aserto/tenant/policy/v1/policy.pb.go | 30 +- aserto/tenant/policy/v1/policy.pb.gw.go | 9 +- aserto/tenant/policy/v1/policy_grpc.pb.go | 43 +- .../policy_builder/v1/policy_builder.pb.go | 16 +- .../policy_builder/v1/policy_builder.pb.gw.go | 9 +- .../v1/policy_builder_grpc.pb.go | 34 +- aserto/tenant/profile/v1/profile.pb.go | 24 +- aserto/tenant/profile/v1/profile.pb.gw.go | 9 +- aserto/tenant/profile/v1/profile_grpc.pb.go | 40 +- aserto/tenant/provider/v1/provider.pb.go | 16 +- aserto/tenant/provider/v1/provider.pb.gw.go | 9 +- aserto/tenant/provider/v1/provider_grpc.pb.go | 34 +- aserto/tenant/registry/v1/registry.pb.go | 44 +- aserto/tenant/registry/v1/registry.pb.gw.go | 9 +- aserto/tenant/registry/v1/registry_grpc.pb.go | 55 +- aserto/tenant/scc/v1/scc.pb.go | 36 +- aserto/tenant/scc/v1/scc.pb.gw.go | 9 +- aserto/tenant/scc/v1/scc_grpc.pb.go | 46 +- aserto/tenant/v2/account.pb.go | 8 +- aserto/tenant/v2/account.pb.gw.go | 9 +- aserto/tenant/v2/account_grpc.pb.go | 28 +- aserto/tenant/v2/instance.pb.go | 20 +- aserto/tenant/v2/instance.pb.gw.go | 9 +- aserto/tenant/v2/instance_grpc.pb.go | 37 +- aserto/tenant/v2/policy.pb.go | 32 +- aserto/tenant/v2/policy.pb.gw.go | 9 +- aserto/tenant/v2/policy_grpc.pb.go | 43 +- aserto/tenant/v2/policy_state.pb.go | 12 +- aserto/tenant/v2/policy_state.pb.gw.go | 9 +- aserto/tenant/v2/policy_state_grpc.pb.go | 31 +- aserto/tenant/v2/repository.pb.go | 20 +- aserto/tenant/v2/repository.pb.gw.go | 9 +- aserto/tenant/v2/repository_grpc.pb.go | 37 +- aserto/tenant/v2/source.pb.go | 20 +- aserto/tenant/v2/source.pb.gw.go | 9 +- aserto/tenant/v2/source_grpc.pb.go | 37 +- aserto/tenant/v2/tenant.pb.go | 8 +- aserto/tenant/v2/tenant.pb.gw.go | 9 +- aserto/tenant/v2/tenant_grpc.pb.go | 28 +- buf.gen.yaml | 16 + buf.yaml | 24 + buf/buf.gen.yaml | 11 - go.mod | 19 +- go.sum | 34 +- go.work | 6 - mage.go | 13 - magefiles/go.mod | 48 - magefiles/go.sum | 549 -------- magefiles/magefile.go | 139 --- makefile | 175 +++ 142 files changed, 3662 insertions(+), 2279 deletions(-) create mode 100644 aserto/authorizer/authorizer/v1/authorizer.pb.go create mode 100644 aserto/authorizer/authorizer/v1/authorizer.pb.gw.go create mode 100644 aserto/authorizer/authorizer/v1/authorizer_grpc.pb.go create mode 100644 buf.gen.yaml create mode 100644 buf.yaml delete mode 100644 buf/buf.gen.yaml delete mode 100644 go.work delete mode 100644 mage.go delete mode 100644 magefiles/go.mod delete mode 100644 magefiles/go.sum delete mode 100644 magefiles/magefile.go create mode 100644 makefile diff --git a/aserto/api/v1/account.pb.go b/aserto/api/v1/account.pb.go index 2074740..4b3bf7c 100644 --- a/aserto/api/v1/account.pb.go +++ b/aserto/api/v1/account.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/account.proto @@ -144,7 +144,7 @@ func file_aserto_api_v1_account_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_account_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v1_account_proto_goTypes = []interface{}{ +var file_aserto_api_v1_account_proto_goTypes = []any{ (*Account)(nil), // 0: aserto.api.v1.Account (*Tenant)(nil), // 1: aserto.api.v1.Tenant } @@ -165,7 +165,7 @@ func file_aserto_api_v1_account_proto_init() { } file_aserto_api_v1_tenant_proto_init() if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_account_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Account); i { case 0: return &v.state diff --git a/aserto/api/v1/change.pb.go b/aserto/api/v1/change.pb.go index 5a16cc4..56e91bc 100644 --- a/aserto/api/v1/change.pb.go +++ b/aserto/api/v1/change.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/change.proto @@ -105,7 +105,7 @@ func file_aserto_api_v1_change_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_change_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_aserto_api_v1_change_proto_goTypes = []interface{}{ +var file_aserto_api_v1_change_proto_goTypes = []any{ (ChangeType)(0), // 0: aserto.api.v1.ChangeType } var file_aserto_api_v1_change_proto_depIdxs = []int32{ diff --git a/aserto/api/v1/connection.pb.go b/aserto/api/v1/connection.pb.go index eeb7e03..29137dd 100644 --- a/aserto/api/v1/connection.pb.go +++ b/aserto/api/v1/connection.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/connection.proto @@ -26,34 +26,36 @@ const ( type ProviderID int32 const ( - ProviderID_PROVIDER_ID_UNKNOWN ProviderID = 0 - ProviderID_PROVIDER_ID_ACMECORP ProviderID = 1 - ProviderID_PROVIDER_ID_ASERTO_REGISTRY ProviderID = 2 - ProviderID_PROVIDER_ID_BUNDLER ProviderID = 3 - ProviderID_PROVIDER_ID_AUTH0 ProviderID = 4 - ProviderID_PROVIDER_ID_DECISION_LOGS ProviderID = 5 - ProviderID_PROVIDER_ID_DISCOVERY ProviderID = 6 - ProviderID_PROVIDER_ID_EDGE_DIRECTORY ProviderID = 7 - ProviderID_PROVIDER_ID_GHCR_PAT ProviderID = 8 - ProviderID_PROVIDER_ID_GITHUB ProviderID = 9 - ProviderID_PROVIDER_ID_GITHUB_PAT ProviderID = 10 - ProviderID_PROVIDER_ID_GITLAB_PAT ProviderID = 11 - ProviderID_PROVIDER_ID_AUTHORIZER ProviderID = 12 - ProviderID_PROVIDER_ID_OKTA ProviderID = 13 - ProviderID_PROVIDER_ID_OPCR ProviderID = 14 - ProviderID_PROVIDER_ID_OPCR_PUBLIC ProviderID = 15 - ProviderID_PROVIDER_ID_EDGE_AUTHORIZER ProviderID = 16 - ProviderID_PROVIDER_ID_CITADEL ProviderID = 17 - ProviderID_PROVIDER_ID_DIRECTORY ProviderID = 18 - ProviderID_PROVIDER_ID_AZUREAD ProviderID = 19 - ProviderID_PROVIDER_ID_COGNITO ProviderID = 20 - ProviderID_PROVIDER_ID_GOOGLE_WORKSPACE ProviderID = 21 - ProviderID_PROVIDER_ID_GOOGLE_DRIVE ProviderID = 22 - ProviderID_PROVIDER_ID_SIMPLE_RBAC ProviderID = 23 - ProviderID_PROVIDER_ID_LDAP ProviderID = 24 - ProviderID_PROVIDER_ID_TODO_DATA ProviderID = 25 - ProviderID_PROVIDER_ID_SLACK_DATA ProviderID = 26 - ProviderID_PROVIDER_ID_GITHUB_DATA ProviderID = 27 + ProviderID_PROVIDER_ID_UNKNOWN ProviderID = 0 + ProviderID_PROVIDER_ID_ACMECORP ProviderID = 1 + ProviderID_PROVIDER_ID_ASERTO_REGISTRY ProviderID = 2 + ProviderID_PROVIDER_ID_BUNDLER ProviderID = 3 + ProviderID_PROVIDER_ID_AUTH0 ProviderID = 4 + ProviderID_PROVIDER_ID_DECISION_LOGS ProviderID = 5 + ProviderID_PROVIDER_ID_DISCOVERY ProviderID = 6 + ProviderID_PROVIDER_ID_EDGE_DIRECTORY ProviderID = 7 + ProviderID_PROVIDER_ID_GHCR_PAT ProviderID = 8 + ProviderID_PROVIDER_ID_GITHUB ProviderID = 9 + ProviderID_PROVIDER_ID_GITHUB_PAT ProviderID = 10 + ProviderID_PROVIDER_ID_GITLAB_PAT ProviderID = 11 + ProviderID_PROVIDER_ID_AUTHORIZER ProviderID = 12 + ProviderID_PROVIDER_ID_OKTA ProviderID = 13 + ProviderID_PROVIDER_ID_OPCR ProviderID = 14 + ProviderID_PROVIDER_ID_OPCR_PUBLIC ProviderID = 15 + ProviderID_PROVIDER_ID_EDGE_AUTHORIZER ProviderID = 16 + ProviderID_PROVIDER_ID_CITADEL ProviderID = 17 + ProviderID_PROVIDER_ID_DIRECTORY ProviderID = 18 + ProviderID_PROVIDER_ID_AZUREAD ProviderID = 19 + ProviderID_PROVIDER_ID_COGNITO ProviderID = 20 + ProviderID_PROVIDER_ID_GOOGLE_WORKSPACE ProviderID = 21 + ProviderID_PROVIDER_ID_GOOGLE_DRIVE ProviderID = 22 + ProviderID_PROVIDER_ID_SIMPLE_RBAC ProviderID = 23 + ProviderID_PROVIDER_ID_LDAP ProviderID = 24 + ProviderID_PROVIDER_ID_TODO_DATA ProviderID = 25 + ProviderID_PROVIDER_ID_SLACK_DATA ProviderID = 26 + ProviderID_PROVIDER_ID_GITHUB_DATA ProviderID = 27 + ProviderID_PROVIDER_ID_MULTI_TENANT_DATA ProviderID = 28 + ProviderID_PROVIDER_ID_API_AUTH_DATA ProviderID = 29 ) // Enum value maps for ProviderID. @@ -87,36 +89,40 @@ var ( 25: "PROVIDER_ID_TODO_DATA", 26: "PROVIDER_ID_SLACK_DATA", 27: "PROVIDER_ID_GITHUB_DATA", + 28: "PROVIDER_ID_MULTI_TENANT_DATA", + 29: "PROVIDER_ID_API_AUTH_DATA", } ProviderID_value = map[string]int32{ - "PROVIDER_ID_UNKNOWN": 0, - "PROVIDER_ID_ACMECORP": 1, - "PROVIDER_ID_ASERTO_REGISTRY": 2, - "PROVIDER_ID_BUNDLER": 3, - "PROVIDER_ID_AUTH0": 4, - "PROVIDER_ID_DECISION_LOGS": 5, - "PROVIDER_ID_DISCOVERY": 6, - "PROVIDER_ID_EDGE_DIRECTORY": 7, - "PROVIDER_ID_GHCR_PAT": 8, - "PROVIDER_ID_GITHUB": 9, - "PROVIDER_ID_GITHUB_PAT": 10, - "PROVIDER_ID_GITLAB_PAT": 11, - "PROVIDER_ID_AUTHORIZER": 12, - "PROVIDER_ID_OKTA": 13, - "PROVIDER_ID_OPCR": 14, - "PROVIDER_ID_OPCR_PUBLIC": 15, - "PROVIDER_ID_EDGE_AUTHORIZER": 16, - "PROVIDER_ID_CITADEL": 17, - "PROVIDER_ID_DIRECTORY": 18, - "PROVIDER_ID_AZUREAD": 19, - "PROVIDER_ID_COGNITO": 20, - "PROVIDER_ID_GOOGLE_WORKSPACE": 21, - "PROVIDER_ID_GOOGLE_DRIVE": 22, - "PROVIDER_ID_SIMPLE_RBAC": 23, - "PROVIDER_ID_LDAP": 24, - "PROVIDER_ID_TODO_DATA": 25, - "PROVIDER_ID_SLACK_DATA": 26, - "PROVIDER_ID_GITHUB_DATA": 27, + "PROVIDER_ID_UNKNOWN": 0, + "PROVIDER_ID_ACMECORP": 1, + "PROVIDER_ID_ASERTO_REGISTRY": 2, + "PROVIDER_ID_BUNDLER": 3, + "PROVIDER_ID_AUTH0": 4, + "PROVIDER_ID_DECISION_LOGS": 5, + "PROVIDER_ID_DISCOVERY": 6, + "PROVIDER_ID_EDGE_DIRECTORY": 7, + "PROVIDER_ID_GHCR_PAT": 8, + "PROVIDER_ID_GITHUB": 9, + "PROVIDER_ID_GITHUB_PAT": 10, + "PROVIDER_ID_GITLAB_PAT": 11, + "PROVIDER_ID_AUTHORIZER": 12, + "PROVIDER_ID_OKTA": 13, + "PROVIDER_ID_OPCR": 14, + "PROVIDER_ID_OPCR_PUBLIC": 15, + "PROVIDER_ID_EDGE_AUTHORIZER": 16, + "PROVIDER_ID_CITADEL": 17, + "PROVIDER_ID_DIRECTORY": 18, + "PROVIDER_ID_AZUREAD": 19, + "PROVIDER_ID_COGNITO": 20, + "PROVIDER_ID_GOOGLE_WORKSPACE": 21, + "PROVIDER_ID_GOOGLE_DRIVE": 22, + "PROVIDER_ID_SIMPLE_RBAC": 23, + "PROVIDER_ID_LDAP": 24, + "PROVIDER_ID_TODO_DATA": 25, + "PROVIDER_ID_SLACK_DATA": 26, + "PROVIDER_ID_GITHUB_DATA": 27, + "PROVIDER_ID_MULTI_TENANT_DATA": 28, + "PROVIDER_ID_API_AUTH_DATA": 29, } ) @@ -846,7 +852,7 @@ var file_aserto_api_v1_connection_proto_rawDesc = []byte{ 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6a, 0x73, 0x6f, - 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2a, 0xfb, 0x0e, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x76, + 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2a, 0x91, 0x10, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1d, 0x0a, 0x13, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x49, 0x44, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x1a, 0x04, 0x92, 0xb5, 0x18, 0x00, 0x12, 0x42, 0x0a, 0x14, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, @@ -966,66 +972,75 @@ var file_aserto_api_v1_connection_proto_rawDesc = []byte{ 0x54, 0x48, 0x55, 0x42, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x1b, 0x1a, 0x28, 0x92, 0xb5, 0x18, 0x24, 0x38, 0x65, 0x65, 0x65, 0x62, 0x37, 0x37, 0x32, 0x2d, 0x63, 0x36, 0x37, 0x65, 0x2d, 0x31, 0x31, 0x65, 0x65, 0x2d, 0x39, 0x34, 0x37, 0x33, 0x2d, 0x30, 0x34, 0x34, 0x30, 0x36, 0x66, 0x31, - 0x64, 0x63, 0x34, 0x37, 0x31, 0x2a, 0xae, 0x02, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x19, 0x0a, 0x15, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, - 0x45, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, - 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x4b, 0x49, - 0x4e, 0x44, 0x5f, 0x49, 0x44, 0x50, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, 0x4f, 0x56, - 0x49, 0x44, 0x45, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x53, 0x43, 0x43, 0x10, 0x02, 0x12, - 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, - 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x52, 0x59, - 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x4b, - 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x52, 0x10, 0x04, - 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x4b, 0x49, 0x4e, - 0x44, 0x5f, 0x44, 0x45, 0x43, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x47, 0x53, 0x10, - 0x05, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x4b, 0x49, - 0x4e, 0x44, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x59, 0x10, 0x06, 0x12, 0x1b, - 0x0a, 0x17, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, - 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, 0x10, 0x07, 0x12, 0x21, 0x0a, 0x1d, 0x50, - 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x45, 0x44, 0x47, - 0x45, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x52, 0x10, 0x08, 0x12, 0x16, - 0x0a, 0x12, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, - 0x44, 0x41, 0x54, 0x41, 0x10, 0x09, 0x2a, 0x64, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4f, 0x4e, 0x4e, - 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x10, - 0x01, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x10, 0x02, 0x2a, 0x9c, 0x01, 0x0a, - 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x69, - 0x6e, 0x64, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x45, 0x4c, 0x45, - 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x45, 0x4c, - 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, - 0x42, 0x55, 0x54, 0x45, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, - 0x5f, 0x45, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x53, 0x45, - 0x43, 0x52, 0x45, 0x54, 0x10, 0x02, 0x12, 0x23, 0x0a, 0x1f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, - 0x5f, 0x45, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x43, 0x45, - 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x10, 0x03, 0x2a, 0xb4, 0x01, 0x0a, 0x11, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x45, 0x4c, 0x45, 0x4d, - 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x45, 0x4c, 0x45, - 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, - 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x45, 0x4c, 0x45, - 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, - 0x52, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x45, 0x4c, - 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x45, - 0x41, 0x4e, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x45, - 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, - 0x10, 0x04, 0x2a, 0x72, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4d, 0x6f, 0x64, - 0x65, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x49, 0x53, 0x50, 0x4c, 0x41, 0x59, 0x5f, 0x4d, 0x4f, 0x44, - 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x44, - 0x49, 0x53, 0x50, 0x4c, 0x41, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, - 0x41, 0x4c, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x49, 0x53, 0x50, 0x4c, 0x41, 0x59, 0x5f, - 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4d, 0x41, 0x53, 0x4b, 0x45, 0x44, 0x10, 0x02, 0x12, 0x17, 0x0a, - 0x13, 0x44, 0x49, 0x53, 0x50, 0x4c, 0x41, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x48, 0x49, - 0x44, 0x44, 0x45, 0x4e, 0x10, 0x03, 0x42, 0x41, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2d, 0x64, 0x65, 0x76, 0x2f, - 0x67, 0x6f, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0xaa, 0x02, 0x0d, 0x41, 0x73, 0x65, 0x72, - 0x74, 0x6f, 0x2e, 0x41, 0x50, 0x49, 0x2e, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x64, 0x63, 0x34, 0x37, 0x31, 0x12, 0x4b, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, + 0x52, 0x5f, 0x49, 0x44, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x54, 0x45, 0x4e, 0x41, 0x4e, + 0x54, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x1c, 0x1a, 0x28, 0x92, 0xb5, 0x18, 0x24, 0x38, 0x37, + 0x62, 0x65, 0x37, 0x39, 0x35, 0x63, 0x2d, 0x34, 0x30, 0x37, 0x36, 0x2d, 0x31, 0x31, 0x65, 0x66, + 0x2d, 0x39, 0x31, 0x62, 0x32, 0x2d, 0x30, 0x34, 0x61, 0x38, 0x63, 0x63, 0x31, 0x30, 0x33, 0x36, + 0x66, 0x33, 0x12, 0x47, 0x0a, 0x19, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x49, + 0x44, 0x5f, 0x41, 0x50, 0x49, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, + 0x1d, 0x1a, 0x28, 0x92, 0xb5, 0x18, 0x24, 0x62, 0x33, 0x35, 0x37, 0x65, 0x37, 0x36, 0x63, 0x2d, + 0x34, 0x30, 0x38, 0x33, 0x2d, 0x31, 0x31, 0x65, 0x66, 0x2d, 0x62, 0x30, 0x62, 0x33, 0x2d, 0x30, + 0x34, 0x32, 0x35, 0x63, 0x35, 0x36, 0x39, 0x39, 0x30, 0x66, 0x37, 0x2a, 0xae, 0x02, 0x0a, 0x0c, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x19, 0x0a, 0x15, + 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, 0x4f, 0x56, 0x49, + 0x44, 0x45, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x49, 0x44, 0x50, 0x10, 0x01, 0x12, 0x15, + 0x0a, 0x11, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, + 0x53, 0x43, 0x43, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, + 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, 0x45, + 0x47, 0x49, 0x53, 0x54, 0x52, 0x59, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x56, + 0x49, 0x44, 0x45, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, + 0x49, 0x5a, 0x45, 0x52, 0x10, 0x04, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, + 0x45, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x44, 0x45, 0x43, 0x49, 0x53, 0x49, 0x4f, 0x4e, + 0x5f, 0x4c, 0x4f, 0x47, 0x53, 0x10, 0x05, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x52, 0x4f, 0x56, 0x49, + 0x44, 0x45, 0x52, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x4f, + 0x52, 0x59, 0x10, 0x06, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, + 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, 0x10, + 0x07, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x4b, 0x49, + 0x4e, 0x44, 0x5f, 0x45, 0x44, 0x47, 0x45, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, + 0x45, 0x52, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, + 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x09, 0x2a, 0x64, 0x0a, 0x0e, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, + 0x0a, 0x17, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x43, + 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, + 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4f, 0x4e, 0x4e, 0x45, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x41, 0x55, 0x54, 0x48, + 0x10, 0x02, 0x2a, 0x9c, 0x01, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4e, 0x46, + 0x49, 0x47, 0x5f, 0x45, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x4f, 0x4e, + 0x46, 0x49, 0x47, 0x5f, 0x45, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, + 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, + 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x45, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4b, + 0x49, 0x4e, 0x44, 0x5f, 0x53, 0x45, 0x43, 0x52, 0x45, 0x54, 0x10, 0x02, 0x12, 0x23, 0x0a, 0x1f, + 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x45, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4b, + 0x49, 0x4e, 0x44, 0x5f, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x10, + 0x03, 0x2a, 0xb4, 0x01, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6c, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4e, 0x46, 0x49, + 0x47, 0x5f, 0x45, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x4f, 0x4e, 0x46, + 0x49, 0x47, 0x5f, 0x45, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4e, 0x46, + 0x49, 0x47, 0x5f, 0x45, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4e, + 0x46, 0x49, 0x47, 0x5f, 0x45, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x4f, + 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x45, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x04, 0x2a, 0x72, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x49, 0x53, 0x50, 0x4c, + 0x41, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, + 0x00, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x49, 0x53, 0x50, 0x4c, 0x41, 0x59, 0x5f, 0x4d, 0x4f, 0x44, + 0x45, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x49, + 0x53, 0x50, 0x4c, 0x41, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4d, 0x41, 0x53, 0x4b, 0x45, + 0x44, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x49, 0x53, 0x50, 0x4c, 0x41, 0x59, 0x5f, 0x4d, + 0x4f, 0x44, 0x45, 0x5f, 0x48, 0x49, 0x44, 0x44, 0x45, 0x4e, 0x10, 0x03, 0x42, 0x41, 0x5a, 0x2f, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x73, 0x65, 0x72, 0x74, + 0x6f, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x61, 0x73, + 0x65, 0x72, 0x74, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0xaa, + 0x02, 0x0d, 0x41, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2e, 0x41, 0x50, 0x49, 0x2e, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1042,7 +1057,7 @@ func file_aserto_api_v1_connection_proto_rawDescGZIP() []byte { var file_aserto_api_v1_connection_proto_enumTypes = make([]protoimpl.EnumInfo, 6) var file_aserto_api_v1_connection_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_aserto_api_v1_connection_proto_goTypes = []interface{}{ +var file_aserto_api_v1_connection_proto_goTypes = []any{ (ProviderID)(0), // 0: aserto.api.v1.ProviderID (ProviderKind)(0), // 1: aserto.api.v1.ProviderKind (ConnectionType)(0), // 2: aserto.api.v1.ConnectionType @@ -1083,7 +1098,7 @@ func file_aserto_api_v1_connection_proto_init() { } file_aserto_api_v1_metadata_proto_init() if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_connection_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_connection_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Provider); i { case 0: return &v.state @@ -1095,7 +1110,7 @@ func file_aserto_api_v1_connection_proto_init() { return nil } } - file_aserto_api_v1_connection_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_connection_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Connection); i { case 0: return &v.state @@ -1107,7 +1122,7 @@ func file_aserto_api_v1_connection_proto_init() { return nil } } - file_aserto_api_v1_connection_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_connection_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ConfigElement); i { case 0: return &v.state diff --git a/aserto/api/v1/fields.pb.go b/aserto/api/v1/fields.pb.go index 382339a..1adc576 100644 --- a/aserto/api/v1/fields.pb.go +++ b/aserto/api/v1/fields.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/fields.proto @@ -100,7 +100,7 @@ func file_aserto_api_v1_fields_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_fields_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v1_fields_proto_goTypes = []interface{}{ +var file_aserto_api_v1_fields_proto_goTypes = []any{ (*Fields)(nil), // 0: aserto.api.v1.Fields (*fieldmaskpb.FieldMask)(nil), // 1: google.protobuf.FieldMask } @@ -119,7 +119,7 @@ func file_aserto_api_v1_fields_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_fields_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_fields_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Fields); i { case 0: return &v.state diff --git a/aserto/api/v1/identity_context.pb.go b/aserto/api/v1/identity_context.pb.go index 96a59d9..90a1b8e 100644 --- a/aserto/api/v1/identity_context.pb.go +++ b/aserto/api/v1/identity_context.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/identity_context.proto @@ -173,7 +173,7 @@ func file_aserto_api_v1_identity_context_proto_rawDescGZIP() []byte { var file_aserto_api_v1_identity_context_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_aserto_api_v1_identity_context_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v1_identity_context_proto_goTypes = []interface{}{ +var file_aserto_api_v1_identity_context_proto_goTypes = []any{ (IdentityType)(0), // 0: aserto.api.v1.IdentityType (*IdentityContext)(nil), // 1: aserto.api.v1.IdentityContext } @@ -192,7 +192,7 @@ func file_aserto_api_v1_identity_context_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_identity_context_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_identity_context_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*IdentityContext); i { case 0: return &v.state diff --git a/aserto/api/v1/invite.pb.go b/aserto/api/v1/invite.pb.go index 4841634..80aac3e 100644 --- a/aserto/api/v1/invite.pb.go +++ b/aserto/api/v1/invite.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/invite.proto @@ -235,7 +235,7 @@ func file_aserto_api_v1_invite_proto_rawDescGZIP() []byte { var file_aserto_api_v1_invite_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_aserto_api_v1_invite_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v1_invite_proto_goTypes = []interface{}{ +var file_aserto_api_v1_invite_proto_goTypes = []any{ (InviteStatus)(0), // 0: aserto.api.v1.InviteStatus (*Invite)(nil), // 1: aserto.api.v1.Invite (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp @@ -257,7 +257,7 @@ func file_aserto_api_v1_invite_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_invite_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_invite_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Invite); i { case 0: return &v.state diff --git a/aserto/api/v1/log.pb.go b/aserto/api/v1/log.pb.go index 6db6fe3..3927a19 100644 --- a/aserto/api/v1/log.pb.go +++ b/aserto/api/v1/log.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/log.proto @@ -122,7 +122,7 @@ func file_aserto_api_v1_log_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_log_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_aserto_api_v1_log_proto_goTypes = []interface{}{ +var file_aserto_api_v1_log_proto_goTypes = []any{ (LogLevel)(0), // 0: aserto.api.v1.LogLevel } var file_aserto_api_v1_log_proto_depIdxs = []int32{ diff --git a/aserto/api/v1/metadata.pb.go b/aserto/api/v1/metadata.pb.go index bce28cb..a369e31 100644 --- a/aserto/api/v1/metadata.pb.go +++ b/aserto/api/v1/metadata.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/metadata.proto @@ -146,7 +146,7 @@ func file_aserto_api_v1_metadata_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v1_metadata_proto_goTypes = []interface{}{ +var file_aserto_api_v1_metadata_proto_goTypes = []any{ (*Metadata)(nil), // 0: aserto.api.v1.Metadata (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp } @@ -167,7 +167,7 @@ func file_aserto_api_v1_metadata_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_metadata_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Metadata); i { case 0: return &v.state @@ -180,7 +180,7 @@ func file_aserto_api_v1_metadata_proto_init() { } } } - file_aserto_api_v1_metadata_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_aserto_api_v1_metadata_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aserto/api/v1/name_availability.pb.go b/aserto/api/v1/name_availability.pb.go index 39c30ec..85582f8 100644 --- a/aserto/api/v1/name_availability.pb.go +++ b/aserto/api/v1/name_availability.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/name_availability.proto @@ -118,7 +118,7 @@ func file_aserto_api_v1_name_availability_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_name_availability_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_aserto_api_v1_name_availability_proto_goTypes = []interface{}{ +var file_aserto_api_v1_name_availability_proto_goTypes = []any{ (NameAvailability)(0), // 0: aserto.api.v1.NameAvailability } var file_aserto_api_v1_name_availability_proto_depIdxs = []int32{ diff --git a/aserto/api/v1/nats.pb.go b/aserto/api/v1/nats.pb.go index d86d638..d1f4a9d 100644 --- a/aserto/api/v1/nats.pb.go +++ b/aserto/api/v1/nats.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/nats.proto @@ -116,7 +116,7 @@ func file_aserto_api_v1_nats_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_nats_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_aserto_api_v1_nats_proto_goTypes = []interface{}{ +var file_aserto_api_v1_nats_proto_goTypes = []any{ (*NatsMessage)(nil), // 0: aserto.api.v1.NatsMessage nil, // 1: aserto.api.v1.NatsMessage.MetadataEntry (*anypb.Any)(nil), // 2: google.protobuf.Any @@ -137,7 +137,7 @@ func file_aserto_api_v1_nats_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_nats_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_nats_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*NatsMessage); i { case 0: return &v.state diff --git a/aserto/api/v1/pagination.pb.go b/aserto/api/v1/pagination.pb.go index 05638b6..01c5472 100644 --- a/aserto/api/v1/pagination.pb.go +++ b/aserto/api/v1/pagination.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/pagination.proto @@ -175,7 +175,7 @@ func file_aserto_api_v1_pagination_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_pagination_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_aserto_api_v1_pagination_proto_goTypes = []interface{}{ +var file_aserto_api_v1_pagination_proto_goTypes = []any{ (*PaginationRequest)(nil), // 0: aserto.api.v1.PaginationRequest (*PaginationResponse)(nil), // 1: aserto.api.v1.PaginationResponse } @@ -193,7 +193,7 @@ func file_aserto_api_v1_pagination_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_pagination_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_pagination_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*PaginationRequest); i { case 0: return &v.state @@ -205,7 +205,7 @@ func file_aserto_api_v1_pagination_proto_init() { return nil } } - file_aserto_api_v1_pagination_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_pagination_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*PaginationResponse); i { case 0: return &v.state diff --git a/aserto/api/v1/policy_builder.pb.go b/aserto/api/v1/policy_builder.pb.go index d62d559..530b6e1 100644 --- a/aserto/api/v1/policy_builder.pb.go +++ b/aserto/api/v1/policy_builder.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/policy_builder.proto @@ -162,7 +162,7 @@ func file_aserto_api_v1_policy_builder_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_policy_builder_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v1_policy_builder_proto_goTypes = []interface{}{ +var file_aserto_api_v1_policy_builder_proto_goTypes = []any{ (*PolicyBuilder)(nil), // 0: aserto.api.v1.PolicyBuilder } var file_aserto_api_v1_policy_builder_proto_depIdxs = []int32{ @@ -179,7 +179,7 @@ func file_aserto_api_v1_policy_builder_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_policy_builder_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_policy_builder_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*PolicyBuilder); i { case 0: return &v.state diff --git a/aserto/api/v1/policy_context.pb.go b/aserto/api/v1/policy_context.pb.go index d61e4f0..781b2b1 100644 --- a/aserto/api/v1/policy_context.pb.go +++ b/aserto/api/v1/policy_context.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/policy_context.proto @@ -137,7 +137,7 @@ func file_aserto_api_v1_policy_context_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_policy_context_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v1_policy_context_proto_goTypes = []interface{}{ +var file_aserto_api_v1_policy_context_proto_goTypes = []any{ (*PolicyContext)(nil), // 0: aserto.api.v1.PolicyContext } var file_aserto_api_v1_policy_context_proto_depIdxs = []int32{ @@ -154,7 +154,7 @@ func file_aserto_api_v1_policy_context_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_policy_context_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_policy_context_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*PolicyContext); i { case 0: return &v.state diff --git a/aserto/api/v1/policy_image.pb.go b/aserto/api/v1/policy_image.pb.go index c4fe925..0840e89 100644 --- a/aserto/api/v1/policy_image.pb.go +++ b/aserto/api/v1/policy_image.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/policy_image.proto @@ -105,7 +105,7 @@ func file_aserto_api_v1_policy_image_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_policy_image_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v1_policy_image_proto_goTypes = []interface{}{ +var file_aserto_api_v1_policy_image_proto_goTypes = []any{ (*PolicyImage)(nil), // 0: aserto.api.v1.PolicyImage } var file_aserto_api_v1_policy_image_proto_depIdxs = []int32{ @@ -122,7 +122,7 @@ func file_aserto_api_v1_policy_image_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_policy_image_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_policy_image_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*PolicyImage); i { case 0: return &v.state diff --git a/aserto/api/v1/policy_repo.pb.go b/aserto/api/v1/policy_repo.pb.go index 7ab7957..a420a3a 100644 --- a/aserto/api/v1/policy_repo.pb.go +++ b/aserto/api/v1/policy_repo.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/policy_repo.proto @@ -117,7 +117,7 @@ func file_aserto_api_v1_policy_repo_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_policy_repo_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v1_policy_repo_proto_goTypes = []interface{}{ +var file_aserto_api_v1_policy_repo_proto_goTypes = []any{ (*PolicyRepo)(nil), // 0: aserto.api.v1.PolicyRepo } var file_aserto_api_v1_policy_repo_proto_depIdxs = []int32{ @@ -134,7 +134,7 @@ func file_aserto_api_v1_policy_repo_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_policy_repo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_policy_repo_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*PolicyRepo); i { case 0: return &v.state diff --git a/aserto/api/v1/policyref.pb.go b/aserto/api/v1/policyref.pb.go index 724ec69..e7fd359 100644 --- a/aserto/api/v1/policyref.pb.go +++ b/aserto/api/v1/policyref.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/policyref.proto @@ -196,7 +196,7 @@ func file_aserto_api_v1_policyref_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_policyref_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v1_policyref_proto_goTypes = []interface{}{ +var file_aserto_api_v1_policyref_proto_goTypes = []any{ (*PolicyRef)(nil), // 0: aserto.api.v1.PolicyRef } var file_aserto_api_v1_policyref_proto_depIdxs = []int32{ @@ -213,7 +213,7 @@ func file_aserto_api_v1_policyref_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_policyref_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_policyref_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*PolicyRef); i { case 0: return &v.state @@ -226,7 +226,7 @@ func file_aserto_api_v1_policyref_proto_init() { } } } - file_aserto_api_v1_policyref_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_aserto_api_v1_policyref_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aserto/api/v1/registry.pb.go b/aserto/api/v1/registry.pb.go index 3d7a72a..af79a13 100644 --- a/aserto/api/v1/registry.pb.go +++ b/aserto/api/v1/registry.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/registry.proto @@ -330,7 +330,7 @@ func file_aserto_api_v1_registry_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_aserto_api_v1_registry_proto_goTypes = []interface{}{ +var file_aserto_api_v1_registry_proto_goTypes = []any{ (*RegistryRepo)(nil), // 0: aserto.api.v1.RegistryRepo (*RegistryRepoTag)(nil), // 1: aserto.api.v1.RegistryRepoTag (*RegistryRepoAnnotation)(nil), // 2: aserto.api.v1.RegistryRepoAnnotation @@ -354,7 +354,7 @@ func file_aserto_api_v1_registry_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_registry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_registry_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*RegistryRepo); i { case 0: return &v.state @@ -366,7 +366,7 @@ func file_aserto_api_v1_registry_proto_init() { return nil } } - file_aserto_api_v1_registry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_registry_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*RegistryRepoTag); i { case 0: return &v.state @@ -378,7 +378,7 @@ func file_aserto_api_v1_registry_proto_init() { return nil } } - file_aserto_api_v1_registry_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_registry_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*RegistryRepoAnnotation); i { case 0: return &v.state @@ -390,7 +390,7 @@ func file_aserto_api_v1_registry_proto_init() { return nil } } - file_aserto_api_v1_registry_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_registry_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*RegistryRepoDigest); i { case 0: return &v.state diff --git a/aserto/api/v1/registry_org.pb.go b/aserto/api/v1/registry_org.pb.go index 370f24d..33a1884 100644 --- a/aserto/api/v1/registry_org.pb.go +++ b/aserto/api/v1/registry_org.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/registry_org.proto @@ -95,7 +95,7 @@ func file_aserto_api_v1_registry_org_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_registry_org_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v1_registry_org_proto_goTypes = []interface{}{ +var file_aserto_api_v1_registry_org_proto_goTypes = []any{ (*RegistryOrg)(nil), // 0: aserto.api.v1.RegistryOrg } var file_aserto_api_v1_registry_org_proto_depIdxs = []int32{ @@ -112,7 +112,7 @@ func file_aserto_api_v1_registry_org_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_registry_org_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_registry_org_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*RegistryOrg); i { case 0: return &v.state diff --git a/aserto/api/v1/scc_org.pb.go b/aserto/api/v1/scc_org.pb.go index 6c1cc97..2d27c28 100644 --- a/aserto/api/v1/scc_org.pb.go +++ b/aserto/api/v1/scc_org.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/scc_org.proto @@ -104,7 +104,7 @@ func file_aserto_api_v1_scc_org_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_scc_org_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v1_scc_org_proto_goTypes = []interface{}{ +var file_aserto_api_v1_scc_org_proto_goTypes = []any{ (*SccOrg)(nil), // 0: aserto.api.v1.SccOrg } var file_aserto_api_v1_scc_org_proto_depIdxs = []int32{ @@ -121,7 +121,7 @@ func file_aserto_api_v1_scc_org_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_scc_org_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_scc_org_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*SccOrg); i { case 0: return &v.state diff --git a/aserto/api/v1/tenant.pb.go b/aserto/api/v1/tenant.pb.go index 7878088..060f5f7 100644 --- a/aserto/api/v1/tenant.pb.go +++ b/aserto/api/v1/tenant.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/tenant.proto @@ -202,7 +202,7 @@ func file_aserto_api_v1_tenant_proto_rawDescGZIP() []byte { } var file_aserto_api_v1_tenant_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_aserto_api_v1_tenant_proto_goTypes = []interface{}{ +var file_aserto_api_v1_tenant_proto_goTypes = []any{ (*TenantMember)(nil), // 0: aserto.api.v1.TenantMember (*Tenant)(nil), // 1: aserto.api.v1.Tenant (*Connection)(nil), // 2: aserto.api.v1.Connection @@ -224,7 +224,7 @@ func file_aserto_api_v1_tenant_proto_init() { } file_aserto_api_v1_connection_proto_init() if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_tenant_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_tenant_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TenantMember); i { case 0: return &v.state @@ -236,7 +236,7 @@ func file_aserto_api_v1_tenant_proto_init() { return nil } } - file_aserto_api_v1_tenant_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_tenant_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Tenant); i { case 0: return &v.state diff --git a/aserto/api/v1/user.pb.go b/aserto/api/v1/user.pb.go index 91fa9ad..42bae0e 100644 --- a/aserto/api/v1/user.pb.go +++ b/aserto/api/v1/user.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v1/user.proto @@ -874,7 +874,7 @@ func file_aserto_api_v1_user_proto_rawDescGZIP() []byte { var file_aserto_api_v1_user_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_aserto_api_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_aserto_api_v1_user_proto_goTypes = []interface{}{ +var file_aserto_api_v1_user_proto_goTypes = []any{ (IdentityKind)(0), // 0: aserto.api.v1.IdentityKind (AttrKind)(0), // 1: aserto.api.v1.AttrKind (*User)(nil), // 2: aserto.api.v1.User @@ -920,7 +920,7 @@ func file_aserto_api_v1_user_proto_init() { } file_aserto_api_v1_metadata_proto_init() if !protoimpl.UnsafeEnabled { - file_aserto_api_v1_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_user_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*User); i { case 0: return &v.state @@ -932,7 +932,7 @@ func file_aserto_api_v1_user_proto_init() { return nil } } - file_aserto_api_v1_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_user_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*UserExt); i { case 0: return &v.state @@ -944,7 +944,7 @@ func file_aserto_api_v1_user_proto_init() { return nil } } - file_aserto_api_v1_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_user_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*DeleteUser); i { case 0: return &v.state @@ -956,7 +956,7 @@ func file_aserto_api_v1_user_proto_init() { return nil } } - file_aserto_api_v1_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_user_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*DeleteConnection); i { case 0: return &v.state @@ -968,7 +968,7 @@ func file_aserto_api_v1_user_proto_init() { return nil } } - file_aserto_api_v1_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_user_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*AttrSet); i { case 0: return &v.state @@ -980,7 +980,7 @@ func file_aserto_api_v1_user_proto_init() { return nil } } - file_aserto_api_v1_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_user_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*ApplExt); i { case 0: return &v.state @@ -992,7 +992,7 @@ func file_aserto_api_v1_user_proto_init() { return nil } } - file_aserto_api_v1_user_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_user_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*IdentitySource); i { case 0: return &v.state @@ -1004,7 +1004,7 @@ func file_aserto_api_v1_user_proto_init() { return nil } } - file_aserto_api_v1_user_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v1_user_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*UserProcessStats); i { case 0: return &v.state @@ -1017,8 +1017,8 @@ func file_aserto_api_v1_user_proto_init() { } } } - file_aserto_api_v1_user_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_aserto_api_v1_user_proto_msgTypes[6].OneofWrappers = []interface{}{} + file_aserto_api_v1_user_proto_msgTypes[0].OneofWrappers = []any{} + file_aserto_api_v1_user_proto_msgTypes[6].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aserto/api/v2/connection_events.pb.go b/aserto/api/v2/connection_events.pb.go index d9c3244..f5e7fb6 100644 --- a/aserto/api/v2/connection_events.pb.go +++ b/aserto/api/v2/connection_events.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v2/connection_events.proto @@ -285,7 +285,7 @@ func file_aserto_api_v2_connection_events_proto_rawDescGZIP() []byte { } var file_aserto_api_v2_connection_events_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_aserto_api_v2_connection_events_proto_goTypes = []interface{}{ +var file_aserto_api_v2_connection_events_proto_goTypes = []any{ (*ConnectionCreated)(nil), // 0: aserto.api.v2.ConnectionCreated (*ConnectionDeleted)(nil), // 1: aserto.api.v2.ConnectionDeleted (*ConnectionUpdated)(nil), // 2: aserto.api.v2.ConnectionUpdated @@ -308,7 +308,7 @@ func file_aserto_api_v2_connection_events_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v2_connection_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_connection_events_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ConnectionCreated); i { case 0: return &v.state @@ -320,7 +320,7 @@ func file_aserto_api_v2_connection_events_proto_init() { return nil } } - file_aserto_api_v2_connection_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_connection_events_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ConnectionDeleted); i { case 0: return &v.state @@ -332,7 +332,7 @@ func file_aserto_api_v2_connection_events_proto_init() { return nil } } - file_aserto_api_v2_connection_events_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_connection_events_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ConnectionUpdated); i { case 0: return &v.state diff --git a/aserto/api/v2/identity.pb.go b/aserto/api/v2/identity.pb.go index 28610db..37e7d45 100644 --- a/aserto/api/v2/identity.pb.go +++ b/aserto/api/v2/identity.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v2/identity.proto @@ -131,7 +131,7 @@ func file_aserto_api_v2_identity_proto_rawDescGZIP() []byte { } var file_aserto_api_v2_identity_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v2_identity_proto_goTypes = []interface{}{ +var file_aserto_api_v2_identity_proto_goTypes = []any{ (*IdentityProperties)(nil), // 0: aserto.api.v2.IdentityProperties (v1.IdentityKind)(0), // 1: aserto.api.v1.IdentityKind } @@ -150,7 +150,7 @@ func file_aserto_api_v2_identity_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v2_identity_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_identity_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*IdentityProperties); i { case 0: return &v.state @@ -163,7 +163,7 @@ func file_aserto_api_v2_identity_proto_init() { } } } - file_aserto_api_v2_identity_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_aserto_api_v2_identity_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aserto/api/v2/instance.pb.go b/aserto/api/v2/instance.pb.go index 4e5d440..6ca7a96 100644 --- a/aserto/api/v2/instance.pb.go +++ b/aserto/api/v2/instance.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v2/instance.proto @@ -241,7 +241,7 @@ func file_aserto_api_v2_instance_proto_rawDescGZIP() []byte { var file_aserto_api_v2_instance_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_aserto_api_v2_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v2_instance_proto_goTypes = []interface{}{ +var file_aserto_api_v2_instance_proto_goTypes = []any{ (InstanceType)(0), // 0: aserto.api.v2.InstanceType (*Instance)(nil), // 1: aserto.api.v2.Instance (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp @@ -263,7 +263,7 @@ func file_aserto_api_v2_instance_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v2_instance_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_instance_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Instance); i { case 0: return &v.state @@ -276,7 +276,7 @@ func file_aserto_api_v2_instance_proto_init() { } } } - file_aserto_api_v2_instance_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_aserto_api_v2_instance_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aserto/api/v2/instance_events.pb.go b/aserto/api/v2/instance_events.pb.go index d8ca6f0..e7e32cf 100644 --- a/aserto/api/v2/instance_events.pb.go +++ b/aserto/api/v2/instance_events.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v2/instance_events.proto @@ -204,7 +204,7 @@ func file_aserto_api_v2_instance_events_proto_rawDescGZIP() []byte { } var file_aserto_api_v2_instance_events_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_aserto_api_v2_instance_events_proto_goTypes = []interface{}{ +var file_aserto_api_v2_instance_events_proto_goTypes = []any{ (*InstanceUpdated)(nil), // 0: aserto.api.v2.InstanceUpdated (*InstanceDeleted)(nil), // 1: aserto.api.v2.InstanceDeleted } @@ -222,7 +222,7 @@ func file_aserto_api_v2_instance_events_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v2_instance_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_instance_events_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*InstanceUpdated); i { case 0: return &v.state @@ -234,7 +234,7 @@ func file_aserto_api_v2_instance_events_proto_init() { return nil } } - file_aserto_api_v2_instance_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_instance_events_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*InstanceDeleted); i { case 0: return &v.state diff --git a/aserto/api/v2/management.pb.go b/aserto/api/v2/management.pb.go index 4408cd8..3b5982c 100644 --- a/aserto/api/v2/management.pb.go +++ b/aserto/api/v2/management.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v2/management.proto @@ -466,7 +466,7 @@ func file_aserto_api_v2_management_proto_rawDescGZIP() []byte { var file_aserto_api_v2_management_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_aserto_api_v2_management_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_aserto_api_v2_management_proto_goTypes = []interface{}{ +var file_aserto_api_v2_management_proto_goTypes = []any{ (SyncMode)(0), // 0: aserto.api.v2.SyncMode (*InstanceInfo)(nil), // 1: aserto.api.v2.InstanceInfo (*InstanceRegistration)(nil), // 2: aserto.api.v2.InstanceRegistration @@ -492,7 +492,7 @@ func file_aserto_api_v2_management_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v2_management_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_management_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*InstanceInfo); i { case 0: return &v.state @@ -504,7 +504,7 @@ func file_aserto_api_v2_management_proto_init() { return nil } } - file_aserto_api_v2_management_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_management_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*InstanceRegistration); i { case 0: return &v.state @@ -516,7 +516,7 @@ func file_aserto_api_v2_management_proto_init() { return nil } } - file_aserto_api_v2_management_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_management_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Command); i { case 0: return &v.state @@ -528,7 +528,7 @@ func file_aserto_api_v2_management_proto_init() { return nil } } - file_aserto_api_v2_management_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_management_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*DiscoveryCommand); i { case 0: return &v.state @@ -540,7 +540,7 @@ func file_aserto_api_v2_management_proto_init() { return nil } } - file_aserto_api_v2_management_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_management_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*SyncEdgeDirectoryCommand); i { case 0: return &v.state @@ -553,7 +553,7 @@ func file_aserto_api_v2_management_proto_init() { } } } - file_aserto_api_v2_management_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_aserto_api_v2_management_proto_msgTypes[2].OneofWrappers = []any{ (*Command_Discovery)(nil), (*Command_SyncEdgeDirectory)(nil), } diff --git a/aserto/api/v2/pagination.pb.go b/aserto/api/v2/pagination.pb.go index 220a095..605ae4f 100644 --- a/aserto/api/v2/pagination.pb.go +++ b/aserto/api/v2/pagination.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v2/pagination.proto @@ -165,7 +165,7 @@ func file_aserto_api_v2_pagination_proto_rawDescGZIP() []byte { } var file_aserto_api_v2_pagination_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_aserto_api_v2_pagination_proto_goTypes = []interface{}{ +var file_aserto_api_v2_pagination_proto_goTypes = []any{ (*PaginationRequest)(nil), // 0: aserto.api.v2.PaginationRequest (*PaginationResponse)(nil), // 1: aserto.api.v2.PaginationResponse } @@ -183,7 +183,7 @@ func file_aserto_api_v2_pagination_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v2_pagination_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_pagination_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*PaginationRequest); i { case 0: return &v.state @@ -195,7 +195,7 @@ func file_aserto_api_v2_pagination_proto_init() { return nil } } - file_aserto_api_v2_pagination_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_pagination_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*PaginationResponse); i { case 0: return &v.state diff --git a/aserto/api/v2/policy.pb.go b/aserto/api/v2/policy.pb.go index 0db072f..365aa65 100644 --- a/aserto/api/v2/policy.pb.go +++ b/aserto/api/v2/policy.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v2/policy.proto @@ -239,7 +239,7 @@ func file_aserto_api_v2_policy_proto_rawDescGZIP() []byte { } var file_aserto_api_v2_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_aserto_api_v2_policy_proto_goTypes = []interface{}{ +var file_aserto_api_v2_policy_proto_goTypes = []any{ (*Policy)(nil), // 0: aserto.api.v2.Policy (*PolicyState)(nil), // 1: aserto.api.v2.PolicyState (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp @@ -270,7 +270,7 @@ func file_aserto_api_v2_policy_proto_init() { file_aserto_api_v2_repository_proto_init() file_aserto_api_v2_source_proto_init() if !protoimpl.UnsafeEnabled { - file_aserto_api_v2_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Policy); i { case 0: return &v.state @@ -282,7 +282,7 @@ func file_aserto_api_v2_policy_proto_init() { return nil } } - file_aserto_api_v2_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*PolicyState); i { case 0: return &v.state diff --git a/aserto/api/v2/policyref_events.pb.go b/aserto/api/v2/policyref_events.pb.go index 8844f7c..83023f6 100644 --- a/aserto/api/v2/policyref_events.pb.go +++ b/aserto/api/v2/policyref_events.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v2/policyref_events.proto @@ -183,7 +183,7 @@ func file_aserto_api_v2_policyref_events_proto_rawDescGZIP() []byte { } var file_aserto_api_v2_policyref_events_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_aserto_api_v2_policyref_events_proto_goTypes = []interface{}{ +var file_aserto_api_v2_policyref_events_proto_goTypes = []any{ (*PolicyRefUpdated)(nil), // 0: aserto.api.v2.PolicyRefUpdated (*PolicyRefDeleted)(nil), // 1: aserto.api.v2.PolicyRefDeleted } @@ -201,7 +201,7 @@ func file_aserto_api_v2_policyref_events_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v2_policyref_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_policyref_events_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*PolicyRefUpdated); i { case 0: return &v.state @@ -213,7 +213,7 @@ func file_aserto_api_v2_policyref_events_proto_init() { return nil } } - file_aserto_api_v2_policyref_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_policyref_events_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*PolicyRefDeleted); i { case 0: return &v.state diff --git a/aserto/api/v2/repository.pb.go b/aserto/api/v2/repository.pb.go index b822450..eabaacc 100644 --- a/aserto/api/v2/repository.pb.go +++ b/aserto/api/v2/repository.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v2/repository.proto @@ -171,7 +171,7 @@ func file_aserto_api_v2_repository_proto_rawDescGZIP() []byte { } var file_aserto_api_v2_repository_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v2_repository_proto_goTypes = []interface{}{ +var file_aserto_api_v2_repository_proto_goTypes = []any{ (*Repository)(nil), // 0: aserto.api.v2.Repository (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp } @@ -191,7 +191,7 @@ func file_aserto_api_v2_repository_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v2_repository_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_repository_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Repository); i { case 0: return &v.state diff --git a/aserto/api/v2/source.pb.go b/aserto/api/v2/source.pb.go index 5462d14..f2cfb66 100644 --- a/aserto/api/v2/source.pb.go +++ b/aserto/api/v2/source.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v2/source.proto @@ -170,7 +170,7 @@ func file_aserto_api_v2_source_proto_rawDescGZIP() []byte { } var file_aserto_api_v2_source_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v2_source_proto_goTypes = []interface{}{ +var file_aserto_api_v2_source_proto_goTypes = []any{ (*Source)(nil), // 0: aserto.api.v2.Source (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp } @@ -190,7 +190,7 @@ func file_aserto_api_v2_source_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v2_source_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_source_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Source); i { case 0: return &v.state diff --git a/aserto/api/v2/user.pb.go b/aserto/api/v2/user.pb.go index abb3065..4207d4b 100644 --- a/aserto/api/v2/user.pb.go +++ b/aserto/api/v2/user.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v2/user.proto @@ -204,7 +204,7 @@ func file_aserto_api_v2_user_proto_rawDescGZIP() []byte { var file_aserto_api_v2_user_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_aserto_api_v2_user_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_api_v2_user_proto_goTypes = []interface{}{ +var file_aserto_api_v2_user_proto_goTypes = []any{ (UserStatus)(0), // 0: aserto.api.v2.UserStatus (*UserProperties)(nil), // 1: aserto.api.v2.UserProperties } @@ -223,7 +223,7 @@ func file_aserto_api_v2_user_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v2_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_user_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*UserProperties); i { case 0: return &v.state diff --git a/aserto/api/v2/workflows.pb.go b/aserto/api/v2/workflows.pb.go index 5a60574..829a3ac 100644 --- a/aserto/api/v2/workflows.pb.go +++ b/aserto/api/v2/workflows.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/api/v2/workflows.proto @@ -543,7 +543,7 @@ func file_aserto_api_v2_workflows_proto_rawDescGZIP() []byte { var file_aserto_api_v2_workflows_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_aserto_api_v2_workflows_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_aserto_api_v2_workflows_proto_goTypes = []interface{}{ +var file_aserto_api_v2_workflows_proto_goTypes = []any{ (WorkflowState)(0), // 0: aserto.api.v2.WorkflowState (ActivityResponseState)(0), // 1: aserto.api.v2.ActivityResponseState (WorkflowRunType)(0), // 2: aserto.api.v2.WorkflowRunType @@ -576,7 +576,7 @@ func file_aserto_api_v2_workflows_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_api_v2_workflows_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_workflows_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*WorkflowEvent); i { case 0: return &v.state @@ -588,7 +588,7 @@ func file_aserto_api_v2_workflows_proto_init() { return nil } } - file_aserto_api_v2_workflows_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_workflows_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ActivityResponse); i { case 0: return &v.state @@ -600,7 +600,7 @@ func file_aserto_api_v2_workflows_proto_init() { return nil } } - file_aserto_api_v2_workflows_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_workflows_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*WorkflowOptions); i { case 0: return &v.state @@ -612,7 +612,7 @@ func file_aserto_api_v2_workflows_proto_init() { return nil } } - file_aserto_api_v2_workflows_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_api_v2_workflows_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*WorkflowResponse); i { case 0: return &v.state diff --git a/aserto/authorizer/authorizer/v1/authorizer.pb.go b/aserto/authorizer/authorizer/v1/authorizer.pb.go new file mode 100644 index 0000000..2ec6837 --- /dev/null +++ b/aserto/authorizer/authorizer/v1/authorizer.pb.go @@ -0,0 +1,1104 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: aserto/authorizer/authorizer/v1/authorizer.proto + +package authorizer + +import ( + v1 "github.com/aserto-dev/go-grpc/aserto/api/v1" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +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 PathSeparator int32 + +const ( + PathSeparator_PATH_SEPARATOR_UNKNOWN PathSeparator = 0 // Value not set. + PathSeparator_PATH_SEPARATOR_DOT PathSeparator = 1 // Dot "." path separator + PathSeparator_PATH_SEPARATOR_SLASH PathSeparator = 2 // Slash "/" path separtor +) + +// Enum value maps for PathSeparator. +var ( + PathSeparator_name = map[int32]string{ + 0: "PATH_SEPARATOR_UNKNOWN", + 1: "PATH_SEPARATOR_DOT", + 2: "PATH_SEPARATOR_SLASH", + } + PathSeparator_value = map[string]int32{ + "PATH_SEPARATOR_UNKNOWN": 0, + "PATH_SEPARATOR_DOT": 1, + "PATH_SEPARATOR_SLASH": 2, + } +) + +func (x PathSeparator) Enum() *PathSeparator { + p := new(PathSeparator) + *p = x + return p +} + +func (x PathSeparator) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PathSeparator) Descriptor() protoreflect.EnumDescriptor { + return file_aserto_authorizer_authorizer_v1_authorizer_proto_enumTypes[0].Descriptor() +} + +func (PathSeparator) Type() protoreflect.EnumType { + return &file_aserto_authorizer_authorizer_v1_authorizer_proto_enumTypes[0] +} + +func (x PathSeparator) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PathSeparator.Descriptor instead. +func (PathSeparator) EnumDescriptor() ([]byte, []int) { + return file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{0} +} + +type TraceLevel int32 + +const ( + TraceLevel_TRACE_LEVEL_UNKNOWN TraceLevel = 0 // Value not set. + TraceLevel_TRACE_LEVEL_OFF TraceLevel = 1 // ExplainOffV1 ExplainModeV1 = "off" + TraceLevel_TRACE_LEVEL_FULL TraceLevel = 2 // ExplainFullV1 ExplainModeV1 = "full" + TraceLevel_TRACE_LEVEL_NOTES TraceLevel = 3 // ExplainNotesV1 ExplainModeV1 = "notes" + TraceLevel_TRACE_LEVEL_FAILS TraceLevel = 4 // ExplainFailsV1 ExplainModeV1 = "fails" +) + +// Enum value maps for TraceLevel. +var ( + TraceLevel_name = map[int32]string{ + 0: "TRACE_LEVEL_UNKNOWN", + 1: "TRACE_LEVEL_OFF", + 2: "TRACE_LEVEL_FULL", + 3: "TRACE_LEVEL_NOTES", + 4: "TRACE_LEVEL_FAILS", + } + TraceLevel_value = map[string]int32{ + "TRACE_LEVEL_UNKNOWN": 0, + "TRACE_LEVEL_OFF": 1, + "TRACE_LEVEL_FULL": 2, + "TRACE_LEVEL_NOTES": 3, + "TRACE_LEVEL_FAILS": 4, + } +) + +func (x TraceLevel) Enum() *TraceLevel { + p := new(TraceLevel) + *p = x + return p +} + +func (x TraceLevel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TraceLevel) Descriptor() protoreflect.EnumDescriptor { + return file_aserto_authorizer_authorizer_v1_authorizer_proto_enumTypes[1].Descriptor() +} + +func (TraceLevel) Type() protoreflect.EnumType { + return &file_aserto_authorizer_authorizer_v1_authorizer_proto_enumTypes[1] +} + +func (x TraceLevel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TraceLevel.Descriptor instead. +func (TraceLevel) EnumDescriptor() ([]byte, []int) { + return file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{1} +} + +type DecisionTreeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PolicyContext *v1.PolicyContext `protobuf:"bytes,1,opt,name=policy_context,json=policyContext,proto3" json:"policy_context,omitempty"` + IdentityContext *v1.IdentityContext `protobuf:"bytes,2,opt,name=identity_context,json=identityContext,proto3" json:"identity_context,omitempty"` + Options *DecisionTreeOptions `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"` + ResourceContext *structpb.Struct `protobuf:"bytes,4,opt,name=resource_context,json=resourceContext,proto3" json:"resource_context,omitempty"` +} + +func (x *DecisionTreeRequest) Reset() { + *x = DecisionTreeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DecisionTreeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecisionTreeRequest) ProtoMessage() {} + +func (x *DecisionTreeRequest) ProtoReflect() protoreflect.Message { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecisionTreeRequest.ProtoReflect.Descriptor instead. +func (*DecisionTreeRequest) Descriptor() ([]byte, []int) { + return file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{0} +} + +func (x *DecisionTreeRequest) GetPolicyContext() *v1.PolicyContext { + if x != nil { + return x.PolicyContext + } + return nil +} + +func (x *DecisionTreeRequest) GetIdentityContext() *v1.IdentityContext { + if x != nil { + return x.IdentityContext + } + return nil +} + +func (x *DecisionTreeRequest) GetOptions() *DecisionTreeOptions { + if x != nil { + return x.Options + } + return nil +} + +func (x *DecisionTreeRequest) GetResourceContext() *structpb.Struct { + if x != nil { + return x.ResourceContext + } + return nil +} + +type DecisionTreeOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PathSeparator PathSeparator `protobuf:"varint,1,opt,name=path_separator,json=pathSeparator,proto3,enum=aserto.authorizer.authorizer.v1.PathSeparator" json:"path_separator,omitempty"` +} + +func (x *DecisionTreeOptions) Reset() { + *x = DecisionTreeOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DecisionTreeOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecisionTreeOptions) ProtoMessage() {} + +func (x *DecisionTreeOptions) ProtoReflect() protoreflect.Message { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecisionTreeOptions.ProtoReflect.Descriptor instead. +func (*DecisionTreeOptions) Descriptor() ([]byte, []int) { + return file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{1} +} + +func (x *DecisionTreeOptions) GetPathSeparator() PathSeparator { + if x != nil { + return x.PathSeparator + } + return PathSeparator_PATH_SEPARATOR_UNKNOWN +} + +type DecisionTreeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PathRoot string `protobuf:"bytes,1,opt,name=path_root,json=pathRoot,proto3" json:"path_root,omitempty"` + Path *structpb.Struct `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *DecisionTreeResponse) Reset() { + *x = DecisionTreeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DecisionTreeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecisionTreeResponse) ProtoMessage() {} + +func (x *DecisionTreeResponse) ProtoReflect() protoreflect.Message { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecisionTreeResponse.ProtoReflect.Descriptor instead. +func (*DecisionTreeResponse) Descriptor() ([]byte, []int) { + return file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{2} +} + +func (x *DecisionTreeResponse) GetPathRoot() string { + if x != nil { + return x.PathRoot + } + return "" +} + +func (x *DecisionTreeResponse) GetPath() *structpb.Struct { + if x != nil { + return x.Path + } + return nil +} + +type IsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PolicyContext *v1.PolicyContext `protobuf:"bytes,1,opt,name=policy_context,json=policyContext,proto3" json:"policy_context,omitempty"` + IdentityContext *v1.IdentityContext `protobuf:"bytes,2,opt,name=identity_context,json=identityContext,proto3" json:"identity_context,omitempty"` + ResourceContext *structpb.Struct `protobuf:"bytes,3,opt,name=resource_context,json=resourceContext,proto3" json:"resource_context,omitempty"` +} + +func (x *IsRequest) Reset() { + *x = IsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsRequest) ProtoMessage() {} + +func (x *IsRequest) ProtoReflect() protoreflect.Message { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsRequest.ProtoReflect.Descriptor instead. +func (*IsRequest) Descriptor() ([]byte, []int) { + return file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{3} +} + +func (x *IsRequest) GetPolicyContext() *v1.PolicyContext { + if x != nil { + return x.PolicyContext + } + return nil +} + +func (x *IsRequest) GetIdentityContext() *v1.IdentityContext { + if x != nil { + return x.IdentityContext + } + return nil +} + +func (x *IsRequest) GetResourceContext() *structpb.Struct { + if x != nil { + return x.ResourceContext + } + return nil +} + +type Decision struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Decision string `protobuf:"bytes,1,opt,name=decision,proto3" json:"decision,omitempty"` + Is bool `protobuf:"varint,2,opt,name=is,proto3" json:"is,omitempty"` +} + +func (x *Decision) Reset() { + *x = Decision{} + if protoimpl.UnsafeEnabled { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Decision) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Decision) ProtoMessage() {} + +func (x *Decision) ProtoReflect() protoreflect.Message { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Decision.ProtoReflect.Descriptor instead. +func (*Decision) Descriptor() ([]byte, []int) { + return file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{4} +} + +func (x *Decision) GetDecision() string { + if x != nil { + return x.Decision + } + return "" +} + +func (x *Decision) GetIs() bool { + if x != nil { + return x.Is + } + return false +} + +type IsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Decisions []*Decision `protobuf:"bytes,1,rep,name=decisions,proto3" json:"decisions,omitempty"` +} + +func (x *IsResponse) Reset() { + *x = IsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsResponse) ProtoMessage() {} + +func (x *IsResponse) ProtoReflect() protoreflect.Message { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsResponse.ProtoReflect.Descriptor instead. +func (*IsResponse) Descriptor() ([]byte, []int) { + return file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{5} +} + +func (x *IsResponse) GetDecisions() []*Decision { + if x != nil { + return x.Decisions + } + return nil +} + +type QueryOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metrics bool `protobuf:"varint,1,opt,name=metrics,proto3" json:"metrics,omitempty"` // default false + Instrument bool `protobuf:"varint,2,opt,name=instrument,proto3" json:"instrument,omitempty"` // default false + Trace TraceLevel `protobuf:"varint,3,opt,name=trace,proto3,enum=aserto.authorizer.authorizer.v1.TraceLevel" json:"trace,omitempty"` // default ExplainOffV1 + TraceSummary bool `protobuf:"varint,4,opt,name=trace_summary,json=traceSummary,proto3" json:"trace_summary,omitempty"` // default false +} + +func (x *QueryOptions) Reset() { + *x = QueryOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryOptions) ProtoMessage() {} + +func (x *QueryOptions) ProtoReflect() protoreflect.Message { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryOptions.ProtoReflect.Descriptor instead. +func (*QueryOptions) Descriptor() ([]byte, []int) { + return file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{6} +} + +func (x *QueryOptions) GetMetrics() bool { + if x != nil { + return x.Metrics + } + return false +} + +func (x *QueryOptions) GetInstrument() bool { + if x != nil { + return x.Instrument + } + return false +} + +func (x *QueryOptions) GetTrace() TraceLevel { + if x != nil { + return x.Trace + } + return TraceLevel_TRACE_LEVEL_UNKNOWN +} + +func (x *QueryOptions) GetTraceSummary() bool { + if x != nil { + return x.TraceSummary + } + return false +} + +type QueryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IdentityContext *v1.IdentityContext `protobuf:"bytes,1,opt,name=identity_context,json=identityContext,proto3" json:"identity_context,omitempty"` + Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` + Input string `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` + Options *QueryOptions `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"` + PolicyContext *v1.PolicyContext `protobuf:"bytes,5,opt,name=policy_context,json=policyContext,proto3" json:"policy_context,omitempty"` + ResourceContext *structpb.Struct `protobuf:"bytes,6,opt,name=resource_context,json=resourceContext,proto3" json:"resource_context,omitempty"` +} + +func (x *QueryRequest) Reset() { + *x = QueryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRequest) ProtoMessage() {} + +func (x *QueryRequest) ProtoReflect() protoreflect.Message { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead. +func (*QueryRequest) Descriptor() ([]byte, []int) { + return file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{7} +} + +func (x *QueryRequest) GetIdentityContext() *v1.IdentityContext { + if x != nil { + return x.IdentityContext + } + return nil +} + +func (x *QueryRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *QueryRequest) GetInput() string { + if x != nil { + return x.Input + } + return "" +} + +func (x *QueryRequest) GetOptions() *QueryOptions { + if x != nil { + return x.Options + } + return nil +} + +func (x *QueryRequest) GetPolicyContext() *v1.PolicyContext { + if x != nil { + return x.PolicyContext + } + return nil +} + +func (x *QueryRequest) GetResourceContext() *structpb.Struct { + if x != nil { + return x.ResourceContext + } + return nil +} + +type QueryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Results []*structpb.Struct `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + Metrics *structpb.Struct `protobuf:"bytes,2,opt,name=metrics,proto3" json:"metrics,omitempty"` + Trace []*structpb.Struct `protobuf:"bytes,3,rep,name=trace,proto3" json:"trace,omitempty"` + TraceSummary []string `protobuf:"bytes,4,rep,name=trace_summary,json=traceSummary,proto3" json:"trace_summary,omitempty"` +} + +func (x *QueryResponse) Reset() { + *x = QueryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryResponse) ProtoMessage() {} + +func (x *QueryResponse) ProtoReflect() protoreflect.Message { + mi := &file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead. +func (*QueryResponse) Descriptor() ([]byte, []int) { + return file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescGZIP(), []int{8} +} + +func (x *QueryResponse) GetResults() []*structpb.Struct { + if x != nil { + return x.Results + } + return nil +} + +func (x *QueryResponse) GetMetrics() *structpb.Struct { + if x != nil { + return x.Metrics + } + return nil +} + +func (x *QueryResponse) GetTrace() []*structpb.Struct { + if x != nil { + return x.Trace + } + return nil +} + +func (x *QueryResponse) GetTraceSummary() []string { + if x != nil { + return x.TraceSummary + } + return nil +} + +var File_aserto_authorizer_authorizer_v1_authorizer_proto protoreflect.FileDescriptor + +var file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x76, + 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1f, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x22, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x02, 0x0a, 0x13, 0x44, 0x65, + 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x43, 0x0a, 0x0e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x73, 0x65, 0x72, + 0x74, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x0d, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x49, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x12, 0x4e, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x65, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x42, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x72, 0x0a, 0x13, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x54, 0x72, 0x65, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0e, + 0x70, 0x61, 0x74, 0x68, 0x5f, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x70, 0x61, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x53, 0x65, 0x70, 0x61, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x66, 0x0a, 0x14, 0x44, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x74, 0x68, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x2b, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x4a, 0x04, 0x08, 0x02, 0x10, + 0x03, 0x22, 0xdf, 0x01, 0x0a, 0x09, 0x49, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x43, 0x0a, 0x0e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x0d, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x12, 0x49, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x0f, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, + 0x42, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x22, 0x36, 0x0a, 0x08, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x69, 0x73, 0x22, 0x55, 0x0a, 0x0a, 0x49, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x09, 0x64, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x61, + 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0xb0, 0x01, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1e, 0x0a, + 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, + 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x61, + 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x72, 0x61, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0xd7, 0x02, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x49, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x47, 0x0a, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x43, 0x0a, 0x0e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x0d, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x42, 0x0a, 0x10, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, + 0xc9, 0x01, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x31, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, + 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, + 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x74, + 0x72, 0x61, 0x63, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x2a, 0x5d, 0x0a, 0x0d, 0x50, + 0x61, 0x74, 0x68, 0x53, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x16, + 0x50, 0x41, 0x54, 0x48, 0x5f, 0x53, 0x45, 0x50, 0x41, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x41, 0x54, 0x48, + 0x5f, 0x53, 0x45, 0x50, 0x41, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x44, 0x4f, 0x54, 0x10, 0x01, + 0x12, 0x18, 0x0a, 0x14, 0x50, 0x41, 0x54, 0x48, 0x5f, 0x53, 0x45, 0x50, 0x41, 0x52, 0x41, 0x54, + 0x4f, 0x52, 0x5f, 0x53, 0x4c, 0x41, 0x53, 0x48, 0x10, 0x02, 0x2a, 0x7e, 0x0a, 0x0a, 0x54, 0x72, + 0x61, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x52, 0x41, 0x43, + 0x45, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, + 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, + 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, + 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, + 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x4e, 0x4f, 0x54, 0x45, + 0x53, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x4c, 0x45, 0x56, + 0x45, 0x4c, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x53, 0x10, 0x04, 0x32, 0xe1, 0x06, 0x0a, 0x0a, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x12, 0xb5, 0x02, 0x0a, 0x0c, 0x44, 0x65, + 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x65, 0x65, 0x12, 0x34, 0x2e, 0x61, 0x73, 0x65, + 0x72, 0x74, 0x6f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x35, 0x2e, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x65, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb7, 0x01, 0x92, 0x41, 0x8e, 0x01, 0x0a, 0x0a, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x0d, 0x44, 0x65, 0x63, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x72, 0x65, 0x65, 0x1a, 0x31, 0x52, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x73, 0x20, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x72, 0x65, 0x65, + 0x20, 0x66, 0x6f, 0x72, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x2a, 0x18, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x62, 0x24, 0x0a, 0x14, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x41, 0x50, 0x49, 0x4b, 0x65, 0x79, 0x12, 0x00, 0x0a, 0x0c, + 0x0a, 0x08, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x74, 0x72, 0x65, + 0x65, 0x12, 0xb3, 0x02, 0x0a, 0x02, 0x49, 0x73, 0x12, 0x2a, 0x2e, 0x61, 0x73, 0x65, 0x72, 0x74, + 0x6f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xd3, 0x01, 0x92, 0x41, 0xb4, 0x01, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x72, 0x12, 0x0f, 0x49, 0x73, 0x20, 0x28, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x64, 0x29, 0x1a, 0x60, 0x44, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, + 0x73, 0x20, 0x69, 0x66, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x20, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x67, 0x75, 0x61, 0x72, 0x64, + 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x2a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x2e, 0x69, 0x73, 0x62, 0x24, 0x0a, 0x14, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x41, 0x50, 0x49, 0x4b, 0x65, 0x79, 0x12, 0x00, 0x0a, 0x0c, + 0x0a, 0x08, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x69, 0x73, 0x12, 0xe4, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x2d, 0x2e, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2e, 0x2e, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x7c, 0x92, 0x41, 0x5b, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, + 0x72, 0x12, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x1a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x20, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x2a, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x62, 0x24, 0x0a, 0x14, 0x0a, 0x10, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x41, 0x50, 0x49, 0x4b, 0x65, 0x79, + 0x12, 0x00, 0x0a, 0x0c, 0x0a, 0x08, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x00, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x42, 0x92, + 0x02, 0x92, 0x41, 0x9c, 0x01, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x5a, 0x4d, 0x0a, 0x27, + 0x0a, 0x10, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x41, 0x50, 0x49, 0x4b, + 0x65, 0x79, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x0a, 0x22, 0x0a, 0x08, 0x54, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x49, 0x44, 0x12, 0x16, 0x08, 0x02, 0x1a, 0x10, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2d, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x69, 0x64, 0x20, 0x02, 0x62, 0x24, 0x0a, 0x14, 0x0a, + 0x10, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x41, 0x50, 0x49, 0x4b, 0x65, + 0x79, 0x12, 0x00, 0x0a, 0x0c, 0x0a, 0x08, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x44, 0x12, + 0x00, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x73, + 0x65, 0x72, 0x74, 0x6f, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x72, 0x70, 0x63, + 0x2d, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2f, 0x61, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, + 0x72, 0xaa, 0x02, 0x1f, 0x41, 0x73, 0x65, 0x72, 0x74, 0x6f, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, + 0x2e, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescOnce sync.Once + file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescData = file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDesc +) + +func file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescGZIP() []byte { + file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescOnce.Do(func() { + file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescData = protoimpl.X.CompressGZIP(file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescData) + }) + return file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDescData +} + +var file_aserto_authorizer_authorizer_v1_authorizer_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_aserto_authorizer_authorizer_v1_authorizer_proto_goTypes = []any{ + (PathSeparator)(0), // 0: aserto.authorizer.authorizer.v1.PathSeparator + (TraceLevel)(0), // 1: aserto.authorizer.authorizer.v1.TraceLevel + (*DecisionTreeRequest)(nil), // 2: aserto.authorizer.authorizer.v1.DecisionTreeRequest + (*DecisionTreeOptions)(nil), // 3: aserto.authorizer.authorizer.v1.DecisionTreeOptions + (*DecisionTreeResponse)(nil), // 4: aserto.authorizer.authorizer.v1.DecisionTreeResponse + (*IsRequest)(nil), // 5: aserto.authorizer.authorizer.v1.IsRequest + (*Decision)(nil), // 6: aserto.authorizer.authorizer.v1.Decision + (*IsResponse)(nil), // 7: aserto.authorizer.authorizer.v1.IsResponse + (*QueryOptions)(nil), // 8: aserto.authorizer.authorizer.v1.QueryOptions + (*QueryRequest)(nil), // 9: aserto.authorizer.authorizer.v1.QueryRequest + (*QueryResponse)(nil), // 10: aserto.authorizer.authorizer.v1.QueryResponse + (*v1.PolicyContext)(nil), // 11: aserto.api.v1.PolicyContext + (*v1.IdentityContext)(nil), // 12: aserto.api.v1.IdentityContext + (*structpb.Struct)(nil), // 13: google.protobuf.Struct +} +var file_aserto_authorizer_authorizer_v1_authorizer_proto_depIdxs = []int32{ + 11, // 0: aserto.authorizer.authorizer.v1.DecisionTreeRequest.policy_context:type_name -> aserto.api.v1.PolicyContext + 12, // 1: aserto.authorizer.authorizer.v1.DecisionTreeRequest.identity_context:type_name -> aserto.api.v1.IdentityContext + 3, // 2: aserto.authorizer.authorizer.v1.DecisionTreeRequest.options:type_name -> aserto.authorizer.authorizer.v1.DecisionTreeOptions + 13, // 3: aserto.authorizer.authorizer.v1.DecisionTreeRequest.resource_context:type_name -> google.protobuf.Struct + 0, // 4: aserto.authorizer.authorizer.v1.DecisionTreeOptions.path_separator:type_name -> aserto.authorizer.authorizer.v1.PathSeparator + 13, // 5: aserto.authorizer.authorizer.v1.DecisionTreeResponse.path:type_name -> google.protobuf.Struct + 11, // 6: aserto.authorizer.authorizer.v1.IsRequest.policy_context:type_name -> aserto.api.v1.PolicyContext + 12, // 7: aserto.authorizer.authorizer.v1.IsRequest.identity_context:type_name -> aserto.api.v1.IdentityContext + 13, // 8: aserto.authorizer.authorizer.v1.IsRequest.resource_context:type_name -> google.protobuf.Struct + 6, // 9: aserto.authorizer.authorizer.v1.IsResponse.decisions:type_name -> aserto.authorizer.authorizer.v1.Decision + 1, // 10: aserto.authorizer.authorizer.v1.QueryOptions.trace:type_name -> aserto.authorizer.authorizer.v1.TraceLevel + 12, // 11: aserto.authorizer.authorizer.v1.QueryRequest.identity_context:type_name -> aserto.api.v1.IdentityContext + 8, // 12: aserto.authorizer.authorizer.v1.QueryRequest.options:type_name -> aserto.authorizer.authorizer.v1.QueryOptions + 11, // 13: aserto.authorizer.authorizer.v1.QueryRequest.policy_context:type_name -> aserto.api.v1.PolicyContext + 13, // 14: aserto.authorizer.authorizer.v1.QueryRequest.resource_context:type_name -> google.protobuf.Struct + 13, // 15: aserto.authorizer.authorizer.v1.QueryResponse.results:type_name -> google.protobuf.Struct + 13, // 16: aserto.authorizer.authorizer.v1.QueryResponse.metrics:type_name -> google.protobuf.Struct + 13, // 17: aserto.authorizer.authorizer.v1.QueryResponse.trace:type_name -> google.protobuf.Struct + 2, // 18: aserto.authorizer.authorizer.v1.Authorizer.DecisionTree:input_type -> aserto.authorizer.authorizer.v1.DecisionTreeRequest + 5, // 19: aserto.authorizer.authorizer.v1.Authorizer.Is:input_type -> aserto.authorizer.authorizer.v1.IsRequest + 9, // 20: aserto.authorizer.authorizer.v1.Authorizer.Query:input_type -> aserto.authorizer.authorizer.v1.QueryRequest + 4, // 21: aserto.authorizer.authorizer.v1.Authorizer.DecisionTree:output_type -> aserto.authorizer.authorizer.v1.DecisionTreeResponse + 7, // 22: aserto.authorizer.authorizer.v1.Authorizer.Is:output_type -> aserto.authorizer.authorizer.v1.IsResponse + 10, // 23: aserto.authorizer.authorizer.v1.Authorizer.Query:output_type -> aserto.authorizer.authorizer.v1.QueryResponse + 21, // [21:24] is the sub-list for method output_type + 18, // [18:21] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name +} + +func init() { file_aserto_authorizer_authorizer_v1_authorizer_proto_init() } +func file_aserto_authorizer_authorizer_v1_authorizer_proto_init() { + if File_aserto_authorizer_authorizer_v1_authorizer_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*DecisionTreeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*DecisionTreeOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*DecisionTreeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*IsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*Decision); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*IsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*QueryOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*QueryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*QueryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDesc, + NumEnums: 2, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_aserto_authorizer_authorizer_v1_authorizer_proto_goTypes, + DependencyIndexes: file_aserto_authorizer_authorizer_v1_authorizer_proto_depIdxs, + EnumInfos: file_aserto_authorizer_authorizer_v1_authorizer_proto_enumTypes, + MessageInfos: file_aserto_authorizer_authorizer_v1_authorizer_proto_msgTypes, + }.Build() + File_aserto_authorizer_authorizer_v1_authorizer_proto = out.File + file_aserto_authorizer_authorizer_v1_authorizer_proto_rawDesc = nil + file_aserto_authorizer_authorizer_v1_authorizer_proto_goTypes = nil + file_aserto_authorizer_authorizer_v1_authorizer_proto_depIdxs = nil +} diff --git a/aserto/authorizer/authorizer/v1/authorizer.pb.gw.go b/aserto/authorizer/authorizer/v1/authorizer.pb.gw.go new file mode 100644 index 0000000..2598a4d --- /dev/null +++ b/aserto/authorizer/authorizer/v1/authorizer.pb.gw.go @@ -0,0 +1,318 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: aserto/authorizer/authorizer/v1/authorizer.proto + +/* +Package authorizer is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package authorizer + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_Authorizer_DecisionTree_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DecisionTreeRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DecisionTree(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_DecisionTree_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DecisionTreeRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DecisionTree(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_Is_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq IsRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Is(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_Is_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq IsRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Is(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Authorizer_Query_0(ctx context.Context, marshaler runtime.Marshaler, client AuthorizerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Query(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Authorizer_Query_0(ctx context.Context, marshaler runtime.Marshaler, server AuthorizerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Query(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterAuthorizerHandlerServer registers the http handlers for service Authorizer to "mux". +// UnaryRPC :call AuthorizerServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthorizerHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. +func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthorizerServer) error { + + mux.Handle("POST", pattern_Authorizer_DecisionTree_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/aserto.authorizer.authorizer.v1.Authorizer/DecisionTree", runtime.WithHTTPPathPattern("/api/v1/authz/decisiontree")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_DecisionTree_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_DecisionTree_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_Is_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/aserto.authorizer.authorizer.v1.Authorizer/Is", runtime.WithHTTPPathPattern("/api/v1/authz/is")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_Is_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Is_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_Query_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/aserto.authorizer.authorizer.v1.Authorizer/Query", runtime.WithHTTPPathPattern("/api/v1/authz/query")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Authorizer_Query_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Query_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterAuthorizerHandlerFromEndpoint is same as RegisterAuthorizerHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterAuthorizerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterAuthorizerHandler(ctx, mux, conn) +} + +// RegisterAuthorizerHandler registers the http handlers for service Authorizer to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterAuthorizerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterAuthorizerHandlerClient(ctx, mux, NewAuthorizerClient(conn)) +} + +// RegisterAuthorizerHandlerClient registers the http handlers for service Authorizer +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthorizerClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthorizerClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "AuthorizerClient" to call the correct interceptors. This client ignores the HTTP middlewares. +func RegisterAuthorizerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthorizerClient) error { + + mux.Handle("POST", pattern_Authorizer_DecisionTree_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/aserto.authorizer.authorizer.v1.Authorizer/DecisionTree", runtime.WithHTTPPathPattern("/api/v1/authz/decisiontree")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_DecisionTree_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_DecisionTree_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_Is_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/aserto.authorizer.authorizer.v1.Authorizer/Is", runtime.WithHTTPPathPattern("/api/v1/authz/is")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_Is_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Is_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Authorizer_Query_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/aserto.authorizer.authorizer.v1.Authorizer/Query", runtime.WithHTTPPathPattern("/api/v1/authz/query")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Authorizer_Query_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Authorizer_Query_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Authorizer_DecisionTree_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "authz", "decisiontree"}, "")) + + pattern_Authorizer_Is_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "authz", "is"}, "")) + + pattern_Authorizer_Query_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "authz", "query"}, "")) +) + +var ( + forward_Authorizer_DecisionTree_0 = runtime.ForwardResponseMessage + + forward_Authorizer_Is_0 = runtime.ForwardResponseMessage + + forward_Authorizer_Query_0 = runtime.ForwardResponseMessage +) diff --git a/aserto/authorizer/authorizer/v1/authorizer_grpc.pb.go b/aserto/authorizer/authorizer/v1/authorizer_grpc.pb.go new file mode 100644 index 0000000..0caf7c3 --- /dev/null +++ b/aserto/authorizer/authorizer/v1/authorizer_grpc.pb.go @@ -0,0 +1,195 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: aserto/authorizer/authorizer/v1/authorizer.proto + +package authorizer + +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 ( + Authorizer_DecisionTree_FullMethodName = "/aserto.authorizer.authorizer.v1.Authorizer/DecisionTree" + Authorizer_Is_FullMethodName = "/aserto.authorizer.authorizer.v1.Authorizer/Is" + Authorizer_Query_FullMethodName = "/aserto.authorizer.authorizer.v1.Authorizer/Query" +) + +// AuthorizerClient is the client API for Authorizer 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 AuthorizerClient interface { + DecisionTree(ctx context.Context, in *DecisionTreeRequest, opts ...grpc.CallOption) (*DecisionTreeResponse, error) + Is(ctx context.Context, in *IsRequest, opts ...grpc.CallOption) (*IsResponse, error) + Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) +} + +type authorizerClient struct { + cc grpc.ClientConnInterface +} + +func NewAuthorizerClient(cc grpc.ClientConnInterface) AuthorizerClient { + return &authorizerClient{cc} +} + +func (c *authorizerClient) DecisionTree(ctx context.Context, in *DecisionTreeRequest, opts ...grpc.CallOption) (*DecisionTreeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DecisionTreeResponse) + err := c.cc.Invoke(ctx, Authorizer_DecisionTree_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) Is(ctx context.Context, in *IsRequest, opts ...grpc.CallOption) (*IsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(IsResponse) + err := c.cc.Invoke(ctx, Authorizer_Is_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authorizerClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryResponse) + err := c.cc.Invoke(ctx, Authorizer_Query_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AuthorizerServer is the server API for Authorizer service. +// All implementations should embed UnimplementedAuthorizerServer +// for forward compatibility. +type AuthorizerServer interface { + DecisionTree(context.Context, *DecisionTreeRequest) (*DecisionTreeResponse, error) + Is(context.Context, *IsRequest) (*IsResponse, error) + Query(context.Context, *QueryRequest) (*QueryResponse, error) +} + +// UnimplementedAuthorizerServer should 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 UnimplementedAuthorizerServer struct{} + +func (UnimplementedAuthorizerServer) DecisionTree(context.Context, *DecisionTreeRequest) (*DecisionTreeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DecisionTree not implemented") +} +func (UnimplementedAuthorizerServer) Is(context.Context, *IsRequest) (*IsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Is not implemented") +} +func (UnimplementedAuthorizerServer) Query(context.Context, *QueryRequest) (*QueryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Query not implemented") +} +func (UnimplementedAuthorizerServer) testEmbeddedByValue() {} + +// UnsafeAuthorizerServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AuthorizerServer will +// result in compilation errors. +type UnsafeAuthorizerServer interface { + mustEmbedUnimplementedAuthorizerServer() +} + +func RegisterAuthorizerServer(s grpc.ServiceRegistrar, srv AuthorizerServer) { + // If the following call pancis, it indicates UnimplementedAuthorizerServer 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(&Authorizer_ServiceDesc, srv) +} + +func _Authorizer_DecisionTree_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DecisionTreeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).DecisionTree(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_DecisionTree_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).DecisionTree(ctx, req.(*DecisionTreeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_Is_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).Is(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_Is_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).Is(ctx, req.(*IsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Authorizer_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizerServer).Query(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Authorizer_Query_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizerServer).Query(ctx, req.(*QueryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Authorizer_ServiceDesc is the grpc.ServiceDesc for Authorizer service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Authorizer_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "aserto.authorizer.authorizer.v1.Authorizer", + HandlerType: (*AuthorizerServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DecisionTree", + Handler: _Authorizer_DecisionTree_Handler, + }, + { + MethodName: "Is", + Handler: _Authorizer_Is_Handler, + }, + { + MethodName: "Query", + Handler: _Authorizer_Query_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "aserto/authorizer/authorizer/v1/authorizer.proto", +} diff --git a/aserto/authorizer/directory/v1/directory.pb.go b/aserto/authorizer/directory/v1/directory.pb.go index 85d0cfa..da06c7b 100644 --- a/aserto/authorizer/directory/v1/directory.pb.go +++ b/aserto/authorizer/directory/v1/directory.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/authorizer/directory/v1/directory.proto @@ -5383,7 +5383,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_rawDescGZIP() []byte { } var file_aserto_authorizer_directory_v1_directory_proto_msgTypes = make([]protoimpl.MessageInfo, 82) -var file_aserto_authorizer_directory_v1_directory_proto_goTypes = []interface{}{ +var file_aserto_authorizer_directory_v1_directory_proto_goTypes = []any{ (*ListUsersRequest)(nil), // 0: aserto.authorizer.directory.v1.ListUsersRequest (*ListUsersResponse)(nil), // 1: aserto.authorizer.directory.v1.ListUsersResponse (*GetUserRequest)(nil), // 2: aserto.authorizer.directory.v1.GetUserRequest @@ -5612,7 +5612,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ListUsersRequest); i { case 0: return &v.state @@ -5624,7 +5624,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ListUsersResponse); i { case 0: return &v.state @@ -5636,7 +5636,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*GetUserRequest); i { case 0: return &v.state @@ -5648,7 +5648,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*GetUserResponse); i { case 0: return &v.state @@ -5660,7 +5660,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*GetIdentityRequest); i { case 0: return &v.state @@ -5672,7 +5672,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*GetIdentityResponse); i { case 0: return &v.state @@ -5684,7 +5684,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*CreateUserRequest); i { case 0: return &v.state @@ -5696,7 +5696,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*CreateUserResponse); i { case 0: return &v.state @@ -5708,7 +5708,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*UpdateUserRequest); i { case 0: return &v.state @@ -5720,7 +5720,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*UpdateUserResponse); i { case 0: return &v.state @@ -5732,7 +5732,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*DeleteUserRequest); i { case 0: return &v.state @@ -5744,7 +5744,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*DeleteUserResponse); i { case 0: return &v.state @@ -5756,7 +5756,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*ListTenantsRequest); i { case 0: return &v.state @@ -5768,7 +5768,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*ListTenantsResponse); i { case 0: return &v.state @@ -5780,7 +5780,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*CreateTenantRequest); i { case 0: return &v.state @@ -5792,7 +5792,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*CreateTenantResponse); i { case 0: return &v.state @@ -5804,7 +5804,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*DeleteTenantRequest); i { case 0: return &v.state @@ -5816,7 +5816,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*DeleteTenantResponse); i { case 0: return &v.state @@ -5828,7 +5828,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*LoadUsersRequest); i { case 0: return &v.state @@ -5840,7 +5840,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*LoadUsersResponse); i { case 0: return &v.state @@ -5852,7 +5852,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*ListResourcesRequest); i { case 0: return &v.state @@ -5864,7 +5864,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*ListResourcesResponse); i { case 0: return &v.state @@ -5876,7 +5876,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*GetResourceRequest); i { case 0: return &v.state @@ -5888,7 +5888,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*GetResourceResponse); i { case 0: return &v.state @@ -5900,7 +5900,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*SetResourceRequest); i { case 0: return &v.state @@ -5912,7 +5912,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[25].Exporter = func(v any, i int) any { switch v := v.(*SetResourceResponse); i { case 0: return &v.state @@ -5924,7 +5924,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[26].Exporter = func(v any, i int) any { switch v := v.(*DeleteResourceRequest); i { case 0: return &v.state @@ -5936,7 +5936,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[27].Exporter = func(v any, i int) any { switch v := v.(*DeleteResourceResponse); i { case 0: return &v.state @@ -5948,7 +5948,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[28].Exporter = func(v any, i int) any { switch v := v.(*ListUserApplicationsRequest); i { case 0: return &v.state @@ -5960,7 +5960,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[29].Exporter = func(v any, i int) any { switch v := v.(*ListUserApplicationsResponse); i { case 0: return &v.state @@ -5972,7 +5972,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[30].Exporter = func(v any, i int) any { switch v := v.(*DeleteUserApplicationRequest); i { case 0: return &v.state @@ -5984,7 +5984,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[31].Exporter = func(v any, i int) any { switch v := v.(*DeleteUserApplicationResponse); i { case 0: return &v.state @@ -5996,7 +5996,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[32].Exporter = func(v any, i int) any { switch v := v.(*GetUserPropertiesRequest); i { case 0: return &v.state @@ -6008,7 +6008,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[33].Exporter = func(v any, i int) any { switch v := v.(*GetUserPropertiesResponse); i { case 0: return &v.state @@ -6020,7 +6020,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[34].Exporter = func(v any, i int) any { switch v := v.(*GetApplPropertiesRequest); i { case 0: return &v.state @@ -6032,7 +6032,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[35].Exporter = func(v any, i int) any { switch v := v.(*GetApplPropertiesResponse); i { case 0: return &v.state @@ -6044,7 +6044,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[36].Exporter = func(v any, i int) any { switch v := v.(*SetUserPropertiesRequest); i { case 0: return &v.state @@ -6056,7 +6056,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[37].Exporter = func(v any, i int) any { switch v := v.(*SetUserPropertiesResponse); i { case 0: return &v.state @@ -6068,7 +6068,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[38].Exporter = func(v any, i int) any { switch v := v.(*SetApplPropertiesRequest); i { case 0: return &v.state @@ -6080,7 +6080,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[39].Exporter = func(v any, i int) any { switch v := v.(*SetApplPropertiesResponse); i { case 0: return &v.state @@ -6092,7 +6092,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[40].Exporter = func(v any, i int) any { switch v := v.(*SetUserPropertyRequest); i { case 0: return &v.state @@ -6104,7 +6104,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[41].Exporter = func(v any, i int) any { switch v := v.(*SetUserPropertyResponse); i { case 0: return &v.state @@ -6116,7 +6116,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[42].Exporter = func(v any, i int) any { switch v := v.(*SetApplPropertyRequest); i { case 0: return &v.state @@ -6128,7 +6128,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[43].Exporter = func(v any, i int) any { switch v := v.(*SetApplPropertyResponse); i { case 0: return &v.state @@ -6140,7 +6140,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[44].Exporter = func(v any, i int) any { switch v := v.(*DeleteUserPropertyRequest); i { case 0: return &v.state @@ -6152,7 +6152,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[45].Exporter = func(v any, i int) any { switch v := v.(*DeleteUserPropertyResponse); i { case 0: return &v.state @@ -6164,7 +6164,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[46].Exporter = func(v any, i int) any { switch v := v.(*DeleteApplPropertyRequest); i { case 0: return &v.state @@ -6176,7 +6176,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[47].Exporter = func(v any, i int) any { switch v := v.(*DeleteApplPropertyResponse); i { case 0: return &v.state @@ -6188,7 +6188,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[48].Exporter = func(v any, i int) any { switch v := v.(*GetUserRolesRequest); i { case 0: return &v.state @@ -6200,7 +6200,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[49].Exporter = func(v any, i int) any { switch v := v.(*GetUserRolesResponse); i { case 0: return &v.state @@ -6212,7 +6212,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[50].Exporter = func(v any, i int) any { switch v := v.(*GetApplRolesRequest); i { case 0: return &v.state @@ -6224,7 +6224,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[51].Exporter = func(v any, i int) any { switch v := v.(*GetApplRolesResponse); i { case 0: return &v.state @@ -6236,7 +6236,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[52].Exporter = func(v any, i int) any { switch v := v.(*SetUserRolesRequest); i { case 0: return &v.state @@ -6248,7 +6248,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[53].Exporter = func(v any, i int) any { switch v := v.(*SetUserRolesResponse); i { case 0: return &v.state @@ -6260,7 +6260,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[54].Exporter = func(v any, i int) any { switch v := v.(*SetApplRolesRequest); i { case 0: return &v.state @@ -6272,7 +6272,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[55].Exporter = func(v any, i int) any { switch v := v.(*SetApplRolesResponse); i { case 0: return &v.state @@ -6284,7 +6284,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[56].Exporter = func(v any, i int) any { switch v := v.(*SetUserRoleRequest); i { case 0: return &v.state @@ -6296,7 +6296,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[57].Exporter = func(v any, i int) any { switch v := v.(*SetUserRoleResponse); i { case 0: return &v.state @@ -6308,7 +6308,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[58].Exporter = func(v any, i int) any { switch v := v.(*SetApplRoleRequest); i { case 0: return &v.state @@ -6320,7 +6320,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[59].Exporter = func(v any, i int) any { switch v := v.(*SetApplRoleResponse); i { case 0: return &v.state @@ -6332,7 +6332,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[60].Exporter = func(v any, i int) any { switch v := v.(*DeleteUserRoleRequest); i { case 0: return &v.state @@ -6344,7 +6344,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[61].Exporter = func(v any, i int) any { switch v := v.(*DeleteUserRoleResponse); i { case 0: return &v.state @@ -6356,7 +6356,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[62].Exporter = func(v any, i int) any { switch v := v.(*DeleteApplRoleRequest); i { case 0: return &v.state @@ -6368,7 +6368,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[63].Exporter = func(v any, i int) any { switch v := v.(*DeleteApplRoleResponse); i { case 0: return &v.state @@ -6380,7 +6380,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[64].Exporter = func(v any, i int) any { switch v := v.(*GetUserPermissionsRequest); i { case 0: return &v.state @@ -6392,7 +6392,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[65].Exporter = func(v any, i int) any { switch v := v.(*GetUserPermissionsResponse); i { case 0: return &v.state @@ -6404,7 +6404,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[66].Exporter = func(v any, i int) any { switch v := v.(*GetApplPermissionsRequest); i { case 0: return &v.state @@ -6416,7 +6416,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[67].Exporter = func(v any, i int) any { switch v := v.(*GetApplPermissionsResponse); i { case 0: return &v.state @@ -6428,7 +6428,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[68].Exporter = func(v any, i int) any { switch v := v.(*SetUserPermissionsRequest); i { case 0: return &v.state @@ -6440,7 +6440,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[69].Exporter = func(v any, i int) any { switch v := v.(*SetUserPermissionsResponse); i { case 0: return &v.state @@ -6452,7 +6452,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[70].Exporter = func(v any, i int) any { switch v := v.(*SetApplPermissionsRequest); i { case 0: return &v.state @@ -6464,7 +6464,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[71].Exporter = func(v any, i int) any { switch v := v.(*SetApplPermissionsResponse); i { case 0: return &v.state @@ -6476,7 +6476,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[72].Exporter = func(v any, i int) any { switch v := v.(*SetUserPermissionRequest); i { case 0: return &v.state @@ -6488,7 +6488,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[73].Exporter = func(v any, i int) any { switch v := v.(*SetUserPermissionResponse); i { case 0: return &v.state @@ -6500,7 +6500,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[74].Exporter = func(v any, i int) any { switch v := v.(*SetApplPermissionRequest); i { case 0: return &v.state @@ -6512,7 +6512,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[75].Exporter = func(v any, i int) any { switch v := v.(*SetApplPermissionResponse); i { case 0: return &v.state @@ -6524,7 +6524,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[76].Exporter = func(v any, i int) any { switch v := v.(*DeleteUserPermissionRequest); i { case 0: return &v.state @@ -6536,7 +6536,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[77].Exporter = func(v any, i int) any { switch v := v.(*DeleteUserPermissionResponse); i { case 0: return &v.state @@ -6548,7 +6548,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[78].Exporter = func(v any, i int) any { switch v := v.(*DeleteApplPermissionRequest); i { case 0: return &v.state @@ -6560,7 +6560,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[79].Exporter = func(v any, i int) any { switch v := v.(*DeleteApplPermissionResponse); i { case 0: return &v.state @@ -6572,7 +6572,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[80].Exporter = func(v any, i int) any { switch v := v.(*GetValueRequest); i { case 0: return &v.state @@ -6584,7 +6584,7 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { return nil } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[81].Exporter = func(v any, i int) any { switch v := v.(*GetValueResponse); i { case 0: return &v.state @@ -6597,8 +6597,8 @@ func file_aserto_authorizer_directory_v1_directory_proto_init() { } } } - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_aserto_authorizer_directory_v1_directory_proto_msgTypes[18].OneofWrappers = []interface{}{ + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[0].OneofWrappers = []any{} + file_aserto_authorizer_directory_v1_directory_proto_msgTypes[18].OneofWrappers = []any{ (*LoadUsersRequest_User)(nil), (*LoadUsersRequest_UserExt)(nil), (*LoadUsersRequest_DeleteUser)(nil), diff --git a/aserto/authorizer/directory/v1/directory.pb.gw.go b/aserto/authorizer/directory/v1/directory.pb.gw.go index 21ed676..b9fb16a 100644 --- a/aserto/authorizer/directory/v1/directory.pb.gw.go +++ b/aserto/authorizer/directory/v1/directory.pb.gw.go @@ -323,7 +323,7 @@ func request_Directory_LoadUsers_0(ctx context.Context, marshaler runtime.Marsha var metadata runtime.ServerMetadata stream, err := client.LoadUsers(ctx) if err != nil { - grpclog.Infof("Failed to start streaming: %v", err) + grpclog.Errorf("Failed to start streaming: %v", err) return nil, metadata, err } dec := marshaler.NewDecoder(req.Body) @@ -334,25 +334,25 @@ func request_Directory_LoadUsers_0(ctx context.Context, marshaler runtime.Marsha break } if err != nil { - grpclog.Infof("Failed to decode request: %v", err) + grpclog.Errorf("Failed to decode request: %v", err) return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err = stream.Send(&protoReq); err != nil { if err == io.EOF { break } - grpclog.Infof("Failed to send request: %v", err) + grpclog.Errorf("Failed to send request: %v", err) return nil, metadata, err } } if err := stream.CloseSend(); err != nil { - grpclog.Infof("Failed to terminate client stream: %v", err) + grpclog.Errorf("Failed to terminate client stream: %v", err) return nil, metadata, err } header, err := stream.Header() if err != nil { - grpclog.Infof("Failed to get header from client: %v", err) + grpclog.Errorf("Failed to get header from client: %v", err) return nil, metadata, err } metadata.HeaderMD = header @@ -2061,6 +2061,7 @@ func local_request_Directory_GetValue_0(ctx context.Context, marshaler runtime.M // UnaryRPC :call DirectoryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDirectoryHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterDirectoryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DirectoryServer) error { mux.Handle("GET", pattern_Directory_ListUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -3076,21 +3077,21 @@ func RegisterDirectoryHandlerServer(ctx context.Context, mux *runtime.ServeMux, // RegisterDirectoryHandlerFromEndpoint is same as RegisterDirectoryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterDirectoryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -3108,7 +3109,7 @@ func RegisterDirectoryHandler(ctx context.Context, mux *runtime.ServeMux, conn * // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DirectoryClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DirectoryClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "DirectoryClient" to call the correct interceptors. +// "DirectoryClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterDirectoryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DirectoryClient) error { mux.Handle("GET", pattern_Directory_ListUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/authorizer/directory/v1/directory_grpc.pb.go b/aserto/authorizer/directory/v1/directory_grpc.pb.go index a63c0fe..90d095d 100644 --- a/aserto/authorizer/directory/v1/directory_grpc.pb.go +++ b/aserto/authorizer/directory/v1/directory_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/authorizer/directory/v1/directory.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Directory_ListUsers_FullMethodName = "/aserto.authorizer.directory.v1.Directory/ListUsers" @@ -75,7 +75,7 @@ type DirectoryClient interface { ListTenants(ctx context.Context, in *ListTenantsRequest, opts ...grpc.CallOption) (*ListTenantsResponse, error) CreateTenant(ctx context.Context, in *CreateTenantRequest, opts ...grpc.CallOption) (*CreateTenantResponse, error) DeleteTenant(ctx context.Context, in *DeleteTenantRequest, opts ...grpc.CallOption) (*DeleteTenantResponse, error) - LoadUsers(ctx context.Context, opts ...grpc.CallOption) (Directory_LoadUsersClient, error) + LoadUsers(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[LoadUsersRequest, LoadUsersResponse], error) ListResources(ctx context.Context, in *ListResourcesRequest, opts ...grpc.CallOption) (*ListResourcesResponse, error) GetResource(ctx context.Context, in *GetResourceRequest, opts ...grpc.CallOption) (*GetResourceResponse, error) SetResource(ctx context.Context, in *SetResourceRequest, opts ...grpc.CallOption) (*SetResourceResponse, error) @@ -118,8 +118,9 @@ func NewDirectoryClient(cc grpc.ClientConnInterface) DirectoryClient { } func (c *directoryClient) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListUsersResponse) - err := c.cc.Invoke(ctx, Directory_ListUsers_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_ListUsers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -127,8 +128,9 @@ func (c *directoryClient) ListUsers(ctx context.Context, in *ListUsersRequest, o } func (c *directoryClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetUserResponse) - err := c.cc.Invoke(ctx, Directory_GetUser_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_GetUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -136,8 +138,9 @@ func (c *directoryClient) GetUser(ctx context.Context, in *GetUserRequest, opts } func (c *directoryClient) 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, Directory_GetIdentity_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_GetIdentity_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -145,8 +148,9 @@ func (c *directoryClient) GetIdentity(ctx context.Context, in *GetIdentityReques } func (c *directoryClient) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateUserResponse) - err := c.cc.Invoke(ctx, Directory_CreateUser_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_CreateUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -154,8 +158,9 @@ func (c *directoryClient) CreateUser(ctx context.Context, in *CreateUserRequest, } func (c *directoryClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateUserResponse) - err := c.cc.Invoke(ctx, Directory_UpdateUser_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_UpdateUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -163,8 +168,9 @@ func (c *directoryClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, } func (c *directoryClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteUserResponse) - err := c.cc.Invoke(ctx, Directory_DeleteUser_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_DeleteUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -172,8 +178,9 @@ func (c *directoryClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, } func (c *directoryClient) ListTenants(ctx context.Context, in *ListTenantsRequest, opts ...grpc.CallOption) (*ListTenantsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListTenantsResponse) - err := c.cc.Invoke(ctx, Directory_ListTenants_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_ListTenants_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -181,8 +188,9 @@ func (c *directoryClient) ListTenants(ctx context.Context, in *ListTenantsReques } func (c *directoryClient) CreateTenant(ctx context.Context, in *CreateTenantRequest, opts ...grpc.CallOption) (*CreateTenantResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateTenantResponse) - err := c.cc.Invoke(ctx, Directory_CreateTenant_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_CreateTenant_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -190,51 +198,32 @@ func (c *directoryClient) CreateTenant(ctx context.Context, in *CreateTenantRequ } func (c *directoryClient) DeleteTenant(ctx context.Context, in *DeleteTenantRequest, opts ...grpc.CallOption) (*DeleteTenantResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteTenantResponse) - err := c.cc.Invoke(ctx, Directory_DeleteTenant_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_DeleteTenant_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *directoryClient) LoadUsers(ctx context.Context, opts ...grpc.CallOption) (Directory_LoadUsersClient, error) { - stream, err := c.cc.NewStream(ctx, &Directory_ServiceDesc.Streams[0], Directory_LoadUsers_FullMethodName, opts...) +func (c *directoryClient) LoadUsers(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[LoadUsersRequest, LoadUsersResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Directory_ServiceDesc.Streams[0], Directory_LoadUsers_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &directoryLoadUsersClient{stream} + x := &grpc.GenericClientStream[LoadUsersRequest, LoadUsersResponse]{ClientStream: stream} return x, nil } -type Directory_LoadUsersClient interface { - Send(*LoadUsersRequest) error - CloseAndRecv() (*LoadUsersResponse, error) - grpc.ClientStream -} - -type directoryLoadUsersClient struct { - grpc.ClientStream -} - -func (x *directoryLoadUsersClient) Send(m *LoadUsersRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *directoryLoadUsersClient) CloseAndRecv() (*LoadUsersResponse, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(LoadUsersResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Directory_LoadUsersClient = grpc.ClientStreamingClient[LoadUsersRequest, LoadUsersResponse] func (c *directoryClient) ListResources(ctx context.Context, in *ListResourcesRequest, opts ...grpc.CallOption) (*ListResourcesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListResourcesResponse) - err := c.cc.Invoke(ctx, Directory_ListResources_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_ListResources_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -242,8 +231,9 @@ func (c *directoryClient) ListResources(ctx context.Context, in *ListResourcesRe } func (c *directoryClient) GetResource(ctx context.Context, in *GetResourceRequest, opts ...grpc.CallOption) (*GetResourceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetResourceResponse) - err := c.cc.Invoke(ctx, Directory_GetResource_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_GetResource_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -251,8 +241,9 @@ func (c *directoryClient) GetResource(ctx context.Context, in *GetResourceReques } func (c *directoryClient) SetResource(ctx context.Context, in *SetResourceRequest, opts ...grpc.CallOption) (*SetResourceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetResourceResponse) - err := c.cc.Invoke(ctx, Directory_SetResource_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_SetResource_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -260,8 +251,9 @@ func (c *directoryClient) SetResource(ctx context.Context, in *SetResourceReques } func (c *directoryClient) DeleteResource(ctx context.Context, in *DeleteResourceRequest, opts ...grpc.CallOption) (*DeleteResourceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteResourceResponse) - err := c.cc.Invoke(ctx, Directory_DeleteResource_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_DeleteResource_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -269,8 +261,9 @@ func (c *directoryClient) DeleteResource(ctx context.Context, in *DeleteResource } func (c *directoryClient) GetUserProperties(ctx context.Context, in *GetUserPropertiesRequest, opts ...grpc.CallOption) (*GetUserPropertiesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetUserPropertiesResponse) - err := c.cc.Invoke(ctx, Directory_GetUserProperties_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_GetUserProperties_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -278,8 +271,9 @@ func (c *directoryClient) GetUserProperties(ctx context.Context, in *GetUserProp } func (c *directoryClient) SetUserProperties(ctx context.Context, in *SetUserPropertiesRequest, opts ...grpc.CallOption) (*SetUserPropertiesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetUserPropertiesResponse) - err := c.cc.Invoke(ctx, Directory_SetUserProperties_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_SetUserProperties_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -287,8 +281,9 @@ func (c *directoryClient) SetUserProperties(ctx context.Context, in *SetUserProp } func (c *directoryClient) SetUserProperty(ctx context.Context, in *SetUserPropertyRequest, opts ...grpc.CallOption) (*SetUserPropertyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetUserPropertyResponse) - err := c.cc.Invoke(ctx, Directory_SetUserProperty_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_SetUserProperty_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -296,8 +291,9 @@ func (c *directoryClient) SetUserProperty(ctx context.Context, in *SetUserProper } func (c *directoryClient) DeleteUserProperty(ctx context.Context, in *DeleteUserPropertyRequest, opts ...grpc.CallOption) (*DeleteUserPropertyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteUserPropertyResponse) - err := c.cc.Invoke(ctx, Directory_DeleteUserProperty_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_DeleteUserProperty_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -305,8 +301,9 @@ func (c *directoryClient) DeleteUserProperty(ctx context.Context, in *DeleteUser } func (c *directoryClient) GetUserRoles(ctx context.Context, in *GetUserRolesRequest, opts ...grpc.CallOption) (*GetUserRolesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetUserRolesResponse) - err := c.cc.Invoke(ctx, Directory_GetUserRoles_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_GetUserRoles_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -314,8 +311,9 @@ func (c *directoryClient) GetUserRoles(ctx context.Context, in *GetUserRolesRequ } func (c *directoryClient) SetUserRoles(ctx context.Context, in *SetUserRolesRequest, opts ...grpc.CallOption) (*SetUserRolesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetUserRolesResponse) - err := c.cc.Invoke(ctx, Directory_SetUserRoles_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_SetUserRoles_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -323,8 +321,9 @@ func (c *directoryClient) SetUserRoles(ctx context.Context, in *SetUserRolesRequ } func (c *directoryClient) SetUserRole(ctx context.Context, in *SetUserRoleRequest, opts ...grpc.CallOption) (*SetUserRoleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetUserRoleResponse) - err := c.cc.Invoke(ctx, Directory_SetUserRole_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_SetUserRole_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -332,8 +331,9 @@ func (c *directoryClient) SetUserRole(ctx context.Context, in *SetUserRoleReques } func (c *directoryClient) DeleteUserRole(ctx context.Context, in *DeleteUserRoleRequest, opts ...grpc.CallOption) (*DeleteUserRoleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteUserRoleResponse) - err := c.cc.Invoke(ctx, Directory_DeleteUserRole_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_DeleteUserRole_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -341,8 +341,9 @@ func (c *directoryClient) DeleteUserRole(ctx context.Context, in *DeleteUserRole } func (c *directoryClient) GetUserPermissions(ctx context.Context, in *GetUserPermissionsRequest, opts ...grpc.CallOption) (*GetUserPermissionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetUserPermissionsResponse) - err := c.cc.Invoke(ctx, Directory_GetUserPermissions_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_GetUserPermissions_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -350,8 +351,9 @@ func (c *directoryClient) GetUserPermissions(ctx context.Context, in *GetUserPer } func (c *directoryClient) SetUserPermissions(ctx context.Context, in *SetUserPermissionsRequest, opts ...grpc.CallOption) (*SetUserPermissionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetUserPermissionsResponse) - err := c.cc.Invoke(ctx, Directory_SetUserPermissions_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_SetUserPermissions_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -359,8 +361,9 @@ func (c *directoryClient) SetUserPermissions(ctx context.Context, in *SetUserPer } func (c *directoryClient) SetUserPermission(ctx context.Context, in *SetUserPermissionRequest, opts ...grpc.CallOption) (*SetUserPermissionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetUserPermissionResponse) - err := c.cc.Invoke(ctx, Directory_SetUserPermission_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_SetUserPermission_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -368,8 +371,9 @@ func (c *directoryClient) SetUserPermission(ctx context.Context, in *SetUserPerm } func (c *directoryClient) DeleteUserPermission(ctx context.Context, in *DeleteUserPermissionRequest, opts ...grpc.CallOption) (*DeleteUserPermissionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteUserPermissionResponse) - err := c.cc.Invoke(ctx, Directory_DeleteUserPermission_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_DeleteUserPermission_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -377,8 +381,9 @@ func (c *directoryClient) DeleteUserPermission(ctx context.Context, in *DeleteUs } func (c *directoryClient) ListUserApplications(ctx context.Context, in *ListUserApplicationsRequest, opts ...grpc.CallOption) (*ListUserApplicationsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListUserApplicationsResponse) - err := c.cc.Invoke(ctx, Directory_ListUserApplications_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_ListUserApplications_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -386,8 +391,9 @@ func (c *directoryClient) ListUserApplications(ctx context.Context, in *ListUser } func (c *directoryClient) DeleteUserApplication(ctx context.Context, in *DeleteUserApplicationRequest, opts ...grpc.CallOption) (*DeleteUserApplicationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteUserApplicationResponse) - err := c.cc.Invoke(ctx, Directory_DeleteUserApplication_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_DeleteUserApplication_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -395,8 +401,9 @@ func (c *directoryClient) DeleteUserApplication(ctx context.Context, in *DeleteU } func (c *directoryClient) GetApplProperties(ctx context.Context, in *GetApplPropertiesRequest, opts ...grpc.CallOption) (*GetApplPropertiesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetApplPropertiesResponse) - err := c.cc.Invoke(ctx, Directory_GetApplProperties_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_GetApplProperties_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -404,8 +411,9 @@ func (c *directoryClient) GetApplProperties(ctx context.Context, in *GetApplProp } func (c *directoryClient) SetApplProperties(ctx context.Context, in *SetApplPropertiesRequest, opts ...grpc.CallOption) (*SetApplPropertiesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetApplPropertiesResponse) - err := c.cc.Invoke(ctx, Directory_SetApplProperties_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_SetApplProperties_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -413,8 +421,9 @@ func (c *directoryClient) SetApplProperties(ctx context.Context, in *SetApplProp } func (c *directoryClient) SetApplProperty(ctx context.Context, in *SetApplPropertyRequest, opts ...grpc.CallOption) (*SetApplPropertyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetApplPropertyResponse) - err := c.cc.Invoke(ctx, Directory_SetApplProperty_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_SetApplProperty_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -422,8 +431,9 @@ func (c *directoryClient) SetApplProperty(ctx context.Context, in *SetApplProper } func (c *directoryClient) DeleteApplProperty(ctx context.Context, in *DeleteApplPropertyRequest, opts ...grpc.CallOption) (*DeleteApplPropertyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteApplPropertyResponse) - err := c.cc.Invoke(ctx, Directory_DeleteApplProperty_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_DeleteApplProperty_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -431,8 +441,9 @@ func (c *directoryClient) DeleteApplProperty(ctx context.Context, in *DeleteAppl } func (c *directoryClient) GetApplRoles(ctx context.Context, in *GetApplRolesRequest, opts ...grpc.CallOption) (*GetApplRolesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetApplRolesResponse) - err := c.cc.Invoke(ctx, Directory_GetApplRoles_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_GetApplRoles_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -440,8 +451,9 @@ func (c *directoryClient) GetApplRoles(ctx context.Context, in *GetApplRolesRequ } func (c *directoryClient) SetApplRoles(ctx context.Context, in *SetApplRolesRequest, opts ...grpc.CallOption) (*SetApplRolesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetApplRolesResponse) - err := c.cc.Invoke(ctx, Directory_SetApplRoles_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_SetApplRoles_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -449,8 +461,9 @@ func (c *directoryClient) SetApplRoles(ctx context.Context, in *SetApplRolesRequ } func (c *directoryClient) SetApplRole(ctx context.Context, in *SetApplRoleRequest, opts ...grpc.CallOption) (*SetApplRoleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetApplRoleResponse) - err := c.cc.Invoke(ctx, Directory_SetApplRole_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_SetApplRole_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -458,8 +471,9 @@ func (c *directoryClient) SetApplRole(ctx context.Context, in *SetApplRoleReques } func (c *directoryClient) DeleteApplRole(ctx context.Context, in *DeleteApplRoleRequest, opts ...grpc.CallOption) (*DeleteApplRoleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteApplRoleResponse) - err := c.cc.Invoke(ctx, Directory_DeleteApplRole_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_DeleteApplRole_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -467,8 +481,9 @@ func (c *directoryClient) DeleteApplRole(ctx context.Context, in *DeleteApplRole } func (c *directoryClient) GetApplPermissions(ctx context.Context, in *GetApplPermissionsRequest, opts ...grpc.CallOption) (*GetApplPermissionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetApplPermissionsResponse) - err := c.cc.Invoke(ctx, Directory_GetApplPermissions_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_GetApplPermissions_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -476,8 +491,9 @@ func (c *directoryClient) GetApplPermissions(ctx context.Context, in *GetApplPer } func (c *directoryClient) SetApplPermissions(ctx context.Context, in *SetApplPermissionsRequest, opts ...grpc.CallOption) (*SetApplPermissionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetApplPermissionsResponse) - err := c.cc.Invoke(ctx, Directory_SetApplPermissions_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_SetApplPermissions_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -485,8 +501,9 @@ func (c *directoryClient) SetApplPermissions(ctx context.Context, in *SetApplPer } func (c *directoryClient) SetApplPermission(ctx context.Context, in *SetApplPermissionRequest, opts ...grpc.CallOption) (*SetApplPermissionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetApplPermissionResponse) - err := c.cc.Invoke(ctx, Directory_SetApplPermission_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_SetApplPermission_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -494,8 +511,9 @@ func (c *directoryClient) SetApplPermission(ctx context.Context, in *SetApplPerm } func (c *directoryClient) DeleteApplPermission(ctx context.Context, in *DeleteApplPermissionRequest, opts ...grpc.CallOption) (*DeleteApplPermissionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteApplPermissionResponse) - err := c.cc.Invoke(ctx, Directory_DeleteApplPermission_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_DeleteApplPermission_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -503,8 +521,9 @@ func (c *directoryClient) DeleteApplPermission(ctx context.Context, in *DeleteAp } func (c *directoryClient) GetValue(ctx context.Context, in *GetValueRequest, opts ...grpc.CallOption) (*GetValueResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetValueResponse) - err := c.cc.Invoke(ctx, Directory_GetValue_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Directory_GetValue_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -513,7 +532,7 @@ func (c *directoryClient) GetValue(ctx context.Context, in *GetValueRequest, opt // DirectoryServer is the server API for Directory service. // All implementations should embed UnimplementedDirectoryServer -// for forward compatibility +// for forward compatibility. type DirectoryServer interface { ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) @@ -524,7 +543,7 @@ type DirectoryServer interface { ListTenants(context.Context, *ListTenantsRequest) (*ListTenantsResponse, error) CreateTenant(context.Context, *CreateTenantRequest) (*CreateTenantResponse, error) DeleteTenant(context.Context, *DeleteTenantRequest) (*DeleteTenantResponse, error) - LoadUsers(Directory_LoadUsersServer) error + LoadUsers(grpc.ClientStreamingServer[LoadUsersRequest, LoadUsersResponse]) error ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error) GetResource(context.Context, *GetResourceRequest) (*GetResourceResponse, error) SetResource(context.Context, *SetResourceRequest) (*SetResourceResponse, error) @@ -558,9 +577,12 @@ type DirectoryServer interface { GetValue(context.Context, *GetValueRequest) (*GetValueResponse, error) } -// UnimplementedDirectoryServer should be embedded to have forward compatible implementations. -type UnimplementedDirectoryServer struct { -} +// UnimplementedDirectoryServer should 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 UnimplementedDirectoryServer struct{} func (UnimplementedDirectoryServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented") @@ -589,7 +611,7 @@ func (UnimplementedDirectoryServer) CreateTenant(context.Context, *CreateTenantR func (UnimplementedDirectoryServer) DeleteTenant(context.Context, *DeleteTenantRequest) (*DeleteTenantResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteTenant not implemented") } -func (UnimplementedDirectoryServer) LoadUsers(Directory_LoadUsersServer) error { +func (UnimplementedDirectoryServer) LoadUsers(grpc.ClientStreamingServer[LoadUsersRequest, LoadUsersResponse]) error { return status.Errorf(codes.Unimplemented, "method LoadUsers not implemented") } func (UnimplementedDirectoryServer) ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error) { @@ -685,6 +707,7 @@ func (UnimplementedDirectoryServer) DeleteApplPermission(context.Context, *Delet func (UnimplementedDirectoryServer) GetValue(context.Context, *GetValueRequest) (*GetValueResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetValue not implemented") } +func (UnimplementedDirectoryServer) testEmbeddedByValue() {} // UnsafeDirectoryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DirectoryServer will @@ -694,6 +717,13 @@ type UnsafeDirectoryServer interface { } func RegisterDirectoryServer(s grpc.ServiceRegistrar, srv DirectoryServer) { + // If the following call pancis, it indicates UnimplementedDirectoryServer 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(&Directory_ServiceDesc, srv) } @@ -860,30 +890,11 @@ func _Directory_DeleteTenant_Handler(srv interface{}, ctx context.Context, dec f } func _Directory_LoadUsers_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(DirectoryServer).LoadUsers(&directoryLoadUsersServer{stream}) -} - -type Directory_LoadUsersServer interface { - SendAndClose(*LoadUsersResponse) error - Recv() (*LoadUsersRequest, error) - grpc.ServerStream -} - -type directoryLoadUsersServer struct { - grpc.ServerStream + return srv.(DirectoryServer).LoadUsers(&grpc.GenericServerStream[LoadUsersRequest, LoadUsersResponse]{ServerStream: stream}) } -func (x *directoryLoadUsersServer) SendAndClose(m *LoadUsersResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *directoryLoadUsersServer) Recv() (*LoadUsersRequest, error) { - m := new(LoadUsersRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Directory_LoadUsersServer = grpc.ClientStreamingServer[LoadUsersRequest, LoadUsersResponse] func _Directory_ListResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListResourcesRequest) diff --git a/aserto/authorizer/policy/v1/policy.pb.go b/aserto/authorizer/policy/v1/policy.pb.go index aa2e640..d43938d 100644 --- a/aserto/authorizer/policy/v1/policy.pb.go +++ b/aserto/authorizer/policy/v1/policy.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/authorizer/policy/v1/policy.proto @@ -618,7 +618,7 @@ func file_aserto_authorizer_policy_v1_policy_proto_rawDescGZIP() []byte { } var file_aserto_authorizer_policy_v1_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_aserto_authorizer_policy_v1_policy_proto_goTypes = []interface{}{ +var file_aserto_authorizer_policy_v1_policy_proto_goTypes = []any{ (*ListPoliciesRequest)(nil), // 0: aserto.authorizer.policy.v1.ListPoliciesRequest (*ListPoliciesResponse)(nil), // 1: aserto.authorizer.policy.v1.ListPoliciesResponse (*GetPoliciesRequest)(nil), // 2: aserto.authorizer.policy.v1.GetPoliciesRequest @@ -651,7 +651,7 @@ func file_aserto_authorizer_policy_v1_policy_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_authorizer_policy_v1_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_policy_v1_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ListPoliciesRequest); i { case 0: return &v.state @@ -663,7 +663,7 @@ func file_aserto_authorizer_policy_v1_policy_proto_init() { return nil } } - file_aserto_authorizer_policy_v1_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_policy_v1_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ListPoliciesResponse); i { case 0: return &v.state @@ -675,7 +675,7 @@ func file_aserto_authorizer_policy_v1_policy_proto_init() { return nil } } - file_aserto_authorizer_policy_v1_policy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_policy_v1_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*GetPoliciesRequest); i { case 0: return &v.state @@ -687,7 +687,7 @@ func file_aserto_authorizer_policy_v1_policy_proto_init() { return nil } } - file_aserto_authorizer_policy_v1_policy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_policy_v1_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*GetPoliciesResponse); i { case 0: return &v.state @@ -699,7 +699,7 @@ func file_aserto_authorizer_policy_v1_policy_proto_init() { return nil } } - file_aserto_authorizer_policy_v1_policy_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_policy_v1_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*GetModuleRequest); i { case 0: return &v.state @@ -711,7 +711,7 @@ func file_aserto_authorizer_policy_v1_policy_proto_init() { return nil } } - file_aserto_authorizer_policy_v1_policy_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_policy_v1_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*GetModuleResponse); i { case 0: return &v.state @@ -723,7 +723,7 @@ func file_aserto_authorizer_policy_v1_policy_proto_init() { return nil } } - file_aserto_authorizer_policy_v1_policy_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_policy_v1_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*PolicyItem); i { case 0: return &v.state @@ -735,7 +735,7 @@ func file_aserto_authorizer_policy_v1_policy_proto_init() { return nil } } - file_aserto_authorizer_policy_v1_policy_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_authorizer_policy_v1_policy_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*Module); i { case 0: return &v.state diff --git a/aserto/authorizer/policy/v1/policy.pb.gw.go b/aserto/authorizer/policy/v1/policy.pb.gw.go index 75e929d..de56301 100644 --- a/aserto/authorizer/policy/v1/policy.pb.gw.go +++ b/aserto/authorizer/policy/v1/policy.pb.gw.go @@ -193,6 +193,7 @@ func local_request_Policy_GetModule_0(ctx context.Context, marshaler runtime.Mar // UnaryRPC :call PolicyServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPolicyHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterPolicyHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PolicyServer) error { mux.Handle("GET", pattern_Policy_ListPolicies_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -276,21 +277,21 @@ func RegisterPolicyHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser // RegisterPolicyHandlerFromEndpoint is same as RegisterPolicyHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterPolicyHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -308,7 +309,7 @@ func RegisterPolicyHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PolicyClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PolicyClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PolicyClient" to call the correct interceptors. +// "PolicyClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterPolicyHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PolicyClient) error { mux.Handle("GET", pattern_Policy_ListPolicies_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/authorizer/policy/v1/policy_grpc.pb.go b/aserto/authorizer/policy/v1/policy_grpc.pb.go index 3c2b860..9b39ef9 100644 --- a/aserto/authorizer/policy/v1/policy_grpc.pb.go +++ b/aserto/authorizer/policy/v1/policy_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/authorizer/policy/v1/policy.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Policy_ListPolicies_FullMethodName = "/aserto.authorizer.policy.v1.Policy/ListPolicies" @@ -42,8 +42,9 @@ func NewPolicyClient(cc grpc.ClientConnInterface) PolicyClient { } func (c *policyClient) 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, Policy_ListPolicies_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_ListPolicies_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -51,8 +52,9 @@ func (c *policyClient) ListPolicies(ctx context.Context, in *ListPoliciesRequest } func (c *policyClient) GetPolicies(ctx context.Context, in *GetPoliciesRequest, opts ...grpc.CallOption) (*GetPoliciesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPoliciesResponse) - err := c.cc.Invoke(ctx, Policy_GetPolicies_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_GetPolicies_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -60,8 +62,9 @@ func (c *policyClient) GetPolicies(ctx context.Context, in *GetPoliciesRequest, } func (c *policyClient) GetModule(ctx context.Context, in *GetModuleRequest, opts ...grpc.CallOption) (*GetModuleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetModuleResponse) - err := c.cc.Invoke(ctx, Policy_GetModule_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_GetModule_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -70,16 +73,19 @@ func (c *policyClient) GetModule(ctx context.Context, in *GetModuleRequest, opts // PolicyServer is the server API for Policy service. // All implementations should embed UnimplementedPolicyServer -// for forward compatibility +// for forward compatibility. type PolicyServer interface { ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error) GetPolicies(context.Context, *GetPoliciesRequest) (*GetPoliciesResponse, error) GetModule(context.Context, *GetModuleRequest) (*GetModuleResponse, error) } -// UnimplementedPolicyServer should be embedded to have forward compatible implementations. -type UnimplementedPolicyServer struct { -} +// UnimplementedPolicyServer should 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 UnimplementedPolicyServer struct{} func (UnimplementedPolicyServer) ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPolicies not implemented") @@ -90,6 +96,7 @@ func (UnimplementedPolicyServer) GetPolicies(context.Context, *GetPoliciesReques func (UnimplementedPolicyServer) GetModule(context.Context, *GetModuleRequest) (*GetModuleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetModule not implemented") } +func (UnimplementedPolicyServer) testEmbeddedByValue() {} // UnsafePolicyServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PolicyServer will @@ -99,6 +106,13 @@ type UnsafePolicyServer interface { } func RegisterPolicyServer(s grpc.ServiceRegistrar, srv PolicyServer) { + // If the following call pancis, it indicates UnimplementedPolicyServer 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(&Policy_ServiceDesc, srv) } diff --git a/aserto/common/info/v1/info.pb.go b/aserto/common/info/v1/info.pb.go index 5a6a0d8..7eb2443 100644 --- a/aserto/common/info/v1/info.pb.go +++ b/aserto/common/info/v1/info.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/common/info/v1/info.proto @@ -387,7 +387,7 @@ func file_aserto_common_info_v1_info_proto_rawDescGZIP() []byte { } var file_aserto_common_info_v1_info_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_aserto_common_info_v1_info_proto_goTypes = []interface{}{ +var file_aserto_common_info_v1_info_proto_goTypes = []any{ (*InfoRequest)(nil), // 0: aserto.common.info.v1.InfoRequest (*InfoResponse)(nil), // 1: aserto.common.info.v1.InfoResponse (*SystemInfo)(nil), // 2: aserto.common.info.v1.SystemInfo @@ -413,7 +413,7 @@ func file_aserto_common_info_v1_info_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_common_info_v1_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_common_info_v1_info_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*InfoRequest); i { case 0: return &v.state @@ -425,7 +425,7 @@ func file_aserto_common_info_v1_info_proto_init() { return nil } } - file_aserto_common_info_v1_info_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_common_info_v1_info_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*InfoResponse); i { case 0: return &v.state @@ -437,7 +437,7 @@ func file_aserto_common_info_v1_info_proto_init() { return nil } } - file_aserto_common_info_v1_info_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_common_info_v1_info_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*SystemInfo); i { case 0: return &v.state @@ -449,7 +449,7 @@ func file_aserto_common_info_v1_info_proto_init() { return nil } } - file_aserto_common_info_v1_info_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_common_info_v1_info_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*VersionInfo); i { case 0: return &v.state @@ -461,7 +461,7 @@ func file_aserto_common_info_v1_info_proto_init() { return nil } } - file_aserto_common_info_v1_info_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_common_info_v1_info_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*BuildInfo); i { case 0: return &v.state diff --git a/aserto/common/info/v1/info.pb.gw.go b/aserto/common/info/v1/info.pb.gw.go index d72450b..7293676 100644 --- a/aserto/common/info/v1/info.pb.gw.go +++ b/aserto/common/info/v1/info.pb.gw.go @@ -53,6 +53,7 @@ func local_request_Info_Info_0(ctx context.Context, marshaler runtime.Marshaler, // UnaryRPC :call InfoServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterInfoHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterInfoHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InfoServer) error { mux.Handle("GET", pattern_Info_Info_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -86,21 +87,21 @@ func RegisterInfoHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve // RegisterInfoHandlerFromEndpoint is same as RegisterInfoHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterInfoHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -118,7 +119,7 @@ func RegisterInfoHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc. // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InfoClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InfoClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "InfoClient" to call the correct interceptors. +// "InfoClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterInfoHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InfoClient) error { mux.Handle("GET", pattern_Info_Info_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/common/info/v1/info_grpc.pb.go b/aserto/common/info/v1/info_grpc.pb.go index 0558f3a..30ea8f5 100644 --- a/aserto/common/info/v1/info_grpc.pb.go +++ b/aserto/common/info/v1/info_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/common/info/v1/info.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Info_Info_FullMethodName = "/aserto.common.info.v1.Info/Info" @@ -38,8 +38,9 @@ func NewInfoClient(cc grpc.ClientConnInterface) InfoClient { } func (c *infoClient) Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(InfoResponse) - err := c.cc.Invoke(ctx, Info_Info_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Info_Info_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -48,18 +49,22 @@ func (c *infoClient) Info(ctx context.Context, in *InfoRequest, opts ...grpc.Cal // InfoServer is the server API for Info service. // All implementations should embed UnimplementedInfoServer -// for forward compatibility +// for forward compatibility. type InfoServer interface { Info(context.Context, *InfoRequest) (*InfoResponse, error) } -// UnimplementedInfoServer should be embedded to have forward compatible implementations. -type UnimplementedInfoServer struct { -} +// UnimplementedInfoServer should 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 UnimplementedInfoServer struct{} func (UnimplementedInfoServer) Info(context.Context, *InfoRequest) (*InfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") } +func (UnimplementedInfoServer) testEmbeddedByValue() {} // UnsafeInfoServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to InfoServer will @@ -69,6 +74,13 @@ type UnsafeInfoServer interface { } func RegisterInfoServer(s grpc.ServiceRegistrar, srv InfoServer) { + // If the following call pancis, it indicates UnimplementedInfoServer 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(&Info_ServiceDesc, srv) } diff --git a/aserto/decision_logs/v1/decision_logs.pb.go b/aserto/decision_logs/v1/decision_logs.pb.go index b318f0a..dcde682 100644 --- a/aserto/decision_logs/v1/decision_logs.pb.go +++ b/aserto/decision_logs/v1/decision_logs.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/decision_logs/v1/decision_logs.proto @@ -1469,7 +1469,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_rawDescGZIP() []byte { } var file_aserto_decision_logs_v1_decision_logs_proto_msgTypes = make([]protoimpl.MessageInfo, 21) -var file_aserto_decision_logs_v1_decision_logs_proto_goTypes = []interface{}{ +var file_aserto_decision_logs_v1_decision_logs_proto_goTypes = []any{ (*ListDecisionLogsRequest)(nil), // 0: aserto.decision_logs.v1.ListDecisionLogsRequest (*ListDecisionLogsResponse)(nil), // 1: aserto.decision_logs.v1.ListDecisionLogsResponse (*GetDecisionLogRequest)(nil), // 2: aserto.decision_logs.v1.GetDecisionLogRequest @@ -1546,7 +1546,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ListDecisionLogsRequest); i { case 0: return &v.state @@ -1558,7 +1558,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ListDecisionLogsResponse); i { case 0: return &v.state @@ -1570,7 +1570,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*GetDecisionLogRequest); i { case 0: return &v.state @@ -1582,7 +1582,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*GetDecisionLogResponse); i { case 0: return &v.state @@ -1594,7 +1594,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*DecisionLogItem); i { case 0: return &v.state @@ -1606,7 +1606,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*DecisionLog); i { case 0: return &v.state @@ -1618,7 +1618,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*ListUsersRequest); i { case 0: return &v.state @@ -1630,7 +1630,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*ListUsersResponse); i { case 0: return &v.state @@ -1642,7 +1642,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*GetUserRequest); i { case 0: return &v.state @@ -1654,7 +1654,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*GetUserResponse); i { case 0: return &v.state @@ -1666,7 +1666,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*UserItem); i { case 0: return &v.state @@ -1678,7 +1678,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*User); i { case 0: return &v.state @@ -1690,7 +1690,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*ExecuteQueryRequest); i { case 0: return &v.state @@ -1702,7 +1702,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*ExecuteQueryResponse); i { case 0: return &v.state @@ -1714,7 +1714,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*Result); i { case 0: return &v.state @@ -1726,7 +1726,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*GetDecisionsRequest); i { case 0: return &v.state @@ -1738,7 +1738,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*GetDecisionsResponse); i { case 0: return &v.state @@ -1750,7 +1750,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*Decision); i { case 0: return &v.state @@ -1762,7 +1762,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*DecisionUser); i { case 0: return &v.state @@ -1774,7 +1774,7 @@ func file_aserto_decision_logs_v1_decision_logs_proto_init() { return nil } } - file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_aserto_decision_logs_v1_decision_logs_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*DecisionPolicy); i { case 0: return &v.state diff --git a/aserto/decision_logs/v1/decision_logs.pb.gw.go b/aserto/decision_logs/v1/decision_logs.pb.gw.go index 1f0b244..99d77c8 100644 --- a/aserto/decision_logs/v1/decision_logs.pb.gw.go +++ b/aserto/decision_logs/v1/decision_logs.pb.gw.go @@ -282,6 +282,7 @@ func request_DecisionLogs_GetDecisions_0(ctx context.Context, marshaler runtime. // UnaryRPC :call DecisionLogsServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDecisionLogsHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterDecisionLogsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DecisionLogsServer) error { mux.Handle("GET", pattern_DecisionLogs_ListDecisionLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -422,21 +423,21 @@ func RegisterDecisionLogsHandlerServer(ctx context.Context, mux *runtime.ServeMu // RegisterDecisionLogsHandlerFromEndpoint is same as RegisterDecisionLogsHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterDecisionLogsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -454,7 +455,7 @@ func RegisterDecisionLogsHandler(ctx context.Context, mux *runtime.ServeMux, con // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DecisionLogsClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DecisionLogsClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "DecisionLogsClient" to call the correct interceptors. +// "DecisionLogsClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterDecisionLogsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DecisionLogsClient) error { mux.Handle("GET", pattern_DecisionLogs_ListDecisionLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/decision_logs/v1/decision_logs_grpc.pb.go b/aserto/decision_logs/v1/decision_logs_grpc.pb.go index 3d844e1..5b7556a 100644 --- a/aserto/decision_logs/v1/decision_logs_grpc.pb.go +++ b/aserto/decision_logs/v1/decision_logs_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/decision_logs/v1/decision_logs.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( DecisionLogs_ListDecisionLogs_FullMethodName = "/aserto.decision_logs.v1.DecisionLogs/ListDecisionLogs" @@ -36,7 +36,7 @@ type DecisionLogsClient interface { ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) ExecuteQuery(ctx context.Context, in *ExecuteQueryRequest, opts ...grpc.CallOption) (*ExecuteQueryResponse, error) - GetDecisions(ctx context.Context, in *GetDecisionsRequest, opts ...grpc.CallOption) (DecisionLogs_GetDecisionsClient, error) + GetDecisions(ctx context.Context, in *GetDecisionsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetDecisionsResponse], error) } type decisionLogsClient struct { @@ -48,8 +48,9 @@ func NewDecisionLogsClient(cc grpc.ClientConnInterface) DecisionLogsClient { } func (c *decisionLogsClient) ListDecisionLogs(ctx context.Context, in *ListDecisionLogsRequest, opts ...grpc.CallOption) (*ListDecisionLogsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListDecisionLogsResponse) - err := c.cc.Invoke(ctx, DecisionLogs_ListDecisionLogs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DecisionLogs_ListDecisionLogs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -57,8 +58,9 @@ func (c *decisionLogsClient) ListDecisionLogs(ctx context.Context, in *ListDecis } func (c *decisionLogsClient) GetDecisionLog(ctx context.Context, in *GetDecisionLogRequest, opts ...grpc.CallOption) (*GetDecisionLogResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetDecisionLogResponse) - err := c.cc.Invoke(ctx, DecisionLogs_GetDecisionLog_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DecisionLogs_GetDecisionLog_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -66,8 +68,9 @@ func (c *decisionLogsClient) GetDecisionLog(ctx context.Context, in *GetDecision } func (c *decisionLogsClient) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListUsersResponse) - err := c.cc.Invoke(ctx, DecisionLogs_ListUsers_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DecisionLogs_ListUsers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -75,8 +78,9 @@ func (c *decisionLogsClient) ListUsers(ctx context.Context, in *ListUsersRequest } func (c *decisionLogsClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetUserResponse) - err := c.cc.Invoke(ctx, DecisionLogs_GetUser_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DecisionLogs_GetUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -84,20 +88,22 @@ func (c *decisionLogsClient) GetUser(ctx context.Context, in *GetUserRequest, op } func (c *decisionLogsClient) ExecuteQuery(ctx context.Context, in *ExecuteQueryRequest, opts ...grpc.CallOption) (*ExecuteQueryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ExecuteQueryResponse) - err := c.cc.Invoke(ctx, DecisionLogs_ExecuteQuery_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, DecisionLogs_ExecuteQuery_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *decisionLogsClient) GetDecisions(ctx context.Context, in *GetDecisionsRequest, opts ...grpc.CallOption) (DecisionLogs_GetDecisionsClient, error) { - stream, err := c.cc.NewStream(ctx, &DecisionLogs_ServiceDesc.Streams[0], DecisionLogs_GetDecisions_FullMethodName, opts...) +func (c *decisionLogsClient) GetDecisions(ctx context.Context, in *GetDecisionsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetDecisionsResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &DecisionLogs_ServiceDesc.Streams[0], DecisionLogs_GetDecisions_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &decisionLogsGetDecisionsClient{stream} + x := &grpc.GenericClientStream[GetDecisionsRequest, GetDecisionsResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -107,38 +113,27 @@ func (c *decisionLogsClient) GetDecisions(ctx context.Context, in *GetDecisionsR return x, nil } -type DecisionLogs_GetDecisionsClient interface { - Recv() (*GetDecisionsResponse, error) - grpc.ClientStream -} - -type decisionLogsGetDecisionsClient struct { - grpc.ClientStream -} - -func (x *decisionLogsGetDecisionsClient) Recv() (*GetDecisionsResponse, error) { - m := new(GetDecisionsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type DecisionLogs_GetDecisionsClient = grpc.ServerStreamingClient[GetDecisionsResponse] // DecisionLogsServer is the server API for DecisionLogs service. // All implementations should embed UnimplementedDecisionLogsServer -// for forward compatibility +// for forward compatibility. type DecisionLogsServer interface { ListDecisionLogs(context.Context, *ListDecisionLogsRequest) (*ListDecisionLogsResponse, error) GetDecisionLog(context.Context, *GetDecisionLogRequest) (*GetDecisionLogResponse, error) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) ExecuteQuery(context.Context, *ExecuteQueryRequest) (*ExecuteQueryResponse, error) - GetDecisions(*GetDecisionsRequest, DecisionLogs_GetDecisionsServer) error + GetDecisions(*GetDecisionsRequest, grpc.ServerStreamingServer[GetDecisionsResponse]) error } -// UnimplementedDecisionLogsServer should be embedded to have forward compatible implementations. -type UnimplementedDecisionLogsServer struct { -} +// UnimplementedDecisionLogsServer should 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 UnimplementedDecisionLogsServer struct{} func (UnimplementedDecisionLogsServer) ListDecisionLogs(context.Context, *ListDecisionLogsRequest) (*ListDecisionLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListDecisionLogs not implemented") @@ -155,9 +150,10 @@ func (UnimplementedDecisionLogsServer) GetUser(context.Context, *GetUserRequest) func (UnimplementedDecisionLogsServer) ExecuteQuery(context.Context, *ExecuteQueryRequest) (*ExecuteQueryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExecuteQuery not implemented") } -func (UnimplementedDecisionLogsServer) GetDecisions(*GetDecisionsRequest, DecisionLogs_GetDecisionsServer) error { +func (UnimplementedDecisionLogsServer) GetDecisions(*GetDecisionsRequest, grpc.ServerStreamingServer[GetDecisionsResponse]) error { return status.Errorf(codes.Unimplemented, "method GetDecisions not implemented") } +func (UnimplementedDecisionLogsServer) testEmbeddedByValue() {} // UnsafeDecisionLogsServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DecisionLogsServer will @@ -167,6 +163,13 @@ type UnsafeDecisionLogsServer interface { } func RegisterDecisionLogsServer(s grpc.ServiceRegistrar, srv DecisionLogsServer) { + // If the following call pancis, it indicates UnimplementedDecisionLogsServer 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(&DecisionLogs_ServiceDesc, srv) } @@ -265,21 +268,11 @@ func _DecisionLogs_GetDecisions_Handler(srv interface{}, stream grpc.ServerStrea if err := stream.RecvMsg(m); err != nil { return err } - return srv.(DecisionLogsServer).GetDecisions(m, &decisionLogsGetDecisionsServer{stream}) -} - -type DecisionLogs_GetDecisionsServer interface { - Send(*GetDecisionsResponse) error - grpc.ServerStream + return srv.(DecisionLogsServer).GetDecisions(m, &grpc.GenericServerStream[GetDecisionsRequest, GetDecisionsResponse]{ServerStream: stream}) } -type decisionLogsGetDecisionsServer struct { - grpc.ServerStream -} - -func (x *decisionLogsGetDecisionsServer) Send(m *GetDecisionsResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type DecisionLogs_GetDecisionsServer = grpc.ServerStreamingServer[GetDecisionsResponse] // DecisionLogs_ServiceDesc is the grpc.ServiceDesc for DecisionLogs service. // It's only intended for direct use with grpc.RegisterService, diff --git a/aserto/discovery/v1/discovery.pb.go b/aserto/discovery/v1/discovery.pb.go index bfb8b21..15fbbe2 100644 --- a/aserto/discovery/v1/discovery.pb.go +++ b/aserto/discovery/v1/discovery.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/discovery/v1/discovery.proto @@ -255,7 +255,7 @@ func file_aserto_discovery_v1_discovery_proto_rawDescGZIP() []byte { } var file_aserto_discovery_v1_discovery_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_aserto_discovery_v1_discovery_proto_goTypes = []interface{}{ +var file_aserto_discovery_v1_discovery_proto_goTypes = []any{ (*OPADiscoveryRequest)(nil), // 0: aserto.discovery.policy.v1.OPADiscoveryRequest (*OPAConfig)(nil), // 1: aserto.discovery.policy.v1.OPAConfig (*OPADiscoveryResponse)(nil), // 2: aserto.discovery.policy.v1.OPADiscoveryResponse @@ -279,7 +279,7 @@ func file_aserto_discovery_v1_discovery_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_discovery_v1_discovery_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_discovery_v1_discovery_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*OPADiscoveryRequest); i { case 0: return &v.state @@ -291,7 +291,7 @@ func file_aserto_discovery_v1_discovery_proto_init() { return nil } } - file_aserto_discovery_v1_discovery_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_discovery_v1_discovery_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*OPAConfig); i { case 0: return &v.state @@ -303,7 +303,7 @@ func file_aserto_discovery_v1_discovery_proto_init() { return nil } } - file_aserto_discovery_v1_discovery_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_discovery_v1_discovery_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*OPADiscoveryResponse); i { case 0: return &v.state diff --git a/aserto/discovery/v1/discovery.pb.gw.go b/aserto/discovery/v1/discovery.pb.gw.go index 34ea5e1..2845216 100644 --- a/aserto/discovery/v1/discovery.pb.gw.go +++ b/aserto/discovery/v1/discovery.pb.gw.go @@ -105,6 +105,7 @@ func local_request_Discovery_OPADiscovery_0(ctx context.Context, marshaler runti // UnaryRPC :call DiscoveryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDiscoveryHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterDiscoveryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DiscoveryServer) error { mux.Handle("GET", pattern_Discovery_OPADiscovery_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -138,21 +139,21 @@ func RegisterDiscoveryHandlerServer(ctx context.Context, mux *runtime.ServeMux, // RegisterDiscoveryHandlerFromEndpoint is same as RegisterDiscoveryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterDiscoveryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -170,7 +171,7 @@ func RegisterDiscoveryHandler(ctx context.Context, mux *runtime.ServeMux, conn * // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DiscoveryClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DiscoveryClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "DiscoveryClient" to call the correct interceptors. +// "DiscoveryClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterDiscoveryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DiscoveryClient) error { mux.Handle("GET", pattern_Discovery_OPADiscovery_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/discovery/v1/discovery_grpc.pb.go b/aserto/discovery/v1/discovery_grpc.pb.go index fac99b0..e274c9c 100644 --- a/aserto/discovery/v1/discovery_grpc.pb.go +++ b/aserto/discovery/v1/discovery_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/discovery/v1/discovery.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Discovery_OPADiscovery_FullMethodName = "/aserto.discovery.policy.v1.Discovery/OPADiscovery" @@ -38,8 +38,9 @@ func NewDiscoveryClient(cc grpc.ClientConnInterface) DiscoveryClient { } func (c *discoveryClient) OPADiscovery(ctx context.Context, in *OPADiscoveryRequest, opts ...grpc.CallOption) (*OPADiscoveryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(OPADiscoveryResponse) - err := c.cc.Invoke(ctx, Discovery_OPADiscovery_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Discovery_OPADiscovery_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -48,18 +49,22 @@ func (c *discoveryClient) OPADiscovery(ctx context.Context, in *OPADiscoveryRequ // DiscoveryServer is the server API for Discovery service. // All implementations should embed UnimplementedDiscoveryServer -// for forward compatibility +// for forward compatibility. type DiscoveryServer interface { OPADiscovery(context.Context, *OPADiscoveryRequest) (*OPADiscoveryResponse, error) } -// UnimplementedDiscoveryServer should be embedded to have forward compatible implementations. -type UnimplementedDiscoveryServer struct { -} +// UnimplementedDiscoveryServer should 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 UnimplementedDiscoveryServer struct{} func (UnimplementedDiscoveryServer) OPADiscovery(context.Context, *OPADiscoveryRequest) (*OPADiscoveryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method OPADiscovery not implemented") } +func (UnimplementedDiscoveryServer) testEmbeddedByValue() {} // UnsafeDiscoveryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DiscoveryServer will @@ -69,6 +74,13 @@ type UnsafeDiscoveryServer interface { } func RegisterDiscoveryServer(s grpc.ServiceRegistrar, srv DiscoveryServer) { + // If the following call pancis, it indicates UnimplementedDiscoveryServer 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(&Discovery_ServiceDesc, srv) } diff --git a/aserto/discovery/v2/discovery.pb.go b/aserto/discovery/v2/discovery.pb.go index 641b7d8..5e275a9 100644 --- a/aserto/discovery/v2/discovery.pb.go +++ b/aserto/discovery/v2/discovery.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/discovery/v2/discovery.proto @@ -256,7 +256,7 @@ func file_aserto_discovery_v2_discovery_proto_rawDescGZIP() []byte { } var file_aserto_discovery_v2_discovery_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_aserto_discovery_v2_discovery_proto_goTypes = []interface{}{ +var file_aserto_discovery_v2_discovery_proto_goTypes = []any{ (*OPAInstanceDiscoveryRequest)(nil), // 0: aserto.discovery.policy.v2.OPAInstanceDiscoveryRequest (*OPAConfig)(nil), // 1: aserto.discovery.policy.v2.OPAConfig (*OPAInstanceDiscoveryResponse)(nil), // 2: aserto.discovery.policy.v2.OPAInstanceDiscoveryResponse @@ -280,7 +280,7 @@ func file_aserto_discovery_v2_discovery_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_discovery_v2_discovery_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_discovery_v2_discovery_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*OPAInstanceDiscoveryRequest); i { case 0: return &v.state @@ -292,7 +292,7 @@ func file_aserto_discovery_v2_discovery_proto_init() { return nil } } - file_aserto_discovery_v2_discovery_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_discovery_v2_discovery_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*OPAConfig); i { case 0: return &v.state @@ -304,7 +304,7 @@ func file_aserto_discovery_v2_discovery_proto_init() { return nil } } - file_aserto_discovery_v2_discovery_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_discovery_v2_discovery_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*OPAInstanceDiscoveryResponse); i { case 0: return &v.state diff --git a/aserto/discovery/v2/discovery.pb.gw.go b/aserto/discovery/v2/discovery.pb.gw.go index 1401f93..e339ff6 100644 --- a/aserto/discovery/v2/discovery.pb.gw.go +++ b/aserto/discovery/v2/discovery.pb.gw.go @@ -107,6 +107,7 @@ func local_request_Discovery_OPAInstanceDiscovery_0(ctx context.Context, marshal // UnaryRPC :call DiscoveryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDiscoveryHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterDiscoveryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DiscoveryServer) error { mux.Handle("GET", pattern_Discovery_OPAInstanceDiscovery_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -140,21 +141,21 @@ func RegisterDiscoveryHandlerServer(ctx context.Context, mux *runtime.ServeMux, // RegisterDiscoveryHandlerFromEndpoint is same as RegisterDiscoveryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterDiscoveryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -172,7 +173,7 @@ func RegisterDiscoveryHandler(ctx context.Context, mux *runtime.ServeMux, conn * // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DiscoveryClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DiscoveryClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "DiscoveryClient" to call the correct interceptors. +// "DiscoveryClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterDiscoveryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DiscoveryClient) error { mux.Handle("GET", pattern_Discovery_OPAInstanceDiscovery_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/discovery/v2/discovery_grpc.pb.go b/aserto/discovery/v2/discovery_grpc.pb.go index ed7edf3..be2b2f8 100644 --- a/aserto/discovery/v2/discovery_grpc.pb.go +++ b/aserto/discovery/v2/discovery_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/discovery/v2/discovery.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Discovery_OPAInstanceDiscovery_FullMethodName = "/aserto.discovery.policy.v2.Discovery/OPAInstanceDiscovery" @@ -38,8 +38,9 @@ func NewDiscoveryClient(cc grpc.ClientConnInterface) DiscoveryClient { } func (c *discoveryClient) OPAInstanceDiscovery(ctx context.Context, in *OPAInstanceDiscoveryRequest, opts ...grpc.CallOption) (*OPAInstanceDiscoveryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(OPAInstanceDiscoveryResponse) - err := c.cc.Invoke(ctx, Discovery_OPAInstanceDiscovery_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Discovery_OPAInstanceDiscovery_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -48,18 +49,22 @@ func (c *discoveryClient) OPAInstanceDiscovery(ctx context.Context, in *OPAInsta // DiscoveryServer is the server API for Discovery service. // All implementations should embed UnimplementedDiscoveryServer -// for forward compatibility +// for forward compatibility. type DiscoveryServer interface { OPAInstanceDiscovery(context.Context, *OPAInstanceDiscoveryRequest) (*OPAInstanceDiscoveryResponse, error) } -// UnimplementedDiscoveryServer should be embedded to have forward compatible implementations. -type UnimplementedDiscoveryServer struct { -} +// UnimplementedDiscoveryServer should 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 UnimplementedDiscoveryServer struct{} func (UnimplementedDiscoveryServer) OPAInstanceDiscovery(context.Context, *OPAInstanceDiscoveryRequest) (*OPAInstanceDiscoveryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method OPAInstanceDiscovery not implemented") } +func (UnimplementedDiscoveryServer) testEmbeddedByValue() {} // UnsafeDiscoveryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DiscoveryServer will @@ -69,6 +74,13 @@ type UnsafeDiscoveryServer interface { } func RegisterDiscoveryServer(s grpc.ServiceRegistrar, srv DiscoveryServer) { + // If the following call pancis, it indicates UnimplementedDiscoveryServer 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(&Discovery_ServiceDesc, srv) } diff --git a/aserto/funnel/v1/funnel.pb.go b/aserto/funnel/v1/funnel.pb.go index 1da7109..49af297 100644 --- a/aserto/funnel/v1/funnel.pb.go +++ b/aserto/funnel/v1/funnel.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/funnel/v1/funnel.proto @@ -446,7 +446,7 @@ func file_aserto_funnel_v1_funnel_proto_rawDescGZIP() []byte { } var file_aserto_funnel_v1_funnel_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_aserto_funnel_v1_funnel_proto_goTypes = []interface{}{ +var file_aserto_funnel_v1_funnel_proto_goTypes = []any{ (*StartWorkflowRequest)(nil), // 0: aserto.funnel.v1.StartWorkflowRequest (*StartWorkflowResponse)(nil), // 1: aserto.funnel.v1.StartWorkflowResponse (*StopWorkflowRequest)(nil), // 2: aserto.funnel.v1.StopWorkflowRequest @@ -479,7 +479,7 @@ func file_aserto_funnel_v1_funnel_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_funnel_v1_funnel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_funnel_v1_funnel_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*StartWorkflowRequest); i { case 0: return &v.state @@ -491,7 +491,7 @@ func file_aserto_funnel_v1_funnel_proto_init() { return nil } } - file_aserto_funnel_v1_funnel_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_funnel_v1_funnel_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*StartWorkflowResponse); i { case 0: return &v.state @@ -503,7 +503,7 @@ func file_aserto_funnel_v1_funnel_proto_init() { return nil } } - file_aserto_funnel_v1_funnel_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_funnel_v1_funnel_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*StopWorkflowRequest); i { case 0: return &v.state @@ -515,7 +515,7 @@ func file_aserto_funnel_v1_funnel_proto_init() { return nil } } - file_aserto_funnel_v1_funnel_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_funnel_v1_funnel_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*StopWorkflowResponse); i { case 0: return &v.state @@ -527,7 +527,7 @@ func file_aserto_funnel_v1_funnel_proto_init() { return nil } } - file_aserto_funnel_v1_funnel_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_funnel_v1_funnel_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*RunWorkflowRequest); i { case 0: return &v.state @@ -539,7 +539,7 @@ func file_aserto_funnel_v1_funnel_proto_init() { return nil } } - file_aserto_funnel_v1_funnel_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_funnel_v1_funnel_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*RunWorkflowResponse); i { case 0: return &v.state diff --git a/aserto/funnel/v1/funnel.pb.gw.go b/aserto/funnel/v1/funnel.pb.gw.go index 39f1020..c3fe3a7 100644 --- a/aserto/funnel/v1/funnel.pb.gw.go +++ b/aserto/funnel/v1/funnel.pb.gw.go @@ -113,6 +113,7 @@ func local_request_Funnel_StopWorkflow_0(ctx context.Context, marshaler runtime. // UnaryRPC :call FunnelServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterFunnelHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterFunnelHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FunnelServer) error { mux.Handle("POST", pattern_Funnel_RunWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -196,21 +197,21 @@ func RegisterFunnelHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser // RegisterFunnelHandlerFromEndpoint is same as RegisterFunnelHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterFunnelHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -228,7 +229,7 @@ func RegisterFunnelHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "FunnelClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "FunnelClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "FunnelClient" to call the correct interceptors. +// "FunnelClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterFunnelHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FunnelClient) error { mux.Handle("POST", pattern_Funnel_RunWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/funnel/v1/funnel_grpc.pb.go b/aserto/funnel/v1/funnel_grpc.pb.go index eeb9788..8184337 100644 --- a/aserto/funnel/v1/funnel_grpc.pb.go +++ b/aserto/funnel/v1/funnel_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/funnel/v1/funnel.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Funnel_RunWorkflow_FullMethodName = "/aserto.funnel.v1.Funnel/RunWorkflow" @@ -42,8 +42,9 @@ func NewFunnelClient(cc grpc.ClientConnInterface) FunnelClient { } func (c *funnelClient) RunWorkflow(ctx context.Context, in *RunWorkflowRequest, opts ...grpc.CallOption) (*RunWorkflowResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RunWorkflowResponse) - err := c.cc.Invoke(ctx, Funnel_RunWorkflow_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Funnel_RunWorkflow_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -51,8 +52,9 @@ func (c *funnelClient) RunWorkflow(ctx context.Context, in *RunWorkflowRequest, } func (c *funnelClient) StartWorkflow(ctx context.Context, in *StartWorkflowRequest, opts ...grpc.CallOption) (*StartWorkflowResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StartWorkflowResponse) - err := c.cc.Invoke(ctx, Funnel_StartWorkflow_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Funnel_StartWorkflow_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -60,8 +62,9 @@ func (c *funnelClient) StartWorkflow(ctx context.Context, in *StartWorkflowReque } func (c *funnelClient) StopWorkflow(ctx context.Context, in *StopWorkflowRequest, opts ...grpc.CallOption) (*StopWorkflowResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StopWorkflowResponse) - err := c.cc.Invoke(ctx, Funnel_StopWorkflow_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Funnel_StopWorkflow_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -70,16 +73,19 @@ func (c *funnelClient) StopWorkflow(ctx context.Context, in *StopWorkflowRequest // FunnelServer is the server API for Funnel service. // All implementations should embed UnimplementedFunnelServer -// for forward compatibility +// for forward compatibility. type FunnelServer interface { RunWorkflow(context.Context, *RunWorkflowRequest) (*RunWorkflowResponse, error) StartWorkflow(context.Context, *StartWorkflowRequest) (*StartWorkflowResponse, error) StopWorkflow(context.Context, *StopWorkflowRequest) (*StopWorkflowResponse, error) } -// UnimplementedFunnelServer should be embedded to have forward compatible implementations. -type UnimplementedFunnelServer struct { -} +// UnimplementedFunnelServer should 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 UnimplementedFunnelServer struct{} func (UnimplementedFunnelServer) RunWorkflow(context.Context, *RunWorkflowRequest) (*RunWorkflowResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RunWorkflow not implemented") @@ -90,6 +96,7 @@ func (UnimplementedFunnelServer) StartWorkflow(context.Context, *StartWorkflowRe func (UnimplementedFunnelServer) StopWorkflow(context.Context, *StopWorkflowRequest) (*StopWorkflowResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StopWorkflow not implemented") } +func (UnimplementedFunnelServer) testEmbeddedByValue() {} // UnsafeFunnelServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to FunnelServer will @@ -99,6 +106,13 @@ type UnsafeFunnelServer interface { } func RegisterFunnelServer(s grpc.ServiceRegistrar, srv FunnelServer) { + // If the following call pancis, it indicates UnimplementedFunnelServer 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(&Funnel_ServiceDesc, srv) } diff --git a/aserto/idpplugin/v1/idpplugin.pb.go b/aserto/idpplugin/v1/idpplugin.pb.go index 7b2ae39..4aa2963 100644 --- a/aserto/idpplugin/v1/idpplugin.pb.go +++ b/aserto/idpplugin/v1/idpplugin.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/idpplugin/v1/idpplugin.proto @@ -837,7 +837,7 @@ func file_aserto_idpplugin_v1_idpplugin_proto_rawDescGZIP() []byte { var file_aserto_idpplugin_v1_idpplugin_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_aserto_idpplugin_v1_idpplugin_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_aserto_idpplugin_v1_idpplugin_proto_goTypes = []interface{}{ +var file_aserto_idpplugin_v1_idpplugin_proto_goTypes = []any{ (OperationType)(0), // 0: aserto.idpplugin.v1.OperationType (*InfoRequest)(nil), // 1: aserto.idpplugin.v1.InfoRequest (*InfoResponse)(nil), // 2: aserto.idpplugin.v1.InfoResponse @@ -897,7 +897,7 @@ func file_aserto_idpplugin_v1_idpplugin_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*InfoRequest); i { case 0: return &v.state @@ -909,7 +909,7 @@ func file_aserto_idpplugin_v1_idpplugin_proto_init() { return nil } } - file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*InfoResponse); i { case 0: return &v.state @@ -921,7 +921,7 @@ func file_aserto_idpplugin_v1_idpplugin_proto_init() { return nil } } - file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ImportRequest); i { case 0: return &v.state @@ -933,7 +933,7 @@ func file_aserto_idpplugin_v1_idpplugin_proto_init() { return nil } } - file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ImportResponse); i { case 0: return &v.state @@ -945,7 +945,7 @@ func file_aserto_idpplugin_v1_idpplugin_proto_init() { return nil } } - file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ExportRequest); i { case 0: return &v.state @@ -957,7 +957,7 @@ func file_aserto_idpplugin_v1_idpplugin_proto_init() { return nil } } - file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*ExportResponse); i { case 0: return &v.state @@ -969,7 +969,7 @@ func file_aserto_idpplugin_v1_idpplugin_proto_init() { return nil } } - file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*DeleteRequest); i { case 0: return &v.state @@ -981,7 +981,7 @@ func file_aserto_idpplugin_v1_idpplugin_proto_init() { return nil } } - file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*DeleteResponse); i { case 0: return &v.state @@ -993,7 +993,7 @@ func file_aserto_idpplugin_v1_idpplugin_proto_init() { return nil } } - file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*ValidateRequest); i { case 0: return &v.state @@ -1005,7 +1005,7 @@ func file_aserto_idpplugin_v1_idpplugin_proto_init() { return nil } } - file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*ValidateResponse); i { case 0: return &v.state @@ -1018,17 +1018,17 @@ func file_aserto_idpplugin_v1_idpplugin_proto_init() { } } } - file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[2].OneofWrappers = []any{ (*ImportRequest_Config)(nil), (*ImportRequest_User)(nil), (*ImportRequest_UserExt)(nil), } - file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[5].OneofWrappers = []interface{}{ + file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[5].OneofWrappers = []any{ (*ExportResponse_User)(nil), (*ExportResponse_UserExt)(nil), (*ExportResponse_Error)(nil), } - file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[6].OneofWrappers = []interface{}{ + file_aserto_idpplugin_v1_idpplugin_proto_msgTypes[6].OneofWrappers = []any{ (*DeleteRequest_Config)(nil), (*DeleteRequest_UserId)(nil), } diff --git a/aserto/idpplugin/v1/idpplugin.pb.gw.go b/aserto/idpplugin/v1/idpplugin.pb.gw.go index 63ffcff..4d820c4 100644 --- a/aserto/idpplugin/v1/idpplugin.pb.gw.go +++ b/aserto/idpplugin/v1/idpplugin.pb.gw.go @@ -61,7 +61,7 @@ func request_Plugin_Import_0(ctx context.Context, marshaler runtime.Marshaler, c var metadata runtime.ServerMetadata stream, err := client.Import(ctx) if err != nil { - grpclog.Infof("Failed to start streaming: %v", err) + grpclog.Errorf("Failed to start streaming: %v", err) return nil, metadata, err } dec := marshaler.NewDecoder(req.Body) @@ -72,11 +72,11 @@ func request_Plugin_Import_0(ctx context.Context, marshaler runtime.Marshaler, c return err } if err != nil { - grpclog.Infof("Failed to decode request: %v", err) + grpclog.Errorf("Failed to decode request: %v", err) return err } if err := stream.Send(&protoReq); err != nil { - grpclog.Infof("Failed to send request: %v", err) + grpclog.Errorf("Failed to send request: %v", err) return err } return nil @@ -88,12 +88,12 @@ func request_Plugin_Import_0(ctx context.Context, marshaler runtime.Marshaler, c } } if err := stream.CloseSend(); err != nil { - grpclog.Infof("Failed to terminate client stream: %v", err) + grpclog.Errorf("Failed to terminate client stream: %v", err) } }() header, err := stream.Header() if err != nil { - grpclog.Infof("Failed to get header from client: %v", err) + grpclog.Errorf("Failed to get header from client: %v", err) return nil, metadata, err } metadata.HeaderMD = header @@ -125,7 +125,7 @@ func request_Plugin_Delete_0(ctx context.Context, marshaler runtime.Marshaler, c var metadata runtime.ServerMetadata stream, err := client.Delete(ctx) if err != nil { - grpclog.Infof("Failed to start streaming: %v", err) + grpclog.Errorf("Failed to start streaming: %v", err) return nil, metadata, err } dec := marshaler.NewDecoder(req.Body) @@ -136,11 +136,11 @@ func request_Plugin_Delete_0(ctx context.Context, marshaler runtime.Marshaler, c return err } if err != nil { - grpclog.Infof("Failed to decode request: %v", err) + grpclog.Errorf("Failed to decode request: %v", err) return err } if err := stream.Send(&protoReq); err != nil { - grpclog.Infof("Failed to send request: %v", err) + grpclog.Errorf("Failed to send request: %v", err) return err } return nil @@ -152,12 +152,12 @@ func request_Plugin_Delete_0(ctx context.Context, marshaler runtime.Marshaler, c } } if err := stream.CloseSend(); err != nil { - grpclog.Infof("Failed to terminate client stream: %v", err) + grpclog.Errorf("Failed to terminate client stream: %v", err) } }() header, err := stream.Header() if err != nil { - grpclog.Infof("Failed to get header from client: %v", err) + grpclog.Errorf("Failed to get header from client: %v", err) return nil, metadata, err } metadata.HeaderMD = header @@ -194,6 +194,7 @@ func local_request_Plugin_Validate_0(ctx context.Context, marshaler runtime.Mars // UnaryRPC :call PluginServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPluginHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterPluginHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PluginServer) error { mux.Handle("POST", pattern_Plugin_Info_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -273,21 +274,21 @@ func RegisterPluginHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser // RegisterPluginHandlerFromEndpoint is same as RegisterPluginHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterPluginHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -305,7 +306,7 @@ func RegisterPluginHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PluginClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PluginClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PluginClient" to call the correct interceptors. +// "PluginClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterPluginHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PluginClient) error { mux.Handle("POST", pattern_Plugin_Info_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/idpplugin/v1/idpplugin_grpc.pb.go b/aserto/idpplugin/v1/idpplugin_grpc.pb.go index d27f2cf..b9fde9e 100644 --- a/aserto/idpplugin/v1/idpplugin_grpc.pb.go +++ b/aserto/idpplugin/v1/idpplugin_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/idpplugin/v1/idpplugin.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Plugin_Info_FullMethodName = "/aserto.idpplugin.v1.Plugin/Info" @@ -31,9 +31,9 @@ const ( // 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 PluginClient interface { Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) - Import(ctx context.Context, opts ...grpc.CallOption) (Plugin_ImportClient, error) - Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (Plugin_ExportClient, error) - Delete(ctx context.Context, opts ...grpc.CallOption) (Plugin_DeleteClient, error) + Import(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ImportRequest, ImportResponse], error) + Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ExportResponse], error) + Delete(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[DeleteRequest, DeleteResponse], error) Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error) } @@ -46,51 +46,35 @@ func NewPluginClient(cc grpc.ClientConnInterface) PluginClient { } func (c *pluginClient) Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(InfoResponse) - err := c.cc.Invoke(ctx, Plugin_Info_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Plugin_Info_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *pluginClient) Import(ctx context.Context, opts ...grpc.CallOption) (Plugin_ImportClient, error) { - stream, err := c.cc.NewStream(ctx, &Plugin_ServiceDesc.Streams[0], Plugin_Import_FullMethodName, opts...) +func (c *pluginClient) Import(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ImportRequest, ImportResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Plugin_ServiceDesc.Streams[0], Plugin_Import_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &pluginImportClient{stream} + x := &grpc.GenericClientStream[ImportRequest, ImportResponse]{ClientStream: stream} return x, nil } -type Plugin_ImportClient interface { - Send(*ImportRequest) error - Recv() (*ImportResponse, error) - grpc.ClientStream -} - -type pluginImportClient struct { - grpc.ClientStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Plugin_ImportClient = grpc.BidiStreamingClient[ImportRequest, ImportResponse] -func (x *pluginImportClient) Send(m *ImportRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *pluginImportClient) Recv() (*ImportResponse, error) { - m := new(ImportResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *pluginClient) Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (Plugin_ExportClient, error) { - stream, err := c.cc.NewStream(ctx, &Plugin_ServiceDesc.Streams[1], Plugin_Export_FullMethodName, opts...) +func (c *pluginClient) Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ExportResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Plugin_ServiceDesc.Streams[1], Plugin_Export_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &pluginExportClient{stream} + x := &grpc.GenericClientStream[ExportRequest, ExportResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -100,57 +84,26 @@ func (c *pluginClient) Export(ctx context.Context, in *ExportRequest, opts ...gr return x, nil } -type Plugin_ExportClient interface { - Recv() (*ExportResponse, error) - grpc.ClientStream -} - -type pluginExportClient struct { - grpc.ClientStream -} - -func (x *pluginExportClient) Recv() (*ExportResponse, error) { - m := new(ExportResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Plugin_ExportClient = grpc.ServerStreamingClient[ExportResponse] -func (c *pluginClient) Delete(ctx context.Context, opts ...grpc.CallOption) (Plugin_DeleteClient, error) { - stream, err := c.cc.NewStream(ctx, &Plugin_ServiceDesc.Streams[2], Plugin_Delete_FullMethodName, opts...) +func (c *pluginClient) Delete(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[DeleteRequest, DeleteResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Plugin_ServiceDesc.Streams[2], Plugin_Delete_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &pluginDeleteClient{stream} + x := &grpc.GenericClientStream[DeleteRequest, DeleteResponse]{ClientStream: stream} return x, nil } -type Plugin_DeleteClient interface { - Send(*DeleteRequest) error - Recv() (*DeleteResponse, error) - grpc.ClientStream -} - -type pluginDeleteClient struct { - grpc.ClientStream -} - -func (x *pluginDeleteClient) Send(m *DeleteRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *pluginDeleteClient) Recv() (*DeleteResponse, error) { - m := new(DeleteResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Plugin_DeleteClient = grpc.BidiStreamingClient[DeleteRequest, DeleteResponse] func (c *pluginClient) Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ValidateResponse) - err := c.cc.Invoke(ctx, Plugin_Validate_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Plugin_Validate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -159,34 +112,38 @@ func (c *pluginClient) Validate(ctx context.Context, in *ValidateRequest, opts . // PluginServer is the server API for Plugin service. // All implementations should embed UnimplementedPluginServer -// for forward compatibility +// for forward compatibility. type PluginServer interface { Info(context.Context, *InfoRequest) (*InfoResponse, error) - Import(Plugin_ImportServer) error - Export(*ExportRequest, Plugin_ExportServer) error - Delete(Plugin_DeleteServer) error + Import(grpc.BidiStreamingServer[ImportRequest, ImportResponse]) error + Export(*ExportRequest, grpc.ServerStreamingServer[ExportResponse]) error + Delete(grpc.BidiStreamingServer[DeleteRequest, DeleteResponse]) error Validate(context.Context, *ValidateRequest) (*ValidateResponse, error) } -// UnimplementedPluginServer should be embedded to have forward compatible implementations. -type UnimplementedPluginServer struct { -} +// UnimplementedPluginServer should 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 UnimplementedPluginServer struct{} func (UnimplementedPluginServer) Info(context.Context, *InfoRequest) (*InfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") } -func (UnimplementedPluginServer) Import(Plugin_ImportServer) error { +func (UnimplementedPluginServer) Import(grpc.BidiStreamingServer[ImportRequest, ImportResponse]) error { return status.Errorf(codes.Unimplemented, "method Import not implemented") } -func (UnimplementedPluginServer) Export(*ExportRequest, Plugin_ExportServer) error { +func (UnimplementedPluginServer) Export(*ExportRequest, grpc.ServerStreamingServer[ExportResponse]) error { return status.Errorf(codes.Unimplemented, "method Export not implemented") } -func (UnimplementedPluginServer) Delete(Plugin_DeleteServer) error { +func (UnimplementedPluginServer) Delete(grpc.BidiStreamingServer[DeleteRequest, DeleteResponse]) error { return status.Errorf(codes.Unimplemented, "method Delete not implemented") } func (UnimplementedPluginServer) Validate(context.Context, *ValidateRequest) (*ValidateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Validate not implemented") } +func (UnimplementedPluginServer) testEmbeddedByValue() {} // UnsafePluginServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PluginServer will @@ -196,6 +153,13 @@ type UnsafePluginServer interface { } func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer) { + // If the following call pancis, it indicates UnimplementedPluginServer 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(&Plugin_ServiceDesc, srv) } @@ -218,77 +182,29 @@ func _Plugin_Info_Handler(srv interface{}, ctx context.Context, dec func(interfa } func _Plugin_Import_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(PluginServer).Import(&pluginImportServer{stream}) -} - -type Plugin_ImportServer interface { - Send(*ImportResponse) error - Recv() (*ImportRequest, error) - grpc.ServerStream + return srv.(PluginServer).Import(&grpc.GenericServerStream[ImportRequest, ImportResponse]{ServerStream: stream}) } -type pluginImportServer struct { - grpc.ServerStream -} - -func (x *pluginImportServer) Send(m *ImportResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *pluginImportServer) Recv() (*ImportRequest, error) { - m := new(ImportRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Plugin_ImportServer = grpc.BidiStreamingServer[ImportRequest, ImportResponse] func _Plugin_Export_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(ExportRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(PluginServer).Export(m, &pluginExportServer{stream}) + return srv.(PluginServer).Export(m, &grpc.GenericServerStream[ExportRequest, ExportResponse]{ServerStream: stream}) } -type Plugin_ExportServer interface { - Send(*ExportResponse) error - grpc.ServerStream -} - -type pluginExportServer struct { - grpc.ServerStream -} - -func (x *pluginExportServer) Send(m *ExportResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Plugin_ExportServer = grpc.ServerStreamingServer[ExportResponse] func _Plugin_Delete_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(PluginServer).Delete(&pluginDeleteServer{stream}) -} - -type Plugin_DeleteServer interface { - Send(*DeleteResponse) error - Recv() (*DeleteRequest, error) - grpc.ServerStream -} - -type pluginDeleteServer struct { - grpc.ServerStream -} - -func (x *pluginDeleteServer) Send(m *DeleteResponse) error { - return x.ServerStream.SendMsg(m) + return srv.(PluginServer).Delete(&grpc.GenericServerStream[DeleteRequest, DeleteResponse]{ServerStream: stream}) } -func (x *pluginDeleteServer) Recv() (*DeleteRequest, error) { - m := new(DeleteRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Plugin_DeleteServer = grpc.BidiStreamingServer[DeleteRequest, DeleteResponse] func _Plugin_Validate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ValidateRequest) diff --git a/aserto/management/v2/control_plane.pb.go b/aserto/management/v2/control_plane.pb.go index 372dc24..7274e70 100644 --- a/aserto/management/v2/control_plane.pb.go +++ b/aserto/management/v2/control_plane.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/management/v2/control_plane.proto @@ -320,7 +320,7 @@ func file_aserto_management_v2_control_plane_proto_rawDescGZIP() []byte { } var file_aserto_management_v2_control_plane_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_aserto_management_v2_control_plane_proto_goTypes = []interface{}{ +var file_aserto_management_v2_control_plane_proto_goTypes = []any{ (*ListInstanceRegistrationsRequest)(nil), // 0: aserto.management.v2.ListInstanceRegistrationsRequest (*ListInstanceRegistrationsResponse)(nil), // 1: aserto.management.v2.ListInstanceRegistrationsResponse (*ExecCommandRequest)(nil), // 2: aserto.management.v2.ExecCommandRequest @@ -350,7 +350,7 @@ func file_aserto_management_v2_control_plane_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_management_v2_control_plane_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_management_v2_control_plane_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ListInstanceRegistrationsRequest); i { case 0: return &v.state @@ -362,7 +362,7 @@ func file_aserto_management_v2_control_plane_proto_init() { return nil } } - file_aserto_management_v2_control_plane_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_management_v2_control_plane_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ListInstanceRegistrationsResponse); i { case 0: return &v.state @@ -374,7 +374,7 @@ func file_aserto_management_v2_control_plane_proto_init() { return nil } } - file_aserto_management_v2_control_plane_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_management_v2_control_plane_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ExecCommandRequest); i { case 0: return &v.state @@ -386,7 +386,7 @@ func file_aserto_management_v2_control_plane_proto_init() { return nil } } - file_aserto_management_v2_control_plane_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_management_v2_control_plane_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ExecCommandResponse); i { case 0: return &v.state diff --git a/aserto/management/v2/control_plane.pb.gw.go b/aserto/management/v2/control_plane.pb.gw.go index b43d08c..e77351a 100644 --- a/aserto/management/v2/control_plane.pb.gw.go +++ b/aserto/management/v2/control_plane.pb.gw.go @@ -79,6 +79,7 @@ func local_request_ControlPlane_ExecCommand_0(ctx context.Context, marshaler run // UnaryRPC :call ControlPlaneServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterControlPlaneHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterControlPlaneHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ControlPlaneServer) error { mux.Handle("GET", pattern_ControlPlane_ListInstanceRegistrations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -137,21 +138,21 @@ func RegisterControlPlaneHandlerServer(ctx context.Context, mux *runtime.ServeMu // RegisterControlPlaneHandlerFromEndpoint is same as RegisterControlPlaneHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterControlPlaneHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -169,7 +170,7 @@ func RegisterControlPlaneHandler(ctx context.Context, mux *runtime.ServeMux, con // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ControlPlaneClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ControlPlaneClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ControlPlaneClient" to call the correct interceptors. +// "ControlPlaneClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterControlPlaneHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ControlPlaneClient) error { mux.Handle("GET", pattern_ControlPlane_ListInstanceRegistrations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/management/v2/control_plane_grpc.pb.go b/aserto/management/v2/control_plane_grpc.pb.go index e5eee66..a2a32b4 100644 --- a/aserto/management/v2/control_plane_grpc.pb.go +++ b/aserto/management/v2/control_plane_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/management/v2/control_plane.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( ControlPlane_ListInstanceRegistrations_FullMethodName = "/aserto.management.v2.ControlPlane/ListInstanceRegistrations" @@ -40,8 +40,9 @@ func NewControlPlaneClient(cc grpc.ClientConnInterface) ControlPlaneClient { } func (c *controlPlaneClient) ListInstanceRegistrations(ctx context.Context, in *ListInstanceRegistrationsRequest, opts ...grpc.CallOption) (*ListInstanceRegistrationsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListInstanceRegistrationsResponse) - err := c.cc.Invoke(ctx, ControlPlane_ListInstanceRegistrations_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ControlPlane_ListInstanceRegistrations_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -49,8 +50,9 @@ func (c *controlPlaneClient) ListInstanceRegistrations(ctx context.Context, in * } func (c *controlPlaneClient) ExecCommand(ctx context.Context, in *ExecCommandRequest, opts ...grpc.CallOption) (*ExecCommandResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ExecCommandResponse) - err := c.cc.Invoke(ctx, ControlPlane_ExecCommand_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ControlPlane_ExecCommand_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -59,15 +61,18 @@ func (c *controlPlaneClient) ExecCommand(ctx context.Context, in *ExecCommandReq // ControlPlaneServer is the server API for ControlPlane service. // All implementations should embed UnimplementedControlPlaneServer -// for forward compatibility +// for forward compatibility. type ControlPlaneServer interface { ListInstanceRegistrations(context.Context, *ListInstanceRegistrationsRequest) (*ListInstanceRegistrationsResponse, error) ExecCommand(context.Context, *ExecCommandRequest) (*ExecCommandResponse, error) } -// UnimplementedControlPlaneServer should be embedded to have forward compatible implementations. -type UnimplementedControlPlaneServer struct { -} +// UnimplementedControlPlaneServer should 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 UnimplementedControlPlaneServer struct{} func (UnimplementedControlPlaneServer) ListInstanceRegistrations(context.Context, *ListInstanceRegistrationsRequest) (*ListInstanceRegistrationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListInstanceRegistrations not implemented") @@ -75,6 +80,7 @@ func (UnimplementedControlPlaneServer) ListInstanceRegistrations(context.Context func (UnimplementedControlPlaneServer) ExecCommand(context.Context, *ExecCommandRequest) (*ExecCommandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExecCommand not implemented") } +func (UnimplementedControlPlaneServer) testEmbeddedByValue() {} // UnsafeControlPlaneServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ControlPlaneServer will @@ -84,6 +90,13 @@ type UnsafeControlPlaneServer interface { } func RegisterControlPlaneServer(s grpc.ServiceRegistrar, srv ControlPlaneServer) { + // If the following call pancis, it indicates UnimplementedControlPlaneServer 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(&ControlPlane_ServiceDesc, srv) } diff --git a/aserto/management/v2/controller.pb.go b/aserto/management/v2/controller.pb.go index 81780f6..eb75667 100644 --- a/aserto/management/v2/controller.pb.go +++ b/aserto/management/v2/controller.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/management/v2/controller.proto @@ -162,7 +162,7 @@ func file_aserto_management_v2_controller_proto_rawDescGZIP() []byte { } var file_aserto_management_v2_controller_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_aserto_management_v2_controller_proto_goTypes = []interface{}{ +var file_aserto_management_v2_controller_proto_goTypes = []any{ (*CommandStreamRequest)(nil), // 0: aserto.management.v2.CommandStreamRequest (*CommandStreamResponse)(nil), // 1: aserto.management.v2.CommandStreamResponse (*v2.InstanceInfo)(nil), // 2: aserto.api.v2.InstanceInfo @@ -186,7 +186,7 @@ func file_aserto_management_v2_controller_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_management_v2_controller_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_management_v2_controller_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*CommandStreamRequest); i { case 0: return &v.state @@ -198,7 +198,7 @@ func file_aserto_management_v2_controller_proto_init() { return nil } } - file_aserto_management_v2_controller_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_management_v2_controller_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CommandStreamResponse); i { case 0: return &v.state diff --git a/aserto/management/v2/controller.pb.gw.go b/aserto/management/v2/controller.pb.gw.go index b77fbeb..b547959 100644 --- a/aserto/management/v2/controller.pb.gw.go +++ b/aserto/management/v2/controller.pb.gw.go @@ -56,6 +56,7 @@ func request_Controller_CommandStream_0(ctx context.Context, marshaler runtime.M // UnaryRPC :call ControllerServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterControllerHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterControllerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ControllerServer) error { mux.Handle("POST", pattern_Controller_CommandStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -71,21 +72,21 @@ func RegisterControllerHandlerServer(ctx context.Context, mux *runtime.ServeMux, // RegisterControllerHandlerFromEndpoint is same as RegisterControllerHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterControllerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -103,7 +104,7 @@ func RegisterControllerHandler(ctx context.Context, mux *runtime.ServeMux, conn // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ControllerClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ControllerClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ControllerClient" to call the correct interceptors. +// "ControllerClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterControllerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ControllerClient) error { mux.Handle("POST", pattern_Controller_CommandStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/management/v2/controller_grpc.pb.go b/aserto/management/v2/controller_grpc.pb.go index a87d60d..2858a5f 100644 --- a/aserto/management/v2/controller_grpc.pb.go +++ b/aserto/management/v2/controller_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/management/v2/controller.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Controller_CommandStream_FullMethodName = "/aserto.management.v2.Controller/CommandStream" @@ -26,7 +26,7 @@ const ( // // 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 ControllerClient interface { - CommandStream(ctx context.Context, in *CommandStreamRequest, opts ...grpc.CallOption) (Controller_CommandStreamClient, error) + CommandStream(ctx context.Context, in *CommandStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[CommandStreamResponse], error) } type controllerClient struct { @@ -37,12 +37,13 @@ func NewControllerClient(cc grpc.ClientConnInterface) ControllerClient { return &controllerClient{cc} } -func (c *controllerClient) CommandStream(ctx context.Context, in *CommandStreamRequest, opts ...grpc.CallOption) (Controller_CommandStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &Controller_ServiceDesc.Streams[0], Controller_CommandStream_FullMethodName, opts...) +func (c *controllerClient) CommandStream(ctx context.Context, in *CommandStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[CommandStreamResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Controller_ServiceDesc.Streams[0], Controller_CommandStream_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &controllerCommandStreamClient{stream} + x := &grpc.GenericClientStream[CommandStreamRequest, CommandStreamResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -52,37 +53,27 @@ func (c *controllerClient) CommandStream(ctx context.Context, in *CommandStreamR return x, nil } -type Controller_CommandStreamClient interface { - Recv() (*CommandStreamResponse, error) - grpc.ClientStream -} - -type controllerCommandStreamClient struct { - grpc.ClientStream -} - -func (x *controllerCommandStreamClient) Recv() (*CommandStreamResponse, error) { - m := new(CommandStreamResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Controller_CommandStreamClient = grpc.ServerStreamingClient[CommandStreamResponse] // ControllerServer is the server API for Controller service. // All implementations should embed UnimplementedControllerServer -// for forward compatibility +// for forward compatibility. type ControllerServer interface { - CommandStream(*CommandStreamRequest, Controller_CommandStreamServer) error + CommandStream(*CommandStreamRequest, grpc.ServerStreamingServer[CommandStreamResponse]) error } -// UnimplementedControllerServer should be embedded to have forward compatible implementations. -type UnimplementedControllerServer struct { -} +// UnimplementedControllerServer should 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 UnimplementedControllerServer struct{} -func (UnimplementedControllerServer) CommandStream(*CommandStreamRequest, Controller_CommandStreamServer) error { +func (UnimplementedControllerServer) CommandStream(*CommandStreamRequest, grpc.ServerStreamingServer[CommandStreamResponse]) error { return status.Errorf(codes.Unimplemented, "method CommandStream not implemented") } +func (UnimplementedControllerServer) testEmbeddedByValue() {} // UnsafeControllerServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ControllerServer will @@ -92,6 +83,13 @@ type UnsafeControllerServer interface { } func RegisterControllerServer(s grpc.ServiceRegistrar, srv ControllerServer) { + // If the following call pancis, it indicates UnimplementedControllerServer 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(&Controller_ServiceDesc, srv) } @@ -100,21 +98,11 @@ func _Controller_CommandStream_Handler(srv interface{}, stream grpc.ServerStream if err := stream.RecvMsg(m); err != nil { return err } - return srv.(ControllerServer).CommandStream(m, &controllerCommandStreamServer{stream}) -} - -type Controller_CommandStreamServer interface { - Send(*CommandStreamResponse) error - grpc.ServerStream + return srv.(ControllerServer).CommandStream(m, &grpc.GenericServerStream[CommandStreamRequest, CommandStreamResponse]{ServerStream: stream}) } -type controllerCommandStreamServer struct { - grpc.ServerStream -} - -func (x *controllerCommandStreamServer) Send(m *CommandStreamResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Controller_CommandStreamServer = grpc.ServerStreamingServer[CommandStreamResponse] // Controller_ServiceDesc is the grpc.ServiceDesc for Controller service. // It's only intended for direct use with grpc.RegisterService, diff --git a/aserto/options/v1/events.pb.go b/aserto/options/v1/events.pb.go index d293688..a96ce72 100644 --- a/aserto/options/v1/events.pb.go +++ b/aserto/options/v1/events.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/options/v1/events.proto @@ -139,7 +139,7 @@ func file_aserto_options_v1_events_proto_rawDescGZIP() []byte { } var file_aserto_options_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_aserto_options_v1_events_proto_goTypes = []interface{}{ +var file_aserto_options_v1_events_proto_goTypes = []any{ (*Event)(nil), // 0: aserto.options.v1.Event (*descriptorpb.MessageOptions)(nil), // 1: google.protobuf.MessageOptions (*descriptorpb.FieldOptions)(nil), // 2: google.protobuf.FieldOptions @@ -161,7 +161,7 @@ func file_aserto_options_v1_events_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_options_v1_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_options_v1_events_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Event); i { case 0: return &v.state diff --git a/aserto/options/v1/ids.pb.go b/aserto/options/v1/ids.pb.go index 982a5d7..871e529 100644 --- a/aserto/options/v1/ids.pb.go +++ b/aserto/options/v1/ids.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/options/v1/ids.proto @@ -178,7 +178,7 @@ func file_aserto_options_v1_ids_proto_rawDescGZIP() []byte { } var file_aserto_options_v1_ids_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_aserto_options_v1_ids_proto_goTypes = []interface{}{ +var file_aserto_options_v1_ids_proto_goTypes = []any{ (IDType)(0), // 0: aserto.options.v1.IDType (*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions (*descriptorpb.EnumValueOptions)(nil), // 2: google.protobuf.EnumValueOptions diff --git a/aserto/registry/v1/registry.pb.go b/aserto/registry/v1/registry.pb.go index aad8670..339ce36 100644 --- a/aserto/registry/v1/registry.pb.go +++ b/aserto/registry/v1/registry.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/registry/v1/registry.proto @@ -1699,7 +1699,7 @@ func file_aserto_registry_v1_registry_proto_rawDescGZIP() []byte { } var file_aserto_registry_v1_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 24) -var file_aserto_registry_v1_registry_proto_goTypes = []interface{}{ +var file_aserto_registry_v1_registry_proto_goTypes = []any{ (*ListImagesRequest)(nil), // 0: aserto.registry.v1.ListImagesRequest (*ListImagesResponse)(nil), // 1: aserto.registry.v1.ListImagesResponse (*RemoveImageRequest)(nil), // 2: aserto.registry.v1.RemoveImageRequest @@ -1791,7 +1791,7 @@ func file_aserto_registry_v1_registry_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_registry_v1_registry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ListImagesRequest); i { case 0: return &v.state @@ -1803,7 +1803,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ListImagesResponse); i { case 0: return &v.state @@ -1815,7 +1815,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*RemoveImageRequest); i { case 0: return &v.state @@ -1827,7 +1827,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*RemoveImageResponse); i { case 0: return &v.state @@ -1839,7 +1839,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*SetImageVisibilityRequest); i { case 0: return &v.state @@ -1851,7 +1851,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*SetImageVisibilityResponse); i { case 0: return &v.state @@ -1863,7 +1863,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*CreateImageRequest); i { case 0: return &v.state @@ -1875,7 +1875,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*CreateImageResponse); i { case 0: return &v.state @@ -1887,7 +1887,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*GetWriteAccessTokenRequest); i { case 0: return &v.state @@ -1899,7 +1899,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*GetWriteAccessTokenResponse); i { case 0: return &v.state @@ -1911,7 +1911,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*GetReadAccessTokenRequest); i { case 0: return &v.state @@ -1923,7 +1923,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*GetReadAccessTokenResponse); i { case 0: return &v.state @@ -1935,7 +1935,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*ListPublicOrgsRequest); i { case 0: return &v.state @@ -1947,7 +1947,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*ListPublicOrgsResponse); i { case 0: return &v.state @@ -1959,7 +1959,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*ListOrgsRequest); i { case 0: return &v.state @@ -1971,7 +1971,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*ListOrgsResponse); i { case 0: return &v.state @@ -1983,7 +1983,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*ListPublicImagesRequest); i { case 0: return &v.state @@ -1995,7 +1995,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*ListPublicImagesResponse); i { case 0: return &v.state @@ -2007,7 +2007,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*ListTagsWithDetailsRequest); i { case 0: return &v.state @@ -2019,7 +2019,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*ListTagsWithDetailsResponse); i { case 0: return &v.state @@ -2031,7 +2031,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*ListDigestsRequest); i { case 0: return &v.state @@ -2043,7 +2043,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*ListDigestsResponse); i { case 0: return &v.state @@ -2055,7 +2055,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*RepoAvailableRequest); i { case 0: return &v.state @@ -2067,7 +2067,7 @@ func file_aserto_registry_v1_registry_proto_init() { return nil } } - file_aserto_registry_v1_registry_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_v1_registry_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*RepoAvailableResponse); i { case 0: return &v.state diff --git a/aserto/registry/v1/registry.pb.gw.go b/aserto/registry/v1/registry.pb.gw.go index cf4c2b3..bcebe09 100644 --- a/aserto/registry/v1/registry.pb.gw.go +++ b/aserto/registry/v1/registry.pb.gw.go @@ -781,6 +781,7 @@ func local_request_Registry_RepoAvailable_0(ctx context.Context, marshaler runti // UnaryRPC :call RegistryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRegistryHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterRegistryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RegistryServer) error { mux.Handle("GET", pattern_Registry_ListPublicOrgs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1089,21 +1090,21 @@ func RegisterRegistryHandlerServer(ctx context.Context, mux *runtime.ServeMux, s // RegisterRegistryHandlerFromEndpoint is same as RegisterRegistryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterRegistryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -1121,7 +1122,7 @@ func RegisterRegistryHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RegistryClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RegistryClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "RegistryClient" to call the correct interceptors. +// "RegistryClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterRegistryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RegistryClient) error { mux.Handle("GET", pattern_Registry_ListPublicOrgs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/registry/v1/registry_grpc.pb.go b/aserto/registry/v1/registry_grpc.pb.go index ea7f39f..a4e178a 100644 --- a/aserto/registry/v1/registry_grpc.pb.go +++ b/aserto/registry/v1/registry_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/registry/v1/registry.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Registry_ListPublicOrgs_FullMethodName = "/aserto.registry.v1.Registry/ListPublicOrgs" @@ -60,8 +60,9 @@ func NewRegistryClient(cc grpc.ClientConnInterface) RegistryClient { } func (c *registryClient) ListPublicOrgs(ctx context.Context, in *ListPublicOrgsRequest, opts ...grpc.CallOption) (*ListPublicOrgsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListPublicOrgsResponse) - err := c.cc.Invoke(ctx, Registry_ListPublicOrgs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_ListPublicOrgs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -69,8 +70,9 @@ func (c *registryClient) ListPublicOrgs(ctx context.Context, in *ListPublicOrgsR } func (c *registryClient) ListPublicImages(ctx context.Context, in *ListPublicImagesRequest, opts ...grpc.CallOption) (*ListPublicImagesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListPublicImagesResponse) - err := c.cc.Invoke(ctx, Registry_ListPublicImages_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_ListPublicImages_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -78,8 +80,9 @@ func (c *registryClient) ListPublicImages(ctx context.Context, in *ListPublicIma } func (c *registryClient) ListImages(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListImagesResponse) - err := c.cc.Invoke(ctx, Registry_ListImages_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_ListImages_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -87,8 +90,9 @@ func (c *registryClient) ListImages(ctx context.Context, in *ListImagesRequest, } func (c *registryClient) 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, Registry_ListOrgs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_ListOrgs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -96,8 +100,9 @@ func (c *registryClient) ListOrgs(ctx context.Context, in *ListOrgsRequest, opts } func (c *registryClient) RemoveImage(ctx context.Context, in *RemoveImageRequest, opts ...grpc.CallOption) (*RemoveImageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RemoveImageResponse) - err := c.cc.Invoke(ctx, Registry_RemoveImage_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_RemoveImage_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -105,8 +110,9 @@ func (c *registryClient) RemoveImage(ctx context.Context, in *RemoveImageRequest } func (c *registryClient) CreateImage(ctx context.Context, in *CreateImageRequest, opts ...grpc.CallOption) (*CreateImageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateImageResponse) - err := c.cc.Invoke(ctx, Registry_CreateImage_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_CreateImage_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -114,8 +120,9 @@ func (c *registryClient) CreateImage(ctx context.Context, in *CreateImageRequest } func (c *registryClient) SetImageVisibility(ctx context.Context, in *SetImageVisibilityRequest, opts ...grpc.CallOption) (*SetImageVisibilityResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetImageVisibilityResponse) - err := c.cc.Invoke(ctx, Registry_SetImageVisibility_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_SetImageVisibility_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -123,8 +130,9 @@ func (c *registryClient) SetImageVisibility(ctx context.Context, in *SetImageVis } func (c *registryClient) GetReadAccessToken(ctx context.Context, in *GetReadAccessTokenRequest, opts ...grpc.CallOption) (*GetReadAccessTokenResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetReadAccessTokenResponse) - err := c.cc.Invoke(ctx, Registry_GetReadAccessToken_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_GetReadAccessToken_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -132,8 +140,9 @@ func (c *registryClient) GetReadAccessToken(ctx context.Context, in *GetReadAcce } func (c *registryClient) GetWriteAccessToken(ctx context.Context, in *GetWriteAccessTokenRequest, opts ...grpc.CallOption) (*GetWriteAccessTokenResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetWriteAccessTokenResponse) - err := c.cc.Invoke(ctx, Registry_GetWriteAccessToken_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_GetWriteAccessToken_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -141,8 +150,9 @@ func (c *registryClient) GetWriteAccessToken(ctx context.Context, in *GetWriteAc } func (c *registryClient) ListTagsWithDetails(ctx context.Context, in *ListTagsWithDetailsRequest, opts ...grpc.CallOption) (*ListTagsWithDetailsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListTagsWithDetailsResponse) - err := c.cc.Invoke(ctx, Registry_ListTagsWithDetails_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_ListTagsWithDetails_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -150,8 +160,9 @@ func (c *registryClient) ListTagsWithDetails(ctx context.Context, in *ListTagsWi } func (c *registryClient) ListDigests(ctx context.Context, in *ListDigestsRequest, opts ...grpc.CallOption) (*ListDigestsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListDigestsResponse) - err := c.cc.Invoke(ctx, Registry_ListDigests_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_ListDigests_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -159,8 +170,9 @@ func (c *registryClient) ListDigests(ctx context.Context, in *ListDigestsRequest } func (c *registryClient) RepoAvailable(ctx context.Context, in *RepoAvailableRequest, opts ...grpc.CallOption) (*RepoAvailableResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RepoAvailableResponse) - err := c.cc.Invoke(ctx, Registry_RepoAvailable_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_RepoAvailable_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -169,7 +181,7 @@ func (c *registryClient) RepoAvailable(ctx context.Context, in *RepoAvailableReq // RegistryServer is the server API for Registry service. // All implementations should embed UnimplementedRegistryServer -// for forward compatibility +// for forward compatibility. type RegistryServer interface { ListPublicOrgs(context.Context, *ListPublicOrgsRequest) (*ListPublicOrgsResponse, error) ListPublicImages(context.Context, *ListPublicImagesRequest) (*ListPublicImagesResponse, error) @@ -185,9 +197,12 @@ type RegistryServer interface { RepoAvailable(context.Context, *RepoAvailableRequest) (*RepoAvailableResponse, error) } -// UnimplementedRegistryServer should be embedded to have forward compatible implementations. -type UnimplementedRegistryServer struct { -} +// UnimplementedRegistryServer should 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 UnimplementedRegistryServer struct{} func (UnimplementedRegistryServer) ListPublicOrgs(context.Context, *ListPublicOrgsRequest) (*ListPublicOrgsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPublicOrgs not implemented") @@ -225,6 +240,7 @@ func (UnimplementedRegistryServer) ListDigests(context.Context, *ListDigestsRequ func (UnimplementedRegistryServer) RepoAvailable(context.Context, *RepoAvailableRequest) (*RepoAvailableResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RepoAvailable not implemented") } +func (UnimplementedRegistryServer) testEmbeddedByValue() {} // UnsafeRegistryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to RegistryServer will @@ -234,6 +250,13 @@ type UnsafeRegistryServer interface { } func RegisterRegistryServer(s grpc.ServiceRegistrar, srv RegistryServer) { + // If the following call pancis, it indicates UnimplementedRegistryServer 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(&Registry_ServiceDesc, srv) } diff --git a/aserto/registry_tenant/v1/policy.pb.go b/aserto/registry_tenant/v1/policy.pb.go index 3fee519..2ca1c97 100644 --- a/aserto/registry_tenant/v1/policy.pb.go +++ b/aserto/registry_tenant/v1/policy.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/registry_tenant/v1/policy.proto @@ -810,7 +810,7 @@ func file_aserto_registry_tenant_v1_policy_proto_rawDescGZIP() []byte { } var file_aserto_registry_tenant_v1_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_aserto_registry_tenant_v1_policy_proto_goTypes = []interface{}{ +var file_aserto_registry_tenant_v1_policy_proto_goTypes = []any{ (*GetPolicyImageRequest)(nil), // 0: aserto.registry_tenant.v1.GetPolicyImageRequest (*GetPolicyImageResponse)(nil), // 1: aserto.registry_tenant.v1.GetPolicyImageResponse (*CreatePolicyImageRequest)(nil), // 2: aserto.registry_tenant.v1.CreatePolicyImageRequest @@ -861,7 +861,7 @@ func file_aserto_registry_tenant_v1_policy_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_registry_tenant_v1_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*GetPolicyImageRequest); i { case 0: return &v.state @@ -873,7 +873,7 @@ func file_aserto_registry_tenant_v1_policy_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*GetPolicyImageResponse); i { case 0: return &v.state @@ -885,7 +885,7 @@ func file_aserto_registry_tenant_v1_policy_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*CreatePolicyImageRequest); i { case 0: return &v.state @@ -897,7 +897,7 @@ func file_aserto_registry_tenant_v1_policy_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*CreatePolicyImageResponse); i { case 0: return &v.state @@ -909,7 +909,7 @@ func file_aserto_registry_tenant_v1_policy_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ListPolicyImagesRequest); i { case 0: return &v.state @@ -921,7 +921,7 @@ func file_aserto_registry_tenant_v1_policy_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*ListPolicyImagesResponse); i { case 0: return &v.state @@ -933,7 +933,7 @@ func file_aserto_registry_tenant_v1_policy_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*ListPublicPolicyImagesRequest); i { case 0: return &v.state @@ -945,7 +945,7 @@ func file_aserto_registry_tenant_v1_policy_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*ListPublicPolicyImagesResponse); i { case 0: return &v.state @@ -957,7 +957,7 @@ func file_aserto_registry_tenant_v1_policy_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*DeletePolicyImageRequest); i { case 0: return &v.state @@ -969,7 +969,7 @@ func file_aserto_registry_tenant_v1_policy_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*DeletePolicyImageResponse); i { case 0: return &v.state @@ -981,7 +981,7 @@ func file_aserto_registry_tenant_v1_policy_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*UpdatePolicyImageRequest); i { case 0: return &v.state @@ -993,7 +993,7 @@ func file_aserto_registry_tenant_v1_policy_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*UpdatePolicyImageResponse); i { case 0: return &v.state diff --git a/aserto/registry_tenant/v1/policy.pb.gw.go b/aserto/registry_tenant/v1/policy.pb.gw.go index 485e98e..12b432b 100644 --- a/aserto/registry_tenant/v1/policy.pb.gw.go +++ b/aserto/registry_tenant/v1/policy.pb.gw.go @@ -315,6 +315,7 @@ func local_request_Policy_UpdatePolicyImage_0(ctx context.Context, marshaler run // UnaryRPC :call PolicyServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPolicyHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterPolicyHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PolicyServer) error { mux.Handle("GET", pattern_Policy_GetPolicyImage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -473,21 +474,21 @@ func RegisterPolicyHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser // RegisterPolicyHandlerFromEndpoint is same as RegisterPolicyHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterPolicyHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -505,7 +506,7 @@ func RegisterPolicyHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PolicyClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PolicyClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PolicyClient" to call the correct interceptors. +// "PolicyClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterPolicyHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PolicyClient) error { mux.Handle("GET", pattern_Policy_GetPolicyImage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/registry_tenant/v1/policy_grpc.pb.go b/aserto/registry_tenant/v1/policy_grpc.pb.go index 5a6af07..a921aa1 100644 --- a/aserto/registry_tenant/v1/policy_grpc.pb.go +++ b/aserto/registry_tenant/v1/policy_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/registry_tenant/v1/policy.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Policy_GetPolicyImage_FullMethodName = "/aserto.registry_tenant.v1.Policy/GetPolicyImage" @@ -48,8 +48,9 @@ func NewPolicyClient(cc grpc.ClientConnInterface) PolicyClient { } func (c *policyClient) GetPolicyImage(ctx context.Context, in *GetPolicyImageRequest, opts ...grpc.CallOption) (*GetPolicyImageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPolicyImageResponse) - err := c.cc.Invoke(ctx, Policy_GetPolicyImage_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_GetPolicyImage_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -57,8 +58,9 @@ func (c *policyClient) GetPolicyImage(ctx context.Context, in *GetPolicyImageReq } func (c *policyClient) ListPolicyImages(ctx context.Context, in *ListPolicyImagesRequest, opts ...grpc.CallOption) (*ListPolicyImagesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListPolicyImagesResponse) - err := c.cc.Invoke(ctx, Policy_ListPolicyImages_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_ListPolicyImages_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -66,8 +68,9 @@ func (c *policyClient) ListPolicyImages(ctx context.Context, in *ListPolicyImage } func (c *policyClient) ListPublicPolicyImages(ctx context.Context, in *ListPublicPolicyImagesRequest, opts ...grpc.CallOption) (*ListPublicPolicyImagesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListPublicPolicyImagesResponse) - err := c.cc.Invoke(ctx, Policy_ListPublicPolicyImages_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_ListPublicPolicyImages_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -75,8 +78,9 @@ func (c *policyClient) ListPublicPolicyImages(ctx context.Context, in *ListPubli } func (c *policyClient) CreatePolicyImage(ctx context.Context, in *CreatePolicyImageRequest, opts ...grpc.CallOption) (*CreatePolicyImageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreatePolicyImageResponse) - err := c.cc.Invoke(ctx, Policy_CreatePolicyImage_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_CreatePolicyImage_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -84,8 +88,9 @@ func (c *policyClient) CreatePolicyImage(ctx context.Context, in *CreatePolicyIm } func (c *policyClient) DeletePolicyImage(ctx context.Context, in *DeletePolicyImageRequest, opts ...grpc.CallOption) (*DeletePolicyImageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeletePolicyImageResponse) - err := c.cc.Invoke(ctx, Policy_DeletePolicyImage_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_DeletePolicyImage_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -93,8 +98,9 @@ func (c *policyClient) DeletePolicyImage(ctx context.Context, in *DeletePolicyIm } func (c *policyClient) UpdatePolicyImage(ctx context.Context, in *UpdatePolicyImageRequest, opts ...grpc.CallOption) (*UpdatePolicyImageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdatePolicyImageResponse) - err := c.cc.Invoke(ctx, Policy_UpdatePolicyImage_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_UpdatePolicyImage_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -103,7 +109,7 @@ func (c *policyClient) UpdatePolicyImage(ctx context.Context, in *UpdatePolicyIm // PolicyServer is the server API for Policy service. // All implementations should embed UnimplementedPolicyServer -// for forward compatibility +// for forward compatibility. type PolicyServer interface { GetPolicyImage(context.Context, *GetPolicyImageRequest) (*GetPolicyImageResponse, error) ListPolicyImages(context.Context, *ListPolicyImagesRequest) (*ListPolicyImagesResponse, error) @@ -113,9 +119,12 @@ type PolicyServer interface { UpdatePolicyImage(context.Context, *UpdatePolicyImageRequest) (*UpdatePolicyImageResponse, error) } -// UnimplementedPolicyServer should be embedded to have forward compatible implementations. -type UnimplementedPolicyServer struct { -} +// UnimplementedPolicyServer should 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 UnimplementedPolicyServer struct{} func (UnimplementedPolicyServer) GetPolicyImage(context.Context, *GetPolicyImageRequest) (*GetPolicyImageResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPolicyImage not implemented") @@ -135,6 +144,7 @@ func (UnimplementedPolicyServer) DeletePolicyImage(context.Context, *DeletePolic func (UnimplementedPolicyServer) UpdatePolicyImage(context.Context, *UpdatePolicyImageRequest) (*UpdatePolicyImageResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdatePolicyImage not implemented") } +func (UnimplementedPolicyServer) testEmbeddedByValue() {} // UnsafePolicyServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PolicyServer will @@ -144,6 +154,13 @@ type UnsafePolicyServer interface { } func RegisterPolicyServer(s grpc.ServiceRegistrar, srv PolicyServer) { + // If the following call pancis, it indicates UnimplementedPolicyServer 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(&Policy_ServiceDesc, srv) } diff --git a/aserto/registry_tenant/v1/policy_repo.pb.go b/aserto/registry_tenant/v1/policy_repo.pb.go index 60d3ae5..228933d 100644 --- a/aserto/registry_tenant/v1/policy_repo.pb.go +++ b/aserto/registry_tenant/v1/policy_repo.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/registry_tenant/v1/policy_repo.proto @@ -786,7 +786,7 @@ func file_aserto_registry_tenant_v1_policy_repo_proto_rawDescGZIP() []byte { } var file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_aserto_registry_tenant_v1_policy_repo_proto_goTypes = []interface{}{ +var file_aserto_registry_tenant_v1_policy_repo_proto_goTypes = []any{ (*GetPolicyRepoRequest)(nil), // 0: aserto.registry_tenant.v1.GetPolicyRepoRequest (*GetPolicyRepoResponse)(nil), // 1: aserto.registry_tenant.v1.GetPolicyRepoResponse (*CreatePolicyRepoRequest)(nil), // 2: aserto.registry_tenant.v1.CreatePolicyRepoRequest @@ -835,7 +835,7 @@ func file_aserto_registry_tenant_v1_policy_repo_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*GetPolicyRepoRequest); i { case 0: return &v.state @@ -847,7 +847,7 @@ func file_aserto_registry_tenant_v1_policy_repo_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*GetPolicyRepoResponse); i { case 0: return &v.state @@ -859,7 +859,7 @@ func file_aserto_registry_tenant_v1_policy_repo_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*CreatePolicyRepoRequest); i { case 0: return &v.state @@ -871,7 +871,7 @@ func file_aserto_registry_tenant_v1_policy_repo_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*CreatePolicyRepoResponse); i { case 0: return &v.state @@ -883,7 +883,7 @@ func file_aserto_registry_tenant_v1_policy_repo_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ListPolicyReposRequest); i { case 0: return &v.state @@ -895,7 +895,7 @@ func file_aserto_registry_tenant_v1_policy_repo_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*ListPolicyReposResponse); i { case 0: return &v.state @@ -907,7 +907,7 @@ func file_aserto_registry_tenant_v1_policy_repo_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*ListPublicPolicyReposRequest); i { case 0: return &v.state @@ -919,7 +919,7 @@ func file_aserto_registry_tenant_v1_policy_repo_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*ListPublicPolicyReposResponse); i { case 0: return &v.state @@ -931,7 +931,7 @@ func file_aserto_registry_tenant_v1_policy_repo_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*DeletePolicyRepoRequest); i { case 0: return &v.state @@ -943,7 +943,7 @@ func file_aserto_registry_tenant_v1_policy_repo_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*DeletePolicyRepoResponse); i { case 0: return &v.state @@ -955,7 +955,7 @@ func file_aserto_registry_tenant_v1_policy_repo_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*UpdatePolicyRepoRequest); i { case 0: return &v.state @@ -967,7 +967,7 @@ func file_aserto_registry_tenant_v1_policy_repo_proto_init() { return nil } } - file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_policy_repo_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*UpdatePolicyRepoResponse); i { case 0: return &v.state diff --git a/aserto/registry_tenant/v1/policy_repo.pb.gw.go b/aserto/registry_tenant/v1/policy_repo.pb.gw.go index 542e1c4..cc5bf7d 100644 --- a/aserto/registry_tenant/v1/policy_repo.pb.gw.go +++ b/aserto/registry_tenant/v1/policy_repo.pb.gw.go @@ -279,6 +279,7 @@ func local_request_PolicyRepo_UpdatePolicyRepo_0(ctx context.Context, marshaler // UnaryRPC :call PolicyRepoServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPolicyRepoHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterPolicyRepoHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PolicyRepoServer) error { mux.Handle("GET", pattern_PolicyRepo_GetPolicyRepo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -437,21 +438,21 @@ func RegisterPolicyRepoHandlerServer(ctx context.Context, mux *runtime.ServeMux, // RegisterPolicyRepoHandlerFromEndpoint is same as RegisterPolicyRepoHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterPolicyRepoHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -469,7 +470,7 @@ func RegisterPolicyRepoHandler(ctx context.Context, mux *runtime.ServeMux, conn // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PolicyRepoClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PolicyRepoClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PolicyRepoClient" to call the correct interceptors. +// "PolicyRepoClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterPolicyRepoHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PolicyRepoClient) error { mux.Handle("GET", pattern_PolicyRepo_GetPolicyRepo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/registry_tenant/v1/policy_repo_grpc.pb.go b/aserto/registry_tenant/v1/policy_repo_grpc.pb.go index 993bd72..864d9a7 100644 --- a/aserto/registry_tenant/v1/policy_repo_grpc.pb.go +++ b/aserto/registry_tenant/v1/policy_repo_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/registry_tenant/v1/policy_repo.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( PolicyRepo_GetPolicyRepo_FullMethodName = "/aserto.registry_tenant.v1.PolicyRepo/GetPolicyRepo" @@ -48,8 +48,9 @@ func NewPolicyRepoClient(cc grpc.ClientConnInterface) PolicyRepoClient { } func (c *policyRepoClient) GetPolicyRepo(ctx context.Context, in *GetPolicyRepoRequest, opts ...grpc.CallOption) (*GetPolicyRepoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPolicyRepoResponse) - err := c.cc.Invoke(ctx, PolicyRepo_GetPolicyRepo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PolicyRepo_GetPolicyRepo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -57,8 +58,9 @@ func (c *policyRepoClient) GetPolicyRepo(ctx context.Context, in *GetPolicyRepoR } func (c *policyRepoClient) ListPolicyRepos(ctx context.Context, in *ListPolicyReposRequest, opts ...grpc.CallOption) (*ListPolicyReposResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListPolicyReposResponse) - err := c.cc.Invoke(ctx, PolicyRepo_ListPolicyRepos_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PolicyRepo_ListPolicyRepos_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -66,8 +68,9 @@ func (c *policyRepoClient) ListPolicyRepos(ctx context.Context, in *ListPolicyRe } func (c *policyRepoClient) ListPublicPolicyRepos(ctx context.Context, in *ListPublicPolicyReposRequest, opts ...grpc.CallOption) (*ListPublicPolicyReposResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListPublicPolicyReposResponse) - err := c.cc.Invoke(ctx, PolicyRepo_ListPublicPolicyRepos_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PolicyRepo_ListPublicPolicyRepos_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -75,8 +78,9 @@ func (c *policyRepoClient) ListPublicPolicyRepos(ctx context.Context, in *ListPu } func (c *policyRepoClient) CreatePolicyRepo(ctx context.Context, in *CreatePolicyRepoRequest, opts ...grpc.CallOption) (*CreatePolicyRepoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreatePolicyRepoResponse) - err := c.cc.Invoke(ctx, PolicyRepo_CreatePolicyRepo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PolicyRepo_CreatePolicyRepo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -84,8 +88,9 @@ func (c *policyRepoClient) CreatePolicyRepo(ctx context.Context, in *CreatePolic } func (c *policyRepoClient) DeletePolicyRepo(ctx context.Context, in *DeletePolicyRepoRequest, opts ...grpc.CallOption) (*DeletePolicyRepoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeletePolicyRepoResponse) - err := c.cc.Invoke(ctx, PolicyRepo_DeletePolicyRepo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PolicyRepo_DeletePolicyRepo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -93,8 +98,9 @@ func (c *policyRepoClient) DeletePolicyRepo(ctx context.Context, in *DeletePolic } func (c *policyRepoClient) UpdatePolicyRepo(ctx context.Context, in *UpdatePolicyRepoRequest, opts ...grpc.CallOption) (*UpdatePolicyRepoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdatePolicyRepoResponse) - err := c.cc.Invoke(ctx, PolicyRepo_UpdatePolicyRepo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PolicyRepo_UpdatePolicyRepo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -103,7 +109,7 @@ func (c *policyRepoClient) UpdatePolicyRepo(ctx context.Context, in *UpdatePolic // PolicyRepoServer is the server API for PolicyRepo service. // All implementations should embed UnimplementedPolicyRepoServer -// for forward compatibility +// for forward compatibility. type PolicyRepoServer interface { GetPolicyRepo(context.Context, *GetPolicyRepoRequest) (*GetPolicyRepoResponse, error) ListPolicyRepos(context.Context, *ListPolicyReposRequest) (*ListPolicyReposResponse, error) @@ -113,9 +119,12 @@ type PolicyRepoServer interface { UpdatePolicyRepo(context.Context, *UpdatePolicyRepoRequest) (*UpdatePolicyRepoResponse, error) } -// UnimplementedPolicyRepoServer should be embedded to have forward compatible implementations. -type UnimplementedPolicyRepoServer struct { -} +// UnimplementedPolicyRepoServer should 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 UnimplementedPolicyRepoServer struct{} func (UnimplementedPolicyRepoServer) GetPolicyRepo(context.Context, *GetPolicyRepoRequest) (*GetPolicyRepoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPolicyRepo not implemented") @@ -135,6 +144,7 @@ func (UnimplementedPolicyRepoServer) DeletePolicyRepo(context.Context, *DeletePo func (UnimplementedPolicyRepoServer) UpdatePolicyRepo(context.Context, *UpdatePolicyRepoRequest) (*UpdatePolicyRepoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdatePolicyRepo not implemented") } +func (UnimplementedPolicyRepoServer) testEmbeddedByValue() {} // UnsafePolicyRepoServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PolicyRepoServer will @@ -144,6 +154,13 @@ type UnsafePolicyRepoServer interface { } func RegisterPolicyRepoServer(s grpc.ServiceRegistrar, srv PolicyRepoServer) { + // If the following call pancis, it indicates UnimplementedPolicyRepoServer 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(&PolicyRepo_ServiceDesc, srv) } diff --git a/aserto/registry_tenant/v1/tenant.pb.go b/aserto/registry_tenant/v1/tenant.pb.go index fb1880a..ad7c521 100644 --- a/aserto/registry_tenant/v1/tenant.pb.go +++ b/aserto/registry_tenant/v1/tenant.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/registry_tenant/v1/tenant.proto @@ -350,7 +350,7 @@ func file_aserto_registry_tenant_v1_tenant_proto_rawDescGZIP() []byte { } var file_aserto_registry_tenant_v1_tenant_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_aserto_registry_tenant_v1_tenant_proto_goTypes = []interface{}{ +var file_aserto_registry_tenant_v1_tenant_proto_goTypes = []any{ (*ListTenantsRequest)(nil), // 0: aserto.registry_tenant.v1.ListTenantsRequest (*ListTenantsResponse)(nil), // 1: aserto.registry_tenant.v1.ListTenantsResponse (*ListPublicTenantsRequest)(nil), // 2: aserto.registry_tenant.v1.ListPublicTenantsRequest @@ -384,7 +384,7 @@ func file_aserto_registry_tenant_v1_tenant_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_registry_tenant_v1_tenant_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_tenant_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ListTenantsRequest); i { case 0: return &v.state @@ -396,7 +396,7 @@ func file_aserto_registry_tenant_v1_tenant_proto_init() { return nil } } - file_aserto_registry_tenant_v1_tenant_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_tenant_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ListTenantsResponse); i { case 0: return &v.state @@ -408,7 +408,7 @@ func file_aserto_registry_tenant_v1_tenant_proto_init() { return nil } } - file_aserto_registry_tenant_v1_tenant_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_tenant_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ListPublicTenantsRequest); i { case 0: return &v.state @@ -420,7 +420,7 @@ func file_aserto_registry_tenant_v1_tenant_proto_init() { return nil } } - file_aserto_registry_tenant_v1_tenant_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_registry_tenant_v1_tenant_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ListPublicTenantsResponse); i { case 0: return &v.state diff --git a/aserto/registry_tenant/v1/tenant.pb.gw.go b/aserto/registry_tenant/v1/tenant.pb.gw.go index 83abf87..5a5c2d5 100644 --- a/aserto/registry_tenant/v1/tenant.pb.gw.go +++ b/aserto/registry_tenant/v1/tenant.pb.gw.go @@ -107,6 +107,7 @@ func local_request_Tenant_ListPublicTenants_0(ctx context.Context, marshaler run // UnaryRPC :call TenantServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTenantHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterTenantHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TenantServer) error { mux.Handle("GET", pattern_Tenant_ListTenants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -165,21 +166,21 @@ func RegisterTenantHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser // RegisterTenantHandlerFromEndpoint is same as RegisterTenantHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterTenantHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -197,7 +198,7 @@ func RegisterTenantHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TenantClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TenantClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "TenantClient" to call the correct interceptors. +// "TenantClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterTenantHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TenantClient) error { mux.Handle("GET", pattern_Tenant_ListTenants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/registry_tenant/v1/tenant_grpc.pb.go b/aserto/registry_tenant/v1/tenant_grpc.pb.go index 39c4fa8..6f93a67 100644 --- a/aserto/registry_tenant/v1/tenant_grpc.pb.go +++ b/aserto/registry_tenant/v1/tenant_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/registry_tenant/v1/tenant.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Tenant_ListTenants_FullMethodName = "/aserto.registry_tenant.v1.Tenant/ListTenants" @@ -40,8 +40,9 @@ func NewTenantClient(cc grpc.ClientConnInterface) TenantClient { } func (c *tenantClient) ListTenants(ctx context.Context, in *ListTenantsRequest, opts ...grpc.CallOption) (*ListTenantsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListTenantsResponse) - err := c.cc.Invoke(ctx, Tenant_ListTenants_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Tenant_ListTenants_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -49,8 +50,9 @@ func (c *tenantClient) ListTenants(ctx context.Context, in *ListTenantsRequest, } func (c *tenantClient) ListPublicTenants(ctx context.Context, in *ListPublicTenantsRequest, opts ...grpc.CallOption) (*ListPublicTenantsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListPublicTenantsResponse) - err := c.cc.Invoke(ctx, Tenant_ListPublicTenants_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Tenant_ListPublicTenants_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -59,15 +61,18 @@ func (c *tenantClient) ListPublicTenants(ctx context.Context, in *ListPublicTena // TenantServer is the server API for Tenant service. // All implementations should embed UnimplementedTenantServer -// for forward compatibility +// for forward compatibility. type TenantServer interface { ListTenants(context.Context, *ListTenantsRequest) (*ListTenantsResponse, error) ListPublicTenants(context.Context, *ListPublicTenantsRequest) (*ListPublicTenantsResponse, error) } -// UnimplementedTenantServer should be embedded to have forward compatible implementations. -type UnimplementedTenantServer struct { -} +// UnimplementedTenantServer should 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 UnimplementedTenantServer struct{} func (UnimplementedTenantServer) ListTenants(context.Context, *ListTenantsRequest) (*ListTenantsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListTenants not implemented") @@ -75,6 +80,7 @@ func (UnimplementedTenantServer) ListTenants(context.Context, *ListTenantsReques func (UnimplementedTenantServer) ListPublicTenants(context.Context, *ListPublicTenantsRequest) (*ListPublicTenantsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPublicTenants not implemented") } +func (UnimplementedTenantServer) testEmbeddedByValue() {} // UnsafeTenantServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TenantServer will @@ -84,6 +90,13 @@ type UnsafeTenantServer interface { } func RegisterTenantServer(s grpc.ServiceRegistrar, srv TenantServer) { + // If the following call pancis, it indicates UnimplementedTenantServer 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(&Tenant_ServiceDesc, srv) } diff --git a/aserto/scribe/v2/scribe.pb.go b/aserto/scribe/v2/scribe.pb.go index 956b93a..1681406 100644 --- a/aserto/scribe/v2/scribe.pb.go +++ b/aserto/scribe/v2/scribe.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/scribe/v2/scribe.proto @@ -175,7 +175,7 @@ func file_aserto_scribe_v2_scribe_proto_rawDescGZIP() []byte { } var file_aserto_scribe_v2_scribe_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_aserto_scribe_v2_scribe_proto_goTypes = []interface{}{ +var file_aserto_scribe_v2_scribe_proto_goTypes = []any{ (*WriteBatchRequest)(nil), // 0: aserto.scribe.v2.WriteBatchRequest (*WriteBatchResponse)(nil), // 1: aserto.scribe.v2.WriteBatchResponse (*anypb.Any)(nil), // 2: google.protobuf.Any @@ -197,7 +197,7 @@ func file_aserto_scribe_v2_scribe_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_scribe_v2_scribe_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_scribe_v2_scribe_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*WriteBatchRequest); i { case 0: return &v.state @@ -209,7 +209,7 @@ func file_aserto_scribe_v2_scribe_proto_init() { return nil } } - file_aserto_scribe_v2_scribe_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_scribe_v2_scribe_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*WriteBatchResponse); i { case 0: return &v.state diff --git a/aserto/scribe/v2/scribe.pb.gw.go b/aserto/scribe/v2/scribe.pb.gw.go index f341cb0..db8ce98 100644 --- a/aserto/scribe/v2/scribe.pb.gw.go +++ b/aserto/scribe/v2/scribe.pb.gw.go @@ -35,7 +35,7 @@ func request_Scribe_WriteBatch_0(ctx context.Context, marshaler runtime.Marshale var metadata runtime.ServerMetadata stream, err := client.WriteBatch(ctx) if err != nil { - grpclog.Infof("Failed to start streaming: %v", err) + grpclog.Errorf("Failed to start streaming: %v", err) return nil, metadata, err } dec := marshaler.NewDecoder(req.Body) @@ -46,11 +46,11 @@ func request_Scribe_WriteBatch_0(ctx context.Context, marshaler runtime.Marshale return err } if err != nil { - grpclog.Infof("Failed to decode request: %v", err) + grpclog.Errorf("Failed to decode request: %v", err) return err } if err := stream.Send(&protoReq); err != nil { - grpclog.Infof("Failed to send request: %v", err) + grpclog.Errorf("Failed to send request: %v", err) return err } return nil @@ -62,12 +62,12 @@ func request_Scribe_WriteBatch_0(ctx context.Context, marshaler runtime.Marshale } } if err := stream.CloseSend(); err != nil { - grpclog.Infof("Failed to terminate client stream: %v", err) + grpclog.Errorf("Failed to terminate client stream: %v", err) } }() header, err := stream.Header() if err != nil { - grpclog.Infof("Failed to get header from client: %v", err) + grpclog.Errorf("Failed to get header from client: %v", err) return nil, metadata, err } metadata.HeaderMD = header @@ -78,6 +78,7 @@ func request_Scribe_WriteBatch_0(ctx context.Context, marshaler runtime.Marshale // UnaryRPC :call ScribeServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterScribeHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterScribeHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ScribeServer) error { mux.Handle("POST", pattern_Scribe_WriteBatch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -93,21 +94,21 @@ func RegisterScribeHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser // RegisterScribeHandlerFromEndpoint is same as RegisterScribeHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterScribeHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -125,7 +126,7 @@ func RegisterScribeHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ScribeClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ScribeClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ScribeClient" to call the correct interceptors. +// "ScribeClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterScribeHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ScribeClient) error { mux.Handle("POST", pattern_Scribe_WriteBatch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/scribe/v2/scribe_grpc.pb.go b/aserto/scribe/v2/scribe_grpc.pb.go index 64a95b4..a921d9d 100644 --- a/aserto/scribe/v2/scribe_grpc.pb.go +++ b/aserto/scribe/v2/scribe_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/scribe/v2/scribe.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Scribe_WriteBatch_FullMethodName = "/aserto.scribe.v2.Scribe/WriteBatch" @@ -26,7 +26,7 @@ const ( // // 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 ScribeClient interface { - WriteBatch(ctx context.Context, opts ...grpc.CallOption) (Scribe_WriteBatchClient, error) + WriteBatch(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[WriteBatchRequest, WriteBatchResponse], error) } type scribeClient struct { @@ -37,51 +37,37 @@ func NewScribeClient(cc grpc.ClientConnInterface) ScribeClient { return &scribeClient{cc} } -func (c *scribeClient) WriteBatch(ctx context.Context, opts ...grpc.CallOption) (Scribe_WriteBatchClient, error) { - stream, err := c.cc.NewStream(ctx, &Scribe_ServiceDesc.Streams[0], Scribe_WriteBatch_FullMethodName, opts...) +func (c *scribeClient) WriteBatch(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[WriteBatchRequest, WriteBatchResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Scribe_ServiceDesc.Streams[0], Scribe_WriteBatch_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &scribeWriteBatchClient{stream} + x := &grpc.GenericClientStream[WriteBatchRequest, WriteBatchResponse]{ClientStream: stream} return x, nil } -type Scribe_WriteBatchClient interface { - Send(*WriteBatchRequest) error - Recv() (*WriteBatchResponse, error) - grpc.ClientStream -} - -type scribeWriteBatchClient struct { - grpc.ClientStream -} - -func (x *scribeWriteBatchClient) Send(m *WriteBatchRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *scribeWriteBatchClient) Recv() (*WriteBatchResponse, error) { - m := new(WriteBatchResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Scribe_WriteBatchClient = grpc.BidiStreamingClient[WriteBatchRequest, WriteBatchResponse] // ScribeServer is the server API for Scribe service. // All implementations should embed UnimplementedScribeServer -// for forward compatibility +// for forward compatibility. type ScribeServer interface { - WriteBatch(Scribe_WriteBatchServer) error + WriteBatch(grpc.BidiStreamingServer[WriteBatchRequest, WriteBatchResponse]) error } -// UnimplementedScribeServer should be embedded to have forward compatible implementations. -type UnimplementedScribeServer struct { -} +// UnimplementedScribeServer should 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 UnimplementedScribeServer struct{} -func (UnimplementedScribeServer) WriteBatch(Scribe_WriteBatchServer) error { +func (UnimplementedScribeServer) WriteBatch(grpc.BidiStreamingServer[WriteBatchRequest, WriteBatchResponse]) error { return status.Errorf(codes.Unimplemented, "method WriteBatch not implemented") } +func (UnimplementedScribeServer) testEmbeddedByValue() {} // UnsafeScribeServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ScribeServer will @@ -91,34 +77,22 @@ type UnsafeScribeServer interface { } func RegisterScribeServer(s grpc.ServiceRegistrar, srv ScribeServer) { + // If the following call pancis, it indicates UnimplementedScribeServer 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(&Scribe_ServiceDesc, srv) } func _Scribe_WriteBatch_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ScribeServer).WriteBatch(&scribeWriteBatchServer{stream}) -} - -type Scribe_WriteBatchServer interface { - Send(*WriteBatchResponse) error - Recv() (*WriteBatchRequest, error) - grpc.ServerStream -} - -type scribeWriteBatchServer struct { - grpc.ServerStream + return srv.(ScribeServer).WriteBatch(&grpc.GenericServerStream[WriteBatchRequest, WriteBatchResponse]{ServerStream: stream}) } -func (x *scribeWriteBatchServer) Send(m *WriteBatchResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *scribeWriteBatchServer) Recv() (*WriteBatchRequest, error) { - m := new(WriteBatchRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Scribe_WriteBatchServer = grpc.BidiStreamingServer[WriteBatchRequest, WriteBatchResponse] // Scribe_ServiceDesc is the grpc.ServiceDesc for Scribe service. // It's only intended for direct use with grpc.RegisterService, diff --git a/aserto/tenant/account/v1/account.pb.go b/aserto/tenant/account/v1/account.pb.go index 1503194..6cead1f 100644 --- a/aserto/tenant/account/v1/account.pb.go +++ b/aserto/tenant/account/v1/account.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/tenant/account/v1/account.proto @@ -570,7 +570,7 @@ func file_aserto_tenant_account_v1_account_proto_rawDescGZIP() []byte { } var file_aserto_tenant_account_v1_account_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_aserto_tenant_account_v1_account_proto_goTypes = []interface{}{ +var file_aserto_tenant_account_v1_account_proto_goTypes = []any{ (*SignupAccountRequest)(nil), // 0: aserto.tenant.account.v1.SignupAccountRequest (*SignupAccountResponse)(nil), // 1: aserto.tenant.account.v1.SignupAccountResponse (*GetAccountRequest)(nil), // 2: aserto.tenant.account.v1.GetAccountRequest @@ -611,7 +611,7 @@ func file_aserto_tenant_account_v1_account_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_tenant_account_v1_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_account_v1_account_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*SignupAccountRequest); i { case 0: return &v.state @@ -623,7 +623,7 @@ func file_aserto_tenant_account_v1_account_proto_init() { return nil } } - file_aserto_tenant_account_v1_account_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_account_v1_account_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*SignupAccountResponse); i { case 0: return &v.state @@ -635,7 +635,7 @@ func file_aserto_tenant_account_v1_account_proto_init() { return nil } } - file_aserto_tenant_account_v1_account_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_account_v1_account_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*GetAccountRequest); i { case 0: return &v.state @@ -647,7 +647,7 @@ func file_aserto_tenant_account_v1_account_proto_init() { return nil } } - file_aserto_tenant_account_v1_account_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_account_v1_account_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*GetAccountResponse); i { case 0: return &v.state @@ -659,7 +659,7 @@ func file_aserto_tenant_account_v1_account_proto_init() { return nil } } - file_aserto_tenant_account_v1_account_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_account_v1_account_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ListInvitesRequest); i { case 0: return &v.state @@ -671,7 +671,7 @@ func file_aserto_tenant_account_v1_account_proto_init() { return nil } } - file_aserto_tenant_account_v1_account_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_account_v1_account_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*TenantInvite); i { case 0: return &v.state @@ -683,7 +683,7 @@ func file_aserto_tenant_account_v1_account_proto_init() { return nil } } - file_aserto_tenant_account_v1_account_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_account_v1_account_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*ListInvitesResponse); i { case 0: return &v.state @@ -695,7 +695,7 @@ func file_aserto_tenant_account_v1_account_proto_init() { return nil } } - file_aserto_tenant_account_v1_account_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_account_v1_account_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*UpdateAccountRequest); i { case 0: return &v.state @@ -707,7 +707,7 @@ func file_aserto_tenant_account_v1_account_proto_init() { return nil } } - file_aserto_tenant_account_v1_account_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_account_v1_account_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*UpdateAccountResponse); i { case 0: return &v.state diff --git a/aserto/tenant/account/v1/account.pb.gw.go b/aserto/tenant/account/v1/account.pb.gw.go index cf0b004..f54a147 100644 --- a/aserto/tenant/account/v1/account.pb.gw.go +++ b/aserto/tenant/account/v1/account.pb.gw.go @@ -123,6 +123,7 @@ func local_request_Account_SignupAccount_0(ctx context.Context, marshaler runtim // UnaryRPC :call AccountServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAccountHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAccountHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccountServer) error { mux.Handle("GET", pattern_Account_GetAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -231,21 +232,21 @@ func RegisterAccountHandlerServer(ctx context.Context, mux *runtime.ServeMux, se // RegisterAccountHandlerFromEndpoint is same as RegisterAccountHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterAccountHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -263,7 +264,7 @@ func RegisterAccountHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AccountClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AccountClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AccountClient" to call the correct interceptors. +// "AccountClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAccountHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccountClient) error { mux.Handle("GET", pattern_Account_GetAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/tenant/account/v1/account_grpc.pb.go b/aserto/tenant/account/v1/account_grpc.pb.go index b9d2e39..d09214a 100644 --- a/aserto/tenant/account/v1/account_grpc.pb.go +++ b/aserto/tenant/account/v1/account_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/tenant/account/v1/account.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Account_GetAccount_FullMethodName = "/aserto.tenant.account.v1.Account/GetAccount" @@ -44,8 +44,9 @@ func NewAccountClient(cc grpc.ClientConnInterface) AccountClient { } func (c *accountClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetAccountResponse) - err := c.cc.Invoke(ctx, Account_GetAccount_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Account_GetAccount_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -53,8 +54,9 @@ func (c *accountClient) GetAccount(ctx context.Context, in *GetAccountRequest, o } func (c *accountClient) ListInvites(ctx context.Context, in *ListInvitesRequest, opts ...grpc.CallOption) (*ListInvitesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListInvitesResponse) - err := c.cc.Invoke(ctx, Account_ListInvites_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Account_ListInvites_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -62,8 +64,9 @@ func (c *accountClient) ListInvites(ctx context.Context, in *ListInvitesRequest, } func (c *accountClient) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateAccountResponse) - err := c.cc.Invoke(ctx, Account_UpdateAccount_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Account_UpdateAccount_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -71,8 +74,9 @@ func (c *accountClient) UpdateAccount(ctx context.Context, in *UpdateAccountRequ } func (c *accountClient) SignupAccount(ctx context.Context, in *SignupAccountRequest, opts ...grpc.CallOption) (*SignupAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SignupAccountResponse) - err := c.cc.Invoke(ctx, Account_SignupAccount_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Account_SignupAccount_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -81,7 +85,7 @@ func (c *accountClient) SignupAccount(ctx context.Context, in *SignupAccountRequ // AccountServer is the server API for Account service. // All implementations should embed UnimplementedAccountServer -// for forward compatibility +// for forward compatibility. type AccountServer interface { GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) ListInvites(context.Context, *ListInvitesRequest) (*ListInvitesResponse, error) @@ -89,9 +93,12 @@ type AccountServer interface { SignupAccount(context.Context, *SignupAccountRequest) (*SignupAccountResponse, error) } -// UnimplementedAccountServer should be embedded to have forward compatible implementations. -type UnimplementedAccountServer struct { -} +// UnimplementedAccountServer should 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 UnimplementedAccountServer struct{} func (UnimplementedAccountServer) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") @@ -105,6 +112,7 @@ func (UnimplementedAccountServer) UpdateAccount(context.Context, *UpdateAccountR func (UnimplementedAccountServer) SignupAccount(context.Context, *SignupAccountRequest) (*SignupAccountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SignupAccount not implemented") } +func (UnimplementedAccountServer) testEmbeddedByValue() {} // UnsafeAccountServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AccountServer will @@ -114,6 +122,13 @@ type UnsafeAccountServer interface { } func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer) { + // If the following call pancis, it indicates UnimplementedAccountServer 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(&Account_ServiceDesc, srv) } diff --git a/aserto/tenant/connection/v1/connection.pb.go b/aserto/tenant/connection/v1/connection.pb.go index df10d64..3d1a7ce 100644 --- a/aserto/tenant/connection/v1/connection.pb.go +++ b/aserto/tenant/connection/v1/connection.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/tenant/connection/v1/connection.proto @@ -1089,7 +1089,7 @@ func file_aserto_tenant_connection_v1_connection_proto_rawDescGZIP() []byte { } var file_aserto_tenant_connection_v1_connection_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_aserto_tenant_connection_v1_connection_proto_goTypes = []interface{}{ +var file_aserto_tenant_connection_v1_connection_proto_goTypes = []any{ (*ListConnectionsRequest)(nil), // 0: aserto.tenant.connection.v1.ListConnectionsRequest (*ListConnectionsResponse)(nil), // 1: aserto.tenant.connection.v1.ListConnectionsResponse (*GetConnectionRequest)(nil), // 2: aserto.tenant.connection.v1.GetConnectionRequest @@ -1151,7 +1151,7 @@ func file_aserto_tenant_connection_v1_connection_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_tenant_connection_v1_connection_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_connection_v1_connection_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ListConnectionsRequest); i { case 0: return &v.state @@ -1163,7 +1163,7 @@ func file_aserto_tenant_connection_v1_connection_proto_init() { return nil } } - file_aserto_tenant_connection_v1_connection_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_connection_v1_connection_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ListConnectionsResponse); i { case 0: return &v.state @@ -1175,7 +1175,7 @@ func file_aserto_tenant_connection_v1_connection_proto_init() { return nil } } - file_aserto_tenant_connection_v1_connection_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_connection_v1_connection_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*GetConnectionRequest); i { case 0: return &v.state @@ -1187,7 +1187,7 @@ func file_aserto_tenant_connection_v1_connection_proto_init() { return nil } } - file_aserto_tenant_connection_v1_connection_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_connection_v1_connection_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*GetConnectionResponse); i { case 0: return &v.state @@ -1199,7 +1199,7 @@ func file_aserto_tenant_connection_v1_connection_proto_init() { return nil } } - file_aserto_tenant_connection_v1_connection_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_connection_v1_connection_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*CreateConnectionRequest); i { case 0: return &v.state @@ -1211,7 +1211,7 @@ func file_aserto_tenant_connection_v1_connection_proto_init() { return nil } } - file_aserto_tenant_connection_v1_connection_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_connection_v1_connection_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*CreateConnectionResponse); i { case 0: return &v.state @@ -1223,7 +1223,7 @@ func file_aserto_tenant_connection_v1_connection_proto_init() { return nil } } - file_aserto_tenant_connection_v1_connection_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_connection_v1_connection_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*UpdateConnectionRequest); i { case 0: return &v.state @@ -1235,7 +1235,7 @@ func file_aserto_tenant_connection_v1_connection_proto_init() { return nil } } - file_aserto_tenant_connection_v1_connection_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_connection_v1_connection_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*UpdateConnectionResponse); i { case 0: return &v.state @@ -1247,7 +1247,7 @@ func file_aserto_tenant_connection_v1_connection_proto_init() { return nil } } - file_aserto_tenant_connection_v1_connection_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_connection_v1_connection_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*DeleteConnectionRequest); i { case 0: return &v.state @@ -1259,7 +1259,7 @@ func file_aserto_tenant_connection_v1_connection_proto_init() { return nil } } - file_aserto_tenant_connection_v1_connection_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_connection_v1_connection_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*DeleteConnectionResponse); i { case 0: return &v.state @@ -1271,7 +1271,7 @@ func file_aserto_tenant_connection_v1_connection_proto_init() { return nil } } - file_aserto_tenant_connection_v1_connection_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_connection_v1_connection_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*VerifyConnectionRequest); i { case 0: return &v.state @@ -1283,7 +1283,7 @@ func file_aserto_tenant_connection_v1_connection_proto_init() { return nil } } - file_aserto_tenant_connection_v1_connection_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_connection_v1_connection_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*VerifyConnectionResponse); i { case 0: return &v.state @@ -1295,7 +1295,7 @@ func file_aserto_tenant_connection_v1_connection_proto_init() { return nil } } - file_aserto_tenant_connection_v1_connection_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_connection_v1_connection_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*RotateSecretRequest); i { case 0: return &v.state @@ -1307,7 +1307,7 @@ func file_aserto_tenant_connection_v1_connection_proto_init() { return nil } } - file_aserto_tenant_connection_v1_connection_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_connection_v1_connection_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*RotateSecretResponse); i { case 0: return &v.state @@ -1319,7 +1319,7 @@ func file_aserto_tenant_connection_v1_connection_proto_init() { return nil } } - file_aserto_tenant_connection_v1_connection_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_connection_v1_connection_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*ConnectionAvailableRequest); i { case 0: return &v.state @@ -1331,7 +1331,7 @@ func file_aserto_tenant_connection_v1_connection_proto_init() { return nil } } - file_aserto_tenant_connection_v1_connection_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_connection_v1_connection_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*ConnectionAvailableResponse); i { case 0: return &v.state diff --git a/aserto/tenant/connection/v1/connection.pb.gw.go b/aserto/tenant/connection/v1/connection.pb.gw.go index 1e97326..fafc89c 100644 --- a/aserto/tenant/connection/v1/connection.pb.gw.go +++ b/aserto/tenant/connection/v1/connection.pb.gw.go @@ -455,6 +455,7 @@ func local_request_Connection_ConnectionAvailable_0(ctx context.Context, marshal // UnaryRPC :call ConnectionServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterConnectionHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterConnectionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConnectionServer) error { mux.Handle("GET", pattern_Connection_ListConnections_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -663,21 +664,21 @@ func RegisterConnectionHandlerServer(ctx context.Context, mux *runtime.ServeMux, // RegisterConnectionHandlerFromEndpoint is same as RegisterConnectionHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterConnectionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -695,7 +696,7 @@ func RegisterConnectionHandler(ctx context.Context, mux *runtime.ServeMux, conn // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ConnectionClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ConnectionClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ConnectionClient" to call the correct interceptors. +// "ConnectionClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterConnectionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConnectionClient) error { mux.Handle("GET", pattern_Connection_ListConnections_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/tenant/connection/v1/connection_grpc.pb.go b/aserto/tenant/connection/v1/connection_grpc.pb.go index 2ed8fa2..51cfe67 100644 --- a/aserto/tenant/connection/v1/connection_grpc.pb.go +++ b/aserto/tenant/connection/v1/connection_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/tenant/connection/v1/connection.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Connection_ListConnections_FullMethodName = "/aserto.tenant.connection.v1.Connection/ListConnections" @@ -52,8 +52,9 @@ func NewConnectionClient(cc grpc.ClientConnInterface) ConnectionClient { } func (c *connectionClient) ListConnections(ctx context.Context, in *ListConnectionsRequest, opts ...grpc.CallOption) (*ListConnectionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListConnectionsResponse) - err := c.cc.Invoke(ctx, Connection_ListConnections_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Connection_ListConnections_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -61,8 +62,9 @@ func (c *connectionClient) ListConnections(ctx context.Context, in *ListConnecti } func (c *connectionClient) GetConnection(ctx context.Context, in *GetConnectionRequest, opts ...grpc.CallOption) (*GetConnectionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetConnectionResponse) - err := c.cc.Invoke(ctx, Connection_GetConnection_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Connection_GetConnection_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -70,8 +72,9 @@ func (c *connectionClient) GetConnection(ctx context.Context, in *GetConnectionR } func (c *connectionClient) CreateConnection(ctx context.Context, in *CreateConnectionRequest, opts ...grpc.CallOption) (*CreateConnectionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateConnectionResponse) - err := c.cc.Invoke(ctx, Connection_CreateConnection_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Connection_CreateConnection_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -79,8 +82,9 @@ func (c *connectionClient) CreateConnection(ctx context.Context, in *CreateConne } func (c *connectionClient) UpdateConnection(ctx context.Context, in *UpdateConnectionRequest, opts ...grpc.CallOption) (*UpdateConnectionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateConnectionResponse) - err := c.cc.Invoke(ctx, Connection_UpdateConnection_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Connection_UpdateConnection_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -88,8 +92,9 @@ func (c *connectionClient) UpdateConnection(ctx context.Context, in *UpdateConne } func (c *connectionClient) DeleteConnection(ctx context.Context, in *DeleteConnectionRequest, opts ...grpc.CallOption) (*DeleteConnectionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteConnectionResponse) - err := c.cc.Invoke(ctx, Connection_DeleteConnection_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Connection_DeleteConnection_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -97,8 +102,9 @@ func (c *connectionClient) DeleteConnection(ctx context.Context, in *DeleteConne } func (c *connectionClient) VerifyConnection(ctx context.Context, in *VerifyConnectionRequest, opts ...grpc.CallOption) (*VerifyConnectionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(VerifyConnectionResponse) - err := c.cc.Invoke(ctx, Connection_VerifyConnection_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Connection_VerifyConnection_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -106,8 +112,9 @@ func (c *connectionClient) VerifyConnection(ctx context.Context, in *VerifyConne } func (c *connectionClient) RotateSecret(ctx context.Context, in *RotateSecretRequest, opts ...grpc.CallOption) (*RotateSecretResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RotateSecretResponse) - err := c.cc.Invoke(ctx, Connection_RotateSecret_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Connection_RotateSecret_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -115,8 +122,9 @@ func (c *connectionClient) RotateSecret(ctx context.Context, in *RotateSecretReq } func (c *connectionClient) ConnectionAvailable(ctx context.Context, in *ConnectionAvailableRequest, opts ...grpc.CallOption) (*ConnectionAvailableResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ConnectionAvailableResponse) - err := c.cc.Invoke(ctx, Connection_ConnectionAvailable_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Connection_ConnectionAvailable_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -125,7 +133,7 @@ func (c *connectionClient) ConnectionAvailable(ctx context.Context, in *Connecti // ConnectionServer is the server API for Connection service. // All implementations should embed UnimplementedConnectionServer -// for forward compatibility +// for forward compatibility. type ConnectionServer interface { ListConnections(context.Context, *ListConnectionsRequest) (*ListConnectionsResponse, error) GetConnection(context.Context, *GetConnectionRequest) (*GetConnectionResponse, error) @@ -137,9 +145,12 @@ type ConnectionServer interface { ConnectionAvailable(context.Context, *ConnectionAvailableRequest) (*ConnectionAvailableResponse, error) } -// UnimplementedConnectionServer should be embedded to have forward compatible implementations. -type UnimplementedConnectionServer struct { -} +// UnimplementedConnectionServer should 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 UnimplementedConnectionServer struct{} func (UnimplementedConnectionServer) ListConnections(context.Context, *ListConnectionsRequest) (*ListConnectionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListConnections not implemented") @@ -165,6 +176,7 @@ func (UnimplementedConnectionServer) RotateSecret(context.Context, *RotateSecret func (UnimplementedConnectionServer) ConnectionAvailable(context.Context, *ConnectionAvailableRequest) (*ConnectionAvailableResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ConnectionAvailable not implemented") } +func (UnimplementedConnectionServer) testEmbeddedByValue() {} // UnsafeConnectionServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ConnectionServer will @@ -174,6 +186,13 @@ type UnsafeConnectionServer interface { } func RegisterConnectionServer(s grpc.ServiceRegistrar, srv ConnectionServer) { + // If the following call pancis, it indicates UnimplementedConnectionServer 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(&Connection_ServiceDesc, srv) } diff --git a/aserto/tenant/onboarding/v1/onboarding.pb.go b/aserto/tenant/onboarding/v1/onboarding.pb.go index 7c18412..7e2d6b3 100644 --- a/aserto/tenant/onboarding/v1/onboarding.pb.go +++ b/aserto/tenant/onboarding/v1/onboarding.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/tenant/onboarding/v1/onboarding.proto @@ -515,7 +515,7 @@ func file_aserto_tenant_onboarding_v1_onboarding_proto_rawDescGZIP() []byte { var file_aserto_tenant_onboarding_v1_onboarding_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_aserto_tenant_onboarding_v1_onboarding_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_aserto_tenant_onboarding_v1_onboarding_proto_goTypes = []interface{}{ +var file_aserto_tenant_onboarding_v1_onboarding_proto_goTypes = []any{ (TenantAvailability)(0), // 0: aserto.tenant.onboarding.v1.TenantAvailability (*ClaimTenantRequest)(nil), // 1: aserto.tenant.onboarding.v1.ClaimTenantRequest (*ClaimTenantResponse)(nil), // 2: aserto.tenant.onboarding.v1.ClaimTenantResponse @@ -545,7 +545,7 @@ func file_aserto_tenant_onboarding_v1_onboarding_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_tenant_onboarding_v1_onboarding_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_onboarding_v1_onboarding_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ClaimTenantRequest); i { case 0: return &v.state @@ -557,7 +557,7 @@ func file_aserto_tenant_onboarding_v1_onboarding_proto_init() { return nil } } - file_aserto_tenant_onboarding_v1_onboarding_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_onboarding_v1_onboarding_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ClaimTenantResponse); i { case 0: return &v.state @@ -569,7 +569,7 @@ func file_aserto_tenant_onboarding_v1_onboarding_proto_init() { return nil } } - file_aserto_tenant_onboarding_v1_onboarding_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_onboarding_v1_onboarding_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*TenantAvailableRequest); i { case 0: return &v.state @@ -581,7 +581,7 @@ func file_aserto_tenant_onboarding_v1_onboarding_proto_init() { return nil } } - file_aserto_tenant_onboarding_v1_onboarding_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_onboarding_v1_onboarding_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*TenantAvailableResponse); i { case 0: return &v.state @@ -593,7 +593,7 @@ func file_aserto_tenant_onboarding_v1_onboarding_proto_init() { return nil } } - file_aserto_tenant_onboarding_v1_onboarding_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_onboarding_v1_onboarding_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*InviteUserRequest); i { case 0: return &v.state @@ -605,7 +605,7 @@ func file_aserto_tenant_onboarding_v1_onboarding_proto_init() { return nil } } - file_aserto_tenant_onboarding_v1_onboarding_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_onboarding_v1_onboarding_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*InviteUserResponse); i { case 0: return &v.state diff --git a/aserto/tenant/onboarding/v1/onboarding.pb.gw.go b/aserto/tenant/onboarding/v1/onboarding.pb.gw.go index de6e953..fde83e0 100644 --- a/aserto/tenant/onboarding/v1/onboarding.pb.gw.go +++ b/aserto/tenant/onboarding/v1/onboarding.pb.gw.go @@ -139,6 +139,7 @@ func local_request_Onboarding_InviteUser_0(ctx context.Context, marshaler runtim // UnaryRPC :call OnboardingServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterOnboardingHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterOnboardingHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OnboardingServer) error { mux.Handle("POST", pattern_Onboarding_ClaimTenant_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -222,21 +223,21 @@ func RegisterOnboardingHandlerServer(ctx context.Context, mux *runtime.ServeMux, // RegisterOnboardingHandlerFromEndpoint is same as RegisterOnboardingHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterOnboardingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -254,7 +255,7 @@ func RegisterOnboardingHandler(ctx context.Context, mux *runtime.ServeMux, conn // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "OnboardingClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "OnboardingClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "OnboardingClient" to call the correct interceptors. +// "OnboardingClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterOnboardingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OnboardingClient) error { mux.Handle("POST", pattern_Onboarding_ClaimTenant_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/tenant/onboarding/v1/onboarding_grpc.pb.go b/aserto/tenant/onboarding/v1/onboarding_grpc.pb.go index 8eec520..cb22aa8 100644 --- a/aserto/tenant/onboarding/v1/onboarding_grpc.pb.go +++ b/aserto/tenant/onboarding/v1/onboarding_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/tenant/onboarding/v1/onboarding.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Onboarding_ClaimTenant_FullMethodName = "/aserto.tenant.onboarding.v1.Onboarding/ClaimTenant" @@ -42,8 +42,9 @@ func NewOnboardingClient(cc grpc.ClientConnInterface) OnboardingClient { } func (c *onboardingClient) ClaimTenant(ctx context.Context, in *ClaimTenantRequest, opts ...grpc.CallOption) (*ClaimTenantResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ClaimTenantResponse) - err := c.cc.Invoke(ctx, Onboarding_ClaimTenant_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Onboarding_ClaimTenant_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -51,8 +52,9 @@ func (c *onboardingClient) ClaimTenant(ctx context.Context, in *ClaimTenantReque } func (c *onboardingClient) TenantAvailable(ctx context.Context, in *TenantAvailableRequest, opts ...grpc.CallOption) (*TenantAvailableResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(TenantAvailableResponse) - err := c.cc.Invoke(ctx, Onboarding_TenantAvailable_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Onboarding_TenantAvailable_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -60,8 +62,9 @@ func (c *onboardingClient) TenantAvailable(ctx context.Context, in *TenantAvaila } func (c *onboardingClient) InviteUser(ctx context.Context, in *InviteUserRequest, opts ...grpc.CallOption) (*InviteUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(InviteUserResponse) - err := c.cc.Invoke(ctx, Onboarding_InviteUser_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Onboarding_InviteUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -70,16 +73,19 @@ func (c *onboardingClient) InviteUser(ctx context.Context, in *InviteUserRequest // OnboardingServer is the server API for Onboarding service. // All implementations should embed UnimplementedOnboardingServer -// for forward compatibility +// for forward compatibility. type OnboardingServer interface { ClaimTenant(context.Context, *ClaimTenantRequest) (*ClaimTenantResponse, error) TenantAvailable(context.Context, *TenantAvailableRequest) (*TenantAvailableResponse, error) InviteUser(context.Context, *InviteUserRequest) (*InviteUserResponse, error) } -// UnimplementedOnboardingServer should be embedded to have forward compatible implementations. -type UnimplementedOnboardingServer struct { -} +// UnimplementedOnboardingServer should 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 UnimplementedOnboardingServer struct{} func (UnimplementedOnboardingServer) ClaimTenant(context.Context, *ClaimTenantRequest) (*ClaimTenantResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClaimTenant not implemented") @@ -90,6 +96,7 @@ func (UnimplementedOnboardingServer) TenantAvailable(context.Context, *TenantAva func (UnimplementedOnboardingServer) InviteUser(context.Context, *InviteUserRequest) (*InviteUserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InviteUser not implemented") } +func (UnimplementedOnboardingServer) testEmbeddedByValue() {} // UnsafeOnboardingServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to OnboardingServer will @@ -99,6 +106,13 @@ type UnsafeOnboardingServer interface { } func RegisterOnboardingServer(s grpc.ServiceRegistrar, srv OnboardingServer) { + // If the following call pancis, it indicates UnimplementedOnboardingServer 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(&Onboarding_ServiceDesc, srv) } diff --git a/aserto/tenant/policy/v1/policy.pb.go b/aserto/tenant/policy/v1/policy.pb.go index 648d21e..02709b6 100644 --- a/aserto/tenant/policy/v1/policy.pb.go +++ b/aserto/tenant/policy/v1/policy.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/tenant/policy/v1/policy.proto @@ -896,7 +896,7 @@ func file_aserto_tenant_policy_v1_policy_proto_rawDescGZIP() []byte { } var file_aserto_tenant_policy_v1_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_aserto_tenant_policy_v1_policy_proto_goTypes = []interface{}{ +var file_aserto_tenant_policy_v1_policy_proto_goTypes = []any{ (*CreatePolicyRefRequest)(nil), // 0: aserto.tenant.policy.v1.CreatePolicyRefRequest (*CreatePolicyRefResponse)(nil), // 1: aserto.tenant.policy.v1.CreatePolicyRefResponse (*ListPolicyRefsRequest)(nil), // 2: aserto.tenant.policy.v1.ListPolicyRefsRequest @@ -950,7 +950,7 @@ func file_aserto_tenant_policy_v1_policy_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_tenant_policy_v1_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_v1_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*CreatePolicyRefRequest); i { case 0: return &v.state @@ -962,7 +962,7 @@ func file_aserto_tenant_policy_v1_policy_proto_init() { return nil } } - file_aserto_tenant_policy_v1_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_v1_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CreatePolicyRefResponse); i { case 0: return &v.state @@ -974,7 +974,7 @@ func file_aserto_tenant_policy_v1_policy_proto_init() { return nil } } - file_aserto_tenant_policy_v1_policy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_v1_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ListPolicyRefsRequest); i { case 0: return &v.state @@ -986,7 +986,7 @@ func file_aserto_tenant_policy_v1_policy_proto_init() { return nil } } - file_aserto_tenant_policy_v1_policy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_v1_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ListPolicyRefsResponse); i { case 0: return &v.state @@ -998,7 +998,7 @@ func file_aserto_tenant_policy_v1_policy_proto_init() { return nil } } - file_aserto_tenant_policy_v1_policy_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_v1_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*DeletePolicyRefRequest); i { case 0: return &v.state @@ -1010,7 +1010,7 @@ func file_aserto_tenant_policy_v1_policy_proto_init() { return nil } } - file_aserto_tenant_policy_v1_policy_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_v1_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*DeletePolicyRefResponse); i { case 0: return &v.state @@ -1022,7 +1022,7 @@ func file_aserto_tenant_policy_v1_policy_proto_init() { return nil } } - file_aserto_tenant_policy_v1_policy_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_v1_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*UpdatePolicyRefRequest); i { case 0: return &v.state @@ -1034,7 +1034,7 @@ func file_aserto_tenant_policy_v1_policy_proto_init() { return nil } } - file_aserto_tenant_policy_v1_policy_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_v1_policy_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*UpdatePolicyRefResponse); i { case 0: return &v.state @@ -1046,7 +1046,7 @@ func file_aserto_tenant_policy_v1_policy_proto_init() { return nil } } - file_aserto_tenant_policy_v1_policy_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_v1_policy_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*OPADiscoveryRequest); i { case 0: return &v.state @@ -1058,7 +1058,7 @@ func file_aserto_tenant_policy_v1_policy_proto_init() { return nil } } - file_aserto_tenant_policy_v1_policy_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_v1_policy_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*OPAConfig); i { case 0: return &v.state @@ -1070,7 +1070,7 @@ func file_aserto_tenant_policy_v1_policy_proto_init() { return nil } } - file_aserto_tenant_policy_v1_policy_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_v1_policy_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*OPADiscoveryResponse); i { case 0: return &v.state @@ -1082,7 +1082,7 @@ func file_aserto_tenant_policy_v1_policy_proto_init() { return nil } } - file_aserto_tenant_policy_v1_policy_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_v1_policy_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*OPAInstanceDiscoveryRequest); i { case 0: return &v.state @@ -1094,7 +1094,7 @@ func file_aserto_tenant_policy_v1_policy_proto_init() { return nil } } - file_aserto_tenant_policy_v1_policy_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_v1_policy_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*OPAInstanceDiscoveryResponse); i { case 0: return &v.state diff --git a/aserto/tenant/policy/v1/policy.pb.gw.go b/aserto/tenant/policy/v1/policy.pb.gw.go index 80cec2a..459db33 100644 --- a/aserto/tenant/policy/v1/policy.pb.gw.go +++ b/aserto/tenant/policy/v1/policy.pb.gw.go @@ -369,6 +369,7 @@ func local_request_Policy_OPAInstanceDiscovery_0(ctx context.Context, marshaler // UnaryRPC :call PolicyServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPolicyHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterPolicyHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PolicyServer) error { mux.Handle("GET", pattern_Policy_ListPolicyRefs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -527,21 +528,21 @@ func RegisterPolicyHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser // RegisterPolicyHandlerFromEndpoint is same as RegisterPolicyHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterPolicyHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -559,7 +560,7 @@ func RegisterPolicyHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PolicyClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PolicyClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PolicyClient" to call the correct interceptors. +// "PolicyClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterPolicyHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PolicyClient) error { mux.Handle("GET", pattern_Policy_ListPolicyRefs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/tenant/policy/v1/policy_grpc.pb.go b/aserto/tenant/policy/v1/policy_grpc.pb.go index a607911..a99f114 100644 --- a/aserto/tenant/policy/v1/policy_grpc.pb.go +++ b/aserto/tenant/policy/v1/policy_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/tenant/policy/v1/policy.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Policy_ListPolicyRefs_FullMethodName = "/aserto.tenant.policy.v1.Policy/ListPolicyRefs" @@ -48,8 +48,9 @@ func NewPolicyClient(cc grpc.ClientConnInterface) PolicyClient { } func (c *policyClient) ListPolicyRefs(ctx context.Context, in *ListPolicyRefsRequest, opts ...grpc.CallOption) (*ListPolicyRefsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListPolicyRefsResponse) - err := c.cc.Invoke(ctx, Policy_ListPolicyRefs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_ListPolicyRefs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -57,8 +58,9 @@ func (c *policyClient) ListPolicyRefs(ctx context.Context, in *ListPolicyRefsReq } func (c *policyClient) CreatePolicyRef(ctx context.Context, in *CreatePolicyRefRequest, opts ...grpc.CallOption) (*CreatePolicyRefResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreatePolicyRefResponse) - err := c.cc.Invoke(ctx, Policy_CreatePolicyRef_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_CreatePolicyRef_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -66,8 +68,9 @@ func (c *policyClient) CreatePolicyRef(ctx context.Context, in *CreatePolicyRefR } func (c *policyClient) DeletePolicyRef(ctx context.Context, in *DeletePolicyRefRequest, opts ...grpc.CallOption) (*DeletePolicyRefResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeletePolicyRefResponse) - err := c.cc.Invoke(ctx, Policy_DeletePolicyRef_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_DeletePolicyRef_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -75,8 +78,9 @@ func (c *policyClient) DeletePolicyRef(ctx context.Context, in *DeletePolicyRefR } func (c *policyClient) UpdatePolicyRef(ctx context.Context, in *UpdatePolicyRefRequest, opts ...grpc.CallOption) (*UpdatePolicyRefResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdatePolicyRefResponse) - err := c.cc.Invoke(ctx, Policy_UpdatePolicyRef_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_UpdatePolicyRef_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -84,8 +88,9 @@ func (c *policyClient) UpdatePolicyRef(ctx context.Context, in *UpdatePolicyRefR } func (c *policyClient) OPADiscovery(ctx context.Context, in *OPADiscoveryRequest, opts ...grpc.CallOption) (*OPADiscoveryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(OPADiscoveryResponse) - err := c.cc.Invoke(ctx, Policy_OPADiscovery_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_OPADiscovery_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -93,8 +98,9 @@ func (c *policyClient) OPADiscovery(ctx context.Context, in *OPADiscoveryRequest } func (c *policyClient) OPAInstanceDiscovery(ctx context.Context, in *OPAInstanceDiscoveryRequest, opts ...grpc.CallOption) (*OPAInstanceDiscoveryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(OPAInstanceDiscoveryResponse) - err := c.cc.Invoke(ctx, Policy_OPAInstanceDiscovery_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_OPAInstanceDiscovery_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -103,7 +109,7 @@ func (c *policyClient) OPAInstanceDiscovery(ctx context.Context, in *OPAInstance // PolicyServer is the server API for Policy service. // All implementations should embed UnimplementedPolicyServer -// for forward compatibility +// for forward compatibility. type PolicyServer interface { ListPolicyRefs(context.Context, *ListPolicyRefsRequest) (*ListPolicyRefsResponse, error) CreatePolicyRef(context.Context, *CreatePolicyRefRequest) (*CreatePolicyRefResponse, error) @@ -113,9 +119,12 @@ type PolicyServer interface { OPAInstanceDiscovery(context.Context, *OPAInstanceDiscoveryRequest) (*OPAInstanceDiscoveryResponse, error) } -// UnimplementedPolicyServer should be embedded to have forward compatible implementations. -type UnimplementedPolicyServer struct { -} +// UnimplementedPolicyServer should 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 UnimplementedPolicyServer struct{} func (UnimplementedPolicyServer) ListPolicyRefs(context.Context, *ListPolicyRefsRequest) (*ListPolicyRefsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPolicyRefs not implemented") @@ -135,6 +144,7 @@ func (UnimplementedPolicyServer) OPADiscovery(context.Context, *OPADiscoveryRequ func (UnimplementedPolicyServer) OPAInstanceDiscovery(context.Context, *OPAInstanceDiscoveryRequest) (*OPAInstanceDiscoveryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method OPAInstanceDiscovery not implemented") } +func (UnimplementedPolicyServer) testEmbeddedByValue() {} // UnsafePolicyServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PolicyServer will @@ -144,6 +154,13 @@ type UnsafePolicyServer interface { } func RegisterPolicyServer(s grpc.ServiceRegistrar, srv PolicyServer) { + // If the following call pancis, it indicates UnimplementedPolicyServer 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(&Policy_ServiceDesc, srv) } diff --git a/aserto/tenant/policy_builder/v1/policy_builder.pb.go b/aserto/tenant/policy_builder/v1/policy_builder.pb.go index 3f1b500..7d64202 100644 --- a/aserto/tenant/policy_builder/v1/policy_builder.pb.go +++ b/aserto/tenant/policy_builder/v1/policy_builder.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/tenant/policy_builder/v1/policy_builder.proto @@ -477,7 +477,7 @@ func file_aserto_tenant_policy_builder_v1_policy_builder_proto_rawDescGZIP() []b } var file_aserto_tenant_policy_builder_v1_policy_builder_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_aserto_tenant_policy_builder_v1_policy_builder_proto_goTypes = []interface{}{ +var file_aserto_tenant_policy_builder_v1_policy_builder_proto_goTypes = []any{ (*CreatePolicyBuilderRequest)(nil), // 0: aserto.tenant.policy_builder.v1.CreatePolicyBuilderRequest (*CreatePolicyBuilderResponse)(nil), // 1: aserto.tenant.policy_builder.v1.CreatePolicyBuilderResponse (*ListPolicyBuildersRequest)(nil), // 2: aserto.tenant.policy_builder.v1.ListPolicyBuildersRequest @@ -510,7 +510,7 @@ func file_aserto_tenant_policy_builder_v1_policy_builder_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_tenant_policy_builder_v1_policy_builder_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_builder_v1_policy_builder_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*CreatePolicyBuilderRequest); i { case 0: return &v.state @@ -522,7 +522,7 @@ func file_aserto_tenant_policy_builder_v1_policy_builder_proto_init() { return nil } } - file_aserto_tenant_policy_builder_v1_policy_builder_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_builder_v1_policy_builder_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CreatePolicyBuilderResponse); i { case 0: return &v.state @@ -534,7 +534,7 @@ func file_aserto_tenant_policy_builder_v1_policy_builder_proto_init() { return nil } } - file_aserto_tenant_policy_builder_v1_policy_builder_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_builder_v1_policy_builder_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ListPolicyBuildersRequest); i { case 0: return &v.state @@ -546,7 +546,7 @@ func file_aserto_tenant_policy_builder_v1_policy_builder_proto_init() { return nil } } - file_aserto_tenant_policy_builder_v1_policy_builder_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_builder_v1_policy_builder_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ListPolicyBuildersResponse); i { case 0: return &v.state @@ -558,7 +558,7 @@ func file_aserto_tenant_policy_builder_v1_policy_builder_proto_init() { return nil } } - file_aserto_tenant_policy_builder_v1_policy_builder_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_builder_v1_policy_builder_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*DeletePolicyBuilderRequest); i { case 0: return &v.state @@ -570,7 +570,7 @@ func file_aserto_tenant_policy_builder_v1_policy_builder_proto_init() { return nil } } - file_aserto_tenant_policy_builder_v1_policy_builder_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_policy_builder_v1_policy_builder_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*DeletePolicyBuilderResponse); i { case 0: return &v.state diff --git a/aserto/tenant/policy_builder/v1/policy_builder.pb.gw.go b/aserto/tenant/policy_builder/v1/policy_builder.pb.gw.go index 35a648e..41764ca 100644 --- a/aserto/tenant/policy_builder/v1/policy_builder.pb.gw.go +++ b/aserto/tenant/policy_builder/v1/policy_builder.pb.gw.go @@ -167,6 +167,7 @@ func local_request_PolicyBuilder_DeletePolicyBuilder_0(ctx context.Context, mars // UnaryRPC :call PolicyBuilderServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPolicyBuilderHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterPolicyBuilderHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PolicyBuilderServer) error { mux.Handle("GET", pattern_PolicyBuilder_ListPolicyBuilders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -250,21 +251,21 @@ func RegisterPolicyBuilderHandlerServer(ctx context.Context, mux *runtime.ServeM // RegisterPolicyBuilderHandlerFromEndpoint is same as RegisterPolicyBuilderHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterPolicyBuilderHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -282,7 +283,7 @@ func RegisterPolicyBuilderHandler(ctx context.Context, mux *runtime.ServeMux, co // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PolicyBuilderClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PolicyBuilderClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PolicyBuilderClient" to call the correct interceptors. +// "PolicyBuilderClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterPolicyBuilderHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PolicyBuilderClient) error { mux.Handle("GET", pattern_PolicyBuilder_ListPolicyBuilders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/tenant/policy_builder/v1/policy_builder_grpc.pb.go b/aserto/tenant/policy_builder/v1/policy_builder_grpc.pb.go index a4574b5..4ad1e9d 100644 --- a/aserto/tenant/policy_builder/v1/policy_builder_grpc.pb.go +++ b/aserto/tenant/policy_builder/v1/policy_builder_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/tenant/policy_builder/v1/policy_builder.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( PolicyBuilder_ListPolicyBuilders_FullMethodName = "/aserto.tenant.policy_builder.v1.PolicyBuilder/ListPolicyBuilders" @@ -42,8 +42,9 @@ func NewPolicyBuilderClient(cc grpc.ClientConnInterface) PolicyBuilderClient { } func (c *policyBuilderClient) ListPolicyBuilders(ctx context.Context, in *ListPolicyBuildersRequest, opts ...grpc.CallOption) (*ListPolicyBuildersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListPolicyBuildersResponse) - err := c.cc.Invoke(ctx, PolicyBuilder_ListPolicyBuilders_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PolicyBuilder_ListPolicyBuilders_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -51,8 +52,9 @@ func (c *policyBuilderClient) ListPolicyBuilders(ctx context.Context, in *ListPo } func (c *policyBuilderClient) CreatePolicyBuilder(ctx context.Context, in *CreatePolicyBuilderRequest, opts ...grpc.CallOption) (*CreatePolicyBuilderResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreatePolicyBuilderResponse) - err := c.cc.Invoke(ctx, PolicyBuilder_CreatePolicyBuilder_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PolicyBuilder_CreatePolicyBuilder_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -60,8 +62,9 @@ func (c *policyBuilderClient) CreatePolicyBuilder(ctx context.Context, in *Creat } func (c *policyBuilderClient) DeletePolicyBuilder(ctx context.Context, in *DeletePolicyBuilderRequest, opts ...grpc.CallOption) (*DeletePolicyBuilderResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeletePolicyBuilderResponse) - err := c.cc.Invoke(ctx, PolicyBuilder_DeletePolicyBuilder_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PolicyBuilder_DeletePolicyBuilder_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -70,16 +73,19 @@ func (c *policyBuilderClient) DeletePolicyBuilder(ctx context.Context, in *Delet // PolicyBuilderServer is the server API for PolicyBuilder service. // All implementations should embed UnimplementedPolicyBuilderServer -// for forward compatibility +// for forward compatibility. type PolicyBuilderServer interface { ListPolicyBuilders(context.Context, *ListPolicyBuildersRequest) (*ListPolicyBuildersResponse, error) CreatePolicyBuilder(context.Context, *CreatePolicyBuilderRequest) (*CreatePolicyBuilderResponse, error) DeletePolicyBuilder(context.Context, *DeletePolicyBuilderRequest) (*DeletePolicyBuilderResponse, error) } -// UnimplementedPolicyBuilderServer should be embedded to have forward compatible implementations. -type UnimplementedPolicyBuilderServer struct { -} +// UnimplementedPolicyBuilderServer should 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 UnimplementedPolicyBuilderServer struct{} func (UnimplementedPolicyBuilderServer) ListPolicyBuilders(context.Context, *ListPolicyBuildersRequest) (*ListPolicyBuildersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPolicyBuilders not implemented") @@ -90,6 +96,7 @@ func (UnimplementedPolicyBuilderServer) CreatePolicyBuilder(context.Context, *Cr func (UnimplementedPolicyBuilderServer) DeletePolicyBuilder(context.Context, *DeletePolicyBuilderRequest) (*DeletePolicyBuilderResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeletePolicyBuilder not implemented") } +func (UnimplementedPolicyBuilderServer) testEmbeddedByValue() {} // UnsafePolicyBuilderServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PolicyBuilderServer will @@ -99,6 +106,13 @@ type UnsafePolicyBuilderServer interface { } func RegisterPolicyBuilderServer(s grpc.ServiceRegistrar, srv PolicyBuilderServer) { + // If the following call pancis, it indicates UnimplementedPolicyBuilderServer 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(&PolicyBuilder_ServiceDesc, srv) } diff --git a/aserto/tenant/profile/v1/profile.pb.go b/aserto/tenant/profile/v1/profile.pb.go index c1d97aa..a510d72 100644 --- a/aserto/tenant/profile/v1/profile.pb.go +++ b/aserto/tenant/profile/v1/profile.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/tenant/profile/v1/profile.proto @@ -635,7 +635,7 @@ func file_aserto_tenant_profile_v1_profile_proto_rawDescGZIP() []byte { } var file_aserto_tenant_profile_v1_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_aserto_tenant_profile_v1_profile_proto_goTypes = []interface{}{ +var file_aserto_tenant_profile_v1_profile_proto_goTypes = []any{ (*GetProfileRequest)(nil), // 0: aserto.tenant.profile.v1.GetProfileRequest (*GetProfileResponse)(nil), // 1: aserto.tenant.profile.v1.GetProfileResponse (*GetInvitesRequest)(nil), // 2: aserto.tenant.profile.v1.GetInvitesRequest @@ -677,7 +677,7 @@ func file_aserto_tenant_profile_v1_profile_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_tenant_profile_v1_profile_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_profile_v1_profile_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*GetProfileRequest); i { case 0: return &v.state @@ -689,7 +689,7 @@ func file_aserto_tenant_profile_v1_profile_proto_init() { return nil } } - file_aserto_tenant_profile_v1_profile_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_profile_v1_profile_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*GetProfileResponse); i { case 0: return &v.state @@ -701,7 +701,7 @@ func file_aserto_tenant_profile_v1_profile_proto_init() { return nil } } - file_aserto_tenant_profile_v1_profile_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_profile_v1_profile_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*GetInvitesRequest); i { case 0: return &v.state @@ -713,7 +713,7 @@ func file_aserto_tenant_profile_v1_profile_proto_init() { return nil } } - file_aserto_tenant_profile_v1_profile_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_profile_v1_profile_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*GetInvitesResponse); i { case 0: return &v.state @@ -725,7 +725,7 @@ func file_aserto_tenant_profile_v1_profile_proto_init() { return nil } } - file_aserto_tenant_profile_v1_profile_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_profile_v1_profile_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*InviteUserRequest); i { case 0: return &v.state @@ -737,7 +737,7 @@ func file_aserto_tenant_profile_v1_profile_proto_init() { return nil } } - file_aserto_tenant_profile_v1_profile_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_profile_v1_profile_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*InviteUserResponse); i { case 0: return &v.state @@ -749,7 +749,7 @@ func file_aserto_tenant_profile_v1_profile_proto_init() { return nil } } - file_aserto_tenant_profile_v1_profile_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_profile_v1_profile_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*RespondToInviteRequest); i { case 0: return &v.state @@ -761,7 +761,7 @@ func file_aserto_tenant_profile_v1_profile_proto_init() { return nil } } - file_aserto_tenant_profile_v1_profile_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_profile_v1_profile_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*RespondToInviteResponse); i { case 0: return &v.state @@ -773,7 +773,7 @@ func file_aserto_tenant_profile_v1_profile_proto_init() { return nil } } - file_aserto_tenant_profile_v1_profile_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_profile_v1_profile_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*RemoveMemberRequest); i { case 0: return &v.state @@ -785,7 +785,7 @@ func file_aserto_tenant_profile_v1_profile_proto_init() { return nil } } - file_aserto_tenant_profile_v1_profile_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_profile_v1_profile_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*RemoveMemberResponse); i { case 0: return &v.state diff --git a/aserto/tenant/profile/v1/profile.pb.gw.go b/aserto/tenant/profile/v1/profile.pb.gw.go index 5716da5..a789f6c 100644 --- a/aserto/tenant/profile/v1/profile.pb.gw.go +++ b/aserto/tenant/profile/v1/profile.pb.gw.go @@ -209,6 +209,7 @@ func local_request_Profile_RemoveMember_0(ctx context.Context, marshaler runtime // UnaryRPC :call ProfileServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterProfileHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterProfileHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProfileServer) error { mux.Handle("GET", pattern_Profile_GetProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -342,21 +343,21 @@ func RegisterProfileHandlerServer(ctx context.Context, mux *runtime.ServeMux, se // RegisterProfileHandlerFromEndpoint is same as RegisterProfileHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterProfileHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -374,7 +375,7 @@ func RegisterProfileHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProfileClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProfileClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ProfileClient" to call the correct interceptors. +// "ProfileClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterProfileHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProfileClient) error { mux.Handle("GET", pattern_Profile_GetProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/tenant/profile/v1/profile_grpc.pb.go b/aserto/tenant/profile/v1/profile_grpc.pb.go index 4a13eaa..c4f7947 100644 --- a/aserto/tenant/profile/v1/profile_grpc.pb.go +++ b/aserto/tenant/profile/v1/profile_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/tenant/profile/v1/profile.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Profile_GetProfile_FullMethodName = "/aserto.tenant.profile.v1.Profile/GetProfile" @@ -46,8 +46,9 @@ func NewProfileClient(cc grpc.ClientConnInterface) ProfileClient { } func (c *profileClient) GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*GetProfileResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetProfileResponse) - err := c.cc.Invoke(ctx, Profile_GetProfile_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Profile_GetProfile_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -55,8 +56,9 @@ func (c *profileClient) GetProfile(ctx context.Context, in *GetProfileRequest, o } func (c *profileClient) GetInvites(ctx context.Context, in *GetInvitesRequest, opts ...grpc.CallOption) (*GetInvitesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetInvitesResponse) - err := c.cc.Invoke(ctx, Profile_GetInvites_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Profile_GetInvites_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -64,8 +66,9 @@ func (c *profileClient) GetInvites(ctx context.Context, in *GetInvitesRequest, o } func (c *profileClient) InviteUser(ctx context.Context, in *InviteUserRequest, opts ...grpc.CallOption) (*InviteUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(InviteUserResponse) - err := c.cc.Invoke(ctx, Profile_InviteUser_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Profile_InviteUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -73,8 +76,9 @@ func (c *profileClient) InviteUser(ctx context.Context, in *InviteUserRequest, o } func (c *profileClient) RespondToInvite(ctx context.Context, in *RespondToInviteRequest, opts ...grpc.CallOption) (*RespondToInviteResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RespondToInviteResponse) - err := c.cc.Invoke(ctx, Profile_RespondToInvite_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Profile_RespondToInvite_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -82,8 +86,9 @@ func (c *profileClient) RespondToInvite(ctx context.Context, in *RespondToInvite } func (c *profileClient) RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...grpc.CallOption) (*RemoveMemberResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RemoveMemberResponse) - err := c.cc.Invoke(ctx, Profile_RemoveMember_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Profile_RemoveMember_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -92,7 +97,7 @@ func (c *profileClient) RemoveMember(ctx context.Context, in *RemoveMemberReques // ProfileServer is the server API for Profile service. // All implementations should embed UnimplementedProfileServer -// for forward compatibility +// for forward compatibility. type ProfileServer interface { GetProfile(context.Context, *GetProfileRequest) (*GetProfileResponse, error) GetInvites(context.Context, *GetInvitesRequest) (*GetInvitesResponse, error) @@ -101,9 +106,12 @@ type ProfileServer interface { RemoveMember(context.Context, *RemoveMemberRequest) (*RemoveMemberResponse, error) } -// UnimplementedProfileServer should be embedded to have forward compatible implementations. -type UnimplementedProfileServer struct { -} +// UnimplementedProfileServer should 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 UnimplementedProfileServer struct{} func (UnimplementedProfileServer) GetProfile(context.Context, *GetProfileRequest) (*GetProfileResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetProfile not implemented") @@ -120,6 +128,7 @@ func (UnimplementedProfileServer) RespondToInvite(context.Context, *RespondToInv func (UnimplementedProfileServer) RemoveMember(context.Context, *RemoveMemberRequest) (*RemoveMemberResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveMember not implemented") } +func (UnimplementedProfileServer) testEmbeddedByValue() {} // UnsafeProfileServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ProfileServer will @@ -129,6 +138,13 @@ type UnsafeProfileServer interface { } func RegisterProfileServer(s grpc.ServiceRegistrar, srv ProfileServer) { + // If the following call pancis, it indicates UnimplementedProfileServer 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(&Profile_ServiceDesc, srv) } diff --git a/aserto/tenant/provider/v1/provider.pb.go b/aserto/tenant/provider/v1/provider.pb.go index 3179f66..5946ea2 100644 --- a/aserto/tenant/provider/v1/provider.pb.go +++ b/aserto/tenant/provider/v1/provider.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/tenant/provider/v1/provider.proto @@ -421,7 +421,7 @@ func file_aserto_tenant_provider_v1_provider_proto_rawDescGZIP() []byte { } var file_aserto_tenant_provider_v1_provider_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_aserto_tenant_provider_v1_provider_proto_goTypes = []interface{}{ +var file_aserto_tenant_provider_v1_provider_proto_goTypes = []any{ (*ListProvidersRequest)(nil), // 0: aserto.tenant.provider.v1.ListProvidersRequest (*ListProvidersResponse)(nil), // 1: aserto.tenant.provider.v1.ListProvidersResponse (*GetProviderRequest)(nil), // 2: aserto.tenant.provider.v1.GetProviderRequest @@ -455,7 +455,7 @@ func file_aserto_tenant_provider_v1_provider_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_tenant_provider_v1_provider_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_provider_v1_provider_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ListProvidersRequest); i { case 0: return &v.state @@ -467,7 +467,7 @@ func file_aserto_tenant_provider_v1_provider_proto_init() { return nil } } - file_aserto_tenant_provider_v1_provider_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_provider_v1_provider_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ListProvidersResponse); i { case 0: return &v.state @@ -479,7 +479,7 @@ func file_aserto_tenant_provider_v1_provider_proto_init() { return nil } } - file_aserto_tenant_provider_v1_provider_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_provider_v1_provider_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*GetProviderRequest); i { case 0: return &v.state @@ -491,7 +491,7 @@ func file_aserto_tenant_provider_v1_provider_proto_init() { return nil } } - file_aserto_tenant_provider_v1_provider_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_provider_v1_provider_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*GetProviderResponse); i { case 0: return &v.state @@ -503,7 +503,7 @@ func file_aserto_tenant_provider_v1_provider_proto_init() { return nil } } - file_aserto_tenant_provider_v1_provider_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_provider_v1_provider_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ListProviderKindsRequest); i { case 0: return &v.state @@ -515,7 +515,7 @@ func file_aserto_tenant_provider_v1_provider_proto_init() { return nil } } - file_aserto_tenant_provider_v1_provider_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_provider_v1_provider_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*ListProviderKindsResponse); i { case 0: return &v.state diff --git a/aserto/tenant/provider/v1/provider.pb.gw.go b/aserto/tenant/provider/v1/provider.pb.gw.go index 460368c..07db3e3 100644 --- a/aserto/tenant/provider/v1/provider.pb.gw.go +++ b/aserto/tenant/provider/v1/provider.pb.gw.go @@ -159,6 +159,7 @@ func local_request_Provider_ListProviderKinds_0(ctx context.Context, marshaler r // UnaryRPC :call ProviderServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterProviderHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterProviderHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProviderServer) error { mux.Handle("GET", pattern_Provider_ListProviders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -242,21 +243,21 @@ func RegisterProviderHandlerServer(ctx context.Context, mux *runtime.ServeMux, s // RegisterProviderHandlerFromEndpoint is same as RegisterProviderHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterProviderHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -274,7 +275,7 @@ func RegisterProviderHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProviderClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProviderClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ProviderClient" to call the correct interceptors. +// "ProviderClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterProviderHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProviderClient) error { mux.Handle("GET", pattern_Provider_ListProviders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/tenant/provider/v1/provider_grpc.pb.go b/aserto/tenant/provider/v1/provider_grpc.pb.go index ef440c8..77bd5b4 100644 --- a/aserto/tenant/provider/v1/provider_grpc.pb.go +++ b/aserto/tenant/provider/v1/provider_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/tenant/provider/v1/provider.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Provider_ListProviders_FullMethodName = "/aserto.tenant.provider.v1.Provider/ListProviders" @@ -42,8 +42,9 @@ func NewProviderClient(cc grpc.ClientConnInterface) ProviderClient { } func (c *providerClient) ListProviders(ctx context.Context, in *ListProvidersRequest, opts ...grpc.CallOption) (*ListProvidersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListProvidersResponse) - err := c.cc.Invoke(ctx, Provider_ListProviders_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Provider_ListProviders_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -51,8 +52,9 @@ func (c *providerClient) ListProviders(ctx context.Context, in *ListProvidersReq } func (c *providerClient) GetProvider(ctx context.Context, in *GetProviderRequest, opts ...grpc.CallOption) (*GetProviderResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetProviderResponse) - err := c.cc.Invoke(ctx, Provider_GetProvider_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Provider_GetProvider_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -60,8 +62,9 @@ func (c *providerClient) GetProvider(ctx context.Context, in *GetProviderRequest } func (c *providerClient) ListProviderKinds(ctx context.Context, in *ListProviderKindsRequest, opts ...grpc.CallOption) (*ListProviderKindsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListProviderKindsResponse) - err := c.cc.Invoke(ctx, Provider_ListProviderKinds_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Provider_ListProviderKinds_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -70,16 +73,19 @@ func (c *providerClient) ListProviderKinds(ctx context.Context, in *ListProvider // ProviderServer is the server API for Provider service. // All implementations should embed UnimplementedProviderServer -// for forward compatibility +// for forward compatibility. type ProviderServer interface { ListProviders(context.Context, *ListProvidersRequest) (*ListProvidersResponse, error) GetProvider(context.Context, *GetProviderRequest) (*GetProviderResponse, error) ListProviderKinds(context.Context, *ListProviderKindsRequest) (*ListProviderKindsResponse, error) } -// UnimplementedProviderServer should be embedded to have forward compatible implementations. -type UnimplementedProviderServer struct { -} +// UnimplementedProviderServer should 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 UnimplementedProviderServer struct{} func (UnimplementedProviderServer) ListProviders(context.Context, *ListProvidersRequest) (*ListProvidersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListProviders not implemented") @@ -90,6 +96,7 @@ func (UnimplementedProviderServer) GetProvider(context.Context, *GetProviderRequ func (UnimplementedProviderServer) ListProviderKinds(context.Context, *ListProviderKindsRequest) (*ListProviderKindsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListProviderKinds not implemented") } +func (UnimplementedProviderServer) testEmbeddedByValue() {} // UnsafeProviderServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ProviderServer will @@ -99,6 +106,13 @@ type UnsafeProviderServer interface { } func RegisterProviderServer(s grpc.ServiceRegistrar, srv ProviderServer) { + // If the following call pancis, it indicates UnimplementedProviderServer 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(&Provider_ServiceDesc, srv) } diff --git a/aserto/tenant/registry/v1/registry.pb.go b/aserto/tenant/registry/v1/registry.pb.go index dca321d..614db4a 100644 --- a/aserto/tenant/registry/v1/registry.pb.go +++ b/aserto/tenant/registry/v1/registry.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/tenant/registry/v1/registry.proto @@ -1584,7 +1584,7 @@ func file_aserto_tenant_registry_v1_registry_proto_rawDescGZIP() []byte { } var file_aserto_tenant_registry_v1_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_aserto_tenant_registry_v1_registry_proto_goTypes = []interface{}{ +var file_aserto_tenant_registry_v1_registry_proto_goTypes = []any{ (*ListRegistryReposRequest)(nil), // 0: aserto.tenant.registry.v1.ListRegistryReposRequest (*ListRegistryReposResponse)(nil), // 1: aserto.tenant.registry.v1.ListRegistryReposResponse (*ListRegistryRepoTagsRequest)(nil), // 2: aserto.tenant.registry.v1.ListRegistryRepoTagsRequest @@ -1666,7 +1666,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_tenant_registry_v1_registry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ListRegistryReposRequest); i { case 0: return &v.state @@ -1678,7 +1678,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ListRegistryReposResponse); i { case 0: return &v.state @@ -1690,7 +1690,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ListRegistryRepoTagsRequest); i { case 0: return &v.state @@ -1702,7 +1702,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ListRegistryRepoTagsResponse); i { case 0: return &v.state @@ -1714,7 +1714,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ListRegistryRepoDigestsRequest); i { case 0: return &v.state @@ -1726,7 +1726,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*ListRegistryRepoDigestsResponse); i { case 0: return &v.state @@ -1738,7 +1738,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*GetRegistryRepoTagRequest); i { case 0: return &v.state @@ -1750,7 +1750,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*GetRegistryRepoTagResponse); i { case 0: return &v.state @@ -1762,7 +1762,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*CreateRegistryRepoRequest); i { case 0: return &v.state @@ -1774,7 +1774,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*CreateRegistryRepoResponse); i { case 0: return &v.state @@ -1786,7 +1786,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*DeleteRegistryRepoRequest); i { case 0: return &v.state @@ -1798,7 +1798,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*DeleteRegistryRepoResponse); i { case 0: return &v.state @@ -1810,7 +1810,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*ListOrgsRequest); i { case 0: return &v.state @@ -1822,7 +1822,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*ListOrgsResponse); i { case 0: return &v.state @@ -1834,7 +1834,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*RegistryRepoAvailableRequest); i { case 0: return &v.state @@ -1846,7 +1846,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*RegistryRepoAvailableResponse); i { case 0: return &v.state @@ -1858,7 +1858,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*ValidPolicyRegistryRepoTagRequest); i { case 0: return &v.state @@ -1870,7 +1870,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*ValidPolicyRegistryRepoTagResponse); i { case 0: return &v.state @@ -1882,7 +1882,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*CloneRepoRequest); i { case 0: return &v.state @@ -1894,7 +1894,7 @@ func file_aserto_tenant_registry_v1_registry_proto_init() { return nil } } - file_aserto_tenant_registry_v1_registry_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_registry_v1_registry_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*CloneRepoResponse); i { case 0: return &v.state diff --git a/aserto/tenant/registry/v1/registry.pb.gw.go b/aserto/tenant/registry/v1/registry.pb.gw.go index 60e4206..6db3f9b 100644 --- a/aserto/tenant/registry/v1/registry.pb.gw.go +++ b/aserto/tenant/registry/v1/registry.pb.gw.go @@ -1015,6 +1015,7 @@ func local_request_Registry_CloneRepo_0(ctx context.Context, marshaler runtime.M // UnaryRPC :call RegistryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRegistryHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterRegistryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RegistryServer) error { mux.Handle("GET", pattern_Registry_ListOrgs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1273,21 +1274,21 @@ func RegisterRegistryHandlerServer(ctx context.Context, mux *runtime.ServeMux, s // RegisterRegistryHandlerFromEndpoint is same as RegisterRegistryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterRegistryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -1305,7 +1306,7 @@ func RegisterRegistryHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RegistryClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RegistryClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "RegistryClient" to call the correct interceptors. +// "RegistryClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterRegistryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RegistryClient) error { mux.Handle("GET", pattern_Registry_ListOrgs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/tenant/registry/v1/registry_grpc.pb.go b/aserto/tenant/registry/v1/registry_grpc.pb.go index e8800ff..25e40ec 100644 --- a/aserto/tenant/registry/v1/registry_grpc.pb.go +++ b/aserto/tenant/registry/v1/registry_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/tenant/registry/v1/registry.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Registry_ListOrgs_FullMethodName = "/aserto.tenant.registry.v1.Registry/ListOrgs" @@ -56,8 +56,9 @@ func NewRegistryClient(cc grpc.ClientConnInterface) RegistryClient { } func (c *registryClient) 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, Registry_ListOrgs_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_ListOrgs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -65,8 +66,9 @@ func (c *registryClient) ListOrgs(ctx context.Context, in *ListOrgsRequest, opts } func (c *registryClient) ListRegistryRepos(ctx context.Context, in *ListRegistryReposRequest, opts ...grpc.CallOption) (*ListRegistryReposResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListRegistryReposResponse) - err := c.cc.Invoke(ctx, Registry_ListRegistryRepos_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_ListRegistryRepos_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -74,8 +76,9 @@ func (c *registryClient) ListRegistryRepos(ctx context.Context, in *ListRegistry } func (c *registryClient) DeleteRegistryRepo(ctx context.Context, in *DeleteRegistryRepoRequest, opts ...grpc.CallOption) (*DeleteRegistryRepoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteRegistryRepoResponse) - err := c.cc.Invoke(ctx, Registry_DeleteRegistryRepo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_DeleteRegistryRepo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -83,8 +86,9 @@ func (c *registryClient) DeleteRegistryRepo(ctx context.Context, in *DeleteRegis } func (c *registryClient) ListRegistryRepoTags(ctx context.Context, in *ListRegistryRepoTagsRequest, opts ...grpc.CallOption) (*ListRegistryRepoTagsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListRegistryRepoTagsResponse) - err := c.cc.Invoke(ctx, Registry_ListRegistryRepoTags_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_ListRegistryRepoTags_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -92,8 +96,9 @@ func (c *registryClient) ListRegistryRepoTags(ctx context.Context, in *ListRegis } func (c *registryClient) ListRegistryRepoDigests(ctx context.Context, in *ListRegistryRepoDigestsRequest, opts ...grpc.CallOption) (*ListRegistryRepoDigestsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListRegistryRepoDigestsResponse) - err := c.cc.Invoke(ctx, Registry_ListRegistryRepoDigests_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_ListRegistryRepoDigests_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -101,8 +106,9 @@ func (c *registryClient) ListRegistryRepoDigests(ctx context.Context, in *ListRe } func (c *registryClient) GetRegistryRepoTag(ctx context.Context, in *GetRegistryRepoTagRequest, opts ...grpc.CallOption) (*GetRegistryRepoTagResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetRegistryRepoTagResponse) - err := c.cc.Invoke(ctx, Registry_GetRegistryRepoTag_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_GetRegistryRepoTag_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -110,8 +116,9 @@ func (c *registryClient) GetRegistryRepoTag(ctx context.Context, in *GetRegistry } func (c *registryClient) CreateRegistryRepo(ctx context.Context, in *CreateRegistryRepoRequest, opts ...grpc.CallOption) (*CreateRegistryRepoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateRegistryRepoResponse) - err := c.cc.Invoke(ctx, Registry_CreateRegistryRepo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_CreateRegistryRepo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -119,8 +126,9 @@ func (c *registryClient) CreateRegistryRepo(ctx context.Context, in *CreateRegis } func (c *registryClient) RegistryRepoAvailable(ctx context.Context, in *RegistryRepoAvailableRequest, opts ...grpc.CallOption) (*RegistryRepoAvailableResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RegistryRepoAvailableResponse) - err := c.cc.Invoke(ctx, Registry_RegistryRepoAvailable_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_RegistryRepoAvailable_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -128,8 +136,9 @@ func (c *registryClient) RegistryRepoAvailable(ctx context.Context, in *Registry } func (c *registryClient) ValidPolicyRegistryRepoTag(ctx context.Context, in *ValidPolicyRegistryRepoTagRequest, opts ...grpc.CallOption) (*ValidPolicyRegistryRepoTagResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ValidPolicyRegistryRepoTagResponse) - err := c.cc.Invoke(ctx, Registry_ValidPolicyRegistryRepoTag_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_ValidPolicyRegistryRepoTag_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -137,8 +146,9 @@ func (c *registryClient) ValidPolicyRegistryRepoTag(ctx context.Context, in *Val } func (c *registryClient) CloneRepo(ctx context.Context, in *CloneRepoRequest, opts ...grpc.CallOption) (*CloneRepoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CloneRepoResponse) - err := c.cc.Invoke(ctx, Registry_CloneRepo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Registry_CloneRepo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -147,7 +157,7 @@ func (c *registryClient) CloneRepo(ctx context.Context, in *CloneRepoRequest, op // RegistryServer is the server API for Registry service. // All implementations should embed UnimplementedRegistryServer -// for forward compatibility +// for forward compatibility. type RegistryServer interface { ListOrgs(context.Context, *ListOrgsRequest) (*ListOrgsResponse, error) ListRegistryRepos(context.Context, *ListRegistryReposRequest) (*ListRegistryReposResponse, error) @@ -161,9 +171,12 @@ type RegistryServer interface { CloneRepo(context.Context, *CloneRepoRequest) (*CloneRepoResponse, error) } -// UnimplementedRegistryServer should be embedded to have forward compatible implementations. -type UnimplementedRegistryServer struct { -} +// UnimplementedRegistryServer should 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 UnimplementedRegistryServer struct{} func (UnimplementedRegistryServer) ListOrgs(context.Context, *ListOrgsRequest) (*ListOrgsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListOrgs not implemented") @@ -195,6 +208,7 @@ func (UnimplementedRegistryServer) ValidPolicyRegistryRepoTag(context.Context, * func (UnimplementedRegistryServer) CloneRepo(context.Context, *CloneRepoRequest) (*CloneRepoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CloneRepo not implemented") } +func (UnimplementedRegistryServer) testEmbeddedByValue() {} // UnsafeRegistryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to RegistryServer will @@ -204,6 +218,13 @@ type UnsafeRegistryServer interface { } func RegisterRegistryServer(s grpc.ServiceRegistrar, srv RegistryServer) { + // If the following call pancis, it indicates UnimplementedRegistryServer 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(&Registry_ServiceDesc, srv) } diff --git a/aserto/tenant/scc/v1/scc.pb.go b/aserto/tenant/scc/v1/scc.pb.go index 7af1c0b..4384a10 100644 --- a/aserto/tenant/scc/v1/scc.pb.go +++ b/aserto/tenant/scc/v1/scc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/tenant/scc/v1/scc.proto @@ -1080,7 +1080,7 @@ func file_aserto_tenant_scc_v1_scc_proto_rawDescGZIP() []byte { } var file_aserto_tenant_scc_v1_scc_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_aserto_tenant_scc_v1_scc_proto_goTypes = []interface{}{ +var file_aserto_tenant_scc_v1_scc_proto_goTypes = []any{ (*ListOrgRequest)(nil), // 0: aserto.tenant.scc.v1.ListOrgRequest (*ListOrgResponse)(nil), // 1: aserto.tenant.scc.v1.ListOrgResponse (*ListRepoRequest)(nil), // 2: aserto.tenant.scc.v1.ListRepoRequest @@ -1131,7 +1131,7 @@ func file_aserto_tenant_scc_v1_scc_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_tenant_scc_v1_scc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_scc_v1_scc_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ListOrgRequest); i { case 0: return &v.state @@ -1143,7 +1143,7 @@ func file_aserto_tenant_scc_v1_scc_proto_init() { return nil } } - file_aserto_tenant_scc_v1_scc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_scc_v1_scc_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ListOrgResponse); i { case 0: return &v.state @@ -1155,7 +1155,7 @@ func file_aserto_tenant_scc_v1_scc_proto_init() { return nil } } - file_aserto_tenant_scc_v1_scc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_scc_v1_scc_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ListRepoRequest); i { case 0: return &v.state @@ -1167,7 +1167,7 @@ func file_aserto_tenant_scc_v1_scc_proto_init() { return nil } } - file_aserto_tenant_scc_v1_scc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_scc_v1_scc_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ListRepoResponse); i { case 0: return &v.state @@ -1179,7 +1179,7 @@ func file_aserto_tenant_scc_v1_scc_proto_init() { return nil } } - file_aserto_tenant_scc_v1_scc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_scc_v1_scc_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*GetRepoRequest); i { case 0: return &v.state @@ -1191,7 +1191,7 @@ func file_aserto_tenant_scc_v1_scc_proto_init() { return nil } } - file_aserto_tenant_scc_v1_scc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_scc_v1_scc_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*GetRepoResponse); i { case 0: return &v.state @@ -1203,7 +1203,7 @@ func file_aserto_tenant_scc_v1_scc_proto_init() { return nil } } - file_aserto_tenant_scc_v1_scc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_scc_v1_scc_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*ListTemplatesRequest); i { case 0: return &v.state @@ -1215,7 +1215,7 @@ func file_aserto_tenant_scc_v1_scc_proto_init() { return nil } } - file_aserto_tenant_scc_v1_scc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_scc_v1_scc_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*ListTemplatesResponse); i { case 0: return &v.state @@ -1227,7 +1227,7 @@ func file_aserto_tenant_scc_v1_scc_proto_init() { return nil } } - file_aserto_tenant_scc_v1_scc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_scc_v1_scc_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*GetProfileRequest); i { case 0: return &v.state @@ -1239,7 +1239,7 @@ func file_aserto_tenant_scc_v1_scc_proto_init() { return nil } } - file_aserto_tenant_scc_v1_scc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_scc_v1_scc_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*GetProfileResponse); i { case 0: return &v.state @@ -1251,7 +1251,7 @@ func file_aserto_tenant_scc_v1_scc_proto_init() { return nil } } - file_aserto_tenant_scc_v1_scc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_scc_v1_scc_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*CreateRepoRequest); i { case 0: return &v.state @@ -1263,7 +1263,7 @@ func file_aserto_tenant_scc_v1_scc_proto_init() { return nil } } - file_aserto_tenant_scc_v1_scc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_scc_v1_scc_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*CreateRepoResponse); i { case 0: return &v.state @@ -1275,7 +1275,7 @@ func file_aserto_tenant_scc_v1_scc_proto_init() { return nil } } - file_aserto_tenant_scc_v1_scc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_scc_v1_scc_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*Repo); i { case 0: return &v.state @@ -1287,7 +1287,7 @@ func file_aserto_tenant_scc_v1_scc_proto_init() { return nil } } - file_aserto_tenant_scc_v1_scc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_scc_v1_scc_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*IsRepoConnectedRequest); i { case 0: return &v.state @@ -1299,7 +1299,7 @@ func file_aserto_tenant_scc_v1_scc_proto_init() { return nil } } - file_aserto_tenant_scc_v1_scc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_scc_v1_scc_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*IsRepoConnectedResponse); i { case 0: return &v.state @@ -1312,7 +1312,7 @@ func file_aserto_tenant_scc_v1_scc_proto_init() { } } } - file_aserto_tenant_scc_v1_scc_proto_msgTypes[6].OneofWrappers = []interface{}{} + file_aserto_tenant_scc_v1_scc_proto_msgTypes[6].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aserto/tenant/scc/v1/scc.pb.gw.go b/aserto/tenant/scc/v1/scc.pb.gw.go index 9d30829..9806cee 100644 --- a/aserto/tenant/scc/v1/scc.pb.gw.go +++ b/aserto/tenant/scc/v1/scc.pb.gw.go @@ -545,6 +545,7 @@ func local_request_SourceCodeCtl_IsRepoConnected_0(ctx context.Context, marshale // UnaryRPC :call SourceCodeCtlServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSourceCodeCtlHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterSourceCodeCtlHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SourceCodeCtlServer) error { mux.Handle("GET", pattern_SourceCodeCtl_ListOrg_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -728,21 +729,21 @@ func RegisterSourceCodeCtlHandlerServer(ctx context.Context, mux *runtime.ServeM // RegisterSourceCodeCtlHandlerFromEndpoint is same as RegisterSourceCodeCtlHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterSourceCodeCtlHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -760,7 +761,7 @@ func RegisterSourceCodeCtlHandler(ctx context.Context, mux *runtime.ServeMux, co // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SourceCodeCtlClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SourceCodeCtlClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "SourceCodeCtlClient" to call the correct interceptors. +// "SourceCodeCtlClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterSourceCodeCtlHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SourceCodeCtlClient) error { mux.Handle("GET", pattern_SourceCodeCtl_ListOrg_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/tenant/scc/v1/scc_grpc.pb.go b/aserto/tenant/scc/v1/scc_grpc.pb.go index 057df10..b32405f 100644 --- a/aserto/tenant/scc/v1/scc_grpc.pb.go +++ b/aserto/tenant/scc/v1/scc_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/tenant/scc/v1/scc.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( SourceCodeCtl_ListOrg_FullMethodName = "/aserto.tenant.scc.v1.SourceCodeCtl/ListOrg" @@ -50,8 +50,9 @@ func NewSourceCodeCtlClient(cc grpc.ClientConnInterface) SourceCodeCtlClient { } func (c *sourceCodeCtlClient) ListOrg(ctx context.Context, in *ListOrgRequest, opts ...grpc.CallOption) (*ListOrgResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListOrgResponse) - err := c.cc.Invoke(ctx, SourceCodeCtl_ListOrg_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, SourceCodeCtl_ListOrg_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -59,8 +60,9 @@ func (c *sourceCodeCtlClient) ListOrg(ctx context.Context, in *ListOrgRequest, o } func (c *sourceCodeCtlClient) ListRepo(ctx context.Context, in *ListRepoRequest, opts ...grpc.CallOption) (*ListRepoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListRepoResponse) - err := c.cc.Invoke(ctx, SourceCodeCtl_ListRepo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, SourceCodeCtl_ListRepo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -68,8 +70,9 @@ func (c *sourceCodeCtlClient) ListRepo(ctx context.Context, in *ListRepoRequest, } func (c *sourceCodeCtlClient) GetRepo(ctx context.Context, in *GetRepoRequest, opts ...grpc.CallOption) (*GetRepoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetRepoResponse) - err := c.cc.Invoke(ctx, SourceCodeCtl_GetRepo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, SourceCodeCtl_GetRepo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -77,8 +80,9 @@ func (c *sourceCodeCtlClient) GetRepo(ctx context.Context, in *GetRepoRequest, o } func (c *sourceCodeCtlClient) CreateRepo(ctx context.Context, in *CreateRepoRequest, opts ...grpc.CallOption) (*CreateRepoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateRepoResponse) - err := c.cc.Invoke(ctx, SourceCodeCtl_CreateRepo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, SourceCodeCtl_CreateRepo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -86,8 +90,9 @@ func (c *sourceCodeCtlClient) CreateRepo(ctx context.Context, in *CreateRepoRequ } func (c *sourceCodeCtlClient) ListTemplates(ctx context.Context, in *ListTemplatesRequest, opts ...grpc.CallOption) (*ListTemplatesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListTemplatesResponse) - err := c.cc.Invoke(ctx, SourceCodeCtl_ListTemplates_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, SourceCodeCtl_ListTemplates_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -95,8 +100,9 @@ func (c *sourceCodeCtlClient) ListTemplates(ctx context.Context, in *ListTemplat } func (c *sourceCodeCtlClient) GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*GetProfileResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetProfileResponse) - err := c.cc.Invoke(ctx, SourceCodeCtl_GetProfile_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, SourceCodeCtl_GetProfile_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -104,8 +110,9 @@ func (c *sourceCodeCtlClient) GetProfile(ctx context.Context, in *GetProfileRequ } func (c *sourceCodeCtlClient) IsRepoConnected(ctx context.Context, in *IsRepoConnectedRequest, opts ...grpc.CallOption) (*IsRepoConnectedResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(IsRepoConnectedResponse) - err := c.cc.Invoke(ctx, SourceCodeCtl_IsRepoConnected_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, SourceCodeCtl_IsRepoConnected_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -114,7 +121,7 @@ func (c *sourceCodeCtlClient) IsRepoConnected(ctx context.Context, in *IsRepoCon // SourceCodeCtlServer is the server API for SourceCodeCtl service. // All implementations should embed UnimplementedSourceCodeCtlServer -// for forward compatibility +// for forward compatibility. type SourceCodeCtlServer interface { ListOrg(context.Context, *ListOrgRequest) (*ListOrgResponse, error) ListRepo(context.Context, *ListRepoRequest) (*ListRepoResponse, error) @@ -125,9 +132,12 @@ type SourceCodeCtlServer interface { IsRepoConnected(context.Context, *IsRepoConnectedRequest) (*IsRepoConnectedResponse, error) } -// UnimplementedSourceCodeCtlServer should be embedded to have forward compatible implementations. -type UnimplementedSourceCodeCtlServer struct { -} +// UnimplementedSourceCodeCtlServer should 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 UnimplementedSourceCodeCtlServer struct{} func (UnimplementedSourceCodeCtlServer) ListOrg(context.Context, *ListOrgRequest) (*ListOrgResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListOrg not implemented") @@ -150,6 +160,7 @@ func (UnimplementedSourceCodeCtlServer) GetProfile(context.Context, *GetProfileR func (UnimplementedSourceCodeCtlServer) IsRepoConnected(context.Context, *IsRepoConnectedRequest) (*IsRepoConnectedResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method IsRepoConnected not implemented") } +func (UnimplementedSourceCodeCtlServer) testEmbeddedByValue() {} // UnsafeSourceCodeCtlServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to SourceCodeCtlServer will @@ -159,6 +170,13 @@ type UnsafeSourceCodeCtlServer interface { } func RegisterSourceCodeCtlServer(s grpc.ServiceRegistrar, srv SourceCodeCtlServer) { + // If the following call pancis, it indicates UnimplementedSourceCodeCtlServer 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(&SourceCodeCtl_ServiceDesc, srv) } diff --git a/aserto/tenant/v2/account.pb.go b/aserto/tenant/v2/account.pb.go index 5c0880e..ceb3bc6 100644 --- a/aserto/tenant/v2/account.pb.go +++ b/aserto/tenant/v2/account.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/tenant/v2/account.proto @@ -150,7 +150,7 @@ func file_aserto_tenant_v2_account_proto_rawDescGZIP() []byte { } var file_aserto_tenant_v2_account_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_aserto_tenant_v2_account_proto_goTypes = []interface{}{ +var file_aserto_tenant_v2_account_proto_goTypes = []any{ (*DeleteAccountRequest)(nil), // 0: aserto.tenant.v2.DeleteAccountRequest (*DeleteAccountResponse)(nil), // 1: aserto.tenant.v2.DeleteAccountResponse } @@ -170,7 +170,7 @@ func file_aserto_tenant_v2_account_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_tenant_v2_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_account_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*DeleteAccountRequest); i { case 0: return &v.state @@ -182,7 +182,7 @@ func file_aserto_tenant_v2_account_proto_init() { return nil } } - file_aserto_tenant_v2_account_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_account_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*DeleteAccountResponse); i { case 0: return &v.state diff --git a/aserto/tenant/v2/account.pb.gw.go b/aserto/tenant/v2/account.pb.gw.go index 0b27373..a986d24 100644 --- a/aserto/tenant/v2/account.pb.gw.go +++ b/aserto/tenant/v2/account.pb.gw.go @@ -53,6 +53,7 @@ func local_request_Account_DeleteAccount_0(ctx context.Context, marshaler runtim // UnaryRPC :call AccountServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAccountHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAccountHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccountServer) error { mux.Handle("DELETE", pattern_Account_DeleteAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -86,21 +87,21 @@ func RegisterAccountHandlerServer(ctx context.Context, mux *runtime.ServeMux, se // RegisterAccountHandlerFromEndpoint is same as RegisterAccountHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterAccountHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -118,7 +119,7 @@ func RegisterAccountHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AccountClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AccountClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AccountClient" to call the correct interceptors. +// "AccountClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAccountHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccountClient) error { mux.Handle("DELETE", pattern_Account_DeleteAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/tenant/v2/account_grpc.pb.go b/aserto/tenant/v2/account_grpc.pb.go index ea311af..74b36f3 100644 --- a/aserto/tenant/v2/account_grpc.pb.go +++ b/aserto/tenant/v2/account_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/tenant/v2/account.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Account_DeleteAccount_FullMethodName = "/aserto.tenant.v2.Account/DeleteAccount" @@ -38,8 +38,9 @@ func NewAccountClient(cc grpc.ClientConnInterface) AccountClient { } func (c *accountClient) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*DeleteAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteAccountResponse) - err := c.cc.Invoke(ctx, Account_DeleteAccount_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Account_DeleteAccount_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -48,18 +49,22 @@ func (c *accountClient) DeleteAccount(ctx context.Context, in *DeleteAccountRequ // AccountServer is the server API for Account service. // All implementations should embed UnimplementedAccountServer -// for forward compatibility +// for forward compatibility. type AccountServer interface { DeleteAccount(context.Context, *DeleteAccountRequest) (*DeleteAccountResponse, error) } -// UnimplementedAccountServer should be embedded to have forward compatible implementations. -type UnimplementedAccountServer struct { -} +// UnimplementedAccountServer should 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 UnimplementedAccountServer struct{} func (UnimplementedAccountServer) DeleteAccount(context.Context, *DeleteAccountRequest) (*DeleteAccountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteAccount not implemented") } +func (UnimplementedAccountServer) testEmbeddedByValue() {} // UnsafeAccountServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AccountServer will @@ -69,6 +74,13 @@ type UnsafeAccountServer interface { } func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer) { + // If the following call pancis, it indicates UnimplementedAccountServer 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(&Account_ServiceDesc, srv) } diff --git a/aserto/tenant/v2/instance.pb.go b/aserto/tenant/v2/instance.pb.go index 7c5fdaf..a2cf0d1 100644 --- a/aserto/tenant/v2/instance.pb.go +++ b/aserto/tenant/v2/instance.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/tenant/v2/instance.proto @@ -537,7 +537,7 @@ func file_aserto_tenant_v2_instance_proto_rawDescGZIP() []byte { } var file_aserto_tenant_v2_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_aserto_tenant_v2_instance_proto_goTypes = []interface{}{ +var file_aserto_tenant_v2_instance_proto_goTypes = []any{ (*CreateInstanceRequest)(nil), // 0: aserto.tenant.v2.CreateInstanceRequest (*CreateInstanceResponse)(nil), // 1: aserto.tenant.v2.CreateInstanceResponse (*ListInstanceRequest)(nil), // 2: aserto.tenant.v2.ListInstanceRequest @@ -583,7 +583,7 @@ func file_aserto_tenant_v2_instance_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_tenant_v2_instance_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_instance_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*CreateInstanceRequest); i { case 0: return &v.state @@ -595,7 +595,7 @@ func file_aserto_tenant_v2_instance_proto_init() { return nil } } - file_aserto_tenant_v2_instance_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_instance_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CreateInstanceResponse); i { case 0: return &v.state @@ -607,7 +607,7 @@ func file_aserto_tenant_v2_instance_proto_init() { return nil } } - file_aserto_tenant_v2_instance_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_instance_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ListInstanceRequest); i { case 0: return &v.state @@ -619,7 +619,7 @@ func file_aserto_tenant_v2_instance_proto_init() { return nil } } - file_aserto_tenant_v2_instance_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_instance_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ListInstanceResponse); i { case 0: return &v.state @@ -631,7 +631,7 @@ func file_aserto_tenant_v2_instance_proto_init() { return nil } } - file_aserto_tenant_v2_instance_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_instance_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*DeleteInstanceRequest); i { case 0: return &v.state @@ -643,7 +643,7 @@ func file_aserto_tenant_v2_instance_proto_init() { return nil } } - file_aserto_tenant_v2_instance_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_instance_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*DeleteInstanceResponse); i { case 0: return &v.state @@ -655,7 +655,7 @@ func file_aserto_tenant_v2_instance_proto_init() { return nil } } - file_aserto_tenant_v2_instance_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_instance_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*UpdateInstanceRequest); i { case 0: return &v.state @@ -667,7 +667,7 @@ func file_aserto_tenant_v2_instance_proto_init() { return nil } } - file_aserto_tenant_v2_instance_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_instance_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*UpdateInstanceResponse); i { case 0: return &v.state diff --git a/aserto/tenant/v2/instance.pb.gw.go b/aserto/tenant/v2/instance.pb.gw.go index 543f6c2..99240d1 100644 --- a/aserto/tenant/v2/instance.pb.gw.go +++ b/aserto/tenant/v2/instance.pb.gw.go @@ -139,6 +139,7 @@ func local_request_Instance_UpdateInstance_0(ctx context.Context, marshaler runt // UnaryRPC :call InstanceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterInstanceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterInstanceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InstanceServer) error { mux.Handle("POST", pattern_Instance_ListInstance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -247,21 +248,21 @@ func RegisterInstanceHandlerServer(ctx context.Context, mux *runtime.ServeMux, s // RegisterInstanceHandlerFromEndpoint is same as RegisterInstanceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterInstanceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -279,7 +280,7 @@ func RegisterInstanceHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InstanceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InstanceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "InstanceClient" to call the correct interceptors. +// "InstanceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterInstanceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InstanceClient) error { mux.Handle("POST", pattern_Instance_ListInstance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/tenant/v2/instance_grpc.pb.go b/aserto/tenant/v2/instance_grpc.pb.go index c50bc2f..30dac1d 100644 --- a/aserto/tenant/v2/instance_grpc.pb.go +++ b/aserto/tenant/v2/instance_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/tenant/v2/instance.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Instance_ListInstance_FullMethodName = "/aserto.tenant.v2.Instance/ListInstance" @@ -44,8 +44,9 @@ func NewInstanceClient(cc grpc.ClientConnInterface) InstanceClient { } func (c *instanceClient) ListInstance(ctx context.Context, in *ListInstanceRequest, opts ...grpc.CallOption) (*ListInstanceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListInstanceResponse) - err := c.cc.Invoke(ctx, Instance_ListInstance_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Instance_ListInstance_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -53,8 +54,9 @@ func (c *instanceClient) ListInstance(ctx context.Context, in *ListInstanceReque } func (c *instanceClient) CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*CreateInstanceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateInstanceResponse) - err := c.cc.Invoke(ctx, Instance_CreateInstance_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Instance_CreateInstance_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -62,8 +64,9 @@ func (c *instanceClient) CreateInstance(ctx context.Context, in *CreateInstanceR } func (c *instanceClient) DeleteInstance(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*DeleteInstanceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteInstanceResponse) - err := c.cc.Invoke(ctx, Instance_DeleteInstance_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Instance_DeleteInstance_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -71,8 +74,9 @@ func (c *instanceClient) DeleteInstance(ctx context.Context, in *DeleteInstanceR } func (c *instanceClient) UpdateInstance(ctx context.Context, in *UpdateInstanceRequest, opts ...grpc.CallOption) (*UpdateInstanceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateInstanceResponse) - err := c.cc.Invoke(ctx, Instance_UpdateInstance_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Instance_UpdateInstance_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -81,7 +85,7 @@ func (c *instanceClient) UpdateInstance(ctx context.Context, in *UpdateInstanceR // InstanceServer is the server API for Instance service. // All implementations should embed UnimplementedInstanceServer -// for forward compatibility +// for forward compatibility. type InstanceServer interface { ListInstance(context.Context, *ListInstanceRequest) (*ListInstanceResponse, error) CreateInstance(context.Context, *CreateInstanceRequest) (*CreateInstanceResponse, error) @@ -89,9 +93,12 @@ type InstanceServer interface { UpdateInstance(context.Context, *UpdateInstanceRequest) (*UpdateInstanceResponse, error) } -// UnimplementedInstanceServer should be embedded to have forward compatible implementations. -type UnimplementedInstanceServer struct { -} +// UnimplementedInstanceServer should 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 UnimplementedInstanceServer struct{} func (UnimplementedInstanceServer) ListInstance(context.Context, *ListInstanceRequest) (*ListInstanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListInstance not implemented") @@ -105,6 +112,7 @@ func (UnimplementedInstanceServer) DeleteInstance(context.Context, *DeleteInstan func (UnimplementedInstanceServer) UpdateInstance(context.Context, *UpdateInstanceRequest) (*UpdateInstanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateInstance not implemented") } +func (UnimplementedInstanceServer) testEmbeddedByValue() {} // UnsafeInstanceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to InstanceServer will @@ -114,6 +122,13 @@ type UnsafeInstanceServer interface { } func RegisterInstanceServer(s grpc.ServiceRegistrar, srv InstanceServer) { + // If the following call pancis, it indicates UnimplementedInstanceServer 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(&Instance_ServiceDesc, srv) } diff --git a/aserto/tenant/v2/policy.pb.go b/aserto/tenant/v2/policy.pb.go index 7532660..6637697 100644 --- a/aserto/tenant/v2/policy.pb.go +++ b/aserto/tenant/v2/policy.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/tenant/v2/policy.proto @@ -895,7 +895,7 @@ func file_aserto_tenant_v2_policy_proto_rawDescGZIP() []byte { } var file_aserto_tenant_v2_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_aserto_tenant_v2_policy_proto_goTypes = []interface{}{ +var file_aserto_tenant_v2_policy_proto_goTypes = []any{ (*CreatePolicyRequest)(nil), // 0: aserto.tenant.v2.CreatePolicyRequest (*CreatePolicyResponse)(nil), // 1: aserto.tenant.v2.CreatePolicyResponse (*ListPolicyFilter)(nil), // 2: aserto.tenant.v2.ListPolicyFilter @@ -952,7 +952,7 @@ func file_aserto_tenant_v2_policy_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_tenant_v2_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*CreatePolicyRequest); i { case 0: return &v.state @@ -964,7 +964,7 @@ func file_aserto_tenant_v2_policy_proto_init() { return nil } } - file_aserto_tenant_v2_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CreatePolicyResponse); i { case 0: return &v.state @@ -976,7 +976,7 @@ func file_aserto_tenant_v2_policy_proto_init() { return nil } } - file_aserto_tenant_v2_policy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ListPolicyFilter); i { case 0: return &v.state @@ -988,7 +988,7 @@ func file_aserto_tenant_v2_policy_proto_init() { return nil } } - file_aserto_tenant_v2_policy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ListPolicyRequest); i { case 0: return &v.state @@ -1000,7 +1000,7 @@ func file_aserto_tenant_v2_policy_proto_init() { return nil } } - file_aserto_tenant_v2_policy_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ListPolicyResponse); i { case 0: return &v.state @@ -1012,7 +1012,7 @@ func file_aserto_tenant_v2_policy_proto_init() { return nil } } - file_aserto_tenant_v2_policy_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*DeletePolicyRequest); i { case 0: return &v.state @@ -1024,7 +1024,7 @@ func file_aserto_tenant_v2_policy_proto_init() { return nil } } - file_aserto_tenant_v2_policy_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*DeletePolicyResponse); i { case 0: return &v.state @@ -1036,7 +1036,7 @@ func file_aserto_tenant_v2_policy_proto_init() { return nil } } - file_aserto_tenant_v2_policy_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*UpdatePolicyRequest); i { case 0: return &v.state @@ -1048,7 +1048,7 @@ func file_aserto_tenant_v2_policy_proto_init() { return nil } } - file_aserto_tenant_v2_policy_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*UpdatePolicyResponse); i { case 0: return &v.state @@ -1060,7 +1060,7 @@ func file_aserto_tenant_v2_policy_proto_init() { return nil } } - file_aserto_tenant_v2_policy_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*GetPolicyRequest); i { case 0: return &v.state @@ -1072,7 +1072,7 @@ func file_aserto_tenant_v2_policy_proto_init() { return nil } } - file_aserto_tenant_v2_policy_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*GetPolicyResponse); i { case 0: return &v.state @@ -1084,7 +1084,7 @@ func file_aserto_tenant_v2_policy_proto_init() { return nil } } - file_aserto_tenant_v2_policy_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*PolicyNameAvailableRequest); i { case 0: return &v.state @@ -1096,7 +1096,7 @@ func file_aserto_tenant_v2_policy_proto_init() { return nil } } - file_aserto_tenant_v2_policy_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*PolicyNameAvailableResponse); i { case 0: return &v.state @@ -1109,7 +1109,7 @@ func file_aserto_tenant_v2_policy_proto_init() { } } } - file_aserto_tenant_v2_policy_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_aserto_tenant_v2_policy_proto_msgTypes[2].OneofWrappers = []any{ (*ListPolicyFilter_NameStartsWith)(nil), (*ListPolicyFilter_NameEquals)(nil), } diff --git a/aserto/tenant/v2/policy.pb.gw.go b/aserto/tenant/v2/policy.pb.gw.go index 00062a7..f710551 100644 --- a/aserto/tenant/v2/policy.pb.gw.go +++ b/aserto/tenant/v2/policy.pb.gw.go @@ -331,6 +331,7 @@ func local_request_Policy_PolicyNameAvailable_0(ctx context.Context, marshaler r // UnaryRPC :call PolicyServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPolicyHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterPolicyHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PolicyServer) error { mux.Handle("GET", pattern_Policy_ListPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -489,21 +490,21 @@ func RegisterPolicyHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser // RegisterPolicyHandlerFromEndpoint is same as RegisterPolicyHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterPolicyHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -521,7 +522,7 @@ func RegisterPolicyHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PolicyClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PolicyClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PolicyClient" to call the correct interceptors. +// "PolicyClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterPolicyHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PolicyClient) error { mux.Handle("GET", pattern_Policy_ListPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/tenant/v2/policy_grpc.pb.go b/aserto/tenant/v2/policy_grpc.pb.go index 5cf9d52..0d7ed15 100644 --- a/aserto/tenant/v2/policy_grpc.pb.go +++ b/aserto/tenant/v2/policy_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/tenant/v2/policy.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Policy_ListPolicy_FullMethodName = "/aserto.tenant.v2.Policy/ListPolicy" @@ -48,8 +48,9 @@ func NewPolicyClient(cc grpc.ClientConnInterface) PolicyClient { } func (c *policyClient) ListPolicy(ctx context.Context, in *ListPolicyRequest, opts ...grpc.CallOption) (*ListPolicyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListPolicyResponse) - err := c.cc.Invoke(ctx, Policy_ListPolicy_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_ListPolicy_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -57,8 +58,9 @@ func (c *policyClient) ListPolicy(ctx context.Context, in *ListPolicyRequest, op } func (c *policyClient) CreatePolicy(ctx context.Context, in *CreatePolicyRequest, opts ...grpc.CallOption) (*CreatePolicyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreatePolicyResponse) - err := c.cc.Invoke(ctx, Policy_CreatePolicy_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_CreatePolicy_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -66,8 +68,9 @@ func (c *policyClient) CreatePolicy(ctx context.Context, in *CreatePolicyRequest } func (c *policyClient) 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, Policy_DeletePolicy_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_DeletePolicy_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -75,8 +78,9 @@ func (c *policyClient) DeletePolicy(ctx context.Context, in *DeletePolicyRequest } func (c *policyClient) UpdatePolicy(ctx context.Context, in *UpdatePolicyRequest, opts ...grpc.CallOption) (*UpdatePolicyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdatePolicyResponse) - err := c.cc.Invoke(ctx, Policy_UpdatePolicy_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_UpdatePolicy_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -84,8 +88,9 @@ func (c *policyClient) UpdatePolicy(ctx context.Context, in *UpdatePolicyRequest } func (c *policyClient) GetPolicy(ctx context.Context, in *GetPolicyRequest, opts ...grpc.CallOption) (*GetPolicyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPolicyResponse) - err := c.cc.Invoke(ctx, Policy_GetPolicy_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_GetPolicy_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -93,8 +98,9 @@ func (c *policyClient) GetPolicy(ctx context.Context, in *GetPolicyRequest, opts } func (c *policyClient) PolicyNameAvailable(ctx context.Context, in *PolicyNameAvailableRequest, opts ...grpc.CallOption) (*PolicyNameAvailableResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PolicyNameAvailableResponse) - err := c.cc.Invoke(ctx, Policy_PolicyNameAvailable_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Policy_PolicyNameAvailable_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -103,7 +109,7 @@ func (c *policyClient) PolicyNameAvailable(ctx context.Context, in *PolicyNameAv // PolicyServer is the server API for Policy service. // All implementations should embed UnimplementedPolicyServer -// for forward compatibility +// for forward compatibility. type PolicyServer interface { ListPolicy(context.Context, *ListPolicyRequest) (*ListPolicyResponse, error) CreatePolicy(context.Context, *CreatePolicyRequest) (*CreatePolicyResponse, error) @@ -113,9 +119,12 @@ type PolicyServer interface { PolicyNameAvailable(context.Context, *PolicyNameAvailableRequest) (*PolicyNameAvailableResponse, error) } -// UnimplementedPolicyServer should be embedded to have forward compatible implementations. -type UnimplementedPolicyServer struct { -} +// UnimplementedPolicyServer should 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 UnimplementedPolicyServer struct{} func (UnimplementedPolicyServer) ListPolicy(context.Context, *ListPolicyRequest) (*ListPolicyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPolicy not implemented") @@ -135,6 +144,7 @@ func (UnimplementedPolicyServer) GetPolicy(context.Context, *GetPolicyRequest) ( func (UnimplementedPolicyServer) PolicyNameAvailable(context.Context, *PolicyNameAvailableRequest) (*PolicyNameAvailableResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PolicyNameAvailable not implemented") } +func (UnimplementedPolicyServer) testEmbeddedByValue() {} // UnsafePolicyServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PolicyServer will @@ -144,6 +154,13 @@ type UnsafePolicyServer interface { } func RegisterPolicyServer(s grpc.ServiceRegistrar, srv PolicyServer) { + // If the following call pancis, it indicates UnimplementedPolicyServer 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(&Policy_ServiceDesc, srv) } diff --git a/aserto/tenant/v2/policy_state.pb.go b/aserto/tenant/v2/policy_state.pb.go index ba48cab..09d3624 100644 --- a/aserto/tenant/v2/policy_state.pb.go +++ b/aserto/tenant/v2/policy_state.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/tenant/v2/policy_state.proto @@ -307,7 +307,7 @@ func file_aserto_tenant_v2_policy_state_proto_rawDescGZIP() []byte { } var file_aserto_tenant_v2_policy_state_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_aserto_tenant_v2_policy_state_proto_goTypes = []interface{}{ +var file_aserto_tenant_v2_policy_state_proto_goTypes = []any{ (*GetPolicyStateRequest)(nil), // 0: aserto.tenant.v2.GetPolicyStateRequest (*GetPolicyStateResponse)(nil), // 1: aserto.tenant.v2.GetPolicyStateResponse (*SetPolicyStateRequest)(nil), // 2: aserto.tenant.v2.SetPolicyStateRequest @@ -335,7 +335,7 @@ func file_aserto_tenant_v2_policy_state_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_tenant_v2_policy_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_state_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*GetPolicyStateRequest); i { case 0: return &v.state @@ -347,7 +347,7 @@ func file_aserto_tenant_v2_policy_state_proto_init() { return nil } } - file_aserto_tenant_v2_policy_state_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_state_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*GetPolicyStateResponse); i { case 0: return &v.state @@ -359,7 +359,7 @@ func file_aserto_tenant_v2_policy_state_proto_init() { return nil } } - file_aserto_tenant_v2_policy_state_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_state_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*SetPolicyStateRequest); i { case 0: return &v.state @@ -371,7 +371,7 @@ func file_aserto_tenant_v2_policy_state_proto_init() { return nil } } - file_aserto_tenant_v2_policy_state_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_policy_state_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*SetPolicyStateResponse); i { case 0: return &v.state diff --git a/aserto/tenant/v2/policy_state.pb.gw.go b/aserto/tenant/v2/policy_state.pb.gw.go index 5754a7d..40459bb 100644 --- a/aserto/tenant/v2/policy_state.pb.gw.go +++ b/aserto/tenant/v2/policy_state.pb.gw.go @@ -113,6 +113,7 @@ func local_request_PolicyState_SetPolicyState_0(ctx context.Context, marshaler r // UnaryRPC :call PolicyStateServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPolicyStateHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterPolicyStateHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PolicyStateServer) error { mux.Handle("GET", pattern_PolicyState_GetPolicyState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -171,21 +172,21 @@ func RegisterPolicyStateHandlerServer(ctx context.Context, mux *runtime.ServeMux // RegisterPolicyStateHandlerFromEndpoint is same as RegisterPolicyStateHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterPolicyStateHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -203,7 +204,7 @@ func RegisterPolicyStateHandler(ctx context.Context, mux *runtime.ServeMux, conn // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PolicyStateClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PolicyStateClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PolicyStateClient" to call the correct interceptors. +// "PolicyStateClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterPolicyStateHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PolicyStateClient) error { mux.Handle("GET", pattern_PolicyState_GetPolicyState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/tenant/v2/policy_state_grpc.pb.go b/aserto/tenant/v2/policy_state_grpc.pb.go index ae6d5aa..298b3e9 100644 --- a/aserto/tenant/v2/policy_state_grpc.pb.go +++ b/aserto/tenant/v2/policy_state_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/tenant/v2/policy_state.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( PolicyState_GetPolicyState_FullMethodName = "/aserto.tenant.v2.PolicyState/GetPolicyState" @@ -40,8 +40,9 @@ func NewPolicyStateClient(cc grpc.ClientConnInterface) PolicyStateClient { } func (c *policyStateClient) GetPolicyState(ctx context.Context, in *GetPolicyStateRequest, opts ...grpc.CallOption) (*GetPolicyStateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPolicyStateResponse) - err := c.cc.Invoke(ctx, PolicyState_GetPolicyState_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PolicyState_GetPolicyState_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -49,8 +50,9 @@ func (c *policyStateClient) GetPolicyState(ctx context.Context, in *GetPolicySta } func (c *policyStateClient) SetPolicyState(ctx context.Context, in *SetPolicyStateRequest, opts ...grpc.CallOption) (*SetPolicyStateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetPolicyStateResponse) - err := c.cc.Invoke(ctx, PolicyState_SetPolicyState_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, PolicyState_SetPolicyState_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -59,15 +61,18 @@ func (c *policyStateClient) SetPolicyState(ctx context.Context, in *SetPolicySta // PolicyStateServer is the server API for PolicyState service. // All implementations should embed UnimplementedPolicyStateServer -// for forward compatibility +// for forward compatibility. type PolicyStateServer interface { GetPolicyState(context.Context, *GetPolicyStateRequest) (*GetPolicyStateResponse, error) SetPolicyState(context.Context, *SetPolicyStateRequest) (*SetPolicyStateResponse, error) } -// UnimplementedPolicyStateServer should be embedded to have forward compatible implementations. -type UnimplementedPolicyStateServer struct { -} +// UnimplementedPolicyStateServer should 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 UnimplementedPolicyStateServer struct{} func (UnimplementedPolicyStateServer) GetPolicyState(context.Context, *GetPolicyStateRequest) (*GetPolicyStateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPolicyState not implemented") @@ -75,6 +80,7 @@ func (UnimplementedPolicyStateServer) GetPolicyState(context.Context, *GetPolicy func (UnimplementedPolicyStateServer) SetPolicyState(context.Context, *SetPolicyStateRequest) (*SetPolicyStateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetPolicyState not implemented") } +func (UnimplementedPolicyStateServer) testEmbeddedByValue() {} // UnsafePolicyStateServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PolicyStateServer will @@ -84,6 +90,13 @@ type UnsafePolicyStateServer interface { } func RegisterPolicyStateServer(s grpc.ServiceRegistrar, srv PolicyStateServer) { + // If the following call pancis, it indicates UnimplementedPolicyStateServer 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(&PolicyState_ServiceDesc, srv) } diff --git a/aserto/tenant/v2/repository.pb.go b/aserto/tenant/v2/repository.pb.go index 12df795..ef84aa8 100644 --- a/aserto/tenant/v2/repository.pb.go +++ b/aserto/tenant/v2/repository.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/tenant/v2/repository.proto @@ -495,7 +495,7 @@ func file_aserto_tenant_v2_repository_proto_rawDescGZIP() []byte { } var file_aserto_tenant_v2_repository_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_aserto_tenant_v2_repository_proto_goTypes = []interface{}{ +var file_aserto_tenant_v2_repository_proto_goTypes = []any{ (*CreateRepositoryRequest)(nil), // 0: aserto.tenant.v2.CreateRepositoryRequest (*CreateRepositoryResponse)(nil), // 1: aserto.tenant.v2.CreateRepositoryResponse (*GetRepositoryRequest)(nil), // 2: aserto.tenant.v2.GetRepositoryRequest @@ -535,7 +535,7 @@ func file_aserto_tenant_v2_repository_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_tenant_v2_repository_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_repository_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*CreateRepositoryRequest); i { case 0: return &v.state @@ -547,7 +547,7 @@ func file_aserto_tenant_v2_repository_proto_init() { return nil } } - file_aserto_tenant_v2_repository_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_repository_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CreateRepositoryResponse); i { case 0: return &v.state @@ -559,7 +559,7 @@ func file_aserto_tenant_v2_repository_proto_init() { return nil } } - file_aserto_tenant_v2_repository_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_repository_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*GetRepositoryRequest); i { case 0: return &v.state @@ -571,7 +571,7 @@ func file_aserto_tenant_v2_repository_proto_init() { return nil } } - file_aserto_tenant_v2_repository_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_repository_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*GetRepositoryResponse); i { case 0: return &v.state @@ -583,7 +583,7 @@ func file_aserto_tenant_v2_repository_proto_init() { return nil } } - file_aserto_tenant_v2_repository_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_repository_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*DeleteRepositoryRequest); i { case 0: return &v.state @@ -595,7 +595,7 @@ func file_aserto_tenant_v2_repository_proto_init() { return nil } } - file_aserto_tenant_v2_repository_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_repository_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*DeleteRepositoryResponse); i { case 0: return &v.state @@ -607,7 +607,7 @@ func file_aserto_tenant_v2_repository_proto_init() { return nil } } - file_aserto_tenant_v2_repository_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_repository_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*UpdateRepositoryRequest); i { case 0: return &v.state @@ -619,7 +619,7 @@ func file_aserto_tenant_v2_repository_proto_init() { return nil } } - file_aserto_tenant_v2_repository_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_repository_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*UpdateRepositoryResponse); i { case 0: return &v.state diff --git a/aserto/tenant/v2/repository.pb.gw.go b/aserto/tenant/v2/repository.pb.gw.go index fdd6161..812c1ad 100644 --- a/aserto/tenant/v2/repository.pb.gw.go +++ b/aserto/tenant/v2/repository.pb.gw.go @@ -139,6 +139,7 @@ func local_request_Repository_UpdateRepository_0(ctx context.Context, marshaler // UnaryRPC :call RepositoryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRepositoryHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterRepositoryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RepositoryServer) error { mux.Handle("POST", pattern_Repository_GetRepository_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -247,21 +248,21 @@ func RegisterRepositoryHandlerServer(ctx context.Context, mux *runtime.ServeMux, // RegisterRepositoryHandlerFromEndpoint is same as RegisterRepositoryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterRepositoryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -279,7 +280,7 @@ func RegisterRepositoryHandler(ctx context.Context, mux *runtime.ServeMux, conn // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RepositoryClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RepositoryClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "RepositoryClient" to call the correct interceptors. +// "RepositoryClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterRepositoryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RepositoryClient) error { mux.Handle("POST", pattern_Repository_GetRepository_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/tenant/v2/repository_grpc.pb.go b/aserto/tenant/v2/repository_grpc.pb.go index 46e5950..761750f 100644 --- a/aserto/tenant/v2/repository_grpc.pb.go +++ b/aserto/tenant/v2/repository_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/tenant/v2/repository.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Repository_GetRepository_FullMethodName = "/aserto.tenant.v2.Repository/GetRepository" @@ -44,8 +44,9 @@ func NewRepositoryClient(cc grpc.ClientConnInterface) RepositoryClient { } func (c *repositoryClient) GetRepository(ctx context.Context, in *GetRepositoryRequest, opts ...grpc.CallOption) (*GetRepositoryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetRepositoryResponse) - err := c.cc.Invoke(ctx, Repository_GetRepository_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Repository_GetRepository_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -53,8 +54,9 @@ func (c *repositoryClient) GetRepository(ctx context.Context, in *GetRepositoryR } func (c *repositoryClient) CreateRepository(ctx context.Context, in *CreateRepositoryRequest, opts ...grpc.CallOption) (*CreateRepositoryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateRepositoryResponse) - err := c.cc.Invoke(ctx, Repository_CreateRepository_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Repository_CreateRepository_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -62,8 +64,9 @@ func (c *repositoryClient) CreateRepository(ctx context.Context, in *CreateRepos } func (c *repositoryClient) DeleteRepository(ctx context.Context, in *DeleteRepositoryRequest, opts ...grpc.CallOption) (*DeleteRepositoryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteRepositoryResponse) - err := c.cc.Invoke(ctx, Repository_DeleteRepository_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Repository_DeleteRepository_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -71,8 +74,9 @@ func (c *repositoryClient) DeleteRepository(ctx context.Context, in *DeleteRepos } func (c *repositoryClient) UpdateRepository(ctx context.Context, in *UpdateRepositoryRequest, opts ...grpc.CallOption) (*UpdateRepositoryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateRepositoryResponse) - err := c.cc.Invoke(ctx, Repository_UpdateRepository_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Repository_UpdateRepository_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -81,7 +85,7 @@ func (c *repositoryClient) UpdateRepository(ctx context.Context, in *UpdateRepos // RepositoryServer is the server API for Repository service. // All implementations should embed UnimplementedRepositoryServer -// for forward compatibility +// for forward compatibility. type RepositoryServer interface { GetRepository(context.Context, *GetRepositoryRequest) (*GetRepositoryResponse, error) CreateRepository(context.Context, *CreateRepositoryRequest) (*CreateRepositoryResponse, error) @@ -89,9 +93,12 @@ type RepositoryServer interface { UpdateRepository(context.Context, *UpdateRepositoryRequest) (*UpdateRepositoryResponse, error) } -// UnimplementedRepositoryServer should be embedded to have forward compatible implementations. -type UnimplementedRepositoryServer struct { -} +// UnimplementedRepositoryServer should 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 UnimplementedRepositoryServer struct{} func (UnimplementedRepositoryServer) GetRepository(context.Context, *GetRepositoryRequest) (*GetRepositoryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRepository not implemented") @@ -105,6 +112,7 @@ func (UnimplementedRepositoryServer) DeleteRepository(context.Context, *DeleteRe func (UnimplementedRepositoryServer) UpdateRepository(context.Context, *UpdateRepositoryRequest) (*UpdateRepositoryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateRepository not implemented") } +func (UnimplementedRepositoryServer) testEmbeddedByValue() {} // UnsafeRepositoryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to RepositoryServer will @@ -114,6 +122,13 @@ type UnsafeRepositoryServer interface { } func RegisterRepositoryServer(s grpc.ServiceRegistrar, srv RepositoryServer) { + // If the following call pancis, it indicates UnimplementedRepositoryServer 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(&Repository_ServiceDesc, srv) } diff --git a/aserto/tenant/v2/source.pb.go b/aserto/tenant/v2/source.pb.go index 55fba48..788fe11 100644 --- a/aserto/tenant/v2/source.pb.go +++ b/aserto/tenant/v2/source.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/tenant/v2/source.proto @@ -497,7 +497,7 @@ func file_aserto_tenant_v2_source_proto_rawDescGZIP() []byte { } var file_aserto_tenant_v2_source_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_aserto_tenant_v2_source_proto_goTypes = []interface{}{ +var file_aserto_tenant_v2_source_proto_goTypes = []any{ (*CreateSourceRequest)(nil), // 0: aserto.tenant.v2.CreateSourceRequest (*CreateSourceResponse)(nil), // 1: aserto.tenant.v2.CreateSourceResponse (*GetSourceRequest)(nil), // 2: aserto.tenant.v2.GetSourceRequest @@ -537,7 +537,7 @@ func file_aserto_tenant_v2_source_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_tenant_v2_source_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_source_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*CreateSourceRequest); i { case 0: return &v.state @@ -549,7 +549,7 @@ func file_aserto_tenant_v2_source_proto_init() { return nil } } - file_aserto_tenant_v2_source_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_source_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CreateSourceResponse); i { case 0: return &v.state @@ -561,7 +561,7 @@ func file_aserto_tenant_v2_source_proto_init() { return nil } } - file_aserto_tenant_v2_source_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_source_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*GetSourceRequest); i { case 0: return &v.state @@ -573,7 +573,7 @@ func file_aserto_tenant_v2_source_proto_init() { return nil } } - file_aserto_tenant_v2_source_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_source_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*GetSourceResponse); i { case 0: return &v.state @@ -585,7 +585,7 @@ func file_aserto_tenant_v2_source_proto_init() { return nil } } - file_aserto_tenant_v2_source_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_source_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*DeleteSourceRequest); i { case 0: return &v.state @@ -597,7 +597,7 @@ func file_aserto_tenant_v2_source_proto_init() { return nil } } - file_aserto_tenant_v2_source_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_source_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*DeleteSourceResponse); i { case 0: return &v.state @@ -609,7 +609,7 @@ func file_aserto_tenant_v2_source_proto_init() { return nil } } - file_aserto_tenant_v2_source_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_source_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*UpdateSourceRequest); i { case 0: return &v.state @@ -621,7 +621,7 @@ func file_aserto_tenant_v2_source_proto_init() { return nil } } - file_aserto_tenant_v2_source_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_source_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*UpdateSourceResponse); i { case 0: return &v.state diff --git a/aserto/tenant/v2/source.pb.gw.go b/aserto/tenant/v2/source.pb.gw.go index 8b9100d..c75e2a2 100644 --- a/aserto/tenant/v2/source.pb.gw.go +++ b/aserto/tenant/v2/source.pb.gw.go @@ -139,6 +139,7 @@ func local_request_Source_UpdateSource_0(ctx context.Context, marshaler runtime. // UnaryRPC :call SourceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSourceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterSourceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SourceServer) error { mux.Handle("POST", pattern_Source_GetSource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -247,21 +248,21 @@ func RegisterSourceHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser // RegisterSourceHandlerFromEndpoint is same as RegisterSourceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterSourceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -279,7 +280,7 @@ func RegisterSourceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SourceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SourceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "SourceClient" to call the correct interceptors. +// "SourceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterSourceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SourceClient) error { mux.Handle("POST", pattern_Source_GetSource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/tenant/v2/source_grpc.pb.go b/aserto/tenant/v2/source_grpc.pb.go index da18e6b..5b04cf7 100644 --- a/aserto/tenant/v2/source_grpc.pb.go +++ b/aserto/tenant/v2/source_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/tenant/v2/source.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Source_GetSource_FullMethodName = "/aserto.tenant.v2.Source/GetSource" @@ -44,8 +44,9 @@ func NewSourceClient(cc grpc.ClientConnInterface) SourceClient { } func (c *sourceClient) 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, Source_GetSource_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Source_GetSource_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -53,8 +54,9 @@ func (c *sourceClient) GetSource(ctx context.Context, in *GetSourceRequest, opts } func (c *sourceClient) CreateSource(ctx context.Context, in *CreateSourceRequest, opts ...grpc.CallOption) (*CreateSourceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateSourceResponse) - err := c.cc.Invoke(ctx, Source_CreateSource_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Source_CreateSource_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -62,8 +64,9 @@ func (c *sourceClient) CreateSource(ctx context.Context, in *CreateSourceRequest } func (c *sourceClient) 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, Source_DeleteSource_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Source_DeleteSource_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -71,8 +74,9 @@ func (c *sourceClient) DeleteSource(ctx context.Context, in *DeleteSourceRequest } func (c *sourceClient) UpdateSource(ctx context.Context, in *UpdateSourceRequest, opts ...grpc.CallOption) (*UpdateSourceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateSourceResponse) - err := c.cc.Invoke(ctx, Source_UpdateSource_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Source_UpdateSource_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -81,7 +85,7 @@ func (c *sourceClient) UpdateSource(ctx context.Context, in *UpdateSourceRequest // SourceServer is the server API for Source service. // All implementations should embed UnimplementedSourceServer -// for forward compatibility +// for forward compatibility. type SourceServer interface { GetSource(context.Context, *GetSourceRequest) (*GetSourceResponse, error) CreateSource(context.Context, *CreateSourceRequest) (*CreateSourceResponse, error) @@ -89,9 +93,12 @@ type SourceServer interface { UpdateSource(context.Context, *UpdateSourceRequest) (*UpdateSourceResponse, error) } -// UnimplementedSourceServer should be embedded to have forward compatible implementations. -type UnimplementedSourceServer struct { -} +// UnimplementedSourceServer should 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 UnimplementedSourceServer struct{} func (UnimplementedSourceServer) GetSource(context.Context, *GetSourceRequest) (*GetSourceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSource not implemented") @@ -105,6 +112,7 @@ func (UnimplementedSourceServer) DeleteSource(context.Context, *DeleteSourceRequ func (UnimplementedSourceServer) UpdateSource(context.Context, *UpdateSourceRequest) (*UpdateSourceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateSource not implemented") } +func (UnimplementedSourceServer) testEmbeddedByValue() {} // UnsafeSourceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to SourceServer will @@ -114,6 +122,13 @@ type UnsafeSourceServer interface { } func RegisterSourceServer(s grpc.ServiceRegistrar, srv SourceServer) { + // If the following call pancis, it indicates UnimplementedSourceServer 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(&Source_ServiceDesc, srv) } diff --git a/aserto/tenant/v2/tenant.pb.go b/aserto/tenant/v2/tenant.pb.go index 41bcb63..4234012 100644 --- a/aserto/tenant/v2/tenant.pb.go +++ b/aserto/tenant/v2/tenant.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: aserto/tenant/v2/tenant.proto @@ -154,7 +154,7 @@ func file_aserto_tenant_v2_tenant_proto_rawDescGZIP() []byte { } var file_aserto_tenant_v2_tenant_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_aserto_tenant_v2_tenant_proto_goTypes = []interface{}{ +var file_aserto_tenant_v2_tenant_proto_goTypes = []any{ (*DeleteTenantRequest)(nil), // 0: aserto.tenant.v2.DeleteTenantRequest (*DeleteTenantResponse)(nil), // 1: aserto.tenant.v2.DeleteTenantResponse } @@ -174,7 +174,7 @@ func file_aserto_tenant_v2_tenant_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_aserto_tenant_v2_tenant_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_tenant_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*DeleteTenantRequest); i { case 0: return &v.state @@ -186,7 +186,7 @@ func file_aserto_tenant_v2_tenant_proto_init() { return nil } } - file_aserto_tenant_v2_tenant_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_aserto_tenant_v2_tenant_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*DeleteTenantResponse); i { case 0: return &v.state diff --git a/aserto/tenant/v2/tenant.pb.gw.go b/aserto/tenant/v2/tenant.pb.gw.go index a5b28a9..b7b948a 100644 --- a/aserto/tenant/v2/tenant.pb.gw.go +++ b/aserto/tenant/v2/tenant.pb.gw.go @@ -53,6 +53,7 @@ func local_request_Tenant_DeleteTenant_0(ctx context.Context, marshaler runtime. // UnaryRPC :call TenantServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTenantHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterTenantHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TenantServer) error { mux.Handle("DELETE", pattern_Tenant_DeleteTenant_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -86,21 +87,21 @@ func RegisterTenantHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser // RegisterTenantHandlerFromEndpoint is same as RegisterTenantHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterTenantHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -118,7 +119,7 @@ func RegisterTenantHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TenantClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TenantClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "TenantClient" to call the correct interceptors. +// "TenantClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterTenantHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TenantClient) error { mux.Handle("DELETE", pattern_Tenant_DeleteTenant_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/aserto/tenant/v2/tenant_grpc.pb.go b/aserto/tenant/v2/tenant_grpc.pb.go index 1880d41..4502856 100644 --- a/aserto/tenant/v2/tenant_grpc.pb.go +++ b/aserto/tenant/v2/tenant_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: aserto/tenant/v2/tenant.proto @@ -15,8 +15,8 @@ import ( // 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.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Tenant_DeleteTenant_FullMethodName = "/aserto.tenant.v2.Tenant/DeleteTenant" @@ -38,8 +38,9 @@ func NewTenantClient(cc grpc.ClientConnInterface) TenantClient { } func (c *tenantClient) DeleteTenant(ctx context.Context, in *DeleteTenantRequest, opts ...grpc.CallOption) (*DeleteTenantResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteTenantResponse) - err := c.cc.Invoke(ctx, Tenant_DeleteTenant_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Tenant_DeleteTenant_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -48,18 +49,22 @@ func (c *tenantClient) DeleteTenant(ctx context.Context, in *DeleteTenantRequest // TenantServer is the server API for Tenant service. // All implementations should embed UnimplementedTenantServer -// for forward compatibility +// for forward compatibility. type TenantServer interface { DeleteTenant(context.Context, *DeleteTenantRequest) (*DeleteTenantResponse, error) } -// UnimplementedTenantServer should be embedded to have forward compatible implementations. -type UnimplementedTenantServer struct { -} +// UnimplementedTenantServer should 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 UnimplementedTenantServer struct{} func (UnimplementedTenantServer) DeleteTenant(context.Context, *DeleteTenantRequest) (*DeleteTenantResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteTenant not implemented") } +func (UnimplementedTenantServer) testEmbeddedByValue() {} // UnsafeTenantServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TenantServer will @@ -69,6 +74,13 @@ type UnsafeTenantServer interface { } func RegisterTenantServer(s grpc.ServiceRegistrar, srv TenantServer) { + // If the following call pancis, it indicates UnimplementedTenantServer 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(&Tenant_ServiceDesc, srv) } diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 0000000..f27003f --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,16 @@ +version: v2 +plugins: + - remote: buf.build/protocolbuffers/go:v1.34.2 + out: . + opt: paths=source_relative + - remote: buf.build/grpc/go:v1.5.1 + out: . + opt: + - paths=source_relative + - require_unimplemented_servers=false + - remote: buf.build/grpc-ecosystem/gateway:v2.21.0 + out: . + opt: + - paths=source_relative + - logtostderr=true + - generate_unbound_methods=true diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 0000000..c51effb --- /dev/null +++ b/buf.yaml @@ -0,0 +1,24 @@ +version: v2 +deps: + - buf.build/aserto-dev/aserto +lint: + use: + - DEFAULT + except: + - FIELD_NOT_REQUIRED + - PACKAGE_DIRECTORY_MATCH + - PACKAGE_NO_IMPORT_CYCLE + - PACKAGE_VERSION_SUFFIX + - SERVICE_SUFFIX + enum_zero_value_suffix: _UNKNOWN + disallow_comment_ignores: true +breaking: + use: + - FILE + - PACKAGE + - WIRE + - WIRE_JSON + except: + - EXTENSION_NO_DELETE + - FIELD_SAME_DEFAULT + - PACKAGE_EXTENSION_NO_DELETE diff --git a/buf/buf.gen.yaml b/buf/buf.gen.yaml deleted file mode 100644 index d4f4491..0000000 --- a/buf/buf.gen.yaml +++ /dev/null @@ -1,11 +0,0 @@ -version: v1 -plugins: - - name: go - out: . - opt: paths=source_relative - - name: go-grpc - out: . - opt: paths=source_relative,require_unimplemented_servers=false - - name: grpc-gateway - out: . - opt: paths=source_relative,logtostderr=true,generate_unbound_methods=true diff --git a/go.mod b/go.mod index 3e4d21b..4545156 100644 --- a/go.mod +++ b/go.mod @@ -2,19 +2,16 @@ module github.com/aserto-dev/go-grpc go 1.21 -// replace github.com/aserto-dev/mage-loot => ../mage-loot - require ( - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 - github.com/magefile/mage v1.15.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240506185236-b8a5c65736ae - google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae - google.golang.org/grpc v1.63.2 - google.golang.org/protobuf v1.34.1 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240805194559-2c9e96a0b5d4 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240805194559-2c9e96a0b5d4 + google.golang.org/grpc v1.65.0 + google.golang.org/protobuf v1.34.2 ) require ( - golang.org/x/net v0.25.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect ) diff --git a/go.sum b/go.sum index 10a9a69..3afb0aa 100644 --- a/go.sum +++ b/go.sum @@ -1,20 +1,18 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= -github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg= -github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -google.golang.org/genproto/googleapis/api v0.0.0-20240506185236-b8a5c65736ae h1:AH34z6WAGVNkllnKs5raNq3yRq93VnjBG6rpfub/jYk= -google.golang.org/genproto/googleapis/api v0.0.0-20240506185236-b8a5c65736ae/go.mod h1:FfiGhwUm6CJviekPrc0oJ+7h29e+DmWU6UtjX0ZvI7Y= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae h1:c55+MER4zkBS14uJhSZMGGmya0yJx5iHV4x/fpOSNRk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 h1:CWyXh/jylQWp2dtiV33mY4iSSp6yf4lmn+c7/tN+ObI= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0/go.mod h1:nCLIt0w3Ept2NwF8ThLmrppXsfT07oC8k0XNDxd8sVU= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +google.golang.org/genproto/googleapis/api v0.0.0-20240805194559-2c9e96a0b5d4 h1:ABEBT/sZ7We8zd7A5f3KO6zMQe+s3901H7l8Whhijt0= +google.golang.org/genproto/googleapis/api v0.0.0-20240805194559-2c9e96a0b5d4/go.mod h1:4+X6GvPs+25wZKbQq9qyAXrwIRExv7w0Ea6MgZLZiDM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240805194559-2c9e96a0b5d4 h1:OsSGQeIIsyOEOimVxLEIL4rwGcnrjOydQaiA2bOnZUM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240805194559-2c9e96a0b5d4/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= diff --git a/go.work b/go.work deleted file mode 100644 index d2f27f2..0000000 --- a/go.work +++ /dev/null @@ -1,6 +0,0 @@ -go 1.21 - -use ( - . - ./magefiles -) diff --git a/mage.go b/mage.go deleted file mode 100644 index 76ad7e4..0000000 --- a/mage.go +++ /dev/null @@ -1,13 +0,0 @@ -// +build zeroinstall - -package main - -import ( - "os" - - "github.com/magefile/mage/mage" -) - -func main() { - os.Exit(mage.Main()) -} diff --git a/magefiles/go.mod b/magefiles/go.mod deleted file mode 100644 index c068754..0000000 --- a/magefiles/go.mod +++ /dev/null @@ -1,48 +0,0 @@ -module github.com/aserto-dev/go-grpc/magefiles - -go 1.21 - -require github.com/aserto-dev/mage-loot v0.8.15 - -require ( - github.com/OneOfOne/xxhash v1.2.8 // indirect - github.com/allegro/bigcache/v3 v3.0.2 // indirect - github.com/aserto-dev/clui v0.8.1 // indirect - github.com/fatih/color v1.13.0 // indirect - github.com/fsnotify/fsnotify v1.5.4 // indirect - github.com/gitleaks/go-gitdiff v0.7.4 // indirect - github.com/go-test/deep v1.0.8 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/imdario/mergo v0.3.13 // indirect - github.com/kyokomi/emoji v2.2.4+incompatible // indirect - github.com/magefile/mage v1.14.0 // indirect - github.com/magiconair/properties v1.8.6 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect - github.com/mattn/go-runewidth v0.0.13 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.5 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/rivo/uniseg v0.2.0 // indirect - github.com/rs/zerolog v1.25.0 // indirect - github.com/spf13/afero v1.8.2 // indirect - github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.13.0 // indirect - github.com/subosito/gotenv v1.4.1 // indirect - github.com/tidwall/gjson v1.14.3 // indirect - github.com/tidwall/match v1.1.1 // indirect - github.com/tidwall/pretty v1.2.0 // indirect - github.com/ulikunitz/xz v0.5.10 // indirect - github.com/zricethezav/gitleaks/v8 v8.3.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect - golang.org/x/text v0.3.7 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/magefiles/go.sum b/magefiles/go.sum deleted file mode 100644 index 4eecf27..0000000 --- a/magefiles/go.sum +++ /dev/null @@ -1,549 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= -github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= -github.com/allegro/bigcache/v3 v3.0.2 h1:AKZCw+5eAaVyNTBmI2fgyPVJhHkdWder3O9IrprcQfI= -github.com/allegro/bigcache/v3 v3.0.2/go.mod h1:aPyh7jEvrog9zAwx5N7+JUQX5dZTSGpxF1LAR4dr35I= -github.com/aserto-dev/clui v0.8.1 h1:5IW9OnFZoIWjvnmTE4FNTXrjP1wnMzd39qKAcRnRHt8= -github.com/aserto-dev/clui v0.8.1/go.mod h1:XpJxwNzSQaGN6rqXONZJEaeez4MUaCPikM2lKSngrXM= -github.com/aserto-dev/mage-loot v0.8.15 h1:tSYfLLkRqJ37YW/mQxnIeqlVv5TJw7o8NaKfXios0Wc= -github.com/aserto-dev/mage-loot v0.8.15/go.mod h1:Oi7gxbSzxC4qlCMUaiNHWLE1DjmcMTk96fzFHNN/bsc= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/gitleaks/go-gitdiff v0.7.4 h1:8vICc4moyRR2poklblThdQ0ckMet22mEvFJSxPsiDlk= -github.com/gitleaks/go-gitdiff v0.7.4/go.mod h1:pKz0X4YzCKZs30BL+weqBIG7mx0jl4tF1uXV9ZyNvrA= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= -github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kyokomi/emoji v2.2.4+incompatible h1:np0woGKwx9LiHAQmwZx79Oc0rHpNw3o+3evou4BEPv4= -github.com/kyokomi/emoji v2.2.4+incompatible/go.mod h1:mZ6aGCD7yk8j6QY6KICwnZ2pxoszVseX1DNoGtU2tBA= -github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo= -github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= -github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.25.0 h1:Rj7XygbUHKUlDPcVdoLyR91fJBsduXj5fRxyqIQj/II= -github.com/rs/zerolog v1.25.0/go.mod h1:7KHcEGe0QZPOm2IE4Kpb5rTh6n1h2hIgS5OOnu1rUaI= -github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= -github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= -github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= -github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/tidwall/gjson v1.14.3 h1:9jvXn7olKEHU1S9vwoMGliaT8jq1vJ7IH/n9zD9Dnlw= -github.com/tidwall/gjson v1.14.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= -github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= -github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= -github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/zricethezav/gitleaks/v8 v8.3.0 h1:3Pw5kSbypWCLXCvPeKdXM66hLNg10nSbBJNzNPfwgfI= -github.com/zricethezav/gitleaks/v8 v8.3.0/go.mod h1:dqPs8vOMHWGj6iJyhQbkAosZuSDHtwxpkbdjfZ+qd4U= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/magefiles/magefile.go b/magefiles/magefile.go deleted file mode 100644 index ad1546b..0000000 --- a/magefiles/magefile.go +++ /dev/null @@ -1,139 +0,0 @@ -//go:build mage -// +build mage - -package main - -import ( - "fmt" - "io/ioutil" - "os" - "path/filepath" - "strings" - - "github.com/aserto-dev/mage-loot/buf" - "github.com/aserto-dev/mage-loot/deps" - "github.com/aserto-dev/mage-loot/fsutil" - "github.com/aserto-dev/mage-loot/mage" -) - -func All() error { - Deps() - err := Clean() - if err != nil { - return err - } - return Generate() -} - -// install required dependencies. -func Deps() { - deps.GetAllDeps() -} - -// Generate go code -func Generate() error { - bufImage := "buf.build/aserto-dev/aserto" - - tag, err := buf.GetLatestTag(bufImage) - if err != nil { - fmt.Println("Could not retrieve tags, using latest") - } else { - bufImage = fmt.Sprintf("%s:%s", bufImage, tag.Name) - } - - return gen(bufImage, bufImage) -} - -// Generates from a dev build. -func GenerateDev() error { - err := BuildDev() - if err != nil { - return err - } - - bufImage := filepath.Join(getProtoRepo(), "bin", "aserto.bin#format=bin") - fileSources := filepath.Join(getProtoRepo(), "public#format=dir") - - return gen(bufImage, fileSources) -} - -// Builds the aserto proto image -func BuildDev() error { - return mage.RunDir(getProtoRepo(), mage.AddArg("build")) -} - -func getProtoRepo() string { - protoRepo := os.Getenv("PROTO_REPO") - if protoRepo == "" { - protoRepo = "../proto" - } - return protoRepo -} - -func gen(bufImage, fileSources string) error { - - files, err := getClientFiles(fileSources) - if err != nil { - return err - } - - oldPath := os.Getenv("PATH") - - pathSeparator := string(os.PathListSeparator) - path := oldPath + - pathSeparator + - filepath.Dir(deps.GoBinPath("protoc-gen-go-grpc")) + - pathSeparator + - filepath.Dir(deps.GoBinPath("protoc-gen-grpc-gateway")) + - pathSeparator + - filepath.Dir(deps.GoBinPath("protoc-gen-go")) - - return buf.RunWithEnv(map[string]string{ - "PATH": path, - }, - buf.AddArg("generate"), - buf.AddArg("--template"), - buf.AddArg(filepath.Join("buf", "buf.gen.yaml")), - buf.AddArg(bufImage), - buf.AddPaths(files), - ) -} - -func getClientFiles(fileSources string) ([]string, error) { - var clientFiles []string - - bufExportDir, err := ioutil.TempDir("", "bufimage") - if err != nil { - return clientFiles, err - } - bufExportDir = filepath.Join(bufExportDir, "") - - defer os.RemoveAll(bufExportDir) - err = buf.Run( - buf.AddArg("export"), - buf.AddArg(fileSources), - buf.AddArg("--exclude-imports"), - buf.AddArg("-o"), - buf.AddArg(bufExportDir), - ) - if err != nil { - return clientFiles, err - } - excludePattern := filepath.Join(bufExportDir, "aserto", "authorizer", "authorizer", "**", "*.proto") - - protoFiles, err := fsutil.Glob(filepath.Join(bufExportDir, "aserto", "**", "*.proto"), excludePattern) - if err != nil { - return clientFiles, err - } - - for _, protoFile := range protoFiles { - clientFiles = append(clientFiles, strings.TrimPrefix(protoFile, bufExportDir+string(filepath.Separator))) - } - - return clientFiles, nil -} - -// Removes generated files -func Clean() error { - return os.RemoveAll("aserto") -} diff --git a/makefile b/makefile new file mode 100644 index 0000000..bdeeb53 --- /dev/null +++ b/makefile @@ -0,0 +1,175 @@ +SHELL := $(shell which bash) + +NO_COLOR := \033[0m +OK_COLOR := \033[32;01m +ERR_COLOR := \033[31;01m +WARN_COLOR := \033[36;01m +ATTN_COLOR := \033[33;01m + +GOOS := $(shell go env GOOS) +GOARCH := $(shell go env GOARCH) +GOPRIVATE := "github.com/aserto-dev" + +BIN_DIR := ./bin +EXT_DIR := ./.ext +EXT_BIN_DIR := ${EXT_DIR}/bin +EXT_TMP_DIR := ${EXT_DIR}/tmp + +VAULT_VERSION := 1.8.12 +SVU_VERSION := 1.12.0 +WIRE_VERSION := 0.6.0 +BUF_VERSION := 1.34.0 +GOTESTSUM_VERSION := 1.11.0 +GOLANGCI-LINT_VERSION := 1.56.2 +GORELEASER_VERSION := 1.24.0 + +PROJECT := aserto +BUF_USER := $(shell vault kv get -field ASERTO_BUF_USER kv/buf.build) +BUF_TOKEN := $(shell vault kv get -field ASERTO_BUF_TOKEN kv/buf.build) +BUF_REPO := "buf.build/aserto-dev/${PROJECT}" +BUF_LATEST := $(shell BUF_BETA_SUPPRESS_WARNINGS=1 ${EXT_BIN_DIR}/buf beta registry label list ${BUF_REPO} --format json --reverse | jq -r '.results[0].name') +BUF_DEV_IMAGE := "${PROJECT}-public.bin" +PROTO_REPO := "proto" + +GIT_ORG := "https://github.com/aserto-dev" + +RELEASE_TAG := $$(svu) + +.PHONY: deps +deps: info install-vault install-buf install-svu install-golangci-lint install-gotestsum + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + +.PHONY: build +build: + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @${EXT_BIN_DIR}/goreleaser build --clean --snapshot --single-target + +lint: + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @${EXT_BIN_DIR}/golangci-lint run --config ${PWD}/.golangci.yaml + +test: + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @${EXT_BIN_DIR}/gotestsum --format short-verbose -- -count=1 -v ${PWD}/... -coverprofile=cover.out -coverpkg=./... ${PWD}/... + +.PHONY: vault-login +vault-login: + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @vault login -method=github token=$$(gh auth token) + +.PHONY: buf-login +buf-login: + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @echo ${BUF_TOKEN} | ${EXT_BIN_DIR}/buf registry login --username ${BUF_USER} --token-stdin + +.PHONY: buf-generate +buf-generate: + @echo -e "$(ATTN_COLOR)==> $@ ${BUF_REPO}:${BUF_LATEST}$(NO_COLOR)" + @${EXT_BIN_DIR}/buf generate ${BUF_REPO}:${BUF_LATEST} + +.PHONY: buf-generate-dev +buf-generate-dev: + @echo -e "$(ATTN_COLOR)==> $@ ../${PROTO_REPO}/bin/${BUF_DEV_IMAGE}$(NO_COLOR)" + @${EXT_BIN_DIR}/buf generate "../${PROTO_REPO}/bin/${BUF_DEV_IMAGE}" + +.PHONY: info +info: + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @echo "PROJECT: ${PROJECT}" + @echo "GOOS: ${GOOS}" + @echo "GOARCH: ${GOARCH}" + @echo "BIN_DIR: ${BIN_DIR}" + @echo "EXT_DIR: ${EXT_DIR}" + @echo "EXT_BIN_DIR: ${EXT_BIN_DIR}" + @echo "EXT_TMP_DIR: ${EXT_TMP_DIR}" + @echo "RELEASE_TAG: ${RELEASE_TAG}" + @echo "BUF_REPO: ${BUF_REPO}" + @echo "BUF_LATEST: ${BUF_LATEST}" + @echo "BUF_DEV_IMAGE: ${BUF_DEV_IMAGE}" + @echo "PROTO_REPO: ${PROTO_REPO}" + +.PHONY: install-vault +install-vault: ${EXT_BIN_DIR} ${EXT_TMP_DIR} + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @curl -s -o ${EXT_TMP_DIR}/vault.zip https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_${GOOS}_${GOARCH}.zip + @unzip -o ${EXT_TMP_DIR}/vault.zip vault -d ${EXT_BIN_DIR}/ &> /dev/null + @chmod +x ${EXT_BIN_DIR}/vault + @${EXT_BIN_DIR}/vault --version + +.PHONY: install-buf +install-buf: ${EXT_BIN_DIR} + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @gh release download v${BUF_VERSION} --repo https://github.com/bufbuild/buf --pattern "buf-$$(uname -s)-$$(uname -m)" --output "${EXT_BIN_DIR}/buf" --clobber + @chmod +x ${EXT_BIN_DIR}/buf + @${EXT_BIN_DIR}/buf --version + +.PHONY: install-svu +install-svu: install-svu-${GOOS} + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @chmod +x ${EXT_BIN_DIR}/svu + @${EXT_BIN_DIR}/svu --version + +.PHONY: install-svu-darwin +install-svu-darwin: ${EXT_TMP_DIR} ${EXT_BIN_DIR} + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @gh release download --repo https://github.com/caarlos0/svu --pattern "svu_*_darwin_all.tar.gz" --output "${EXT_TMP_DIR}/svu.tar.gz" --clobber + @tar -xvf ${EXT_TMP_DIR}/svu.tar.gz --directory ${EXT_BIN_DIR} svu &> /dev/null + +.PHONY: install-svu-linux +install-svu-linux: ${EXT_TMP_DIR} ${EXT_BIN_DIR} + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @gh release download --repo https://github.com/caarlos0/svu --pattern "svu_*_linux_${GOARCH}.tar.gz" --output "${EXT_TMP_DIR}/svu.tar.gz" --clobber + @tar -xvf ${EXT_TMP_DIR}/svu.tar.gz --directory ${EXT_BIN_DIR} svu &> /dev/null + +.PHONY: install-gotestsum +install-gotestsum: ${EXT_TMP_DIR} ${EXT_BIN_DIR} + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @gh release download v${GOTESTSUM_VERSION} --repo https://github.com/gotestyourself/gotestsum --pattern "gotestsum_${GOTESTSUM_VERSION}_${GOOS}_${GOARCH}.tar.gz" --output "${EXT_TMP_DIR}/gotestsum.tar.gz" --clobber + @tar -xvf ${EXT_TMP_DIR}/gotestsum.tar.gz --directory ${EXT_BIN_DIR} gotestsum &> /dev/null + @chmod +x ${EXT_BIN_DIR}/gotestsum + @${EXT_BIN_DIR}/gotestsum --version + +.PHONY: install-golangci-lint +install-golangci-lint: ${EXT_TMP_DIR} ${EXT_BIN_DIR} + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @gh release download v${GOLANGCI-LINT_VERSION} --repo https://github.com/golangci/golangci-lint --pattern "golangci-lint-${GOLANGCI-LINT_VERSION}-${GOOS}-${GOARCH}.tar.gz" --output "${EXT_TMP_DIR}/golangci-lint.tar.gz" --clobber + @tar --strip=1 -xvf ${EXT_TMP_DIR}/golangci-lint.tar.gz --strip-components=1 --directory ${EXT_TMP_DIR} &> /dev/null + @mv ${EXT_TMP_DIR}/golangci-lint ${EXT_BIN_DIR}/golangci-lint + @chmod +x ${EXT_BIN_DIR}/golangci-lint + @${EXT_BIN_DIR}/golangci-lint --version + +.PHONY: install-goreleaser +install-goreleaser: ${EXT_TMP_DIR} ${EXT_BIN_DIR} + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @gh release download v${GORELEASER_VERSION} --repo https://github.com/goreleaser/goreleaser --pattern "goreleaser_$$(uname -s)_$$(uname -m).tar.gz" --output "${EXT_TMP_DIR}/goreleaser.tar.gz" --clobber + @tar -xvf ${EXT_TMP_DIR}/goreleaser.tar.gz --directory ${EXT_BIN_DIR} goreleaser &> /dev/null + @chmod +x ${EXT_BIN_DIR}/goreleaser + @${EXT_BIN_DIR}/goreleaser --version + +.PHONY: install-wire +install-wire: ${EXT_TMP_DIR} ${EXT_BIN_DIR} + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @GOBIN=${PWD}/${EXT_BIN_DIR} go install github.com/google/wire/cmd/wire@v${WIRE_VERSION} + +.PHONY: clean +clean: + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @rm -rf ./.ext + @rm -rf ./bin + +.PHONY: clean-gen +clean-gen: + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @rm -rf ./aserto + +${BIN_DIR}: + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @mkdir -p ${BIN_DIR} + +${EXT_BIN_DIR}: + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @mkdir -p ${EXT_BIN_DIR} + +${EXT_TMP_DIR}: + @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" + @mkdir -p ${EXT_TMP_DIR} From 9e7e3fb3595e19821a5ef808d02c57231469f0ec Mon Sep 17 00:00:00 2001 From: Gert Drapers <1533850+gertd@users.noreply.github.com> Date: Wed, 7 Aug 2024 19:39:50 -0700 Subject: [PATCH 2/2] upd ci.yaml --- .github/workflows/ci.yaml | 92 ++++++++++++++++++++++++--------------- 1 file changed, 57 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cb55927..87fa416 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,57 +18,79 @@ on: env: VAULT_ADDR: https://vault.eng.aserto.com/ + BUF_REPO: "buf.build/aserto-dev/aserto" + + BUF_VERSION: "1.34.0" + BUF_BETA_SUPPRESS_WARNINGS: 1 GO_VERSION: "1.22" + GO_LANGCI_LINT_VERSION: "v1.56.2" + GO_TESTSUM_VERSION: "1.11.0" jobs: build: runs-on: ubuntu-latest steps: - - name: Read Configuration + - + name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - + name: Read Configuration uses: hashicorp/vault-action@v3 id: vault with: url: ${{ env.VAULT_ADDR }} token: ${{ secrets.VAULT_TOKEN }} secrets: | - kv/data/github "SSH_PRIVATE_KEY" | SSH_PRIVATE_KEY; - kv/data/buf.build "ASERTO_BUF_TOKEN" | ASERTO_BUF_TOKEN; - - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup Go + kv/data/github "USERNAME" | GH_USERNAME; + kv/data/github "READ_WRITE_TOKEN" | GH_TOKEN; + kv/data/buf.build "ASERTO_BUF_USER" | BUF_USER; + kv/data/buf.build "ASERTO_BUF_TOKEN" | BUF_TOKEN; + - + name: Setup Go uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} - - - name: Install dependencies + - + name: Setup buf + uses: bufbuild/buf-setup-action@v1 + with: + version: ${{ env.BUF_VERSION }} + github_token: ${{ github.token }} + buf_user: ${{ steps.vault.outputs.BUF_USER }} + buf_api_token: ${{ steps.vault.outputs.BUF_TOKEN}} + - + name: Delete generated code run: | - mkdir -p $HOME/.ssh - umask 0077 && echo -e "${SSH_PRIVATE_KEY}" > $HOME/.ssh/id_rsa - ssh-keyscan github.com >> $HOME/.ssh/known_hosts - - git config --global url."git@github.com:".insteadOf https://github.com/ - git config --global user.email "github-bot@aserto.com" - git config --global user.name "Aserto Bot" - - eval `ssh-agent` - ssh-add $HOME/.ssh/id_rsa - - go run mage.go deps - - - name: Clean generated code - run: go run mage.go clean - - - name: Setup Buf Registry - run: echo -e "machine buf.build\npassword ${ASERTO_BUF_TOKEN}" >> ~/.netrc - - - name: Generate - run: go run mage.go generate - - - name: Commit changes + rm -rf ./aserto + - + name: Get latest version tag from Buf Registry + id: buf-latest + run: | + echo "VERSION=$(buf beta registry label list ${BUF_REPO} --format json --reverse | jq -r '.results[0].name')" >> "$GITHUB_OUTPUT" + - + name: Buf Generate + run: | + echo "${{ env.BUF_REPO }}:${{ steps.buf-latest.outputs.VERSION }}" + buf generate ${{ env.BUF_REPO }}:${{ steps.buf-latest.outputs.VERSION }} + - + name: Lint + uses: golangci/golangci-lint-action@v4 + with: + version: ${{ env.GO_LANGCI_LINT_VERSION }} + args: --timeout=30m + - + name: Test Setup + uses: gertd/action-gotestsum@v3.0.0 + with: + gotestsum_version: ${{ env.GO_TESTSUM_VERSION }} + - + name: Test + run: | + gotestsum --format short-verbose -- -count=1 -parallel=1 -v -timeout=240s -coverprofile=cover.out -coverpkg=./... ./... + - + name: Commit changes if: github.event_name == 'workflow_dispatch' uses: EndBug/add-and-commit@v9 with: