Skip to content

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

chore: update setting v1 api (#6086)

ecmadao0edcceac64e1
diff --git a/backend/api/v1/setting_service.go b/backend/api/v1/setting_service.go
index 3dc9447676..e91da4142f 100644
--- a/backend/api/v1/setting_service.go
+++ b/backend/api/v1/setting_service.go
@@ -3,6 +3,7 @@ package v1
import (
"bytes"
"context"
+ "encoding/json"
"fmt"
"strings"
@@ -20,6 +21,7 @@ import (
"github.com/bytebase/bytebase/backend/component/state"
enterpriseAPI "github.com/bytebase/bytebase/backend/enterprise/api"
api "github.com/bytebase/bytebase/backend/legacyapi"
+ "github.com/bytebase/bytebase/backend/plugin/app/feishu"
"github.com/bytebase/bytebase/backend/plugin/mail"
"github.com/bytebase/bytebase/backend/runner/approval"
"github.com/bytebase/bytebase/backend/store"
@@ -34,15 +36,23 @@ type SettingService struct {
profile *config.Profile
licenseService enterpriseAPI.LicenseService
stateCfg *state.State
+ feishuProvider *feishu.Provider
}
// NewSettingService creates a new setting service.
-func NewSettingService(store *store.Store, profile *config.Profile, licenseService enterpriseAPI.LicenseService, stateCfg *state.State) *SettingService {
+func NewSettingService(
+ store *store.Store,
+ profile *config.Profile,
+ licenseService enterpriseAPI.LicenseService,
+ stateCfg *state.State,
+ feishuProvider *feishu.Provider,
+) *SettingService {
return &SettingService{
store: store,
profile: profile,
licenseService: licenseService,
stateCfg: stateCfg,
+ feishuProvider: feishuProvider,
}
}
@@ -55,6 +65,7 @@ var whitelistSettings = []api.SettingName{
api.SettingPluginOpenAIEndpoint,
api.SettingWorkspaceApproval,
api.SettingWorkspaceMailDelivery,
+ api.SettingWorkspaceProfile,
}
var (
@@ -64,6 +75,27 @@ var (
testEmailFs embed.FS
)
+// ListSettings lists all settings.
+func (s *SettingService) ListSettings(ctx context.Context, _ *v1pb.ListSettingsRequest) (*v1pb.ListSettingsResponse, error) {
+ settings, err := s.store.ListSettingV2(ctx, &store.FindSettingMessage{})
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to list settings: %v", err)
+ }
+
+ response := &v1pb.ListSettingsResponse{}
+ for _, setting := range settings {
+ if !settingInWhitelist(setting.Name) {
+ continue
+ }
+ settingMessage, err := convertToSettingMessage(setting)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to convert setting message: %v", err)
+ }
+ response.Settings = append(response.Settings, settingMessage)
+ }
+ return response, nil
+}
+
// GetSetting gets the setting by name.
func (s *SettingService) GetSetting(ctx context.Context, request *v1pb.GetSettingRequest) (*v1pb.Setting, error) {
settingName, err := getSettingName(request.Name)
@@ -74,6 +106,10 @@ func (s *SettingService) GetSetting(ctx context.Context, request *v1pb.GetSettin
return nil, status.Errorf(codes.InvalidArgument, "setting name is empty")
}
apiSettingName := api.SettingName(settingName)
+ if !settingInWhitelist(apiSettingName) {
+ return nil, status.Errorf(codes.InvalidArgument, "setting is not available")
+ }
+
setting, err := s.store.GetSettingV2(ctx, &store.FindSettingMessage{
Name: &apiSettingName,
})
@@ -84,21 +120,11 @@ func (s *SettingService) GetSetting(ctx context.Context, request *v1pb.GetSettin
return nil, status.Errorf(codes.NotFound, "setting %s not found", settingName)
}
// Only return whitelisted setting.
- for _, whitelist := range whitelistSettings {
- if setting.Name == whitelist {
- settingMessage, err := convertToSettingMessage(setting)
- if err != nil {
- return nil, status.Errorf(codes.Internal, "failed to convert setting message: %v", err)
- }
- strippedSettingMessage, err := stripSensitiveData(settingMessage)
- if err != nil {
- return nil, status.Errorf(codes.Internal, "failed to strip sensitive data: %v", err)
- }
- return strippedSettingMessage, nil
- }
+ settingMessage, err := convertToSettingMessage(setting)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to convert setting message: %v", err)
}
-
- return nil, status.Errorf(codes.InvalidArgument, "setting %s is not whitelisted", settingName)
+ return settingMessage, nil
}
// SetSetting set the setting by name.
@@ -118,10 +144,10 @@ func (s *SettingService) SetSetting(ctx context.Context, request *v1pb.SetSettin
var storeSettingValue string
switch apiSettingName {
case api.SettingWorkspaceProfile:
- settingValue := request.Setting.Value.GetStringValue()
+ settingValue := request.Setting.Value.GetWorkspaceProfileSettingValue().String()
payload := new(storepb.WorkspaceProfileSetting)
if err := protojson.Unmarshal([]byte(settingValue), payload); err != nil {
- return nil, status.Errorf(codes.Internal, "failed to unmarshal setting value: %v", err)
+ return nil, status.Errorf(codes.Internal, "failed to unmarshal setting value: %v for %s", err, apiSettingName)
}
if payload.ExternalUrl != "" {
externalURL, err := common.NormalizeExternalURL(payload.ExternalUrl)
@@ -130,17 +156,12 @@ func (s *SettingService) SetSetting(ctx context.Context, request *v1pb.SetSettin
}
payload.ExternalUrl = externalURL
}
- bytes, err := protojson.Marshal(payload)
- if err != nil {
- return nil, status.Errorf(codes.Internal, "failed to marshal setting value: %v", err)
- }
- storeSettingValue = string(bytes)
-
+ storeSettingValue = payload.String()
case api.SettingWorkspaceApproval:
if !s.licenseService.IsFeatureEnabled(api.FeatureCustomApproval) {
return nil, status.Errorf(codes.PermissionDenied, api.FeatureCustomApproval.AccessErrorMessage())
}
- settingValue := request.Setting.Value.GetStringValue()
+ settingValue := request.Setting.Value.GetWorkspaceApprovalSettingValue().String()
payload := new(storepb.WorkspaceApprovalSetting)
if err := protojson.Unmarshal([]byte(settingValue), payload); err != nil {
return nil, status.Errorf(codes.Internal, "failed to unmarshal setting value: %v", err)
@@ -216,6 +237,73 @@ func (s *SettingService) SetSetting(ctx context.Context, request *v1pb.SetSettin
return nil, status.Errorf(codes.Internal, "failed to marshal setting value: %v", err)
}
storeSettingValue = string(bytes)
+ case api.SettingBrandingLogo:
+ if !s.licenseService.IsFeatureEnabled(api.FeatureBranding) {
+ return nil, status.Errorf(codes.PermissionDenied, api.FeatureBranding.AccessErrorMessage())
+ }
+ storeSettingValue = request.Setting.Value.GetStringValue()
+ case api.SettingPluginAgent:
+ settingValue := request.Setting.Value.GetAgentPluginSettingValue().String()
+ payload := new(storepb.AgentPluginSetting)
+ if err := protojson.Unmarshal([]byte(settingValue), payload); err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to unmarshal setting value: %v for %s", err, apiSettingName)
+ }
+ storeSettingValue = payload.String()
+ case api.SettingAppIM:
+ settingValue := request.Setting.Value.GetAppImSettingValue()
+ imType, err := convertToIMType(settingValue.ImType)
+ if err != nil {
+ return nil, err
+ }
+ payload := &api.SettingAppIMValue{
+ IMType: imType,
+ AppID: settingValue.AppId,
+ AppSecret: settingValue.AppSecret,
+ ExternalApproval: api.ExternalApproval{
+ Enabled: settingValue.ExternalApproval.Enabled,
+ ApprovalDefinitionID: settingValue.ExternalApproval.ApprovalDefinitionId,
+ },
+ }
+ if payload.IMType != api.IMTypeFeishu {
+ return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("unknown IM Type %s", payload.IMType))
+ }
+ if payload.ExternalApproval.Enabled {
+ if !s.licenseService.IsFeatureEnabled(api.FeatureIMApproval) {
+ return nil, status.Errorf(codes.PermissionDenied, api.FeatureIMApproval.AccessErrorMessage())
+ }
+
+ if payload.AppID == "" || payload.AppSecret == "" {
+ return nil, status.Errorf(codes.InvalidArgument, "application ID and secret cannot be empty")
+ }
+
+ p := s.feishuProvider
+ // clear token cache so that we won't use the previous token.
+ p.ClearTokenCache()
+
+ // check bot info
+ if _, err := p.GetBotID(ctx, feishu.TokenCtx{
+ AppID: payload.AppID,
+ AppSecret: payload.AppSecret,
+ }); err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to get bot id. Hint: check if bot is enabled")
+ }
+
+ // create approval definition
+ approvalDefinitionID, err := p.CreateApprovalDefinition(ctx, feishu.TokenCtx{
+ AppID: payload.AppID,
+ AppSecret: payload.AppSecret,
+ }, "")
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to create approval definition: %v", err)
+ }
+ payload.ExternalApproval.ApprovalDefinitionID = approvalDefinitionID
+ }
+
+ s, err := json.Marshal(payload)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to marshal approval setting: %v", err)
+ }
+ storeSettingValue = string(s)
default:
storeSettingValue = request.Setting.Value.GetStringValue()
}
@@ -231,22 +319,19 @@ func (s *SettingService) SetSetting(ctx context.Context, request *v1pb.SetSettin
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to convert setting message: %v", err)
}
- strippedSettingMessage, err := stripSensitiveData(settingMessage)
- if err != nil {
- return nil, status.Errorf(codes.Internal, "failed to strip sensitive data: %v", err)
- }
- return strippedSettingMessage, nil
+ return settingMessage, nil
}
func convertToSettingMessage(setting *store.SettingMessage) (*v1pb.Setting, error) {
+ settingName := fmt.Sprintf("%s%s", settingNamePrefix, setting.Name)
switch setting.Name {
case api.SettingWorkspaceMailDelivery:
storeValue := new(storepb.SMTPMailDeliverySetting)
if err := protojson.Unmarshal([]byte(setting.Value), storeValue); err != nil {
return nil, status.Errorf(codes.Internal, "failed to unmarshal setting value: %v", err)
}
- return &v1pb.Setting{
- Name: settingNamePrefix + string(setting.Name),
+ return stripSensitiveData(&v1pb.Setting{
+ Name: settingName,
Value: &v1pb.Value{
Value: &v1pb.Value_SmtpMailDeliverySettingValue{
SmtpMailDeliverySettingValue: &v1pb.SMTPMailDeliverySettingValue{
@@ -263,10 +348,70 @@ func convertToSettingMessage(setting *store.SettingMessage) (*v1pb.Setting, erro
},
},
},
+ })
+ case api.SettingAppIM:
+ apiValue := new(api.SettingAppIMValue)
+ if err := json.Unmarshal([]byte(setting.Value), apiValue); err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to unmarshal setting value: %v", err)
+ }
+ return &v1pb.Setting{
+ Name: settingName,
+ Value: &v1pb.Value{
+ Value: &v1pb.Value_AppImSettingValue{
+ AppImSettingValue: &v1pb.AppIMSetting{
+ ImType: convertV1IMType(apiValue.IMType),
+ AppId: apiValue.AppID,
+ AppSecret: apiValue.AppSecret,
+ ExternalApproval: &v1pb.AppIMSetting_ExternalApproval{
+ Enabled: apiValue.ExternalApproval.Enabled,
+ ApprovalDefinitionId: apiValue.ExternalApproval.ApprovalDefinitionID,
+ },
+ },
+ },
+ },
+ }, nil
+ case api.SettingPluginAgent:
+ v1Value := new(v1pb.AgentPluginSetting)
+ if err := protojson.Unmarshal([]byte(setting.Value), v1Value); err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to unmarshal setting value: %v", err)
+ }
+ return &v1pb.Setting{
+ Name: settingName,
+ Value: &v1pb.Value{
+ Value: &v1pb.Value_AgentPluginSettingValue{
+ AgentPluginSettingValue: v1Value,
+ },
+ },
+ }, nil
+ case api.SettingWorkspaceProfile:
+ v1Value := new(v1pb.WorkspaceProfileSetting)
+ if err := protojson.Unmarshal([]byte(setting.Value), v1Value); err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to unmarshal setting value: %v", err)
+ }
+ return &v1pb.Setting{
+ Name: settingName,
+ Value: &v1pb.Value{
+ Value: &v1pb.Value_WorkspaceProfileSettingValue{
+ WorkspaceProfileSettingValue: v1Value,
+ },
+ },
+ }, nil
+ case api.SettingWorkspaceApproval:
+ v1Value := new(v1pb.WorkspaceApprovalSetting)
+ if err := protojson.Unmarshal([]byte(setting.Value), v1Value); err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to unmarshal setting value: %v", err)
+ }
+ return &v1pb.Setting{
+ Name: settingName,
+ Value: &v1pb.Value{
+ Value: &v1pb.Value_WorkspaceApprovalSettingValue{
+ WorkspaceApprovalSettingValue: v1Value,
+ },
+ },
}, nil
default:
return &v1pb.Setting{
- Name: settingNamePrefix + string(setting.Name),
+ Name: settingName,
Value: &v1pb.Value{
Value: &v1pb.Value_StringValue{
StringValue: setting.Value,
@@ -276,6 +421,35 @@ func convertToSettingMessage(setting *store.SettingMessage) (*v1pb.Setting, erro
}
}
+func convertToIMType(imType v1pb.AppIMSetting_IMType) (api.IMType, error) {
+ var resp api.IMType
+ switch imType {
+ case v1pb.AppIMSetting_FEISHU:
+ resp = api.IMTypeFeishu
+ default:
+ return resp, status.Errorf(codes.InvalidArgument, "unknown im type %v", imType.String())
+ }
+ return resp, nil
+}
+
+func convertV1IMType(imType api.IMType) v1pb.AppIMSetting_IMType {
+ switch imType {
+ case api.IMTypeFeishu:
+ return v1pb.AppIMSetting_FEISHU
+ default:
+ return v1pb.AppIMSetting_IM_TYPE_UNSPECIFIED
+ }
+}
+
+func settingInWhitelist(name api.SettingName) bool {
+ for _, whitelist := range whitelistSettings {
+ if name == whitelist {
+ return true
+ }
+ }
+ return false
+}
+
func validateApprovalTemplate(template *storepb.ApprovalTemplate) error {
if template.Flow == nil {
return errors.Errorf("approval template cannot be nil")
diff --git a/backend/legacyapi/setting.go b/backend/legacyapi/setting.go
index bc9eff578c..e5d33e208b 100644
--- a/backend/legacyapi/setting.go
+++ b/backend/legacyapi/setting.go
@@ -86,15 +86,18 @@ func (find *SettingFind) String() string {
return string(str)
}
+// ExternalApproval is the external approval setting for app IM.
+type ExternalApproval struct {
+ Enabled bool `json:"enabled"`
+ ApprovalDefinitionID string `json:"approvalDefinitionID"`
+}
+
// SettingAppIMValue is the setting value of SettingAppIM type setting.
type SettingAppIMValue struct {
- IMType IMType `json:"imType"`
- AppID string `json:"appId"`
- AppSecret string `json:"appSecret"`
- ExternalApproval struct {
- Enabled bool `json:"enabled"`
- ApprovalDefinitionID string `json:"approvalDefinitionID"`
- } `json:"externalApproval"`
+ IMType IMType `json:"imType"`
+ AppID string `json:"appId"`
+ AppSecret string `json:"appSecret"`
+ ExternalApproval ExternalApproval `json:"externalApproval"`
}
// SettingWorkspaceMailDeliveryValue is the setting value of SettingMailDelivery type setting.
diff --git a/backend/server/server.go b/backend/server/server.go
index 43fc7f30d9..f71ceea07c 100644
--- a/backend/server/server.go
+++ b/backend/server/server.go
@@ -565,7 +565,7 @@ func NewServer(ctx context.Context, profile config.Profile) (*Server, error) {
v1pb.RegisterInstanceRoleServiceServer(s.grpcServer, v1.NewInstanceRoleService(s.store, s.dbFactory))
v1pb.RegisterOrgPolicyServiceServer(s.grpcServer, v1.NewOrgPolicyService(s.store, s.licenseService))
v1pb.RegisterIdentityProviderServiceServer(s.grpcServer, v1.NewIdentityProviderService(s.store, s.licenseService))
- v1pb.RegisterSettingServiceServer(s.grpcServer, v1.NewSettingService(s.store, &s.profile, s.licenseService, s.stateCfg))
+ v1pb.RegisterSettingServiceServer(s.grpcServer, v1.NewSettingService(s.store, &s.profile, s.licenseService, s.stateCfg, s.feishuProvider))
v1pb.RegisterAnomalyServiceServer(s.grpcServer, v1.NewAnomalyService(s.store))
v1pb.RegisterSQLServiceServer(s.grpcServer, v1.NewSQLService())
v1pb.RegisterExternalVersionControlServiceServer(s.grpcServer, v1.NewExternalVersionControlService(s.store))
diff --git a/backend/server/setting.go b/backend/server/setting.go
index 1086251f52..1daa0c9ad7 100644
--- a/backend/server/setting.go
+++ b/backend/server/setting.go
@@ -149,37 +149,39 @@ func (s *Server) registerSettingRoutes(g *echo.Group) {
}
settingPatch.Value = string(b)
}
+ }
- if settingPatch.Name == api.SettingWorkspaceMailDelivery {
- var value api.SettingWorkspaceMailDeliveryValue
- if err := json.Unmarshal([]byte(settingPatch.Value), &value); err != nil {
- return echo.NewHTTPError(http.StatusBadRequest, "Malformed setting value for mail delivery").SetInternal(err)
- }
- if settingPatch.ValidateOnly {
- var password string
- if v := value.SMTPPassword; v != nil {
- password = *v
- } else {
- var storeValue api.SettingWorkspaceMailDeliveryValue
- settingName := api.SettingWorkspaceMailDelivery
- storeMailDelivery, err := s.store.GetSettingV2(ctx, &store.FindSettingMessage{
- Name: &settingName,
- })
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, "Failed to get mail delivery setting").SetInternal(err)
- }
- if storeMailDelivery == nil {
- return echo.NewHTTPError(http.StatusInternalServerError, "Cannot get mail delivery setting").SetInternal(err)
- }
- if err := json.Unmarshal([]byte(storeMailDelivery.Value), &storeValue); err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, "Failed to unmarshal mail delivery setting value").SetInternal(err)
- }
- if storeValue.SMTPPassword != nil {
- password = *storeValue.SMTPPassword
- }
+ if settingPatch.Name == api.SettingWorkspaceMailDelivery {
+ value := api.SettingWorkspaceMailDeliveryValue{}
+ if err := json.Unmarshal([]byte(settingPatch.Value), &value); err != nil {
+ return echo.NewHTTPError(http.StatusInternalServerError, "Failed to unmarshal mail delivery setting value").SetInternal(err)
+ }
+
+ if settingPatch.ValidateOnly {
+ var password string
+ if v := value.SMTPPassword; v != nil {
+ password = *v
+ } else {
+ var storeValue api.SettingWorkspaceMailDeliveryValue
+ settingName := api.SettingWorkspaceMailDelivery
+ storeMailDelivery, err := s.store.GetSettingV2(ctx, &store.FindSettingMessage{
+ Name: &settingName,
+ })
+ if err != nil {
+ return echo.NewHTTPError(http.StatusInternalServerError, "Failed to get mail delivery setting").SetInternal(err)
+ }
+ if storeMailDelivery == nil {
+ return echo.NewHTTPError(http.StatusInternalServerError, "Cannot get mail delivery setting").SetInternal(err)
+ }
+ if err := json.Unmarshal([]byte(storeMailDelivery.Value), &storeValue); err != nil {
+ return echo.NewHTTPError(http.StatusInternalServerError, "Failed to unmarshal mail delivery setting value").SetInternal(err)
+ }
+ if storeValue.SMTPPassword != nil {
+ password = *storeValue.SMTPPassword
}
- email := mail.NewEmailMsg()
- email.SetFrom(fmt.Sprintf("Bytebase <%s>", value.SMTPFrom)).AddTo(value.SMTPTo).SetSubject("Test Email Subject").SetBody(`
+ }
+ email := mail.NewEmailMsg()
+ email.SetFrom(fmt.Sprintf("Bytebase <%s>", value.SMTPFrom)).AddTo(value.SMTPTo).SetSubject("Test Email Subject").SetBody(`
<!DOCTYPE html>
<html>
<head>
@@ -190,26 +192,19 @@ func (s *Server) registerSettingRoutes(g *echo.Group) {
</body>
</html>
`)
- client := mail.NewSMTPClient(value.SMTPServerHost, value.SMTPServerPort)
- client.SetAuthType(convertSMTPAuthType(value.SMTPAuthenticationType))
- client.SetAuthCredentials(value.SMTPUsername, password)
- client.SetEncryptionType(convertSMTPEncryptionType(value.SMTPEncryptionType))
- if err := client.SendMail(email); err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, "Failed to send test email").SetInternal(err)
- }
- if _, err := c.Response().Write([]byte("OK")); err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, "Failed to write response").SetInternal(err)
- }
- return nil
+ client := mail.NewSMTPClient(value.SMTPServerHost, value.SMTPServerPort)
+ client.SetAuthType(convertSMTPAuthType(value.SMTPAuthenticationType))
+ client.SetAuthCredentials(value.SMTPUsername, password)
+ client.SetEncryptionType(convertSMTPEncryptionType(value.SMTPEncryptionType))
+ if err := client.SendMail(email); err != nil {
+ return echo.NewHTTPError(http.StatusInternalServerError, "Failed to send test email").SetInternal(err)
}
+ if _, err := c.Response().Write([]byte("OK")); err != nil {
+ return echo.NewHTTPError(http.StatusInternalServerError, "Failed to write response").SetInternal(err)
+ }
+ return nil
}
- }
- if settingPatch.Name == api.SettingWorkspaceMailDelivery {
- value := api.SettingWorkspaceMailDeliveryValue{}
- if err := json.Unmarshal([]byte(settingPatch.Value), &value); err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, "Failed to unmarshal mail delivery setting value").SetInternal(err)
- }
storepbValue := convertAPIMailDeliveryValueToStorePb(&value)
bytes, err := protojson.Marshal(storepbValue)
if err != nil {
@@ -217,6 +212,7 @@ func (s *Server) registerSettingRoutes(g *echo.Group) {
}
settingPatch.Value = string(bytes)
}
+
setting, err := s.store.PatchSetting(ctx, settingPatch)
if err != nil {
if common.ErrorCode(err) == common.NotFound {
diff --git a/frontend/src/types/proto/v1/setting_service.ts b/frontend/src/types/proto/v1/setting_service.ts
index 2da2a293fa..c6a1febdac 100644
--- a/frontend/src/types/proto/v1/setting_service.ts
+++ b/frontend/src/types/proto/v1/setting_service.ts
@@ -1,9 +1,41 @@
/* eslint-disable */
import type { CallContext, CallOptions } from "nice-grpc-common";
import * as _m0 from "protobufjs/minimal";
+import { ParsedExpr } from "../google/api/expr/v1alpha1/syntax";
+import { Timestamp } from "../google/protobuf/timestamp";
+import { ApprovalTemplate } from "./review_service";
+import { PlanType, planTypeFromJSON, planTypeToJSON } from "./subscription_service";
export const protobufPackage = "bytebase.v1";
+export interface ListSettingsRequest {
+ /**
+ * The maximum number of settings to return. The service may return fewer than
+ * this value.
+ * If unspecified, at most 50 settings will be returned.
+ * The maximum value is 1000; values above 1000 will be coerced to 1000.
+ */
+ pageSize: number;
+ /**
+ * A page token, received from a previous `ListSettings` call.
+ * Provide this to retrieve the subsequent page.
+ *
+ * When paginating, all other parameters provided to `ListSettings` must match
+ * the call that provided the page token.
+ */
+ pageToken: string;
+}
+
+export interface ListSettingsResponse {
+ /** The settings from the specified request. */
+ settings: Setting[];
+ /**
+ * 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;
+}
+
/** The request message for getting a setting. */
export interface GetSettingRequest {
/** The resource name of the setting. */
@@ -44,6 +76,11 @@ export interface Value {
/** Defines this value as being a string value. */
stringValue?: string | undefined;
smtpMailDeliverySettingValue?: SMTPMailDeliverySettingValue | undefined;
+ appImSettingValue?: AppIMSetting | undefined;
+ agentPluginSettingValue?: AgentPluginSetting | undefined;
+ workspaceProfileSettingValue?: WorkspaceProfileSetting | undefined;
+ workspaceApprovalSettingValue?: WorkspaceApprovalSetting | undefined;
+ workspaceTrialSettingValue?: WorkspaceTrialSetting | undefined;
}
export interface SMTPMailDeliverySettingValue {
@@ -174,6 +211,239 @@ export function sMTPMailDeliverySettingValue_AuthenticationToJSON(
}
}
+export interface AppIMSetting {
+ imType: AppIMSetting_IMType;
+ appId: string;
+ appSecret: string;
+ externalApproval?: AppIMSetting_ExternalApproval;
+}
+
+export enum AppIMSetting_IMType {
+ IM_TYPE_UNSPECIFIED = 0,
+ FEISHU = 1,
+ UNRECOGNIZED = -1,
+}
+
+export function appIMSetting_IMTypeFromJSON(object: any): AppIMSetting_IMType {
+ switch (object) {
+ case 0:
+ case "IM_TYPE_UNSPECIFIED":
+ return AppIMSetting_IMType.IM_TYPE_UNSPECIFIED;
+ case 1:
+ case "FEISHU":
+ return AppIMSetting_IMType.FEISHU;
+ case -1:
+ case "UNRECOGNIZED":
+ default:
+ return AppIMSetting_IMType.UNRECOGNIZED;
+ }
+}
+
+export function appIMSetting_IMTypeToJSON(object: AppIMSetting_IMType): string {
+ switch (object) {
+ case AppIMSetting_IMType.IM_TYPE_UNSPECIFIED:
+ return "IM_TYPE_UNSPECIFIED";
+ case AppIMSetting_IMType.FEISHU:
+ return "FEISHU";
+ case AppIMSetting_IMType.UNRECOGNIZED:
+ default:
+ return "UNRECOGNIZED";
+ }
+}
+
+export interface AppIMSetting_ExternalApproval {
+ enabled: boolean;
+ approvalDefinitionId: string;
+}
+
+export interface AgentPluginSetting {
+ /** The URL for the agent API. */
+ url: string;
+ /** The token for the agent. */
+ token: string;
+}
+
+export interface WorkspaceProfileSetting {
+ /**
+ * The URL user visits Bytebase.
+ *
+ * The external URL is used for:
+ * 1. Constructing the correct callback URL when configuring the VCS provider. The callback URL points to the frontend.
+ * 2. Creating the correct webhook endpoint when configuring the project GitOps workflow. The webhook endpoint points to the backend.
+ */
+ externalUrl: string;
+ /** Disallow self-service signup, users can only be invited by the owner. */
+ disallowSignup: boolean;
+ /** Require 2FA for all users. */
+ require2fa: boolean;
+ /** outbound_ip_list is the outbound IP for Bytebase instance in SaaS mode. */
+ outboundIpList: string[];
+}
+
+export interface WorkspaceApprovalSetting {
+ rules: WorkspaceApprovalSetting_Rule[];
+}
+
+export interface WorkspaceApprovalSetting_Rule {
+ expression?: ParsedExpr;
+ template?: ApprovalTemplate;
+}
+
+export interface WorkspaceTrialSetting {
+ instanceCount: number;
+ expireTime?: Date;
+ issuedTime?: Date;
+ subject: string;
+ orgName: string;
+ plan: PlanType;
+}
+
+function createBaseListSettingsRequest(): ListSettingsRequest {
+ return { pageSize: 0, pageToken: "" };
+}
+
+export const ListSettingsRequest = {
+ encode(message: ListSettingsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.pageSize !== 0) {
+ writer.uint32(8).int32(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ writer.uint32(18).string(message.pageToken);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListSettingsRequest {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseListSettingsRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 8) {
+ break;
+ }
+
+ message.pageSize = reader.int32();
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.pageToken = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ListSettingsRequest {
+ return {
+ pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ };
+ },
+
+ toJSON(message: ListSettingsRequest): unknown {
+ const obj: any = {};
+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ return obj;
+ },
+
+ create(base?: DeepPartial<ListSettingsRequest>): ListSettingsRequest {
+ return ListSettingsRequest.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<ListSettingsRequest>): ListSettingsRequest {
+ const message = createBaseListSettingsRequest();
+ message.pageSize = object.pageSize ?? 0;
+ message.pageToken = object.pageToken ?? "";
+ return message;
+ },
+};
+
+function createBaseListSettingsResponse(): ListSettingsResponse {
+ return { settings: [], nextPageToken: "" };
+}
+
+export const ListSettingsResponse = {
+ encode(message: ListSettingsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ for (const v of message.settings) {
+ Setting.encode(v!, writer.uint32(10).fork()).ldelim();
+ }
+ if (message.nextPageToken !== "") {
+ writer.uint32(18).string(message.nextPageToken);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListSettingsResponse {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseListSettingsResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.settings.push(Setting.decode(reader, reader.uint32()));
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.nextPageToken = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ListSettingsResponse {
+ return {
+ settings: Array.isArray(object?.settings) ? object.settings.map((e: any) => Setting.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ };
+ },
+
+ toJSON(message: ListSettingsResponse): unknown {
+ const obj: any = {};
+ if (message.settings) {
+ obj.settings = message.settings.map((e) => e ? Setting.toJSON(e) : undefined);
+ } else {
+ obj.settings = [];
+ }
+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
+ return obj;
+ },
+
+ create(base?: DeepPartial<ListSettingsResponse>): ListSettingsResponse {
+ return ListSettingsResponse.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<ListSettingsResponse>): ListSettingsResponse {
+ const message = createBaseListSettingsResponse();
+ message.settings = object.settings?.map((e) => Setting.fromPartial(e)) || [];
+ message.nextPageToken = object.nextPageToken ?? "";
+ return message;
+ },
+};
+
function createBaseGetSettingRequest(): GetSettingRequest {
return { name: "" };
}
@@ -433,7 +703,15 @@ export const Setting = {
};
function createBaseValue(): Value {
- return { stringValue: undefined, smtpMailDeliverySettingValue: undefined };
+ return {
+ stringValue: undefined,
+ smtpMailDeliverySettingValue: undefined,
+ appImSettingValue: undefined,
+ agentPluginSettingValue: undefined,
+ workspaceProfileSettingValue: undefined,
+ workspaceApprovalSettingValue: undefined,
+ workspaceTrialSettingValue: undefined,
+ };
}
export const Value = {
@@ -444,6 +722,21 @@ export const Value = {
if (message.smtpMailDeliverySettingValue !== undefined) {
SMTPMailDeliverySettingValue.encode(message.smtpMailDeliverySettingValue, writer.uint32(18).fork()).ldelim();
}
+ if (message.appImSettingValue !== undefined) {
+ AppIMSetting.encode(message.appImSettingValue, writer.uint32(26).fork()).ldelim();
+ }
+ if (message.agentPluginSettingValue !== undefined) {
+ AgentPluginSetting.encode(message.agentPluginSettingValue, writer.uint32(34).fork()).ldelim();
+ }
+ if (message.workspaceProfileSettingValue !== undefined) {
+ WorkspaceProfileSetting.encode(message.workspaceProfileSettingValue, writer.uint32(42).fork()).ldelim();
+ }
+ if (message.workspaceApprovalSettingValue !== undefined) {
+ WorkspaceApprovalSetting.encode(message.workspaceApprovalSettingValue, writer.uint32(50).fork()).ldelim();
+ }
+ if (message.workspaceTrialSettingValue !== undefined) {
+ WorkspaceTrialSetting.encode(message.workspaceTrialSettingValue, writer.uint32(58).fork()).ldelim();
+ }
return writer;
},
@@ -468,6 +761,41 @@ export const Value = {
message.smtpMailDeliverySettingValue = SMTPMailDeliverySettingValue.decode(reader, reader.uint32());
continue;
+ case 3:
+ if (tag !== 26) {
+ break;
+ }
+
+ message.appImSettingValue = AppIMSetting.decode(reader, reader.uint32());
+ continue;
+ case 4:
+ if (tag !== 34) {
+ break;
+ }
+
+ message.agentPluginSettingValue = AgentPluginSetting.decode(reader, reader.uint32());
+ continue;
+ case 5:
+ if (tag !== 42) {
+ break;
+ }
+
+ message.workspaceProfileSettingValue = WorkspaceProfileSetting.decode(reader, reader.uint32());
+ continue;
+ case 6:
+ if (tag !== 50) {
+ break;
+ }
+
+ message.workspaceApprovalSettingValue = WorkspaceApprovalSetting.decode(reader, reader.uint32());
+ continue;
+ case 7:
+ if (tag !== 58) {
+ break;
+ }
+
+ message.workspaceTrialSettingValue = WorkspaceTrialSetting.decode(reader, reader.uint32());
+ continue;
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -483,6 +811,19 @@ export const Value = {
smtpMailDeliverySettingValue: isSet(object.smtpMailDeliverySettingValue)
? SMTPMailDeliverySettingValue.fromJSON(object.smtpMailDeliverySettingValue)
: undefined,
+ appImSettingValue: isSet(object.appImSettingValue) ? AppIMSetting.fromJSON(object.appImSettingValue) : undefined,
+ agentPluginSettingValue: isSet(object.agentPluginSettingValue)
+ ? AgentPluginSetting.fromJSON(object.agentPluginSettingValue)
+ : undefined,
+ workspaceProfileSettingValue: isSet(object.workspaceProfileSettingValue)
+ ? WorkspaceProfileSetting.fromJSON(object.workspaceProfileSettingValue)
+ : undefined,
+ workspaceApprovalSettingValue: isSet(object.workspaceApprovalSettingValue)
+ ? WorkspaceApprovalSetting.fromJSON(object.workspaceApprovalSettingValue)
+ : undefined,
+ workspaceTrialSettingValue: isSet(object.workspaceTrialSettingValue)
+ ? WorkspaceTrialSetting.fromJSON(object.workspaceTrialSettingValue)
+ : undefined,
};
},
@@ -493,6 +834,23 @@ export const Value = {
(obj.smtpMailDeliverySettingValue = message.smtpMailDeliverySettingValue
? SMTPMailDeliverySettingValue.toJSON(message.smtpMailDeliverySettingValue)
: undefined);
+ message.appImSettingValue !== undefined &&
+ (obj.appImSettingValue = message.appImSettingValue ? AppIMSetting.toJSON(message.appImSettingValue) : undefined);
+ message.agentPluginSettingValue !== undefined && (obj.agentPluginSettingValue = message.agentPluginSettingValue
+ ? AgentPluginSetting.toJSON(message.agentPluginSettingValue)
+ : undefined);
+ message.workspaceProfileSettingValue !== undefined &&
+ (obj.workspaceProfileSettingValue = message.workspaceProfileSettingValue
+ ? WorkspaceProfileSetting.toJSON(message.workspaceProfileSettingValue)
+ : undefined);
+ message.workspaceApprovalSettingValue !== undefined &&
+ (obj.workspaceApprovalSettingValue = message.workspaceApprovalSettingValue
+ ? WorkspaceApprovalSetting.toJSON(message.workspaceApprovalSettingValue)
+ : undefined);
+ message.workspaceTrialSettingValue !== undefined &&
+ (obj.workspaceTrialSettingValue = message.workspaceTrialSettingValue
+ ? WorkspaceTrialSetting.toJSON(message.workspaceTrialSettingValue)
+ : undefined);
return obj;
},
@@ -507,6 +865,25 @@ export const Value = {
(object.smtpMailDeliverySettingValue !== undefined && object.smtpMailDeliverySettingValue !== null)
? SMTPMailDeliverySettingValue.fromPartial(object.smtpMailDeliverySettingValue)
: undefined;
+ message.appImSettingValue = (object.appImSettingValue !== undefined && object.appImSettingValue !== null)
+ ? AppIMSetting.fromPartial(object.appImSettingValue)
+ : undefined;
+ message.agentPluginSettingValue =
+ (object.agentPluginSettingValue !== undefined && object.agentPluginSettingValue !== null)
+ ? AgentPluginSetting.fromPartial(object.agentPluginSettingValue)
+ : undefined;
+ message.workspaceProfileSettingValue =
+ (object.workspaceProfileSettingValue !== undefined && object.workspaceProfileSettingValue !== null)
+ ? WorkspaceProfileSetting.fromPartial(object.workspaceProfileSettingValue)
+ : undefined;
+ message.workspaceApprovalSettingValue =
+ (object.workspaceApprovalSettingValue !== undefined && object.workspaceApprovalSettingValue !== null)
+ ? WorkspaceApprovalSetting.fromPartial(object.workspaceApprovalSettingValue)
+ : undefined;
+ message.workspaceTrialSettingValue =
+ (object.workspaceTrialSettingValue !== undefined && object.workspaceTrialSettingValue !== null)
+ ? WorkspaceTrialSetting.fromPartial(object.workspaceTrialSettingValue)
+ : undefined;
return message;
},
};
@@ -715,75 +1092,695 @@ export const SMTPMailDeliverySettingValue = {
},
};
-export type SettingServiceDefinition = typeof SettingServiceDefinition;
-export const SettingServiceDefinition = {
- name: "SettingService",
- fullName: "bytebase.v1.SettingService",
- methods: {
- getSetting: {
- name: "GetSetting",
- requestType: GetSettingRequest,
- requestStream: false,
- responseType: Setting,
- responseStream: false,
- options: {
- _unknownFields: {
- 8410: [new Uint8Array([4, 110, 97, 109, 101])],
- 578365826: [
- new Uint8Array([
- 23,
- 18,
- 21,
- 47,
- 118,
- 49,
- 47,
- 123,
- 110,
- 97,
- 109,
- 101,
- 61,
- 115,
- 101,
- 116,
- 116,
- 105,
- 110,
- 103,
- 115,
- 47,
- 42,
- 125,
- ]),
- ],
- },
- },
- },
- setSetting: {
- name: "SetSetting",
- requestType: SetSettingRequest,
- requestStream: false,
- responseType: Setting,
- responseStream: false,
- options: {
- _unknownFields: {
- 578365826: [
- new Uint8Array([
- 40,
- 58,
- 7,
- 115,
- 101,
- 116,
- 116,
- 105,
- 110,
- 103,
- 50,
- 29,
- 47,
- 118,
+function createBaseAppIMSetting(): AppIMSetting {
+ return { imType: 0, appId: "", appSecret: "", externalApproval: undefined };
+}
+
+export const AppIMSetting = {
+ encode(message: AppIMSetting, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.imType !== 0) {
+ writer.uint32(8).int32(message.imType);
+ }
+ if (message.appId !== "") {
+ writer.uint32(18).string(message.appId);
+ }
+ if (message.appSecret !== "") {
+ writer.uint32(26).string(message.appSecret);
+ }
+ if (message.externalApproval !== undefined) {
+ AppIMSetting_ExternalApproval.encode(message.externalApproval, writer.uint32(34).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): AppIMSetting {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAppIMSetting();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 8) {
+ break;
+ }
+
+ message.imType = reader.int32() as any;
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.appId = reader.string();
+ continue;
+ case 3:
+ if (tag !== 26) {
+ break;
+ }
+
+ message.appSecret = reader.string();
+ continue;
+ case 4:
+ if (tag !== 34) {
+ break;
+ }
+
+ message.externalApproval = AppIMSetting_ExternalApproval.decode(reader, reader.uint32());
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): AppIMSetting {
+ return {
+ imType: isSet(object.imType) ? appIMSetting_IMTypeFromJSON(object.imType) : 0,
+ appId: isSet(object.appId) ? String(object.appId) : "",
+ appSecret: isSet(object.appSecret) ? String(object.appSecret) : "",
+ externalApproval: isSet(object.externalApproval)
+ ? AppIMSetting_ExternalApproval.fromJSON(object.externalApproval)
+ : undefined,
+ };
+ },
+
+ toJSON(message: AppIMSetting): unknown {
+ const obj: any = {};
+ message.imType !== undefined && (obj.imType = appIMSetting_IMTypeToJSON(message.imType));
+ message.appId !== undefined && (obj.appId = message.appId);
+ message.appSecret !== undefined && (obj.appSecret = message.appSecret);
+ message.externalApproval !== undefined && (obj.externalApproval = message.externalApproval
+ ? AppIMSetting_ExternalApproval.toJSON(message.externalApproval)
+ : undefined);
+ return obj;
+ },
+
+ create(base?: DeepPartial<AppIMSetting>): AppIMSetting {
+ return AppIMSetting.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<AppIMSetting>): AppIMSetting {
+ const message = createBaseAppIMSetting();
+ message.imType = object.imType ?? 0;
+ message.appId = object.appId ?? "";
+ message.appSecret = object.appSecret ?? "";
+ message.externalApproval = (object.externalApproval !== undefined && object.externalApproval !== null)
+ ? AppIMSetting_ExternalApproval.fromPartial(object.externalApproval)
+ : undefined;
+ return message;
+ },
+};
+
+function createBaseAppIMSetting_ExternalApproval(): AppIMSetting_ExternalApproval {
+ return { enabled: false, approvalDefinitionId: "" };
+}
+
+export const AppIMSetting_ExternalApproval = {
+ encode(message: AppIMSetting_ExternalApproval, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.enabled === true) {
+ writer.uint32(8).bool(message.enabled);
+ }
+ if (message.approvalDefinitionId !== "") {
+ writer.uint32(18).string(message.approvalDefinitionId);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): AppIMSetting_ExternalApproval {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAppIMSetting_ExternalApproval();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 8) {
+ break;
+ }
+
+ message.enabled = reader.bool();
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.approvalDefinitionId = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): AppIMSetting_ExternalApproval {
+ return {
+ enabled: isSet(object.enabled) ? Boolean(object.enabled) : false,
+ approvalDefinitionId: isSet(object.approvalDefinitionId) ? String(object.approvalDefinitionId) : "",
+ };
+ },
+
+ toJSON(message: AppIMSetting_ExternalApproval): unknown {
+ const obj: any = {};
+ message.enabled !== undefined && (obj.enabled = message.enabled);
+ message.approvalDefinitionId !== undefined && (obj.approvalDefinitionId = message.approvalDefinitionId);
+ return obj;
+ },
+
+ create(base?: DeepPartial<AppIMSetting_ExternalApproval>): AppIMSetting_ExternalApproval {
+ return AppIMSetting_ExternalApproval.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<AppIMSetting_ExternalApproval>): AppIMSetting_ExternalApproval {
+ const message = createBaseAppIMSetting_ExternalApproval();
+ message.enabled = object.enabled ?? false;
+ message.approvalDefinitionId = object.approvalDefinitionId ?? "";
+ return message;
+ },
+};
+
+function createBaseAgentPluginSetting(): AgentPluginSetting {
+ return { url: "", token: "" };
+}
+
+export const AgentPluginSetting = {
+ encode(message: AgentPluginSetting, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.url !== "") {
+ writer.uint32(10).string(message.url);
+ }
+ if (message.token !== "") {
+ writer.uint32(18).string(message.token);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): AgentPluginSetting {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAgentPluginSetting();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.url = reader.string();
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.token = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): AgentPluginSetting {
+ return { url: isSet(object.url) ? String(object.url) : "", token: isSet(object.token) ? String(object.token) : "" };
+ },
+
+ toJSON(message: AgentPluginSetting): unknown {
+ const obj: any = {};
+ message.url !== undefined && (obj.url = message.url);
+ message.token !== undefined && (obj.token = message.token);
+ return obj;
+ },
+
+ create(base?: DeepPartial<AgentPluginSetting>): AgentPluginSetting {
+ return AgentPluginSetting.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<AgentPluginSetting>): AgentPluginSetting {
+ const message = createBaseAgentPluginSetting();
+ message.url = object.url ?? "";
+ message.token = object.token ?? "";
+ return message;
+ },
+};
+
+function createBaseWorkspaceProfileSetting(): WorkspaceProfileSetting {
+ return { externalUrl: "", disallowSignup: false, require2fa: false, outboundIpList: [] };
+}
+
+export const WorkspaceProfileSetting = {
+ encode(message: WorkspaceProfileSetting, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.externalUrl !== "") {
+ writer.uint32(10).string(message.externalUrl);
+ }
+ if (message.disallowSignup === true) {
+ writer.uint32(16).bool(message.disallowSignup);
+ }
+ if (message.require2fa === true) {
+ writer.uint32(24).bool(message.require2fa);
+ }
+ for (const v of message.outboundIpList) {
+ writer.uint32(34).string(v!);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): WorkspaceProfileSetting {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseWorkspaceProfileSetting();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.externalUrl = reader.string();
+ continue;
+ case 2:
+ if (tag !== 16) {
+ break;
+ }
+
+ message.disallowSignup = reader.bool();
+ continue;
+ case 3:
+ if (tag !== 24) {
+ break;
+ }
+
+ message.require2fa = reader.bool();
+ continue;
+ case 4:
+ if (tag !== 34) {
+ break;
+ }
+
+ message.outboundIpList.push(reader.string());
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): WorkspaceProfileSetting {
+ return {
+ externalUrl: isSet(object.externalUrl) ? String(object.externalUrl) : "",
+ disallowSignup: isSet(object.disallowSignup) ? Boolean(object.disallowSignup) : false,
+ require2fa: isSet(object.require2fa) ? Boolean(object.require2fa) : false,
+ outboundIpList: Array.isArray(object?.outboundIpList) ? object.outboundIpList.map((e: any) => String(e)) : [],
+ };
+ },
+
+ toJSON(message: WorkspaceProfileSetting): unknown {
+ const obj: any = {};
+ message.externalUrl !== undefined && (obj.externalUrl = message.externalUrl);
+ message.disallowSignup !== undefined && (obj.disallowSignup = message.disallowSignup);
+ message.require2fa !== undefined && (obj.require2fa = message.require2fa);
+ if (message.outboundIpList) {
+ obj.outboundIpList = message.outboundIpList.map((e) => e);
+ } else {
+ obj.outboundIpList = [];
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<WorkspaceProfileSetting>): WorkspaceProfileSetting {
+ return WorkspaceProfileSetting.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<WorkspaceProfileSetting>): WorkspaceProfileSetting {
+ const message = createBaseWorkspaceProfileSetting();
+ message.externalUrl = object.externalUrl ?? "";
+ message.disallowSignup = object.disallowSignup ?? false;
+ message.require2fa = object.require2fa ?? false;
+ message.outboundIpList = object.outboundIpList?.map((e) => e) || [];
+ return message;
+ },
+};
+
+function createBaseWorkspaceApprovalSetting(): WorkspaceApprovalSetting {
+ return { rules: [] };
+}
+
+export const WorkspaceApprovalSetting = {
+ encode(message: WorkspaceApprovalSetting, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ for (const v of message.rules) {
+ WorkspaceApprovalSetting_Rule.encode(v!, writer.uint32(10).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): WorkspaceApprovalSetting {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseWorkspaceApprovalSetting();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.rules.push(WorkspaceApprovalSetting_Rule.decode(reader, reader.uint32()));
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): WorkspaceApprovalSetting {
+ return {
+ rules: Array.isArray(object?.rules)
+ ? object.rules.map((e: any) => WorkspaceApprovalSetting_Rule.fromJSON(e))
+ : [],
+ };
+ },
+
+ toJSON(message: WorkspaceApprovalSetting): unknown {
+ const obj: any = {};
+ if (message.rules) {
+ obj.rules = message.rules.map((e) => e ? WorkspaceApprovalSetting_Rule.toJSON(e) : undefined);
+ } else {
+ obj.rules = [];
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<WorkspaceApprovalSetting>): WorkspaceApprovalSetting {
+ return WorkspaceApprovalSetting.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<WorkspaceApprovalSetting>): WorkspaceApprovalSetting {
+ const message = createBaseWorkspaceApprovalSetting();
+ message.rules = object.rules?.map((e) => WorkspaceApprovalSetting_Rule.fromPartial(e)) || [];
+ return message;
+ },
+};
+
+function createBaseWorkspaceApprovalSetting_Rule(): WorkspaceApprovalSetting_Rule {
+ return { expression: undefined, template: undefined };
+}
+
+export const WorkspaceApprovalSetting_Rule = {
+ encode(message: WorkspaceApprovalSetting_Rule, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.expression !== undefined) {
+ ParsedExpr.encode(message.expression, writer.uint32(10).fork()).ldelim();
+ }
+ if (message.template !== undefined) {
+ ApprovalTemplate.encode(message.template, writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): WorkspaceApprovalSetting_Rule {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseWorkspaceApprovalSetting_Rule();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.expression = ParsedExpr.decode(reader, reader.uint32());
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.template = ApprovalTemplate.decode(reader, reader.uint32());
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): WorkspaceApprovalSetting_Rule {
+ return {
+ expression: isSet(object.expression) ? ParsedExpr.fromJSON(object.expression) : undefined,
+ template: isSet(object.template) ? ApprovalTemplate.fromJSON(object.template) : undefined,
+ };
+ },
+
+ toJSON(message: WorkspaceApprovalSetting_Rule): unknown {
+ const obj: any = {};
+ message.expression !== undefined &&
+ (obj.expression = message.expression ? ParsedExpr.toJSON(message.expression) : undefined);
+ message.template !== undefined &&
+ (obj.template = message.template ? ApprovalTemplate.toJSON(message.template) : undefined);
+ return obj;
+ },
+
+ create(base?: DeepPartial<WorkspaceApprovalSetting_Rule>): WorkspaceApprovalSetting_Rule {
+ return WorkspaceApprovalSetting_Rule.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<WorkspaceApprovalSetting_Rule>): WorkspaceApprovalSetting_Rule {
+ const message = createBaseWorkspaceApprovalSetting_Rule();
+ message.expression = (object.expression !== undefined && object.expression !== null)
+ ? ParsedExpr.fromPartial(object.expression)
+ : undefined;
+ message.template = (object.template !== undefined && object.template !== null)
+ ? ApprovalTemplate.fromPartial(object.template)
+ : undefined;
+ return message;
+ },
+};
+
+function createBaseWorkspaceTrialSetting(): WorkspaceTrialSetting {
+ return { instanceCount: 0, expireTime: undefined, issuedTime: undefined, subject: "", orgName: "", plan: 0 };
+}
+
+export const WorkspaceTrialSetting = {
+ encode(message: WorkspaceTrialSetting, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.instanceCount !== 0) {
+ writer.uint32(8).int32(message.instanceCount);
+ }
+ if (message.expireTime !== undefined) {
+ Timestamp.encode(toTimestamp(message.expireTime), writer.uint32(18).fork()).ldelim();
+ }
+ if (message.issuedTime !== undefined) {
+ Timestamp.encode(toTimestamp(message.issuedTime), writer.uint32(26).fork()).ldelim();
+ }
+ if (message.subject !== "") {
+ writer.uint32(34).string(message.subject);
+ }
+ if (message.orgName !== "") {
+ writer.uint32(42).string(message.orgName);
+ }
+ if (message.plan !== 0) {
+ writer.uint32(48).int32(message.plan);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): WorkspaceTrialSetting {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseWorkspaceTrialSetting();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 8) {
+ break;
+ }
+
+ message.instanceCount = reader.int32();
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.expireTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
+ continue;
+ case 3:
+ if (tag !== 26) {
+ break;
+ }
+
+ message.issuedTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
+ continue;
+ case 4:
+ if (tag !== 34) {
+ break;
+ }
+
+ message.subject = reader.string();
+ continue;
+ case 5:
+ if (tag !== 42) {
+ break;
+ }
+
+ message.orgName = reader.string();
+ continue;
+ case 6:
+ if (tag !== 48) {
+ break;
+ }
+
+ message.plan = reader.int32() as any;
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): WorkspaceTrialSetting {
+ return {
+ instanceCount: isSet(object.instanceCount) ? Number(object.instanceCount) : 0,
+ expireTime: isSet(object.expireTime) ? fromJsonTimestamp(object.expireTime) : undefined,
+ issuedTime: isSet(object.issuedTime) ? fromJsonTimestamp(object.issuedTime) : undefined,
+ subject: isSet(object.subject) ? String(object.subject) : "",
+ orgName: isSet(object.orgName) ? String(object.orgName) : "",
+ plan: isSet(object.plan) ? planTypeFromJSON(object.plan) : 0,
+ };
+ },
+
+ toJSON(message: WorkspaceTrialSetting): unknown {
+ const obj: any = {};
+ message.instanceCount !== undefined && (obj.instanceCount = Math.round(message.instanceCount));
+ message.expireTime !== undefined && (obj.expireTime = message.expireTime.toISOString());
+ message.issuedTime !== undefined && (obj.issuedTime = message.issuedTime.toISOString());
+ message.subject !== undefined && (obj.subject = message.subject);
+ message.orgName !== undefined && (obj.orgName = message.orgName);
+ message.plan !== undefined && (obj.plan = planTypeToJSON(message.plan));
+ return obj;
+ },
+
+ create(base?: DeepPartial<WorkspaceTrialSetting>): WorkspaceTrialSetting {
+ return WorkspaceTrialSetting.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<WorkspaceTrialSetting>): WorkspaceTrialSetting {
+ const message = createBaseWorkspaceTrialSetting();
+ message.instanceCount = object.instanceCount ?? 0;
+ message.expireTime = object.expireTime ?? undefined;
+ message.issuedTime = object.issuedTime ?? undefined;
+ message.subject = object.subject ?? "";
+ message.orgName = object.orgName ?? "";
+ message.plan = object.plan ?? 0;
+ return message;
+ },
+};
+
+export type SettingServiceDefinition = typeof SettingServiceDefinition;
+export const SettingServiceDefinition = {
+ name: "SettingService",
+ fullName: "bytebase.v1.SettingService",
+ methods: {
+ listSettings: {
+ name: "ListSettings",
+ requestType: ListSettingsRequest,
+ requestStream: false,
+ responseType: ListSettingsResponse,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 8410: [new Uint8Array([0])],
+ 578365826: [new Uint8Array([14, 18, 12, 47, 118, 49, 47, 115, 101, 116, 116, 105, 110, 103, 115])],
+ },
+ },
+ },
+ getSetting: {
+ name: "GetSetting",
+ requestType: GetSettingRequest,
+ requestStream: false,
+ responseType: Setting,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 8410: [new Uint8Array([4, 110, 97, 109, 101])],
+ 578365826: [
+ new Uint8Array([
+ 23,
+ 18,
+ 21,
+ 47,
+ 118,
+ 49,
+ 47,
+ 123,
+ 110,
+ 97,
+ 109,
+ 101,
+ 61,
+ 115,
+ 101,
+ 116,
+ 116,
+ 105,
+ 110,
+ 103,
+ 115,
+ 47,
+ 42,
+ 125,
+ ]),
+ ],
+ },
+ },
+ },
+ setSetting: {
+ name: "SetSetting",
+ requestType: SetSettingRequest,
+ requestStream: false,
+ responseType: Setting,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 578365826: [
+ new Uint8Array([
+ 40,
+ 58,
+ 7,
+ 115,
+ 101,
+ 116,
+ 116,
+ 105,
+ 110,
+ 103,
+ 50,
+ 29,
+ 47,
+ 118,
49,
47,
123,
@@ -820,11 +1817,19 @@ export const SettingServiceDefinition = {
} as const;
export interface SettingServiceImplementation<CallContextExt = {}> {
+ listSettings(
+ request: ListSettingsRequest,
+ context: CallContext & CallContextExt,
+ ): Promise<DeepPartial<ListSettingsResponse>>;
getSetting(request: GetSettingRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Setting>>;
setSetting(request: SetSettingRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Setting>>;
}
export interface SettingServiceClient<CallOptionsExt = {}> {
+ listSettings(
+ request: DeepPartial<ListSettingsRequest>,
+ options?: CallOptions & CallOptionsExt,
+ ): Promise<ListSettingsResponse>;
getSetting(request: DeepPartial<GetSettingRequest>, options?: CallOptions & CallOptionsExt): Promise<Setting>;
setSetting(request: DeepPartial<SetSettingRequest>, options?: CallOptions & CallOptionsExt): Promise<Setting>;
}
@@ -836,6 +1841,28 @@ export type DeepPartial<T> = T extends Builtin ? T
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
+function toTimestamp(date: Date): Timestamp {
+ const seconds = date.getTime() / 1_000;
+ const nanos = (date.getTime() % 1_000) * 1_000_000;
+ return { seconds, nanos };
+}
+
+function fromTimestamp(t: Timestamp): Date {
+ let millis = t.seconds * 1_000;
+ millis += t.nanos / 1_000_000;
+ return new Date(millis);
+}
+
+function fromJsonTimestamp(o: any): Date {
+ if (o instanceof Date) {
+ return o;
+ } else if (typeof o === "string") {
+ return new Date(o);
+ } else {
+ return fromTimestamp(Timestamp.fromJSON(o));
+ }
+}
+
function isSet(value: any): boolean {
return value !== null && value !== undefined;
}
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 0d6754eb98..79310bc7bb 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -338,14 +338,36 @@
- [RolloutService](#bytebase-v1-RolloutService)
+- [v1/subscription_service.proto](#v1_subscription_service-proto)
+ - [GetSubscriptionRequest](#bytebase-v1-GetSubscriptionRequest)
+ - [PatchSubscription](#bytebase-v1-PatchSubscription)
+ - [Subscription](#bytebase-v1-Subscription)
+ - [TrialSubscription](#bytebase-v1-TrialSubscription)
+ - [TrialSubscriptionRequest](#bytebase-v1-TrialSubscriptionRequest)
+ - [UpdateSubscriptionRequest](#bytebase-v1-UpdateSubscriptionRequest)
+
+ - [PlanType](#bytebase-v1-PlanType)
+
+ - [SubscriptionService](#bytebase-v1-SubscriptionService)
+
- [v1/setting_service.proto](#v1_setting_service-proto)
+ - [AgentPluginSetting](#bytebase-v1-AgentPluginSetting)
+ - [AppIMSetting](#bytebase-v1-AppIMSetting)
+ - [AppIMSetting.ExternalApproval](#bytebase-v1-AppIMSetting-ExternalApproval)
- [GetSettingRequest](#bytebase-v1-GetSettingRequest)
- [GetSettingResponse](#bytebase-v1-GetSettingResponse)
+ - [ListSettingsRequest](#bytebase-v1-ListSettingsRequest)
+ - [ListSettingsResponse](#bytebase-v1-ListSettingsResponse)
- [SMTPMailDeliverySettingValue](#bytebase-v1-SMTPMailDeliverySettingValue)
- [SetSettingRequest](#bytebase-v1-SetSettingRequest)
- [Setting](#bytebase-v1-Setting)
- [Value](#bytebase-v1-Value)
+ - [WorkspaceApprovalSetting](#bytebase-v1-WorkspaceApprovalSetting)
+ - [WorkspaceApprovalSetting.Rule](#bytebase-v1-WorkspaceApprovalSetting-Rule)
+ - [WorkspaceProfileSetting](#bytebase-v1-WorkspaceProfileSetting)
+ - [WorkspaceTrialSetting](#bytebase-v1-WorkspaceTrialSetting)
+ - [AppIMSetting.IMType](#bytebase-v1-AppIMSetting-IMType)
- [SMTPMailDeliverySettingValue.Authentication](#bytebase-v1-SMTPMailDeliverySettingValue-Authentication)
- [SMTPMailDeliverySettingValue.Encryption](#bytebase-v1-SMTPMailDeliverySettingValue-Encryption)
@@ -373,18 +395,6 @@
- [SQLService](#bytebase-v1-SQLService)
-- [v1/subscription_service.proto](#v1_subscription_service-proto)
- - [GetSubscriptionRequest](#bytebase-v1-GetSubscriptionRequest)
- - [PatchSubscription](#bytebase-v1-PatchSubscription)
- - [Subscription](#bytebase-v1-Subscription)
- - [TrialSubscription](#bytebase-v1-TrialSubscription)
- - [TrialSubscriptionRequest](#bytebase-v1-TrialSubscriptionRequest)
- - [UpdateSubscriptionRequest](#bytebase-v1-UpdateSubscriptionRequest)
-
- - [PlanType](#bytebase-v1-PlanType)
-
- - [SubscriptionService](#bytebase-v1-SubscriptionService)
-
- [Scalar Value Types](#scalar-value-types)
@@ -5206,6 +5216,141 @@ The plan&#39;s `name` field is used to identify the plan to update. Format: proj
+<a name="v1_subscription_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## v1/subscription_service.proto
+
+
+
+<a name="bytebase-v1-GetSubscriptionRequest"></a>
+
+### GetSubscriptionRequest
+
+
+
+
+
+
+
+<a name="bytebase-v1-PatchSubscription"></a>
+
+### PatchSubscription
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| license | [string](#string) | | |
+
+
+
+
+
+
+<a name="bytebase-v1-Subscription"></a>
+
+### Subscription
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| instance_count | [int32](#int32) | | |
+| expires_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| started_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| plan | [PlanType](#bytebase-v1-PlanType) | | |
+| trialing | [bool](#bool) | | |
+| org_id | [string](#string) | | |
+| org_name | [string](#string) | | |
+
+
+
+
+
+
+<a name="bytebase-v1-TrialSubscription"></a>
+
+### TrialSubscription
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| plan | [PlanType](#bytebase-v1-PlanType) | | |
+| days | [int32](#int32) | | |
+| instance_count | [int32](#int32) | | |
+
+
+
+
+
+
+<a name="bytebase-v1-TrialSubscriptionRequest"></a>
+
+### TrialSubscriptionRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| trial | [TrialSubscription](#bytebase-v1-TrialSubscription) | | |
+
+
+
+
+
+
+<a name="bytebase-v1-UpdateSubscriptionRequest"></a>
+
+### UpdateSubscriptionRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| patch | [PatchSubscription](#bytebase-v1-PatchSubscription) | | |
+
+
+
+
+
+
+
+
+<a name="bytebase-v1-PlanType"></a>
+
+### PlanType
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| PLAN_TYPE_UNSPECIFIED | 0 | |
+| FREE | 1 | |
+| TEAM | 2 | |
+| ENTERPRISE | 3 | |
+
+
+
+
+
+
+
+<a name="bytebase-v1-SubscriptionService"></a>
+
+### SubscriptionService
+
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetSubscription | [GetSubscriptionRequest](#bytebase-v1-GetSubscriptionRequest) | [Subscription](#bytebase-v1-Subscription) | |
+| UpdateSubscription | [UpdateSubscriptionRequest](#bytebase-v1-UpdateSubscriptionRequest) | [Subscription](#bytebase-v1-Subscription) | |
+| TrialSubscription | [TrialSubscriptionRequest](#bytebase-v1-TrialSubscriptionRequest) | [Subscription](#bytebase-v1-Subscription) | |
+
+
+
+
+
<a name="v1_setting_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
@@ -5213,6 +5358,56 @@ The plan&#39;s `name` field is used to identify the plan to update. Format: proj
+<a name="bytebase-v1-AgentPluginSetting"></a>
+
+### AgentPluginSetting
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| url | [string](#string) | | The URL for the agent API. |
+| token | [string](#string) | | The token for the agent. |
+
+
+
+
+
+
+<a name="bytebase-v1-AppIMSetting"></a>
+
+### AppIMSetting
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| im_type | [AppIMSetting.IMType](#bytebase-v1-AppIMSetting-IMType) | | |
+| app_id | [string](#string) | | |
+| app_secret | [string](#string) | | |
+| external_approval | [AppIMSetting.ExternalApproval](#bytebase-v1-AppIMSetting-ExternalApproval) | | |
+
+
+
+
+
+
+<a name="bytebase-v1-AppIMSetting-ExternalApproval"></a>
+
+### AppIMSetting.ExternalApproval
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| enabled | [bool](#bool) | | |
+| approval_definition_id | [string](#string) | | |
+
+
+
+
+
+
<a name="bytebase-v1-GetSettingRequest"></a>
### GetSettingRequest
@@ -5243,6 +5438,40 @@ The response message for getting a setting.
+<a name="bytebase-v1-ListSettingsRequest"></a>
+
+### ListSettingsRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| page_size | [int32](#int32) | | The maximum number of settings to return. The service may return fewer than this value. If unspecified, at most 50 settings 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 `ListSettings` call. Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListSettings` must match the call that provided the page token. |
+
+
+
+
+
+
+<a name="bytebase-v1-ListSettingsResponse"></a>
+
+### ListSettingsResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| settings | [Setting](#bytebase-v1-Setting) | repeated | The settings 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-SMTPMailDeliverySettingValue"></a>
### SMTPMailDeliverySettingValue
@@ -5312,6 +5541,82 @@ The data in setting value.
| ----- | ---- | ----- | ----------- |
| string_value | [string](#string) | | Defines this value as being a string value. |
| smtp_mail_delivery_setting_value | [SMTPMailDeliverySettingValue](#bytebase-v1-SMTPMailDeliverySettingValue) | | |
+| app_im_setting_value | [AppIMSetting](#bytebase-v1-AppIMSetting) | | |
+| agent_plugin_setting_value | [AgentPluginSetting](#bytebase-v1-AgentPluginSetting) | | |
+| workspace_profile_setting_value | [WorkspaceProfileSetting](#bytebase-v1-WorkspaceProfileSetting) | | |
+| workspace_approval_setting_value | [WorkspaceApprovalSetting](#bytebase-v1-WorkspaceApprovalSetting) | | |
+| workspace_trial_setting_value | [WorkspaceTrialSetting](#bytebase-v1-WorkspaceTrialSetting) | | |
+
+
+
+
+
+
+<a name="bytebase-v1-WorkspaceApprovalSetting"></a>
+
+### WorkspaceApprovalSetting
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| rules | [WorkspaceApprovalSetting.Rule](#bytebase-v1-WorkspaceApprovalSetting-Rule) | repeated | |
+
+
+
+
+
+
+<a name="bytebase-v1-WorkspaceApprovalSetting-Rule"></a>
+
+### WorkspaceApprovalSetting.Rule
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| expression | [google.api.expr.v1alpha1.ParsedExpr](#google-api-expr-v1alpha1-ParsedExpr) | | |
+| template | [ApprovalTemplate](#bytebase-v1-ApprovalTemplate) | | |
+
+
+
+
+
+
+<a name="bytebase-v1-WorkspaceProfileSetting"></a>
+
+### WorkspaceProfileSetting
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| external_url | [string](#string) | | The URL user visits Bytebase.
+
+The external URL is used for: 1. Constructing the correct callback URL when configuring the VCS provider. The callback URL points to the frontend. 2. Creating the correct webhook endpoint when configuring the project GitOps workflow. The webhook endpoint points to the backend. |
+| disallow_signup | [bool](#bool) | | Disallow self-service signup, users can only be invited by the owner. |
+| require_2fa | [bool](#bool) | | Require 2FA for all users. |
+| outbound_ip_list | [string](#string) | repeated | outbound_ip_list is the outbound IP for Bytebase instance in SaaS mode. |
+
+
+
+
+
+
+<a name="bytebase-v1-WorkspaceTrialSetting"></a>
+
+### WorkspaceTrialSetting
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| instance_count | [int32](#int32) | | |
+| expire_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| issued_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| subject | [string](#string) | | |
+| org_name | [string](#string) | | |
+| plan | [PlanType](#bytebase-v1-PlanType) | | |
@@ -5320,6 +5625,18 @@ The data in setting value.
+<a name="bytebase-v1-AppIMSetting-IMType"></a>
+
+### AppIMSetting.IMType
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| IM_TYPE_UNSPECIFIED | 0 | |
+| FEISHU | 1 | |
+
+
+
<a name="bytebase-v1-SMTPMailDeliverySettingValue-Authentication"></a>
### SMTPMailDeliverySettingValue.Authentication
@@ -5360,6 +5677,7 @@ We support three types of SMTP encryption: NONE, STARTTLS, and SSL/TLS.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
+| ListSettings | [ListSettingsRequest](#bytebase-v1-ListSettingsRequest) | [ListSettingsResponse](#bytebase-v1-ListSettingsResponse) | |
| GetSetting | [GetSettingRequest](#bytebase-v1-GetSettingRequest) | [Setting](#bytebase-v1-Setting) | |
| SetSetting | [SetSettingRequest](#bytebase-v1-SetSettingRequest) | [Setting](#bytebase-v1-Setting) | |
@@ -5643,141 +5961,6 @@ The sheet&#39;s `name` field is used to identify the sheet to update. Format: pr
-<a name="v1_subscription_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-
-## v1/subscription_service.proto
-
-
-
-<a name="bytebase-v1-GetSubscriptionRequest"></a>
-
-### GetSubscriptionRequest
-
-
-
-
-
-
-
-<a name="bytebase-v1-PatchSubscription"></a>
-
-### PatchSubscription
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| license | [string](#string) | | |
-
-
-
-
-
-
-<a name="bytebase-v1-Subscription"></a>
-
-### Subscription
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| instance_count | [int32](#int32) | | |
-| expires_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| started_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| plan | [PlanType](#bytebase-v1-PlanType) | | |
-| trialing | [bool](#bool) | | |
-| org_id | [string](#string) | | |
-| org_name | [string](#string) | | |
-
-
-
-
-
-
-<a name="bytebase-v1-TrialSubscription"></a>
-
-### TrialSubscription
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| plan | [PlanType](#bytebase-v1-PlanType) | | |
-| days | [int32](#int32) | | |
-| instance_count | [int32](#int32) | | |
-
-
-
-
-
-
-<a name="bytebase-v1-TrialSubscriptionRequest"></a>
-
-### TrialSubscriptionRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| trial | [TrialSubscription](#bytebase-v1-TrialSubscription) | | |
-
-
-
-
-
-
-<a name="bytebase-v1-UpdateSubscriptionRequest"></a>
-
-### UpdateSubscriptionRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| patch | [PatchSubscription](#bytebase-v1-PatchSubscription) | | |
-
-
-
-
-
-
-
-
-<a name="bytebase-v1-PlanType"></a>
-
-### PlanType
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| PLAN_TYPE_UNSPECIFIED | 0 | |
-| FREE | 1 | |
-| TEAM | 2 | |
-| ENTERPRISE | 3 | |
-
-
-
-
-
-
-
-<a name="bytebase-v1-SubscriptionService"></a>
-
-### SubscriptionService
-
-
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetSubscription | [GetSubscriptionRequest](#bytebase-v1-GetSubscriptionRequest) | [Subscription](#bytebase-v1-Subscription) | |
-| UpdateSubscription | [UpdateSubscriptionRequest](#bytebase-v1-UpdateSubscriptionRequest) | [Subscription](#bytebase-v1-Subscription) | |
-| TrialSubscription | [TrialSubscriptionRequest](#bytebase-v1-TrialSubscriptionRequest) | [Subscription](#bytebase-v1-Subscription) | |
-
-
-
-
-
## Scalar Value Types
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
diff --git a/proto/generated-go/v1/setting_service.pb.go b/proto/generated-go/v1/setting_service.pb.go
index fd69072695..fdd39860da 100644
--- a/proto/generated-go/v1/setting_service.pb.go
+++ b/proto/generated-go/v1/setting_service.pb.go
@@ -8,8 +8,10 @@ package v1
import (
_ "google.golang.org/genproto/googleapis/api/annotations"
+ v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
@@ -71,7 +73,7 @@ func (x SMTPMailDeliverySettingValue_Encryption) Number() protoreflect.EnumNumbe
// Deprecated: Use SMTPMailDeliverySettingValue_Encryption.Descriptor instead.
func (SMTPMailDeliverySettingValue_Encryption) EnumDescriptor() ([]byte, []int) {
- return file_v1_setting_service_proto_rawDescGZIP(), []int{5, 0}
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{7, 0}
}
// We support four types of SMTP authentication: NONE, PLAIN, LOGIN, and CRAM-MD5.
@@ -127,7 +129,175 @@ func (x SMTPMailDeliverySettingValue_Authentication) Number() protoreflect.EnumN
// Deprecated: Use SMTPMailDeliverySettingValue_Authentication.Descriptor instead.
func (SMTPMailDeliverySettingValue_Authentication) EnumDescriptor() ([]byte, []int) {
- return file_v1_setting_service_proto_rawDescGZIP(), []int{5, 1}
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{7, 1}
+}
+
+type AppIMSetting_IMType int32
+
+const (
+ AppIMSetting_IM_TYPE_UNSPECIFIED AppIMSetting_IMType = 0
+ AppIMSetting_FEISHU AppIMSetting_IMType = 1
+)
+
+// Enum value maps for AppIMSetting_IMType.
+var (
+ AppIMSetting_IMType_name = map[int32]string{
+ 0: "IM_TYPE_UNSPECIFIED",
+ 1: "FEISHU",
+ }
+ AppIMSetting_IMType_value = map[string]int32{
+ "IM_TYPE_UNSPECIFIED": 0,
+ "FEISHU": 1,
+ }
+)
+
+func (x AppIMSetting_IMType) Enum() *AppIMSetting_IMType {
+ p := new(AppIMSetting_IMType)
+ *p = x
+ return p
+}
+
+func (x AppIMSetting_IMType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (AppIMSetting_IMType) Descriptor() protoreflect.EnumDescriptor {
+ return file_v1_setting_service_proto_enumTypes[2].Descriptor()
+}
+
+func (AppIMSetting_IMType) Type() protoreflect.EnumType {
+ return &file_v1_setting_service_proto_enumTypes[2]
+}
+
+func (x AppIMSetting_IMType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use AppIMSetting_IMType.Descriptor instead.
+func (AppIMSetting_IMType) EnumDescriptor() ([]byte, []int) {
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{8, 0}
+}
+
+type ListSettingsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The maximum number of settings to return. The service may return fewer than
+ // this value.
+ // If unspecified, at most 50 settings 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 `ListSettings` call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to `ListSettings` 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 *ListSettingsRequest) Reset() {
+ *x = ListSettingsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_setting_service_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListSettingsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListSettingsRequest) ProtoMessage() {}
+
+func (x *ListSettingsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_setting_service_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 ListSettingsRequest.ProtoReflect.Descriptor instead.
+func (*ListSettingsRequest) Descriptor() ([]byte, []int) {
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ListSettingsRequest) GetPageSize() int32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListSettingsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+type ListSettingsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The settings from the specified request.
+ Settings []*Setting `protobuf:"bytes,1,rep,name=settings,proto3" json:"settings,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 *ListSettingsResponse) Reset() {
+ *x = ListSettingsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_setting_service_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListSettingsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListSettingsResponse) ProtoMessage() {}
+
+func (x *ListSettingsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_setting_service_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 ListSettingsResponse.ProtoReflect.Descriptor instead.
+func (*ListSettingsResponse) Descriptor() ([]byte, []int) {
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ListSettingsResponse) GetSettings() []*Setting {
+ if x != nil {
+ return x.Settings
+ }
+ return nil
+}
+
+func (x *ListSettingsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
}
// The request message for getting a setting.
@@ -143,7 +313,7 @@ type GetSettingRequest struct {
func (x *GetSettingRequest) Reset() {
*x = GetSettingRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_setting_service_proto_msgTypes[0]
+ mi := &file_v1_setting_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -156,7 +326,7 @@ func (x *GetSettingRequest) String() string {
func (*GetSettingRequest) ProtoMessage() {}
func (x *GetSettingRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[0]
+ mi := &file_v1_setting_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -169,7 +339,7 @@ func (x *GetSettingRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetSettingRequest.ProtoReflect.Descriptor instead.
func (*GetSettingRequest) Descriptor() ([]byte, []int) {
- return file_v1_setting_service_proto_rawDescGZIP(), []int{0}
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{2}
}
func (x *GetSettingRequest) GetName() string {
@@ -191,7 +361,7 @@ type GetSettingResponse struct {
func (x *GetSettingResponse) Reset() {
*x = GetSettingResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_setting_service_proto_msgTypes[1]
+ mi := &file_v1_setting_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -204,7 +374,7 @@ func (x *GetSettingResponse) String() string {
func (*GetSettingResponse) ProtoMessage() {}
func (x *GetSettingResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[1]
+ mi := &file_v1_setting_service_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -217,7 +387,7 @@ func (x *GetSettingResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetSettingResponse.ProtoReflect.Descriptor instead.
func (*GetSettingResponse) Descriptor() ([]byte, []int) {
- return file_v1_setting_service_proto_rawDescGZIP(), []int{1}
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{3}
}
func (x *GetSettingResponse) GetSetting() *Setting {
@@ -243,7 +413,7 @@ type SetSettingRequest struct {
func (x *SetSettingRequest) Reset() {
*x = SetSettingRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_setting_service_proto_msgTypes[2]
+ mi := &file_v1_setting_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -256,7 +426,7 @@ func (x *SetSettingRequest) String() string {
func (*SetSettingRequest) ProtoMessage() {}
func (x *SetSettingRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[2]
+ mi := &file_v1_setting_service_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -269,7 +439,7 @@ func (x *SetSettingRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use SetSettingRequest.ProtoReflect.Descriptor instead.
func (*SetSettingRequest) Descriptor() ([]byte, []int) {
- return file_v1_setting_service_proto_rawDescGZIP(), []int{2}
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{4}
}
func (x *SetSettingRequest) GetSetting() *Setting {
@@ -304,7 +474,7 @@ type Setting struct {
func (x *Setting) Reset() {
*x = Setting{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_setting_service_proto_msgTypes[3]
+ mi := &file_v1_setting_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -317,7 +487,7 @@ func (x *Setting) String() string {
func (*Setting) ProtoMessage() {}
func (x *Setting) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[3]
+ mi := &file_v1_setting_service_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -330,7 +500,7 @@ func (x *Setting) ProtoReflect() protoreflect.Message {
// Deprecated: Use Setting.ProtoReflect.Descriptor instead.
func (*Setting) Descriptor() ([]byte, []int) {
- return file_v1_setting_service_proto_rawDescGZIP(), []int{3}
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{5}
}
func (x *Setting) GetName() string {
@@ -359,13 +529,18 @@ type Value struct {
//
// *Value_StringValue
// *Value_SmtpMailDeliverySettingValue
+ // *Value_AppImSettingValue
+ // *Value_AgentPluginSettingValue
+ // *Value_WorkspaceProfileSettingValue
+ // *Value_WorkspaceApprovalSettingValue
+ // *Value_WorkspaceTrialSettingValue
Value isValue_Value `protobuf_oneof:"value"`
}
func (x *Value) Reset() {
*x = Value{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_setting_service_proto_msgTypes[4]
+ mi := &file_v1_setting_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -378,7 +553,7 @@ func (x *Value) String() string {
func (*Value) ProtoMessage() {}
func (x *Value) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[4]
+ mi := &file_v1_setting_service_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -391,7 +566,7 @@ func (x *Value) ProtoReflect() protoreflect.Message {
// Deprecated: Use Value.ProtoReflect.Descriptor instead.
func (*Value) Descriptor() ([]byte, []int) {
- return file_v1_setting_service_proto_rawDescGZIP(), []int{4}
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{6}
}
func (m *Value) GetValue() isValue_Value {
@@ -415,6 +590,41 @@ func (x *Value) GetSmtpMailDeliverySettingValue() *SMTPMailDeliverySettingValue
return nil
}
+func (x *Value) GetAppImSettingValue() *AppIMSetting {
+ if x, ok := x.GetValue().(*Value_AppImSettingValue); ok {
+ return x.AppImSettingValue
+ }
+ return nil
+}
+
+func (x *Value) GetAgentPluginSettingValue() *AgentPluginSetting {
+ if x, ok := x.GetValue().(*Value_AgentPluginSettingValue); ok {
+ return x.AgentPluginSettingValue
+ }
+ return nil
+}
+
+func (x *Value) GetWorkspaceProfileSettingValue() *WorkspaceProfileSetting {
+ if x, ok := x.GetValue().(*Value_WorkspaceProfileSettingValue); ok {
+ return x.WorkspaceProfileSettingValue
+ }
+ return nil
+}
+
+func (x *Value) GetWorkspaceApprovalSettingValue() *WorkspaceApprovalSetting {
+ if x, ok := x.GetValue().(*Value_WorkspaceApprovalSettingValue); ok {
+ return x.WorkspaceApprovalSettingValue
+ }
+ return nil
+}
+
+func (x *Value) GetWorkspaceTrialSettingValue() *WorkspaceTrialSetting {
+ if x, ok := x.GetValue().(*Value_WorkspaceTrialSettingValue); ok {
+ return x.WorkspaceTrialSettingValue
+ }
+ return nil
+}
+
type isValue_Value interface {
isValue_Value()
}
@@ -428,10 +638,40 @@ type Value_SmtpMailDeliverySettingValue struct {
SmtpMailDeliverySettingValue *SMTPMailDeliverySettingValue `protobuf:"bytes,2,opt,name=smtp_mail_delivery_setting_value,json=smtpMailDeliverySettingValue,proto3,oneof"`
}
+type Value_AppImSettingValue struct {
+ AppImSettingValue *AppIMSetting `protobuf:"bytes,3,opt,name=app_im_setting_value,json=appImSettingValue,proto3,oneof"`
+}
+
+type Value_AgentPluginSettingValue struct {
+ AgentPluginSettingValue *AgentPluginSetting `protobuf:"bytes,4,opt,name=agent_plugin_setting_value,json=agentPluginSettingValue,proto3,oneof"`
+}
+
+type Value_WorkspaceProfileSettingValue struct {
+ WorkspaceProfileSettingValue *WorkspaceProfileSetting `protobuf:"bytes,5,opt,name=workspace_profile_setting_value,json=workspaceProfileSettingValue,proto3,oneof"`
+}
+
+type Value_WorkspaceApprovalSettingValue struct {
+ WorkspaceApprovalSettingValue *WorkspaceApprovalSetting `protobuf:"bytes,6,opt,name=workspace_approval_setting_value,json=workspaceApprovalSettingValue,proto3,oneof"`
+}
+
+type Value_WorkspaceTrialSettingValue struct {
+ WorkspaceTrialSettingValue *WorkspaceTrialSetting `protobuf:"bytes,7,opt,name=workspace_trial_setting_value,json=workspaceTrialSettingValue,proto3,oneof"`
+}
+
func (*Value_StringValue) isValue_Value() {}
func (*Value_SmtpMailDeliverySettingValue) isValue_Value() {}
+func (*Value_AppImSettingValue) isValue_Value() {}
+
+func (*Value_AgentPluginSettingValue) isValue_Value() {}
+
+func (*Value_WorkspaceProfileSettingValue) isValue_Value() {}
+
+func (*Value_WorkspaceApprovalSettingValue) isValue_Value() {}
+
+func (*Value_WorkspaceTrialSettingValue) isValue_Value() {}
+
type SMTPMailDeliverySettingValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -461,7 +701,7 @@ type SMTPMailDeliverySettingValue struct {
func (x *SMTPMailDeliverySettingValue) Reset() {
*x = SMTPMailDeliverySettingValue{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_setting_service_proto_msgTypes[5]
+ mi := &file_v1_setting_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -474,7 +714,7 @@ func (x *SMTPMailDeliverySettingValue) String() string {
func (*SMTPMailDeliverySettingValue) ProtoMessage() {}
func (x *SMTPMailDeliverySettingValue) ProtoReflect() protoreflect.Message {
- mi := &file_v1_setting_service_proto_msgTypes[5]
+ mi := &file_v1_setting_service_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -487,7 +727,7 @@ func (x *SMTPMailDeliverySettingValue) ProtoReflect() protoreflect.Message {
// Deprecated: Use SMTPMailDeliverySettingValue.ProtoReflect.Descriptor instead.
func (*SMTPMailDeliverySettingValue) Descriptor() ([]byte, []int) {
- return file_v1_setting_service_proto_rawDescGZIP(), []int{5}
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{7}
}
func (x *SMTPMailDeliverySettingValue) GetServer() string {
@@ -567,198 +807,809 @@ func (x *SMTPMailDeliverySettingValue) GetTo() string {
return ""
}
-var File_v1_setting_service_proto protoreflect.FileDescriptor
+type AppIMSetting struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
-var file_v1_setting_service_proto_rawDesc = []byte{
- 0x0a, 0x18, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 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, 0x22,
- 0x2c, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x44, 0x0a,
- 0x12, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74,
- 0x69, 0x6e, 0x67, 0x22, 0x6d, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
- 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74,
- 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x42,
- 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a,
- 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e,
- 0x6c, 0x79, 0x22, 0x47, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
- 0x65, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56,
- 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x05,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73,
- 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x73, 0x0a, 0x20, 0x73, 0x6d,
- 0x74, 0x70, 0x5f, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79,
- 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x76, 0x31, 0x2e, 0x53, 0x4d, 0x54, 0x50, 0x4d, 0x61, 0x69, 0x6c, 0x44, 0x65, 0x6c, 0x69, 0x76,
- 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48,
- 0x00, 0x52, 0x1c, 0x73, 0x6d, 0x74, 0x70, 0x4d, 0x61, 0x69, 0x6c, 0x44, 0x65, 0x6c, 0x69, 0x76,
- 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42,
- 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xda, 0x05, 0x0a, 0x1c, 0x53, 0x4d, 0x54,
- 0x50, 0x4d, 0x61, 0x69, 0x6c, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74,
- 0x74, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72,
- 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65,
- 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
- 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x54, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x4d, 0x54, 0x50, 0x4d, 0x61, 0x69, 0x6c,
- 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x56,
- 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52,
- 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x02, 0x63,
- 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x63, 0x61, 0x88, 0x01, 0x01,
- 0x12, 0x15, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52,
- 0x03, 0x6b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18,
- 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x88, 0x01, 0x01,
- 0x12, 0x60, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x4d, 0x54, 0x50, 0x4d, 0x61, 0x69, 0x6c, 0x44,
- 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f,
- 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09,
- 0x48, 0x03, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x88, 0x01, 0x01, 0x12,
- 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66,
- 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x02, 0x74, 0x6f, 0x22, 0x6e, 0x0a, 0x0a, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
- 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a,
- 0x0f, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45,
- 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x49, 0x4f, 0x4e,
- 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x54, 0x4c, 0x53, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x45,
- 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x53, 0x4c, 0x5f, 0x54, 0x4c,
- 0x53, 0x10, 0x03, 0x22, 0x9a, 0x01, 0x0a, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69,
- 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e,
- 0x54, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
- 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e,
- 0x54, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12,
- 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f,
- 0x4e, 0x5f, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54,
- 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x47, 0x49,
- 0x4e, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43,
- 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x52, 0x41, 0x4d, 0x5f, 0x4d, 0x44, 0x35, 0x10, 0x04,
- 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x63, 0x61, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6b, 0x65, 0x79, 0x42,
- 0x07, 0x0a, 0x05, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x73,
- 0x73, 0x77, 0x6f, 0x72, 0x64, 0x32, 0xee, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
- 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53,
- 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x24, 0xda, 0x41,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31,
- 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f,
- 0x2a, 0x7d, 0x12, 0x72, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
- 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,
- 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,
- 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x07,
- 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73, 0x65,
- 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69,
- 0x6e, 0x67, 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,
+ ImType AppIMSetting_IMType `protobuf:"varint,1,opt,name=im_type,json=imType,proto3,enum=bytebase.v1.AppIMSetting_IMType" json:"im_type,omitempty"`
+ AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
+ AppSecret string `protobuf:"bytes,3,opt,name=app_secret,json=appSecret,proto3" json:"app_secret,omitempty"`
+ ExternalApproval *AppIMSetting_ExternalApproval `protobuf:"bytes,4,opt,name=external_approval,json=externalApproval,proto3" json:"external_approval,omitempty"`
}
-var (
- file_v1_setting_service_proto_rawDescOnce sync.Once
- file_v1_setting_service_proto_rawDescData = file_v1_setting_service_proto_rawDesc
-)
+func (x *AppIMSetting) Reset() {
+ *x = AppIMSetting{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_setting_service_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
-func file_v1_setting_service_proto_rawDescGZIP() []byte {
- file_v1_setting_service_proto_rawDescOnce.Do(func() {
- file_v1_setting_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_setting_service_proto_rawDescData)
- })
- return file_v1_setting_service_proto_rawDescData
+func (x *AppIMSetting) String() string {
+ return protoimpl.X.MessageStringOf(x)
}
-var file_v1_setting_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
-var file_v1_setting_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
-var file_v1_setting_service_proto_goTypes = []interface{}{
- (SMTPMailDeliverySettingValue_Encryption)(0), // 0: bytebase.v1.SMTPMailDeliverySettingValue.Encryption
- (SMTPMailDeliverySettingValue_Authentication)(0), // 1: bytebase.v1.SMTPMailDeliverySettingValue.Authentication
- (*GetSettingRequest)(nil), // 2: bytebase.v1.GetSettingRequest
- (*GetSettingResponse)(nil), // 3: bytebase.v1.GetSettingResponse
- (*SetSettingRequest)(nil), // 4: bytebase.v1.SetSettingRequest
- (*Setting)(nil), // 5: bytebase.v1.Setting
- (*Value)(nil), // 6: bytebase.v1.Value
- (*SMTPMailDeliverySettingValue)(nil), // 7: bytebase.v1.SMTPMailDeliverySettingValue
+func (*AppIMSetting) ProtoMessage() {}
+
+func (x *AppIMSetting) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_setting_service_proto_msgTypes[8]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
}
-var file_v1_setting_service_proto_depIdxs = []int32{
- 5, // 0: bytebase.v1.GetSettingResponse.setting:type_name -> bytebase.v1.Setting
- 5, // 1: bytebase.v1.SetSettingRequest.setting:type_name -> bytebase.v1.Setting
- 6, // 2: bytebase.v1.Setting.value:type_name -> bytebase.v1.Value
- 7, // 3: bytebase.v1.Value.smtp_mail_delivery_setting_value:type_name -> bytebase.v1.SMTPMailDeliverySettingValue
- 0, // 4: bytebase.v1.SMTPMailDeliverySettingValue.encryption:type_name -> bytebase.v1.SMTPMailDeliverySettingValue.Encryption
- 1, // 5: bytebase.v1.SMTPMailDeliverySettingValue.authentication:type_name -> bytebase.v1.SMTPMailDeliverySettingValue.Authentication
- 2, // 6: bytebase.v1.SettingService.GetSetting:input_type -> bytebase.v1.GetSettingRequest
- 4, // 7: bytebase.v1.SettingService.SetSetting:input_type -> bytebase.v1.SetSettingRequest
- 5, // 8: bytebase.v1.SettingService.GetSetting:output_type -> bytebase.v1.Setting
- 5, // 9: bytebase.v1.SettingService.SetSetting:output_type -> bytebase.v1.Setting
- 8, // [8:10] is the sub-list for method output_type
- 6, // [6:8] is the sub-list for method input_type
- 6, // [6:6] is the sub-list for extension type_name
- 6, // [6:6] is the sub-list for extension extendee
- 0, // [0:6] is the sub-list for field type_name
+
+// Deprecated: Use AppIMSetting.ProtoReflect.Descriptor instead.
+func (*AppIMSetting) Descriptor() ([]byte, []int) {
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{8}
}
-func init() { file_v1_setting_service_proto_init() }
-func file_v1_setting_service_proto_init() {
- if File_v1_setting_service_proto != nil {
- return
+func (x *AppIMSetting) GetImType() AppIMSetting_IMType {
+ if x != nil {
+ return x.ImType
}
- if !protoimpl.UnsafeEnabled {
- file_v1_setting_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetSettingRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_setting_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetSettingResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_setting_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SetSettingRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
+ return AppIMSetting_IM_TYPE_UNSPECIFIED
+}
+
+func (x *AppIMSetting) GetAppId() string {
+ if x != nil {
+ return x.AppId
+ }
+ return ""
+}
+
+func (x *AppIMSetting) GetAppSecret() string {
+ if x != nil {
+ return x.AppSecret
+ }
+ return ""
+}
+
+func (x *AppIMSetting) GetExternalApproval() *AppIMSetting_ExternalApproval {
+ if x != nil {
+ return x.ExternalApproval
+ }
+ return nil
+}
+
+type AgentPluginSetting struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The URL for the agent API.
+ Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
+ // The token for the agent.
+ Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
+}
+
+func (x *AgentPluginSetting) Reset() {
+ *x = AgentPluginSetting{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_setting_service_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AgentPluginSetting) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AgentPluginSetting) ProtoMessage() {}
+
+func (x *AgentPluginSetting) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_setting_service_proto_msgTypes[9]
+ 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 AgentPluginSetting.ProtoReflect.Descriptor instead.
+func (*AgentPluginSetting) Descriptor() ([]byte, []int) {
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *AgentPluginSetting) GetUrl() string {
+ if x != nil {
+ return x.Url
+ }
+ return ""
+}
+
+func (x *AgentPluginSetting) GetToken() string {
+ if x != nil {
+ return x.Token
+ }
+ return ""
+}
+
+type WorkspaceProfileSetting struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The URL user visits Bytebase.
+ //
+ // The external URL is used for:
+ // 1. Constructing the correct callback URL when configuring the VCS provider. The callback URL points to the frontend.
+ // 2. Creating the correct webhook endpoint when configuring the project GitOps workflow. The webhook endpoint points to the backend.
+ ExternalUrl string `protobuf:"bytes,1,opt,name=external_url,json=externalUrl,proto3" json:"external_url,omitempty"`
+ // Disallow self-service signup, users can only be invited by the owner.
+ DisallowSignup bool `protobuf:"varint,2,opt,name=disallow_signup,json=disallowSignup,proto3" json:"disallow_signup,omitempty"`
+ // Require 2FA for all users.
+ Require_2Fa bool `protobuf:"varint,3,opt,name=require_2fa,json=require2fa,proto3" json:"require_2fa,omitempty"`
+ // outbound_ip_list is the outbound IP for Bytebase instance in SaaS mode.
+ OutboundIpList []string `protobuf:"bytes,4,rep,name=outbound_ip_list,json=outboundIpList,proto3" json:"outbound_ip_list,omitempty"`
+}
+
+func (x *WorkspaceProfileSetting) Reset() {
+ *x = WorkspaceProfileSetting{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_setting_service_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WorkspaceProfileSetting) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkspaceProfileSetting) ProtoMessage() {}
+
+func (x *WorkspaceProfileSetting) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_setting_service_proto_msgTypes[10]
+ 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 WorkspaceProfileSetting.ProtoReflect.Descriptor instead.
+func (*WorkspaceProfileSetting) Descriptor() ([]byte, []int) {
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *WorkspaceProfileSetting) GetExternalUrl() string {
+ if x != nil {
+ return x.ExternalUrl
+ }
+ return ""
+}
+
+func (x *WorkspaceProfileSetting) GetDisallowSignup() bool {
+ if x != nil {
+ return x.DisallowSignup
+ }
+ return false
+}
+
+func (x *WorkspaceProfileSetting) GetRequire_2Fa() bool {
+ if x != nil {
+ return x.Require_2Fa
+ }
+ return false
+}
+
+func (x *WorkspaceProfileSetting) GetOutboundIpList() []string {
+ if x != nil {
+ return x.OutboundIpList
+ }
+ return nil
+}
+
+type WorkspaceApprovalSetting struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Rules []*WorkspaceApprovalSetting_Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
+}
+
+func (x *WorkspaceApprovalSetting) Reset() {
+ *x = WorkspaceApprovalSetting{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_setting_service_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WorkspaceApprovalSetting) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkspaceApprovalSetting) ProtoMessage() {}
+
+func (x *WorkspaceApprovalSetting) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_setting_service_proto_msgTypes[11]
+ 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 WorkspaceApprovalSetting.ProtoReflect.Descriptor instead.
+func (*WorkspaceApprovalSetting) Descriptor() ([]byte, []int) {
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *WorkspaceApprovalSetting) GetRules() []*WorkspaceApprovalSetting_Rule {
+ if x != nil {
+ return x.Rules
+ }
+ return nil
+}
+
+type WorkspaceTrialSetting struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ InstanceCount int32 `protobuf:"varint,1,opt,name=instance_count,json=instanceCount,proto3" json:"instance_count,omitempty"`
+ ExpireTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"`
+ IssuedTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=issued_time,json=issuedTime,proto3" json:"issued_time,omitempty"`
+ Subject string `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
+ OrgName string `protobuf:"bytes,5,opt,name=org_name,json=orgName,proto3" json:"org_name,omitempty"`
+ Plan PlanType `protobuf:"varint,6,opt,name=plan,proto3,enum=bytebase.v1.PlanType" json:"plan,omitempty"`
+}
+
+func (x *WorkspaceTrialSetting) Reset() {
+ *x = WorkspaceTrialSetting{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_setting_service_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WorkspaceTrialSetting) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkspaceTrialSetting) ProtoMessage() {}
+
+func (x *WorkspaceTrialSetting) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_setting_service_proto_msgTypes[12]
+ 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 WorkspaceTrialSetting.ProtoReflect.Descriptor instead.
+func (*WorkspaceTrialSetting) Descriptor() ([]byte, []int) {
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *WorkspaceTrialSetting) GetInstanceCount() int32 {
+ if x != nil {
+ return x.InstanceCount
+ }
+ return 0
+}
+
+func (x *WorkspaceTrialSetting) GetExpireTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.ExpireTime
+ }
+ return nil
+}
+
+func (x *WorkspaceTrialSetting) GetIssuedTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.IssuedTime
+ }
+ return nil
+}
+
+func (x *WorkspaceTrialSetting) GetSubject() string {
+ if x != nil {
+ return x.Subject
+ }
+ return ""
+}
+
+func (x *WorkspaceTrialSetting) GetOrgName() string {
+ if x != nil {
+ return x.OrgName
+ }
+ return ""
+}
+
+func (x *WorkspaceTrialSetting) GetPlan() PlanType {
+ if x != nil {
+ return x.Plan
+ }
+ return PlanType_PLAN_TYPE_UNSPECIFIED
+}
+
+type AppIMSetting_ExternalApproval struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
+ ApprovalDefinitionId string `protobuf:"bytes,2,opt,name=approval_definition_id,json=approvalDefinitionId,proto3" json:"approval_definition_id,omitempty"`
+}
+
+func (x *AppIMSetting_ExternalApproval) Reset() {
+ *x = AppIMSetting_ExternalApproval{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_setting_service_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AppIMSetting_ExternalApproval) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AppIMSetting_ExternalApproval) ProtoMessage() {}
+
+func (x *AppIMSetting_ExternalApproval) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_setting_service_proto_msgTypes[13]
+ 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 AppIMSetting_ExternalApproval.ProtoReflect.Descriptor instead.
+func (*AppIMSetting_ExternalApproval) Descriptor() ([]byte, []int) {
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{8, 0}
+}
+
+func (x *AppIMSetting_ExternalApproval) GetEnabled() bool {
+ if x != nil {
+ return x.Enabled
+ }
+ return false
+}
+
+func (x *AppIMSetting_ExternalApproval) GetApprovalDefinitionId() string {
+ if x != nil {
+ return x.ApprovalDefinitionId
+ }
+ return ""
+}
+
+type WorkspaceApprovalSetting_Rule struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Expression *v1alpha1.ParsedExpr `protobuf:"bytes,1,opt,name=expression,proto3" json:"expression,omitempty"`
+ Template *ApprovalTemplate `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"`
+}
+
+func (x *WorkspaceApprovalSetting_Rule) Reset() {
+ *x = WorkspaceApprovalSetting_Rule{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_setting_service_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WorkspaceApprovalSetting_Rule) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkspaceApprovalSetting_Rule) ProtoMessage() {}
+
+func (x *WorkspaceApprovalSetting_Rule) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_setting_service_proto_msgTypes[14]
+ 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 WorkspaceApprovalSetting_Rule.ProtoReflect.Descriptor instead.
+func (*WorkspaceApprovalSetting_Rule) Descriptor() ([]byte, []int) {
+ return file_v1_setting_service_proto_rawDescGZIP(), []int{11, 0}
+}
+
+func (x *WorkspaceApprovalSetting_Rule) GetExpression() *v1alpha1.ParsedExpr {
+ if x != nil {
+ return x.Expression
+ }
+ return nil
+}
+
+func (x *WorkspaceApprovalSetting_Rule) GetTemplate() *ApprovalTemplate {
+ if x != nil {
+ return x.Template
+ }
+ return nil
+}
+
+var File_v1_setting_service_proto protoreflect.FileDescriptor
+
+var file_v1_setting_service_proto_rawDesc = []byte{
+ 0x0a, 0x18, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 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, 0x25,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 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, 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, 0x17, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x76, 0x69,
+ 0x65, 0x77, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x1d, 0x76, 0x31, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+ 0x51, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 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, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
+ 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x73, 0x65,
+ 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69,
+ 0x6e, 0x67, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 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, 0x2c, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69,
+ 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x22, 0x44, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74,
+ 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52,
+ 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x6d, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x53,
+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a,
+ 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74,
+ 0x74, 0x69, 0x6e, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69,
+ 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6f,
+ 0x6e, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64,
+ 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x47, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x74, 0x69,
+ 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x22, 0xa2, 0x05, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74,
+ 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12,
+ 0x73, 0x0a, 0x20, 0x73, 0x6d, 0x74, 0x70, 0x5f, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x64, 0x65, 0x6c,
+ 0x69, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x4d, 0x54, 0x50, 0x4d, 0x61, 0x69, 0x6c,
+ 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x1c, 0x73, 0x6d, 0x74, 0x70, 0x4d, 0x61, 0x69, 0x6c,
+ 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4c, 0x0a, 0x14, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x6d, 0x5f, 0x73,
+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x41, 0x70, 0x70, 0x49, 0x4d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52,
+ 0x11, 0x61, 0x70, 0x70, 0x49, 0x6d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x12, 0x5e, 0x0a, 0x1a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x17, 0x61, 0x67, 0x65, 0x6e, 0x74,
+ 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x12, 0x6d, 0x0a, 0x1f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f,
+ 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x5f,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
+ 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
+ 0x67, 0x48, 0x00, 0x52, 0x1c, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x72,
+ 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x12, 0x70, 0x0a, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x61,
+ 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x5f,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
+ 0x61, 0x63, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69,
+ 0x6e, 0x67, 0x48, 0x00, 0x52, 0x1d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41,
+ 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x56, 0x61,
+ 0x6c, 0x75, 0x65, 0x12, 0x67, 0x0a, 0x1d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
+ 0x5f, 0x74, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
+ 0x63, 0x65, 0x54, 0x72, 0x69, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x00,
+ 0x52, 0x1a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x72, 0x69, 0x61, 0x6c,
+ 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xda, 0x05, 0x0a, 0x1c, 0x53, 0x4d, 0x54, 0x50, 0x4d, 0x61,
+ 0x69, 0x6c, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
+ 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x12,
+ 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f,
+ 0x72, 0x74, 0x12, 0x54, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x4d, 0x54, 0x50, 0x4d, 0x61, 0x69, 0x6c, 0x44, 0x65, 0x6c,
+ 0x69, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x6e,
+ 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x02, 0x63, 0x61, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x63, 0x61, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a,
+ 0x03, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x03, 0x6b, 0x65,
+ 0x79, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01,
+ 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x60, 0x0a,
+ 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
+ 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x4d, 0x54, 0x50, 0x4d, 0x61, 0x69, 0x6c, 0x44, 0x65, 0x6c, 0x69,
+ 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+ 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+ 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x08, 0x70,
+ 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52,
+ 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04,
+ 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d,
+ 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f,
+ 0x22, 0x6e, 0x0a, 0x0a, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a,
+ 0x0a, 0x16, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53,
+ 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x4e,
+ 0x43, 0x52, 0x59, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12,
+ 0x17, 0x0a, 0x13, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54,
+ 0x41, 0x52, 0x54, 0x54, 0x4c, 0x53, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x4e, 0x43, 0x52,
+ 0x59, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x53, 0x4c, 0x5f, 0x54, 0x4c, 0x53, 0x10, 0x03,
+ 0x22, 0x9a, 0x01, 0x0a, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43,
+ 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
+ 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43,
+ 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14,
+ 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50,
+ 0x4c, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e,
+ 0x54, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x10, 0x03,
+ 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x49,
+ 0x4f, 0x4e, 0x5f, 0x43, 0x52, 0x41, 0x4d, 0x5f, 0x4d, 0x44, 0x35, 0x10, 0x04, 0x42, 0x05, 0x0a,
+ 0x03, 0x5f, 0x63, 0x61, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x07, 0x0a, 0x05,
+ 0x5f, 0x63, 0x65, 0x72, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
+ 0x72, 0x64, 0x22, 0xeb, 0x02, 0x0a, 0x0c, 0x41, 0x70, 0x70, 0x49, 0x4d, 0x53, 0x65, 0x74, 0x74,
+ 0x69, 0x6e, 0x67, 0x12, 0x39, 0x0a, 0x07, 0x69, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x49, 0x4d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e,
+ 0x49, 0x4d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x69, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15,
+ 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+ 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x5f, 0x73, 0x65, 0x63,
+ 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x70, 0x70, 0x53, 0x65,
+ 0x63, 0x72, 0x65, 0x74, 0x12, 0x57, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
+ 0x5f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x2a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70,
+ 0x70, 0x49, 0x4d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72,
+ 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x52, 0x10, 0x65, 0x78, 0x74,
+ 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x1a, 0x62, 0x0a,
+ 0x10, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61,
+ 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x16, 0x61,
+ 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, 0x70, 0x70,
+ 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49,
+ 0x64, 0x22, 0x2d, 0x0a, 0x06, 0x49, 0x4d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x49,
+ 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
+ 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x45, 0x49, 0x53, 0x48, 0x55, 0x10, 0x01,
+ 0x22, 0x3c, 0x0a, 0x12, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53,
+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb0,
+ 0x01, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66,
+ 0x69, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78,
+ 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x55, 0x72, 0x6c, 0x12, 0x27, 0x0a,
+ 0x0f, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x75, 0x70,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77,
+ 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
+ 0x65, 0x5f, 0x32, 0x66, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x71,
+ 0x75, 0x69, 0x72, 0x65, 0x32, 0x66, 0x61, 0x12, 0x28, 0x0a, 0x10, 0x6f, 0x75, 0x74, 0x62, 0x6f,
+ 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28,
+ 0x09, 0x52, 0x0e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x70, 0x4c, 0x69, 0x73,
+ 0x74, 0x22, 0xe6, 0x01, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41,
+ 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x40,
+ 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b,
+ 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x74,
+ 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73,
+ 0x1a, 0x87, 0x01, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x65, 0x78, 0x70,
+ 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45,
+ 0x78, 0x70, 0x72, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12,
+ 0x39, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
+ 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x98, 0x02, 0x0a, 0x15, 0x57,
+ 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x72, 0x69, 0x61, 0x6c, 0x53, 0x65, 0x74,
+ 0x74, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x69, 0x6e,
+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x65,
+ 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78,
+ 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x69, 0x73, 0x73, 0x75,
+ 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 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, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65,
+ 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12,
+ 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x07, 0x6f, 0x72, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x6c,
+ 0x61, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52,
+ 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x32, 0xdc, 0x02, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
+ 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74,
+ 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69,
+ 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74,
+ 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0xda,
+ 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65,
+ 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x68, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74,
+ 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x24, 0xda, 0x41, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d,
+ 0x12, 0x72, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74,
+ 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74,
+ 0x74, 0x69, 0x6e, 0x67, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x07, 0x73, 0x65,
+ 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74,
+ 0x69, 0x6e, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
+ 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_setting_service_proto_rawDescOnce sync.Once
+ file_v1_setting_service_proto_rawDescData = file_v1_setting_service_proto_rawDesc
+)
+
+func file_v1_setting_service_proto_rawDescGZIP() []byte {
+ file_v1_setting_service_proto_rawDescOnce.Do(func() {
+ file_v1_setting_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_setting_service_proto_rawDescData)
+ })
+ return file_v1_setting_service_proto_rawDescData
+}
+
+var file_v1_setting_service_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
+var file_v1_setting_service_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
+var file_v1_setting_service_proto_goTypes = []interface{}{
+ (SMTPMailDeliverySettingValue_Encryption)(0), // 0: bytebase.v1.SMTPMailDeliverySettingValue.Encryption
+ (SMTPMailDeliverySettingValue_Authentication)(0), // 1: bytebase.v1.SMTPMailDeliverySettingValue.Authentication
+ (AppIMSetting_IMType)(0), // 2: bytebase.v1.AppIMSetting.IMType
+ (*ListSettingsRequest)(nil), // 3: bytebase.v1.ListSettingsRequest
+ (*ListSettingsResponse)(nil), // 4: bytebase.v1.ListSettingsResponse
+ (*GetSettingRequest)(nil), // 5: bytebase.v1.GetSettingRequest
+ (*GetSettingResponse)(nil), // 6: bytebase.v1.GetSettingResponse
+ (*SetSettingRequest)(nil), // 7: bytebase.v1.SetSettingRequest
+ (*Setting)(nil), // 8: bytebase.v1.Setting
+ (*Value)(nil), // 9: bytebase.v1.Value
+ (*SMTPMailDeliverySettingValue)(nil), // 10: bytebase.v1.SMTPMailDeliverySettingValue
+ (*AppIMSetting)(nil), // 11: bytebase.v1.AppIMSetting
+ (*AgentPluginSetting)(nil), // 12: bytebase.v1.AgentPluginSetting
+ (*WorkspaceProfileSetting)(nil), // 13: bytebase.v1.WorkspaceProfileSetting
+ (*WorkspaceApprovalSetting)(nil), // 14: bytebase.v1.WorkspaceApprovalSetting
+ (*WorkspaceTrialSetting)(nil), // 15: bytebase.v1.WorkspaceTrialSetting
+ (*AppIMSetting_ExternalApproval)(nil), // 16: bytebase.v1.AppIMSetting.ExternalApproval
+ (*WorkspaceApprovalSetting_Rule)(nil), // 17: bytebase.v1.WorkspaceApprovalSetting.Rule
+ (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp
+ (PlanType)(0), // 19: bytebase.v1.PlanType
+ (*v1alpha1.ParsedExpr)(nil), // 20: google.api.expr.v1alpha1.ParsedExpr
+ (*ApprovalTemplate)(nil), // 21: bytebase.v1.ApprovalTemplate
+}
+var file_v1_setting_service_proto_depIdxs = []int32{
+ 8, // 0: bytebase.v1.ListSettingsResponse.settings:type_name -> bytebase.v1.Setting
+ 8, // 1: bytebase.v1.GetSettingResponse.setting:type_name -> bytebase.v1.Setting
+ 8, // 2: bytebase.v1.SetSettingRequest.setting:type_name -> bytebase.v1.Setting
+ 9, // 3: bytebase.v1.Setting.value:type_name -> bytebase.v1.Value
+ 10, // 4: bytebase.v1.Value.smtp_mail_delivery_setting_value:type_name -> bytebase.v1.SMTPMailDeliverySettingValue
+ 11, // 5: bytebase.v1.Value.app_im_setting_value:type_name -> bytebase.v1.AppIMSetting
+ 12, // 6: bytebase.v1.Value.agent_plugin_setting_value:type_name -> bytebase.v1.AgentPluginSetting
+ 13, // 7: bytebase.v1.Value.workspace_profile_setting_value:type_name -> bytebase.v1.WorkspaceProfileSetting
+ 14, // 8: bytebase.v1.Value.workspace_approval_setting_value:type_name -> bytebase.v1.WorkspaceApprovalSetting
+ 15, // 9: bytebase.v1.Value.workspace_trial_setting_value:type_name -> bytebase.v1.WorkspaceTrialSetting
+ 0, // 10: bytebase.v1.SMTPMailDeliverySettingValue.encryption:type_name -> bytebase.v1.SMTPMailDeliverySettingValue.Encryption
+ 1, // 11: bytebase.v1.SMTPMailDeliverySettingValue.authentication:type_name -> bytebase.v1.SMTPMailDeliverySettingValue.Authentication
+ 2, // 12: bytebase.v1.AppIMSetting.im_type:type_name -> bytebase.v1.AppIMSetting.IMType
+ 16, // 13: bytebase.v1.AppIMSetting.external_approval:type_name -> bytebase.v1.AppIMSetting.ExternalApproval
+ 17, // 14: bytebase.v1.WorkspaceApprovalSetting.rules:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule
+ 18, // 15: bytebase.v1.WorkspaceTrialSetting.expire_time:type_name -> google.protobuf.Timestamp
+ 18, // 16: bytebase.v1.WorkspaceTrialSetting.issued_time:type_name -> google.protobuf.Timestamp
+ 19, // 17: bytebase.v1.WorkspaceTrialSetting.plan:type_name -> bytebase.v1.PlanType
+ 20, // 18: bytebase.v1.WorkspaceApprovalSetting.Rule.expression:type_name -> google.api.expr.v1alpha1.ParsedExpr
+ 21, // 19: bytebase.v1.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.v1.ApprovalTemplate
+ 3, // 20: bytebase.v1.SettingService.ListSettings:input_type -> bytebase.v1.ListSettingsRequest
+ 5, // 21: bytebase.v1.SettingService.GetSetting:input_type -> bytebase.v1.GetSettingRequest
+ 7, // 22: bytebase.v1.SettingService.SetSetting:input_type -> bytebase.v1.SetSettingRequest
+ 4, // 23: bytebase.v1.SettingService.ListSettings:output_type -> bytebase.v1.ListSettingsResponse
+ 8, // 24: bytebase.v1.SettingService.GetSetting:output_type -> bytebase.v1.Setting
+ 8, // 25: bytebase.v1.SettingService.SetSetting:output_type -> bytebase.v1.Setting
+ 23, // [23:26] is the sub-list for method output_type
+ 20, // [20:23] is the sub-list for method input_type
+ 20, // [20:20] is the sub-list for extension type_name
+ 20, // [20:20] is the sub-list for extension extendee
+ 0, // [0:20] is the sub-list for field type_name
+}
+
+func init() { file_v1_setting_service_proto_init() }
+func file_v1_setting_service_proto_init() {
+ if File_v1_setting_service_proto != nil {
+ return
+ }
+ file_v1_review_service_proto_init()
+ file_v1_subscription_service_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_v1_setting_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListSettingsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_setting_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListSettingsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_setting_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetSettingRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
}
file_v1_setting_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Setting); i {
+ switch v := v.(*GetSettingResponse); i {
case 0:
return &v.state
case 1:
@@ -770,7 +1621,7 @@ func file_v1_setting_service_proto_init() {
}
}
file_v1_setting_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Value); i {
+ switch v := v.(*SetSettingRequest); i {
case 0:
return &v.state
case 1:
@@ -782,6 +1633,30 @@ func file_v1_setting_service_proto_init() {
}
}
file_v1_setting_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Setting); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_setting_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Value); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_setting_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SMTPMailDeliverySettingValue); i {
case 0:
return &v.state
@@ -793,19 +1668,108 @@ func file_v1_setting_service_proto_init() {
return nil
}
}
+ file_v1_setting_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AppIMSetting); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_setting_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AgentPluginSetting); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_setting_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WorkspaceProfileSetting); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_setting_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WorkspaceApprovalSetting); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_setting_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WorkspaceTrialSetting); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_setting_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AppIMSetting_ExternalApproval); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_setting_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WorkspaceApprovalSetting_Rule); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
}
- file_v1_setting_service_proto_msgTypes[4].OneofWrappers = []interface{}{
+ file_v1_setting_service_proto_msgTypes[6].OneofWrappers = []interface{}{
(*Value_StringValue)(nil),
(*Value_SmtpMailDeliverySettingValue)(nil),
+ (*Value_AppImSettingValue)(nil),
+ (*Value_AgentPluginSettingValue)(nil),
+ (*Value_WorkspaceProfileSettingValue)(nil),
+ (*Value_WorkspaceApprovalSettingValue)(nil),
+ (*Value_WorkspaceTrialSettingValue)(nil),
}
- file_v1_setting_service_proto_msgTypes[5].OneofWrappers = []interface{}{}
+ file_v1_setting_service_proto_msgTypes[7].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_v1_setting_service_proto_rawDesc,
- NumEnums: 2,
- NumMessages: 6,
+ NumEnums: 3,
+ NumMessages: 15,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/proto/generated-go/v1/setting_service.pb.gw.go b/proto/generated-go/v1/setting_service.pb.gw.go
index 37b4487494..d48cd39b80 100644
--- a/proto/generated-go/v1/setting_service.pb.gw.go
+++ b/proto/generated-go/v1/setting_service.pb.gw.go
@@ -31,6 +31,42 @@ var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
+var (
+ filter_SettingService_ListSettings_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
+)
+
+func request_SettingService_ListSettings_0(ctx context.Context, marshaler runtime.Marshaler, client SettingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListSettingsRequest
+ 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_SettingService_ListSettings_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.ListSettings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_SettingService_ListSettings_0(ctx context.Context, marshaler runtime.Marshaler, server SettingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListSettingsRequest
+ 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_SettingService_ListSettings_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.ListSettings(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
func request_SettingService_GetSetting_0(ctx context.Context, marshaler runtime.Marshaler, client SettingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetSettingRequest
var metadata runtime.ServerMetadata
@@ -175,6 +211,31 @@ func local_request_SettingService_SetSetting_0(ctx context.Context, marshaler ru
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSettingServiceHandlerFromEndpoint instead.
func RegisterSettingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SettingServiceServer) error {
+ mux.Handle("GET", pattern_SettingService_ListSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SettingService/ListSettings", runtime.WithHTTPPathPattern("/v1/settings"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_SettingService_ListSettings_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_SettingService_ListSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
mux.Handle("GET", pattern_SettingService_GetSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -266,6 +327,28 @@ func RegisterSettingServiceHandler(ctx context.Context, mux *runtime.ServeMux, c
// "SettingServiceClient" to call the correct interceptors.
func RegisterSettingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SettingServiceClient) error {
+ mux.Handle("GET", pattern_SettingService_ListSettings_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.SettingService/ListSettings", runtime.WithHTTPPathPattern("/v1/settings"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_SettingService_ListSettings_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_SettingService_ListSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
mux.Handle("GET", pattern_SettingService_GetSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -314,12 +397,16 @@ func RegisterSettingServiceHandlerClient(ctx context.Context, mux *runtime.Serve
}
var (
+ pattern_SettingService_ListSettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "settings"}, ""))
+
pattern_SettingService_GetSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "settings", "name"}, ""))
pattern_SettingService_SetSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "settings", "setting.name"}, ""))
)
var (
+ forward_SettingService_ListSettings_0 = runtime.ForwardResponseMessage
+
forward_SettingService_GetSetting_0 = runtime.ForwardResponseMessage
forward_SettingService_SetSetting_0 = runtime.ForwardResponseMessage
diff --git a/proto/generated-go/v1/setting_service_grpc.pb.go b/proto/generated-go/v1/setting_service_grpc.pb.go
index 19ca136895..67b533f8a0 100644
--- a/proto/generated-go/v1/setting_service_grpc.pb.go
+++ b/proto/generated-go/v1/setting_service_grpc.pb.go
@@ -19,14 +19,16 @@ import (
const _ = grpc.SupportPackageIsVersion7
const (
- SettingService_GetSetting_FullMethodName = "/bytebase.v1.SettingService/GetSetting"
- SettingService_SetSetting_FullMethodName = "/bytebase.v1.SettingService/SetSetting"
+ SettingService_ListSettings_FullMethodName = "/bytebase.v1.SettingService/ListSettings"
+ SettingService_GetSetting_FullMethodName = "/bytebase.v1.SettingService/GetSetting"
+ SettingService_SetSetting_FullMethodName = "/bytebase.v1.SettingService/SetSetting"
)
// SettingServiceClient is the client API for SettingService 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 SettingServiceClient interface {
+ ListSettings(ctx context.Context, in *ListSettingsRequest, opts ...grpc.CallOption) (*ListSettingsResponse, error)
GetSetting(ctx context.Context, in *GetSettingRequest, opts ...grpc.CallOption) (*Setting, error)
SetSetting(ctx context.Context, in *SetSettingRequest, opts ...grpc.CallOption) (*Setting, error)
}
@@ -39,6 +41,15 @@ func NewSettingServiceClient(cc grpc.ClientConnInterface) SettingServiceClient {
return &settingServiceClient{cc}
}
+func (c *settingServiceClient) ListSettings(ctx context.Context, in *ListSettingsRequest, opts ...grpc.CallOption) (*ListSettingsResponse, error) {
+ out := new(ListSettingsResponse)
+ err := c.cc.Invoke(ctx, SettingService_ListSettings_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
func (c *settingServiceClient) GetSetting(ctx context.Context, in *GetSettingRequest, opts ...grpc.CallOption) (*Setting, error) {
out := new(Setting)
err := c.cc.Invoke(ctx, SettingService_GetSetting_FullMethodName, in, out, opts...)
@@ -61,6 +72,7 @@ func (c *settingServiceClient) SetSetting(ctx context.Context, in *SetSettingReq
// All implementations must embed UnimplementedSettingServiceServer
// for forward compatibility
type SettingServiceServer interface {
+ ListSettings(context.Context, *ListSettingsRequest) (*ListSettingsResponse, error)
GetSetting(context.Context, *GetSettingRequest) (*Setting, error)
SetSetting(context.Context, *SetSettingRequest) (*Setting, error)
mustEmbedUnimplementedSettingServiceServer()
@@ -70,6 +82,9 @@ type SettingServiceServer interface {
type UnimplementedSettingServiceServer struct {
}
+func (UnimplementedSettingServiceServer) ListSettings(context.Context, *ListSettingsRequest) (*ListSettingsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListSettings not implemented")
+}
func (UnimplementedSettingServiceServer) GetSetting(context.Context, *GetSettingRequest) (*Setting, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSetting not implemented")
}
@@ -89,6 +104,24 @@ func RegisterSettingServiceServer(s grpc.ServiceRegistrar, srv SettingServiceSer
s.RegisterService(&SettingService_ServiceDesc, srv)
}
+func _SettingService_ListSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListSettingsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SettingServiceServer).ListSettings(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: SettingService_ListSettings_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SettingServiceServer).ListSettings(ctx, req.(*ListSettingsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _SettingService_GetSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSettingRequest)
if err := dec(in); err != nil {
@@ -132,6 +165,10 @@ var SettingService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "bytebase.v1.SettingService",
HandlerType: (*SettingServiceServer)(nil),
Methods: []grpc.MethodDesc{
+ {
+ MethodName: "ListSettings",
+ Handler: _SettingService_ListSettings_Handler,
+ },
{
MethodName: "GetSetting",
Handler: _SettingService_GetSetting_Handler,
diff --git a/proto/v1/setting_service.proto b/proto/v1/setting_service.proto
index a52b25a1bf..01e46e65ef 100644
--- a/proto/v1/setting_service.proto
+++ b/proto/v1/setting_service.proto
@@ -4,11 +4,20 @@ package bytebase.v1;
import "google/api/annotations.proto";
import "google/api/client.proto";
+import "google/api/expr/v1alpha1/syntax.proto";
import "google/api/field_behavior.proto";
+import "google/protobuf/timestamp.proto";
+import "v1/review_service.proto";
+import "v1/subscription_service.proto";
option go_package = "generated-go/v1";
service SettingService {
+ rpc ListSettings(ListSettingsRequest) returns (ListSettingsResponse) {
+ option (google.api.http) = {get: "/v1/settings"};
+ option (google.api.method_signature) = "";
+ }
+
rpc GetSetting(GetSettingRequest) returns (Setting) {
option (google.api.http) = {get: "/v1/{name=settings/*}"};
option (google.api.method_signature) = "name";
@@ -22,6 +31,30 @@ service SettingService {
}
}
+message ListSettingsRequest {
+ // The maximum number of settings to return. The service may return fewer than
+ // this value.
+ // If unspecified, at most 50 settings 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 `ListSettings` call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to `ListSettings` must match
+ // the call that provided the page token.
+ string page_token = 2;
+}
+
+message ListSettingsResponse {
+ // The settings from the specified request.
+ repeated Setting settings = 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;
+}
+
// The request message for getting a setting.
message GetSettingRequest {
// The resource name of the setting.
@@ -62,6 +95,11 @@ message Value {
// Defines this value as being a string value.
string string_value = 1;
SMTPMailDeliverySettingValue smtp_mail_delivery_setting_value = 2;
+ AppIMSetting app_im_setting_value = 3;
+ AgentPluginSetting agent_plugin_setting_value = 4;
+ WorkspaceProfileSetting workspace_profile_setting_value = 5;
+ WorkspaceApprovalSetting workspace_approval_setting_value = 6;
+ WorkspaceTrialSetting workspace_trial_setting_value = 7;
}
}
@@ -108,3 +146,69 @@ message SMTPMailDeliverySettingValue {
// The recipient email address, used with validate_only to send test email.
string to = 11;
}
+
+message AppIMSetting {
+ enum IMType {
+ IM_TYPE_UNSPECIFIED = 0;
+ FEISHU = 1;
+ }
+ IMType im_type = 1;
+
+ string app_id = 2;
+
+ string app_secret = 3;
+
+ message ExternalApproval {
+ bool enabled = 1;
+ string approval_definition_id = 2;
+ }
+ ExternalApproval external_approval = 4;
+}
+
+message AgentPluginSetting {
+ // The URL for the agent API.
+ string url = 1;
+
+ // The token for the agent.
+ string token = 2;
+}
+
+message WorkspaceProfileSetting {
+ // The URL user visits Bytebase.
+ //
+ // The external URL is used for:
+ // 1. Constructing the correct callback URL when configuring the VCS provider. The callback URL points to the frontend.
+ // 2. Creating the correct webhook endpoint when configuring the project GitOps workflow. The webhook endpoint points to the backend.
+ string external_url = 1;
+
+ // Disallow self-service signup, users can only be invited by the owner.
+ bool disallow_signup = 2;
+
+ // Require 2FA for all users.
+ bool require_2fa = 3;
+
+ // outbound_ip_list is the outbound IP for Bytebase instance in SaaS mode.
+ repeated string outbound_ip_list = 4;
+}
+
+message WorkspaceApprovalSetting {
+ message Rule {
+ google.api.expr.v1alpha1.ParsedExpr expression = 1;
+ ApprovalTemplate template = 2;
+ }
+ repeated Rule rules = 1;
+}
+
+message WorkspaceTrialSetting {
+ int32 instance_count = 1;
+
+ google.protobuf.Timestamp expire_time = 2;
+
+ google.protobuf.Timestamp issued_time = 3;
+
+ string subject = 4;
+
+ string org_name = 5;
+
+ PlanType plan = 6;
+}