Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: group proto restructure (#13156)

Danny Xud56d6740ac09
diff --git a/backend/api/v1/user_group_service.go b/backend/api/v1/group_service.go
similarity index 69%
rename from backend/api/v1/user_group_service.go
rename to backend/api/v1/group_service.go
index 862f42aac5..5683d83ff4 100644
--- a/backend/api/v1/user_group_service.go
+++ b/backend/api/v1/group_service.go
@@ -15,29 +15,29 @@ import (
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
)
-// UserGroupService implements the user group service.
-type UserGroupService struct {
- v1pb.UnimplementedUserGroupServiceServer
+// GroupService implements the group service.
+type GroupService struct {
+ v1pb.UnimplementedGroupServiceServer
store *store.Store
iamManager *iam.Manager
}
-// NewUserGroupService creates a new UserGroupService.
-func NewUserGroupService(store *store.Store, iamManager *iam.Manager) *UserGroupService {
- return &UserGroupService{
+// NewGroupService creates a new GroupService.
+func NewGroupService(store *store.Store, iamManager *iam.Manager) *GroupService {
+ return &GroupService{
store: store,
iamManager: iamManager,
}
}
-// GetUserGroup gets a group.
-func (s *UserGroupService) GetUserGroup(ctx context.Context, request *v1pb.GetUserGroupRequest) (*v1pb.UserGroup, error) {
+// GetGroup gets a group.
+func (s *GroupService) GetGroup(ctx context.Context, request *v1pb.GetGroupRequest) (*v1pb.Group, error) {
email, err := common.GetGroupEmail(request.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
}
- group, err := s.store.GetUserGroup(ctx, email)
+ group, err := s.store.GetGroup(ctx, email)
if err != nil {
return nil, status.Errorf(codes.Internal, err.Error())
}
@@ -45,14 +45,14 @@ func (s *UserGroupService) GetUserGroup(ctx context.Context, request *v1pb.GetUs
return s.convertToV1Group(ctx, group)
}
-// ListUserGroups lists all groups.
-func (s *UserGroupService) ListUserGroups(ctx context.Context, _ *v1pb.ListUserGroupsRequest) (*v1pb.ListUserGroupsResponse, error) {
- groups, err := s.store.ListUserGroups(ctx, &store.FindUserGroupMessage{})
+// ListGroups lists all groups.
+func (s *GroupService) ListGroups(ctx context.Context, _ *v1pb.ListGroupsRequest) (*v1pb.ListGroupsResponse, error) {
+ groups, err := s.store.ListGroups(ctx, &store.FindGroupMessage{})
if err != nil {
return nil, status.Errorf(codes.Internal, err.Error())
}
- response := &v1pb.ListUserGroupsResponse{}
+ response := &v1pb.ListGroupsResponse{}
for _, groupMessage := range groups {
group, err := s.convertToV1Group(ctx, groupMessage)
if err != nil {
@@ -63,8 +63,8 @@ func (s *UserGroupService) ListUserGroups(ctx context.Context, _ *v1pb.ListUserG
return response, nil
}
-// CreateUserGroup creates a group.
-func (s *UserGroupService) CreateUserGroup(ctx context.Context, request *v1pb.CreateUserGroupRequest) (*v1pb.UserGroup, error) {
+// CreateGroup creates a group.
+func (s *GroupService) CreateGroup(ctx context.Context, request *v1pb.CreateGroupRequest) (*v1pb.Group, error) {
groupMessage, err := s.convertToGroupMessage(ctx, request.Group)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
@@ -75,7 +75,7 @@ func (s *UserGroupService) CreateUserGroup(ctx context.Context, request *v1pb.Cr
return nil, status.Errorf(codes.Internal, "failed to get workspace setting: %v", err)
}
if len(setting.Domains) == 0 {
- return nil, status.Errorf(codes.FailedPrecondition, "workspace domain is required for creating user groups")
+ return nil, status.Errorf(codes.FailedPrecondition, "workspace domain is required for creating groups")
}
if err := validateEmail(groupMessage.Email, setting.Domains, false /* isServiceAccount */); err != nil {
return nil, status.Errorf(codes.InvalidArgument, "invalid email %q, error: %v", groupMessage.Email, err)
@@ -86,7 +86,7 @@ func (s *UserGroupService) CreateUserGroup(ctx context.Context, request *v1pb.Cr
return nil, status.Errorf(codes.Internal, "principal ID not found")
}
- group, err := s.store.CreateUserGroup(ctx, groupMessage, principalID)
+ group, err := s.store.CreateGroup(ctx, groupMessage, principalID)
if err != nil {
return nil, status.Errorf(codes.Internal, err.Error())
}
@@ -98,8 +98,8 @@ func (s *UserGroupService) CreateUserGroup(ctx context.Context, request *v1pb.Cr
return s.convertToV1Group(ctx, group)
}
-// UpdateUserGroup updates a group.
-func (s *UserGroupService) UpdateUserGroup(ctx context.Context, request *v1pb.UpdateUserGroupRequest) (*v1pb.UserGroup, error) {
+// UpdateGroup updates a group.
+func (s *GroupService) UpdateGroup(ctx context.Context, request *v1pb.UpdateGroupRequest) (*v1pb.Group, error) {
groupEmail, err := common.GetGroupEmail(request.Group.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
@@ -111,7 +111,7 @@ func (s *UserGroupService) UpdateUserGroup(ctx context.Context, request *v1pb.Up
}
userName := common.FormatUserUID(user.ID)
- group, err := s.store.GetUserGroup(ctx, groupEmail)
+ group, err := s.store.GetGroup(ctx, groupEmail)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get group %q with error: %v", groupEmail, err)
}
@@ -121,11 +121,11 @@ func (s *UserGroupService) UpdateUserGroup(ctx context.Context, request *v1pb.Up
ok, err = func() (bool, error) {
for _, member := range group.Payload.GetMembers() {
- if member.Role == storepb.UserGroupMember_OWNER && member.Member == userName {
+ if member.Role == storepb.GroupMember_OWNER && member.Member == userName {
return true, nil
}
}
- return s.iamManager.CheckPermission(ctx, iam.PermissionUserGroupsUpdate, user)
+ return s.iamManager.CheckPermission(ctx, iam.PermissionGroupsUpdate, user)
}()
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to check permission, error: %v", err)
@@ -134,7 +134,7 @@ func (s *UserGroupService) UpdateUserGroup(ctx context.Context, request *v1pb.Up
return nil, status.Errorf(codes.PermissionDenied, "permission denied to update group")
}
- patch := &store.UpdateUserGroupMessage{}
+ patch := &store.UpdateGroupMessage{}
for _, path := range request.UpdateMask.Paths {
switch path {
case "title":
@@ -152,7 +152,7 @@ func (s *UserGroupService) UpdateUserGroup(ctx context.Context, request *v1pb.Up
}
}
- groupMessage, err := s.store.UpdateUserGroup(ctx, groupEmail, patch, user.ID)
+ groupMessage, err := s.store.UpdateGroup(ctx, groupEmail, patch, user.ID)
if err != nil {
return nil, status.Errorf(codes.Internal, err.Error())
}
@@ -164,14 +164,14 @@ func (s *UserGroupService) UpdateUserGroup(ctx context.Context, request *v1pb.Up
return s.convertToV1Group(ctx, groupMessage)
}
-// DeleteUserGroup deletes a group.
-func (s *UserGroupService) DeleteUserGroup(ctx context.Context, request *v1pb.DeleteUserGroupRequest) (*emptypb.Empty, error) {
+// DeleteGroup deletes a group.
+func (s *GroupService) DeleteGroup(ctx context.Context, request *v1pb.DeleteGroupRequest) (*emptypb.Empty, error) {
email, err := common.GetGroupEmail(request.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
}
- if err := s.store.DeleteUserGroup(ctx, email); err != nil {
+ if err := s.store.DeleteGroup(ctx, email); err != nil {
return nil, status.Errorf(codes.Internal, err.Error())
}
@@ -182,8 +182,8 @@ func (s *UserGroupService) DeleteUserGroup(ctx context.Context, request *v1pb.De
return &emptypb.Empty{}, nil
}
-func (s *UserGroupService) convertToGroupPayload(ctx context.Context, group *v1pb.UserGroup) (*storepb.UserGroupPayload, error) {
- payload := &storepb.UserGroupPayload{}
+func (s *GroupService) convertToGroupPayload(ctx context.Context, group *v1pb.Group) (*storepb.GroupPayload, error) {
+ payload := &storepb.GroupPayload{}
for _, member := range group.Members {
email, err := common.GetUserEmail(member.Member)
if err != nil {
@@ -197,14 +197,14 @@ func (s *UserGroupService) convertToGroupPayload(ctx context.Context, group *v1p
return nil, status.Errorf(codes.InvalidArgument, "cannot found member %s", member.Member)
}
- m := &storepb.UserGroupMember{
+ m := &storepb.GroupMember{
Member: common.FormatUserUID(user.ID),
}
switch member.Role {
- case v1pb.UserGroupMember_MEMBER:
- m.Role = storepb.UserGroupMember_MEMBER
- case v1pb.UserGroupMember_OWNER:
- m.Role = storepb.UserGroupMember_OWNER
+ case v1pb.GroupMember_MEMBER:
+ m.Role = storepb.GroupMember_MEMBER
+ case v1pb.GroupMember_OWNER:
+ m.Role = storepb.GroupMember_OWNER
default:
return nil, status.Errorf(codes.InvalidArgument, "unsupport group member role %v", member.Role)
}
@@ -213,17 +213,17 @@ func (s *UserGroupService) convertToGroupPayload(ctx context.Context, group *v1p
return payload, nil
}
-func (s *UserGroupService) convertToGroupMessage(ctx context.Context, group *v1pb.UserGroup) (*store.UserGroupMessage, error) {
+func (s *GroupService) convertToGroupMessage(ctx context.Context, group *v1pb.Group) (*store.GroupMessage, error) {
email, err := common.GetGroupEmail(group.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
}
- groupMessage := &store.UserGroupMessage{
+ groupMessage := &store.GroupMessage{
Email: email,
Title: group.Title,
Description: group.Description,
- Payload: &storepb.UserGroupPayload{},
+ Payload: &storepb.GroupPayload{},
}
payload, err := s.convertToGroupPayload(ctx, group)
@@ -234,7 +234,7 @@ func (s *UserGroupService) convertToGroupMessage(ctx context.Context, group *v1p
return groupMessage, nil
}
-func (s *UserGroupService) convertToV1Group(ctx context.Context, groupMessage *store.UserGroupMessage) (*v1pb.UserGroup, error) {
+func (s *GroupService) convertToV1Group(ctx context.Context, groupMessage *store.GroupMessage) (*v1pb.Group, error) {
if groupMessage == nil {
return nil, status.Errorf(codes.NotFound, "cannot found group")
}
@@ -246,7 +246,7 @@ func (s *UserGroupService) convertToV1Group(ctx context.Context, groupMessage *s
return nil, status.Errorf(codes.NotFound, "creator %d not found", groupMessage.CreatorUID)
}
- group := &v1pb.UserGroup{
+ group := &v1pb.Group{
Name: common.FormatGroupEmail(groupMessage.Email),
Title: groupMessage.Title,
Description: groupMessage.Description,
@@ -267,15 +267,15 @@ func (s *UserGroupService) convertToV1Group(ctx context.Context, groupMessage *s
continue
}
- m := &v1pb.UserGroupMember{
+ m := &v1pb.GroupMember{
Member: common.FormatUserEmail(user.Email),
- Role: v1pb.UserGroupMember_ROLE_UNSPECIFIED,
+ Role: v1pb.GroupMember_ROLE_UNSPECIFIED,
}
switch member.Role {
- case storepb.UserGroupMember_MEMBER:
- m.Role = v1pb.UserGroupMember_MEMBER
- case storepb.UserGroupMember_OWNER:
- m.Role = v1pb.UserGroupMember_OWNER
+ case storepb.GroupMember_MEMBER:
+ m.Role = v1pb.GroupMember_MEMBER
+ case storepb.GroupMember_OWNER:
+ m.Role = v1pb.GroupMember_OWNER
}
group.Members = append(group.Members, m)
}
diff --git a/backend/api/v1/project_service.go b/backend/api/v1/project_service.go
index 961f4ea75c..680c30d873 100644
--- a/backend/api/v1/project_service.go
+++ b/backend/api/v1/project_service.go
@@ -1201,7 +1201,7 @@ func convertToV1IamPolicy(ctx context.Context, stores *store.Store, iamPolicy *s
continue
}
members = append(members, fmt.Sprintf("user:%s", user.Email))
- } else if strings.HasPrefix(member, common.UserGroupPrefix) {
+ } else if strings.HasPrefix(member, common.GroupPrefix) {
email, err := common.GetGroupEmail(member)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to parse group email from member %s with error: %v", member, err)
diff --git a/backend/common/resource_name.go b/backend/common/resource_name.go
index 6b6e1812d8..c8df460e55 100644
--- a/backend/common/resource_name.go
+++ b/backend/common/resource_name.go
@@ -47,7 +47,7 @@ const (
ChangelistsPrefix = "changelists/"
VCSConnectorPrefix = "vcsConnectors/"
AuditLogPrefix = "auditLogs/"
- UserGroupPrefix = "groups/"
+ GroupPrefix = "groups/"
ReviewConfigPrefix = "reviewConfigs/"
SchemaSuffix = "/schema"
@@ -534,7 +534,7 @@ func GetWorkspaceProjectVCSConnectorID(name string) (string, string, string, err
// GetGroupEmail returns the group email.
func GetGroupEmail(name string) (string, error) {
- tokens, err := GetNameParentTokens(name, UserGroupPrefix)
+ tokens, err := GetNameParentTokens(name, GroupPrefix)
if err != nil {
return "", err
}
@@ -587,7 +587,7 @@ func FormatUserUID(uid int) string {
}
func FormatGroupEmail(email string) string {
- return fmt.Sprintf("%s%s", UserGroupPrefix, email)
+ return fmt.Sprintf("%s%s", GroupPrefix, email)
}
func FormatReviewConfig(id string) string {
diff --git a/backend/component/iam/acl.yaml b/backend/component/iam/acl.yaml
index d6bbfb631d..a9ff2865e0 100644
--- a/backend/component/iam/acl.yaml
+++ b/backend/component/iam/acl.yaml
@@ -99,11 +99,11 @@ roles:
- bb.slowQueries.list
- bb.taskRuns.create
- bb.taskRuns.list
- - bb.userGroups.create
- - bb.userGroups.delete
- - bb.userGroups.get
- - bb.userGroups.list
- - bb.userGroups.update
+ - bb.groups.create
+ - bb.groups.delete
+ - bb.groups.get
+ - bb.groups.list
+ - bb.groups.update
- bb.users.create
- bb.users.delete
- bb.users.undelete
@@ -222,8 +222,8 @@ roles:
- bb.slowQueries.list
- bb.taskRuns.create
- bb.taskRuns.list
- - bb.userGroups.get
- - bb.userGroups.list
+ - bb.groups.get
+ - bb.groups.list
- bb.vcsConnectors.create
- bb.vcsConnectors.delete
- bb.vcsConnectors.get
@@ -251,8 +251,8 @@ roles:
- bb.roles.list
- bb.settings.get
- bb.settings.list
- - bb.userGroups.get
- - bb.userGroups.list
+ - bb.groups.get
+ - bb.groups.list
- bb.vcsProviders.get
- bb.vcsProviders.list
- bb.vcsProviders.searchProjects
diff --git a/backend/component/iam/manager.go b/backend/component/iam/manager.go
index 35e6eea472..1977d3209e 100644
--- a/backend/component/iam/manager.go
+++ b/backend/component/iam/manager.go
@@ -28,11 +28,11 @@ type acl struct {
type Manager struct {
// rolePermissions is a map from role to permissions. Key is "roles/{role}".
- rolePermissions map[string]map[Permission]bool
- userGroupMembers map[string]map[string]bool
- PredefinedRoles []*store.RoleMessage
- store *store.Store
- licenseService enterprise.LicenseService
+ rolePermissions map[string]map[Permission]bool
+ groupMembers map[string]map[string]bool
+ PredefinedRoles []*store.RoleMessage
+ store *store.Store
+ licenseService enterprise.LicenseService
}
func NewManager(store *store.Store, licenseService enterprise.LicenseService) (*Manager, error) {
@@ -49,8 +49,8 @@ func NewManager(store *store.Store, licenseService enterprise.LicenseService) (*
return m, nil
}
-// Check if the user or `allUsers` or the user group has the permission p
-// or has the permission p in every project.
+// Check if the user has permission on the resource hierarchy.
+// When multiple projects are specified, the user should have permission on every projects.
func (m *Manager) CheckPermission(ctx context.Context, p Permission, user *store.UserMessage, projectIDs ...string) (bool, error) {
if m.licenseService.IsFeatureEnabled(api.FeatureRBAC) != nil {
// nolint
@@ -61,7 +61,7 @@ func (m *Manager) CheckPermission(ctx context.Context, p Permission, user *store
if err != nil {
return false, err
}
- if ok := check(user.ID, p, policyMessage.Policy, m.rolePermissions, m.userGroupMembers); ok {
+ if ok := check(user.ID, p, policyMessage.Policy, m.rolePermissions, m.groupMembers); ok {
return true, nil
}
@@ -82,7 +82,7 @@ func (m *Manager) CheckPermission(ctx context.Context, p Permission, user *store
if err != nil {
return false, err
}
- if ok := check(user.ID, p, policyMessage.Policy, m.rolePermissions, m.userGroupMembers); !ok {
+ if ok := check(user.ID, p, policyMessage.Policy, m.rolePermissions, m.groupMembers); !ok {
allOK = false
break
}
@@ -105,20 +105,20 @@ func (m *Manager) ReloadCache(ctx context.Context) error {
}
m.rolePermissions = rolePermissions
- userGroups, err := m.store.ListUserGroups(ctx, &store.FindUserGroupMessage{})
+ groups, err := m.store.ListGroups(ctx, &store.FindGroupMessage{})
if err != nil {
return err
}
- userGroupMembers := make(map[string]map[string]bool)
- for _, userGroup := range userGroups {
+ groupMembers := make(map[string]map[string]bool)
+ for _, group := range groups {
usersSet := make(map[string]bool)
- for _, m := range userGroup.Payload.GetMembers() {
+ for _, m := range group.Payload.GetMembers() {
usersSet[m.Member] = true
}
- userGroupName := common.FormatGroupEmail(userGroup.Email)
- userGroupMembers[userGroupName] = usersSet
+ groupName := common.FormatGroupEmail(group.Email)
+ groupMembers[groupName] = usersSet
}
- m.userGroupMembers = userGroupMembers
+ m.groupMembers = groupMembers
return nil
}
@@ -132,7 +132,7 @@ func (m *Manager) GetPermissions(role string) (map[Permission]bool, error) {
return permissions, nil
}
-func check(userID int, p Permission, policy *storepb.IamPolicy, rolePermissions map[string]map[Permission]bool, userGroupMembers map[string]map[string]bool) bool {
+func check(userID int, p Permission, policy *storepb.IamPolicy, rolePermissions map[string]map[Permission]bool, groupMembers map[string]map[string]bool) bool {
userName := common.FormatUserUID(userID)
for _, binding := range policy.GetBindings() {
permissions, ok := rolePermissions[binding.GetRole()]
@@ -149,8 +149,8 @@ func check(userID int, p Permission, policy *storepb.IamPolicy, rolePermissions
if member == userName {
return true
}
- if strings.HasPrefix(member, common.UserGroupPrefix) {
- if groupMembers, ok := userGroupMembers[member]; ok {
+ if strings.HasPrefix(member, common.GroupPrefix) {
+ if groupMembers, ok := groupMembers[member]; ok {
if groupMembers[userName] {
return true
}
diff --git a/backend/component/iam/manager_test.go b/backend/component/iam/manager_test.go
index 957ba0ccf4..7a75a94ef3 100644
--- a/backend/component/iam/manager_test.go
+++ b/backend/component/iam/manager_test.go
@@ -21,10 +21,10 @@ func TestCheck(t *testing.T) {
}
tests := []struct {
- permission Permission
- policy *storepb.IamPolicy
- userGroupMembers map[string]map[string]bool
- want bool
+ permission Permission
+ policy *storepb.IamPolicy
+ groupMembers map[string]map[string]bool
+ want bool
}{
{
permission: PermissionInstancesCreate,
@@ -36,8 +36,8 @@ func TestCheck(t *testing.T) {
},
},
},
- userGroupMembers: nil,
- want: false,
+ groupMembers: nil,
+ want: false,
},
{
permission: PermissionInstancesCreate,
@@ -49,8 +49,8 @@ func TestCheck(t *testing.T) {
},
},
},
- userGroupMembers: nil,
- want: true,
+ groupMembers: nil,
+ want: true,
},
{
permission: PermissionInstancesCreate,
@@ -62,8 +62,8 @@ func TestCheck(t *testing.T) {
},
},
},
- userGroupMembers: nil,
- want: false,
+ groupMembers: nil,
+ want: false,
},
{
permission: PermissionInstancesCreate,
@@ -75,8 +75,8 @@ func TestCheck(t *testing.T) {
},
},
},
- userGroupMembers: nil,
- want: true,
+ groupMembers: nil,
+ want: true,
},
{
permission: PermissionInstancesCreate,
@@ -88,7 +88,7 @@ func TestCheck(t *testing.T) {
},
},
},
- userGroupMembers: map[string]map[string]bool{
+ groupMembers: map[string]map[string]bool{
"groups/[email protected]": {
"users/123": true,
},
@@ -97,7 +97,7 @@ func TestCheck(t *testing.T) {
}}
for i, test := range tests {
- got := check(userID, test.permission, test.policy, rolePermissions, test.userGroupMembers)
+ got := check(userID, test.permission, test.policy, rolePermissions, test.groupMembers)
if got != test.want {
require.Equal(t, test.want, got, i)
}
diff --git a/backend/component/iam/permission.go b/backend/component/iam/permission.go
index e1f61ab528..caf402a315 100644
--- a/backend/component/iam/permission.go
+++ b/backend/component/iam/permission.go
@@ -100,11 +100,11 @@ const (
PermissionSlowQueriesList Permission = "bb.slowQueries.list"
PermissionTaskRunsCreate Permission = "bb.taskRuns.create"
PermissionTaskRunsList Permission = "bb.taskRuns.list"
- PermissionUserGroupsCreate Permission = "bb.userGroups.create"
- PermissionUserGroupsDelete Permission = "bb.userGroups.delete"
- PermissionUserGroupsGet Permission = "bb.userGroups.get"
- PermissionUserGroupsList Permission = "bb.userGroups.list"
- PermissionUserGroupsUpdate Permission = "bb.userGroups.update"
+ PermissionGroupsCreate Permission = "bb.groups.create"
+ PermissionGroupsDelete Permission = "bb.groups.delete"
+ PermissionGroupsGet Permission = "bb.groups.get"
+ PermissionGroupsList Permission = "bb.groups.list"
+ PermissionGroupsUpdate Permission = "bb.groups.update"
PermissionUsersCreate Permission = "bb.users.create"
PermissionUsersDelete Permission = "bb.users.delete"
PermissionUsersUndelete Permission = "bb.users.undelete"
@@ -223,11 +223,11 @@ var allPermissions = []Permission{
PermissionSlowQueriesList,
PermissionTaskRunsCreate,
PermissionTaskRunsList,
- PermissionUserGroupsCreate,
- PermissionUserGroupsDelete,
- PermissionUserGroupsGet,
- PermissionUserGroupsList,
- PermissionUserGroupsUpdate,
+ PermissionGroupsCreate,
+ PermissionGroupsDelete,
+ PermissionGroupsGet,
+ PermissionGroupsList,
+ PermissionGroupsUpdate,
PermissionUsersCreate,
PermissionUsersDelete,
PermissionUsersUndelete,
diff --git a/backend/component/iam/permission.yaml b/backend/component/iam/permission.yaml
index b1e39ffd23..de88750228 100644
--- a/backend/component/iam/permission.yaml
+++ b/backend/component/iam/permission.yaml
@@ -88,11 +88,11 @@ permissions:
- bb.slowQueries.list
- bb.taskRuns.create
- bb.taskRuns.list
- - bb.userGroups.create
- - bb.userGroups.delete
- - bb.userGroups.get
- - bb.userGroups.list
- - bb.userGroups.update
+ - bb.groups.create
+ - bb.groups.delete
+ - bb.groups.get
+ - bb.groups.list
+ - bb.groups.update
- bb.users.create
- bb.users.delete
- bb.users.undelete
diff --git a/backend/server/grpc_routes.go b/backend/server/grpc_routes.go
index 26586dd16b..add4dad55e 100644
--- a/backend/server/grpc_routes.go
+++ b/backend/server/grpc_routes.go
@@ -94,7 +94,7 @@ func configureGrpcRouters(
v1pb.RegisterDatabaseGroupServiceServer(grpcServer, apiv1.NewDatabaseGroupService(stores, profile, iamManager, licenseService))
v1pb.RegisterChangelistServiceServer(grpcServer, apiv1.NewChangelistService(stores, profile, iamManager))
v1pb.RegisterVCSConnectorServiceServer(grpcServer, apiv1.NewVCSConnectorService(stores))
- v1pb.RegisterUserGroupServiceServer(grpcServer, apiv1.NewUserGroupService(stores, iamManager))
+ v1pb.RegisterGroupServiceServer(grpcServer, apiv1.NewGroupService(stores, iamManager))
v1pb.RegisterReviewConfigServiceServer(grpcServer, apiv1.NewReviewConfigService(stores, licenseService))
// REST gateway proxy.
@@ -182,7 +182,7 @@ func configureGrpcRouters(
if err := v1pb.RegisterVCSConnectorServiceHandler(ctx, mux, grpcConn); err != nil {
return nil, nil, nil, nil, err
}
- if err := v1pb.RegisterUserGroupServiceHandler(ctx, mux, grpcConn); err != nil {
+ if err := v1pb.RegisterGroupServiceHandler(ctx, mux, grpcConn); err != nil {
return nil, nil, nil, nil, err
}
if err := v1pb.RegisterReviewConfigServiceHandler(ctx, mux, grpcConn); err != nil {
diff --git a/backend/store/user_group.go b/backend/store/group.go
similarity index 73%
rename from backend/store/user_group.go
rename to backend/store/group.go
index 4e2374cf86..1adfd60c9f 100644
--- a/backend/store/user_group.go
+++ b/backend/store/group.go
@@ -14,31 +14,31 @@ import (
storepb "github.com/bytebase/bytebase/proto/generated-go/store"
)
-// FindUserGroupMessage is the message for finding groups.
-type FindUserGroupMessage struct {
+// FindGroupMessage is the message for finding groups.
+type FindGroupMessage struct {
Email *string
}
-// UpdateUserGroupMessage is the message to update a group.
-type UpdateUserGroupMessage struct {
+// UpdateGroupMessage is the message to update a group.
+type UpdateGroupMessage struct {
Title *string
Description *string
- Payload *storepb.UserGroupPayload
+ Payload *storepb.GroupPayload
}
-// UserGroupMessage is the message for a group.
-type UserGroupMessage struct {
+// GroupMessage is the message for a group.
+type GroupMessage struct {
Email string
Title string
Description string
CreatorUID int
- Payload *storepb.UserGroupPayload
+ Payload *storepb.GroupPayload
CreatedTime time.Time
}
-// GetUserGroup gets a group.
-func (s *Store) GetUserGroup(ctx context.Context, email string) (*UserGroupMessage, error) {
- if v, ok := s.userGroupCache.Get(email); ok {
+// GetGroup gets a group.
+func (s *Store) GetGroup(ctx context.Context, email string) (*GroupMessage, error) {
+ if v, ok := s.groupCache.Get(email); ok {
return v, nil
}
@@ -48,7 +48,7 @@ func (s *Store) GetUserGroup(ctx context.Context, email string) (*UserGroupMessa
}
defer tx.Rollback()
- groups, err := s.listUserGroupImpl(ctx, tx, &FindUserGroupMessage{
+ groups, err := s.listGroupImpl(ctx, tx, &FindGroupMessage{
Email: &email,
})
if err != nil {
@@ -66,15 +66,15 @@ func (s *Store) GetUserGroup(ctx context.Context, email string) (*UserGroupMessa
return groups[0], nil
}
-// ListUserGroups list all groups.
-func (s *Store) ListUserGroups(ctx context.Context, find *FindUserGroupMessage) ([]*UserGroupMessage, error) {
+// ListGroups list all groups.
+func (s *Store) ListGroups(ctx context.Context, find *FindGroupMessage) ([]*GroupMessage, error) {
tx, err := s.db.BeginTx(ctx, nil)
if err != nil {
return nil, err
}
defer tx.Rollback()
- groups, err := s.listUserGroupImpl(ctx, tx, find)
+ groups, err := s.listGroupImpl(ctx, tx, find)
if err != nil {
return nil, err
}
@@ -83,18 +83,18 @@ func (s *Store) ListUserGroups(ctx context.Context, find *FindUserGroupMessage)
}
for _, group := range groups {
- s.userGroupCache.Add(group.Email, group)
+ s.groupCache.Add(group.Email, group)
}
return groups, nil
}
-func (*Store) listUserGroupImpl(ctx context.Context, tx *Tx, find *FindUserGroupMessage) ([]*UserGroupMessage, error) {
+func (*Store) listGroupImpl(ctx context.Context, tx *Tx, find *FindGroupMessage) ([]*GroupMessage, error) {
where, args := []string{"TRUE"}, []any{}
if v := find.Email; v != nil {
where, args = append(where, fmt.Sprintf("email = $%d", len(args)+1)), append(args, *v)
}
- var groups []*UserGroupMessage
+ var groups []*GroupMessage
rows, err := tx.QueryContext(ctx, fmt.Sprintf(`
SELECT
email,
@@ -113,7 +113,7 @@ func (*Store) listUserGroupImpl(ctx context.Context, tx *Tx, find *FindUserGroup
defer rows.Close()
for rows.Next() {
- var group UserGroupMessage
+ var group GroupMessage
var payload []byte
var createdTs int64
if err := rows.Scan(
@@ -127,7 +127,7 @@ func (*Store) listUserGroupImpl(ctx context.Context, tx *Tx, find *FindUserGroup
return nil, err
}
group.CreatedTime = time.Unix(createdTs, 0)
- groupPayload := storepb.UserGroupPayload{}
+ groupPayload := storepb.GroupPayload{}
if err := common.ProtojsonUnmarshaler.Unmarshal(payload, &groupPayload); err != nil {
return nil, err
}
@@ -141,10 +141,10 @@ func (*Store) listUserGroupImpl(ctx context.Context, tx *Tx, find *FindUserGroup
return groups, nil
}
-// CreateUserGroup creates a group.
-func (s *Store) CreateUserGroup(ctx context.Context, create *UserGroupMessage, creatorUID int) (*UserGroupMessage, error) {
+// CreateGroup creates a group.
+func (s *Store) CreateGroup(ctx context.Context, create *GroupMessage, creatorUID int) (*GroupMessage, error) {
if create.Payload == nil {
- create.Payload = &storepb.UserGroupPayload{}
+ create.Payload = &storepb.GroupPayload{}
}
create.CreatorUID = creatorUID
@@ -189,12 +189,12 @@ func (s *Store) CreateUserGroup(ctx context.Context, create *UserGroupMessage, c
return nil, errors.Wrap(err, "failed to commit")
}
- s.userGroupCache.Add(create.Email, create)
+ s.groupCache.Add(create.Email, create)
return create, nil
}
-// UpdateUserGroup updates a group.
-func (s *Store) UpdateUserGroup(ctx context.Context, email string, patch *UpdateUserGroupMessage, updaterID int) (*UserGroupMessage, error) {
+// UpdateGroup updates a group.
+func (s *Store) UpdateGroup(ctx context.Context, email string, patch *UpdateGroupMessage, updaterID int) (*GroupMessage, error) {
tx, err := s.db.BeginTx(ctx, nil)
if err != nil {
return nil, errors.Wrapf(err, "failed to begin transaction")
@@ -217,7 +217,7 @@ func (s *Store) UpdateUserGroup(ctx context.Context, email string, patch *Update
}
args = append(args, email)
- var group UserGroupMessage
+ var group GroupMessage
var payload []byte
var createdTs int64
@@ -244,7 +244,7 @@ func (s *Store) UpdateUserGroup(ctx context.Context, email string, patch *Update
}
group.CreatedTime = time.Unix(createdTs, 0)
- groupPayload := storepb.UserGroupPayload{}
+ groupPayload := storepb.GroupPayload{}
if err := common.ProtojsonUnmarshaler.Unmarshal(payload, &groupPayload); err != nil {
return nil, err
}
@@ -254,12 +254,12 @@ func (s *Store) UpdateUserGroup(ctx context.Context, email string, patch *Update
return nil, errors.Wrap(err, "failed to commit transaction")
}
- s.userGroupCache.Add(group.Email, &group)
+ s.groupCache.Add(group.Email, &group)
return &group, nil
}
-// DeleteUserGroup deletes a group.
-func (s *Store) DeleteUserGroup(ctx context.Context, email string) error {
+// DeleteGroup deletes a group.
+func (s *Store) DeleteGroup(ctx context.Context, email string) error {
tx, err := s.db.BeginTx(ctx, nil)
if err != nil {
return errors.Wrap(err, "failed to begin transaction")
@@ -274,6 +274,6 @@ func (s *Store) DeleteUserGroup(ctx context.Context, email string) error {
return errors.Wrap(err, "failed to commit transaction")
}
- s.userGroupCache.Remove(email)
+ s.groupCache.Remove(email)
return nil
}
diff --git a/backend/store/store.go b/backend/store/store.go
index 95d6840669..a3a9d5f53b 100644
--- a/backend/store/store.go
+++ b/backend/store/store.go
@@ -40,7 +40,7 @@ type Store struct {
databaseGroupIDCache *lru.Cache[int64, *DatabaseGroupMessage]
vcsIDCache *lru.Cache[int, *VCSProviderMessage]
rolesCache *lru.Cache[string, *RoleMessage]
- userGroupCache *lru.Cache[string, *UserGroupMessage]
+ groupCache *lru.Cache[string, *GroupMessage]
// Large objects.
sheetCache *lru.Cache[int, string]
@@ -145,7 +145,7 @@ func New(db *DB, profile *config.Profile) (*Store, error) {
if err != nil {
return nil, err
}
- userGroupCache, err := lru.New[string, *UserGroupMessage](1024)
+ groupCache, err := lru.New[string, *GroupMessage](1024)
if err != nil {
return nil, err
}
@@ -179,7 +179,7 @@ func New(db *DB, profile *config.Profile) (*Store, error) {
rolesCache: rolesCache,
sheetCache: sheetCache,
dbSchemaCache: dbSchemaCache,
- userGroupCache: userGroupCache,
+ groupCache: groupCache,
}, nil
}
diff --git a/backend/utils/member.go b/backend/utils/member.go
index 64160378ce..f6ce56addd 100644
--- a/backend/utils/member.go
+++ b/backend/utils/member.go
@@ -65,13 +65,13 @@ func GetUsersByMember(ctx context.Context, stores *store.Store, member string) [
if user != nil {
users = append(users, user)
}
- } else if strings.HasPrefix(member, common.UserGroupPrefix) {
+ } else if strings.HasPrefix(member, common.GroupPrefix) {
groupEmail, err := common.GetGroupEmail(member)
if err != nil {
slog.Error("failed to parse group email", slog.String("group", member), log.BBError(err))
return users
}
- group, err := stores.GetUserGroup(ctx, groupEmail)
+ group, err := stores.GetGroup(ctx, groupEmail)
if err != nil {
slog.Error("failed to get group", slog.String("group", member), log.BBError(err))
return users
@@ -126,13 +126,13 @@ func GetUserIAMPolicyBindings(ctx context.Context, stores *store.Store, user *st
hasUser = true
break
}
- if strings.HasPrefix(member, common.UserGroupPrefix) {
+ if strings.HasPrefix(member, common.GroupPrefix) {
groupEmail, err := common.GetGroupEmail(member)
if err != nil {
slog.Error("failed to parse group email", slog.String("group", member), log.BBError(err))
continue
}
- group, err := stores.GetUserGroup(ctx, groupEmail)
+ group, err := stores.GetGroup(ctx, groupEmail)
if err != nil {
slog.Error("failed to get group", slog.String("group", member), log.BBError(err))
continue
diff --git a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue
index 40d6e7b3d4..6682deaa48 100644
--- a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue
+++ b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue
@@ -35,7 +35,7 @@
</template>
</NButton>
</div>
- <UserGroupSelect
+ <GroupSelect
v-model:value="state.memberList"
class="mt-2"
:multiple="true"
@@ -102,14 +102,14 @@ import { NInputNumber, NInput, NRadioGroup, NRadio, NButton } from "naive-ui";
import { computed, reactive, watch } from "vue";
import ExpirationSelector from "@/components/ExpirationSelector.vue";
import QuerierDatabaseResourceForm from "@/components/Issue/panel/RequestQueryPanel/DatabaseResourceForm/index.vue";
-import { ProjectRoleSelect, UserGroupSelect, UserSelect } from "@/components/v2/Select";
+import { ProjectRoleSelect, GroupSelect, UserSelect } from "@/components/v2/Select";
import {
useUserStore,
- useUserGroupStore,
+ useGroupStore,
extractGroupEmail,
useSettingV1Store,
} from "@/store";
-import { userGroupNamePrefix } from "@/store/modules/v1/common";
+import { groupNamePrefix } from "@/store/modules/v1/common";
import type { ComposedProject, DatabaseResource } from "@/types";
import {
getUserEmailInBinding,
@@ -207,7 +207,7 @@ const maximumRoleExpiration = computed(() => {
});
const userStore = useUserStore();
-const groupStore = useUserGroupStore();
+const groupStore = useGroupStore();
const settingV1Store = useSettingV1Store();
const state = reactive<LocalState>(getInitialState());
@@ -216,11 +216,11 @@ watch(
(type) => {
if (
type === "MEMBER" &&
- !state.memberList.every((m) => !m.startsWith(userGroupNamePrefix))
+ !state.memberList.every((m) => !m.startsWith(groupNamePrefix))
) {
state.memberList = [];
} else if (
- !state.memberList.every((m) => m.startsWith(userGroupNamePrefix))
+ !state.memberList.every((m) => m.startsWith(groupNamePrefix))
) {
state.memberList = [];
}
diff --git a/frontend/src/components/ProjectMember/ProjectMemberPanel.vue b/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
index 2db9c6d8cd..96adac36f5 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
@@ -83,7 +83,7 @@ import {
useProjectIamPolicy,
useProjectIamPolicyStore,
useUserStore,
- useUserGroupStore,
+ useGroupStore,
} from "@/store";
import type { ComposedProject, ComposedUser } from "@/types";
import {
@@ -94,7 +94,7 @@ import {
groupBindingPrefix,
} from "@/types";
import { State } from "@/types/proto/v1/common";
-import type { UserGroup } from "@/types/proto/v1/user_group";
+import type { Group } from "@/types/proto/v1/group";
import { FeatureAttention } from "../FeatureGuard";
import { SearchBox } from "../v2";
import AddProjectMembersPanel from "./AddProjectMember/AddProjectMembersPanel.vue";
@@ -121,7 +121,7 @@ const props = defineProps<{
const { t } = useI18n();
const dialog = useDialog();
const currentUserV1 = useCurrentUserV1();
-const groupStore = useUserGroupStore();
+const groupStore = useGroupStore();
const projectResourceName = computed(() => props.project.name);
const { policy: iamPolicy } = useProjectIamPolicy(projectResourceName);
@@ -171,7 +171,7 @@ const activeGroupList = computed(() => {
.map((member) => {
return groupStore.getGroupByIdentifier(member);
})
- .filter((group) => !!group) as UserGroup[];
+ .filter((group) => !!group) as Group[];
});
const groupRoleMap = computed(() => {
diff --git a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue
index 1f7151cea1..ba5268317c 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue
@@ -90,7 +90,7 @@
<p class="mb-2">
{{ $t("settings.members.groups.self") }}
</p>
- <UserGroupSelect v-model:value="state.memberList" :multiple="true" />
+ <GroupSelect v-model:value="state.memberList" :multiple="true" />
</div>
</div>
<template #footer>
@@ -130,7 +130,7 @@ import QuerierDatabaseResourceForm from "@/components/Issue/panel/RequestQueryPa
import {
Drawer,
DrawerContent,
- UserGroupSelect,
+ GroupSelect,
UserSelect,
} from "@/components/v2";
import {
@@ -139,7 +139,7 @@ import {
useProjectIamPolicy,
useProjectIamPolicyStore,
useUserStore,
- useUserGroupStore,
+ useGroupStore,
pushNotification,
} from "@/store";
import type { ComposedProject, DatabaseResource } from "@/types";
@@ -181,7 +181,7 @@ interface LocalState {
const { t } = useI18n();
const databaseStore = useDatabaseV1Store();
const userStore = useUserStore();
-const groupStore = useUserGroupStore();
+const groupStore = useGroupStore();
const state = reactive<LocalState>({
title: "",
diff --git a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue
index 53f81b7ecf..688397e1f9 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue
@@ -223,7 +223,7 @@ import {
useUserStore,
pushNotification,
} from "@/store";
-import { userGroupNamePrefix } from "@/store/modules/v1/common";
+import { groupNamePrefix } from "@/store/modules/v1/common";
import type { ComposedProject, DatabaseResource, ComposedUser } from "@/types";
import { PresetRoleType, PRESET_ROLES } from "@/types";
import { State } from "@/types/proto/v1/common";
@@ -378,7 +378,7 @@ const allowRemoveRole = (role: string) => {
}
members.push(
...((binding?.members || [])
- .filter((member) => !member.startsWith(userGroupNamePrefix))
+ .filter((member) => !member.startsWith(groupNamePrefix))
.map((userIdentifier) => {
return userStore.getUserByIdentifier(userIdentifier);
})
diff --git a/frontend/src/components/ProjectMember/types.ts b/frontend/src/components/ProjectMember/types.ts
index 7536e5a61e..2cc0fcea03 100644
--- a/frontend/src/components/ProjectMember/types.ts
+++ b/frontend/src/components/ProjectMember/types.ts
@@ -1,6 +1,6 @@
import type { ComposedUser } from "@/types";
import type { Binding } from "@/types/proto/v1/iam_policy";
-import type { UserGroup } from "@/types/proto/v1/user_group";
+import type { Group } from "@/types/proto/v1/group";
export interface ProjectRole {
// Format: "roles/{roleName}"
@@ -15,5 +15,5 @@ export interface ProjectBinding extends ProjectRole {
binding: string;
type: "users" | "groups";
user?: ComposedUser;
- group?: UserGroup;
+ group?: Group;
}
diff --git a/frontend/src/components/ProvideDashboardContext.vue b/frontend/src/components/ProvideDashboardContext.vue
index 82008377c4..1a8b0618ad 100644
--- a/frontend/src/components/ProvideDashboardContext.vue
+++ b/frontend/src/components/ProvideDashboardContext.vue
@@ -30,7 +30,7 @@ import {
useUserStore,
useUIStateStore,
useDatabaseV1Store,
- useUserGroupStore,
+ useGroupStore,
} from "@/store";
import { projectNamePrefix } from "@/store/modules/v1/common";
import { PolicyResourceType } from "@/types/proto/v1/org_policy_service";
@@ -82,7 +82,7 @@ onMounted(async () => {
// Then prepare the other resources.
await Promise.all([
useUserStore().fetchUserList(),
- useUserGroupStore().fetchGroupList(),
+ useGroupStore().fetchGroupList(),
useEnvironmentV1Store().fetchEnvironments(),
useProjectV1Store().fetchProjectList(true /* showDeleted */),
]);
diff --git a/frontend/src/components/ProvideSQLEditorContext.vue b/frontend/src/components/ProvideSQLEditorContext.vue
index dcf9764c15..8181aa0c7f 100644
--- a/frontend/src/components/ProvideSQLEditorContext.vue
+++ b/frontend/src/components/ProvideSQLEditorContext.vue
@@ -41,7 +41,7 @@ import {
useSQLEditorStore,
useSQLEditorTabStore,
useWorkSheetStore,
- useUserGroupStore,
+ useGroupStore,
pushNotification,
useFilterStore,
useAppFeature,
@@ -87,7 +87,7 @@ const databaseStore = useDatabaseV1Store();
const editorStore = useSQLEditorStore();
const worksheetStore = useWorkSheetStore();
const tabStore = useSQLEditorTabStore();
-const groupStore = useUserGroupStore();
+const groupStore = useGroupStore();
const policyStore = usePolicyV1Store();
const { isFetching: isFetchingWorksheet } = useSheetContext();
const { filter } = useFilterStore();
diff --git a/frontend/src/components/SensitiveData/GrantAccessDrawer.vue b/frontend/src/components/SensitiveData/GrantAccessDrawer.vue
index 344318de73..b750d662d5 100644
--- a/frontend/src/components/SensitiveData/GrantAccessDrawer.vue
+++ b/frontend/src/components/SensitiveData/GrantAccessDrawer.vue
@@ -85,7 +85,7 @@
<div class="flex items-center justify-between">
{{ $t("project.members.select-groups") }}
</div>
- <UserGroupSelect
+ <GroupSelect
v-model:value="state.memberList"
class="mt-2"
:multiple="true"
@@ -122,7 +122,7 @@ import { useI18n } from "vue-i18n";
import {
Drawer,
DrawerContent,
- UserGroupSelect,
+ GroupSelect,
UserSelect,
} from "@/components/v2";
import {
diff --git a/frontend/src/components/SensitiveData/SensitiveColumnDrawer.vue b/frontend/src/components/SensitiveData/SensitiveColumnDrawer.vue
index d5e6e28769..443b31255a 100644
--- a/frontend/src/components/SensitiveData/SensitiveColumnDrawer.vue
+++ b/frontend/src/components/SensitiveData/SensitiveColumnDrawer.vue
@@ -280,7 +280,7 @@ import {
usePolicyV1Store,
usePolicyByParentAndType,
useUserStore,
- useUserGroupStore,
+ useGroupStore,
pushNotification,
useCurrentUserV1,
useDBSchemaV1Store,
@@ -304,7 +304,7 @@ import {
PolicyResourceType,
MaskingExceptionPolicy_MaskingException_Action,
} from "@/types/proto/v1/org_policy_service";
-import type { UserGroup } from "@/types/proto/v1/user_group";
+import type { Group } from "@/types/proto/v1/group";
import { hasWorkspacePermissionV2 } from "@/utils";
import UserAvatar from "../User/UserAvatar.vue";
import GrantAccessDrawer from "./GrantAccessDrawer.vue";
@@ -315,7 +315,7 @@ import { getMaskDataIdentifier, isCurrentColumnException } from "./utils";
interface AccessUser {
type: "user" | "group";
- group?: UserGroup;
+ group?: Group;
user?: ComposedUser;
supportActions: Set<MaskingExceptionPolicy_MaskingException_Action>;
maskingLevel: MaskingLevel;
@@ -359,7 +359,7 @@ const MASKING_LEVELS = [
const { t } = useI18n();
const userStore = useUserStore();
-const groupStore = useUserGroupStore();
+const groupStore = useGroupStore();
const currentUserV1 = useCurrentUserV1();
const accessUserList = ref<AccessUser[]>([]);
const policyStore = usePolicyV1Store();
diff --git a/frontend/src/components/User/Settings/CreateGroupDrawer.vue b/frontend/src/components/User/Settings/CreateGroupDrawer.vue
index eaefbf98db..45d4966c08 100644
--- a/frontend/src/components/User/Settings/CreateGroupDrawer.vue
+++ b/frontend/src/components/User/Settings/CreateGroupDrawer.vue
@@ -138,19 +138,19 @@ import EmailInput from "@/components/EmailInput.vue";
import { Drawer, DrawerContent, UserSelect } from "@/components/v2";
import {
extractGroupEmail,
- useUserGroupStore,
+ useGroupStore,
useCurrentUserV1,
pushNotification,
useUserStore,
useSettingV1Store,
} from "@/store";
-import { userNamePrefix, userGroupNamePrefix } from "@/store/modules/v1/common";
+import { userNamePrefix, groupNamePrefix } from "@/store/modules/v1/common";
import { getUserEmailFromIdentifier } from "@/store/modules/v1/common";
import {
- UserGroup,
- UserGroupMember,
- UserGroupMember_Role,
-} from "@/types/proto/v1/user_group";
+ Group,
+ GroupMember,
+ GroupMember_Role,
+} from "@/types/proto/v1/group";
import {
isValidEmail,
extractUserUID,
@@ -165,12 +165,12 @@ interface LocalState {
email: string;
title: string;
description: string;
- members: UserGroupMember[];
+ members: GroupMember[];
};
}
const props = defineProps<{
- group?: UserGroup;
+ group?: Group;
}>();
const emit = defineEmits<{
@@ -180,7 +180,7 @@ const emit = defineEmits<{
const { t } = useI18n();
const settingV1Store = useSettingV1Store();
const userStore = useUserStore();
-const groupStore = useUserGroupStore();
+const groupStore = useGroupStore();
const currentUserV1 = useCurrentUserV1();
const state = reactive<LocalState>({
@@ -191,8 +191,8 @@ const state = reactive<LocalState>({
description: props.group?.description ?? "",
members: cloneDeep(
props.group?.members ?? [
- UserGroupMember.fromPartial({
- role: UserGroupMember_Role.OWNER,
+ GroupMember.fromPartial({
+ role: GroupMember_Role.OWNER,
member: `${userNamePrefix}${currentUserV1.value.email}`,
}),
]
@@ -214,30 +214,30 @@ const selfMemberInGroup = computed(() => {
});
const allowEdit = computed(() => {
- if (selfMemberInGroup.value?.role === UserGroupMember_Role.OWNER) {
+ if (selfMemberInGroup.value?.role === GroupMember_Role.OWNER) {
return true;
}
return hasWorkspacePermissionV2(
currentUserV1.value,
- isCreating.value ? "bb.userGroups.create" : "bb.userGroups.update"
+ isCreating.value ? "bb.groups.create" : "bb.groups.update"
);
});
const validGroup = computed(() => {
- const memberMap = new Map<string, UserGroupMember>();
+ const memberMap = new Map<string, GroupMember>();
for (const member of state.group.members) {
if (!member.member) {
continue;
}
if (
!memberMap.has(member.member) ||
- member.role === UserGroupMember_Role.OWNER
+ member.role === GroupMember_Role.OWNER
) {
memberMap.set(member.member, member);
}
}
- return UserGroup.fromPartial({
- name: `${userGroupNamePrefix}${state.group.email}`,
+ return Group.fromPartial({
+ name: `${groupNamePrefix}${state.group.email}`,
title: state.group.title,
creator: props.group?.creator ?? "",
description: state.group.description,
@@ -257,7 +257,7 @@ const errorMessage = computed(() => {
}
if (
!validGroup.value.members.some(
- (member) => member.role === UserGroupMember_Role.OWNER
+ (member) => member.role === GroupMember_Role.OWNER
)
) {
return "At least has 1 owner in the group";
@@ -275,16 +275,16 @@ const allowConfirm = computed(() => {
});
const addMember = () => {
- const member = UserGroupMember.fromPartial({
+ const member = GroupMember.fromPartial({
role:
state.group.members.length === 0
- ? UserGroupMember_Role.OWNER
- : UserGroupMember_Role.MEMBER,
+ ? GroupMember_Role.OWNER
+ : GroupMember_Role.MEMBER,
});
state.group.members.push(member);
};
-const getUserUidForMember = (member: UserGroupMember) => {
+const getUserUidForMember = (member: GroupMember) => {
if (!member.member) {
return;
}
@@ -310,7 +310,7 @@ const updateMemberEmail = (index: number, uid: string | undefined) => {
};
};
-const updateMemberRole = (index: number, role: UserGroupMember_Role) => {
+const updateMemberRole = (index: number, role: GroupMember_Role) => {
state.group.members[index] = {
...state.group.members[index],
role,
diff --git a/frontend/src/components/User/Settings/RemoveGroupButton.vue b/frontend/src/components/User/Settings/RemoveGroupButton.vue
index b8e5df8ac9..d999cf0531 100644
--- a/frontend/src/components/User/Settings/RemoveGroupButton.vue
+++ b/frontend/src/components/User/Settings/RemoveGroupButton.vue
@@ -24,7 +24,7 @@ import { PROJECT_V1_ROUTE_MEMBERS } from "@/router/dashboard/projectV1";
import { WORKSPACE_ROUTE_SENSITIVE_DATA } from "@/router/dashboard/workspaceRoutes";
import {
useCurrentUserV1,
- useUserGroupStore,
+ useGroupStore,
useProjectV1Store,
pushNotification,
extractGroupEmail,
@@ -36,13 +36,13 @@ import { getGroupEmailInBinding } from "@/types";
import { PolicyType } from "@/types/proto/v1/org_policy_service";
import type { Project } from "@/types/proto/v1/project_service";
import {
- type UserGroup,
- UserGroupMember_Role,
-} from "@/types/proto/v1/user_group";
+ type Group,
+ GroupMember_Role,
+} from "@/types/proto/v1/group";
import { hasWorkspacePermissionV2 } from "@/utils";
const props = defineProps<{
- group: UserGroup;
+ group: Group;
}>();
const emit = defineEmits<{
@@ -51,7 +51,7 @@ const emit = defineEmits<{
const { t } = useI18n();
const dialog = useDialog();
-const groupStore = useUserGroupStore();
+const groupStore = useGroupStore();
const currentUserV1 = useCurrentUserV1();
const projectStore = useProjectV1Store();
const policyStore = usePolicyV1Store();
@@ -64,13 +64,13 @@ const selfMemberInGroup = computed(() => {
});
const allowDelete = computed(() => {
- if (selfMemberInGroup.value?.role === UserGroupMember_Role.OWNER) {
+ if (selfMemberInGroup.value?.role === GroupMember_Role.OWNER) {
return true;
}
- return hasWorkspacePermissionV2(currentUserV1.value, "bb.userGroups.delete");
+ return hasWorkspacePermissionV2(currentUserV1.value, "bb.groups.delete");
});
-const getProjectsBindingGroup = async (group: UserGroup) => {
+const getProjectsBindingGroup = async (group: Group) => {
const member = getGroupEmailInBinding(extractGroupEmail(group.name));
interface ProjectGroupResource {
member: boolean;
diff --git a/frontend/src/components/User/Settings/UserDataTable/cells/UserGroupsCell.vue b/frontend/src/components/User/Settings/UserDataTable/cells/GroupsCell.vue
similarity index 72%
rename from frontend/src/components/User/Settings/UserDataTable/cells/UserGroupsCell.vue
rename to frontend/src/components/User/Settings/UserDataTable/cells/GroupsCell.vue
index d1a6882334..a09e39d8c9 100644
--- a/frontend/src/components/User/Settings/UserDataTable/cells/UserGroupsCell.vue
+++ b/frontend/src/components/User/Settings/UserDataTable/cells/GroupsCell.vue
@@ -1,36 +1,36 @@
<template>
<div class="flex flex-row items-center flex-wrap gap-2">
<NTag
- v-for="group in userGroups"
+ v-for="group in groups"
:key="group.name"
class="!cursor-pointer hover:bg-gray-200"
@click="$emit('select-group', group)"
>
{{ group.title }}
</NTag>
- <span v-if="userGroups.length === 0">-</span>
+ <span v-if="groups.length === 0">-</span>
</div>
</template>
<script lang="ts" setup>
import { NTag } from "naive-ui";
import { computed } from "vue";
-import { useUserGroupStore } from "@/store";
+import { useGroupStore } from "@/store";
import { getUserEmailFromIdentifier } from "@/store/modules/v1/common";
import type { ComposedUser } from "@/types";
-import type { UserGroup } from "@/types/proto/v1/user_group";
+import type { Group } from "@/types/proto/v1/group";
const props = defineProps<{
user: ComposedUser;
}>();
defineEmits<{
- (event: "select-group", group: UserGroup): void;
+ (event: "select-group", group: Group): void;
}>();
-const groupStore = useUserGroupStore();
+const groupStore = useGroupStore();
-const userGroups = computed(() => {
+const groups = computed(() => {
const groups = [];
for (const group of groupStore.groupList) {
for (const member of group.members) {
diff --git a/frontend/src/components/User/Settings/UserDataTable/index.vue b/frontend/src/components/User/Settings/UserDataTable/index.vue
index 3ae1572d76..119d928ad7 100644
--- a/frontend/src/components/User/Settings/UserDataTable/index.vue
+++ b/frontend/src/components/User/Settings/UserDataTable/index.vue
@@ -27,9 +27,9 @@ import { useI18n } from "vue-i18n";
import { BBAlert } from "@/bbkit";
import { useUserStore } from "@/store";
import { type ComposedUser } from "@/types";
-import type { UserGroup } from "@/types/proto/v1/user_group";
+import type { Group } from "@/types/proto/v1/group";
import { copyServiceKeyToClipboardIfNeeded } from "../common";
-import UserGroupsCell from "./cells/UserGroupsCell.vue";
+import GroupsCell from "./cells/GroupsCell.vue";
import UserNameCell from "./cells/UserNameCell.vue";
import UserOperationsCell from "./cells/UserOperationsCell.vue";
import UserRolesCell from "./cells/UserRolesCell.vue";
@@ -49,7 +49,7 @@ defineProps<{
const emit = defineEmits<{
(event: "update-user", user: ComposedUser): void;
- (event: "select-group", group: UserGroup): void;
+ (event: "select-group", group: Group): void;
}>();
const { t } = useI18n();
@@ -87,7 +87,7 @@ const columns = computed(() => {
title: t("settings.members.table.groups"),
resizable: true,
render: (user: ComposedUser) => {
- return h(UserGroupsCell, {
+ return h(GroupsCell, {
user,
"onSelect-group": (group) => emit("select-group", group),
});
diff --git a/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupMemberNameCell.vue b/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupMemberNameCell.vue
index 2fa5246004..082e1ed2af 100644
--- a/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupMemberNameCell.vue
+++ b/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupMemberNameCell.vue
@@ -17,11 +17,11 @@
v-if="role"
size="small"
round
- :type="role === UserGroupMember_Role.OWNER ? 'primary' : 'default'"
+ :type="role === GroupMember_Role.OWNER ? 'primary' : 'default'"
>
{{
$t(
- `settings.members.groups.form.role.${userGroupMember_RoleToJSON(role).toLowerCase()}`
+ `settings.members.groups.form.role.${groupMember_RoleToJSON(role).toLowerCase()}`
)
}}
</NTag>
@@ -44,14 +44,14 @@ import { useCurrentUserV1 } from "@/store";
import { SYSTEM_BOT_USER_NAME, type ComposedUser } from "@/types";
import { UserType } from "@/types/proto/v1/auth_service";
import {
- UserGroupMember_Role,
- userGroupMember_RoleToJSON,
-} from "@/types/proto/v1/user_group";
+ GroupMember_Role,
+ groupMember_RoleToJSON,
+} from "@/types/proto/v1/group";
withDefaults(
defineProps<{
user: ComposedUser;
- role?: UserGroupMember_Role;
+ role?: GroupMember_Role;
}>(),
{
role: undefined,
diff --git a/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupMemberRoleSelect.vue b/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupMemberRoleSelect.vue
index b55ce02e99..d58c4435b3 100644
--- a/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupMemberRoleSelect.vue
+++ b/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupMemberRoleSelect.vue
@@ -6,7 +6,7 @@
:value="value"
:size="size"
:options="options"
- @update:value="(val: UserGroupMember_Role) => $emit('update:value', val)"
+ @update:value="(val: GroupMember_Role) => $emit('update:value', val)"
/>
</template>
@@ -15,29 +15,29 @@ import { NSelect, type SelectOption } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import {
- UserGroupMember_Role,
- userGroupMember_RoleToJSON,
-} from "@/types/proto/v1/user_group";
+ GroupMember_Role,
+ groupMember_RoleToJSON,
+} from "@/types/proto/v1/group";
defineProps<{
- value: UserGroupMember_Role;
+ value: GroupMember_Role;
size: "tiny" | "small" | "medium" | "large";
}>();
defineEmits<{
- (event: "update:value", value: UserGroupMember_Role): void;
+ (event: "update:value", value: GroupMember_Role): void;
}>();
const { t } = useI18n();
const options = computed(() => {
return [
- UserGroupMember_Role.OWNER,
- UserGroupMember_Role.MEMBER,
+ GroupMember_Role.OWNER,
+ GroupMember_Role.MEMBER,
].map<SelectOption>((role) => ({
value: role,
label: t(
- `settings.members.groups.form.role.${userGroupMember_RoleToJSON(role).toLowerCase()}`
+ `settings.members.groups.form.role.${groupMember_RoleToJSON(role).toLowerCase()}`
),
}));
});
diff --git a/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupNameCell.vue b/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupNameCell.vue
index 4a7e1a7bf2..42cd3b7db9 100644
--- a/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupNameCell.vue
+++ b/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupNameCell.vue
@@ -37,12 +37,12 @@ import UserRolesCell from "@/components/ProjectMember/ProjectMemberDataTable/cel
import type { ProjectRole } from "@/components/ProjectMember/types";
import { WORKSPACE_ROUTE_MEMBERS } from "@/router/dashboard/workspaceRoutes";
import { extractGroupEmail, extractUserEmail, useCurrentUserV1 } from "@/store";
-import { UserGroup } from "@/types/proto/v1/user_group";
+import { Group } from "@/types/proto/v1/group";
import { hasWorkspacePermissionV2 } from "@/utils";
const props = withDefaults(
defineProps<{
- group: UserGroup;
+ group: Group;
role?: ProjectRole;
showIcon?: boolean;
showEmail?: boolean;
@@ -66,6 +66,6 @@ const allowGetGroup = computed(() => {
) {
return true;
}
- return hasWorkspacePermissionV2(currentUser.value, "bb.userGroups.get");
+ return hasWorkspacePermissionV2(currentUser.value, "bb.groups.get");
});
</script>
diff --git a/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupOperationsCell.vue b/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupOperationsCell.vue
index 2b82218917..36946cedf1 100644
--- a/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupOperationsCell.vue
+++ b/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupOperationsCell.vue
@@ -22,11 +22,11 @@
<script lang="ts" setup>
import { PencilIcon, Trash2Icon } from "lucide-vue-next";
import { NButton } from "naive-ui";
-import type { UserGroup } from "@/types/proto/v1/user_group";
+import type { Group } from "@/types/proto/v1/group";
import RemoveGroupButton from "../../RemoveGroupButton.vue";
defineProps<{
- group: UserGroup;
+ group: Group;
allowEdit: boolean;
}>();
diff --git a/frontend/src/components/User/Settings/UserDataTableByGroup/index.vue b/frontend/src/components/User/Settings/UserDataTableByGroup/index.vue
index 943e587f2f..7e9215bb99 100644
--- a/frontend/src/components/User/Settings/UserDataTableByGroup/index.vue
+++ b/frontend/src/components/User/Settings/UserDataTableByGroup/index.vue
@@ -18,7 +18,7 @@ import { useI18n } from "vue-i18n";
import { useUserStore } from "@/store";
import { getUserEmailFromIdentifier } from "@/store/modules/v1/common";
import type { ComposedUser } from "@/types";
-import { UserGroup, UserGroupMember_Role } from "@/types/proto/v1/user_group";
+import { Group, GroupMember_Role } from "@/types/proto/v1/group";
import GroupMemberNameCell from "./cells/GroupMemberNameCell.vue";
import GroupNameCell from "./cells/GroupNameCell.vue";
import GroupOperationsCell from "./cells/GroupOperationsCell.vue";
@@ -26,7 +26,7 @@ import GroupOperationsCell from "./cells/GroupOperationsCell.vue";
interface GroupRowData {
type: "group";
name: string;
- group: UserGroup;
+ group: Group;
children: UserRowData[];
}
@@ -34,12 +34,12 @@ interface UserRowData {
type: "user";
name: string;
user: ComposedUser;
- role: UserGroupMember_Role;
+ role: GroupMember_Role;
}
const props = withDefaults(
defineProps<{
- groups: UserGroup[];
+ groups: Group[];
showGroupRole?: boolean;
allowEdit: boolean;
}>(),
@@ -50,7 +50,7 @@ const props = withDefaults(
);
const emit = defineEmits<{
- (event: "update-group", group: UserGroup): void;
+ (event: "update-group", group: Group): void;
}>();
const { t } = useI18n();
@@ -124,7 +124,7 @@ const userListByGroup = computed(() => {
children: orderBy(
members,
[
- (member) => (member.role === UserGroupMember_Role.OWNER ? 1 : 0),
+ (member) => (member.role === GroupMember_Role.OWNER ? 1 : 0),
(member) => member.user.name,
],
["desc", "desc"]
diff --git a/frontend/src/components/v2/Select/UserGroupSelect.vue b/frontend/src/components/v2/Select/GroupSelect.vue
similarity index 93%
rename from frontend/src/components/v2/Select/UserGroupSelect.vue
rename to frontend/src/components/v2/Select/GroupSelect.vue
index d378cc4125..e14ff4a7e6 100644
--- a/frontend/src/components/v2/Select/UserGroupSelect.vue
+++ b/frontend/src/components/v2/Select/GroupSelect.vue
@@ -19,12 +19,12 @@ import { NCheckbox, NSelect, NTag, type SelectOption } from "naive-ui";
import type { SelectBaseOption } from "naive-ui/lib/select/src/interface";
import { computed } from "vue";
import GroupNameCell from "@/components/User/Settings/UserDataTableByGroup/cells/GroupNameCell.vue";
-import { useUserGroupStore } from "@/store";
-import type { UserGroup } from "@/types/proto/v1/user_group";
+import { useGroupStore } from "@/store";
+import type { Group } from "@/types/proto/v1/group";
export interface GroupSelectOption extends SelectOption {
value: string;
- group: UserGroup;
+ group: Group;
}
const props = withDefaults(
@@ -49,7 +49,7 @@ defineEmits<{
(event: "update:value", val: string | string[]): void;
}>();
-const groupStore = useUserGroupStore();
+const groupStore = useGroupStore();
const options = computed(() => {
return groupStore.groupList.map<GroupSelectOption>((group) => ({
diff --git a/frontend/src/components/v2/Select/index.ts b/frontend/src/components/v2/Select/index.ts
index f33ece2505..bcc7315ce0 100644
--- a/frontend/src/components/v2/Select/index.ts
+++ b/frontend/src/components/v2/Select/index.ts
@@ -5,7 +5,7 @@ import EnvironmentSelect from "./EnvironmentSelect.vue";
import InstanceSelect from "./InstanceSelect.vue";
import ProjectRoleSelect from "./ProjectRoleSelect.vue";
import ProjectSelect from "./ProjectSelect.vue";
-import UserGroupSelect from "./UserGroupSelect.vue";
+import GroupSelect from "./GroupSelect.vue";
import UserSelect from "./UserSelect.vue";
export {
@@ -17,5 +17,5 @@ export {
ProjectSelect,
ProjectRoleSelect,
UserSelect,
- UserGroupSelect,
+ GroupSelect,
};
diff --git a/frontend/src/grpcweb/index.ts b/frontend/src/grpcweb/index.ts
index bc4b511883..07a7bd8147 100644
--- a/frontend/src/grpcweb/index.ts
+++ b/frontend/src/grpcweb/index.ts
@@ -29,7 +29,7 @@ import { SettingServiceDefinition } from "@/types/proto/v1/setting_service";
import { SheetServiceDefinition } from "@/types/proto/v1/sheet_service";
import { SQLServiceDefinition } from "@/types/proto/v1/sql_service";
import { SubscriptionServiceDefinition } from "@/types/proto/v1/subscription_service";
-import { UserGroupServiceDefinition } from "@/types/proto/v1/user_group";
+import { GroupServiceDefinition } from "@/types/proto/v1/group";
import { VCSConnectorServiceDefinition } from "@/types/proto/v1/vcs_connector_service";
import { VCSProviderServiceDefinition } from "@/types/proto/v1/vcs_provider_service";
import { WorksheetServiceDefinition } from "@/types/proto/v1/worksheet_service";
@@ -206,8 +206,8 @@ export const auditLogServiceClient = clientFactory.create(
channel
);
-export const userGroupServiceClient = clientFactory.create(
- UserGroupServiceDefinition,
+export const groupServiceClient = clientFactory.create(
+ GroupServiceDefinition,
channel
);
diff --git a/frontend/src/store/modules/v1/common.ts b/frontend/src/store/modules/v1/common.ts
index 4e4b46374c..17f291b26e 100644
--- a/frontend/src/store/modules/v1/common.ts
+++ b/frontend/src/store/modules/v1/common.ts
@@ -22,7 +22,7 @@ export const branchNamePrefix = "branches/";
export const ssoNamePrefix = "idps/";
export const protectionRulesSuffix = "/protectionRules";
export const issueCommentNamePrefix = "issueComments/";
-export const userGroupNamePrefix = "groups/";
+export const groupNamePrefix = "groups/";
export const reviewConfigNamePrefix = "reviewConfigs/";
export const planNamePrefix = "plans/";
export const planCheckRunPrefix = "planCheckRuns/";
diff --git a/frontend/src/store/modules/v1/userGroup.ts b/frontend/src/store/modules/v1/group.ts
similarity index 64%
rename from frontend/src/store/modules/v1/userGroup.ts
rename to frontend/src/store/modules/v1/group.ts
index 4a0946dd6b..f12af9fd64 100644
--- a/frontend/src/store/modules/v1/userGroup.ts
+++ b/frontend/src/store/modules/v1/group.ts
@@ -1,20 +1,20 @@
import { orderBy } from "lodash-es";
import { defineStore } from "pinia";
import { computed, reactive } from "vue";
-import { userGroupServiceClient } from "@/grpcweb";
+import { groupServiceClient } from "@/grpcweb";
import { useCurrentUserV1 } from "@/store";
-import type { UserGroup } from "@/types/proto/v1/user_group";
+import type { Group } from "@/types/proto/v1/group";
import { hasWorkspacePermissionV2 } from "@/utils";
-import { userGroupNamePrefix } from "./common";
+import { groupNamePrefix } from "./common";
export const extractGroupEmail = (emailResource: string) => {
const matches = emailResource.match(/^(?:group:|groups\/)(.+)$/);
return matches?.[1] ?? emailResource;
};
-export const useUserGroupStore = defineStore("user_group", () => {
+export const useGroupStore = defineStore("group", () => {
const currentUser = useCurrentUserV1();
- const groupMapByName = reactive(new Map<string, UserGroup>());
+ const groupMapByName = reactive(new Map<string, Group>());
const resetCache = () => {
groupMapByName.clear();
};
@@ -29,7 +29,7 @@ export const useUserGroupStore = defineStore("user_group", () => {
});
// Actions
- const getGroupName = (email: string) => `${userGroupNamePrefix}${email}`;
+ const getGroupName = (email: string) => `${groupNamePrefix}${email}`;
const getGroupByEmail = (email: string) => {
return groupMapByName.get(getGroupName(email));
@@ -40,11 +40,11 @@ export const useUserGroupStore = defineStore("user_group", () => {
};
const fetchGroupList = async () => {
- if (!hasWorkspacePermissionV2(currentUser.value, "bb.userGroups.list")) {
+ if (!hasWorkspacePermissionV2(currentUser.value, "bb.groups.list")) {
return [];
}
- const { groups } = await userGroupServiceClient.listUserGroups({});
+ const { groups } = await groupServiceClient.listGroups({});
resetCache();
for (const group of groups) {
groupMapByName.set(group.name, group);
@@ -53,7 +53,7 @@ export const useUserGroupStore = defineStore("user_group", () => {
};
const getOrFetchGroupByEmail = async (email: string) => {
- if (!hasWorkspacePermissionV2(currentUser.value, "bb.userGroups.get")) {
+ if (!hasWorkspacePermissionV2(currentUser.value, "bb.groups.get")) {
return;
}
@@ -61,26 +61,26 @@ export const useUserGroupStore = defineStore("user_group", () => {
return getGroupByEmail(email);
}
- const group = await userGroupServiceClient.getUserGroup({
+ const group = await groupServiceClient.getGroup({
name: getGroupName(email),
});
groupMapByName.set(group.name, group);
return group;
};
- const createGroup = async (group: UserGroup) => {
- const resp = await userGroupServiceClient.createUserGroup({ group });
+ const createGroup = async (group: Group) => {
+ const resp = await groupServiceClient.createGroup({ group });
groupMapByName.set(resp.name, resp);
return resp;
};
const deleteGroup = async (name: string) => {
- await userGroupServiceClient.deleteUserGroup({ name });
+ await groupServiceClient.deleteGroup({ name });
groupMapByName.delete(name);
};
- const updateGroup = async (group: UserGroup, updateMask: string[]) => {
- const updated = await userGroupServiceClient.updateUserGroup({
+ const updateGroup = async (group: Group, updateMask: string[]) => {
+ const updated = await groupServiceClient.updateGroup({
group,
updateMask,
});
diff --git a/frontend/src/store/modules/v1/index.ts b/frontend/src/store/modules/v1/index.ts
index aefda3c72d..018533707f 100644
--- a/frontend/src/store/modules/v1/index.ts
+++ b/frontend/src/store/modules/v1/index.ts
@@ -24,7 +24,7 @@ export * from "./anomaly";
export * from "./changelist";
export * from "./issueComment";
export * from "./auditLog";
-export * from "./userGroup";
+export * from "./group";
export * from "./permission";
export * from "./workspace";
export * from "./instanceResource";
diff --git a/frontend/src/types/iam/permission.ts b/frontend/src/types/iam/permission.ts
index 0dcb30c1da..2670c39e1c 100644
--- a/frontend/src/types/iam/permission.ts
+++ b/frontend/src/types/iam/permission.ts
@@ -97,11 +97,11 @@ export type Permission =
| "bb.roles.delete"
| "bb.roles.list"
| "bb.roles.update"
- | "bb.userGroups.create"
- | "bb.userGroups.update"
- | "bb.userGroups.delete"
- | "bb.userGroups.list"
- | "bb.userGroups.get"
+ | "bb.groups.create"
+ | "bb.groups.update"
+ | "bb.groups.delete"
+ | "bb.groups.list"
+ | "bb.groups.get"
| "bb.users.create"
| "bb.users.update"
| "bb.users.delete"
diff --git a/frontend/src/types/proto/store/group.ts b/frontend/src/types/proto/store/group.ts
new file mode 100644
index 0000000000..3a7801411e
--- /dev/null
+++ b/frontend/src/types/proto/store/group.ts
@@ -0,0 +1,222 @@
+/* eslint-disable */
+import Long from "long";
+import _m0 from "protobufjs/minimal";
+
+export const protobufPackage = "bytebase.store";
+
+export interface GroupMember {
+ /**
+ * Member is the principal who belong to this group.
+ *
+ * Format: users/{userUID}.
+ */
+ member: string;
+ role: GroupMember_Role;
+}
+
+export enum GroupMember_Role {
+ ROLE_UNSPECIFIED = "ROLE_UNSPECIFIED",
+ OWNER = "OWNER",
+ MEMBER = "MEMBER",
+ UNRECOGNIZED = "UNRECOGNIZED",
+}
+
+export function groupMember_RoleFromJSON(object: any): GroupMember_Role {
+ switch (object) {
+ case 0:
+ case "ROLE_UNSPECIFIED":
+ return GroupMember_Role.ROLE_UNSPECIFIED;
+ case 1:
+ case "OWNER":
+ return GroupMember_Role.OWNER;
+ case 2:
+ case "MEMBER":
+ return GroupMember_Role.MEMBER;
+ case -1:
+ case "UNRECOGNIZED":
+ default:
+ return GroupMember_Role.UNRECOGNIZED;
+ }
+}
+
+export function groupMember_RoleToJSON(object: GroupMember_Role): string {
+ switch (object) {
+ case GroupMember_Role.ROLE_UNSPECIFIED:
+ return "ROLE_UNSPECIFIED";
+ case GroupMember_Role.OWNER:
+ return "OWNER";
+ case GroupMember_Role.MEMBER:
+ return "MEMBER";
+ case GroupMember_Role.UNRECOGNIZED:
+ default:
+ return "UNRECOGNIZED";
+ }
+}
+
+export function groupMember_RoleToNumber(object: GroupMember_Role): number {
+ switch (object) {
+ case GroupMember_Role.ROLE_UNSPECIFIED:
+ return 0;
+ case GroupMember_Role.OWNER:
+ return 1;
+ case GroupMember_Role.MEMBER:
+ return 2;
+ case GroupMember_Role.UNRECOGNIZED:
+ default:
+ return -1;
+ }
+}
+
+export interface GroupPayload {
+ members: GroupMember[];
+}
+
+function createBaseGroupMember(): GroupMember {
+ return { member: "", role: GroupMember_Role.ROLE_UNSPECIFIED };
+}
+
+export const GroupMember = {
+ encode(message: GroupMember, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.member !== "") {
+ writer.uint32(10).string(message.member);
+ }
+ if (message.role !== GroupMember_Role.ROLE_UNSPECIFIED) {
+ writer.uint32(16).int32(groupMember_RoleToNumber(message.role));
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): GroupMember {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGroupMember();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.member = reader.string();
+ continue;
+ case 2:
+ if (tag !== 16) {
+ break;
+ }
+
+ message.role = groupMember_RoleFromJSON(reader.int32());
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): GroupMember {
+ return {
+ member: isSet(object.member) ? globalThis.String(object.member) : "",
+ role: isSet(object.role) ? groupMember_RoleFromJSON(object.role) : GroupMember_Role.ROLE_UNSPECIFIED,
+ };
+ },
+
+ toJSON(message: GroupMember): unknown {
+ const obj: any = {};
+ if (message.member !== "") {
+ obj.member = message.member;
+ }
+ if (message.role !== GroupMember_Role.ROLE_UNSPECIFIED) {
+ obj.role = groupMember_RoleToJSON(message.role);
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<GroupMember>): GroupMember {
+ return GroupMember.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<GroupMember>): GroupMember {
+ const message = createBaseGroupMember();
+ message.member = object.member ?? "";
+ message.role = object.role ?? GroupMember_Role.ROLE_UNSPECIFIED;
+ return message;
+ },
+};
+
+function createBaseGroupPayload(): GroupPayload {
+ return { members: [] };
+}
+
+export const GroupPayload = {
+ encode(message: GroupPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ for (const v of message.members) {
+ GroupMember.encode(v!, writer.uint32(10).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): GroupPayload {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGroupPayload();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.members.push(GroupMember.decode(reader, reader.uint32()));
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): GroupPayload {
+ return {
+ members: globalThis.Array.isArray(object?.members) ? object.members.map((e: any) => GroupMember.fromJSON(e)) : [],
+ };
+ },
+
+ toJSON(message: GroupPayload): unknown {
+ const obj: any = {};
+ if (message.members?.length) {
+ obj.members = message.members.map((e) => GroupMember.toJSON(e));
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<GroupPayload>): GroupPayload {
+ return GroupPayload.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<GroupPayload>): GroupPayload {
+ const message = createBaseGroupPayload();
+ message.members = object.members?.map((e) => GroupMember.fromPartial(e)) || [];
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial<T> = T extends Builtin ? T
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
+ : Partial<T>;
+
+if (_m0.util.Long !== Long) {
+ _m0.util.Long = Long as any;
+ _m0.configure();
+}
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
diff --git a/frontend/src/types/proto/store/user_group.ts b/frontend/src/types/proto/store/user_group.ts
deleted file mode 100644
index 02bb24c320..0000000000
--- a/frontend/src/types/proto/store/user_group.ts
+++ /dev/null
@@ -1,224 +0,0 @@
-/* eslint-disable */
-import Long from "long";
-import _m0 from "protobufjs/minimal";
-
-export const protobufPackage = "bytebase.store";
-
-export interface UserGroupMember {
- /**
- * Member is the principal who belong to this user group.
- *
- * Format: users/{userUID}.
- */
- member: string;
- role: UserGroupMember_Role;
-}
-
-export enum UserGroupMember_Role {
- ROLE_UNSPECIFIED = "ROLE_UNSPECIFIED",
- OWNER = "OWNER",
- MEMBER = "MEMBER",
- UNRECOGNIZED = "UNRECOGNIZED",
-}
-
-export function userGroupMember_RoleFromJSON(object: any): UserGroupMember_Role {
- switch (object) {
- case 0:
- case "ROLE_UNSPECIFIED":
- return UserGroupMember_Role.ROLE_UNSPECIFIED;
- case 1:
- case "OWNER":
- return UserGroupMember_Role.OWNER;
- case 2:
- case "MEMBER":
- return UserGroupMember_Role.MEMBER;
- case -1:
- case "UNRECOGNIZED":
- default:
- return UserGroupMember_Role.UNRECOGNIZED;
- }
-}
-
-export function userGroupMember_RoleToJSON(object: UserGroupMember_Role): string {
- switch (object) {
- case UserGroupMember_Role.ROLE_UNSPECIFIED:
- return "ROLE_UNSPECIFIED";
- case UserGroupMember_Role.OWNER:
- return "OWNER";
- case UserGroupMember_Role.MEMBER:
- return "MEMBER";
- case UserGroupMember_Role.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-export function userGroupMember_RoleToNumber(object: UserGroupMember_Role): number {
- switch (object) {
- case UserGroupMember_Role.ROLE_UNSPECIFIED:
- return 0;
- case UserGroupMember_Role.OWNER:
- return 1;
- case UserGroupMember_Role.MEMBER:
- return 2;
- case UserGroupMember_Role.UNRECOGNIZED:
- default:
- return -1;
- }
-}
-
-export interface UserGroupPayload {
- members: UserGroupMember[];
-}
-
-function createBaseUserGroupMember(): UserGroupMember {
- return { member: "", role: UserGroupMember_Role.ROLE_UNSPECIFIED };
-}
-
-export const UserGroupMember = {
- encode(message: UserGroupMember, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.member !== "") {
- writer.uint32(10).string(message.member);
- }
- if (message.role !== UserGroupMember_Role.ROLE_UNSPECIFIED) {
- writer.uint32(16).int32(userGroupMember_RoleToNumber(message.role));
- }
- return writer;
- },
-
- decode(input: _m0.Reader | Uint8Array, length?: number): UserGroupMember {
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseUserGroupMember();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- if (tag !== 10) {
- break;
- }
-
- message.member = reader.string();
- continue;
- case 2:
- if (tag !== 16) {
- break;
- }
-
- message.role = userGroupMember_RoleFromJSON(reader.int32());
- continue;
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skipType(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): UserGroupMember {
- return {
- member: isSet(object.member) ? globalThis.String(object.member) : "",
- role: isSet(object.role) ? userGroupMember_RoleFromJSON(object.role) : UserGroupMember_Role.ROLE_UNSPECIFIED,
- };
- },
-
- toJSON(message: UserGroupMember): unknown {
- const obj: any = {};
- if (message.member !== "") {
- obj.member = message.member;
- }
- if (message.role !== UserGroupMember_Role.ROLE_UNSPECIFIED) {
- obj.role = userGroupMember_RoleToJSON(message.role);
- }
- return obj;
- },
-
- create(base?: DeepPartial<UserGroupMember>): UserGroupMember {
- return UserGroupMember.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<UserGroupMember>): UserGroupMember {
- const message = createBaseUserGroupMember();
- message.member = object.member ?? "";
- message.role = object.role ?? UserGroupMember_Role.ROLE_UNSPECIFIED;
- return message;
- },
-};
-
-function createBaseUserGroupPayload(): UserGroupPayload {
- return { members: [] };
-}
-
-export const UserGroupPayload = {
- encode(message: UserGroupPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- for (const v of message.members) {
- UserGroupMember.encode(v!, writer.uint32(10).fork()).ldelim();
- }
- return writer;
- },
-
- decode(input: _m0.Reader | Uint8Array, length?: number): UserGroupPayload {
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseUserGroupPayload();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- if (tag !== 10) {
- break;
- }
-
- message.members.push(UserGroupMember.decode(reader, reader.uint32()));
- continue;
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skipType(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): UserGroupPayload {
- return {
- members: globalThis.Array.isArray(object?.members)
- ? object.members.map((e: any) => UserGroupMember.fromJSON(e))
- : [],
- };
- },
-
- toJSON(message: UserGroupPayload): unknown {
- const obj: any = {};
- if (message.members?.length) {
- obj.members = message.members.map((e) => UserGroupMember.toJSON(e));
- }
- return obj;
- },
-
- create(base?: DeepPartial<UserGroupPayload>): UserGroupPayload {
- return UserGroupPayload.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<UserGroupPayload>): UserGroupPayload {
- const message = createBaseUserGroupPayload();
- message.members = object.members?.map((e) => UserGroupMember.fromPartial(e)) || [];
- return message;
- },
-};
-
-type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
-
-export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
- : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
- : Partial<T>;
-
-if (_m0.util.Long !== Long) {
- _m0.util.Long = Long as any;
- _m0.configure();
-}
-
-function isSet(value: any): boolean {
- return value !== null && value !== undefined;
-}
diff --git a/frontend/src/types/proto/v1/user_group.ts b/frontend/src/types/proto/v1/group.ts
similarity index 61%
rename from frontend/src/types/proto/v1/user_group.ts
rename to frontend/src/types/proto/v1/group.ts
index a06a7ce305..ae4a3ad966 100644
--- a/frontend/src/types/proto/v1/user_group.ts
+++ b/frontend/src/types/proto/v1/group.ts
@@ -7,7 +7,7 @@ import { Timestamp } from "../google/protobuf/timestamp";
export const protobufPackage = "bytebase.v1";
-export interface GetUserGroupRequest {
+export interface GetGroupRequest {
/**
* The name of the group to retrieve.
* Format: groups/{email}
@@ -15,7 +15,7 @@ export interface GetUserGroupRequest {
name: string;
}
-export interface ListUserGroupsRequest {
+export interface ListGroupsRequest {
/**
* The maximum number of groups to return. The service may return fewer than
* this value.
@@ -24,18 +24,18 @@ export interface ListUserGroupsRequest {
*/
pageSize: number;
/**
- * A page token, received from a previous `ListUsers` call.
+ * A page token, received from a previous `ListGroups` call.
* Provide this to retrieve the subsequent page.
*
- * When paginating, all other parameters provided to `ListUsers` must match
+ * When paginating, all other parameters provided to `ListGroups` must match
* the call that provided the page token.
*/
pageToken: string;
}
-export interface ListUserGroupsResponse {
+export interface ListGroupsResponse {
/** The groups from the specified request. */
- groups: UserGroup[];
+ groups: Group[];
/**
* A token, which can be sent as `page_token` to retrieve the next page.
* If this field is omitted, there are no subsequent pages.
@@ -43,12 +43,12 @@ export interface ListUserGroupsResponse {
nextPageToken: string;
}
-export interface CreateUserGroupRequest {
+export interface CreateGroupRequest {
/** The group to create. */
- group: UserGroup | undefined;
+ group: Group | undefined;
}
-export interface UpdateUserGroupRequest {
+export interface UpdateGroupRequest {
/**
* The group to update.
*
@@ -56,13 +56,13 @@ export interface UpdateUserGroupRequest {
* Format: groups/{email}
*/
group:
- | UserGroup
+ | Group
| undefined;
/** The list of fields to update. */
updateMask: string[] | undefined;
}
-export interface DeleteUserGroupRequest {
+export interface DeleteGroupRequest {
/**
* The name of the group to delete.
* Format: groups/{email}
@@ -70,73 +70,73 @@ export interface DeleteUserGroupRequest {
name: string;
}
-export interface UserGroupMember {
+export interface GroupMember {
/**
- * Member is the principal who belong to this user group.
+ * Member is the principal who belong to this group.
*
* Format: users/[email protected]
*/
member: string;
- role: UserGroupMember_Role;
+ role: GroupMember_Role;
}
-export enum UserGroupMember_Role {
+export enum GroupMember_Role {
ROLE_UNSPECIFIED = "ROLE_UNSPECIFIED",
OWNER = "OWNER",
MEMBER = "MEMBER",
UNRECOGNIZED = "UNRECOGNIZED",
}
-export function userGroupMember_RoleFromJSON(object: any): UserGroupMember_Role {
+export function groupMember_RoleFromJSON(object: any): GroupMember_Role {
switch (object) {
case 0:
case "ROLE_UNSPECIFIED":
- return UserGroupMember_Role.ROLE_UNSPECIFIED;
+ return GroupMember_Role.ROLE_UNSPECIFIED;
case 1:
case "OWNER":
- return UserGroupMember_Role.OWNER;
+ return GroupMember_Role.OWNER;
case 2:
case "MEMBER":
- return UserGroupMember_Role.MEMBER;
+ return GroupMember_Role.MEMBER;
case -1:
case "UNRECOGNIZED":
default:
- return UserGroupMember_Role.UNRECOGNIZED;
+ return GroupMember_Role.UNRECOGNIZED;
}
}
-export function userGroupMember_RoleToJSON(object: UserGroupMember_Role): string {
+export function groupMember_RoleToJSON(object: GroupMember_Role): string {
switch (object) {
- case UserGroupMember_Role.ROLE_UNSPECIFIED:
+ case GroupMember_Role.ROLE_UNSPECIFIED:
return "ROLE_UNSPECIFIED";
- case UserGroupMember_Role.OWNER:
+ case GroupMember_Role.OWNER:
return "OWNER";
- case UserGroupMember_Role.MEMBER:
+ case GroupMember_Role.MEMBER:
return "MEMBER";
- case UserGroupMember_Role.UNRECOGNIZED:
+ case GroupMember_Role.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
-export function userGroupMember_RoleToNumber(object: UserGroupMember_Role): number {
+export function groupMember_RoleToNumber(object: GroupMember_Role): number {
switch (object) {
- case UserGroupMember_Role.ROLE_UNSPECIFIED:
+ case GroupMember_Role.ROLE_UNSPECIFIED:
return 0;
- case UserGroupMember_Role.OWNER:
+ case GroupMember_Role.OWNER:
return 1;
- case UserGroupMember_Role.MEMBER:
+ case GroupMember_Role.MEMBER:
return 2;
- case UserGroupMember_Role.UNRECOGNIZED:
+ case GroupMember_Role.UNRECOGNIZED:
default:
return -1;
}
}
-export interface UserGroup {
+export interface Group {
/**
* The name of the group to retrieve.
- * Format: groups/{userGroup}, userGroup is an email.
+ * Format: groups/{group}, group is an email.
*/
name: string;
title: string;
@@ -146,27 +146,27 @@ export interface UserGroup {
* Format: users/[email protected]
*/
creator: string;
- members: UserGroupMember[];
+ members: GroupMember[];
/** The timestamp when the group was created. */
createTime: Date | undefined;
}
-function createBaseGetUserGroupRequest(): GetUserGroupRequest {
+function createBaseGetGroupRequest(): GetGroupRequest {
return { name: "" };
}
-export const GetUserGroupRequest = {
- encode(message: GetUserGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const GetGroupRequest = {
+ encode(message: GetGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): GetUserGroupRequest {
+ decode(input: _m0.Reader | Uint8Array, length?: number): GetGroupRequest {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseGetUserGroupRequest();
+ const message = createBaseGetGroupRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -186,11 +186,11 @@ export const GetUserGroupRequest = {
return message;
},
- fromJSON(object: any): GetUserGroupRequest {
+ fromJSON(object: any): GetGroupRequest {
return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
- toJSON(message: GetUserGroupRequest): unknown {
+ toJSON(message: GetGroupRequest): unknown {
const obj: any = {};
if (message.name !== "") {
obj.name = message.name;
@@ -198,22 +198,22 @@ export const GetUserGroupRequest = {
return obj;
},
- create(base?: DeepPartial<GetUserGroupRequest>): GetUserGroupRequest {
- return GetUserGroupRequest.fromPartial(base ?? {});
+ create(base?: DeepPartial<GetGroupRequest>): GetGroupRequest {
+ return GetGroupRequest.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<GetUserGroupRequest>): GetUserGroupRequest {
- const message = createBaseGetUserGroupRequest();
+ fromPartial(object: DeepPartial<GetGroupRequest>): GetGroupRequest {
+ const message = createBaseGetGroupRequest();
message.name = object.name ?? "";
return message;
},
};
-function createBaseListUserGroupsRequest(): ListUserGroupsRequest {
+function createBaseListGroupsRequest(): ListGroupsRequest {
return { pageSize: 0, pageToken: "" };
}
-export const ListUserGroupsRequest = {
- encode(message: ListUserGroupsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const ListGroupsRequest = {
+ encode(message: ListGroupsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.pageSize !== 0) {
writer.uint32(8).int32(message.pageSize);
}
@@ -223,10 +223,10 @@ export const ListUserGroupsRequest = {
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): ListUserGroupsRequest {
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListGroupsRequest {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseListUserGroupsRequest();
+ const message = createBaseListGroupsRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -253,14 +253,14 @@ export const ListUserGroupsRequest = {
return message;
},
- fromJSON(object: any): ListUserGroupsRequest {
+ fromJSON(object: any): ListGroupsRequest {
return {
pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
- toJSON(message: ListUserGroupsRequest): unknown {
+ toJSON(message: ListGroupsRequest): unknown {
const obj: any = {};
if (message.pageSize !== 0) {
obj.pageSize = Math.round(message.pageSize);
@@ -271,25 +271,25 @@ export const ListUserGroupsRequest = {
return obj;
},
- create(base?: DeepPartial<ListUserGroupsRequest>): ListUserGroupsRequest {
- return ListUserGroupsRequest.fromPartial(base ?? {});
+ create(base?: DeepPartial<ListGroupsRequest>): ListGroupsRequest {
+ return ListGroupsRequest.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<ListUserGroupsRequest>): ListUserGroupsRequest {
- const message = createBaseListUserGroupsRequest();
+ fromPartial(object: DeepPartial<ListGroupsRequest>): ListGroupsRequest {
+ const message = createBaseListGroupsRequest();
message.pageSize = object.pageSize ?? 0;
message.pageToken = object.pageToken ?? "";
return message;
},
};
-function createBaseListUserGroupsResponse(): ListUserGroupsResponse {
+function createBaseListGroupsResponse(): ListGroupsResponse {
return { groups: [], nextPageToken: "" };
}
-export const ListUserGroupsResponse = {
- encode(message: ListUserGroupsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const ListGroupsResponse = {
+ encode(message: ListGroupsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
for (const v of message.groups) {
- UserGroup.encode(v!, writer.uint32(10).fork()).ldelim();
+ Group.encode(v!, writer.uint32(10).fork()).ldelim();
}
if (message.nextPageToken !== "") {
writer.uint32(18).string(message.nextPageToken);
@@ -297,10 +297,10 @@ export const ListUserGroupsResponse = {
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): ListUserGroupsResponse {
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListGroupsResponse {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseListUserGroupsResponse();
+ const message = createBaseListGroupsResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -309,7 +309,7 @@ export const ListUserGroupsResponse = {
break;
}
- message.groups.push(UserGroup.decode(reader, reader.uint32()));
+ message.groups.push(Group.decode(reader, reader.uint32()));
continue;
case 2:
if (tag !== 18) {
@@ -327,17 +327,17 @@ export const ListUserGroupsResponse = {
return message;
},
- fromJSON(object: any): ListUserGroupsResponse {
+ fromJSON(object: any): ListGroupsResponse {
return {
- groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => UserGroup.fromJSON(e)) : [],
+ groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => Group.fromJSON(e)) : [],
nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
- toJSON(message: ListUserGroupsResponse): unknown {
+ toJSON(message: ListGroupsResponse): unknown {
const obj: any = {};
if (message.groups?.length) {
- obj.groups = message.groups.map((e) => UserGroup.toJSON(e));
+ obj.groups = message.groups.map((e) => Group.toJSON(e));
}
if (message.nextPageToken !== "") {
obj.nextPageToken = message.nextPageToken;
@@ -345,33 +345,33 @@ export const ListUserGroupsResponse = {
return obj;
},
- create(base?: DeepPartial<ListUserGroupsResponse>): ListUserGroupsResponse {
- return ListUserGroupsResponse.fromPartial(base ?? {});
+ create(base?: DeepPartial<ListGroupsResponse>): ListGroupsResponse {
+ return ListGroupsResponse.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<ListUserGroupsResponse>): ListUserGroupsResponse {
- const message = createBaseListUserGroupsResponse();
- message.groups = object.groups?.map((e) => UserGroup.fromPartial(e)) || [];
+ fromPartial(object: DeepPartial<ListGroupsResponse>): ListGroupsResponse {
+ const message = createBaseListGroupsResponse();
+ message.groups = object.groups?.map((e) => Group.fromPartial(e)) || [];
message.nextPageToken = object.nextPageToken ?? "";
return message;
},
};
-function createBaseCreateUserGroupRequest(): CreateUserGroupRequest {
+function createBaseCreateGroupRequest(): CreateGroupRequest {
return { group: undefined };
}
-export const CreateUserGroupRequest = {
- encode(message: CreateUserGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const CreateGroupRequest = {
+ encode(message: CreateGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.group !== undefined) {
- UserGroup.encode(message.group, writer.uint32(10).fork()).ldelim();
+ Group.encode(message.group, writer.uint32(10).fork()).ldelim();
}
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): CreateUserGroupRequest {
+ decode(input: _m0.Reader | Uint8Array, length?: number): CreateGroupRequest {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseCreateUserGroupRequest();
+ const message = createBaseCreateGroupRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -380,7 +380,7 @@ export const CreateUserGroupRequest = {
break;
}
- message.group = UserGroup.decode(reader, reader.uint32());
+ message.group = Group.decode(reader, reader.uint32());
continue;
}
if ((tag & 7) === 4 || tag === 0) {
@@ -391,38 +391,36 @@ export const CreateUserGroupRequest = {
return message;
},
- fromJSON(object: any): CreateUserGroupRequest {
- return { group: isSet(object.group) ? UserGroup.fromJSON(object.group) : undefined };
+ fromJSON(object: any): CreateGroupRequest {
+ return { group: isSet(object.group) ? Group.fromJSON(object.group) : undefined };
},
- toJSON(message: CreateUserGroupRequest): unknown {
+ toJSON(message: CreateGroupRequest): unknown {
const obj: any = {};
if (message.group !== undefined) {
- obj.group = UserGroup.toJSON(message.group);
+ obj.group = Group.toJSON(message.group);
}
return obj;
},
- create(base?: DeepPartial<CreateUserGroupRequest>): CreateUserGroupRequest {
- return CreateUserGroupRequest.fromPartial(base ?? {});
+ create(base?: DeepPartial<CreateGroupRequest>): CreateGroupRequest {
+ return CreateGroupRequest.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<CreateUserGroupRequest>): CreateUserGroupRequest {
- const message = createBaseCreateUserGroupRequest();
- message.group = (object.group !== undefined && object.group !== null)
- ? UserGroup.fromPartial(object.group)
- : undefined;
+ fromPartial(object: DeepPartial<CreateGroupRequest>): CreateGroupRequest {
+ const message = createBaseCreateGroupRequest();
+ message.group = (object.group !== undefined && object.group !== null) ? Group.fromPartial(object.group) : undefined;
return message;
},
};
-function createBaseUpdateUserGroupRequest(): UpdateUserGroupRequest {
+function createBaseUpdateGroupRequest(): UpdateGroupRequest {
return { group: undefined, updateMask: undefined };
}
-export const UpdateUserGroupRequest = {
- encode(message: UpdateUserGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const UpdateGroupRequest = {
+ encode(message: UpdateGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.group !== undefined) {
- UserGroup.encode(message.group, writer.uint32(10).fork()).ldelim();
+ Group.encode(message.group, writer.uint32(10).fork()).ldelim();
}
if (message.updateMask !== undefined) {
FieldMask.encode(FieldMask.wrap(message.updateMask), writer.uint32(18).fork()).ldelim();
@@ -430,10 +428,10 @@ export const UpdateUserGroupRequest = {
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): UpdateUserGroupRequest {
+ decode(input: _m0.Reader | Uint8Array, length?: number): UpdateGroupRequest {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseUpdateUserGroupRequest();
+ const message = createBaseUpdateGroupRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -442,7 +440,7 @@ export const UpdateUserGroupRequest = {
break;
}
- message.group = UserGroup.decode(reader, reader.uint32());
+ message.group = Group.decode(reader, reader.uint32());
continue;
case 2:
if (tag !== 18) {
@@ -460,17 +458,17 @@ export const UpdateUserGroupRequest = {
return message;
},
- fromJSON(object: any): UpdateUserGroupRequest {
+ fromJSON(object: any): UpdateGroupRequest {
return {
- group: isSet(object.group) ? UserGroup.fromJSON(object.group) : undefined,
+ group: isSet(object.group) ? Group.fromJSON(object.group) : undefined,
updateMask: isSet(object.updateMask) ? FieldMask.unwrap(FieldMask.fromJSON(object.updateMask)) : undefined,
};
},
- toJSON(message: UpdateUserGroupRequest): unknown {
+ toJSON(message: UpdateGroupRequest): unknown {
const obj: any = {};
if (message.group !== undefined) {
- obj.group = UserGroup.toJSON(message.group);
+ obj.group = Group.toJSON(message.group);
}
if (message.updateMask !== undefined) {
obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
@@ -478,35 +476,33 @@ export const UpdateUserGroupRequest = {
return obj;
},
- create(base?: DeepPartial<UpdateUserGroupRequest>): UpdateUserGroupRequest {
- return UpdateUserGroupRequest.fromPartial(base ?? {});
+ create(base?: DeepPartial<UpdateGroupRequest>): UpdateGroupRequest {
+ return UpdateGroupRequest.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<UpdateUserGroupRequest>): UpdateUserGroupRequest {
- const message = createBaseUpdateUserGroupRequest();
- message.group = (object.group !== undefined && object.group !== null)
- ? UserGroup.fromPartial(object.group)
- : undefined;
+ fromPartial(object: DeepPartial<UpdateGroupRequest>): UpdateGroupRequest {
+ const message = createBaseUpdateGroupRequest();
+ message.group = (object.group !== undefined && object.group !== null) ? Group.fromPartial(object.group) : undefined;
message.updateMask = object.updateMask ?? undefined;
return message;
},
};
-function createBaseDeleteUserGroupRequest(): DeleteUserGroupRequest {
+function createBaseDeleteGroupRequest(): DeleteGroupRequest {
return { name: "" };
}
-export const DeleteUserGroupRequest = {
- encode(message: DeleteUserGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const DeleteGroupRequest = {
+ encode(message: DeleteGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): DeleteUserGroupRequest {
+ decode(input: _m0.Reader | Uint8Array, length?: number): DeleteGroupRequest {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseDeleteUserGroupRequest();
+ const message = createBaseDeleteGroupRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -526,11 +522,11 @@ export const DeleteUserGroupRequest = {
return message;
},
- fromJSON(object: any): DeleteUserGroupRequest {
+ fromJSON(object: any): DeleteGroupRequest {
return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
- toJSON(message: DeleteUserGroupRequest): unknown {
+ toJSON(message: DeleteGroupRequest): unknown {
const obj: any = {};
if (message.name !== "") {
obj.name = message.name;
@@ -538,35 +534,35 @@ export const DeleteUserGroupRequest = {
return obj;
},
- create(base?: DeepPartial<DeleteUserGroupRequest>): DeleteUserGroupRequest {
- return DeleteUserGroupRequest.fromPartial(base ?? {});
+ create(base?: DeepPartial<DeleteGroupRequest>): DeleteGroupRequest {
+ return DeleteGroupRequest.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<DeleteUserGroupRequest>): DeleteUserGroupRequest {
- const message = createBaseDeleteUserGroupRequest();
+ fromPartial(object: DeepPartial<DeleteGroupRequest>): DeleteGroupRequest {
+ const message = createBaseDeleteGroupRequest();
message.name = object.name ?? "";
return message;
},
};
-function createBaseUserGroupMember(): UserGroupMember {
- return { member: "", role: UserGroupMember_Role.ROLE_UNSPECIFIED };
+function createBaseGroupMember(): GroupMember {
+ return { member: "", role: GroupMember_Role.ROLE_UNSPECIFIED };
}
-export const UserGroupMember = {
- encode(message: UserGroupMember, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const GroupMember = {
+ encode(message: GroupMember, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.member !== "") {
writer.uint32(10).string(message.member);
}
- if (message.role !== UserGroupMember_Role.ROLE_UNSPECIFIED) {
- writer.uint32(16).int32(userGroupMember_RoleToNumber(message.role));
+ if (message.role !== GroupMember_Role.ROLE_UNSPECIFIED) {
+ writer.uint32(16).int32(groupMember_RoleToNumber(message.role));
}
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): UserGroupMember {
+ decode(input: _m0.Reader | Uint8Array, length?: number): GroupMember {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseUserGroupMember();
+ const message = createBaseGroupMember();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -582,7 +578,7 @@ export const UserGroupMember = {
break;
}
- message.role = userGroupMember_RoleFromJSON(reader.int32());
+ message.role = groupMember_RoleFromJSON(reader.int32());
continue;
}
if ((tag & 7) === 4 || tag === 0) {
@@ -593,41 +589,41 @@ export const UserGroupMember = {
return message;
},
- fromJSON(object: any): UserGroupMember {
+ fromJSON(object: any): GroupMember {
return {
member: isSet(object.member) ? globalThis.String(object.member) : "",
- role: isSet(object.role) ? userGroupMember_RoleFromJSON(object.role) : UserGroupMember_Role.ROLE_UNSPECIFIED,
+ role: isSet(object.role) ? groupMember_RoleFromJSON(object.role) : GroupMember_Role.ROLE_UNSPECIFIED,
};
},
- toJSON(message: UserGroupMember): unknown {
+ toJSON(message: GroupMember): unknown {
const obj: any = {};
if (message.member !== "") {
obj.member = message.member;
}
- if (message.role !== UserGroupMember_Role.ROLE_UNSPECIFIED) {
- obj.role = userGroupMember_RoleToJSON(message.role);
+ if (message.role !== GroupMember_Role.ROLE_UNSPECIFIED) {
+ obj.role = groupMember_RoleToJSON(message.role);
}
return obj;
},
- create(base?: DeepPartial<UserGroupMember>): UserGroupMember {
- return UserGroupMember.fromPartial(base ?? {});
+ create(base?: DeepPartial<GroupMember>): GroupMember {
+ return GroupMember.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<UserGroupMember>): UserGroupMember {
- const message = createBaseUserGroupMember();
+ fromPartial(object: DeepPartial<GroupMember>): GroupMember {
+ const message = createBaseGroupMember();
message.member = object.member ?? "";
- message.role = object.role ?? UserGroupMember_Role.ROLE_UNSPECIFIED;
+ message.role = object.role ?? GroupMember_Role.ROLE_UNSPECIFIED;
return message;
},
};
-function createBaseUserGroup(): UserGroup {
+function createBaseGroup(): Group {
return { name: "", title: "", description: "", creator: "", members: [], createTime: undefined };
}
-export const UserGroup = {
- encode(message: UserGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const Group = {
+ encode(message: Group, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
@@ -641,7 +637,7 @@ export const UserGroup = {
writer.uint32(34).string(message.creator);
}
for (const v of message.members) {
- UserGroupMember.encode(v!, writer.uint32(42).fork()).ldelim();
+ GroupMember.encode(v!, writer.uint32(42).fork()).ldelim();
}
if (message.createTime !== undefined) {
Timestamp.encode(toTimestamp(message.createTime), writer.uint32(50).fork()).ldelim();
@@ -649,10 +645,10 @@ export const UserGroup = {
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): UserGroup {
+ decode(input: _m0.Reader | Uint8Array, length?: number): Group {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseUserGroup();
+ const message = createBaseGroup();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -689,7 +685,7 @@ export const UserGroup = {
break;
}
- message.members.push(UserGroupMember.decode(reader, reader.uint32()));
+ message.members.push(GroupMember.decode(reader, reader.uint32()));
continue;
case 6:
if (tag !== 50) {
@@ -707,20 +703,18 @@ export const UserGroup = {
return message;
},
- fromJSON(object: any): UserGroup {
+ fromJSON(object: any): Group {
return {
name: isSet(object.name) ? globalThis.String(object.name) : "",
title: isSet(object.title) ? globalThis.String(object.title) : "",
description: isSet(object.description) ? globalThis.String(object.description) : "",
creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
- members: globalThis.Array.isArray(object?.members)
- ? object.members.map((e: any) => UserGroupMember.fromJSON(e))
- : [],
+ members: globalThis.Array.isArray(object?.members) ? object.members.map((e: any) => GroupMember.fromJSON(e)) : [],
createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,
};
},
- toJSON(message: UserGroup): unknown {
+ toJSON(message: Group): unknown {
const obj: any = {};
if (message.name !== "") {
obj.name = message.name;
@@ -735,7 +729,7 @@ export const UserGroup = {
obj.creator = message.creator;
}
if (message.members?.length) {
- obj.members = message.members.map((e) => UserGroupMember.toJSON(e));
+ obj.members = message.members.map((e) => GroupMember.toJSON(e));
}
if (message.createTime !== undefined) {
obj.createTime = message.createTime.toISOString();
@@ -743,38 +737,36 @@ export const UserGroup = {
return obj;
},
- create(base?: DeepPartial<UserGroup>): UserGroup {
- return UserGroup.fromPartial(base ?? {});
+ create(base?: DeepPartial<Group>): Group {
+ return Group.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<UserGroup>): UserGroup {
- const message = createBaseUserGroup();
+ fromPartial(object: DeepPartial<Group>): Group {
+ const message = createBaseGroup();
message.name = object.name ?? "";
message.title = object.title ?? "";
message.description = object.description ?? "";
message.creator = object.creator ?? "";
- message.members = object.members?.map((e) => UserGroupMember.fromPartial(e)) || [];
+ message.members = object.members?.map((e) => GroupMember.fromPartial(e)) || [];
message.createTime = object.createTime ?? undefined;
return message;
},
};
-export type UserGroupServiceDefinition = typeof UserGroupServiceDefinition;
-export const UserGroupServiceDefinition = {
- name: "UserGroupService",
- fullName: "bytebase.v1.UserGroupService",
+export type GroupServiceDefinition = typeof GroupServiceDefinition;
+export const GroupServiceDefinition = {
+ name: "GroupService",
+ fullName: "bytebase.v1.GroupService",
methods: {
- getUserGroup: {
- name: "GetUserGroup",
- requestType: GetUserGroupRequest,
+ getGroup: {
+ name: "GetGroup",
+ requestType: GetGroupRequest,
requestStream: false,
- responseType: UserGroup,
+ responseType: Group,
responseStream: false,
options: {
_unknownFields: {
8410: [new Uint8Array([4, 110, 97, 109, 101])],
- 800010: [
- new Uint8Array([17, 98, 98, 46, 117, 115, 101, 114, 71, 114, 111, 117, 112, 115, 46, 103, 101, 116]),
- ],
+ 800010: [new Uint8Array([13, 98, 98, 46, 103, 114, 111, 117, 112, 115, 46, 103, 101, 116])],
800016: [new Uint8Array([1])],
578365826: [
new Uint8Array([
@@ -805,57 +797,31 @@ export const UserGroupServiceDefinition = {
},
},
},
- listUserGroups: {
- name: "ListUserGroups",
- requestType: ListUserGroupsRequest,
+ listGroups: {
+ name: "ListGroups",
+ requestType: ListGroupsRequest,
requestStream: false,
- responseType: ListUserGroupsResponse,
+ responseType: ListGroupsResponse,
responseStream: false,
options: {
_unknownFields: {
8410: [new Uint8Array([0])],
- 800010: [
- new Uint8Array([18, 98, 98, 46, 117, 115, 101, 114, 71, 114, 111, 117, 112, 115, 46, 108, 105, 115, 116]),
- ],
+ 800010: [new Uint8Array([14, 98, 98, 46, 103, 114, 111, 117, 112, 115, 46, 108, 105, 115, 116])],
800016: [new Uint8Array([1])],
578365826: [new Uint8Array([12, 18, 10, 47, 118, 49, 47, 103, 114, 111, 117, 112, 115])],
},
},
},
- createUserGroup: {
- name: "CreateUserGroup",
- requestType: CreateUserGroupRequest,
+ createGroup: {
+ name: "CreateGroup",
+ requestType: CreateGroupRequest,
requestStream: false,
- responseType: UserGroup,
+ responseType: Group,
responseStream: false,
options: {
_unknownFields: {
8410: [new Uint8Array([5, 103, 114, 111, 117, 112])],
- 800010: [
- new Uint8Array([
- 20,
- 98,
- 98,
- 46,
- 117,
- 115,
- 101,
- 114,
- 71,
- 114,
- 111,
- 117,
- 112,
- 115,
- 46,
- 99,
- 114,
- 101,
- 97,
- 116,
- 101,
- ]),
- ],
+ 800010: [new Uint8Array([16, 98, 98, 46, 103, 114, 111, 117, 112, 115, 46, 99, 114, 101, 97, 116, 101])],
800016: [new Uint8Array([1])],
578365826: [
new Uint8Array([19, 58, 5, 103, 114, 111, 117, 112, 34, 10, 47, 118, 49, 47, 103, 114, 111, 117, 112, 115]),
@@ -864,43 +830,19 @@ export const UserGroupServiceDefinition = {
},
},
/**
- * UpdateUserGroup updates the user group.
- * Users with "bb.userGroups.update" permission on the workspace or the user group owner can access this method.
+ * UpdateGroup updates the group.
+ * Users with "bb.groups.update" permission on the workspace or the group owner can access this method.
*/
- updateUserGroup: {
- name: "UpdateUserGroup",
- requestType: UpdateUserGroupRequest,
+ updateGroup: {
+ name: "UpdateGroup",
+ requestType: UpdateGroupRequest,
requestStream: false,
- responseType: UserGroup,
+ responseType: Group,
responseStream: false,
options: {
_unknownFields: {
8410: [new Uint8Array([17, 103, 114, 111, 117, 112, 44, 117, 112, 100, 97, 116, 101, 95, 109, 97, 115, 107])],
- 800010: [
- new Uint8Array([
- 20,
- 98,
- 98,
- 46,
- 117,
- 115,
- 101,
- 114,
- 71,
- 114,
- 111,
- 117,
- 112,
- 115,
- 46,
- 117,
- 112,
- 100,
- 97,
- 116,
- 101,
- ]),
- ],
+ 800010: [new Uint8Array([16, 98, 98, 46, 103, 114, 111, 117, 112, 115, 46, 117, 112, 100, 97, 116, 101])],
800016: [new Uint8Array([2])],
578365826: [
new Uint8Array([
@@ -944,40 +886,16 @@ export const UserGroupServiceDefinition = {
},
},
},
- deleteUserGroup: {
- name: "DeleteUserGroup",
- requestType: DeleteUserGroupRequest,
+ deleteGroup: {
+ name: "DeleteGroup",
+ requestType: DeleteGroupRequest,
requestStream: false,
responseType: Empty,
responseStream: false,
options: {
_unknownFields: {
8410: [new Uint8Array([4, 110, 97, 109, 101])],
- 800010: [
- new Uint8Array([
- 20,
- 98,
- 98,
- 46,
- 117,
- 115,
- 101,
- 114,
- 71,
- 114,
- 111,
- 117,
- 112,
- 115,
- 46,
- 100,
- 101,
- 108,
- 101,
- 116,
- 101,
- ]),
- ],
+ 800010: [new Uint8Array([16, 98, 98, 46, 103, 114, 111, 117, 112, 115, 46, 100, 101, 108, 101, 116, 101])],
800016: [new Uint8Array([1])],
578365826: [
new Uint8Array([
diff --git a/frontend/src/types/v1/group.ts b/frontend/src/types/v1/group.ts
index 25b897242b..98ae85a675 100644
--- a/frontend/src/types/v1/group.ts
+++ b/frontend/src/types/v1/group.ts
@@ -1,12 +1,12 @@
-import { userGroupNamePrefix } from "@/store/modules/v1/common";
+import { groupNamePrefix } from "@/store/modules/v1/common";
import { EMPTY_ID, UNKNOWN_ID } from "../const";
-import { UserGroup } from "../proto/v1/user_group";
+import { Group } from "../proto/v1/group";
-export const UNKNOWN_GROUP_NAME = `${userGroupNamePrefix}${UNKNOWN_ID}`;
+export const UNKNOWN_GROUP_NAME = `${groupNamePrefix}${UNKNOWN_ID}`;
export const emptyGroup = () => {
- return UserGroup.fromPartial({
- name: `${userGroupNamePrefix}${EMPTY_ID}`,
+ return Group.fromPartial({
+ name: `${groupNamePrefix}${EMPTY_ID}`,
title: "",
description: "",
members: [],
diff --git a/frontend/src/utils/v1/iam.ts b/frontend/src/utils/v1/iam.ts
index 6568e50914..e6d71e9308 100644
--- a/frontend/src/utils/v1/iam.ts
+++ b/frontend/src/utils/v1/iam.ts
@@ -1,5 +1,5 @@
import { orderBy, uniq } from "lodash-es";
-import { extractUserEmail, useUserStore, useUserGroupStore } from "@/store";
+import { extractUserEmail, useUserStore, useGroupStore } from "@/store";
import { userNamePrefix, roleNamePrefix } from "@/store/modules/v1/common";
import {
ALL_USERS_USER_EMAIL,
@@ -31,7 +31,7 @@ export const getUserEmailListInBinding = (binding: Binding): string[] => {
return [];
}
- const groupStore = useUserGroupStore();
+ const groupStore = useGroupStore();
const userStore = useUserStore();
const emailList = [];
@@ -112,7 +112,7 @@ export const memberListInIAM = (iamPolicy: IamPolicy) => {
};
export const roleListInIAM = (iamPolicy: IamPolicy, email: string) => {
- const groupStore = useUserGroupStore();
+ const groupStore = useGroupStore();
const userInBinding = getUserEmailInBinding(email);
const roles = iamPolicy.bindings
diff --git a/frontend/src/views/SettingWorkspaceMember.vue b/frontend/src/views/SettingWorkspaceMember.vue
index 81e4aaf097..f8243cd0ac 100644
--- a/frontend/src/views/SettingWorkspaceMember.vue
+++ b/frontend/src/views/SettingWorkspaceMember.vue
@@ -177,10 +177,10 @@ import {
useCurrentUserV1,
useUserStore,
useUIStateStore,
- useUserGroupStore,
+ useGroupStore,
useSettingV1Store,
} from "@/store";
-import { userGroupNamePrefix } from "@/store/modules/v1/common";
+import { groupNamePrefix } from "@/store/modules/v1/common";
import {
ALL_USERS_USER_EMAIL,
PresetRoleType,
@@ -190,7 +190,7 @@ import {
import { UserType } from "@/types/proto/v1/auth_service";
import { State } from "@/types/proto/v1/common";
import { WorkspaceProfileSetting } from "@/types/proto/v1/setting_service";
-import type { UserGroup } from "@/types/proto/v1/user_group";
+import type { Group } from "@/types/proto/v1/group";
import { hasWorkspacePermissionV2 } from "@/utils";
const tabList = ["members", "groups"] as const;
@@ -207,7 +207,7 @@ type LocalState = {
showCreateUserDrawer: boolean;
showCreateGroupDrawer: boolean;
editingUser?: ComposedUser;
- editingGroup?: UserGroup;
+ editingGroup?: Group;
};
const state = reactive<LocalState>({
@@ -224,7 +224,7 @@ const { t } = useI18n();
const route = useRoute();
const router = useRouter();
const userStore = useUserStore();
-const groupStore = useUserGroupStore();
+const groupStore = useGroupStore();
const currentUserV1 = useCurrentUserV1();
const uiStateStore = useUIStateStore();
const subscriptionV1Store = useSubscriptionV1Store();
@@ -263,7 +263,7 @@ const hasRBACFeature = computed(() =>
);
const allowCreateGroup = computed(() =>
- hasWorkspacePermissionV2(currentUserV1.value, "bb.userGroups.create")
+ hasWorkspacePermissionV2(currentUserV1.value, "bb.groups.create")
);
const allowCreateUser = computed(() => {
@@ -271,7 +271,7 @@ const allowCreateUser = computed(() => {
});
const allowEditGroup = computed(() => {
- return hasWorkspacePermissionV2(currentUserV1.value, "bb.userGroups.update");
+ return hasWorkspacePermissionV2(currentUserV1.value, "bb.groups.update");
});
onMounted(() => {
@@ -283,7 +283,7 @@ onMounted(() => {
}
const name = route.query.name as string;
- if (name?.startsWith(userGroupNamePrefix)) {
+ if (name?.startsWith(groupNamePrefix)) {
state.typeTab = "groups";
state.editingGroup = groupStore.groupList.find(
(group) => group.name === name
@@ -376,7 +376,7 @@ const handleCreateGroup = () => {
state.showCreateGroupDrawer = true;
};
-const handleUpdateGroup = (group: UserGroup) => {
+const handleUpdateGroup = (group: Group) => {
state.editingGroup = group;
state.showCreateGroupDrawer = true;
};
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 39c8d151ab..393c844992 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -867,8 +867,8 @@ paths:
/v1/groups:
get:
tags:
- - UserGroupService
- operationId: UserGroupService_ListUserGroups
+ - GroupService
+ operationId: GroupService_ListGroups
parameters:
- name: pageSize
in: query
@@ -883,10 +883,10 @@ paths:
- name: pageToken
in: query
description: |-
- A page token, received from a previous `ListUsers` call.
+ A page token, received from a previous `ListGroups` call.
Provide this to retrieve the subsequent page.
- When paginating, all other parameters provided to `ListUsers` must match
+ When paginating, all other parameters provided to `ListGroups` must match
the call that provided the page token.
schema:
type: string
@@ -896,7 +896,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/ListUserGroupsResponse'
+ $ref: '#/components/schemas/ListGroupsResponse'
default:
description: Default error response
content:
@@ -905,13 +905,13 @@ paths:
$ref: '#/components/schemas/Status'
post:
tags:
- - UserGroupService
- operationId: UserGroupService_CreateUserGroup
+ - GroupService
+ operationId: GroupService_CreateGroup
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/UserGroup'
+ $ref: '#/components/schemas/Group'
required: true
responses:
"200":
@@ -919,7 +919,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/UserGroup'
+ $ref: '#/components/schemas/Group'
default:
description: Default error response
content:
@@ -929,8 +929,8 @@ paths:
/v1/groups/{group}:
get:
tags:
- - UserGroupService
- operationId: UserGroupService_GetUserGroup
+ - GroupService
+ operationId: GroupService_GetGroup
parameters:
- name: group
in: path
@@ -944,7 +944,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/UserGroup'
+ $ref: '#/components/schemas/Group'
default:
description: Default error response
content:
@@ -953,8 +953,8 @@ paths:
$ref: '#/components/schemas/Status'
delete:
tags:
- - UserGroupService
- operationId: UserGroupService_DeleteUserGroup
+ - GroupService
+ operationId: GroupService_DeleteGroup
parameters:
- name: group
in: path
@@ -974,11 +974,11 @@ paths:
$ref: '#/components/schemas/Status'
patch:
tags:
- - UserGroupService
+ - GroupService
description: |-
- UpdateUserGroup updates the user group.
- Users with "bb.userGroups.update" permission on the workspace or the user group owner can access this method.
- operationId: UserGroupService_UpdateUserGroup
+ UpdateGroup updates the group.
+ Users with "bb.groups.update" permission on the workspace or the group owner can access this method.
+ operationId: GroupService_UpdateGroup
parameters:
- name: group
in: path
@@ -996,7 +996,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/UserGroup'
+ $ref: '#/components/schemas/Group'
required: true
responses:
"200":
@@ -1004,7 +1004,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/UserGroup'
+ $ref: '#/components/schemas/Group'
default:
description: Default error response
content:
@@ -10148,6 +10148,50 @@ components:
expiration:
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
type: string
+ Group:
+ type: object
+ properties:
+ name:
+ readOnly: true
+ type: string
+ description: |-
+ The name of the group to retrieve.
+ Format: groups/{group}, group is an email.
+ title:
+ type: string
+ description:
+ type: string
+ creator:
+ readOnly: true
+ type: string
+ description: |-
+ The name for the creator.
+ Format: users/[email protected]
+ members:
+ type: array
+ items:
+ $ref: '#/components/schemas/GroupMember'
+ createTime:
+ readOnly: true
+ type: string
+ description: The timestamp when the group was created.
+ format: date-time
+ GroupMember:
+ type: object
+ properties:
+ member:
+ type: string
+ description: |-
+ Member is the principal who belong to this group.
+
+ Format: users/{userUID}.
+ role:
+ enum:
+ - ROLE_UNSPECIFIED
+ - OWNER
+ - MEMBER
+ type: string
+ format: enum
IamPolicy:
type: object
properties:
@@ -10875,6 +10919,19 @@ components:
description: |-
A token, which can be sent as `page_token` to retrieve the next page.
If this field is omitted, there are no subsequent pages.
+ ListGroupsResponse:
+ type: object
+ properties:
+ groups:
+ type: array
+ items:
+ $ref: '#/components/schemas/Group'
+ description: The groups from the specified request.
+ nextPageToken:
+ type: string
+ description: |-
+ A token, which can be sent as `page_token` to retrieve the next page.
+ If this field is omitted, there are no subsequent pages.
ListIdentityProvidersResponse:
type: object
properties:
@@ -11089,19 +11146,6 @@ components:
description: |-
A token, which can be sent as `page_token` to retrieve the next page.
If this field is omitted, there are no subsequent pages.
- ListUserGroupsResponse:
- type: object
- properties:
- groups:
- type: array
- items:
- $ref: '#/components/schemas/UserGroup'
- description: The groups from the specified request.
- nextPageToken:
- type: string
- description: |-
- A token, which can be sent as `page_token` to retrieve the next page.
- If this field is omitted, there are no subsequent pages.
ListUsersResponse:
type: object
properties:
@@ -14038,50 +14082,6 @@ components:
description: |-
Should be a valid E.164 compliant phone number.
Could be empty.
- UserGroup:
- type: object
- properties:
- name:
- readOnly: true
- type: string
- description: |-
- The name of the group to retrieve.
- Format: groups/{userGroup}, userGroup is an email.
- title:
- type: string
- description:
- type: string
- creator:
- readOnly: true
- type: string
- description: |-
- The name for the creator.
- Format: users/[email protected]
- members:
- type: array
- items:
- $ref: '#/components/schemas/UserGroupMember'
- createTime:
- readOnly: true
- type: string
- description: The timestamp when the group was created.
- format: date-time
- UserGroupMember:
- type: object
- properties:
- member:
- type: string
- description: |-
- Member is the principal who belong to this user group.
-
- Format: users/{userUID}.
- role:
- enum:
- - ROLE_UNSPECIFIED
- - OWNER
- - MEMBER
- type: string
- format: enum
VCSConnector:
type: object
properties:
@@ -14485,6 +14485,7 @@ tags:
- name: DatabaseGroupService
- name: DatabaseService
- name: EnvironmentService
+ - name: GroupService
- name: IdentityProviderService
- name: InstanceRoleService
- name: InstanceService
@@ -14500,7 +14501,6 @@ tags:
- name: SettingService
- name: SheetService
- name: SubscriptionService
- - name: UserGroupService
- name: VCSConnectorService
- name: VCSProviderService
- name: WorksheetService
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index 1317b75882..9a35e43fb0 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -111,6 +111,12 @@
- [store/export_archive.proto](#store_export_archive-proto)
- [ExportArchivePayload](#bytebase-store-ExportArchivePayload)
+- [store/group.proto](#store_group-proto)
+ - [GroupMember](#bytebase-store-GroupMember)
+ - [GroupPayload](#bytebase-store-GroupPayload)
+
+ - [GroupMember.Role](#bytebase-store-GroupMember-Role)
+
- [store/idp.proto](#store_idp-proto)
- [FieldMapping](#bytebase-store-FieldMapping)
- [IdentityProviderConfig](#bytebase-store-IdentityProviderConfig)
@@ -302,12 +308,6 @@
- [store/user.proto](#store_user-proto)
- [MFAConfig](#bytebase-store-MFAConfig)
-- [store/user_group.proto](#store_user_group-proto)
- - [UserGroupMember](#bytebase-store-UserGroupMember)
- - [UserGroupPayload](#bytebase-store-UserGroupPayload)
-
- - [UserGroupMember.Role](#bytebase-store-UserGroupMember-Role)
-
- [store/vcs.proto](#store_vcs-proto)
- [VCSConnector](#bytebase-store-VCSConnector)
@@ -1913,6 +1913,68 @@ PostgreSQL: RANGE, LIST, HASH (https://www.postgresql.org/docs/current/ddl-parti
+<a name="store_group-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## store/group.proto
+
+
+
+<a name="bytebase-store-GroupMember"></a>
+
+### GroupMember
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| member | [string](#string) | | Member is the principal who belong to this group.
+
+Format: users/{userUID}. |
+| role | [GroupMember.Role](#bytebase-store-GroupMember-Role) | | |
+
+
+
+
+
+
+<a name="bytebase-store-GroupPayload"></a>
+
+### GroupPayload
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| members | [GroupMember](#bytebase-store-GroupMember) | repeated | |
+
+
+
+
+
+
+
+
+<a name="bytebase-store-GroupMember-Role"></a>
+
+### GroupMember.Role
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| ROLE_UNSPECIFIED | 0 | |
+| OWNER | 1 | |
+| MEMBER | 2 | |
+
+
+
+
+
+
+
+
+
+
<a name="store_idp-proto"></a>
<p align="right"><a href="#top">Top</a></p>
@@ -4644,68 +4706,6 @@ MFAConfig is the MFA configuration for a user.
-<a name="store_user_group-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-
-## store/user_group.proto
-
-
-
-<a name="bytebase-store-UserGroupMember"></a>
-
-### UserGroupMember
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| member | [string](#string) | | Member is the principal who belong to this user group.
-
-Format: users/{userUID}. |
-| role | [UserGroupMember.Role](#bytebase-store-UserGroupMember-Role) | | |
-
-
-
-
-
-
-<a name="bytebase-store-UserGroupPayload"></a>
-
-### UserGroupPayload
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| members | [UserGroupMember](#bytebase-store-UserGroupMember) | repeated | |
-
-
-
-
-
-
-
-
-<a name="bytebase-store-UserGroupMember-Role"></a>
-
-### UserGroupMember.Role
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| ROLE_UNSPECIFIED | 0 | |
-| OWNER | 1 | |
-| MEMBER | 2 | |
-
-
-
-
-
-
-
-
-
-
<a name="store_vcs-proto"></a>
<p align="right"><a href="#top">Top</a></p>
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index 796fd4daf3..96090a4f8c 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -615,6 +615,29 @@
</li>
+ <li>
+ <a href="#store%2fgroup.proto">store/group.proto</a>
+ <ul>
+
+ <li>
+ <a href="#bytebase.store.GroupMember"><span class="badge">M</span>GroupMember</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.store.GroupPayload"><span class="badge">M</span>GroupPayload</a>
+ </li>
+
+
+ <li>
+ <a href="#bytebase.store.GroupMember.Role"><span class="badge">E</span>GroupMember.Role</a>
+ </li>
+
+
+
+ </ul>
+ </li>
+
+
<li>
<a href="#store%2fidp.proto">store/idp.proto</a>
<ul>
@@ -1407,29 +1430,6 @@
</li>
- <li>
- <a href="#store%2fuser_group.proto">store/user_group.proto</a>
- <ul>
-
- <li>
- <a href="#bytebase.store.UserGroupMember"><span class="badge">M</span>UserGroupMember</a>
- </li>
-
- <li>
- <a href="#bytebase.store.UserGroupPayload"><span class="badge">M</span>UserGroupPayload</a>
- </li>
-
-
- <li>
- <a href="#bytebase.store.UserGroupMember.Role"><span class="badge">E</span>UserGroupMember.Role</a>
- </li>
-
-
-
- </ul>
- </li>
-
-
<li>
<a href="#store%2fvcs.proto">store/vcs.proto</a>
<ul>
@@ -5369,6 +5369,106 @@ Used for authentication when connecting to the data source. </p></td>
+ <div class="file-heading">
+ <h2 id="store/group.proto">store/group.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.store.GroupMember">GroupMember</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>member</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Member is the principal who belong to this group.
+
+Format: users/{userUID}. </p></td>
+ </tr>
+
+ <tr>
+ <td>role</td>
+ <td><a href="#bytebase.store.GroupMember.Role">GroupMember.Role</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.GroupPayload">GroupPayload</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>members</td>
+ <td><a href="#bytebase.store.GroupMember">GroupMember</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+
+
+ <h3 id="bytebase.store.GroupMember.Role">GroupMember.Role</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>ROLE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>OWNER</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>MEMBER</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+
+
<div class="file-heading">
<h2 id="store/idp.proto">store/idp.proto</h2><a href="#title">Top</a>
</div>
@@ -11375,106 +11475,6 @@ Format: instances/{instance}/databases/{database} </p></td>
- <div class="file-heading">
- <h2 id="store/user_group.proto">store/user_group.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.store.UserGroupMember">UserGroupMember</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>member</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Member is the principal who belong to this user group.
-
-Format: users/{userUID}. </p></td>
- </tr>
-
- <tr>
- <td>role</td>
- <td><a href="#bytebase.store.UserGroupMember.Role">UserGroupMember.Role</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.UserGroupPayload">UserGroupPayload</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>members</td>
- <td><a href="#bytebase.store.UserGroupMember">UserGroupMember</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
-
-
- <h3 id="bytebase.store.UserGroupMember.Role">UserGroupMember.Role</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>ROLE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>OWNER</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>MEMBER</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
-
-
<div class="file-heading">
<h2 id="store/vcs.proto">store/vcs.proto</h2><a href="#title">Top</a>
</div>
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index e990857f58..0127d48d49 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -278,6 +278,20 @@
- [EnvironmentService](#bytebase-v1-EnvironmentService)
+- [v1/group.proto](#v1_group-proto)
+ - [CreateGroupRequest](#bytebase-v1-CreateGroupRequest)
+ - [DeleteGroupRequest](#bytebase-v1-DeleteGroupRequest)
+ - [GetGroupRequest](#bytebase-v1-GetGroupRequest)
+ - [Group](#bytebase-v1-Group)
+ - [GroupMember](#bytebase-v1-GroupMember)
+ - [ListGroupsRequest](#bytebase-v1-ListGroupsRequest)
+ - [ListGroupsResponse](#bytebase-v1-ListGroupsResponse)
+ - [UpdateGroupRequest](#bytebase-v1-UpdateGroupRequest)
+
+ - [GroupMember.Role](#bytebase-v1-GroupMember-Role)
+
+ - [GroupService](#bytebase-v1-GroupService)
+
- [v1/idp_service.proto](#v1_idp_service-proto)
- [CreateIdentityProviderRequest](#bytebase-v1-CreateIdentityProviderRequest)
- [DeleteIdentityProviderRequest](#bytebase-v1-DeleteIdentityProviderRequest)
@@ -652,20 +666,6 @@
- [SQLService](#bytebase-v1-SQLService)
-- [v1/user_group.proto](#v1_user_group-proto)
- - [CreateUserGroupRequest](#bytebase-v1-CreateUserGroupRequest)
- - [DeleteUserGroupRequest](#bytebase-v1-DeleteUserGroupRequest)
- - [GetUserGroupRequest](#bytebase-v1-GetUserGroupRequest)
- - [ListUserGroupsRequest](#bytebase-v1-ListUserGroupsRequest)
- - [ListUserGroupsResponse](#bytebase-v1-ListUserGroupsResponse)
- - [UpdateUserGroupRequest](#bytebase-v1-UpdateUserGroupRequest)
- - [UserGroup](#bytebase-v1-UserGroup)
- - [UserGroupMember](#bytebase-v1-UserGroupMember)
-
- - [UserGroupMember.Role](#bytebase-v1-UserGroupMember-Role)
-
- - [UserGroupService](#bytebase-v1-UserGroupService)
-
- [v1/vcs_connector_service.proto](#v1_vcs_connector_service-proto)
- [CreateVCSConnectorRequest](#bytebase-v1-CreateVCSConnectorRequest)
- [DeleteVCSConnectorRequest](#bytebase-v1-DeleteVCSConnectorRequest)
@@ -4725,6 +4725,184 @@ The environment&#39;s `name` field is used to identify the environment to update
+<a name="v1_group-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## v1/group.proto
+
+
+
+<a name="bytebase-v1-CreateGroupRequest"></a>
+
+### CreateGroupRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| group | [Group](#bytebase-v1-Group) | | The group to create. |
+
+
+
+
+
+
+<a name="bytebase-v1-DeleteGroupRequest"></a>
+
+### DeleteGroupRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the group to delete. Format: groups/{email} |
+
+
+
+
+
+
+<a name="bytebase-v1-GetGroupRequest"></a>
+
+### GetGroupRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the group to retrieve. Format: groups/{email} |
+
+
+
+
+
+
+<a name="bytebase-v1-Group"></a>
+
+### Group
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the group to retrieve. Format: groups/{group}, group is an email. |
+| title | [string](#string) | | |
+| description | [string](#string) | | |
+| creator | [string](#string) | | The name for the creator. Format: users/[email protected] |
+| members | [GroupMember](#bytebase-v1-GroupMember) | repeated | |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the group was created. |
+
+
+
+
+
+
+<a name="bytebase-v1-GroupMember"></a>
+
+### GroupMember
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| member | [string](#string) | | Member is the principal who belong to this group.
+
+Format: users/[email protected] |
+| role | [GroupMember.Role](#bytebase-v1-GroupMember-Role) | | |
+
+
+
+
+
+
+<a name="bytebase-v1-ListGroupsRequest"></a>
+
+### ListGroupsRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| page_size | [int32](#int32) | | The maximum number of groups to return. The service may return fewer than this value. If unspecified, at most 50 groups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListGroups` call. Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListGroups` must match the call that provided the page token. |
+
+
+
+
+
+
+<a name="bytebase-v1-ListGroupsResponse"></a>
+
+### ListGroupsResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| groups | [Group](#bytebase-v1-Group) | repeated | The groups from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+
+
+
+
+
+
+<a name="bytebase-v1-UpdateGroupRequest"></a>
+
+### UpdateGroupRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| group | [Group](#bytebase-v1-Group) | | The group to update.
+
+The group&#39;s `name` field is used to identify the group to update. Format: groups/{email} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+
+
+
+
+
+
+
+
+<a name="bytebase-v1-GroupMember-Role"></a>
+
+### GroupMember.Role
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| ROLE_UNSPECIFIED | 0 | |
+| OWNER | 1 | |
+| MEMBER | 2 | |
+
+
+
+
+
+
+
+<a name="bytebase-v1-GroupService"></a>
+
+### GroupService
+
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetGroup | [GetGroupRequest](#bytebase-v1-GetGroupRequest) | [Group](#bytebase-v1-Group) | |
+| ListGroups | [ListGroupsRequest](#bytebase-v1-ListGroupsRequest) | [ListGroupsResponse](#bytebase-v1-ListGroupsResponse) | |
+| CreateGroup | [CreateGroupRequest](#bytebase-v1-CreateGroupRequest) | [Group](#bytebase-v1-Group) | |
+| UpdateGroup | [UpdateGroupRequest](#bytebase-v1-UpdateGroupRequest) | [Group](#bytebase-v1-Group) | UpdateGroup updates the group. Users with &#34;bb.groups.update&#34; permission on the workspace or the group owner can access this method. |
+| DeleteGroup | [DeleteGroupRequest](#bytebase-v1-DeleteGroupRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
+
+
+
+
+
<a name="v1_idp_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
@@ -10425,184 +10603,6 @@ Type of the SheetPayload.
-<a name="v1_user_group-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-
-## v1/user_group.proto
-
-
-
-<a name="bytebase-v1-CreateUserGroupRequest"></a>
-
-### CreateUserGroupRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| group | [UserGroup](#bytebase-v1-UserGroup) | | The group to create. |
-
-
-
-
-
-
-<a name="bytebase-v1-DeleteUserGroupRequest"></a>
-
-### DeleteUserGroupRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the group to delete. Format: groups/{email} |
-
-
-
-
-
-
-<a name="bytebase-v1-GetUserGroupRequest"></a>
-
-### GetUserGroupRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the group to retrieve. Format: groups/{email} |
-
-
-
-
-
-
-<a name="bytebase-v1-ListUserGroupsRequest"></a>
-
-### ListUserGroupsRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| page_size | [int32](#int32) | | The maximum number of groups to return. The service may return fewer than this value. If unspecified, at most 50 groups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListUsers` call. Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListUsers` must match the call that provided the page token. |
-
-
-
-
-
-
-<a name="bytebase-v1-ListUserGroupsResponse"></a>
-
-### ListUserGroupsResponse
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| groups | [UserGroup](#bytebase-v1-UserGroup) | repeated | The groups from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-
-
-
-
-
-
-<a name="bytebase-v1-UpdateUserGroupRequest"></a>
-
-### UpdateUserGroupRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| group | [UserGroup](#bytebase-v1-UserGroup) | | The group to update.
-
-The group&#39;s `name` field is used to identify the group to update. Format: groups/{email} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-
-
-
-
-
-
-<a name="bytebase-v1-UserGroup"></a>
-
-### UserGroup
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the group to retrieve. Format: groups/{userGroup}, userGroup is an email. |
-| title | [string](#string) | | |
-| description | [string](#string) | | |
-| creator | [string](#string) | | The name for the creator. Format: users/[email protected] |
-| members | [UserGroupMember](#bytebase-v1-UserGroupMember) | repeated | |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the group was created. |
-
-
-
-
-
-
-<a name="bytebase-v1-UserGroupMember"></a>
-
-### UserGroupMember
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| member | [string](#string) | | Member is the principal who belong to this user group.
-
-Format: users/[email protected] |
-| role | [UserGroupMember.Role](#bytebase-v1-UserGroupMember-Role) | | |
-
-
-
-
-
-
-
-
-<a name="bytebase-v1-UserGroupMember-Role"></a>
-
-### UserGroupMember.Role
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| ROLE_UNSPECIFIED | 0 | |
-| OWNER | 1 | |
-| MEMBER | 2 | |
-
-
-
-
-
-
-
-<a name="bytebase-v1-UserGroupService"></a>
-
-### UserGroupService
-
-
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetUserGroup | [GetUserGroupRequest](#bytebase-v1-GetUserGroupRequest) | [UserGroup](#bytebase-v1-UserGroup) | |
-| ListUserGroups | [ListUserGroupsRequest](#bytebase-v1-ListUserGroupsRequest) | [ListUserGroupsResponse](#bytebase-v1-ListUserGroupsResponse) | |
-| CreateUserGroup | [CreateUserGroupRequest](#bytebase-v1-CreateUserGroupRequest) | [UserGroup](#bytebase-v1-UserGroup) | |
-| UpdateUserGroup | [UpdateUserGroupRequest](#bytebase-v1-UpdateUserGroupRequest) | [UserGroup](#bytebase-v1-UserGroup) | UpdateUserGroup updates the user group. Users with &#34;bb.userGroups.update&#34; permission on the workspace or the user group owner can access this method. |
-| DeleteUserGroup | [DeleteUserGroupRequest](#bytebase-v1-DeleteUserGroupRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
-
-
-
-
-
<a name="v1_vcs_connector_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index fc047cd41e..3d9dacb403 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -1227,6 +1227,57 @@
</li>
+ <li>
+ <a href="#v1%2fgroup.proto">v1/group.proto</a>
+ <ul>
+
+ <li>
+ <a href="#bytebase.v1.CreateGroupRequest"><span class="badge">M</span>CreateGroupRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.DeleteGroupRequest"><span class="badge">M</span>DeleteGroupRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.GetGroupRequest"><span class="badge">M</span>GetGroupRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.Group"><span class="badge">M</span>Group</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.GroupMember"><span class="badge">M</span>GroupMember</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.ListGroupsRequest"><span class="badge">M</span>ListGroupsRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.ListGroupsResponse"><span class="badge">M</span>ListGroupsResponse</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.UpdateGroupRequest"><span class="badge">M</span>UpdateGroupRequest</a>
+ </li>
+
+
+ <li>
+ <a href="#bytebase.v1.GroupMember.Role"><span class="badge">E</span>GroupMember.Role</a>
+ </li>
+
+
+
+ <li>
+ <a href="#bytebase.v1.GroupService"><span class="badge">S</span>GroupService</a>
+ </li>
+
+ </ul>
+ </li>
+
+
<li>
<a href="#v1%2fidp_service.proto">v1/idp_service.proto</a>
<ul>
@@ -2666,57 +2717,6 @@
</li>
- <li>
- <a href="#v1%2fuser_group.proto">v1/user_group.proto</a>
- <ul>
-
- <li>
- <a href="#bytebase.v1.CreateUserGroupRequest"><span class="badge">M</span>CreateUserGroupRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.DeleteUserGroupRequest"><span class="badge">M</span>DeleteUserGroupRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.GetUserGroupRequest"><span class="badge">M</span>GetUserGroupRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.ListUserGroupsRequest"><span class="badge">M</span>ListUserGroupsRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.ListUserGroupsResponse"><span class="badge">M</span>ListUserGroupsResponse</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.UpdateUserGroupRequest"><span class="badge">M</span>UpdateUserGroupRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.UserGroup"><span class="badge">M</span>UserGroup</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.UserGroupMember"><span class="badge">M</span>UserGroupMember</a>
- </li>
-
-
- <li>
- <a href="#bytebase.v1.UserGroupMember.Role"><span class="badge">E</span>UserGroupMember.Role</a>
- </li>
-
-
-
- <li>
- <a href="#bytebase.v1.UserGroupService"><span class="badge">S</span>UserGroupService</a>
- </li>
-
- </ul>
- </li>
-
-
<li>
<a href="#v1%2fvcs_connector_service.proto">v1/vcs_connector_service.proto</a>
<ul>
@@ -13737,12 +13737,12 @@ Format: environments/{environment} </p></td>
<div class="file-heading">
- <h2 id="v1/idp_service.proto">v1/idp_service.proto</h2><a href="#title">Top</a>
+ <h2 id="v1/group.proto">v1/group.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.v1.CreateIdentityProviderRequest">CreateIdentityProviderRequest</h3>
+ <h3 id="bytebase.v1.CreateGroupRequest">CreateGroupRequest</h3>
<p></p>
@@ -13753,21 +13753,35 @@ Format: environments/{environment} </p></td>
<tbody>
<tr>
- <td>identity_provider</td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td>group</td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
<td></td>
- <td><p>The identity provider to create. </p></td>
+ <td><p>The group to create. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DeleteGroupRequest">DeleteGroupRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>identity_provider_id</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The ID to use for the identity provider, which will become the final component of
-the identity provider&#39;s resource name.
-
-This value should be 4-63 characters, and valid characters
-are /[a-z][0-9]-/. </p></td>
+ <td><p>The name of the group to delete.
+Format: groups/{email} </p></td>
</tr>
</tbody>
@@ -13777,7 +13791,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</h3>
+ <h3 id="bytebase.v1.GetGroupRequest">GetGroupRequest</h3>
<p></p>
@@ -13791,8 +13805,8 @@ are /[a-z][0-9]-/. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the identity provider to delete.
-Format: idps/{identity_provider} </p></td>
+ <td><p>The name of the group to retrieve.
+Format: groups/{email} </p></td>
</tr>
</tbody>
@@ -13802,8 +13816,8 @@ Format: idps/{identity_provider} </p></td>
- <h3 id="bytebase.v1.FieldMapping">FieldMapping</h3>
- <p>FieldMapping saves the field names from user info API of identity provider.</p><p>As we save all raw json string of user info response data into `principal.idp_user_info`,</p><p>we can extract the relevant data based with `FieldMapping`.</p><p>e.g. For GitHub authenticated user API, it will return `login`, `name` and `email` in response.</p><p>Then the identifier of FieldMapping will be `login`, display_name will be `name`,</p><p>and email will be `email`.</p><p>reference: https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-user</p>
+ <h3 id="bytebase.v1.Group">Group</h3>
+ <p></p>
<table class="field-table">
@@ -13813,31 +13827,47 @@ Format: idps/{identity_provider} </p></td>
<tbody>
<tr>
- <td>identifier</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. </p></td>
+ <td><p>The name of the group to retrieve.
+Format: groups/{group}, group is an email. </p></td>
</tr>
<tr>
- <td>display_name</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>DisplayName is the field name of display name in 3rd-party idp user info. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>email</td>
+ <td>description</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Email is the field name of primary email in 3rd-party idp user info. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>phone</td>
+ <td>creator</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Phone is the field name of primary phone in 3rd-party idp user info. </p></td>
+ <td><p>The name for the creator.
+Format: users/[email protected] </p></td>
+ </tr>
+
+ <tr>
+ <td>members</td>
+ <td><a href="#bytebase.v1.GroupMember">GroupMember</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>The timestamp when the group was created. </p></td>
</tr>
</tbody>
@@ -13847,7 +13877,7 @@ Format: idps/{identity_provider} </p></td>
- <h3 id="bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</h3>
+ <h3 id="bytebase.v1.GroupMember">GroupMember</h3>
<p></p>
@@ -13858,9 +13888,18 @@ Format: idps/{identity_provider} </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>member</td>
<td><a href="#string">string</a></td>
<td></td>
+ <td><p>Member is the principal who belong to this group.
+
+Format: users/[email protected] </p></td>
+ </tr>
+
+ <tr>
+ <td>role</td>
+ <td><a href="#bytebase.v1.GroupMember.Role">GroupMember.Role</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
@@ -13871,7 +13910,7 @@ Format: idps/{identity_provider} </p></td>
- <h3 id="bytebase.v1.IdentityProvider">IdentityProvider</h3>
+ <h3 id="bytebase.v1.ListGroupsRequest">ListGroupsRequest</h3>
<p></p>
@@ -13882,53 +13921,24 @@ Format: idps/{identity_provider} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the identity provider.
-Format: idps/{idp} </p></td>
- </tr>
-
- <tr>
- <td>uid</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The system-assigned, unique identifier for a resource. </p></td>
- </tr>
-
- <tr>
- <td>state</td>
- <td><a href="#bytebase.v1.State">State</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The maximum number of groups to return. The service may return fewer than
+this value.
+If unspecified, at most 50 groups will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>domain</td>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#bytebase.v1.IdentityProviderType">IdentityProviderType</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>config</td>
- <td><a href="#bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>A page token, received from a previous `ListGroups` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListGroups` must match
+the call that provided the page token. </p></td>
</tr>
</tbody>
@@ -13938,7 +13948,7 @@ Format: idps/{idp} </p></td>
- <h3 id="bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</h3>
+ <h3 id="bytebase.v1.ListGroupsResponse">ListGroupsResponse</h3>
<p></p>
@@ -13949,24 +13959,18 @@ Format: idps/{idp} </p></td>
<tbody>
<tr>
- <td>oauth2_config</td>
- <td><a href="#bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>oidc_config</td>
- <td><a href="#bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>groups</td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td>repeated</td>
+ <td><p>The groups from the specified request. </p></td>
</tr>
<tr>
- <td>ldap_config</td>
- <td><a href="#bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</a></td>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -13976,8 +13980,8 @@ Format: idps/{idp} </p></td>
- <h3 id="bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</h3>
- <p>LDAPIdentityProviderConfig is the structure for LDAP identity provider config.</p>
+ <h3 id="bytebase.v1.UpdateGroupRequest">UpdateGroupRequest</h3>
+ <p></p>
<table class="field-table">
@@ -13987,83 +13991,189 @@ Format: idps/{idp} </p></td>
<tbody>
<tr>
- <td>host</td>
- <td><a href="#string">string</a></td>
+ <td>group</td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
<td></td>
- <td><p>Host is the hostname or IP address of the LDAP server, e.g.
-&#34;ldap.example.com&#34;. </p></td>
+ <td><p>The group to update.
+
+The group&#39;s `name` field is used to identify the group to update.
+Format: groups/{email} </p></td>
</tr>
<tr>
- <td>port</td>
- <td><a href="#int32">int32</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p>Port is the port number of the LDAP server, e.g. 389. When not set, the
-default port of the corresponding security protocol will be used, i.e. 389
-for StartTLS and 636 for LDAPS. </p></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
- <tr>
- <td>skip_tls_verify</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>SkipTLSVerify controls whether to skip TLS certificate verification. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+
+
+ <h3 id="bytebase.v1.GroupMember.Role">GroupMember.Role</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>ROLE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>OWNER</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>MEMBER</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GroupService">GroupService</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>GetGroup</td>
+ <td><a href="#bytebase.v1.GetGroupRequest">GetGroupRequest</a></td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ListGroups</td>
+ <td><a href="#bytebase.v1.ListGroupsRequest">ListGroupsRequest</a></td>
+ <td><a href="#bytebase.v1.ListGroupsResponse">ListGroupsResponse</a></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CreateGroup</td>
+ <td><a href="#bytebase.v1.CreateGroupRequest">CreateGroupRequest</a></td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateGroup</td>
+ <td><a href="#bytebase.v1.UpdateGroupRequest">UpdateGroupRequest</a></td>
+ <td><a href="#bytebase.v1.Group">Group</a></td>
+ <td><p>UpdateGroup updates the group.
+Users with &#34;bb.groups.update&#34; permission on the workspace or the group owner can access this method.</p></td>
+ </tr>
+
+ <tr>
+ <td>DeleteGroup</td>
+ <td><a href="#bytebase.v1.DeleteGroupRequest">DeleteGroupRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
+ </thead>
+ <tbody>
+
- <tr>
- <td>bind_dn</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>BindDN is the DN of the user to bind as a service account to perform
-search requests. </p></td>
- </tr>
- <tr>
- <td>bind_password</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>BindPassword is the password of the user to bind as a service account. </p></td>
- </tr>
+ <tr>
+ <td>GetGroup</td>
+ <td>GET</td>
+ <td>/v1/{name=groups/*}</td>
+ <td></td>
+ </tr>
- <tr>
- <td>base_dn</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>BaseDN is the base DN to search for users, e.g. &#34;ou=users,dc=example,dc=com&#34;. </p></td>
- </tr>
+
- <tr>
- <td>user_filter</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>UserFilter is the filter to search for users, e.g. &#34;(uid=%s)&#34;. </p></td>
- </tr>
- <tr>
- <td>security_protocol</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>SecurityProtocol is the security protocol to be used for establishing
-connections with the LDAP server. It should be either StartTLS or LDAPS, and
-cannot be empty. </p></td>
- </tr>
+ <tr>
+ <td>ListGroups</td>
+ <td>GET</td>
+ <td>/v1/groups</td>
+ <td></td>
+ </tr>
- <tr>
- <td>field_mapping</td>
- <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
- <td></td>
- <td><p>FieldMapping is the mapping of the user attributes returned by the LDAP
-server. </p></td>
- </tr>
+
+
+
+ <tr>
+ <td>CreateGroup</td>
+ <td>POST</td>
+ <td>/v1/groups</td>
+ <td>group</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateGroup</td>
+ <td>PATCH</td>
+ <td>/v1/{group.name=groups/*}</td>
+ <td>group</td>
+ </tr>
+
+
+
+ <tr>
+ <td>DeleteGroup</td>
+ <td>DELETE</td>
+ <td>/v1/{name=groups/*}</td>
+ <td></td>
+ </tr>
+
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</h3>
+ <div class="file-heading">
+ <h2 id="v1/idp_service.proto">v1/idp_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.CreateIdentityProviderRequest">CreateIdentityProviderRequest</h3>
<p></p>
@@ -14074,31 +14184,21 @@ server. </p></td>
<tbody>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>identity_provider</td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
<td></td>
- <td><p>The maximum number of identity providers to return. The service may return fewer than
-this value.
-If unspecified, at most 50 will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p>The identity provider to create. </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>identity_provider_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A page token, received from a previous `ListIdentityProviders` call.
-Provide this to retrieve the subsequent page.
+ <td><p>The ID to use for the identity provider, which will become the final component of
+the identity provider&#39;s resource name.
-When paginating, all other parameters provided to `ListIdentityProviders` must match
-the call that provided the page token. </p></td>
- </tr>
-
- <tr>
- <td>show_deleted</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Show deleted identity providers if specified. </p></td>
+This value should be 4-63 characters, and valid characters
+are /[a-z][0-9]-/. </p></td>
</tr>
</tbody>
@@ -14108,7 +14208,7 @@ the call that provided the page token. </p></td>
- <h3 id="bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</h3>
+ <h3 id="bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</h3>
<p></p>
@@ -14119,18 +14219,11 @@ the call that provided the page token. </p></td>
<tbody>
<tr>
- <td>identity_providers</td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
- <td>repeated</td>
- <td><p>The identity providers from the specified request. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p>The name of the identity provider to delete.
+Format: idps/{identity_provider} </p></td>
</tr>
</tbody>
@@ -14140,8 +14233,8 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</h3>
- <p>OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.</p>
+ <h3 id="bytebase.v1.FieldMapping">FieldMapping</h3>
+ <p>FieldMapping saves the field names from user info API of identity provider.</p><p>As we save all raw json string of user info response data into `principal.idp_user_info`,</p><p>we can extract the relevant data based with `FieldMapping`.</p><p>e.g. For GitHub authenticated user API, it will return `login`, `name` and `email` in response.</p><p>Then the identifier of FieldMapping will be `login`, display_name will be `name`,</p><p>and email will be `email`.</p><p>reference: https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-user</p>
<table class="field-table">
@@ -14151,66 +14244,31 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>auth_url</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>token_url</td>
+ <td>identifier</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. </p></td>
</tr>
<tr>
- <td>user_info_url</td>
+ <td>display_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>DisplayName is the field name of display name in 3rd-party idp user info. </p></td>
</tr>
<tr>
- <td>client_id</td>
+ <td>email</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Email is the field name of primary email in 3rd-party idp user info. </p></td>
</tr>
<tr>
- <td>client_secret</td>
+ <td>phone</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>scopes</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>field_mapping</td>
- <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>skip_tls_verify</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>auth_style</td>
- <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>Phone is the field name of primary phone in 3rd-party idp user info. </p></td>
</tr>
</tbody>
@@ -14220,7 +14278,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</h3>
+ <h3 id="bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</h3>
<p></p>
@@ -14231,10 +14289,10 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>code</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Authorize code from website. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -14244,8 +14302,8 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</h3>
- <p>OIDCIdentityProviderConfig is the structure for OIDC identity provider config.</p>
+ <h3 id="bytebase.v1.IdentityProvider">IdentityProvider</h3>
+ <p></p>
<table class="field-table">
@@ -14255,50 +14313,51 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>issuer</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the identity provider.
+Format: idps/{idp} </p></td>
</tr>
<tr>
- <td>client_id</td>
+ <td>uid</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The system-assigned, unique identifier for a resource. </p></td>
</tr>
<tr>
- <td>client_secret</td>
- <td><a href="#string">string</a></td>
+ <td>state</td>
+ <td><a href="#bytebase.v1.State">State</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>scopes</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
+ <td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>field_mapping</td>
- <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
+ <td>domain</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>skip_tls_verify</td>
- <td><a href="#bool">bool</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.IdentityProviderType">IdentityProviderType</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>auth_style</td>
- <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td>
+ <td>config</td>
+ <td><a href="#bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -14310,7 +14369,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</h3>
+ <h3 id="bytebase.v1.IdentityProviderConfig">IdentityProviderConfig</h3>
<p></p>
@@ -14321,15 +14380,22 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>identity_provider</td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td>oauth2_config</td>
+ <td><a href="#bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</a></td>
<td></td>
- <td><p>The identity provider to test connection including uncreated. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>oauth2_context</td>
- <td><a href="#bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</a></td>
+ <td>oidc_config</td>
+ <td><a href="#bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>ldap_config</td>
+ <td><a href="#bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -14341,14 +14407,94 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</h3>
- <p></p>
+ <h3 id="bytebase.v1.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</h3>
+ <p>LDAPIdentityProviderConfig is the structure for LDAP identity provider config.</p>
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>host</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Host is the hostname or IP address of the LDAP server, e.g.
+&#34;ldap.example.com&#34;. </p></td>
+ </tr>
+
+ <tr>
+ <td>port</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>Port is the port number of the LDAP server, e.g. 389. When not set, the
+default port of the corresponding security protocol will be used, i.e. 389
+for StartTLS and 636 for LDAPS. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_tls_verify</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>SkipTLSVerify controls whether to skip TLS certificate verification. </p></td>
+ </tr>
+
+ <tr>
+ <td>bind_dn</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>BindDN is the DN of the user to bind as a service account to perform
+search requests. </p></td>
+ </tr>
+
+ <tr>
+ <td>bind_password</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>BindPassword is the password of the user to bind as a service account. </p></td>
+ </tr>
+
+ <tr>
+ <td>base_dn</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>BaseDN is the base DN to search for users, e.g. &#34;ou=users,dc=example,dc=com&#34;. </p></td>
+ </tr>
+
+ <tr>
+ <td>user_filter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>UserFilter is the filter to search for users, e.g. &#34;(uid=%s)&#34;. </p></td>
+ </tr>
+
+ <tr>
+ <td>security_protocol</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>SecurityProtocol is the security protocol to be used for establishing
+connections with the LDAP server. It should be either StartTLS or LDAPS, and
+cannot be empty. </p></td>
+ </tr>
+
+ <tr>
+ <td>field_mapping</td>
+ <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
+ <td></td>
+ <td><p>FieldMapping is the mapping of the user attributes returned by the LDAP
+server. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
- <h3 id="bytebase.v1.UndeleteIdentityProviderRequest">UndeleteIdentityProviderRequest</h3>
+ <h3 id="bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</h3>
<p></p>
@@ -14359,11 +14505,31 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of identity providers to return. The service may return fewer than
+this value.
+If unspecified, at most 50 will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ </tr>
+
+ <tr>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the deleted identity provider.
-Format: idps/{identity_provider} </p></td>
+ <td><p>A page token, received from a previous `ListIdentityProviders` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListIdentityProviders` must match
+the call that provided the page token. </p></td>
+ </tr>
+
+ <tr>
+ <td>show_deleted</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Show deleted identity providers if specified. </p></td>
</tr>
</tbody>
@@ -14373,7 +14539,7 @@ Format: idps/{identity_provider} </p></td>
- <h3 id="bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</h3>
+ <h3 id="bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</h3>
<p></p>
@@ -14384,20 +14550,18 @@ Format: idps/{identity_provider} </p></td>
<tbody>
<tr>
- <td>identity_provider</td>
+ <td>identity_providers</td>
<td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
- <td></td>
- <td><p>The identity provider to update.
-
-The identity provider&#39;s `name` field is used to identify the identity provider to update.
-Format: idps/{identity_provider} </p></td>
+ <td>repeated</td>
+ <td><p>The identity providers from the specified request. </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -14407,236 +14571,87 @@ Format: idps/{identity_provider} </p></td>
-
-
- <h3 id="bytebase.v1.IdentityProviderType">IdentityProviderType</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>IDENTITY_PROVIDER_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>OAUTH2</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>OIDC</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>LDAP</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>OAUTH2_AUTH_STYLE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>IN_PARAMS</td>
- <td>1</td>
- <td><p>IN_PARAMS sends the &#34;client_id&#34; and &#34;client_secret&#34; in the POST body
-as application/x-www-form-urlencoded parameters.</p></td>
- </tr>
-
- <tr>
- <td>IN_HEADER</td>
- <td>2</td>
- <td><p>IN_HEADER sends the client_id and client_password using HTTP Basic Authorization.
-This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.IdentityProviderService">IdentityProviderService</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>GetIdentityProvider</td>
- <td><a href="#bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</a></td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ListIdentityProviders</td>
- <td><a href="#bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</a></td>
- <td><a href="#bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CreateIdentityProvider</td>
- <td><a href="#bytebase.v1.CreateIdentityProviderRequest">CreateIdentityProviderRequest</a></td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>UpdateIdentityProvider</td>
- <td><a href="#bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</a></td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DeleteIdentityProvider</td>
- <td><a href="#bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>UndeleteIdentityProvider</td>
- <td><a href="#bytebase.v1.UndeleteIdentityProviderRequest">UndeleteIdentityProviderRequest</a></td>
- <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>TestIdentityProvider</td>
- <td><a href="#bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</a></td>
- <td><a href="#bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</a></td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</h3>
+ <p>OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.</p>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
-
-
- <tr>
- <td>GetIdentityProvider</td>
- <td>GET</td>
- <td>/v1/{name=idps/*}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>ListIdentityProviders</td>
- <td>GET</td>
- <td>/v1/idps</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>CreateIdentityProvider</td>
- <td>POST</td>
- <td>/v1/idps</td>
- <td>identity_provider</td>
- </tr>
-
-
-
- <tr>
- <td>UpdateIdentityProvider</td>
- <td>PATCH</td>
- <td>/v1/{identity_provider.name=idps/*}</td>
- <td>identity_provider</td>
- </tr>
-
-
+ <tr>
+ <td>auth_url</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+ <tr>
+ <td>token_url</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>DeleteIdentityProvider</td>
- <td>DELETE</td>
- <td>/v1/{name=idps/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>user_info_url</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
+ <tr>
+ <td>client_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+ <tr>
+ <td>client_secret</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>UndeleteIdentityProvider</td>
- <td>POST</td>
- <td>/v1/{name=idps/*}:undelete</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>scopes</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
-
+ <tr>
+ <td>field_mapping</td>
+ <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+ <tr>
+ <td>skip_tls_verify</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>TestIdentityProvider</td>
- <td>POST</td>
- <td>/v1/idps/*:test</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>auth_style</td>
+ <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
</tbody>
</table>
+
-
-
-
- <div class="file-heading">
- <h2 id="v1/issue_service.proto">v1/issue_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
- <h3 id="bytebase.v1.ApprovalFlow">ApprovalFlow</h3>
+ <h3 id="bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</h3>
<p></p>
@@ -14647,10 +14662,10 @@ This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></t
<tbody>
<tr>
- <td>steps</td>
- <td><a href="#bytebase.v1.ApprovalStep">ApprovalStep</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>code</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Authorize code from website. </p></td>
</tr>
</tbody>
@@ -14660,8 +14675,8 @@ This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></t
- <h3 id="bytebase.v1.ApprovalNode">ApprovalNode</h3>
- <p></p>
+ <h3 id="bytebase.v1.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</h3>
+ <p>OIDCIdentityProviderConfig is the structure for OIDC identity provider config.</p>
<table class="field-table">
@@ -14671,61 +14686,51 @@ This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></t
<tbody>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.ApprovalNode.Type">ApprovalNode.Type</a></td>
+ <td>issuer</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>group_value</td>
- <td><a href="#bytebase.v1.ApprovalNode.GroupValue">ApprovalNode.GroupValue</a></td>
+ <td>client_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>role</td>
+ <td>client_secret</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: roles/{role} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>external_node_id</td>
+ <td>scopes</td>
<td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>field_mapping</td>
+ <td><a href="#bytebase.v1.FieldMapping">FieldMapping</a></td>
<td></td>
<td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ApprovalStep">ApprovalStep</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.ApprovalStep.Type">ApprovalStep.Type</a></td>
+ <td>skip_tls_verify</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>nodes</td>
- <td><a href="#bytebase.v1.ApprovalNode">ApprovalNode</a></td>
- <td>repeated</td>
+ <td>auth_style</td>
+ <td><a href="#bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
@@ -14736,7 +14741,7 @@ This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></t
- <h3 id="bytebase.v1.ApprovalTemplate">ApprovalTemplate</h3>
+ <h3 id="bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</h3>
<p></p>
@@ -14747,34 +14752,19 @@ This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></t
<tbody>
<tr>
- <td>flow</td>
- <td><a href="#bytebase.v1.ApprovalFlow">ApprovalFlow</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
+ <td>identity_provider</td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The identity provider to test connection including uncreated. </p></td>
</tr>
<tr>
- <td>description</td>
- <td><a href="#string">string</a></td>
+ <td>oauth2_context</td>
+ <td><a href="#bytebase.v1.OAuth2IdentityProviderTestRequestContext">OAuth2IdentityProviderTestRequestContext</a></td>
<td></td>
<td><p> </p></td>
</tr>
- <tr>
- <td>creator</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the creator in users/{email} format.
-TODO: we should mark it as OUTPUT_ONLY, but currently the frontend will post the approval setting with creator. </p></td>
- </tr>
-
</tbody>
</table>
@@ -14782,7 +14772,14 @@ TODO: we should mark it as OUTPUT_ONLY, but currently the frontend will post the
- <h3 id="bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</h3>
+ <h3 id="bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.UndeleteIdentityProviderRequest">UndeleteIdentityProviderRequest</h3>
<p></p>
@@ -14796,15 +14793,8 @@ TODO: we should mark it as OUTPUT_ONLY, but currently the frontend will post the
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the issue to add an approver.
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
-
- <tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>The name of the deleted identity provider.
+Format: idps/{identity_provider} </p></td>
</tr>
</tbody>
@@ -14814,7 +14804,7 @@ Format: projects/{project}/issues/{issue} </p></td>
- <h3 id="bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</h3>
+ <h3 id="bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</h3>
<p></p>
@@ -14825,35 +14815,20 @@ Format: projects/{project}/issues/{issue} </p></td>
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The parent resource shared by all issues being updated.
-Format: projects/{project}
-If the operation spans parents, a dash (-) may be accepted as a wildcard.
-We only support updating the status of databases for now. </p></td>
- </tr>
-
- <tr>
- <td>issues</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The list of issues to update.
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
-
- <tr>
- <td>status</td>
- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
+ <td>identity_provider</td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
<td></td>
- <td><p>The new status. </p></td>
+ <td><p>The identity provider to update.
+
+The identity provider&#39;s `name` field is used to identify the identity provider to update.
+Format: idps/{identity_provider} </p></td>
</tr>
<tr>
- <td>reason</td>
- <td><a href="#string">string</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
</tbody>
@@ -14863,35 +14838,249 @@ Format: projects/{project}/issues/{issue} </p></td>
- <h3 id="bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</h3>
+
+
+ <h3 id="bytebase.v1.IdentityProviderType">IdentityProviderType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>IDENTITY_PROVIDER_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>OAUTH2</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>OIDC</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>LDAP</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.OAuth2AuthStyle">OAuth2AuthStyle</h3>
<p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>OAUTH2_AUTH_STYLE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>IN_PARAMS</td>
+ <td>1</td>
+ <td><p>IN_PARAMS sends the &#34;client_id&#34; and &#34;client_secret&#34; in the POST body
+as application/x-www-form-urlencoded parameters.</p></td>
+ </tr>
+
+ <tr>
+ <td>IN_HEADER</td>
+ <td>2</td>
+ <td><p>IN_HEADER sends the client_id and client_password using HTTP Basic Authorization.
+This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
-
+
-
- <h3 id="bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</h3>
+ <h3 id="bytebase.v1.IdentityProviderService">IdentityProviderService</h3>
<p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>GetIdentityProvider</td>
+ <td><a href="#bytebase.v1.GetIdentityProviderRequest">GetIdentityProviderRequest</a></td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ListIdentityProviders</td>
+ <td><a href="#bytebase.v1.ListIdentityProvidersRequest">ListIdentityProvidersRequest</a></td>
+ <td><a href="#bytebase.v1.ListIdentityProvidersResponse">ListIdentityProvidersResponse</a></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CreateIdentityProvider</td>
+ <td><a href="#bytebase.v1.CreateIdentityProviderRequest">CreateIdentityProviderRequest</a></td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateIdentityProvider</td>
+ <td><a href="#bytebase.v1.UpdateIdentityProviderRequest">UpdateIdentityProviderRequest</a></td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DeleteIdentityProvider</td>
+ <td><a href="#bytebase.v1.DeleteIdentityProviderRequest">DeleteIdentityProviderRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>UndeleteIdentityProvider</td>
+ <td><a href="#bytebase.v1.UndeleteIdentityProviderRequest">UndeleteIdentityProviderRequest</a></td>
+ <td><a href="#bytebase.v1.IdentityProvider">IdentityProvider</a></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>TestIdentityProvider</td>
+ <td><a href="#bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</a></td>
+ <td><a href="#bytebase.v1.TestIdentityProviderResponse">TestIdentityProviderResponse</a></td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The issue name
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
+
+ <tr>
+ <td>GetIdentityProvider</td>
+ <td>GET</td>
+ <td>/v1/{name=idps/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ListIdentityProviders</td>
+ <td>GET</td>
+ <td>/v1/idps</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>CreateIdentityProvider</td>
+ <td>POST</td>
+ <td>/v1/idps</td>
+ <td>identity_provider</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateIdentityProvider</td>
+ <td>PATCH</td>
+ <td>/v1/{identity_provider.name=idps/*}</td>
+ <td>identity_provider</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>DeleteIdentityProvider</td>
+ <td>DELETE</td>
+ <td>/v1/{name=idps/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UndeleteIdentityProvider</td>
+ <td>POST</td>
+ <td>/v1/{name=idps/*}:undelete</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>TestIdentityProvider</td>
+ <td>POST</td>
+ <td>/v1/idps/*:test</td>
+ <td>*</td>
+ </tr>
+
+
+ </tbody>
+ </table>
+
+
+
+
+ <div class="file-heading">
+ <h2 id="v1/issue_service.proto">v1/issue_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.ApprovalFlow">ApprovalFlow</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>issue_comment</td>
- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
- <td></td>
+ <td>steps</td>
+ <td><a href="#bytebase.v1.ApprovalStep">ApprovalStep</a></td>
+ <td>repeated</td>
<td><p> </p></td>
</tr>
@@ -14902,7 +15091,7 @@ Format: projects/{project}/issues/{issue} </p></td>
- <h3 id="bytebase.v1.CreateIssueRequest">CreateIssueRequest</h3>
+ <h3 id="bytebase.v1.ApprovalNode">ApprovalNode</h3>
<p></p>
@@ -14913,18 +15102,31 @@ Format: projects/{project}/issues/{issue} </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.ApprovalNode.Type">ApprovalNode.Type</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>group_value</td>
+ <td><a href="#bytebase.v1.ApprovalNode.GroupValue">ApprovalNode.GroupValue</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>role</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent, which owns this collection of issues.
-Format: projects/{project} </p></td>
+ <td><p>Format: roles/{role} </p></td>
</tr>
<tr>
- <td>issue</td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td>external_node_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The issue to create. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -14934,7 +15136,7 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.GetIssueRequest">GetIssueRequest</h3>
+ <h3 id="bytebase.v1.ApprovalStep">ApprovalStep</h3>
<p></p>
@@ -14945,17 +15147,16 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.ApprovalStep.Type">ApprovalStep.Type</a></td>
<td></td>
- <td><p>The name of the issue to retrieve.
-Format: projects/{project}/issues/{issue} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>force</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
+ <td>nodes</td>
+ <td><a href="#bytebase.v1.ApprovalNode">ApprovalNode</a></td>
+ <td>repeated</td>
<td><p> </p></td>
</tr>
@@ -14966,7 +15167,7 @@ Format: projects/{project}/issues/{issue} </p></td>
- <h3 id="bytebase.v1.GrantRequest">GrantRequest</h3>
+ <h3 id="bytebase.v1.ApprovalTemplate">ApprovalTemplate</h3>
<p></p>
@@ -14977,33 +15178,32 @@ Format: projects/{project}/issues/{issue} </p></td>
<tbody>
<tr>
- <td>role</td>
- <td><a href="#string">string</a></td>
+ <td>flow</td>
+ <td><a href="#bytebase.v1.ApprovalFlow">ApprovalFlow</a></td>
<td></td>
- <td><p>The requested role.
-Format: roles/EXPORTER. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>user</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The user to be granted.
-Format: users/{email}. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>condition</td>
- <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>expiration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>creator</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the creator in users/{email} format.
+TODO: we should mark it as OUTPUT_ONLY, but currently the frontend will post the approval setting with creator. </p></td>
</tr>
</tbody>
@@ -15013,7 +15213,7 @@ Format: users/{email}. </p></td>
- <h3 id="bytebase.v1.Issue">Issue</h3>
+ <h3 id="bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</h3>
<p></p>
@@ -15027,68 +15227,299 @@ Format: users/{email}. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the issue.
+ <td><p>The name of the issue to add an approver.
Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>uid</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The system-assigned, unique identifier for a resource. </p></td>
- </tr>
-
- <tr>
- <td>title</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>description</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The parent resource shared by all issues being updated.
+Format: projects/{project}
+If the operation spans parents, a dash (-) may be accepted as a wildcard.
+We only support updating the status of databases for now. </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.Issue.Type">Issue.Type</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>issues</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The list of issues to update.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
<td>status</td>
<td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The new status. </p></td>
</tr>
<tr>
- <td>assignee</td>
+ <td>reason</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: users/[email protected] </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>assignee_attention</td>
- <td><a href="#bool">bool</a></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The issue name
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>approvers</td>
- <td><a href="#bytebase.v1.Issue.Approver">Issue.Approver</a></td>
- <td>repeated</td>
+ <td>issue_comment</td>
+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
- <tr>
- <td>approval_templates</td>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.CreateIssueRequest">CreateIssueRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The parent, which owns this collection of issues.
+Format: projects/{project} </p></td>
+ </tr>
+
+ <tr>
+ <td>issue</td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td></td>
+ <td><p>The issue to create. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GetIssueRequest">GetIssueRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the issue to retrieve.
+Format: projects/{project}/issues/{issue} </p></td>
+ </tr>
+
+ <tr>
+ <td>force</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GrantRequest">GrantRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>role</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The requested role.
+Format: roles/EXPORTER. </p></td>
+ </tr>
+
+ <tr>
+ <td>user</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The user to be granted.
+Format: users/{email}. </p></td>
+ </tr>
+
+ <tr>
+ <td>condition</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>expiration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Issue">Issue</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the issue.
+Format: projects/{project}/issues/{issue} </p></td>
+ </tr>
+
+ <tr>
+ <td>uid</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The system-assigned, unique identifier for a resource. </p></td>
+ </tr>
+
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.Issue.Type">Issue.Type</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>status</td>
+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>assignee</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: users/[email protected] </p></td>
+ </tr>
+
+ <tr>
+ <td>assignee_attention</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>approvers</td>
+ <td><a href="#bytebase.v1.Issue.Approver">Issue.Approver</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>approval_templates</td>
<td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td>
<td>repeated</td>
<td><p> </p></td>
@@ -27944,740 +28375,14 @@ Or it can be used to query a specific read-only data source. </p></td>
<td><p>true</p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.QueryResponse">QueryResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>results</td>
- <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
- <td>repeated</td>
- <td><p>The query results. </p></td>
- </tr>
-
- <tr>
- <td>advices</td>
- <td><a href="#bytebase.v1.Advice">Advice</a></td>
- <td>repeated</td>
- <td><p>The query advices. </p></td>
- </tr>
-
- <tr>
- <td>allow_export</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The query is allowed to be exported or not. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.QueryResult">QueryResult</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>column_names</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>Column names of the query result. </p></td>
- </tr>
-
- <tr>
- <td>column_type_names</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>Column types of the query result.
-The types come from the Golang SQL driver. </p></td>
- </tr>
-
- <tr>
- <td>rows</td>
- <td><a href="#bytebase.v1.QueryRow">QueryRow</a></td>
- <td>repeated</td>
- <td><p>Rows of the query result. </p></td>
- </tr>
-
- <tr>
- <td>masked</td>
- <td><a href="#bool">bool</a></td>
- <td>repeated</td>
- <td><p>Columns are masked or not. </p></td>
- </tr>
-
- <tr>
- <td>sensitive</td>
- <td><a href="#bool">bool</a></td>
- <td>repeated</td>
- <td><p>Columns are sensitive or not. </p></td>
- </tr>
-
- <tr>
- <td>error</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The error message if the query failed. </p></td>
- </tr>
-
- <tr>
- <td>latency</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
- <td></td>
- <td><p>The time it takes to execute the query. </p></td>
- </tr>
-
- <tr>
- <td>statement</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The query statement for the result. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.QueryRow">QueryRow</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>values</td>
- <td><a href="#bytebase.v1.RowValue">RowValue</a></td>
- <td>repeated</td>
- <td><p>Row values of the query result. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.RowValue">RowValue</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>null_value</td>
- <td><a href="#google.protobuf.NullValue">google.protobuf.NullValue</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>bool_value</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>bytes_value</td>
- <td><a href="#bytes">bytes</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>double_value</td>
- <td><a href="#double">double</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>float_value</td>
- <td><a href="#float">float</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>int32_value</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>int64_value</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>string_value</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>uint32_value</td>
- <td><a href="#uint32">uint32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>uint64_value</td>
- <td><a href="#uint64">uint64</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>value_value</td>
- <td><a href="#google.protobuf.Value">google.protobuf.Value</a></td>
- <td></td>
- <td><p>value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>Not used. The maximum number of histories to return.
-The service may return fewer than this value.
-If unspecified, at most 100 history entries will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
- </tr>
-
- <tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Not used. A page token, received from a previous `ListQueryHistory` call.
-Provide this to retrieve the subsequent page. </p></td>
- </tr>
-
- <tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>filter is the filter to apply on the search query history,
-follow the [ebnf](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) syntax.
-Support filter by:
-- database, for example:
- database = &#34;instances/{instance}/databases/{database}&#34;
-- instance, for example:
- instance = &#34;instance/{instance}&#34;
-- type, for example:
- type = &#34;QUERY&#34; </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>query_histories</td>
- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
- <td>repeated</td>
- <td><p>The list of history. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A token to retrieve next page of history.
-Pass this value in the page_token field in the subsequent call to `ListQueryHistory` method
-to retrieve the next page of history. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.StringifyMetadataRequest">StringifyMetadataRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>metadata</td>
- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>engine</td>
- <td><a href="#bytebase.v1.Engine">Engine</a></td>
- <td></td>
- <td><p>The database engine of the schema string. </p></td>
- </tr>
-
- <tr>
- <td>classification_from_config</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If false, we will build the raw common by classification in database config. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.StringifyMetadataResponse">StringifyMetadataResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
-
-
- <h3 id="bytebase.v1.Advice.Status">Advice.Status</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified.</p></td>
- </tr>
-
- <tr>
- <td>SUCCESS</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>WARNING</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ERROR</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.CheckRequest.ChangeType">CheckRequest.ChangeType</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>CHANGE_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DDL</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DDL_GHOST</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DML</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.QueryHistory.Type">QueryHistory.Type</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>QUERY</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>EXPORT</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SQLService">SQLService</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>Query</td>
- <td><a href="#bytebase.v1.QueryRequest">QueryRequest</a></td>
- <td><a href="#bytebase.v1.QueryResponse">QueryResponse</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>Execute</td>
- <td><a href="#bytebase.v1.ExecuteRequest">ExecuteRequest</a></td>
- <td><a href="#bytebase.v1.ExecuteResponse">ExecuteResponse</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>AdminExecute</td>
- <td><a href="#bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</a> stream</td>
- <td><a href="#bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</a> stream</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SearchQueryHistories</td>
- <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>
- <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>
- <td><p>SearchQueryHistories searches query histories for the caller.</p></td>
- </tr>
-
- <tr>
- <td>Export</td>
- <td><a href="#bytebase.v1.ExportRequest">ExportRequest</a></td>
- <td><a href="#bytebase.v1.ExportResponse">ExportResponse</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DifferPreview</td>
- <td><a href="#bytebase.v1.DifferPreviewRequest">DifferPreviewRequest</a></td>
- <td><a href="#bytebase.v1.DifferPreviewResponse">DifferPreviewResponse</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>Check</td>
- <td><a href="#bytebase.v1.CheckRequest">CheckRequest</a></td>
- <td><a href="#bytebase.v1.CheckResponse">CheckResponse</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ParseMyBatisMapper</td>
- <td><a href="#bytebase.v1.ParseMyBatisMapperRequest">ParseMyBatisMapperRequest</a></td>
- <td><a href="#bytebase.v1.ParseMyBatisMapperResponse">ParseMyBatisMapperResponse</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>Pretty</td>
- <td><a href="#bytebase.v1.PrettyRequest">PrettyRequest</a></td>
- <td><a href="#bytebase.v1.PrettyResponse">PrettyResponse</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>StringifyMetadata</td>
- <td><a href="#bytebase.v1.StringifyMetadataRequest">StringifyMetadataRequest</a></td>
- <td><a href="#bytebase.v1.StringifyMetadataResponse">StringifyMetadataResponse</a></td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>GenerateRestoreSQL</td>
- <td><a href="#bytebase.v1.GenerateRestoreSQLRequest">GenerateRestoreSQLRequest</a></td>
- <td><a href="#bytebase.v1.GenerateRestoreSQLResponse">GenerateRestoreSQLResponse</a></td>
- <td><p>Deprecated.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
- <thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
- </thead>
- <tbody>
-
-
-
- <tr>
- <td>Query</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:query</td>
- <td>*</td>
- </tr>
-
- <tr>
- <td>Query</td>
- <td>POST</td>
- <td>/v1/{name=instances/*}:query</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>Execute</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:execute</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>AdminExecute</td>
- <td>GET</td>
- <td>/v1:adminExecute</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>SearchQueryHistories</td>
- <td>GET</td>
- <td>/v1/queryHistories:search</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>Export</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:export</td>
- <td>*</td>
- </tr>
-
- <tr>
- <td>Export</td>
- <td>POST</td>
- <td>/v1/{name=instances/*}:export</td>
- <td>*</td>
- </tr>
-
- <tr>
- <td>Export</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/issues/*}:export</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>DifferPreview</td>
- <td>POST</td>
- <td>/v1/sql/differPreview</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>Check</td>
- <td>POST</td>
- <td>/v1/sql/check</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>ParseMyBatisMapper</td>
- <td>POST</td>
- <td>/v1/sql/parseMyBatisMapper</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>Pretty</td>
- <td>POST</td>
- <td>/v1/sql/pretty</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>StringifyMetadata</td>
- <td>POST</td>
- <td>/v1/schemaDesign:stringifyMetadata</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>GenerateRestoreSQL</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:generateRestoreSQL</td>
- <td>*</td>
- </tr>
-
-
- </tbody>
- </table>
-
-
-
-
- <div class="file-heading">
- <h2 id="v1/user_group.proto">v1/user_group.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+ </tbody>
+ </table>
+
+
+
- <h3 id="bytebase.v1.CreateUserGroupRequest">CreateUserGroupRequest</h3>
+ <h3 id="bytebase.v1.QueryResponse">QueryResponse</h3>
<p></p>
@@ -28688,10 +28393,24 @@ to retrieve the next page of history. </p></td>
<tbody>
<tr>
- <td>group</td>
- <td><a href="#bytebase.v1.UserGroup">UserGroup</a></td>
+ <td>results</td>
+ <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
+ <td>repeated</td>
+ <td><p>The query results. </p></td>
+ </tr>
+
+ <tr>
+ <td>advices</td>
+ <td><a href="#bytebase.v1.Advice">Advice</a></td>
+ <td>repeated</td>
+ <td><p>The query advices. </p></td>
+ </tr>
+
+ <tr>
+ <td>allow_export</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The group to create. </p></td>
+ <td><p>The query is allowed to be exported or not. </p></td>
</tr>
</tbody>
@@ -28701,7 +28420,7 @@ to retrieve the next page of history. </p></td>
- <h3 id="bytebase.v1.DeleteUserGroupRequest">DeleteUserGroupRequest</h3>
+ <h3 id="bytebase.v1.QueryResult">QueryResult</h3>
<p></p>
@@ -28712,11 +28431,60 @@ to retrieve the next page of history. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>column_names</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>Column names of the query result. </p></td>
+ </tr>
+
+ <tr>
+ <td>column_type_names</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>Column types of the query result.
+The types come from the Golang SQL driver. </p></td>
+ </tr>
+
+ <tr>
+ <td>rows</td>
+ <td><a href="#bytebase.v1.QueryRow">QueryRow</a></td>
+ <td>repeated</td>
+ <td><p>Rows of the query result. </p></td>
+ </tr>
+
+ <tr>
+ <td>masked</td>
+ <td><a href="#bool">bool</a></td>
+ <td>repeated</td>
+ <td><p>Columns are masked or not. </p></td>
+ </tr>
+
+ <tr>
+ <td>sensitive</td>
+ <td><a href="#bool">bool</a></td>
+ <td>repeated</td>
+ <td><p>Columns are sensitive or not. </p></td>
+ </tr>
+
+ <tr>
+ <td>error</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the group to delete.
-Format: groups/{email} </p></td>
+ <td><p>The error message if the query failed. </p></td>
+ </tr>
+
+ <tr>
+ <td>latency</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>The time it takes to execute the query. </p></td>
+ </tr>
+
+ <tr>
+ <td>statement</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The query statement for the result. </p></td>
</tr>
</tbody>
@@ -28726,7 +28494,7 @@ Format: groups/{email} </p></td>
- <h3 id="bytebase.v1.GetUserGroupRequest">GetUserGroupRequest</h3>
+ <h3 id="bytebase.v1.QueryRow">QueryRow</h3>
<p></p>
@@ -28737,11 +28505,10 @@ Format: groups/{email} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the group to retrieve.
-Format: groups/{email} </p></td>
+ <td>values</td>
+ <td><a href="#bytebase.v1.RowValue">RowValue</a></td>
+ <td>repeated</td>
+ <td><p>Row values of the query result. </p></td>
</tr>
</tbody>
@@ -28751,7 +28518,7 @@ Format: groups/{email} </p></td>
- <h3 id="bytebase.v1.ListUserGroupsRequest">ListUserGroupsRequest</h3>
+ <h3 id="bytebase.v1.RowValue">RowValue</h3>
<p></p>
@@ -28762,24 +28529,80 @@ Format: groups/{email} </p></td>
<tbody>
<tr>
- <td>page_size</td>
+ <td>null_value</td>
+ <td><a href="#google.protobuf.NullValue">google.protobuf.NullValue</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>bool_value</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>bytes_value</td>
+ <td><a href="#bytes">bytes</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>double_value</td>
+ <td><a href="#double">double</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>float_value</td>
+ <td><a href="#float">float</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>int32_value</td>
<td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The maximum number of groups to return. The service may return fewer than
-this value.
-If unspecified, at most 50 groups will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>int64_value</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>string_value</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A page token, received from a previous `ListUsers` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListUsers` must match
-the call that provided the page token. </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>uint32_value</td>
+ <td><a href="#uint32">uint32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>uint64_value</td>
+ <td><a href="#uint64">uint64</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>value_value</td>
+ <td><a href="#google.protobuf.Value">google.protobuf.Value</a></td>
+ <td></td>
+ <td><p>value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. </p></td>
</tr>
</tbody>
@@ -28789,7 +28612,7 @@ the call that provided the page token. </p></td>
- <h3 id="bytebase.v1.ListUserGroupsResponse">ListUserGroupsResponse</h3>
+ <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3>
<p></p>
@@ -28800,18 +28623,36 @@ the call that provided the page token. </p></td>
<tbody>
<tr>
- <td>groups</td>
- <td><a href="#bytebase.v1.UserGroup">UserGroup</a></td>
- <td>repeated</td>
- <td><p>The groups from the specified request. </p></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>Not used. The maximum number of histories to return.
+The service may return fewer than this value.
+If unspecified, at most 100 history entries will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>next_page_token</td>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p>Not used. A page token, received from a previous `ListQueryHistory` call.
+Provide this to retrieve the subsequent page. </p></td>
+ </tr>
+
+ <tr>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>filter is the filter to apply on the search query history,
+follow the [ebnf](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) syntax.
+Support filter by:
+- database, for example:
+ database = &#34;instances/{instance}/databases/{database}&#34;
+- instance, for example:
+ instance = &#34;instance/{instance}&#34;
+- type, for example:
+ type = &#34;QUERY&#34; </p></td>
</tr>
</tbody>
@@ -28821,7 +28662,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.UpdateUserGroupRequest">UpdateUserGroupRequest</h3>
+ <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</h3>
<p></p>
@@ -28832,20 +28673,19 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>group</td>
- <td><a href="#bytebase.v1.UserGroup">UserGroup</a></td>
- <td></td>
- <td><p>The group to update.
-
-The group&#39;s `name` field is used to identify the group to update.
-Format: groups/{email} </p></td>
+ <td>query_histories</td>
+ <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
+ <td>repeated</td>
+ <td><p>The list of history. </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p>A token to retrieve next page of history.
+Pass this value in the page_token field in the subsequent call to `ListQueryHistory` method
+to retrieve the next page of history. </p></td>
</tr>
</tbody>
@@ -28855,7 +28695,7 @@ Format: groups/{email} </p></td>
- <h3 id="bytebase.v1.UserGroup">UserGroup</h3>
+ <h3 id="bytebase.v1.StringifyMetadataRequest">StringifyMetadataRequest</h3>
<p></p>
@@ -28866,47 +28706,24 @@ Format: groups/{email} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the group to retrieve.
-Format: groups/{userGroup}, userGroup is an email. </p></td>
- </tr>
-
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>description</td>
- <td><a href="#string">string</a></td>
+ <td>metadata</td>
+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>creator</td>
- <td><a href="#string">string</a></td>
+ <td>engine</td>
+ <td><a href="#bytebase.v1.Engine">Engine</a></td>
<td></td>
- <td><p>The name for the creator.
-Format: users/[email protected] </p></td>
- </tr>
-
- <tr>
- <td>members</td>
- <td><a href="#bytebase.v1.UserGroupMember">UserGroupMember</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td><p>The database engine of the schema string. </p></td>
</tr>
<tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>classification_from_config</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The timestamp when the group was created. </p></td>
+ <td><p>If false, we will build the raw common by classification in database config. </p></td>
</tr>
</tbody>
@@ -28916,7 +28733,7 @@ Format: users/[email protected] </p></td>
- <h3 id="bytebase.v1.UserGroupMember">UserGroupMember</h3>
+ <h3 id="bytebase.v1.StringifyMetadataResponse">StringifyMetadataResponse</h3>
<p></p>
@@ -28927,18 +28744,9 @@ Format: users/[email protected] </p></td>
<tbody>
<tr>
- <td>member</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Member is the principal who belong to this user group.
-
-Format: users/[email protected] </p></td>
- </tr>
-
- <tr>
- <td>role</td>
- <td><a href="#bytebase.v1.UserGroupMember.Role">UserGroupMember.Role</a></td>
- <td></td>
<td><p> </p></td>
</tr>
@@ -28951,7 +28759,7 @@ Format: users/[email protected] </p></td>
- <h3 id="bytebase.v1.UserGroupMember.Role">UserGroupMember.Role</h3>
+ <h3 id="bytebase.v1.Advice.Status">Advice.Status</h3>
<p></p>
<table class="enum-table">
<thead>
@@ -28960,19 +28768,89 @@ Format: users/[email protected] </p></td>
<tbody>
<tr>
- <td>ROLE_UNSPECIFIED</td>
+ <td>STATUS_UNSPECIFIED</td>
<td>0</td>
+ <td><p>Unspecified.</p></td>
+ </tr>
+
+ <tr>
+ <td>SUCCESS</td>
+ <td>1</td>
<td><p></p></td>
</tr>
<tr>
- <td>OWNER</td>
+ <td>WARNING</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ERROR</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.CheckRequest.ChangeType">CheckRequest.ChangeType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>CHANGE_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DDL</td>
<td>1</td>
<td><p></p></td>
</tr>
<tr>
- <td>MEMBER</td>
+ <td>DDL_GHOST</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DML</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.QueryHistory.Type">QueryHistory.Type</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>QUERY</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>EXPORT</td>
<td>2</td>
<td><p></p></td>
</tr>
@@ -28984,7 +28862,7 @@ Format: users/[email protected] </p></td>
- <h3 id="bytebase.v1.UserGroupService">UserGroupService</h3>
+ <h3 id="bytebase.v1.SQLService">SQLService</h3>
<p></p>
<table class="enum-table">
<thead>
@@ -28993,41 +28871,82 @@ Format: users/[email protected] </p></td>
<tbody>
<tr>
- <td>GetUserGroup</td>
- <td><a href="#bytebase.v1.GetUserGroupRequest">GetUserGroupRequest</a></td>
- <td><a href="#bytebase.v1.UserGroup">UserGroup</a></td>
+ <td>Query</td>
+ <td><a href="#bytebase.v1.QueryRequest">QueryRequest</a></td>
+ <td><a href="#bytebase.v1.QueryResponse">QueryResponse</a></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>Execute</td>
+ <td><a href="#bytebase.v1.ExecuteRequest">ExecuteRequest</a></td>
+ <td><a href="#bytebase.v1.ExecuteResponse">ExecuteResponse</a></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>AdminExecute</td>
+ <td><a href="#bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</a> stream</td>
+ <td><a href="#bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</a> stream</td>
<td><p></p></td>
</tr>
<tr>
- <td>ListUserGroups</td>
- <td><a href="#bytebase.v1.ListUserGroupsRequest">ListUserGroupsRequest</a></td>
- <td><a href="#bytebase.v1.ListUserGroupsResponse">ListUserGroupsResponse</a></td>
+ <td>SearchQueryHistories</td>
+ <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>
+ <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>
+ <td><p>SearchQueryHistories searches query histories for the caller.</p></td>
+ </tr>
+
+ <tr>
+ <td>Export</td>
+ <td><a href="#bytebase.v1.ExportRequest">ExportRequest</a></td>
+ <td><a href="#bytebase.v1.ExportResponse">ExportResponse</a></td>
<td><p></p></td>
</tr>
<tr>
- <td>CreateUserGroup</td>
- <td><a href="#bytebase.v1.CreateUserGroupRequest">CreateUserGroupRequest</a></td>
- <td><a href="#bytebase.v1.UserGroup">UserGroup</a></td>
+ <td>DifferPreview</td>
+ <td><a href="#bytebase.v1.DifferPreviewRequest">DifferPreviewRequest</a></td>
+ <td><a href="#bytebase.v1.DifferPreviewResponse">DifferPreviewResponse</a></td>
<td><p></p></td>
</tr>
<tr>
- <td>UpdateUserGroup</td>
- <td><a href="#bytebase.v1.UpdateUserGroupRequest">UpdateUserGroupRequest</a></td>
- <td><a href="#bytebase.v1.UserGroup">UserGroup</a></td>
- <td><p>UpdateUserGroup updates the user group.
-Users with &#34;bb.userGroups.update&#34; permission on the workspace or the user group owner can access this method.</p></td>
+ <td>Check</td>
+ <td><a href="#bytebase.v1.CheckRequest">CheckRequest</a></td>
+ <td><a href="#bytebase.v1.CheckResponse">CheckResponse</a></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>DeleteUserGroup</td>
- <td><a href="#bytebase.v1.DeleteUserGroupRequest">DeleteUserGroupRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td>ParseMyBatisMapper</td>
+ <td><a href="#bytebase.v1.ParseMyBatisMapperRequest">ParseMyBatisMapperRequest</a></td>
+ <td><a href="#bytebase.v1.ParseMyBatisMapperResponse">ParseMyBatisMapperResponse</a></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>Pretty</td>
+ <td><a href="#bytebase.v1.PrettyRequest">PrettyRequest</a></td>
+ <td><a href="#bytebase.v1.PrettyResponse">PrettyResponse</a></td>
<td><p></p></td>
</tr>
+ <tr>
+ <td>StringifyMetadata</td>
+ <td><a href="#bytebase.v1.StringifyMetadataRequest">StringifyMetadataRequest</a></td>
+ <td><a href="#bytebase.v1.StringifyMetadataResponse">StringifyMetadataResponse</a></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>GenerateRestoreSQL</td>
+ <td><a href="#bytebase.v1.GenerateRestoreSQLRequest">GenerateRestoreSQLRequest</a></td>
+ <td><a href="#bytebase.v1.GenerateRestoreSQLResponse">GenerateRestoreSQLResponse</a></td>
+ <td><p>Deprecated.</p></td>
+ </tr>
+
</tbody>
</table>
@@ -29049,9 +28968,36 @@ Users with &#34;bb.userGroups.update&#34; permission on the workspace or the use
<tr>
- <td>GetUserGroup</td>
+ <td>Query</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*}:query</td>
+ <td>*</td>
+ </tr>
+
+ <tr>
+ <td>Query</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*}:query</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>Execute</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*}:execute</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>AdminExecute</td>
<td>GET</td>
- <td>/v1/{name=groups/*}</td>
+ <td>/v1:adminExecute</td>
<td></td>
</tr>
@@ -29059,9 +29005,9 @@ Users with &#34;bb.userGroups.update&#34; permission on the workspace or the use
<tr>
- <td>ListUserGroups</td>
+ <td>SearchQueryHistories</td>
<td>GET</td>
- <td>/v1/groups</td>
+ <td>/v1/queryHistories:search</td>
<td></td>
</tr>
@@ -29069,30 +29015,84 @@ Users with &#34;bb.userGroups.update&#34; permission on the workspace or the use
<tr>
- <td>CreateUserGroup</td>
+ <td>Export</td>
<td>POST</td>
- <td>/v1/groups</td>
- <td>group</td>
+ <td>/v1/{name=instances/*/databases/*}:export</td>
+ <td>*</td>
+ </tr>
+
+ <tr>
+ <td>Export</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*}:export</td>
+ <td>*</td>
+ </tr>
+
+ <tr>
+ <td>Export</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/issues/*}:export</td>
+ <td>*</td>
</tr>
<tr>
- <td>UpdateUserGroup</td>
- <td>PATCH</td>
- <td>/v1/{group.name=groups/*}</td>
- <td>group</td>
+ <td>DifferPreview</td>
+ <td>POST</td>
+ <td>/v1/sql/differPreview</td>
+ <td>*</td>
</tr>
<tr>
- <td>DeleteUserGroup</td>
- <td>DELETE</td>
- <td>/v1/{name=groups/*}</td>
- <td></td>
+ <td>Check</td>
+ <td>POST</td>
+ <td>/v1/sql/check</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ParseMyBatisMapper</td>
+ <td>POST</td>
+ <td>/v1/sql/parseMyBatisMapper</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>Pretty</td>
+ <td>POST</td>
+ <td>/v1/sql/pretty</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>StringifyMetadata</td>
+ <td>POST</td>
+ <td>/v1/schemaDesign:stringifyMetadata</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>GenerateRestoreSQL</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*}:generateRestoreSQL</td>
+ <td>*</td>
</tr>
diff --git a/proto/generated-go/store/group.pb.go b/proto/generated-go/store/group.pb.go
new file mode 100644
index 0000000000..49d78537ca
--- /dev/null
+++ b/proto/generated-go/store/group.pb.go
@@ -0,0 +1,279 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.34.2
+// protoc (unknown)
+// source: store/group.proto
+
+package store
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type GroupMember_Role int32
+
+const (
+ GroupMember_ROLE_UNSPECIFIED GroupMember_Role = 0
+ GroupMember_OWNER GroupMember_Role = 1
+ GroupMember_MEMBER GroupMember_Role = 2
+)
+
+// Enum value maps for GroupMember_Role.
+var (
+ GroupMember_Role_name = map[int32]string{
+ 0: "ROLE_UNSPECIFIED",
+ 1: "OWNER",
+ 2: "MEMBER",
+ }
+ GroupMember_Role_value = map[string]int32{
+ "ROLE_UNSPECIFIED": 0,
+ "OWNER": 1,
+ "MEMBER": 2,
+ }
+)
+
+func (x GroupMember_Role) Enum() *GroupMember_Role {
+ p := new(GroupMember_Role)
+ *p = x
+ return p
+}
+
+func (x GroupMember_Role) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (GroupMember_Role) Descriptor() protoreflect.EnumDescriptor {
+ return file_store_group_proto_enumTypes[0].Descriptor()
+}
+
+func (GroupMember_Role) Type() protoreflect.EnumType {
+ return &file_store_group_proto_enumTypes[0]
+}
+
+func (x GroupMember_Role) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use GroupMember_Role.Descriptor instead.
+func (GroupMember_Role) EnumDescriptor() ([]byte, []int) {
+ return file_store_group_proto_rawDescGZIP(), []int{0, 0}
+}
+
+type GroupMember struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Member is the principal who belong to this group.
+ //
+ // Format: users/{userUID}.
+ Member string `protobuf:"bytes,1,opt,name=member,proto3" json:"member,omitempty"`
+ Role GroupMember_Role `protobuf:"varint,2,opt,name=role,proto3,enum=bytebase.store.GroupMember_Role" json:"role,omitempty"`
+}
+
+func (x *GroupMember) Reset() {
+ *x = GroupMember{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_store_group_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GroupMember) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GroupMember) ProtoMessage() {}
+
+func (x *GroupMember) ProtoReflect() protoreflect.Message {
+ mi := &file_store_group_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GroupMember.ProtoReflect.Descriptor instead.
+func (*GroupMember) Descriptor() ([]byte, []int) {
+ return file_store_group_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *GroupMember) GetMember() string {
+ if x != nil {
+ return x.Member
+ }
+ return ""
+}
+
+func (x *GroupMember) GetRole() GroupMember_Role {
+ if x != nil {
+ return x.Role
+ }
+ return GroupMember_ROLE_UNSPECIFIED
+}
+
+type GroupPayload struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Members []*GroupMember `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"`
+}
+
+func (x *GroupPayload) Reset() {
+ *x = GroupPayload{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_store_group_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GroupPayload) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GroupPayload) ProtoMessage() {}
+
+func (x *GroupPayload) ProtoReflect() protoreflect.Message {
+ mi := &file_store_group_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GroupPayload.ProtoReflect.Descriptor instead.
+func (*GroupPayload) Descriptor() ([]byte, []int) {
+ return file_store_group_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *GroupPayload) GetMembers() []*GroupMember {
+ if x != nil {
+ return x.Members
+ }
+ return nil
+}
+
+var File_store_group_proto protoreflect.FileDescriptor
+
+var file_store_group_proto_rawDesc = []byte{
+ 0x0a, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,
+ 0x6f, 0x72, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d,
+ 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x04, 0x72,
+ 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70,
+ 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c,
+ 0x65, 0x22, 0x33, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x4f, 0x4c,
+ 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,
+ 0x09, 0x0a, 0x05, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45,
+ 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x45, 0x0a, 0x0c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50,
+ 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x35, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72,
+ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65,
+ 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x42, 0x14, 0x5a,
+ 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74,
+ 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_store_group_proto_rawDescOnce sync.Once
+ file_store_group_proto_rawDescData = file_store_group_proto_rawDesc
+)
+
+func file_store_group_proto_rawDescGZIP() []byte {
+ file_store_group_proto_rawDescOnce.Do(func() {
+ file_store_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_store_group_proto_rawDescData)
+ })
+ return file_store_group_proto_rawDescData
+}
+
+var file_store_group_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_store_group_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_store_group_proto_goTypes = []any{
+ (GroupMember_Role)(0), // 0: bytebase.store.GroupMember.Role
+ (*GroupMember)(nil), // 1: bytebase.store.GroupMember
+ (*GroupPayload)(nil), // 2: bytebase.store.GroupPayload
+}
+var file_store_group_proto_depIdxs = []int32{
+ 0, // 0: bytebase.store.GroupMember.role:type_name -> bytebase.store.GroupMember.Role
+ 1, // 1: bytebase.store.GroupPayload.members:type_name -> bytebase.store.GroupMember
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_store_group_proto_init() }
+func file_store_group_proto_init() {
+ if File_store_group_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_store_group_proto_msgTypes[0].Exporter = func(v any, i int) any {
+ switch v := v.(*GroupMember); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_store_group_proto_msgTypes[1].Exporter = func(v any, i int) any {
+ switch v := v.(*GroupPayload); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_store_group_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_store_group_proto_goTypes,
+ DependencyIndexes: file_store_group_proto_depIdxs,
+ EnumInfos: file_store_group_proto_enumTypes,
+ MessageInfos: file_store_group_proto_msgTypes,
+ }.Build()
+ File_store_group_proto = out.File
+ file_store_group_proto_rawDesc = nil
+ file_store_group_proto_goTypes = nil
+ file_store_group_proto_depIdxs = nil
+}
diff --git a/proto/generated-go/store/user_group.pb.go b/proto/generated-go/store/user_group.pb.go
deleted file mode 100644
index a500160132..0000000000
--- a/proto/generated-go/store/user_group.pb.go
+++ /dev/null
@@ -1,280 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// protoc-gen-go v1.34.2
-// protoc (unknown)
-// source: store/user_group.proto
-
-package store
-
-import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- reflect "reflect"
- sync "sync"
-)
-
-const (
- // Verify that this generated code is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
- // Verify that runtime/protoimpl is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
-)
-
-type UserGroupMember_Role int32
-
-const (
- UserGroupMember_ROLE_UNSPECIFIED UserGroupMember_Role = 0
- UserGroupMember_OWNER UserGroupMember_Role = 1
- UserGroupMember_MEMBER UserGroupMember_Role = 2
-)
-
-// Enum value maps for UserGroupMember_Role.
-var (
- UserGroupMember_Role_name = map[int32]string{
- 0: "ROLE_UNSPECIFIED",
- 1: "OWNER",
- 2: "MEMBER",
- }
- UserGroupMember_Role_value = map[string]int32{
- "ROLE_UNSPECIFIED": 0,
- "OWNER": 1,
- "MEMBER": 2,
- }
-)
-
-func (x UserGroupMember_Role) Enum() *UserGroupMember_Role {
- p := new(UserGroupMember_Role)
- *p = x
- return p
-}
-
-func (x UserGroupMember_Role) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (UserGroupMember_Role) Descriptor() protoreflect.EnumDescriptor {
- return file_store_user_group_proto_enumTypes[0].Descriptor()
-}
-
-func (UserGroupMember_Role) Type() protoreflect.EnumType {
- return &file_store_user_group_proto_enumTypes[0]
-}
-
-func (x UserGroupMember_Role) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use UserGroupMember_Role.Descriptor instead.
-func (UserGroupMember_Role) EnumDescriptor() ([]byte, []int) {
- return file_store_user_group_proto_rawDescGZIP(), []int{0, 0}
-}
-
-type UserGroupMember struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Member is the principal who belong to this user group.
- //
- // Format: users/{userUID}.
- Member string `protobuf:"bytes,1,opt,name=member,proto3" json:"member,omitempty"`
- Role UserGroupMember_Role `protobuf:"varint,2,opt,name=role,proto3,enum=bytebase.store.UserGroupMember_Role" json:"role,omitempty"`
-}
-
-func (x *UserGroupMember) Reset() {
- *x = UserGroupMember{}
- if protoimpl.UnsafeEnabled {
- mi := &file_store_user_group_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *UserGroupMember) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*UserGroupMember) ProtoMessage() {}
-
-func (x *UserGroupMember) ProtoReflect() protoreflect.Message {
- mi := &file_store_user_group_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use UserGroupMember.ProtoReflect.Descriptor instead.
-func (*UserGroupMember) Descriptor() ([]byte, []int) {
- return file_store_user_group_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *UserGroupMember) GetMember() string {
- if x != nil {
- return x.Member
- }
- return ""
-}
-
-func (x *UserGroupMember) GetRole() UserGroupMember_Role {
- if x != nil {
- return x.Role
- }
- return UserGroupMember_ROLE_UNSPECIFIED
-}
-
-type UserGroupPayload struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Members []*UserGroupMember `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"`
-}
-
-func (x *UserGroupPayload) Reset() {
- *x = UserGroupPayload{}
- if protoimpl.UnsafeEnabled {
- mi := &file_store_user_group_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *UserGroupPayload) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*UserGroupPayload) ProtoMessage() {}
-
-func (x *UserGroupPayload) ProtoReflect() protoreflect.Message {
- mi := &file_store_user_group_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use UserGroupPayload.ProtoReflect.Descriptor instead.
-func (*UserGroupPayload) Descriptor() ([]byte, []int) {
- return file_store_user_group_proto_rawDescGZIP(), []int{1}
-}
-
-func (x *UserGroupPayload) GetMembers() []*UserGroupMember {
- if x != nil {
- return x.Members
- }
- return nil
-}
-
-var File_store_user_group_proto protoreflect.FileDescriptor
-
-var file_store_user_group_proto_rawDesc = []byte{
- 0x0a, 0x16, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x67, 0x72, 0x6f,
- 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0f, 0x55, 0x73, 0x65,
- 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06,
- 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65,
- 0x6d, 0x62, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,
- 0x6f, 0x72, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d,
- 0x62, 0x65, 0x72, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x33,
- 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55,
- 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
- 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d, 0x42, 0x45,
- 0x52, 0x10, 0x02, 0x22, 0x4d, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70,
- 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65,
- 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72,
- 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65,
- 0x72, 0x73, 0x42, 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d,
- 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
-
-var (
- file_store_user_group_proto_rawDescOnce sync.Once
- file_store_user_group_proto_rawDescData = file_store_user_group_proto_rawDesc
-)
-
-func file_store_user_group_proto_rawDescGZIP() []byte {
- file_store_user_group_proto_rawDescOnce.Do(func() {
- file_store_user_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_store_user_group_proto_rawDescData)
- })
- return file_store_user_group_proto_rawDescData
-}
-
-var file_store_user_group_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_store_user_group_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
-var file_store_user_group_proto_goTypes = []any{
- (UserGroupMember_Role)(0), // 0: bytebase.store.UserGroupMember.Role
- (*UserGroupMember)(nil), // 1: bytebase.store.UserGroupMember
- (*UserGroupPayload)(nil), // 2: bytebase.store.UserGroupPayload
-}
-var file_store_user_group_proto_depIdxs = []int32{
- 0, // 0: bytebase.store.UserGroupMember.role:type_name -> bytebase.store.UserGroupMember.Role
- 1, // 1: bytebase.store.UserGroupPayload.members:type_name -> bytebase.store.UserGroupMember
- 2, // [2:2] is the sub-list for method output_type
- 2, // [2:2] is the sub-list for method input_type
- 2, // [2:2] is the sub-list for extension type_name
- 2, // [2:2] is the sub-list for extension extendee
- 0, // [0:2] is the sub-list for field type_name
-}
-
-func init() { file_store_user_group_proto_init() }
-func file_store_user_group_proto_init() {
- if File_store_user_group_proto != nil {
- return
- }
- if !protoimpl.UnsafeEnabled {
- file_store_user_group_proto_msgTypes[0].Exporter = func(v any, i int) any {
- switch v := v.(*UserGroupMember); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_store_user_group_proto_msgTypes[1].Exporter = func(v any, i int) any {
- switch v := v.(*UserGroupPayload); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_store_user_group_proto_rawDesc,
- NumEnums: 1,
- NumMessages: 2,
- NumExtensions: 0,
- NumServices: 0,
- },
- GoTypes: file_store_user_group_proto_goTypes,
- DependencyIndexes: file_store_user_group_proto_depIdxs,
- EnumInfos: file_store_user_group_proto_enumTypes,
- MessageInfos: file_store_user_group_proto_msgTypes,
- }.Build()
- File_store_user_group_proto = out.File
- file_store_user_group_proto_rawDesc = nil
- file_store_user_group_proto_goTypes = nil
- file_store_user_group_proto_depIdxs = nil
-}
diff --git a/proto/generated-go/v1/group.pb.go b/proto/generated-go/v1/group.pb.go
new file mode 100644
index 0000000000..f5ddb69754
--- /dev/null
+++ b/proto/generated-go/v1/group.pb.go
@@ -0,0 +1,855 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.34.2
+// protoc (unknown)
+// source: v1/group.proto
+
+package v1
+
+import (
+ _ "google.golang.org/genproto/googleapis/api/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
+ fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type GroupMember_Role int32
+
+const (
+ GroupMember_ROLE_UNSPECIFIED GroupMember_Role = 0
+ GroupMember_OWNER GroupMember_Role = 1
+ GroupMember_MEMBER GroupMember_Role = 2
+)
+
+// Enum value maps for GroupMember_Role.
+var (
+ GroupMember_Role_name = map[int32]string{
+ 0: "ROLE_UNSPECIFIED",
+ 1: "OWNER",
+ 2: "MEMBER",
+ }
+ GroupMember_Role_value = map[string]int32{
+ "ROLE_UNSPECIFIED": 0,
+ "OWNER": 1,
+ "MEMBER": 2,
+ }
+)
+
+func (x GroupMember_Role) Enum() *GroupMember_Role {
+ p := new(GroupMember_Role)
+ *p = x
+ return p
+}
+
+func (x GroupMember_Role) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (GroupMember_Role) Descriptor() protoreflect.EnumDescriptor {
+ return file_v1_group_proto_enumTypes[0].Descriptor()
+}
+
+func (GroupMember_Role) Type() protoreflect.EnumType {
+ return &file_v1_group_proto_enumTypes[0]
+}
+
+func (x GroupMember_Role) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use GroupMember_Role.Descriptor instead.
+func (GroupMember_Role) EnumDescriptor() ([]byte, []int) {
+ return file_v1_group_proto_rawDescGZIP(), []int{6, 0}
+}
+
+type GetGroupRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the group to retrieve.
+ // Format: groups/{email}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *GetGroupRequest) Reset() {
+ *x = GetGroupRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_group_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetGroupRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetGroupRequest) ProtoMessage() {}
+
+func (x *GetGroupRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_group_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetGroupRequest.ProtoReflect.Descriptor instead.
+func (*GetGroupRequest) Descriptor() ([]byte, []int) {
+ return file_v1_group_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *GetGroupRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type ListGroupsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The maximum number of groups to return. The service may return fewer than
+ // this value.
+ // If unspecified, at most 50 groups will be returned.
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
+ PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // A page token, received from a previous `ListGroups` call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to `ListGroups` must match
+ // the call that provided the page token.
+ PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+}
+
+func (x *ListGroupsRequest) Reset() {
+ *x = ListGroupsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_group_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListGroupsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListGroupsRequest) ProtoMessage() {}
+
+func (x *ListGroupsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_group_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListGroupsRequest.ProtoReflect.Descriptor instead.
+func (*ListGroupsRequest) Descriptor() ([]byte, []int) {
+ return file_v1_group_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ListGroupsRequest) GetPageSize() int32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListGroupsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+type ListGroupsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The groups from the specified request.
+ Groups []*Group `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"`
+ // A token, which can be sent as `page_token` to retrieve the next page.
+ // If this field is omitted, there are no subsequent pages.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListGroupsResponse) Reset() {
+ *x = ListGroupsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_group_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListGroupsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListGroupsResponse) ProtoMessage() {}
+
+func (x *ListGroupsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_group_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListGroupsResponse.ProtoReflect.Descriptor instead.
+func (*ListGroupsResponse) Descriptor() ([]byte, []int) {
+ return file_v1_group_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ListGroupsResponse) GetGroups() []*Group {
+ if x != nil {
+ return x.Groups
+ }
+ return nil
+}
+
+func (x *ListGroupsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type CreateGroupRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The group to create.
+ Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
+}
+
+func (x *CreateGroupRequest) Reset() {
+ *x = CreateGroupRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_group_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateGroupRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateGroupRequest) ProtoMessage() {}
+
+func (x *CreateGroupRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_group_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CreateGroupRequest.ProtoReflect.Descriptor instead.
+func (*CreateGroupRequest) Descriptor() ([]byte, []int) {
+ return file_v1_group_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *CreateGroupRequest) GetGroup() *Group {
+ if x != nil {
+ return x.Group
+ }
+ return nil
+}
+
+type UpdateGroupRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The group to update.
+ //
+ // The group's `name` field is used to identify the group to update.
+ // Format: groups/{email}
+ Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
+ // The list of fields to update.
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+}
+
+func (x *UpdateGroupRequest) Reset() {
+ *x = UpdateGroupRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_group_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateGroupRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateGroupRequest) ProtoMessage() {}
+
+func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_group_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateGroupRequest.ProtoReflect.Descriptor instead.
+func (*UpdateGroupRequest) Descriptor() ([]byte, []int) {
+ return file_v1_group_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *UpdateGroupRequest) GetGroup() *Group {
+ if x != nil {
+ return x.Group
+ }
+ return nil
+}
+
+func (x *UpdateGroupRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
+ if x != nil {
+ return x.UpdateMask
+ }
+ return nil
+}
+
+type DeleteGroupRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the group to delete.
+ // Format: groups/{email}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *DeleteGroupRequest) Reset() {
+ *x = DeleteGroupRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_group_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteGroupRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteGroupRequest) ProtoMessage() {}
+
+func (x *DeleteGroupRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_group_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeleteGroupRequest.ProtoReflect.Descriptor instead.
+func (*DeleteGroupRequest) Descriptor() ([]byte, []int) {
+ return file_v1_group_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *DeleteGroupRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type GroupMember struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Member is the principal who belong to this group.
+ //
+ // Format: users/[email protected]
+ Member string `protobuf:"bytes,1,opt,name=member,proto3" json:"member,omitempty"`
+ Role GroupMember_Role `protobuf:"varint,2,opt,name=role,proto3,enum=bytebase.v1.GroupMember_Role" json:"role,omitempty"`
+}
+
+func (x *GroupMember) Reset() {
+ *x = GroupMember{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_group_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GroupMember) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GroupMember) ProtoMessage() {}
+
+func (x *GroupMember) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_group_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GroupMember.ProtoReflect.Descriptor instead.
+func (*GroupMember) Descriptor() ([]byte, []int) {
+ return file_v1_group_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *GroupMember) GetMember() string {
+ if x != nil {
+ return x.Member
+ }
+ return ""
+}
+
+func (x *GroupMember) GetRole() GroupMember_Role {
+ if x != nil {
+ return x.Role
+ }
+ return GroupMember_ROLE_UNSPECIFIED
+}
+
+type Group struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the group to retrieve.
+ // Format: groups/{group}, group is an email.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
+ Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
+ // The name for the creator.
+ // Format: users/[email protected]
+ Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"`
+ Members []*GroupMember `protobuf:"bytes,5,rep,name=members,proto3" json:"members,omitempty"`
+ // The timestamp when the group was created.
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+}
+
+func (x *Group) Reset() {
+ *x = Group{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_group_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Group) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Group) ProtoMessage() {}
+
+func (x *Group) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_group_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Group.ProtoReflect.Descriptor instead.
+func (*Group) Descriptor() ([]byte, []int) {
+ return file_v1_group_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *Group) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Group) GetTitle() string {
+ if x != nil {
+ return x.Title
+ }
+ return ""
+}
+
+func (x *Group) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *Group) GetCreator() string {
+ if x != nil {
+ return x.Creator
+ }
+ return ""
+}
+
+func (x *Group) GetMembers() []*GroupMember {
+ if x != nil {
+ return x.Members
+ }
+ return nil
+}
+
+func (x *Group) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+var File_v1_group_proto protoreflect.FileDescriptor
+
+var file_v1_group_proto_rawDesc = []byte{
+ 0x0a, 0x0e, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x12, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69,
+ 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70,
+ 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66,
+ 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x13, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x42, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75,
+ 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1b, 0xe2, 0x41, 0x01, 0x02, 0xfa, 0x41, 0x14, 0x0a,
+ 0x12, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72,
+ 0x6f, 0x75, 0x70, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4f, 0x0a, 0x11, 0x4c, 0x69, 0x73,
+ 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b,
+ 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70,
+ 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x68, 0x0a, 0x12, 0x4c, 0x69,
+ 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x2a, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47,
+ 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x26, 0x0a, 0x0f,
+ 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x44, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72,
+ 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x67, 0x72,
+ 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x04, 0xe2,
+ 0x41, 0x01, 0x02, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x81, 0x01, 0x0a, 0x12, 0x55,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47,
+ 0x72, 0x6f, 0x75, 0x70, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75,
+ 0x70, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61,
+ 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x45,
+ 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x1b, 0xe2, 0x41, 0x01, 0x02, 0xfa, 0x41, 0x14, 0x0a, 0x12, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d,
+ 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x31, 0x0a,
+ 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d,
+ 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65,
+ 0x22, 0x33, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x4f, 0x4c, 0x45,
+ 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09,
+ 0x0a, 0x05, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d,
+ 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x99, 0x02, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12,
+ 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2,
+ 0x41, 0x01, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74,
+ 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12,
+ 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x12, 0x1e, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f,
+ 0x72, 0x12, 0x32, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65,
+ 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f,
+ 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
+ 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x0a, 0x63, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x27, 0xea, 0x41, 0x24, 0x0a, 0x12, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x6f, 0x75,
+ 0x70, 0x12, 0x0e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70,
+ 0x7d, 0x32, 0xa0, 0x05, 0x0a, 0x0c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x12, 0x75, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1c,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,
+ 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70,
+ 0x22, 0x37, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xea, 0x30, 0x0d, 0x62, 0x62, 0x2e,
+ 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x67, 0x65, 0x74, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7a, 0x0a, 0x0a, 0x4c, 0x69, 0x73,
+ 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0xda, 0x41, 0x00, 0x8a, 0xea, 0x30,
+ 0x0e, 0x62, 0x62, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x90,
+ 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x67,
+ 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x7d, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47,
+ 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x39, 0xda, 0x41, 0x05, 0x67, 0x72,
+ 0x6f, 0x75, 0x70, 0x8a, 0xea, 0x30, 0x10, 0x62, 0x62, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73,
+ 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x13, 0x3a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72,
+ 0x6f, 0x75, 0x70, 0x73, 0x12, 0x98, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47,
+ 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x54, 0xda, 0x41, 0x11, 0x67, 0x72,
+ 0x6f, 0x75, 0x70, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a,
+ 0xea, 0x30, 0x10, 0x62, 0x62, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x75, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x05, 0x67,
+ 0x72, 0x6f, 0x75, 0x70, 0x32, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70,
+ 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x12,
+ 0x82, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12,
+ 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65,
+ 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x8a, 0xea, 0x30, 0x10, 0x62, 0x62, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x64,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x2a,
+ 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x67, 0x72, 0x6f, 0x75, 0x70,
+ 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
+ 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_v1_group_proto_rawDescOnce sync.Once
+ file_v1_group_proto_rawDescData = file_v1_group_proto_rawDesc
+)
+
+func file_v1_group_proto_rawDescGZIP() []byte {
+ file_v1_group_proto_rawDescOnce.Do(func() {
+ file_v1_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_group_proto_rawDescData)
+ })
+ return file_v1_group_proto_rawDescData
+}
+
+var file_v1_group_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_v1_group_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
+var file_v1_group_proto_goTypes = []any{
+ (GroupMember_Role)(0), // 0: bytebase.v1.GroupMember.Role
+ (*GetGroupRequest)(nil), // 1: bytebase.v1.GetGroupRequest
+ (*ListGroupsRequest)(nil), // 2: bytebase.v1.ListGroupsRequest
+ (*ListGroupsResponse)(nil), // 3: bytebase.v1.ListGroupsResponse
+ (*CreateGroupRequest)(nil), // 4: bytebase.v1.CreateGroupRequest
+ (*UpdateGroupRequest)(nil), // 5: bytebase.v1.UpdateGroupRequest
+ (*DeleteGroupRequest)(nil), // 6: bytebase.v1.DeleteGroupRequest
+ (*GroupMember)(nil), // 7: bytebase.v1.GroupMember
+ (*Group)(nil), // 8: bytebase.v1.Group
+ (*fieldmaskpb.FieldMask)(nil), // 9: google.protobuf.FieldMask
+ (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp
+ (*emptypb.Empty)(nil), // 11: google.protobuf.Empty
+}
+var file_v1_group_proto_depIdxs = []int32{
+ 8, // 0: bytebase.v1.ListGroupsResponse.groups:type_name -> bytebase.v1.Group
+ 8, // 1: bytebase.v1.CreateGroupRequest.group:type_name -> bytebase.v1.Group
+ 8, // 2: bytebase.v1.UpdateGroupRequest.group:type_name -> bytebase.v1.Group
+ 9, // 3: bytebase.v1.UpdateGroupRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 0, // 4: bytebase.v1.GroupMember.role:type_name -> bytebase.v1.GroupMember.Role
+ 7, // 5: bytebase.v1.Group.members:type_name -> bytebase.v1.GroupMember
+ 10, // 6: bytebase.v1.Group.create_time:type_name -> google.protobuf.Timestamp
+ 1, // 7: bytebase.v1.GroupService.GetGroup:input_type -> bytebase.v1.GetGroupRequest
+ 2, // 8: bytebase.v1.GroupService.ListGroups:input_type -> bytebase.v1.ListGroupsRequest
+ 4, // 9: bytebase.v1.GroupService.CreateGroup:input_type -> bytebase.v1.CreateGroupRequest
+ 5, // 10: bytebase.v1.GroupService.UpdateGroup:input_type -> bytebase.v1.UpdateGroupRequest
+ 6, // 11: bytebase.v1.GroupService.DeleteGroup:input_type -> bytebase.v1.DeleteGroupRequest
+ 8, // 12: bytebase.v1.GroupService.GetGroup:output_type -> bytebase.v1.Group
+ 3, // 13: bytebase.v1.GroupService.ListGroups:output_type -> bytebase.v1.ListGroupsResponse
+ 8, // 14: bytebase.v1.GroupService.CreateGroup:output_type -> bytebase.v1.Group
+ 8, // 15: bytebase.v1.GroupService.UpdateGroup:output_type -> bytebase.v1.Group
+ 11, // 16: bytebase.v1.GroupService.DeleteGroup:output_type -> google.protobuf.Empty
+ 12, // [12:17] is the sub-list for method output_type
+ 7, // [7:12] is the sub-list for method input_type
+ 7, // [7:7] is the sub-list for extension type_name
+ 7, // [7:7] is the sub-list for extension extendee
+ 0, // [0:7] is the sub-list for field type_name
+}
+
+func init() { file_v1_group_proto_init() }
+func file_v1_group_proto_init() {
+ if File_v1_group_proto != nil {
+ return
+ }
+ file_v1_annotation_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_v1_group_proto_msgTypes[0].Exporter = func(v any, i int) any {
+ switch v := v.(*GetGroupRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_group_proto_msgTypes[1].Exporter = func(v any, i int) any {
+ switch v := v.(*ListGroupsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_group_proto_msgTypes[2].Exporter = func(v any, i int) any {
+ switch v := v.(*ListGroupsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_group_proto_msgTypes[3].Exporter = func(v any, i int) any {
+ switch v := v.(*CreateGroupRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_group_proto_msgTypes[4].Exporter = func(v any, i int) any {
+ switch v := v.(*UpdateGroupRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_group_proto_msgTypes[5].Exporter = func(v any, i int) any {
+ switch v := v.(*DeleteGroupRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_group_proto_msgTypes[6].Exporter = func(v any, i int) any {
+ switch v := v.(*GroupMember); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_group_proto_msgTypes[7].Exporter = func(v any, i int) any {
+ switch v := v.(*Group); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_v1_group_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 8,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_v1_group_proto_goTypes,
+ DependencyIndexes: file_v1_group_proto_depIdxs,
+ EnumInfos: file_v1_group_proto_enumTypes,
+ MessageInfos: file_v1_group_proto_msgTypes,
+ }.Build()
+ File_v1_group_proto = out.File
+ file_v1_group_proto_rawDesc = nil
+ file_v1_group_proto_goTypes = nil
+ file_v1_group_proto_depIdxs = nil
+}
diff --git a/proto/generated-go/v1/user_group.pb.gw.go b/proto/generated-go/v1/group.pb.gw.go
similarity index 55%
rename from proto/generated-go/v1/user_group.pb.gw.go
rename to proto/generated-go/v1/group.pb.gw.go
index 0d330b2412..95eded6602 100644
--- a/proto/generated-go/v1/user_group.pb.gw.go
+++ b/proto/generated-go/v1/group.pb.gw.go
@@ -1,5 +1,5 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
-// source: v1/user_group.proto
+// source: v1/group.proto
/*
Package v1 is a reverse proxy.
@@ -31,8 +31,8 @@ var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
-func request_UserGroupService_GetUserGroup_0(ctx context.Context, marshaler runtime.Marshaler, client UserGroupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetUserGroupRequest
+func request_GroupService_GetGroup_0(ctx context.Context, marshaler runtime.Marshaler, client GroupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetGroupRequest
var metadata runtime.ServerMetadata
var (
@@ -52,13 +52,13 @@ func request_UserGroupService_GetUserGroup_0(ctx context.Context, marshaler runt
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
- msg, err := client.GetUserGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.GetGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_UserGroupService_GetUserGroup_0(ctx context.Context, marshaler runtime.Marshaler, server UserGroupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetUserGroupRequest
+func local_request_GroupService_GetGroup_0(ctx context.Context, marshaler runtime.Marshaler, server GroupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetGroupRequest
var metadata runtime.ServerMetadata
var (
@@ -78,79 +78,79 @@ func local_request_UserGroupService_GetUserGroup_0(ctx context.Context, marshale
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
- msg, err := server.GetUserGroup(ctx, &protoReq)
+ msg, err := server.GetGroup(ctx, &protoReq)
return msg, metadata, err
}
var (
- filter_UserGroupService_ListUserGroups_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
+ filter_GroupService_ListGroups_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
-func request_UserGroupService_ListUserGroups_0(ctx context.Context, marshaler runtime.Marshaler, client UserGroupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq ListUserGroupsRequest
+func request_GroupService_ListGroups_0(ctx context.Context, marshaler runtime.Marshaler, client GroupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListGroupsRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserGroupService_ListUserGroups_0); err != nil {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GroupService_ListGroups_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := client.ListUserGroups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.ListGroups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_UserGroupService_ListUserGroups_0(ctx context.Context, marshaler runtime.Marshaler, server UserGroupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq ListUserGroupsRequest
+func local_request_GroupService_ListGroups_0(ctx context.Context, marshaler runtime.Marshaler, server GroupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListGroupsRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserGroupService_ListUserGroups_0); err != nil {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GroupService_ListGroups_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := server.ListUserGroups(ctx, &protoReq)
+ msg, err := server.ListGroups(ctx, &protoReq)
return msg, metadata, err
}
-func request_UserGroupService_CreateUserGroup_0(ctx context.Context, marshaler runtime.Marshaler, client UserGroupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq CreateUserGroupRequest
+func request_GroupService_CreateGroup_0(ctx context.Context, marshaler runtime.Marshaler, client GroupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreateGroupRequest
var metadata runtime.ServerMetadata
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Group); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := client.CreateUserGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.CreateGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_UserGroupService_CreateUserGroup_0(ctx context.Context, marshaler runtime.Marshaler, server UserGroupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq CreateUserGroupRequest
+func local_request_GroupService_CreateGroup_0(ctx context.Context, marshaler runtime.Marshaler, server GroupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreateGroupRequest
var metadata runtime.ServerMetadata
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Group); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := server.CreateUserGroup(ctx, &protoReq)
+ msg, err := server.CreateGroup(ctx, &protoReq)
return msg, metadata, err
}
var (
- filter_UserGroupService_UpdateUserGroup_0 = &utilities.DoubleArray{Encoding: map[string]int{"group": 0, "name": 1}, Base: []int{1, 2, 1, 0, 0}, Check: []int{0, 1, 2, 3, 2}}
+ filter_GroupService_UpdateGroup_0 = &utilities.DoubleArray{Encoding: map[string]int{"group": 0, "name": 1}, Base: []int{1, 2, 1, 0, 0}, Check: []int{0, 1, 2, 3, 2}}
)
-func request_UserGroupService_UpdateUserGroup_0(ctx context.Context, marshaler runtime.Marshaler, client UserGroupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq UpdateUserGroupRequest
+func request_GroupService_UpdateGroup_0(ctx context.Context, marshaler runtime.Marshaler, client GroupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq UpdateGroupRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -188,17 +188,17 @@ func request_UserGroupService_UpdateUserGroup_0(ctx context.Context, marshaler r
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserGroupService_UpdateUserGroup_0); err != nil {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GroupService_UpdateGroup_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := client.UpdateUserGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.UpdateGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_UserGroupService_UpdateUserGroup_0(ctx context.Context, marshaler runtime.Marshaler, server UserGroupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq UpdateUserGroupRequest
+func local_request_GroupService_UpdateGroup_0(ctx context.Context, marshaler runtime.Marshaler, server GroupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq UpdateGroupRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -236,17 +236,17 @@ func local_request_UserGroupService_UpdateUserGroup_0(ctx context.Context, marsh
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserGroupService_UpdateUserGroup_0); err != nil {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GroupService_UpdateGroup_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := server.UpdateUserGroup(ctx, &protoReq)
+ msg, err := server.UpdateGroup(ctx, &protoReq)
return msg, metadata, err
}
-func request_UserGroupService_DeleteUserGroup_0(ctx context.Context, marshaler runtime.Marshaler, client UserGroupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq DeleteUserGroupRequest
+func request_GroupService_DeleteGroup_0(ctx context.Context, marshaler runtime.Marshaler, client GroupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq DeleteGroupRequest
var metadata runtime.ServerMetadata
var (
@@ -266,13 +266,13 @@ func request_UserGroupService_DeleteUserGroup_0(ctx context.Context, marshaler r
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
- msg, err := client.DeleteUserGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.DeleteGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_UserGroupService_DeleteUserGroup_0(ctx context.Context, marshaler runtime.Marshaler, server UserGroupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq DeleteUserGroupRequest
+func local_request_GroupService_DeleteGroup_0(ctx context.Context, marshaler runtime.Marshaler, server GroupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq DeleteGroupRequest
var metadata runtime.ServerMetadata
var (
@@ -292,19 +292,19 @@ func local_request_UserGroupService_DeleteUserGroup_0(ctx context.Context, marsh
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
- msg, err := server.DeleteUserGroup(ctx, &protoReq)
+ msg, err := server.DeleteGroup(ctx, &protoReq)
return msg, metadata, err
}
-// RegisterUserGroupServiceHandlerServer registers the http handlers for service UserGroupService to "mux".
-// UnaryRPC :call UserGroupServiceServer directly.
+// RegisterGroupServiceHandlerServer registers the http handlers for service GroupService to "mux".
+// UnaryRPC :call GroupServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
-// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserGroupServiceHandlerFromEndpoint instead.
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGroupServiceHandlerFromEndpoint instead.
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
-func RegisterUserGroupServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserGroupServiceServer) error {
+func RegisterGroupServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GroupServiceServer) error {
- mux.Handle("GET", pattern_UserGroupService_GetUserGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_GroupService_GetGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -312,12 +312,12 @@ func RegisterUserGroupServiceHandlerServer(ctx context.Context, mux *runtime.Ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.UserGroupService/GetUserGroup", runtime.WithHTTPPathPattern("/v1/{name=groups/*}"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.GroupService/GetGroup", runtime.WithHTTPPathPattern("/v1/{name=groups/*}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_UserGroupService_GetUserGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_GroupService_GetGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -325,11 +325,11 @@ func RegisterUserGroupServiceHandlerServer(ctx context.Context, mux *runtime.Ser
return
}
- forward_UserGroupService_GetUserGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_GroupService_GetGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_UserGroupService_ListUserGroups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_GroupService_ListGroups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -337,12 +337,12 @@ func RegisterUserGroupServiceHandlerServer(ctx context.Context, mux *runtime.Ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.UserGroupService/ListUserGroups", runtime.WithHTTPPathPattern("/v1/groups"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.GroupService/ListGroups", runtime.WithHTTPPathPattern("/v1/groups"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_UserGroupService_ListUserGroups_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_GroupService_ListGroups_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -350,11 +350,11 @@ func RegisterUserGroupServiceHandlerServer(ctx context.Context, mux *runtime.Ser
return
}
- forward_UserGroupService_ListUserGroups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_GroupService_ListGroups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_UserGroupService_CreateUserGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_GroupService_CreateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -362,12 +362,12 @@ func RegisterUserGroupServiceHandlerServer(ctx context.Context, mux *runtime.Ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.UserGroupService/CreateUserGroup", runtime.WithHTTPPathPattern("/v1/groups"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.GroupService/CreateGroup", runtime.WithHTTPPathPattern("/v1/groups"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_UserGroupService_CreateUserGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_GroupService_CreateGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -375,11 +375,11 @@ func RegisterUserGroupServiceHandlerServer(ctx context.Context, mux *runtime.Ser
return
}
- forward_UserGroupService_CreateUserGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_GroupService_CreateGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("PATCH", pattern_UserGroupService_UpdateUserGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("PATCH", pattern_GroupService_UpdateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -387,12 +387,12 @@ func RegisterUserGroupServiceHandlerServer(ctx context.Context, mux *runtime.Ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.UserGroupService/UpdateUserGroup", runtime.WithHTTPPathPattern("/v1/{group.name=groups/*}"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.GroupService/UpdateGroup", runtime.WithHTTPPathPattern("/v1/{group.name=groups/*}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_UserGroupService_UpdateUserGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_GroupService_UpdateGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -400,11 +400,11 @@ func RegisterUserGroupServiceHandlerServer(ctx context.Context, mux *runtime.Ser
return
}
- forward_UserGroupService_UpdateUserGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_GroupService_UpdateGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("DELETE", pattern_UserGroupService_DeleteUserGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("DELETE", pattern_GroupService_DeleteGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -412,12 +412,12 @@ func RegisterUserGroupServiceHandlerServer(ctx context.Context, mux *runtime.Ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.UserGroupService/DeleteUserGroup", runtime.WithHTTPPathPattern("/v1/{name=groups/*}"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.GroupService/DeleteGroup", runtime.WithHTTPPathPattern("/v1/{name=groups/*}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_UserGroupService_DeleteUserGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_GroupService_DeleteGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -425,16 +425,16 @@ func RegisterUserGroupServiceHandlerServer(ctx context.Context, mux *runtime.Ser
return
}
- forward_UserGroupService_DeleteUserGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_GroupService_DeleteGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
-// RegisterUserGroupServiceHandlerFromEndpoint is same as RegisterUserGroupServiceHandler but
+// RegisterGroupServiceHandlerFromEndpoint is same as RegisterGroupServiceHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
-func RegisterUserGroupServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
+func RegisterGroupServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.NewClient(endpoint, opts...)
if err != nil {
return err
@@ -454,129 +454,129 @@ func RegisterUserGroupServiceHandlerFromEndpoint(ctx context.Context, mux *runti
}()
}()
- return RegisterUserGroupServiceHandler(ctx, mux, conn)
+ return RegisterGroupServiceHandler(ctx, mux, conn)
}
-// RegisterUserGroupServiceHandler registers the http handlers for service UserGroupService to "mux".
+// RegisterGroupServiceHandler registers the http handlers for service GroupService to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
-func RegisterUserGroupServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
- return RegisterUserGroupServiceHandlerClient(ctx, mux, NewUserGroupServiceClient(conn))
+func RegisterGroupServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterGroupServiceHandlerClient(ctx, mux, NewGroupServiceClient(conn))
}
-// RegisterUserGroupServiceHandlerClient registers the http handlers for service UserGroupService
-// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserGroupServiceClient".
-// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserGroupServiceClient"
+// RegisterGroupServiceHandlerClient registers the http handlers for service GroupService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GroupServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GroupServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
-// "UserGroupServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
-func RegisterUserGroupServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserGroupServiceClient) error {
+// "GroupServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
+func RegisterGroupServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GroupServiceClient) error {
- mux.Handle("GET", pattern_UserGroupService_GetUserGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_GroupService_GetGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.UserGroupService/GetUserGroup", runtime.WithHTTPPathPattern("/v1/{name=groups/*}"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.GroupService/GetGroup", runtime.WithHTTPPathPattern("/v1/{name=groups/*}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_UserGroupService_GetUserGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_GroupService_GetGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UserGroupService_GetUserGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_GroupService_GetGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_UserGroupService_ListUserGroups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_GroupService_ListGroups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.UserGroupService/ListUserGroups", runtime.WithHTTPPathPattern("/v1/groups"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.GroupService/ListGroups", runtime.WithHTTPPathPattern("/v1/groups"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_UserGroupService_ListUserGroups_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_GroupService_ListGroups_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UserGroupService_ListUserGroups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_GroupService_ListGroups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_UserGroupService_CreateUserGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_GroupService_CreateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.UserGroupService/CreateUserGroup", runtime.WithHTTPPathPattern("/v1/groups"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.GroupService/CreateGroup", runtime.WithHTTPPathPattern("/v1/groups"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_UserGroupService_CreateUserGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_GroupService_CreateGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UserGroupService_CreateUserGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_GroupService_CreateGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("PATCH", pattern_UserGroupService_UpdateUserGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("PATCH", pattern_GroupService_UpdateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.UserGroupService/UpdateUserGroup", runtime.WithHTTPPathPattern("/v1/{group.name=groups/*}"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.GroupService/UpdateGroup", runtime.WithHTTPPathPattern("/v1/{group.name=groups/*}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_UserGroupService_UpdateUserGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_GroupService_UpdateGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UserGroupService_UpdateUserGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_GroupService_UpdateGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("DELETE", pattern_UserGroupService_DeleteUserGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("DELETE", pattern_GroupService_DeleteGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.UserGroupService/DeleteUserGroup", runtime.WithHTTPPathPattern("/v1/{name=groups/*}"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.GroupService/DeleteGroup", runtime.WithHTTPPathPattern("/v1/{name=groups/*}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_UserGroupService_DeleteUserGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_GroupService_DeleteGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UserGroupService_DeleteUserGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_GroupService_DeleteGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -584,25 +584,25 @@ func RegisterUserGroupServiceHandlerClient(ctx context.Context, mux *runtime.Ser
}
var (
- pattern_UserGroupService_GetUserGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "groups", "name"}, ""))
+ pattern_GroupService_GetGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "groups", "name"}, ""))
- pattern_UserGroupService_ListUserGroups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "groups"}, ""))
+ pattern_GroupService_ListGroups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "groups"}, ""))
- pattern_UserGroupService_CreateUserGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "groups"}, ""))
+ pattern_GroupService_CreateGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "groups"}, ""))
- pattern_UserGroupService_UpdateUserGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "groups", "group.name"}, ""))
+ pattern_GroupService_UpdateGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "groups", "group.name"}, ""))
- pattern_UserGroupService_DeleteUserGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "groups", "name"}, ""))
+ pattern_GroupService_DeleteGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "groups", "name"}, ""))
)
var (
- forward_UserGroupService_GetUserGroup_0 = runtime.ForwardResponseMessage
+ forward_GroupService_GetGroup_0 = runtime.ForwardResponseMessage
- forward_UserGroupService_ListUserGroups_0 = runtime.ForwardResponseMessage
+ forward_GroupService_ListGroups_0 = runtime.ForwardResponseMessage
- forward_UserGroupService_CreateUserGroup_0 = runtime.ForwardResponseMessage
+ forward_GroupService_CreateGroup_0 = runtime.ForwardResponseMessage
- forward_UserGroupService_UpdateUserGroup_0 = runtime.ForwardResponseMessage
+ forward_GroupService_UpdateGroup_0 = runtime.ForwardResponseMessage
- forward_UserGroupService_DeleteUserGroup_0 = runtime.ForwardResponseMessage
+ forward_GroupService_DeleteGroup_0 = runtime.ForwardResponseMessage
)
diff --git a/proto/generated-go/v1/group_grpc.pb.go b/proto/generated-go/v1/group_grpc.pb.go
new file mode 100644
index 0000000000..8b88bca8eb
--- /dev/null
+++ b/proto/generated-go/v1/group_grpc.pb.go
@@ -0,0 +1,278 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.5.1
+// - protoc (unknown)
+// source: v1/group.proto
+
+package v1
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ GroupService_GetGroup_FullMethodName = "/bytebase.v1.GroupService/GetGroup"
+ GroupService_ListGroups_FullMethodName = "/bytebase.v1.GroupService/ListGroups"
+ GroupService_CreateGroup_FullMethodName = "/bytebase.v1.GroupService/CreateGroup"
+ GroupService_UpdateGroup_FullMethodName = "/bytebase.v1.GroupService/UpdateGroup"
+ GroupService_DeleteGroup_FullMethodName = "/bytebase.v1.GroupService/DeleteGroup"
+)
+
+// GroupServiceClient is the client API for GroupService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type GroupServiceClient interface {
+ GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*Group, error)
+ ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...grpc.CallOption) (*ListGroupsResponse, error)
+ CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*Group, error)
+ // UpdateGroup updates the group.
+ // Users with "bb.groups.update" permission on the workspace or the group owner can access this method.
+ UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*Group, error)
+ DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+}
+
+type groupServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewGroupServiceClient(cc grpc.ClientConnInterface) GroupServiceClient {
+ return &groupServiceClient{cc}
+}
+
+func (c *groupServiceClient) GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*Group, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(Group)
+ err := c.cc.Invoke(ctx, GroupService_GetGroup_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *groupServiceClient) ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...grpc.CallOption) (*ListGroupsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ListGroupsResponse)
+ err := c.cc.Invoke(ctx, GroupService_ListGroups_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *groupServiceClient) CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*Group, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(Group)
+ err := c.cc.Invoke(ctx, GroupService_CreateGroup_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *groupServiceClient) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*Group, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(Group)
+ err := c.cc.Invoke(ctx, GroupService_UpdateGroup_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *groupServiceClient) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(emptypb.Empty)
+ err := c.cc.Invoke(ctx, GroupService_DeleteGroup_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// GroupServiceServer is the server API for GroupService service.
+// All implementations must embed UnimplementedGroupServiceServer
+// for forward compatibility.
+type GroupServiceServer interface {
+ GetGroup(context.Context, *GetGroupRequest) (*Group, error)
+ ListGroups(context.Context, *ListGroupsRequest) (*ListGroupsResponse, error)
+ CreateGroup(context.Context, *CreateGroupRequest) (*Group, error)
+ // UpdateGroup updates the group.
+ // Users with "bb.groups.update" permission on the workspace or the group owner can access this method.
+ UpdateGroup(context.Context, *UpdateGroupRequest) (*Group, error)
+ DeleteGroup(context.Context, *DeleteGroupRequest) (*emptypb.Empty, error)
+ mustEmbedUnimplementedGroupServiceServer()
+}
+
+// UnimplementedGroupServiceServer must be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedGroupServiceServer struct{}
+
+func (UnimplementedGroupServiceServer) GetGroup(context.Context, *GetGroupRequest) (*Group, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetGroup not implemented")
+}
+func (UnimplementedGroupServiceServer) ListGroups(context.Context, *ListGroupsRequest) (*ListGroupsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListGroups not implemented")
+}
+func (UnimplementedGroupServiceServer) CreateGroup(context.Context, *CreateGroupRequest) (*Group, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CreateGroup not implemented")
+}
+func (UnimplementedGroupServiceServer) UpdateGroup(context.Context, *UpdateGroupRequest) (*Group, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateGroup not implemented")
+}
+func (UnimplementedGroupServiceServer) DeleteGroup(context.Context, *DeleteGroupRequest) (*emptypb.Empty, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DeleteGroup not implemented")
+}
+func (UnimplementedGroupServiceServer) mustEmbedUnimplementedGroupServiceServer() {}
+func (UnimplementedGroupServiceServer) testEmbeddedByValue() {}
+
+// UnsafeGroupServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to GroupServiceServer will
+// result in compilation errors.
+type UnsafeGroupServiceServer interface {
+ mustEmbedUnimplementedGroupServiceServer()
+}
+
+func RegisterGroupServiceServer(s grpc.ServiceRegistrar, srv GroupServiceServer) {
+ // If the following call pancis, it indicates UnimplementedGroupServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
+ s.RegisterService(&GroupService_ServiceDesc, srv)
+}
+
+func _GroupService_GetGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetGroupRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(GroupServiceServer).GetGroup(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: GroupService_GetGroup_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(GroupServiceServer).GetGroup(ctx, req.(*GetGroupRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _GroupService_ListGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListGroupsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(GroupServiceServer).ListGroups(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: GroupService_ListGroups_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(GroupServiceServer).ListGroups(ctx, req.(*ListGroupsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _GroupService_CreateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CreateGroupRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(GroupServiceServer).CreateGroup(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: GroupService_CreateGroup_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(GroupServiceServer).CreateGroup(ctx, req.(*CreateGroupRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _GroupService_UpdateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateGroupRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(GroupServiceServer).UpdateGroup(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: GroupService_UpdateGroup_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(GroupServiceServer).UpdateGroup(ctx, req.(*UpdateGroupRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _GroupService_DeleteGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DeleteGroupRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(GroupServiceServer).DeleteGroup(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: GroupService_DeleteGroup_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(GroupServiceServer).DeleteGroup(ctx, req.(*DeleteGroupRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// GroupService_ServiceDesc is the grpc.ServiceDesc for GroupService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var GroupService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "bytebase.v1.GroupService",
+ HandlerType: (*GroupServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "GetGroup",
+ Handler: _GroupService_GetGroup_Handler,
+ },
+ {
+ MethodName: "ListGroups",
+ Handler: _GroupService_ListGroups_Handler,
+ },
+ {
+ MethodName: "CreateGroup",
+ Handler: _GroupService_CreateGroup_Handler,
+ },
+ {
+ MethodName: "UpdateGroup",
+ Handler: _GroupService_UpdateGroup_Handler,
+ },
+ {
+ MethodName: "DeleteGroup",
+ Handler: _GroupService_DeleteGroup_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "v1/group.proto",
+}
diff --git a/proto/generated-go/v1/user_group.pb.go b/proto/generated-go/v1/user_group.pb.go
deleted file mode 100644
index 6fb36522df..0000000000
--- a/proto/generated-go/v1/user_group.pb.go
+++ /dev/null
@@ -1,865 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// protoc-gen-go v1.34.2
-// protoc (unknown)
-// source: v1/user_group.proto
-
-package v1
-
-import (
- _ "google.golang.org/genproto/googleapis/api/annotations"
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- emptypb "google.golang.org/protobuf/types/known/emptypb"
- fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
- timestamppb "google.golang.org/protobuf/types/known/timestamppb"
- reflect "reflect"
- sync "sync"
-)
-
-const (
- // Verify that this generated code is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
- // Verify that runtime/protoimpl is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
-)
-
-type UserGroupMember_Role int32
-
-const (
- UserGroupMember_ROLE_UNSPECIFIED UserGroupMember_Role = 0
- UserGroupMember_OWNER UserGroupMember_Role = 1
- UserGroupMember_MEMBER UserGroupMember_Role = 2
-)
-
-// Enum value maps for UserGroupMember_Role.
-var (
- UserGroupMember_Role_name = map[int32]string{
- 0: "ROLE_UNSPECIFIED",
- 1: "OWNER",
- 2: "MEMBER",
- }
- UserGroupMember_Role_value = map[string]int32{
- "ROLE_UNSPECIFIED": 0,
- "OWNER": 1,
- "MEMBER": 2,
- }
-)
-
-func (x UserGroupMember_Role) Enum() *UserGroupMember_Role {
- p := new(UserGroupMember_Role)
- *p = x
- return p
-}
-
-func (x UserGroupMember_Role) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (UserGroupMember_Role) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_user_group_proto_enumTypes[0].Descriptor()
-}
-
-func (UserGroupMember_Role) Type() protoreflect.EnumType {
- return &file_v1_user_group_proto_enumTypes[0]
-}
-
-func (x UserGroupMember_Role) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use UserGroupMember_Role.Descriptor instead.
-func (UserGroupMember_Role) EnumDescriptor() ([]byte, []int) {
- return file_v1_user_group_proto_rawDescGZIP(), []int{6, 0}
-}
-
-type GetUserGroupRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The name of the group to retrieve.
- // Format: groups/{email}
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
-}
-
-func (x *GetUserGroupRequest) Reset() {
- *x = GetUserGroupRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_user_group_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GetUserGroupRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetUserGroupRequest) ProtoMessage() {}
-
-func (x *GetUserGroupRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_user_group_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetUserGroupRequest.ProtoReflect.Descriptor instead.
-func (*GetUserGroupRequest) Descriptor() ([]byte, []int) {
- return file_v1_user_group_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *GetUserGroupRequest) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
-}
-
-type ListUserGroupsRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The maximum number of groups to return. The service may return fewer than
- // this value.
- // If unspecified, at most 50 groups will be returned.
- // The maximum value is 1000; values above 1000 will be coerced to 1000.
- PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
- // A page token, received from a previous `ListUsers` call.
- // Provide this to retrieve the subsequent page.
- //
- // When paginating, all other parameters provided to `ListUsers` must match
- // the call that provided the page token.
- PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
-}
-
-func (x *ListUserGroupsRequest) Reset() {
- *x = ListUserGroupsRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_user_group_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *ListUserGroupsRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ListUserGroupsRequest) ProtoMessage() {}
-
-func (x *ListUserGroupsRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_user_group_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use ListUserGroupsRequest.ProtoReflect.Descriptor instead.
-func (*ListUserGroupsRequest) Descriptor() ([]byte, []int) {
- return file_v1_user_group_proto_rawDescGZIP(), []int{1}
-}
-
-func (x *ListUserGroupsRequest) GetPageSize() int32 {
- if x != nil {
- return x.PageSize
- }
- return 0
-}
-
-func (x *ListUserGroupsRequest) GetPageToken() string {
- if x != nil {
- return x.PageToken
- }
- return ""
-}
-
-type ListUserGroupsResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The groups from the specified request.
- Groups []*UserGroup `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"`
- // A token, which can be sent as `page_token` to retrieve the next page.
- // If this field is omitted, there are no subsequent pages.
- NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
-}
-
-func (x *ListUserGroupsResponse) Reset() {
- *x = ListUserGroupsResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_user_group_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *ListUserGroupsResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ListUserGroupsResponse) ProtoMessage() {}
-
-func (x *ListUserGroupsResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_user_group_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use ListUserGroupsResponse.ProtoReflect.Descriptor instead.
-func (*ListUserGroupsResponse) Descriptor() ([]byte, []int) {
- return file_v1_user_group_proto_rawDescGZIP(), []int{2}
-}
-
-func (x *ListUserGroupsResponse) GetGroups() []*UserGroup {
- if x != nil {
- return x.Groups
- }
- return nil
-}
-
-func (x *ListUserGroupsResponse) GetNextPageToken() string {
- if x != nil {
- return x.NextPageToken
- }
- return ""
-}
-
-type CreateUserGroupRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The group to create.
- Group *UserGroup `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
-}
-
-func (x *CreateUserGroupRequest) Reset() {
- *x = CreateUserGroupRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_user_group_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *CreateUserGroupRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*CreateUserGroupRequest) ProtoMessage() {}
-
-func (x *CreateUserGroupRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_user_group_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use CreateUserGroupRequest.ProtoReflect.Descriptor instead.
-func (*CreateUserGroupRequest) Descriptor() ([]byte, []int) {
- return file_v1_user_group_proto_rawDescGZIP(), []int{3}
-}
-
-func (x *CreateUserGroupRequest) GetGroup() *UserGroup {
- if x != nil {
- return x.Group
- }
- return nil
-}
-
-type UpdateUserGroupRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The group to update.
- //
- // The group's `name` field is used to identify the group to update.
- // Format: groups/{email}
- Group *UserGroup `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
- // The list of fields to update.
- UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
-}
-
-func (x *UpdateUserGroupRequest) Reset() {
- *x = UpdateUserGroupRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_user_group_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *UpdateUserGroupRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*UpdateUserGroupRequest) ProtoMessage() {}
-
-func (x *UpdateUserGroupRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_user_group_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use UpdateUserGroupRequest.ProtoReflect.Descriptor instead.
-func (*UpdateUserGroupRequest) Descriptor() ([]byte, []int) {
- return file_v1_user_group_proto_rawDescGZIP(), []int{4}
-}
-
-func (x *UpdateUserGroupRequest) GetGroup() *UserGroup {
- if x != nil {
- return x.Group
- }
- return nil
-}
-
-func (x *UpdateUserGroupRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
- if x != nil {
- return x.UpdateMask
- }
- return nil
-}
-
-type DeleteUserGroupRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The name of the group to delete.
- // Format: groups/{email}
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
-}
-
-func (x *DeleteUserGroupRequest) Reset() {
- *x = DeleteUserGroupRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_user_group_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *DeleteUserGroupRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DeleteUserGroupRequest) ProtoMessage() {}
-
-func (x *DeleteUserGroupRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_user_group_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DeleteUserGroupRequest.ProtoReflect.Descriptor instead.
-func (*DeleteUserGroupRequest) Descriptor() ([]byte, []int) {
- return file_v1_user_group_proto_rawDescGZIP(), []int{5}
-}
-
-func (x *DeleteUserGroupRequest) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
-}
-
-type UserGroupMember struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Member is the principal who belong to this user group.
- //
- // Format: users/[email protected]
- Member string `protobuf:"bytes,1,opt,name=member,proto3" json:"member,omitempty"`
- Role UserGroupMember_Role `protobuf:"varint,2,opt,name=role,proto3,enum=bytebase.v1.UserGroupMember_Role" json:"role,omitempty"`
-}
-
-func (x *UserGroupMember) Reset() {
- *x = UserGroupMember{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_user_group_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *UserGroupMember) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*UserGroupMember) ProtoMessage() {}
-
-func (x *UserGroupMember) ProtoReflect() protoreflect.Message {
- mi := &file_v1_user_group_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use UserGroupMember.ProtoReflect.Descriptor instead.
-func (*UserGroupMember) Descriptor() ([]byte, []int) {
- return file_v1_user_group_proto_rawDescGZIP(), []int{6}
-}
-
-func (x *UserGroupMember) GetMember() string {
- if x != nil {
- return x.Member
- }
- return ""
-}
-
-func (x *UserGroupMember) GetRole() UserGroupMember_Role {
- if x != nil {
- return x.Role
- }
- return UserGroupMember_ROLE_UNSPECIFIED
-}
-
-type UserGroup struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The name of the group to retrieve.
- // Format: groups/{userGroup}, userGroup is an email.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
- Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
- // The name for the creator.
- // Format: users/[email protected]
- Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"`
- Members []*UserGroupMember `protobuf:"bytes,5,rep,name=members,proto3" json:"members,omitempty"`
- // The timestamp when the group was created.
- CreateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
-}
-
-func (x *UserGroup) Reset() {
- *x = UserGroup{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_user_group_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *UserGroup) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*UserGroup) ProtoMessage() {}
-
-func (x *UserGroup) ProtoReflect() protoreflect.Message {
- mi := &file_v1_user_group_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use UserGroup.ProtoReflect.Descriptor instead.
-func (*UserGroup) Descriptor() ([]byte, []int) {
- return file_v1_user_group_proto_rawDescGZIP(), []int{7}
-}
-
-func (x *UserGroup) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
-}
-
-func (x *UserGroup) GetTitle() string {
- if x != nil {
- return x.Title
- }
- return ""
-}
-
-func (x *UserGroup) GetDescription() string {
- if x != nil {
- return x.Description
- }
- return ""
-}
-
-func (x *UserGroup) GetCreator() string {
- if x != nil {
- return x.Creator
- }
- return ""
-}
-
-func (x *UserGroup) GetMembers() []*UserGroupMember {
- if x != nil {
- return x.Members
- }
- return nil
-}
-
-func (x *UserGroup) GetCreateTime() *timestamppb.Timestamp {
- if x != nil {
- return x.CreateTime
- }
- return nil
-}
-
-var File_v1_user_group_proto protoreflect.FileDescriptor
-
-var file_v1_user_group_proto_rawDesc = []byte{
- 0x0a, 0x13, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,
- 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69,
- 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61,
- 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x13, 0x47, 0x65,
- 0x74, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x33, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
- 0x1f, 0xe2, 0x41, 0x01, 0x02, 0xfa, 0x41, 0x18, 0x0a, 0x16, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70,
- 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x53, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73,
- 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
- 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a,
- 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x70, 0x0a, 0x16, 0x4c,
- 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18,
- 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67,
- 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61,
- 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
- 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x4c, 0x0a,
- 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x04,
- 0xe2, 0x41, 0x01, 0x02, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x89, 0x01, 0x0a, 0x16,
- 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x04, 0xe2,
- 0x41, 0x01, 0x02, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70,
- 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4d, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74,
- 0x65, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x33, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
- 0x1f, 0xe2, 0x41, 0x01, 0x02, 0xfa, 0x41, 0x18, 0x0a, 0x16, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70,
- 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x47,
- 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65,
- 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62,
- 0x65, 0x72, 0x12, 0x35, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,
- 0x32, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55,
- 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x52,
- 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x33, 0x0a, 0x04, 0x52, 0x6f, 0x6c,
- 0x65, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
- 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x57, 0x4e, 0x45, 0x52,
- 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0xa9,
- 0x02, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x18, 0x0a, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03,
- 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b,
- 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e,
- 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42,
- 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36,
- 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73,
- 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d,
- 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
- 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
- 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x0a, 0x63,
- 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x2f, 0xea, 0x41, 0x2c, 0x0a, 0x16,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, 0x65,
- 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b,
- 0x75, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x7d, 0x32, 0xf3, 0x05, 0x0a, 0x10, 0x55,
- 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
- 0x85, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70,
- 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47,
- 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
- 0x2e, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x3b, 0xda, 0x41, 0x04, 0x6e,
- 0x61, 0x6d, 0x65, 0x8a, 0xea, 0x30, 0x11, 0x62, 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x47, 0x72,
- 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x67, 0x65, 0x74, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93,
- 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x67, 0x72,
- 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8a, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74,
- 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x22, 0x2e, 0x62, 0x79, 0x74,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65,
- 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23,
- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73,
- 0x74, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x00, 0x8a, 0xea, 0x30, 0x12, 0x62, 0x62, 0x2e, 0x75,
- 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x90, 0xea,
- 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72,
- 0x6f, 0x75, 0x70, 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55,
- 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65,
- 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72,
- 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x3d, 0xda, 0x41, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x8a,
- 0xea, 0x30, 0x14, 0x62, 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73,
- 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02,
- 0x13, 0x3a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72,
- 0x6f, 0x75, 0x70, 0x73, 0x12, 0xa8, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55,
- 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65,
- 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72,
- 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x58, 0xda, 0x41, 0x11, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2c,
- 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a, 0xea, 0x30, 0x14, 0x62,
- 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x75, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x05, 0x67,
- 0x72, 0x6f, 0x75, 0x70, 0x32, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70,
- 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x12,
- 0x8e, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72,
- 0x6f, 0x75, 0x70, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75,
- 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
- 0x22, 0x3e, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xea, 0x30, 0x14, 0x62, 0x62, 0x2e,
- 0x75, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74,
- 0x65, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x2a, 0x13, 0x2f, 0x76, 0x31,
- 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d,
- 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f,
- 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
-
-var (
- file_v1_user_group_proto_rawDescOnce sync.Once
- file_v1_user_group_proto_rawDescData = file_v1_user_group_proto_rawDesc
-)
-
-func file_v1_user_group_proto_rawDescGZIP() []byte {
- file_v1_user_group_proto_rawDescOnce.Do(func() {
- file_v1_user_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_user_group_proto_rawDescData)
- })
- return file_v1_user_group_proto_rawDescData
-}
-
-var file_v1_user_group_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_v1_user_group_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
-var file_v1_user_group_proto_goTypes = []any{
- (UserGroupMember_Role)(0), // 0: bytebase.v1.UserGroupMember.Role
- (*GetUserGroupRequest)(nil), // 1: bytebase.v1.GetUserGroupRequest
- (*ListUserGroupsRequest)(nil), // 2: bytebase.v1.ListUserGroupsRequest
- (*ListUserGroupsResponse)(nil), // 3: bytebase.v1.ListUserGroupsResponse
- (*CreateUserGroupRequest)(nil), // 4: bytebase.v1.CreateUserGroupRequest
- (*UpdateUserGroupRequest)(nil), // 5: bytebase.v1.UpdateUserGroupRequest
- (*DeleteUserGroupRequest)(nil), // 6: bytebase.v1.DeleteUserGroupRequest
- (*UserGroupMember)(nil), // 7: bytebase.v1.UserGroupMember
- (*UserGroup)(nil), // 8: bytebase.v1.UserGroup
- (*fieldmaskpb.FieldMask)(nil), // 9: google.protobuf.FieldMask
- (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp
- (*emptypb.Empty)(nil), // 11: google.protobuf.Empty
-}
-var file_v1_user_group_proto_depIdxs = []int32{
- 8, // 0: bytebase.v1.ListUserGroupsResponse.groups:type_name -> bytebase.v1.UserGroup
- 8, // 1: bytebase.v1.CreateUserGroupRequest.group:type_name -> bytebase.v1.UserGroup
- 8, // 2: bytebase.v1.UpdateUserGroupRequest.group:type_name -> bytebase.v1.UserGroup
- 9, // 3: bytebase.v1.UpdateUserGroupRequest.update_mask:type_name -> google.protobuf.FieldMask
- 0, // 4: bytebase.v1.UserGroupMember.role:type_name -> bytebase.v1.UserGroupMember.Role
- 7, // 5: bytebase.v1.UserGroup.members:type_name -> bytebase.v1.UserGroupMember
- 10, // 6: bytebase.v1.UserGroup.create_time:type_name -> google.protobuf.Timestamp
- 1, // 7: bytebase.v1.UserGroupService.GetUserGroup:input_type -> bytebase.v1.GetUserGroupRequest
- 2, // 8: bytebase.v1.UserGroupService.ListUserGroups:input_type -> bytebase.v1.ListUserGroupsRequest
- 4, // 9: bytebase.v1.UserGroupService.CreateUserGroup:input_type -> bytebase.v1.CreateUserGroupRequest
- 5, // 10: bytebase.v1.UserGroupService.UpdateUserGroup:input_type -> bytebase.v1.UpdateUserGroupRequest
- 6, // 11: bytebase.v1.UserGroupService.DeleteUserGroup:input_type -> bytebase.v1.DeleteUserGroupRequest
- 8, // 12: bytebase.v1.UserGroupService.GetUserGroup:output_type -> bytebase.v1.UserGroup
- 3, // 13: bytebase.v1.UserGroupService.ListUserGroups:output_type -> bytebase.v1.ListUserGroupsResponse
- 8, // 14: bytebase.v1.UserGroupService.CreateUserGroup:output_type -> bytebase.v1.UserGroup
- 8, // 15: bytebase.v1.UserGroupService.UpdateUserGroup:output_type -> bytebase.v1.UserGroup
- 11, // 16: bytebase.v1.UserGroupService.DeleteUserGroup:output_type -> google.protobuf.Empty
- 12, // [12:17] is the sub-list for method output_type
- 7, // [7:12] is the sub-list for method input_type
- 7, // [7:7] is the sub-list for extension type_name
- 7, // [7:7] is the sub-list for extension extendee
- 0, // [0:7] is the sub-list for field type_name
-}
-
-func init() { file_v1_user_group_proto_init() }
-func file_v1_user_group_proto_init() {
- if File_v1_user_group_proto != nil {
- return
- }
- file_v1_annotation_proto_init()
- if !protoimpl.UnsafeEnabled {
- file_v1_user_group_proto_msgTypes[0].Exporter = func(v any, i int) any {
- switch v := v.(*GetUserGroupRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_user_group_proto_msgTypes[1].Exporter = func(v any, i int) any {
- switch v := v.(*ListUserGroupsRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_user_group_proto_msgTypes[2].Exporter = func(v any, i int) any {
- switch v := v.(*ListUserGroupsResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_user_group_proto_msgTypes[3].Exporter = func(v any, i int) any {
- switch v := v.(*CreateUserGroupRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_user_group_proto_msgTypes[4].Exporter = func(v any, i int) any {
- switch v := v.(*UpdateUserGroupRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_user_group_proto_msgTypes[5].Exporter = func(v any, i int) any {
- switch v := v.(*DeleteUserGroupRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_user_group_proto_msgTypes[6].Exporter = func(v any, i int) any {
- switch v := v.(*UserGroupMember); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_user_group_proto_msgTypes[7].Exporter = func(v any, i int) any {
- switch v := v.(*UserGroup); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_v1_user_group_proto_rawDesc,
- NumEnums: 1,
- NumMessages: 8,
- NumExtensions: 0,
- NumServices: 1,
- },
- GoTypes: file_v1_user_group_proto_goTypes,
- DependencyIndexes: file_v1_user_group_proto_depIdxs,
- EnumInfos: file_v1_user_group_proto_enumTypes,
- MessageInfos: file_v1_user_group_proto_msgTypes,
- }.Build()
- File_v1_user_group_proto = out.File
- file_v1_user_group_proto_rawDesc = nil
- file_v1_user_group_proto_goTypes = nil
- file_v1_user_group_proto_depIdxs = nil
-}
diff --git a/proto/generated-go/v1/user_group_grpc.pb.go b/proto/generated-go/v1/user_group_grpc.pb.go
deleted file mode 100644
index 75942bb165..0000000000
--- a/proto/generated-go/v1/user_group_grpc.pb.go
+++ /dev/null
@@ -1,278 +0,0 @@
-// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
-// versions:
-// - protoc-gen-go-grpc v1.5.1
-// - protoc (unknown)
-// source: v1/user_group.proto
-
-package v1
-
-import (
- context "context"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- emptypb "google.golang.org/protobuf/types/known/emptypb"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.64.0 or later.
-const _ = grpc.SupportPackageIsVersion9
-
-const (
- UserGroupService_GetUserGroup_FullMethodName = "/bytebase.v1.UserGroupService/GetUserGroup"
- UserGroupService_ListUserGroups_FullMethodName = "/bytebase.v1.UserGroupService/ListUserGroups"
- UserGroupService_CreateUserGroup_FullMethodName = "/bytebase.v1.UserGroupService/CreateUserGroup"
- UserGroupService_UpdateUserGroup_FullMethodName = "/bytebase.v1.UserGroupService/UpdateUserGroup"
- UserGroupService_DeleteUserGroup_FullMethodName = "/bytebase.v1.UserGroupService/DeleteUserGroup"
-)
-
-// UserGroupServiceClient is the client API for UserGroupService service.
-//
-// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
-type UserGroupServiceClient interface {
- GetUserGroup(ctx context.Context, in *GetUserGroupRequest, opts ...grpc.CallOption) (*UserGroup, error)
- ListUserGroups(ctx context.Context, in *ListUserGroupsRequest, opts ...grpc.CallOption) (*ListUserGroupsResponse, error)
- CreateUserGroup(ctx context.Context, in *CreateUserGroupRequest, opts ...grpc.CallOption) (*UserGroup, error)
- // UpdateUserGroup updates the user group.
- // Users with "bb.userGroups.update" permission on the workspace or the user group owner can access this method.
- UpdateUserGroup(ctx context.Context, in *UpdateUserGroupRequest, opts ...grpc.CallOption) (*UserGroup, error)
- DeleteUserGroup(ctx context.Context, in *DeleteUserGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
-}
-
-type userGroupServiceClient struct {
- cc grpc.ClientConnInterface
-}
-
-func NewUserGroupServiceClient(cc grpc.ClientConnInterface) UserGroupServiceClient {
- return &userGroupServiceClient{cc}
-}
-
-func (c *userGroupServiceClient) GetUserGroup(ctx context.Context, in *GetUserGroupRequest, opts ...grpc.CallOption) (*UserGroup, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(UserGroup)
- err := c.cc.Invoke(ctx, UserGroupService_GetUserGroup_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *userGroupServiceClient) ListUserGroups(ctx context.Context, in *ListUserGroupsRequest, opts ...grpc.CallOption) (*ListUserGroupsResponse, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(ListUserGroupsResponse)
- err := c.cc.Invoke(ctx, UserGroupService_ListUserGroups_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *userGroupServiceClient) CreateUserGroup(ctx context.Context, in *CreateUserGroupRequest, opts ...grpc.CallOption) (*UserGroup, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(UserGroup)
- err := c.cc.Invoke(ctx, UserGroupService_CreateUserGroup_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *userGroupServiceClient) UpdateUserGroup(ctx context.Context, in *UpdateUserGroupRequest, opts ...grpc.CallOption) (*UserGroup, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(UserGroup)
- err := c.cc.Invoke(ctx, UserGroupService_UpdateUserGroup_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *userGroupServiceClient) DeleteUserGroup(ctx context.Context, in *DeleteUserGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(emptypb.Empty)
- err := c.cc.Invoke(ctx, UserGroupService_DeleteUserGroup_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-// UserGroupServiceServer is the server API for UserGroupService service.
-// All implementations must embed UnimplementedUserGroupServiceServer
-// for forward compatibility.
-type UserGroupServiceServer interface {
- GetUserGroup(context.Context, *GetUserGroupRequest) (*UserGroup, error)
- ListUserGroups(context.Context, *ListUserGroupsRequest) (*ListUserGroupsResponse, error)
- CreateUserGroup(context.Context, *CreateUserGroupRequest) (*UserGroup, error)
- // UpdateUserGroup updates the user group.
- // Users with "bb.userGroups.update" permission on the workspace or the user group owner can access this method.
- UpdateUserGroup(context.Context, *UpdateUserGroupRequest) (*UserGroup, error)
- DeleteUserGroup(context.Context, *DeleteUserGroupRequest) (*emptypb.Empty, error)
- mustEmbedUnimplementedUserGroupServiceServer()
-}
-
-// UnimplementedUserGroupServiceServer must be embedded to have
-// forward compatible implementations.
-//
-// NOTE: this should be embedded by value instead of pointer to avoid a nil
-// pointer dereference when methods are called.
-type UnimplementedUserGroupServiceServer struct{}
-
-func (UnimplementedUserGroupServiceServer) GetUserGroup(context.Context, *GetUserGroupRequest) (*UserGroup, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetUserGroup not implemented")
-}
-func (UnimplementedUserGroupServiceServer) ListUserGroups(context.Context, *ListUserGroupsRequest) (*ListUserGroupsResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ListUserGroups not implemented")
-}
-func (UnimplementedUserGroupServiceServer) CreateUserGroup(context.Context, *CreateUserGroupRequest) (*UserGroup, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CreateUserGroup not implemented")
-}
-func (UnimplementedUserGroupServiceServer) UpdateUserGroup(context.Context, *UpdateUserGroupRequest) (*UserGroup, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateUserGroup not implemented")
-}
-func (UnimplementedUserGroupServiceServer) DeleteUserGroup(context.Context, *DeleteUserGroupRequest) (*emptypb.Empty, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DeleteUserGroup not implemented")
-}
-func (UnimplementedUserGroupServiceServer) mustEmbedUnimplementedUserGroupServiceServer() {}
-func (UnimplementedUserGroupServiceServer) testEmbeddedByValue() {}
-
-// UnsafeUserGroupServiceServer may be embedded to opt out of forward compatibility for this service.
-// Use of this interface is not recommended, as added methods to UserGroupServiceServer will
-// result in compilation errors.
-type UnsafeUserGroupServiceServer interface {
- mustEmbedUnimplementedUserGroupServiceServer()
-}
-
-func RegisterUserGroupServiceServer(s grpc.ServiceRegistrar, srv UserGroupServiceServer) {
- // If the following call pancis, it indicates UnimplementedUserGroupServiceServer was
- // embedded by pointer and is nil. This will cause panics if an
- // unimplemented method is ever invoked, so we test this at initialization
- // time to prevent it from happening at runtime later due to I/O.
- if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
- t.testEmbeddedByValue()
- }
- s.RegisterService(&UserGroupService_ServiceDesc, srv)
-}
-
-func _UserGroupService_GetUserGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetUserGroupRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(UserGroupServiceServer).GetUserGroup(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: UserGroupService_GetUserGroup_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(UserGroupServiceServer).GetUserGroup(ctx, req.(*GetUserGroupRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _UserGroupService_ListUserGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ListUserGroupsRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(UserGroupServiceServer).ListUserGroups(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: UserGroupService_ListUserGroups_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(UserGroupServiceServer).ListUserGroups(ctx, req.(*ListUserGroupsRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _UserGroupService_CreateUserGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CreateUserGroupRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(UserGroupServiceServer).CreateUserGroup(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: UserGroupService_CreateUserGroup_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(UserGroupServiceServer).CreateUserGroup(ctx, req.(*CreateUserGroupRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _UserGroupService_UpdateUserGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(UpdateUserGroupRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(UserGroupServiceServer).UpdateUserGroup(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: UserGroupService_UpdateUserGroup_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(UserGroupServiceServer).UpdateUserGroup(ctx, req.(*UpdateUserGroupRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _UserGroupService_DeleteUserGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DeleteUserGroupRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(UserGroupServiceServer).DeleteUserGroup(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: UserGroupService_DeleteUserGroup_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(UserGroupServiceServer).DeleteUserGroup(ctx, req.(*DeleteUserGroupRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-// UserGroupService_ServiceDesc is the grpc.ServiceDesc for UserGroupService service.
-// It's only intended for direct use with grpc.RegisterService,
-// and not to be introspected or modified (even as a copy)
-var UserGroupService_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "bytebase.v1.UserGroupService",
- HandlerType: (*UserGroupServiceServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "GetUserGroup",
- Handler: _UserGroupService_GetUserGroup_Handler,
- },
- {
- MethodName: "ListUserGroups",
- Handler: _UserGroupService_ListUserGroups_Handler,
- },
- {
- MethodName: "CreateUserGroup",
- Handler: _UserGroupService_CreateUserGroup_Handler,
- },
- {
- MethodName: "UpdateUserGroup",
- Handler: _UserGroupService_UpdateUserGroup_Handler,
- },
- {
- MethodName: "DeleteUserGroup",
- Handler: _UserGroupService_DeleteUserGroup_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "v1/user_group.proto",
-}
diff --git a/proto/store/user_group.proto b/proto/store/group.proto
similarity index 61%
rename from proto/store/user_group.proto
rename to proto/store/group.proto
index 2d7eabf52e..a8933156d0 100644
--- a/proto/store/user_group.proto
+++ b/proto/store/group.proto
@@ -4,8 +4,8 @@ package bytebase.store;
option go_package = "generated-go/store";
-message UserGroupMember {
- // Member is the principal who belong to this user group.
+message GroupMember {
+ // Member is the principal who belong to this group.
//
// Format: users/{userUID}.
string member = 1;
@@ -19,6 +19,6 @@ message UserGroupMember {
Role role = 2;
}
-message UserGroupPayload {
- repeated UserGroupMember members = 1;
+message GroupPayload {
+ repeated GroupMember members = 1;
}
diff --git a/proto/v1/user_group.proto b/proto/v1/group.proto
similarity index 63%
rename from proto/v1/user_group.proto
rename to proto/v1/group.proto
index 4174df3513..e6e349c5c1 100644
--- a/proto/v1/user_group.proto
+++ b/proto/v1/group.proto
@@ -13,111 +13,111 @@ import "v1/annotation.proto";
option go_package = "generated-go/v1";
-service UserGroupService {
- rpc GetUserGroup(GetUserGroupRequest) returns (UserGroup) {
+service GroupService {
+ rpc GetGroup(GetGroupRequest) returns (Group) {
option (google.api.http) = {get: "/v1/{name=groups/*}"};
option (google.api.method_signature) = "name";
- option (bytebase.v1.permission) = "bb.userGroups.get";
+ option (bytebase.v1.permission) = "bb.groups.get";
option (bytebase.v1.auth_method) = IAM;
}
- rpc ListUserGroups(ListUserGroupsRequest) returns (ListUserGroupsResponse) {
+ rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse) {
option (google.api.http) = {get: "/v1/groups"};
option (google.api.method_signature) = "";
- option (bytebase.v1.permission) = "bb.userGroups.list";
+ option (bytebase.v1.permission) = "bb.groups.list";
option (bytebase.v1.auth_method) = IAM;
}
- rpc CreateUserGroup(CreateUserGroupRequest) returns (UserGroup) {
+ rpc CreateGroup(CreateGroupRequest) returns (Group) {
option (google.api.http) = {
post: "/v1/groups"
body: "group"
};
option (google.api.method_signature) = "group";
- option (bytebase.v1.permission) = "bb.userGroups.create";
+ option (bytebase.v1.permission) = "bb.groups.create";
option (bytebase.v1.auth_method) = IAM;
}
- // UpdateUserGroup updates the user group.
- // Users with "bb.userGroups.update" permission on the workspace or the user group owner can access this method.
- rpc UpdateUserGroup(UpdateUserGroupRequest) returns (UserGroup) {
+ // UpdateGroup updates the group.
+ // Users with "bb.groups.update" permission on the workspace or the group owner can access this method.
+ rpc UpdateGroup(UpdateGroupRequest) returns (Group) {
option (google.api.http) = {
patch: "/v1/{group.name=groups/*}"
body: "group"
};
option (google.api.method_signature) = "group,update_mask";
- option (bytebase.v1.permission) = "bb.userGroups.update";
+ option (bytebase.v1.permission) = "bb.groups.update";
option (bytebase.v1.auth_method) = CUSTOM;
}
- rpc DeleteUserGroup(DeleteUserGroupRequest) returns (google.protobuf.Empty) {
+ rpc DeleteGroup(DeleteGroupRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {delete: "/v1/{name=groups/*}"};
option (google.api.method_signature) = "name";
- option (bytebase.v1.permission) = "bb.userGroups.delete";
+ option (bytebase.v1.permission) = "bb.groups.delete";
option (bytebase.v1.auth_method) = IAM;
}
}
-message GetUserGroupRequest {
+message GetGroupRequest {
// The name of the group to retrieve.
// Format: groups/{email}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {type: "bytebase.com/UserGroup"}
+ (google.api.resource_reference) = {type: "bytebase.com/Group"}
];
}
-message ListUserGroupsRequest {
+message ListGroupsRequest {
// The maximum number of groups to return. The service may return fewer than
// this value.
// If unspecified, at most 50 groups will be returned.
// The maximum value is 1000; values above 1000 will be coerced to 1000.
int32 page_size = 1;
- // A page token, received from a previous `ListUsers` call.
+ // A page token, received from a previous `ListGroups` call.
// Provide this to retrieve the subsequent page.
//
- // When paginating, all other parameters provided to `ListUsers` must match
+ // When paginating, all other parameters provided to `ListGroups` must match
// the call that provided the page token.
string page_token = 2;
}
-message ListUserGroupsResponse {
+message ListGroupsResponse {
// The groups from the specified request.
- repeated UserGroup groups = 1;
+ repeated Group groups = 1;
// A token, which can be sent as `page_token` to retrieve the next page.
// If this field is omitted, there are no subsequent pages.
string next_page_token = 2;
}
-message CreateUserGroupRequest {
+message CreateGroupRequest {
// The group to create.
- UserGroup group = 1 [(google.api.field_behavior) = REQUIRED];
+ Group group = 1 [(google.api.field_behavior) = REQUIRED];
}
-message UpdateUserGroupRequest {
+message UpdateGroupRequest {
// The group to update.
//
// The group's `name` field is used to identify the group to update.
// Format: groups/{email}
- UserGroup group = 1 [(google.api.field_behavior) = REQUIRED];
+ Group group = 1 [(google.api.field_behavior) = REQUIRED];
// The list of fields to update.
google.protobuf.FieldMask update_mask = 2;
}
-message DeleteUserGroupRequest {
+message DeleteGroupRequest {
// The name of the group to delete.
// Format: groups/{email}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {type: "bytebase.com/UserGroup"}
+ (google.api.resource_reference) = {type: "bytebase.com/Group"}
];
}
-message UserGroupMember {
- // Member is the principal who belong to this user group.
+message GroupMember {
+ // Member is the principal who belong to this group.
//
// Format: users/[email protected]
string member = 1;
@@ -131,14 +131,14 @@ message UserGroupMember {
Role role = 2;
}
-message UserGroup {
+message Group {
option (google.api.resource) = {
- type: "bytebase.com/UserGroup"
- pattern: "groups/{userGroup}"
+ type: "bytebase.com/Group"
+ pattern: "groups/{group}"
};
// The name of the group to retrieve.
- // Format: groups/{userGroup}, userGroup is an email.
+ // Format: groups/{group}, group is an email.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
string title = 2;
@@ -149,7 +149,7 @@ message UserGroup {
// Format: users/[email protected]
string creator = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
- repeated UserGroupMember members = 5;
+ repeated GroupMember members = 5;
// The timestamp when the group was created.
google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];