| // 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/organization.proto |
| |
| package registryv1alpha1connect |
| |
| 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 ( |
| // OrganizationServiceName is the fully-qualified name of the OrganizationService service. |
| OrganizationServiceName = "bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService" |
| ) |
| |
| // 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 ( |
| // OrganizationServiceGetOrganizationProcedure is the fully-qualified name of the |
| // OrganizationService's GetOrganization RPC. |
| OrganizationServiceGetOrganizationProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/GetOrganization" |
| // OrganizationServiceGetOrganizationByNameProcedure is the fully-qualified name of the |
| // OrganizationService's GetOrganizationByName RPC. |
| OrganizationServiceGetOrganizationByNameProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/GetOrganizationByName" |
| // OrganizationServiceListOrganizationsProcedure is the fully-qualified name of the |
| // OrganizationService's ListOrganizations RPC. |
| OrganizationServiceListOrganizationsProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/ListOrganizations" |
| // OrganizationServiceListUserOrganizationsProcedure is the fully-qualified name of the |
| // OrganizationService's ListUserOrganizations RPC. |
| OrganizationServiceListUserOrganizationsProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/ListUserOrganizations" |
| // OrganizationServiceGetUserOrganizationProcedure is the fully-qualified name of the |
| // OrganizationService's GetUserOrganization RPC. |
| OrganizationServiceGetUserOrganizationProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/GetUserOrganization" |
| // OrganizationServiceCreateOrganizationProcedure is the fully-qualified name of the |
| // OrganizationService's CreateOrganization RPC. |
| OrganizationServiceCreateOrganizationProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/CreateOrganization" |
| // OrganizationServiceDeleteOrganizationProcedure is the fully-qualified name of the |
| // OrganizationService's DeleteOrganization RPC. |
| OrganizationServiceDeleteOrganizationProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/DeleteOrganization" |
| // OrganizationServiceDeleteOrganizationByNameProcedure is the fully-qualified name of the |
| // OrganizationService's DeleteOrganizationByName RPC. |
| OrganizationServiceDeleteOrganizationByNameProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/DeleteOrganizationByName" |
| // OrganizationServiceAddOrganizationMemberProcedure is the fully-qualified name of the |
| // OrganizationService's AddOrganizationMember RPC. |
| OrganizationServiceAddOrganizationMemberProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/AddOrganizationMember" |
| // OrganizationServiceUpdateOrganizationMemberProcedure is the fully-qualified name of the |
| // OrganizationService's UpdateOrganizationMember RPC. |
| OrganizationServiceUpdateOrganizationMemberProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/UpdateOrganizationMember" |
| // OrganizationServiceRemoveOrganizationMemberProcedure is the fully-qualified name of the |
| // OrganizationService's RemoveOrganizationMember RPC. |
| OrganizationServiceRemoveOrganizationMemberProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/RemoveOrganizationMember" |
| // OrganizationServiceSetOrganizationMemberProcedure is the fully-qualified name of the |
| // OrganizationService's SetOrganizationMember RPC. |
| OrganizationServiceSetOrganizationMemberProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/SetOrganizationMember" |
| // OrganizationServiceGetOrganizationSettingsProcedure is the fully-qualified name of the |
| // OrganizationService's GetOrganizationSettings RPC. |
| OrganizationServiceGetOrganizationSettingsProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/GetOrganizationSettings" |
| // OrganizationServiceUpdateOrganizationSettingsProcedure is the fully-qualified name of the |
| // OrganizationService's UpdateOrganizationSettings RPC. |
| OrganizationServiceUpdateOrganizationSettingsProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/UpdateOrganizationSettings" |
| // OrganizationServiceAddOrganizationGroupProcedure is the fully-qualified name of the |
| // OrganizationService's AddOrganizationGroup RPC. |
| OrganizationServiceAddOrganizationGroupProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/AddOrganizationGroup" |
| // OrganizationServiceRemoveOrganizationGroupProcedure is the fully-qualified name of the |
| // OrganizationService's RemoveOrganizationGroup RPC. |
| OrganizationServiceRemoveOrganizationGroupProcedure = "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/RemoveOrganizationGroup" |
| ) |
| |
| // OrganizationServiceClient is a client for the |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService service. |
| type OrganizationServiceClient interface { |
| // GetOrganization gets a organization by ID. |
| GetOrganization(context.Context, *connect_go.Request[v1alpha1.GetOrganizationRequest]) (*connect_go.Response[v1alpha1.GetOrganizationResponse], error) |
| // GetOrganizationByName gets a organization by name. |
| GetOrganizationByName(context.Context, *connect_go.Request[v1alpha1.GetOrganizationByNameRequest]) (*connect_go.Response[v1alpha1.GetOrganizationByNameResponse], error) |
| // ListOrganizations lists all organizations. |
| ListOrganizations(context.Context, *connect_go.Request[v1alpha1.ListOrganizationsRequest]) (*connect_go.Response[v1alpha1.ListOrganizationsResponse], error) |
| // ListUserOrganizations lists all organizations a user is member of. |
| ListUserOrganizations(context.Context, *connect_go.Request[v1alpha1.ListUserOrganizationsRequest]) (*connect_go.Response[v1alpha1.ListUserOrganizationsResponse], error) |
| GetUserOrganization(context.Context, *connect_go.Request[v1alpha1.GetUserOrganizationRequest]) (*connect_go.Response[v1alpha1.GetUserOrganizationResponse], error) |
| // CreateOrganization creates a new organization. |
| CreateOrganization(context.Context, *connect_go.Request[v1alpha1.CreateOrganizationRequest]) (*connect_go.Response[v1alpha1.CreateOrganizationResponse], error) |
| // DeleteOrganization deletes a organization. |
| DeleteOrganization(context.Context, *connect_go.Request[v1alpha1.DeleteOrganizationRequest]) (*connect_go.Response[v1alpha1.DeleteOrganizationResponse], error) |
| // DeleteOrganizationByName deletes a organization by name. |
| DeleteOrganizationByName(context.Context, *connect_go.Request[v1alpha1.DeleteOrganizationByNameRequest]) (*connect_go.Response[v1alpha1.DeleteOrganizationByNameResponse], error) |
| // AddOrganizationMember add a role to an user in the organization. |
| AddOrganizationMember(context.Context, *connect_go.Request[v1alpha1.AddOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.AddOrganizationMemberResponse], error) |
| // UpdateOrganizationMember update the user's membership information in the organization. |
| UpdateOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UpdateOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationMemberResponse], error) |
| // RemoveOrganizationMember remove the role of an user in the organization. |
| RemoveOrganizationMember(context.Context, *connect_go.Request[v1alpha1.RemoveOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.RemoveOrganizationMemberResponse], error) |
| // SetOrganizationMember sets the role of a user in the organization. |
| SetOrganizationMember(context.Context, *connect_go.Request[v1alpha1.SetOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.SetOrganizationMemberResponse], error) |
| // GetOrganizationSettings gets the settings of an organization, including organization base roles. |
| GetOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.GetOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.GetOrganizationSettingsResponse], error) |
| // UpdateOrganizationSettings update the organization settings including base roles. |
| UpdateOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.UpdateOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationSettingsResponse], error) |
| // AddOrganizationGroup adds an IdP Group to the organization. |
| AddOrganizationGroup(context.Context, *connect_go.Request[v1alpha1.AddOrganizationGroupRequest]) (*connect_go.Response[v1alpha1.AddOrganizationGroupResponse], error) |
| // RemoveOrganizationGroup removes an IdP Group from the organization. |
| RemoveOrganizationGroup(context.Context, *connect_go.Request[v1alpha1.RemoveOrganizationGroupRequest]) (*connect_go.Response[v1alpha1.RemoveOrganizationGroupResponse], error) |
| } |
| |
| // NewOrganizationServiceClient constructs a client for the |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService 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 NewOrganizationServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) OrganizationServiceClient { |
| baseURL = strings.TrimRight(baseURL, "/") |
| return &organizationServiceClient{ |
| getOrganization: connect_go.NewClient[v1alpha1.GetOrganizationRequest, v1alpha1.GetOrganizationResponse]( |
| httpClient, |
| baseURL+OrganizationServiceGetOrganizationProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| getOrganizationByName: connect_go.NewClient[v1alpha1.GetOrganizationByNameRequest, v1alpha1.GetOrganizationByNameResponse]( |
| httpClient, |
| baseURL+OrganizationServiceGetOrganizationByNameProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| listOrganizations: connect_go.NewClient[v1alpha1.ListOrganizationsRequest, v1alpha1.ListOrganizationsResponse]( |
| httpClient, |
| baseURL+OrganizationServiceListOrganizationsProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| listUserOrganizations: connect_go.NewClient[v1alpha1.ListUserOrganizationsRequest, v1alpha1.ListUserOrganizationsResponse]( |
| httpClient, |
| baseURL+OrganizationServiceListUserOrganizationsProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| getUserOrganization: connect_go.NewClient[v1alpha1.GetUserOrganizationRequest, v1alpha1.GetUserOrganizationResponse]( |
| httpClient, |
| baseURL+OrganizationServiceGetUserOrganizationProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| createOrganization: connect_go.NewClient[v1alpha1.CreateOrganizationRequest, v1alpha1.CreateOrganizationResponse]( |
| httpClient, |
| baseURL+OrganizationServiceCreateOrganizationProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyIdempotent), |
| connect_go.WithClientOptions(opts...), |
| ), |
| deleteOrganization: connect_go.NewClient[v1alpha1.DeleteOrganizationRequest, v1alpha1.DeleteOrganizationResponse]( |
| httpClient, |
| baseURL+OrganizationServiceDeleteOrganizationProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyIdempotent), |
| connect_go.WithClientOptions(opts...), |
| ), |
| deleteOrganizationByName: connect_go.NewClient[v1alpha1.DeleteOrganizationByNameRequest, v1alpha1.DeleteOrganizationByNameResponse]( |
| httpClient, |
| baseURL+OrganizationServiceDeleteOrganizationByNameProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyIdempotent), |
| connect_go.WithClientOptions(opts...), |
| ), |
| addOrganizationMember: connect_go.NewClient[v1alpha1.AddOrganizationMemberRequest, v1alpha1.AddOrganizationMemberResponse]( |
| httpClient, |
| baseURL+OrganizationServiceAddOrganizationMemberProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyIdempotent), |
| connect_go.WithClientOptions(opts...), |
| ), |
| updateOrganizationMember: connect_go.NewClient[v1alpha1.UpdateOrganizationMemberRequest, v1alpha1.UpdateOrganizationMemberResponse]( |
| httpClient, |
| baseURL+OrganizationServiceUpdateOrganizationMemberProcedure, |
| opts..., |
| ), |
| removeOrganizationMember: connect_go.NewClient[v1alpha1.RemoveOrganizationMemberRequest, v1alpha1.RemoveOrganizationMemberResponse]( |
| httpClient, |
| baseURL+OrganizationServiceRemoveOrganizationMemberProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyIdempotent), |
| connect_go.WithClientOptions(opts...), |
| ), |
| setOrganizationMember: connect_go.NewClient[v1alpha1.SetOrganizationMemberRequest, v1alpha1.SetOrganizationMemberResponse]( |
| httpClient, |
| baseURL+OrganizationServiceSetOrganizationMemberProcedure, |
| opts..., |
| ), |
| getOrganizationSettings: connect_go.NewClient[v1alpha1.GetOrganizationSettingsRequest, v1alpha1.GetOrganizationSettingsResponse]( |
| httpClient, |
| baseURL+OrganizationServiceGetOrganizationSettingsProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithClientOptions(opts...), |
| ), |
| updateOrganizationSettings: connect_go.NewClient[v1alpha1.UpdateOrganizationSettingsRequest, v1alpha1.UpdateOrganizationSettingsResponse]( |
| httpClient, |
| baseURL+OrganizationServiceUpdateOrganizationSettingsProcedure, |
| opts..., |
| ), |
| addOrganizationGroup: connect_go.NewClient[v1alpha1.AddOrganizationGroupRequest, v1alpha1.AddOrganizationGroupResponse]( |
| httpClient, |
| baseURL+OrganizationServiceAddOrganizationGroupProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyIdempotent), |
| connect_go.WithClientOptions(opts...), |
| ), |
| removeOrganizationGroup: connect_go.NewClient[v1alpha1.RemoveOrganizationGroupRequest, v1alpha1.RemoveOrganizationGroupResponse]( |
| httpClient, |
| baseURL+OrganizationServiceRemoveOrganizationGroupProcedure, |
| connect_go.WithIdempotency(connect_go.IdempotencyIdempotent), |
| connect_go.WithClientOptions(opts...), |
| ), |
| } |
| } |
| |
| // organizationServiceClient implements OrganizationServiceClient. |
| type organizationServiceClient struct { |
| getOrganization *connect_go.Client[v1alpha1.GetOrganizationRequest, v1alpha1.GetOrganizationResponse] |
| getOrganizationByName *connect_go.Client[v1alpha1.GetOrganizationByNameRequest, v1alpha1.GetOrganizationByNameResponse] |
| listOrganizations *connect_go.Client[v1alpha1.ListOrganizationsRequest, v1alpha1.ListOrganizationsResponse] |
| listUserOrganizations *connect_go.Client[v1alpha1.ListUserOrganizationsRequest, v1alpha1.ListUserOrganizationsResponse] |
| getUserOrganization *connect_go.Client[v1alpha1.GetUserOrganizationRequest, v1alpha1.GetUserOrganizationResponse] |
| createOrganization *connect_go.Client[v1alpha1.CreateOrganizationRequest, v1alpha1.CreateOrganizationResponse] |
| deleteOrganization *connect_go.Client[v1alpha1.DeleteOrganizationRequest, v1alpha1.DeleteOrganizationResponse] |
| deleteOrganizationByName *connect_go.Client[v1alpha1.DeleteOrganizationByNameRequest, v1alpha1.DeleteOrganizationByNameResponse] |
| addOrganizationMember *connect_go.Client[v1alpha1.AddOrganizationMemberRequest, v1alpha1.AddOrganizationMemberResponse] |
| updateOrganizationMember *connect_go.Client[v1alpha1.UpdateOrganizationMemberRequest, v1alpha1.UpdateOrganizationMemberResponse] |
| removeOrganizationMember *connect_go.Client[v1alpha1.RemoveOrganizationMemberRequest, v1alpha1.RemoveOrganizationMemberResponse] |
| setOrganizationMember *connect_go.Client[v1alpha1.SetOrganizationMemberRequest, v1alpha1.SetOrganizationMemberResponse] |
| getOrganizationSettings *connect_go.Client[v1alpha1.GetOrganizationSettingsRequest, v1alpha1.GetOrganizationSettingsResponse] |
| updateOrganizationSettings *connect_go.Client[v1alpha1.UpdateOrganizationSettingsRequest, v1alpha1.UpdateOrganizationSettingsResponse] |
| addOrganizationGroup *connect_go.Client[v1alpha1.AddOrganizationGroupRequest, v1alpha1.AddOrganizationGroupResponse] |
| removeOrganizationGroup *connect_go.Client[v1alpha1.RemoveOrganizationGroupRequest, v1alpha1.RemoveOrganizationGroupResponse] |
| } |
| |
| // GetOrganization calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.GetOrganization. |
| func (c *organizationServiceClient) GetOrganization(ctx context.Context, req *connect_go.Request[v1alpha1.GetOrganizationRequest]) (*connect_go.Response[v1alpha1.GetOrganizationResponse], error) { |
| return c.getOrganization.CallUnary(ctx, req) |
| } |
| |
| // GetOrganizationByName calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.GetOrganizationByName. |
| func (c *organizationServiceClient) GetOrganizationByName(ctx context.Context, req *connect_go.Request[v1alpha1.GetOrganizationByNameRequest]) (*connect_go.Response[v1alpha1.GetOrganizationByNameResponse], error) { |
| return c.getOrganizationByName.CallUnary(ctx, req) |
| } |
| |
| // ListOrganizations calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.ListOrganizations. |
| func (c *organizationServiceClient) ListOrganizations(ctx context.Context, req *connect_go.Request[v1alpha1.ListOrganizationsRequest]) (*connect_go.Response[v1alpha1.ListOrganizationsResponse], error) { |
| return c.listOrganizations.CallUnary(ctx, req) |
| } |
| |
| // ListUserOrganizations calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.ListUserOrganizations. |
| func (c *organizationServiceClient) ListUserOrganizations(ctx context.Context, req *connect_go.Request[v1alpha1.ListUserOrganizationsRequest]) (*connect_go.Response[v1alpha1.ListUserOrganizationsResponse], error) { |
| return c.listUserOrganizations.CallUnary(ctx, req) |
| } |
| |
| // GetUserOrganization calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.GetUserOrganization. |
| func (c *organizationServiceClient) GetUserOrganization(ctx context.Context, req *connect_go.Request[v1alpha1.GetUserOrganizationRequest]) (*connect_go.Response[v1alpha1.GetUserOrganizationResponse], error) { |
| return c.getUserOrganization.CallUnary(ctx, req) |
| } |
| |
| // CreateOrganization calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.CreateOrganization. |
| func (c *organizationServiceClient) CreateOrganization(ctx context.Context, req *connect_go.Request[v1alpha1.CreateOrganizationRequest]) (*connect_go.Response[v1alpha1.CreateOrganizationResponse], error) { |
| return c.createOrganization.CallUnary(ctx, req) |
| } |
| |
| // DeleteOrganization calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.DeleteOrganization. |
| func (c *organizationServiceClient) DeleteOrganization(ctx context.Context, req *connect_go.Request[v1alpha1.DeleteOrganizationRequest]) (*connect_go.Response[v1alpha1.DeleteOrganizationResponse], error) { |
| return c.deleteOrganization.CallUnary(ctx, req) |
| } |
| |
| // DeleteOrganizationByName calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.DeleteOrganizationByName. |
| func (c *organizationServiceClient) DeleteOrganizationByName(ctx context.Context, req *connect_go.Request[v1alpha1.DeleteOrganizationByNameRequest]) (*connect_go.Response[v1alpha1.DeleteOrganizationByNameResponse], error) { |
| return c.deleteOrganizationByName.CallUnary(ctx, req) |
| } |
| |
| // AddOrganizationMember calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.AddOrganizationMember. |
| func (c *organizationServiceClient) AddOrganizationMember(ctx context.Context, req *connect_go.Request[v1alpha1.AddOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.AddOrganizationMemberResponse], error) { |
| return c.addOrganizationMember.CallUnary(ctx, req) |
| } |
| |
| // UpdateOrganizationMember calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.UpdateOrganizationMember. |
| func (c *organizationServiceClient) UpdateOrganizationMember(ctx context.Context, req *connect_go.Request[v1alpha1.UpdateOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationMemberResponse], error) { |
| return c.updateOrganizationMember.CallUnary(ctx, req) |
| } |
| |
| // RemoveOrganizationMember calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.RemoveOrganizationMember. |
| func (c *organizationServiceClient) RemoveOrganizationMember(ctx context.Context, req *connect_go.Request[v1alpha1.RemoveOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.RemoveOrganizationMemberResponse], error) { |
| return c.removeOrganizationMember.CallUnary(ctx, req) |
| } |
| |
| // SetOrganizationMember calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.SetOrganizationMember. |
| func (c *organizationServiceClient) SetOrganizationMember(ctx context.Context, req *connect_go.Request[v1alpha1.SetOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.SetOrganizationMemberResponse], error) { |
| return c.setOrganizationMember.CallUnary(ctx, req) |
| } |
| |
| // GetOrganizationSettings calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.GetOrganizationSettings. |
| func (c *organizationServiceClient) GetOrganizationSettings(ctx context.Context, req *connect_go.Request[v1alpha1.GetOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.GetOrganizationSettingsResponse], error) { |
| return c.getOrganizationSettings.CallUnary(ctx, req) |
| } |
| |
| // UpdateOrganizationSettings calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.UpdateOrganizationSettings. |
| func (c *organizationServiceClient) UpdateOrganizationSettings(ctx context.Context, req *connect_go.Request[v1alpha1.UpdateOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationSettingsResponse], error) { |
| return c.updateOrganizationSettings.CallUnary(ctx, req) |
| } |
| |
| // AddOrganizationGroup calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.AddOrganizationGroup. |
| func (c *organizationServiceClient) AddOrganizationGroup(ctx context.Context, req *connect_go.Request[v1alpha1.AddOrganizationGroupRequest]) (*connect_go.Response[v1alpha1.AddOrganizationGroupResponse], error) { |
| return c.addOrganizationGroup.CallUnary(ctx, req) |
| } |
| |
| // RemoveOrganizationGroup calls |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.RemoveOrganizationGroup. |
| func (c *organizationServiceClient) RemoveOrganizationGroup(ctx context.Context, req *connect_go.Request[v1alpha1.RemoveOrganizationGroupRequest]) (*connect_go.Response[v1alpha1.RemoveOrganizationGroupResponse], error) { |
| return c.removeOrganizationGroup.CallUnary(ctx, req) |
| } |
| |
| // OrganizationServiceHandler is an implementation of the |
| // bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService service. |
| type OrganizationServiceHandler interface { |
| // GetOrganization gets a organization by ID. |
| GetOrganization(context.Context, *connect_go.Request[v1alpha1.GetOrganizationRequest]) (*connect_go.Response[v1alpha1.GetOrganizationResponse], error) |
| // GetOrganizationByName gets a organization by name. |
| GetOrganizationByName(context.Context, *connect_go.Request[v1alpha1.GetOrganizationByNameRequest]) (*connect_go.Response[v1alpha1.GetOrganizationByNameResponse], error) |
| // ListOrganizations lists all organizations. |
| ListOrganizations(context.Context, *connect_go.Request[v1alpha1.ListOrganizationsRequest]) (*connect_go.Response[v1alpha1.ListOrganizationsResponse], error) |
| // ListUserOrganizations lists all organizations a user is member of. |
| ListUserOrganizations(context.Context, *connect_go.Request[v1alpha1.ListUserOrganizationsRequest]) (*connect_go.Response[v1alpha1.ListUserOrganizationsResponse], error) |
| GetUserOrganization(context.Context, *connect_go.Request[v1alpha1.GetUserOrganizationRequest]) (*connect_go.Response[v1alpha1.GetUserOrganizationResponse], error) |
| // CreateOrganization creates a new organization. |
| CreateOrganization(context.Context, *connect_go.Request[v1alpha1.CreateOrganizationRequest]) (*connect_go.Response[v1alpha1.CreateOrganizationResponse], error) |
| // DeleteOrganization deletes a organization. |
| DeleteOrganization(context.Context, *connect_go.Request[v1alpha1.DeleteOrganizationRequest]) (*connect_go.Response[v1alpha1.DeleteOrganizationResponse], error) |
| // DeleteOrganizationByName deletes a organization by name. |
| DeleteOrganizationByName(context.Context, *connect_go.Request[v1alpha1.DeleteOrganizationByNameRequest]) (*connect_go.Response[v1alpha1.DeleteOrganizationByNameResponse], error) |
| // AddOrganizationMember add a role to an user in the organization. |
| AddOrganizationMember(context.Context, *connect_go.Request[v1alpha1.AddOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.AddOrganizationMemberResponse], error) |
| // UpdateOrganizationMember update the user's membership information in the organization. |
| UpdateOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UpdateOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationMemberResponse], error) |
| // RemoveOrganizationMember remove the role of an user in the organization. |
| RemoveOrganizationMember(context.Context, *connect_go.Request[v1alpha1.RemoveOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.RemoveOrganizationMemberResponse], error) |
| // SetOrganizationMember sets the role of a user in the organization. |
| SetOrganizationMember(context.Context, *connect_go.Request[v1alpha1.SetOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.SetOrganizationMemberResponse], error) |
| // GetOrganizationSettings gets the settings of an organization, including organization base roles. |
| GetOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.GetOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.GetOrganizationSettingsResponse], error) |
| // UpdateOrganizationSettings update the organization settings including base roles. |
| UpdateOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.UpdateOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationSettingsResponse], error) |
| // AddOrganizationGroup adds an IdP Group to the organization. |
| AddOrganizationGroup(context.Context, *connect_go.Request[v1alpha1.AddOrganizationGroupRequest]) (*connect_go.Response[v1alpha1.AddOrganizationGroupResponse], error) |
| // RemoveOrganizationGroup removes an IdP Group from the organization. |
| RemoveOrganizationGroup(context.Context, *connect_go.Request[v1alpha1.RemoveOrganizationGroupRequest]) (*connect_go.Response[v1alpha1.RemoveOrganizationGroupResponse], error) |
| } |
| |
| // NewOrganizationServiceHandler 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 NewOrganizationServiceHandler(svc OrganizationServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) { |
| organizationServiceGetOrganizationHandler := connect_go.NewUnaryHandler( |
| OrganizationServiceGetOrganizationProcedure, |
| svc.GetOrganization, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| organizationServiceGetOrganizationByNameHandler := connect_go.NewUnaryHandler( |
| OrganizationServiceGetOrganizationByNameProcedure, |
| svc.GetOrganizationByName, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| organizationServiceListOrganizationsHandler := connect_go.NewUnaryHandler( |
| OrganizationServiceListOrganizationsProcedure, |
| svc.ListOrganizations, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| organizationServiceListUserOrganizationsHandler := connect_go.NewUnaryHandler( |
| OrganizationServiceListUserOrganizationsProcedure, |
| svc.ListUserOrganizations, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| organizationServiceGetUserOrganizationHandler := connect_go.NewUnaryHandler( |
| OrganizationServiceGetUserOrganizationProcedure, |
| svc.GetUserOrganization, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| organizationServiceCreateOrganizationHandler := connect_go.NewUnaryHandler( |
| OrganizationServiceCreateOrganizationProcedure, |
| svc.CreateOrganization, |
| connect_go.WithIdempotency(connect_go.IdempotencyIdempotent), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| organizationServiceDeleteOrganizationHandler := connect_go.NewUnaryHandler( |
| OrganizationServiceDeleteOrganizationProcedure, |
| svc.DeleteOrganization, |
| connect_go.WithIdempotency(connect_go.IdempotencyIdempotent), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| organizationServiceDeleteOrganizationByNameHandler := connect_go.NewUnaryHandler( |
| OrganizationServiceDeleteOrganizationByNameProcedure, |
| svc.DeleteOrganizationByName, |
| connect_go.WithIdempotency(connect_go.IdempotencyIdempotent), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| organizationServiceAddOrganizationMemberHandler := connect_go.NewUnaryHandler( |
| OrganizationServiceAddOrganizationMemberProcedure, |
| svc.AddOrganizationMember, |
| connect_go.WithIdempotency(connect_go.IdempotencyIdempotent), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| organizationServiceUpdateOrganizationMemberHandler := connect_go.NewUnaryHandler( |
| OrganizationServiceUpdateOrganizationMemberProcedure, |
| svc.UpdateOrganizationMember, |
| opts..., |
| ) |
| organizationServiceRemoveOrganizationMemberHandler := connect_go.NewUnaryHandler( |
| OrganizationServiceRemoveOrganizationMemberProcedure, |
| svc.RemoveOrganizationMember, |
| connect_go.WithIdempotency(connect_go.IdempotencyIdempotent), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| organizationServiceSetOrganizationMemberHandler := connect_go.NewUnaryHandler( |
| OrganizationServiceSetOrganizationMemberProcedure, |
| svc.SetOrganizationMember, |
| opts..., |
| ) |
| organizationServiceGetOrganizationSettingsHandler := connect_go.NewUnaryHandler( |
| OrganizationServiceGetOrganizationSettingsProcedure, |
| svc.GetOrganizationSettings, |
| connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| organizationServiceUpdateOrganizationSettingsHandler := connect_go.NewUnaryHandler( |
| OrganizationServiceUpdateOrganizationSettingsProcedure, |
| svc.UpdateOrganizationSettings, |
| opts..., |
| ) |
| organizationServiceAddOrganizationGroupHandler := connect_go.NewUnaryHandler( |
| OrganizationServiceAddOrganizationGroupProcedure, |
| svc.AddOrganizationGroup, |
| connect_go.WithIdempotency(connect_go.IdempotencyIdempotent), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| organizationServiceRemoveOrganizationGroupHandler := connect_go.NewUnaryHandler( |
| OrganizationServiceRemoveOrganizationGroupProcedure, |
| svc.RemoveOrganizationGroup, |
| connect_go.WithIdempotency(connect_go.IdempotencyIdempotent), |
| connect_go.WithHandlerOptions(opts...), |
| ) |
| return "/bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| switch r.URL.Path { |
| case OrganizationServiceGetOrganizationProcedure: |
| organizationServiceGetOrganizationHandler.ServeHTTP(w, r) |
| case OrganizationServiceGetOrganizationByNameProcedure: |
| organizationServiceGetOrganizationByNameHandler.ServeHTTP(w, r) |
| case OrganizationServiceListOrganizationsProcedure: |
| organizationServiceListOrganizationsHandler.ServeHTTP(w, r) |
| case OrganizationServiceListUserOrganizationsProcedure: |
| organizationServiceListUserOrganizationsHandler.ServeHTTP(w, r) |
| case OrganizationServiceGetUserOrganizationProcedure: |
| organizationServiceGetUserOrganizationHandler.ServeHTTP(w, r) |
| case OrganizationServiceCreateOrganizationProcedure: |
| organizationServiceCreateOrganizationHandler.ServeHTTP(w, r) |
| case OrganizationServiceDeleteOrganizationProcedure: |
| organizationServiceDeleteOrganizationHandler.ServeHTTP(w, r) |
| case OrganizationServiceDeleteOrganizationByNameProcedure: |
| organizationServiceDeleteOrganizationByNameHandler.ServeHTTP(w, r) |
| case OrganizationServiceAddOrganizationMemberProcedure: |
| organizationServiceAddOrganizationMemberHandler.ServeHTTP(w, r) |
| case OrganizationServiceUpdateOrganizationMemberProcedure: |
| organizationServiceUpdateOrganizationMemberHandler.ServeHTTP(w, r) |
| case OrganizationServiceRemoveOrganizationMemberProcedure: |
| organizationServiceRemoveOrganizationMemberHandler.ServeHTTP(w, r) |
| case OrganizationServiceSetOrganizationMemberProcedure: |
| organizationServiceSetOrganizationMemberHandler.ServeHTTP(w, r) |
| case OrganizationServiceGetOrganizationSettingsProcedure: |
| organizationServiceGetOrganizationSettingsHandler.ServeHTTP(w, r) |
| case OrganizationServiceUpdateOrganizationSettingsProcedure: |
| organizationServiceUpdateOrganizationSettingsHandler.ServeHTTP(w, r) |
| case OrganizationServiceAddOrganizationGroupProcedure: |
| organizationServiceAddOrganizationGroupHandler.ServeHTTP(w, r) |
| case OrganizationServiceRemoveOrganizationGroupProcedure: |
| organizationServiceRemoveOrganizationGroupHandler.ServeHTTP(w, r) |
| default: |
| http.NotFound(w, r) |
| } |
| }) |
| } |
| |
| // UnimplementedOrganizationServiceHandler returns CodeUnimplemented from all methods. |
| type UnimplementedOrganizationServiceHandler struct{} |
| |
| func (UnimplementedOrganizationServiceHandler) GetOrganization(context.Context, *connect_go.Request[v1alpha1.GetOrganizationRequest]) (*connect_go.Response[v1alpha1.GetOrganizationResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.GetOrganization is not implemented")) |
| } |
| |
| func (UnimplementedOrganizationServiceHandler) GetOrganizationByName(context.Context, *connect_go.Request[v1alpha1.GetOrganizationByNameRequest]) (*connect_go.Response[v1alpha1.GetOrganizationByNameResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.GetOrganizationByName is not implemented")) |
| } |
| |
| func (UnimplementedOrganizationServiceHandler) ListOrganizations(context.Context, *connect_go.Request[v1alpha1.ListOrganizationsRequest]) (*connect_go.Response[v1alpha1.ListOrganizationsResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.ListOrganizations is not implemented")) |
| } |
| |
| func (UnimplementedOrganizationServiceHandler) ListUserOrganizations(context.Context, *connect_go.Request[v1alpha1.ListUserOrganizationsRequest]) (*connect_go.Response[v1alpha1.ListUserOrganizationsResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.ListUserOrganizations is not implemented")) |
| } |
| |
| func (UnimplementedOrganizationServiceHandler) GetUserOrganization(context.Context, *connect_go.Request[v1alpha1.GetUserOrganizationRequest]) (*connect_go.Response[v1alpha1.GetUserOrganizationResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.GetUserOrganization is not implemented")) |
| } |
| |
| func (UnimplementedOrganizationServiceHandler) CreateOrganization(context.Context, *connect_go.Request[v1alpha1.CreateOrganizationRequest]) (*connect_go.Response[v1alpha1.CreateOrganizationResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.CreateOrganization is not implemented")) |
| } |
| |
| func (UnimplementedOrganizationServiceHandler) DeleteOrganization(context.Context, *connect_go.Request[v1alpha1.DeleteOrganizationRequest]) (*connect_go.Response[v1alpha1.DeleteOrganizationResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.DeleteOrganization is not implemented")) |
| } |
| |
| func (UnimplementedOrganizationServiceHandler) DeleteOrganizationByName(context.Context, *connect_go.Request[v1alpha1.DeleteOrganizationByNameRequest]) (*connect_go.Response[v1alpha1.DeleteOrganizationByNameResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.DeleteOrganizationByName is not implemented")) |
| } |
| |
| func (UnimplementedOrganizationServiceHandler) AddOrganizationMember(context.Context, *connect_go.Request[v1alpha1.AddOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.AddOrganizationMemberResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.AddOrganizationMember is not implemented")) |
| } |
| |
| func (UnimplementedOrganizationServiceHandler) UpdateOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UpdateOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationMemberResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.UpdateOrganizationMember is not implemented")) |
| } |
| |
| func (UnimplementedOrganizationServiceHandler) RemoveOrganizationMember(context.Context, *connect_go.Request[v1alpha1.RemoveOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.RemoveOrganizationMemberResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.RemoveOrganizationMember is not implemented")) |
| } |
| |
| func (UnimplementedOrganizationServiceHandler) SetOrganizationMember(context.Context, *connect_go.Request[v1alpha1.SetOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.SetOrganizationMemberResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.SetOrganizationMember is not implemented")) |
| } |
| |
| func (UnimplementedOrganizationServiceHandler) GetOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.GetOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.GetOrganizationSettingsResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.GetOrganizationSettings is not implemented")) |
| } |
| |
| func (UnimplementedOrganizationServiceHandler) UpdateOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.UpdateOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationSettingsResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.UpdateOrganizationSettings is not implemented")) |
| } |
| |
| func (UnimplementedOrganizationServiceHandler) AddOrganizationGroup(context.Context, *connect_go.Request[v1alpha1.AddOrganizationGroupRequest]) (*connect_go.Response[v1alpha1.AddOrganizationGroupResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.AddOrganizationGroup is not implemented")) |
| } |
| |
| func (UnimplementedOrganizationServiceHandler) RemoveOrganizationGroup(context.Context, *connect_go.Request[v1alpha1.RemoveOrganizationGroupRequest]) (*connect_go.Response[v1alpha1.RemoveOrganizationGroupResponse], error) { |
| return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("bufman.dubbo.apache.org.registry.v1alpha1.OrganizationService.RemoveOrganizationGroup is not implemented")) |
| } |