| // Licensed to the Apache Software Foundation (ASF) under one or more |
| // contributor license agreements. See the NOTICE file distributed with |
| // this work for additional information regarding copyright ownership. |
| // The ASF licenses this file to You under the Apache License, Version 2.0 |
| // (the "License"); you may not use this file except in compliance with |
| // the License. You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| // Code generated by protoc-gen-connect-go. DO NOT EDIT. |
| // |
| // Source: registry/v1alpha1/authz.proto |
| |
| package registryv1alpha1v1alpha1connect |
| |
| import ( |
| context "context" |
| errors "errors" |
| http "net/http" |
| strings "strings" |
| ) |
| |
| import ( |
| connect_go "github.com/bufbuild/connect-go" |
| ) |
| |
| import ( |
| v1alpha1 "github.com/apache/dubbo-kubernetes/pkg/bufman/gen/proto/go/registry/v1alpha1" |
| ) |
| |
| // This is a compile-time assertion to ensure that this generated file and the connect package are |
| // compatible. If you get a compiler error that this constant is not defined, this code was |
| // generated with a version of connect newer than the one compiled into your binary. You can fix the |
| // problem by either regenerating this code with an older version of connect or updating the connect |
| // version compiled into your binary. |
| const _ = connect_go.IsAtLeastVersion1_7_0 |
| |
| const ( |
| // AuthzServiceName is the fully-qualified name of the AuthzService service. |
| AuthzServiceName = "bufman.dubbo.apache.org.registry.v1alpha1.AuthzService" |
| ) |
| |
| // These constants are the fully-qualified names of the RPCs defined in this package. They're |
| // exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. |
| // |
| // Note that these are different from the fully-qualified method names used by |
| // google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to |
| // reflection-formatted method names, remove the leading slash and convert the remaining slash to a |
| // period. |
| const ( |
| // AuthzServiceUserCanCreateOrganizationRepositoryProcedure is the fully-qualified name of the |
| // AuthzService's UserCanCreateOrganizationRepository RPC. |
| AuthzServiceUserCanCreateOrganizationRepositoryProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanCreateOrganizationRepository" |
| // AuthzServiceUserCanSeeRepositorySettingsProcedure is the fully-qualified name of the |
| // AuthzService's UserCanSeeRepositorySettings RPC. |
| AuthzServiceUserCanSeeRepositorySettingsProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanSeeRepositorySettings" |
| // AuthzServiceUserCanSeeOrganizationSettingsProcedure is the fully-qualified name of the |
| // AuthzService's UserCanSeeOrganizationSettings RPC. |
| AuthzServiceUserCanSeeOrganizationSettingsProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanSeeOrganizationSettings" |
| // AuthzServiceUserCanReadPluginProcedure is the fully-qualified name of the AuthzService's |
| // UserCanReadPlugin RPC. |
| AuthzServiceUserCanReadPluginProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanReadPlugin" |
| // AuthzServiceUserCanCreatePluginVersionProcedure is the fully-qualified name of the AuthzService's |
| // UserCanCreatePluginVersion RPC. |
| AuthzServiceUserCanCreatePluginVersionProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanCreatePluginVersion" |
| // AuthzServiceUserCanCreateTemplateVersionProcedure is the fully-qualified name of the |
| // AuthzService's UserCanCreateTemplateVersion RPC. |
| AuthzServiceUserCanCreateTemplateVersionProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanCreateTemplateVersion" |
| // AuthzServiceUserCanCreateOrganizationPluginProcedure is the fully-qualified name of the |
| // AuthzService's UserCanCreateOrganizationPlugin RPC. |
| AuthzServiceUserCanCreateOrganizationPluginProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanCreateOrganizationPlugin" |
| // AuthzServiceUserCanCreateOrganizationTemplateProcedure is the fully-qualified name of the |
| // AuthzService's UserCanCreateOrganizationTemplate RPC. |
| AuthzServiceUserCanCreateOrganizationTemplateProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanCreateOrganizationTemplate" |
| // AuthzServiceUserCanSeePluginSettingsProcedure is the fully-qualified name of the AuthzService's |
| // UserCanSeePluginSettings RPC. |
| AuthzServiceUserCanSeePluginSettingsProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanSeePluginSettings" |
| // AuthzServiceUserCanSeeTemplateSettingsProcedure is the fully-qualified name of the AuthzService's |
| // UserCanSeeTemplateSettings RPC. |
| AuthzServiceUserCanSeeTemplateSettingsProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanSeeTemplateSettings" |
| // AuthzServiceUserCanAddOrganizationMemberProcedure is the fully-qualified name of the |
| // AuthzService's UserCanAddOrganizationMember RPC. |
| AuthzServiceUserCanAddOrganizationMemberProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanAddOrganizationMember" |
| // AuthzServiceUserCanUpdateOrganizationMemberProcedure is the fully-qualified name of the |
| // AuthzService's UserCanUpdateOrganizationMember RPC. |
| AuthzServiceUserCanUpdateOrganizationMemberProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanUpdateOrganizationMember" |
| // AuthzServiceUserCanRemoveOrganizationMemberProcedure is the fully-qualified name of the |
| // AuthzService's UserCanRemoveOrganizationMember RPC. |
| AuthzServiceUserCanRemoveOrganizationMemberProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanRemoveOrganizationMember" |
| // AuthzServiceUserCanDeleteOrganizationProcedure is the fully-qualified name of the AuthzService's |
| // UserCanDeleteOrganization RPC. |
| AuthzServiceUserCanDeleteOrganizationProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanDeleteOrganization" |
| // AuthzServiceUserCanDeleteRepositoryProcedure is the fully-qualified name of the AuthzService's |
| // UserCanDeleteRepository RPC. |
| AuthzServiceUserCanDeleteRepositoryProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanDeleteRepository" |
| // AuthzServiceUserCanDeleteTemplateProcedure is the fully-qualified name of the AuthzService's |
| // UserCanDeleteTemplate RPC. |
| AuthzServiceUserCanDeleteTemplateProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanDeleteTemplate" |
| // AuthzServiceUserCanDeletePluginProcedure is the fully-qualified name of the AuthzService's |
| // UserCanDeletePlugin RPC. |
| AuthzServiceUserCanDeletePluginProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanDeletePlugin" |
| // AuthzServiceUserCanDeleteUserProcedure is the fully-qualified name of the AuthzService's |
| // UserCanDeleteUser RPC. |
| AuthzServiceUserCanDeleteUserProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanDeleteUser" |
| // AuthzServiceUserCanSeeServerAdminPanelProcedure is the fully-qualified name of the AuthzService's |
| // UserCanSeeServerAdminPanel RPC. |
| AuthzServiceUserCanSeeServerAdminPanelProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanSeeServerAdminPanel" |
| // AuthzServiceUserCanManageRepositoryContributorsProcedure is the fully-qualified name of the |
| // AuthzService's UserCanManageRepositoryContributors RPC. |
| AuthzServiceUserCanManageRepositoryContributorsProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/UserCanManageRepositoryContributors" |
| ) |
| |
| // AuthzServiceClient is a client for the |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService service. |
| type AuthzServiceClient interface { |
| // UserCanCreateOrganizationRepository returns whether the user is authorized |
| // to create repositories in an organization. |
| UserCanCreateOrganizationRepository(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationRepositoryRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationRepositoryResponse], error) |
| // UserCanSeeRepositorySettings returns whether the user is authorized |
| // to see repository settings. |
| UserCanSeeRepositorySettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeRepositorySettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeRepositorySettingsResponse], error) |
| // UserCanSeeOrganizationSettings returns whether the user is authorized |
| // to see organization settings. |
| UserCanSeeOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeOrganizationSettingsResponse], error) |
| // UserCanReadPlugin returns whether the user has read access to the specified plugin. |
| // |
| // Deprecated: do not use. |
| UserCanReadPlugin(context.Context, *connect_go.Request[v1alpha1.UserCanReadPluginRequest]) (*connect_go.Response[v1alpha1.UserCanReadPluginResponse], error) |
| // UserCanCreatePluginVersion returns whether the user is authorized |
| // to create a plugin version under the specified plugin. |
| // |
| // Deprecated: do not use. |
| UserCanCreatePluginVersion(context.Context, *connect_go.Request[v1alpha1.UserCanCreatePluginVersionRequest]) (*connect_go.Response[v1alpha1.UserCanCreatePluginVersionResponse], error) |
| // UserCanCreateTemplateVersion returns whether the user is authorized |
| // to create a template version under the specified template. |
| // |
| // Deprecated: do not use. |
| UserCanCreateTemplateVersion(context.Context, *connect_go.Request[v1alpha1.UserCanCreateTemplateVersionRequest]) (*connect_go.Response[v1alpha1.UserCanCreateTemplateVersionResponse], error) |
| // UserCanCreateOrganizationPlugin returns whether the user is authorized to create |
| // a plugin in an organization. |
| // |
| // Deprecated: do not use. |
| UserCanCreateOrganizationPlugin(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationPluginRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationPluginResponse], error) |
| // UserCanCreateOrganizationPlugin returns whether the user is authorized to create |
| // a template in an organization. |
| // |
| // Deprecated: do not use. |
| UserCanCreateOrganizationTemplate(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationTemplateRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationTemplateResponse], error) |
| // UserCanSeePluginSettings returns whether the user is authorized |
| // to see plugin settings. |
| // |
| // Deprecated: do not use. |
| UserCanSeePluginSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeePluginSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeePluginSettingsResponse], error) |
| // UserCanSeeTemplateSettings returns whether the user is authorized |
| // to see template settings. |
| // |
| // Deprecated: do not use. |
| UserCanSeeTemplateSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeTemplateSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeTemplateSettingsResponse], error) |
| // UserCanAddOrganizationMember returns whether the user is authorized to add |
| // any members to the organization and the list of roles they can add. |
| UserCanAddOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanAddOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanAddOrganizationMemberResponse], error) |
| // UserCanUpdateOrganizationMember returns whether the user is authorized to update |
| // any members' membership information in the organization and the list of roles they can update. |
| UserCanUpdateOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanUpdateOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanUpdateOrganizationMemberResponse], error) |
| // UserCanRemoveOrganizationMember returns whether the user is authorized to remove |
| // any members from the organization and the list of roles they can remove. |
| UserCanRemoveOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanRemoveOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanRemoveOrganizationMemberResponse], error) |
| // UserCanDeleteOrganization returns whether the user is authorized |
| // to delete an organization. |
| UserCanDeleteOrganization(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteOrganizationRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteOrganizationResponse], error) |
| // UserCanDeleteRepository returns whether the user is authorized |
| // to delete a repository. |
| UserCanDeleteRepository(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteRepositoryRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteRepositoryResponse], error) |
| // UserCanDeleteTemplate returns whether the user is authorized |
| // to delete a template. |
| // |
| // Deprecated: do not use. |
| UserCanDeleteTemplate(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteTemplateRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteTemplateResponse], error) |
| // UserCanDeletePlugin returns whether the user is authorized |
| // to delete a plugin. |
| // |
| // Deprecated: do not use. |
| UserCanDeletePlugin(context.Context, *connect_go.Request[v1alpha1.UserCanDeletePluginRequest]) (*connect_go.Response[v1alpha1.UserCanDeletePluginResponse], error) |
| // UserCanDeleteUser returns whether the user is authorized |
| // to delete a user. |
| UserCanDeleteUser(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteUserRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteUserResponse], error) |
| // UserCanSeeServerAdminPanel returns whether the user is authorized |
| // to see server admin panel. |
| UserCanSeeServerAdminPanel(context.Context, *connect_go.Request[v1alpha1.UserCanSeeServerAdminPanelRequest]) (*connect_go.Response[v1alpha1.UserCanSeeServerAdminPanelResponse], error) |
| // UserCanManageRepositoryContributors returns whether the user is authorized to manage |
| // any contributors to the repository and the list of roles they can manage. |
| UserCanManageRepositoryContributors(context.Context, *connect_go.Request[v1alpha1.UserCanManageRepositoryContributorsRequest]) (*connect_go.Response[v1alpha1.UserCanManageRepositoryContributorsResponse], error) |
| } |
| |
| // NewAuthzServiceClient constructs a client for the |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService service. By default, it uses the |
| // Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends |
| // uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or |
| // connect.WithGRPCWeb() options. |
| // |
| // The URL supplied here should be the base URL for the Connect or gRPC server (for example, |
| // http://api.acme.com or https://acme.com/grpc). |
| func NewAuthzServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) AuthzServiceClient { |
| baseURL = strings.TrimRight(baseURL, "/") |
| return &authzServiceClient{ |
| userCanCreateOrganizationRepository: connect_go.NewClient[v1alpha1.UserCanCreateOrganizationRepositoryRequest, v1alpha1.UserCanCreateOrganizationRepositoryResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanCreateOrganizationRepositoryProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanSeeRepositorySettings: connect_go.NewClient[v1alpha1.UserCanSeeRepositorySettingsRequest, v1alpha1.UserCanSeeRepositorySettingsResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanSeeRepositorySettingsProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanSeeOrganizationSettings: connect_go.NewClient[v1alpha1.UserCanSeeOrganizationSettingsRequest, v1alpha1.UserCanSeeOrganizationSettingsResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanSeeOrganizationSettingsProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanReadPlugin: connect_go.NewClient[v1alpha1.UserCanReadPluginRequest, v1alpha1.UserCanReadPluginResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanReadPluginProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanCreatePluginVersion: connect_go.NewClient[v1alpha1.UserCanCreatePluginVersionRequest, v1alpha1.UserCanCreatePluginVersionResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanCreatePluginVersionProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanCreateTemplateVersion: connect_go.NewClient[v1alpha1.UserCanCreateTemplateVersionRequest, v1alpha1.UserCanCreateTemplateVersionResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanCreateTemplateVersionProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanCreateOrganizationPlugin: connect_go.NewClient[v1alpha1.UserCanCreateOrganizationPluginRequest, v1alpha1.UserCanCreateOrganizationPluginResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanCreateOrganizationPluginProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanCreateOrganizationTemplate: connect_go.NewClient[v1alpha1.UserCanCreateOrganizationTemplateRequest, v1alpha1.UserCanCreateOrganizationTemplateResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanCreateOrganizationTemplateProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanSeePluginSettings: connect_go.NewClient[v1alpha1.UserCanSeePluginSettingsRequest, v1alpha1.UserCanSeePluginSettingsResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanSeePluginSettingsProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanSeeTemplateSettings: connect_go.NewClient[v1alpha1.UserCanSeeTemplateSettingsRequest, v1alpha1.UserCanSeeTemplateSettingsResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanSeeTemplateSettingsProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanAddOrganizationMember: connect_go.NewClient[v1alpha1.UserCanAddOrganizationMemberRequest, v1alpha1.UserCanAddOrganizationMemberResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanAddOrganizationMemberProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanUpdateOrganizationMember: connect_go.NewClient[v1alpha1.UserCanUpdateOrganizationMemberRequest, v1alpha1.UserCanUpdateOrganizationMemberResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanUpdateOrganizationMemberProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanRemoveOrganizationMember: connect_go.NewClient[v1alpha1.UserCanRemoveOrganizationMemberRequest, v1alpha1.UserCanRemoveOrganizationMemberResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanRemoveOrganizationMemberProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanDeleteOrganization: connect_go.NewClient[v1alpha1.UserCanDeleteOrganizationRequest, v1alpha1.UserCanDeleteOrganizationResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanDeleteOrganizationProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanDeleteRepository: connect_go.NewClient[v1alpha1.UserCanDeleteRepositoryRequest, v1alpha1.UserCanDeleteRepositoryResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanDeleteRepositoryProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanDeleteTemplate: connect_go.NewClient[v1alpha1.UserCanDeleteTemplateRequest, v1alpha1.UserCanDeleteTemplateResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanDeleteTemplateProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanDeletePlugin: connect_go.NewClient[v1alpha1.UserCanDeletePluginRequest, v1alpha1.UserCanDeletePluginResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanDeletePluginProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanDeleteUser: connect_go.NewClient[v1alpha1.UserCanDeleteUserRequest, v1alpha1.UserCanDeleteUserResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanDeleteUserProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanSeeServerAdminPanel: connect_go.NewClient[v1alpha1.UserCanSeeServerAdminPanelRequest, v1alpha1.UserCanSeeServerAdminPanelResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanSeeServerAdminPanelProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| userCanManageRepositoryContributors: connect_go.NewClient[v1alpha1.UserCanManageRepositoryContributorsRequest, v1alpha1.UserCanManageRepositoryContributorsResponse]( |
| httpClient, |
| baseURL+AuthzServiceUserCanManageRepositoryContributorsProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| } |
| } |
| |
| // authzServiceClient implements AuthzServiceClient. |
| type authzServiceClient struct { |
| userCanCreateOrganizationRepository *connect_go.Client[v1alpha1.UserCanCreateOrganizationRepositoryRequest, v1alpha1.UserCanCreateOrganizationRepositoryResponse] |
| userCanSeeRepositorySettings *connect_go.Client[v1alpha1.UserCanSeeRepositorySettingsRequest, v1alpha1.UserCanSeeRepositorySettingsResponse] |
| userCanSeeOrganizationSettings *connect_go.Client[v1alpha1.UserCanSeeOrganizationSettingsRequest, v1alpha1.UserCanSeeOrganizationSettingsResponse] |
| userCanReadPlugin *connect_go.Client[v1alpha1.UserCanReadPluginRequest, v1alpha1.UserCanReadPluginResponse] |
| userCanCreatePluginVersion *connect_go.Client[v1alpha1.UserCanCreatePluginVersionRequest, v1alpha1.UserCanCreatePluginVersionResponse] |
| userCanCreateTemplateVersion *connect_go.Client[v1alpha1.UserCanCreateTemplateVersionRequest, v1alpha1.UserCanCreateTemplateVersionResponse] |
| userCanCreateOrganizationPlugin *connect_go.Client[v1alpha1.UserCanCreateOrganizationPluginRequest, v1alpha1.UserCanCreateOrganizationPluginResponse] |
| userCanCreateOrganizationTemplate *connect_go.Client[v1alpha1.UserCanCreateOrganizationTemplateRequest, v1alpha1.UserCanCreateOrganizationTemplateResponse] |
| userCanSeePluginSettings *connect_go.Client[v1alpha1.UserCanSeePluginSettingsRequest, v1alpha1.UserCanSeePluginSettingsResponse] |
| userCanSeeTemplateSettings *connect_go.Client[v1alpha1.UserCanSeeTemplateSettingsRequest, v1alpha1.UserCanSeeTemplateSettingsResponse] |
| userCanAddOrganizationMember *connect_go.Client[v1alpha1.UserCanAddOrganizationMemberRequest, v1alpha1.UserCanAddOrganizationMemberResponse] |
| userCanUpdateOrganizationMember *connect_go.Client[v1alpha1.UserCanUpdateOrganizationMemberRequest, v1alpha1.UserCanUpdateOrganizationMemberResponse] |
| userCanRemoveOrganizationMember *connect_go.Client[v1alpha1.UserCanRemoveOrganizationMemberRequest, v1alpha1.UserCanRemoveOrganizationMemberResponse] |
| userCanDeleteOrganization *connect_go.Client[v1alpha1.UserCanDeleteOrganizationRequest, v1alpha1.UserCanDeleteOrganizationResponse] |
| userCanDeleteRepository *connect_go.Client[v1alpha1.UserCanDeleteRepositoryRequest, v1alpha1.UserCanDeleteRepositoryResponse] |
| userCanDeleteTemplate *connect_go.Client[v1alpha1.UserCanDeleteTemplateRequest, v1alpha1.UserCanDeleteTemplateResponse] |
| userCanDeletePlugin *connect_go.Client[v1alpha1.UserCanDeletePluginRequest, v1alpha1.UserCanDeletePluginResponse] |
| userCanDeleteUser *connect_go.Client[v1alpha1.UserCanDeleteUserRequest, v1alpha1.UserCanDeleteUserResponse] |
| userCanSeeServerAdminPanel *connect_go.Client[v1alpha1.UserCanSeeServerAdminPanelRequest, v1alpha1.UserCanSeeServerAdminPanelResponse] |
| userCanManageRepositoryContributors *connect_go.Client[v1alpha1.UserCanManageRepositoryContributorsRequest, v1alpha1.UserCanManageRepositoryContributorsResponse] |
| } |
| |
| // UserCanCreateOrganizationRepository calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanCreateOrganizationRepository. |
| func (c *authzServiceClient) UserCanCreateOrganizationRepository(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanCreateOrganizationRepositoryRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationRepositoryResponse], error) { |
| return c.userCanCreateOrganizationRepository.CallUnary(ctx, req) |
| } |
| |
| // UserCanSeeRepositorySettings calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanSeeRepositorySettings. |
| func (c *authzServiceClient) UserCanSeeRepositorySettings(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanSeeRepositorySettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeRepositorySettingsResponse], error) { |
| return c.userCanSeeRepositorySettings.CallUnary(ctx, req) |
| } |
| |
| // UserCanSeeOrganizationSettings calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanSeeOrganizationSettings. |
| func (c *authzServiceClient) UserCanSeeOrganizationSettings(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanSeeOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeOrganizationSettingsResponse], error) { |
| return c.userCanSeeOrganizationSettings.CallUnary(ctx, req) |
| } |
| |
| // UserCanReadPlugin calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanReadPlugin. |
| // |
| // Deprecated: do not use. |
| func (c *authzServiceClient) UserCanReadPlugin(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanReadPluginRequest]) (*connect_go.Response[v1alpha1.UserCanReadPluginResponse], error) { |
| return c.userCanReadPlugin.CallUnary(ctx, req) |
| } |
| |
| // UserCanCreatePluginVersion calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanCreatePluginVersion. |
| // |
| // Deprecated: do not use. |
| func (c *authzServiceClient) UserCanCreatePluginVersion(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanCreatePluginVersionRequest]) (*connect_go.Response[v1alpha1.UserCanCreatePluginVersionResponse], error) { |
| return c.userCanCreatePluginVersion.CallUnary(ctx, req) |
| } |
| |
| // UserCanCreateTemplateVersion calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanCreateTemplateVersion. |
| // |
| // Deprecated: do not use. |
| func (c *authzServiceClient) UserCanCreateTemplateVersion(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanCreateTemplateVersionRequest]) (*connect_go.Response[v1alpha1.UserCanCreateTemplateVersionResponse], error) { |
| return c.userCanCreateTemplateVersion.CallUnary(ctx, req) |
| } |
| |
| // UserCanCreateOrganizationPlugin calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanCreateOrganizationPlugin. |
| // |
| // Deprecated: do not use. |
| func (c *authzServiceClient) UserCanCreateOrganizationPlugin(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanCreateOrganizationPluginRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationPluginResponse], error) { |
| return c.userCanCreateOrganizationPlugin.CallUnary(ctx, req) |
| } |
| |
| // UserCanCreateOrganizationTemplate calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanCreateOrganizationTemplate. |
| // |
| // Deprecated: do not use. |
| func (c *authzServiceClient) UserCanCreateOrganizationTemplate(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanCreateOrganizationTemplateRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationTemplateResponse], error) { |
| return c.userCanCreateOrganizationTemplate.CallUnary(ctx, req) |
| } |
| |
| // UserCanSeePluginSettings calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanSeePluginSettings. |
| // |
| // Deprecated: do not use. |
| func (c *authzServiceClient) UserCanSeePluginSettings(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanSeePluginSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeePluginSettingsResponse], error) { |
| return c.userCanSeePluginSettings.CallUnary(ctx, req) |
| } |
| |
| // UserCanSeeTemplateSettings calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanSeeTemplateSettings. |
| // |
| // Deprecated: do not use. |
| func (c *authzServiceClient) UserCanSeeTemplateSettings(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanSeeTemplateSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeTemplateSettingsResponse], error) { |
| return c.userCanSeeTemplateSettings.CallUnary(ctx, req) |
| } |
| |
| // UserCanAddOrganizationMember calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanAddOrganizationMember. |
| func (c *authzServiceClient) UserCanAddOrganizationMember(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanAddOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanAddOrganizationMemberResponse], error) { |
| return c.userCanAddOrganizationMember.CallUnary(ctx, req) |
| } |
| |
| // UserCanUpdateOrganizationMember calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanUpdateOrganizationMember. |
| func (c *authzServiceClient) UserCanUpdateOrganizationMember(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanUpdateOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanUpdateOrganizationMemberResponse], error) { |
| return c.userCanUpdateOrganizationMember.CallUnary(ctx, req) |
| } |
| |
| // UserCanRemoveOrganizationMember calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanRemoveOrganizationMember. |
| func (c *authzServiceClient) UserCanRemoveOrganizationMember(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanRemoveOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanRemoveOrganizationMemberResponse], error) { |
| return c.userCanRemoveOrganizationMember.CallUnary(ctx, req) |
| } |
| |
| // UserCanDeleteOrganization calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanDeleteOrganization. |
| func (c *authzServiceClient) UserCanDeleteOrganization(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanDeleteOrganizationRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteOrganizationResponse], error) { |
| return c.userCanDeleteOrganization.CallUnary(ctx, req) |
| } |
| |
| // UserCanDeleteRepository calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanDeleteRepository. |
| func (c *authzServiceClient) UserCanDeleteRepository(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanDeleteRepositoryRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteRepositoryResponse], error) { |
| return c.userCanDeleteRepository.CallUnary(ctx, req) |
| } |
| |
| // UserCanDeleteTemplate calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanDeleteTemplate. |
| // |
| // Deprecated: do not use. |
| func (c *authzServiceClient) UserCanDeleteTemplate(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanDeleteTemplateRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteTemplateResponse], error) { |
| return c.userCanDeleteTemplate.CallUnary(ctx, req) |
| } |
| |
| // UserCanDeletePlugin calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanDeletePlugin. |
| // |
| // Deprecated: do not use. |
| func (c *authzServiceClient) UserCanDeletePlugin(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanDeletePluginRequest]) (*connect_go.Response[v1alpha1.UserCanDeletePluginResponse], error) { |
| return c.userCanDeletePlugin.CallUnary(ctx, req) |
| } |
| |
| // UserCanDeleteUser calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanDeleteUser. |
| func (c *authzServiceClient) UserCanDeleteUser(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanDeleteUserRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteUserResponse], error) { |
| return c.userCanDeleteUser.CallUnary(ctx, req) |
| } |
| |
| // UserCanSeeServerAdminPanel calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanSeeServerAdminPanel. |
| func (c *authzServiceClient) UserCanSeeServerAdminPanel(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanSeeServerAdminPanelRequest]) (*connect_go.Response[v1alpha1.UserCanSeeServerAdminPanelResponse], error) { |
| return c.userCanSeeServerAdminPanel.CallUnary(ctx, req) |
| } |
| |
| // UserCanManageRepositoryContributors calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanManageRepositoryContributors. |
| func (c *authzServiceClient) UserCanManageRepositoryContributors(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanManageRepositoryContributorsRequest]) (*connect_go.Response[v1alpha1.UserCanManageRepositoryContributorsResponse], error) { |
| return c.userCanManageRepositoryContributors.CallUnary(ctx, req) |
| } |
| |
| // AuthzServiceHandler is an implementation of the |
| // bufman.dubbo.apache.org.registry.v1alpha1.AuthzService service. |
| type AuthzServiceHandler interface { |
| // UserCanCreateOrganizationRepository returns whether the user is authorized |
| // to create repositories in an organization. |
| UserCanCreateOrganizationRepository(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationRepositoryRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationRepositoryResponse], error) |
| // UserCanSeeRepositorySettings returns whether the user is authorized |
| // to see repository settings. |
| UserCanSeeRepositorySettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeRepositorySettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeRepositorySettingsResponse], error) |
| // UserCanSeeOrganizationSettings returns whether the user is authorized |
| // to see organization settings. |
| UserCanSeeOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeOrganizationSettingsResponse], error) |
| // UserCanReadPlugin returns whether the user has read access to the specified plugin. |
| // |
| // Deprecated: do not use. |
| UserCanReadPlugin(context.Context, *connect_go.Request[v1alpha1.UserCanReadPluginRequest]) (*connect_go.Response[v1alpha1.UserCanReadPluginResponse], error) |
| // UserCanCreatePluginVersion returns whether the user is authorized |
| // to create a plugin version under the specified plugin. |
| // |
| // Deprecated: do not use. |
| UserCanCreatePluginVersion(context.Context, *connect_go.Request[v1alpha1.UserCanCreatePluginVersionRequest]) (*connect_go.Response[v1alpha1.UserCanCreatePluginVersionResponse], error) |
| // UserCanCreateTemplateVersion returns whether the user is authorized |
| // to create a template version under the specified template. |
| // |
| // Deprecated: do not use. |
| UserCanCreateTemplateVersion(context.Context, *connect_go.Request[v1alpha1.UserCanCreateTemplateVersionRequest]) (*connect_go.Response[v1alpha1.UserCanCreateTemplateVersionResponse], error) |
| // UserCanCreateOrganizationPlugin returns whether the user is authorized to create |
| // a plugin in an organization. |
| // |
| // Deprecated: do not use. |
| UserCanCreateOrganizationPlugin(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationPluginRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationPluginResponse], error) |
| // UserCanCreateOrganizationPlugin returns whether the user is authorized to create |
| // a template in an organization. |
| // |
| // Deprecated: do not use. |
| UserCanCreateOrganizationTemplate(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationTemplateRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationTemplateResponse], error) |
| // UserCanSeePluginSettings returns whether the user is authorized |
| // to see plugin settings. |
| // |
| // Deprecated: do not use. |
| UserCanSeePluginSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeePluginSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeePluginSettingsResponse], error) |
| // UserCanSeeTemplateSettings returns whether the user is authorized |
| // to see template settings. |
| // |
| // Deprecated: do not use. |
| UserCanSeeTemplateSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeTemplateSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeTemplateSettingsResponse], error) |
| // UserCanAddOrganizationMember returns whether the user is authorized to add |
| // any members to the organization and the list of roles they can add. |
| UserCanAddOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanAddOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanAddOrganizationMemberResponse], error) |
| // UserCanUpdateOrganizationMember returns whether the user is authorized to update |
| // any members' membership information in the organization and the list of roles they can update. |
| UserCanUpdateOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanUpdateOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanUpdateOrganizationMemberResponse], error) |
| // UserCanRemoveOrganizationMember returns whether the user is authorized to remove |
| // any members from the organization and the list of roles they can remove. |
| UserCanRemoveOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanRemoveOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanRemoveOrganizationMemberResponse], error) |
| // UserCanDeleteOrganization returns whether the user is authorized |
| // to delete an organization. |
| UserCanDeleteOrganization(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteOrganizationRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteOrganizationResponse], error) |
| // UserCanDeleteRepository returns whether the user is authorized |
| // to delete a repository. |
| UserCanDeleteRepository(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteRepositoryRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteRepositoryResponse], error) |
| // UserCanDeleteTemplate returns whether the user is authorized |
| // to delete a template. |
| // |
| // Deprecated: do not use. |
| UserCanDeleteTemplate(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteTemplateRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteTemplateResponse], error) |
| // UserCanDeletePlugin returns whether the user is authorized |
| // to delete a plugin. |
| // |
| // Deprecated: do not use. |
| UserCanDeletePlugin(context.Context, *connect_go.Request[v1alpha1.UserCanDeletePluginRequest]) (*connect_go.Response[v1alpha1.UserCanDeletePluginResponse], error) |
| // UserCanDeleteUser returns whether the user is authorized |
| // to delete a user. |
| UserCanDeleteUser(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteUserRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteUserResponse], error) |
| // UserCanSeeServerAdminPanel returns whether the user is authorized |
| // to see server admin panel. |
| UserCanSeeServerAdminPanel(context.Context, *connect_go.Request[v1alpha1.UserCanSeeServerAdminPanelRequest]) (*connect_go.Response[v1alpha1.UserCanSeeServerAdminPanelResponse], error) |
| // UserCanManageRepositoryContributors returns whether the user is authorized to manage |
| // any contributors to the repository and the list of roles they can manage. |
| UserCanManageRepositoryContributors(context.Context, *connect_go.Request[v1alpha1.UserCanManageRepositoryContributorsRequest]) (*connect_go.Response[v1alpha1.UserCanManageRepositoryContributorsResponse], error) |
| } |
| |
| // NewAuthzServiceHandler builds an HTTP handler from the service implementation. It returns the |
| // path on which to mount the handler and the handler itself. |
| // |
| // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf |
| // and JSON codecs. They also support gzip compression. |
| func NewAuthzServiceHandler(svc AuthzServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) { |
| authzServiceUserCanCreateOrganizationRepositoryHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanCreateOrganizationRepositoryProcedure, |
| svc.UserCanCreateOrganizationRepository, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanSeeRepositorySettingsHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanSeeRepositorySettingsProcedure, |
| svc.UserCanSeeRepositorySettings, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanSeeOrganizationSettingsHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanSeeOrganizationSettingsProcedure, |
| svc.UserCanSeeOrganizationSettings, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanReadPluginHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanReadPluginProcedure, |
| svc.UserCanReadPlugin, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanCreatePluginVersionHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanCreatePluginVersionProcedure, |
| svc.UserCanCreatePluginVersion, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanCreateTemplateVersionHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanCreateTemplateVersionProcedure, |
| svc.UserCanCreateTemplateVersion, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanCreateOrganizationPluginHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanCreateOrganizationPluginProcedure, |
| svc.UserCanCreateOrganizationPlugin, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanCreateOrganizationTemplateHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanCreateOrganizationTemplateProcedure, |
| svc.UserCanCreateOrganizationTemplate, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanSeePluginSettingsHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanSeePluginSettingsProcedure, |
| svc.UserCanSeePluginSettings, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanSeeTemplateSettingsHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanSeeTemplateSettingsProcedure, |
| svc.UserCanSeeTemplateSettings, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanAddOrganizationMemberHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanAddOrganizationMemberProcedure, |
| svc.UserCanAddOrganizationMember, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanUpdateOrganizationMemberHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanUpdateOrganizationMemberProcedure, |
| svc.UserCanUpdateOrganizationMember, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanRemoveOrganizationMemberHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanRemoveOrganizationMemberProcedure, |
| svc.UserCanRemoveOrganizationMember, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanDeleteOrganizationHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanDeleteOrganizationProcedure, |
| svc.UserCanDeleteOrganization, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanDeleteRepositoryHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanDeleteRepositoryProcedure, |
| svc.UserCanDeleteRepository, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanDeleteTemplateHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanDeleteTemplateProcedure, |
| svc.UserCanDeleteTemplate, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanDeletePluginHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanDeletePluginProcedure, |
| svc.UserCanDeletePlugin, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanDeleteUserHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanDeleteUserProcedure, |
| svc.UserCanDeleteUser, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanSeeServerAdminPanelHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanSeeServerAdminPanelProcedure, |
| svc.UserCanSeeServerAdminPanel, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| authzServiceUserCanManageRepositoryContributorsHandler := connect_go.NewUnaryHandler( |
| AuthzServiceUserCanManageRepositoryContributorsProcedure, |
| svc.UserCanManageRepositoryContributors, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| return "/bufman.dubbo.apache.org.registry.v1alpha1.AuthzService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| switch r.URL.Path { |
| case AuthzServiceUserCanCreateOrganizationRepositoryProcedure: |
| authzServiceUserCanCreateOrganizationRepositoryHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanSeeRepositorySettingsProcedure: |
| authzServiceUserCanSeeRepositorySettingsHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanSeeOrganizationSettingsProcedure: |
| authzServiceUserCanSeeOrganizationSettingsHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanReadPluginProcedure: |
| authzServiceUserCanReadPluginHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanCreatePluginVersionProcedure: |
| authzServiceUserCanCreatePluginVersionHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanCreateTemplateVersionProcedure: |
| authzServiceUserCanCreateTemplateVersionHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanCreateOrganizationPluginProcedure: |
| authzServiceUserCanCreateOrganizationPluginHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanCreateOrganizationTemplateProcedure: |
| authzServiceUserCanCreateOrganizationTemplateHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanSeePluginSettingsProcedure: |
| authzServiceUserCanSeePluginSettingsHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanSeeTemplateSettingsProcedure: |
| authzServiceUserCanSeeTemplateSettingsHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanAddOrganizationMemberProcedure: |
| authzServiceUserCanAddOrganizationMemberHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanUpdateOrganizationMemberProcedure: |
| authzServiceUserCanUpdateOrganizationMemberHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanRemoveOrganizationMemberProcedure: |
| authzServiceUserCanRemoveOrganizationMemberHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanDeleteOrganizationProcedure: |
| authzServiceUserCanDeleteOrganizationHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanDeleteRepositoryProcedure: |
| authzServiceUserCanDeleteRepositoryHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanDeleteTemplateProcedure: |
| authzServiceUserCanDeleteTemplateHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanDeletePluginProcedure: |
| authzServiceUserCanDeletePluginHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanDeleteUserProcedure: |
| authzServiceUserCanDeleteUserHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanSeeServerAdminPanelProcedure: |
| authzServiceUserCanSeeServerAdminPanelHandler.ServeHTTP(w, r) |
| case AuthzServiceUserCanManageRepositoryContributorsProcedure: |
| authzServiceUserCanManageRepositoryContributorsHandler.ServeHTTP(w, r) |
| default: |
| http.NotFound(w, r) |
| } |
| }) |
| } |
| |
| // UnimplementedAuthzServiceHandler returns CodeUnimplemented from all methods. |
| type UnimplementedAuthzServiceHandler struct{} |
| |
| func (UnimplementedAuthzServiceHandler) UserCanCreateOrganizationRepository(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationRepositoryRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationRepositoryResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanCreateOrganizationRepository is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanSeeRepositorySettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeRepositorySettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeRepositorySettingsResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanSeeRepositorySettings is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanSeeOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeOrganizationSettingsResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanSeeOrganizationSettings is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanReadPlugin(context.Context, *connect_go.Request[v1alpha1.UserCanReadPluginRequest]) (*connect_go.Response[v1alpha1.UserCanReadPluginResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanReadPlugin is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanCreatePluginVersion(context.Context, *connect_go.Request[v1alpha1.UserCanCreatePluginVersionRequest]) (*connect_go.Response[v1alpha1.UserCanCreatePluginVersionResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanCreatePluginVersion is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanCreateTemplateVersion(context.Context, *connect_go.Request[v1alpha1.UserCanCreateTemplateVersionRequest]) (*connect_go.Response[v1alpha1.UserCanCreateTemplateVersionResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanCreateTemplateVersion is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanCreateOrganizationPlugin(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationPluginRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationPluginResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanCreateOrganizationPlugin is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanCreateOrganizationTemplate(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationTemplateRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationTemplateResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanCreateOrganizationTemplate is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanSeePluginSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeePluginSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeePluginSettingsResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanSeePluginSettings is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanSeeTemplateSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeTemplateSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeTemplateSettingsResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanSeeTemplateSettings is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanAddOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanAddOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanAddOrganizationMemberResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanAddOrganizationMember is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanUpdateOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanUpdateOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanUpdateOrganizationMemberResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanUpdateOrganizationMember is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanRemoveOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanRemoveOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanRemoveOrganizationMemberResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanRemoveOrganizationMember is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanDeleteOrganization(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteOrganizationRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteOrganizationResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanDeleteOrganization is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanDeleteRepository(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteRepositoryRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteRepositoryResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanDeleteRepository is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanDeleteTemplate(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteTemplateRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteTemplateResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanDeleteTemplate is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanDeletePlugin(context.Context, *connect_go.Request[v1alpha1.UserCanDeletePluginRequest]) (*connect_go.Response[v1alpha1.UserCanDeletePluginResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanDeletePlugin is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanDeleteUser(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteUserRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteUserResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanDeleteUser is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanSeeServerAdminPanel(context.Context, *connect_go.Request[v1alpha1.UserCanSeeServerAdminPanelRequest]) (*connect_go.Response[v1alpha1.UserCanSeeServerAdminPanelResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanSeeServerAdminPanel is not implemented")) |
| } |
| |
| func (UnimplementedAuthzServiceHandler) UserCanManageRepositoryContributors(context.Context, *connect_go.Request[v1alpha1.UserCanManageRepositoryContributorsRequest]) (*connect_go.Response[v1alpha1.UserCanManageRepositoryContributorsResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.AuthzService.UserCanManageRepositoryContributors is not implemented")) |
| } |