Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: add SMTPMailDeliverySettingValue as one of the value in setting service (#5631)
h3n4la3faea87a10d
diff --git a/frontend/src/types/proto/v1/setting_service.ts b/frontend/src/types/proto/v1/setting_service.tsindex 7ddc6816ef..f940032d2d 100644--- a/frontend/src/types/proto/v1/setting_service.ts+++ b/frontend/src/types/proto/v1/setting_service.ts@@ -43,6 +43,135 @@ export interface Setting {export interface Value {/** Defines this value as being a string value. */stringValue?: string | undefined;+ smtpMailDeliverySettingValue?: SMTPMailDeliverySettingValue | undefined;+}++export interface SMTPMailDeliverySettingValue {+ /** The SMTP server address. */+ server: string;+ /** The SMTP server port. */+ port: number;+ /** The SMTP server encryption. */+ encryption: SMTPMailDeliverySettingValue_Encryption;+ /**+ * The CA, KEY, and CERT for the SMTP server.+ * Not used.+ */+ ca?: string | undefined;+ key?: string | undefined;+ cert?: string | undefined;+ authentication: SMTPMailDeliverySettingValue_Authentication;+ username: string;+ /** If not specified, server will use the existed password. */+ password?:+ | string+ | undefined;+ /** The sender email address. */+ from: string;+ /** The recipient email address, used with validate_only to send test email. */+ to: string;+}++/** We support three types of SMTP encryption: NONE, STARTTLS, and SSL/TLS. */+export enum SMTPMailDeliverySettingValue_Encryption {+ ENCRYPTION_UNSPECIFIED = 0,+ ENCRYPTION_NONE = 1,+ ENCRYPTION_STARTTLS = 2,+ ENCRYPTION_SSL_TLS = 3,+ UNRECOGNIZED = -1,+}++export function sMTPMailDeliverySettingValue_EncryptionFromJSON(object: any): SMTPMailDeliverySettingValue_Encryption {+ switch (object) {+ case 0:+ case "ENCRYPTION_UNSPECIFIED":+ return SMTPMailDeliverySettingValue_Encryption.ENCRYPTION_UNSPECIFIED;+ case 1:+ case "ENCRYPTION_NONE":+ return SMTPMailDeliverySettingValue_Encryption.ENCRYPTION_NONE;+ case 2:+ case "ENCRYPTION_STARTTLS":+ return SMTPMailDeliverySettingValue_Encryption.ENCRYPTION_STARTTLS;+ case 3:+ case "ENCRYPTION_SSL_TLS":+ return SMTPMailDeliverySettingValue_Encryption.ENCRYPTION_SSL_TLS;+ case -1:+ case "UNRECOGNIZED":+ default:+ return SMTPMailDeliverySettingValue_Encryption.UNRECOGNIZED;+ }+}++export function sMTPMailDeliverySettingValue_EncryptionToJSON(object: SMTPMailDeliverySettingValue_Encryption): string {+ switch (object) {+ case SMTPMailDeliverySettingValue_Encryption.ENCRYPTION_UNSPECIFIED:+ return "ENCRYPTION_UNSPECIFIED";+ case SMTPMailDeliverySettingValue_Encryption.ENCRYPTION_NONE:+ return "ENCRYPTION_NONE";+ case SMTPMailDeliverySettingValue_Encryption.ENCRYPTION_STARTTLS:+ return "ENCRYPTION_STARTTLS";+ case SMTPMailDeliverySettingValue_Encryption.ENCRYPTION_SSL_TLS:+ return "ENCRYPTION_SSL_TLS";+ case SMTPMailDeliverySettingValue_Encryption.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++/** We support four types of SMTP authentication: NONE, PLAIN, LOGIN, and CRAM-MD5. */+export enum SMTPMailDeliverySettingValue_Authentication {+ AUTHENTICATION_UNSPECIFIED = 0,+ AUTHENTICATION_NONE = 1,+ AUTHENTICATION_PLAIN = 2,+ AUTHENTICATION_LOGIN = 3,+ AUTHENTICATION_CRAM_MD5 = 4,+ UNRECOGNIZED = -1,+}++export function sMTPMailDeliverySettingValue_AuthenticationFromJSON(+ object: any,+): SMTPMailDeliverySettingValue_Authentication {+ switch (object) {+ case 0:+ case "AUTHENTICATION_UNSPECIFIED":+ return SMTPMailDeliverySettingValue_Authentication.AUTHENTICATION_UNSPECIFIED;+ case 1:+ case "AUTHENTICATION_NONE":+ return SMTPMailDeliverySettingValue_Authentication.AUTHENTICATION_NONE;+ case 2:+ case "AUTHENTICATION_PLAIN":+ return SMTPMailDeliverySettingValue_Authentication.AUTHENTICATION_PLAIN;+ case 3:+ case "AUTHENTICATION_LOGIN":+ return SMTPMailDeliverySettingValue_Authentication.AUTHENTICATION_LOGIN;+ case 4:+ case "AUTHENTICATION_CRAM_MD5":+ return SMTPMailDeliverySettingValue_Authentication.AUTHENTICATION_CRAM_MD5;+ case -1:+ case "UNRECOGNIZED":+ default:+ return SMTPMailDeliverySettingValue_Authentication.UNRECOGNIZED;+ }+}++export function sMTPMailDeliverySettingValue_AuthenticationToJSON(+ object: SMTPMailDeliverySettingValue_Authentication,+): string {+ switch (object) {+ case SMTPMailDeliverySettingValue_Authentication.AUTHENTICATION_UNSPECIFIED:+ return "AUTHENTICATION_UNSPECIFIED";+ case SMTPMailDeliverySettingValue_Authentication.AUTHENTICATION_NONE:+ return "AUTHENTICATION_NONE";+ case SMTPMailDeliverySettingValue_Authentication.AUTHENTICATION_PLAIN:+ return "AUTHENTICATION_PLAIN";+ case SMTPMailDeliverySettingValue_Authentication.AUTHENTICATION_LOGIN:+ return "AUTHENTICATION_LOGIN";+ case SMTPMailDeliverySettingValue_Authentication.AUTHENTICATION_CRAM_MD5:+ return "AUTHENTICATION_CRAM_MD5";+ case SMTPMailDeliverySettingValue_Authentication.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }}function createBaseGetSettingRequest(): GetSettingRequest {@@ -304,7 +433,7 @@ export const Setting = {};function createBaseValue(): Value {- return { stringValue: undefined };+ return { stringValue: undefined, smtpMailDeliverySettingValue: undefined };}export const Value = {@@ -312,6 +441,9 @@ export const Value = {if (message.stringValue !== undefined) {writer.uint32(10).string(message.stringValue);}+ if (message.smtpMailDeliverySettingValue !== undefined) {+ SMTPMailDeliverySettingValue.encode(message.smtpMailDeliverySettingValue, writer.uint32(18).fork()).ldelim();+ }return writer;},@@ -329,6 +461,13 @@ export const Value = {message.stringValue = reader.string();continue;+ case 2:+ if (tag != 18) {+ break;+ }++ message.smtpMailDeliverySettingValue = SMTPMailDeliverySettingValue.decode(reader, reader.uint32());+ continue;}if ((tag & 7) == 4 || tag == 0) {break;@@ -339,12 +478,21 @@ export const Value = {},fromJSON(object: any): Value {- return { stringValue: isSet(object.stringValue) ? String(object.stringValue) : undefined };+ return {+ stringValue: isSet(object.stringValue) ? String(object.stringValue) : undefined,+ smtpMailDeliverySettingValue: isSet(object.smtpMailDeliverySettingValue)+ ? SMTPMailDeliverySettingValue.fromJSON(object.smtpMailDeliverySettingValue)+ : undefined,+ };},toJSON(message: Value): unknown {const obj: any = {};message.stringValue !== undefined && (obj.stringValue = message.stringValue);+ message.smtpMailDeliverySettingValue !== undefined &&+ (obj.smtpMailDeliverySettingValue = message.smtpMailDeliverySettingValue+ ? SMTPMailDeliverySettingValue.toJSON(message.smtpMailDeliverySettingValue)+ : undefined);return obj;},@@ -355,6 +503,214 @@ export const Value = {fromPartial(object: DeepPartial<Value>): Value {const message = createBaseValue();message.stringValue = object.stringValue ?? undefined;+ message.smtpMailDeliverySettingValue =+ (object.smtpMailDeliverySettingValue !== undefined && object.smtpMailDeliverySettingValue !== null)+ ? SMTPMailDeliverySettingValue.fromPartial(object.smtpMailDeliverySettingValue)+ : undefined;+ return message;+ },+};++function createBaseSMTPMailDeliverySettingValue(): SMTPMailDeliverySettingValue {+ return {+ server: "",+ port: 0,+ encryption: 0,+ ca: undefined,+ key: undefined,+ cert: undefined,+ authentication: 0,+ username: "",+ password: undefined,+ from: "",+ to: "",+ };+}++export const SMTPMailDeliverySettingValue = {+ encode(message: SMTPMailDeliverySettingValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.server !== "") {+ writer.uint32(10).string(message.server);+ }+ if (message.port !== 0) {+ writer.uint32(16).int32(message.port);+ }+ if (message.encryption !== 0) {+ writer.uint32(24).int32(message.encryption);+ }+ if (message.ca !== undefined) {+ writer.uint32(34).string(message.ca);+ }+ if (message.key !== undefined) {+ writer.uint32(42).string(message.key);+ }+ if (message.cert !== undefined) {+ writer.uint32(50).string(message.cert);+ }+ if (message.authentication !== 0) {+ writer.uint32(56).int32(message.authentication);+ }+ if (message.username !== "") {+ writer.uint32(66).string(message.username);+ }+ if (message.password !== undefined) {+ writer.uint32(74).string(message.password);+ }+ if (message.from !== "") {+ writer.uint32(82).string(message.from);+ }+ if (message.to !== "") {+ writer.uint32(90).string(message.to);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): SMTPMailDeliverySettingValue {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseSMTPMailDeliverySettingValue();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag != 10) {+ break;+ }++ message.server = reader.string();+ continue;+ case 2:+ if (tag != 16) {+ break;+ }++ message.port = reader.int32();+ continue;+ case 3:+ if (tag != 24) {+ break;+ }++ message.encryption = reader.int32() as any;+ continue;+ case 4:+ if (tag != 34) {+ break;+ }++ message.ca = reader.string();+ continue;+ case 5:+ if (tag != 42) {+ break;+ }++ message.key = reader.string();+ continue;+ case 6:+ if (tag != 50) {+ break;+ }++ message.cert = reader.string();+ continue;+ case 7:+ if (tag != 56) {+ break;+ }++ message.authentication = reader.int32() as any;+ continue;+ case 8:+ if (tag != 66) {+ break;+ }++ message.username = reader.string();+ continue;+ case 9:+ if (tag != 74) {+ break;+ }++ message.password = reader.string();+ continue;+ case 10:+ if (tag != 82) {+ break;+ }++ message.from = reader.string();+ continue;+ case 11:+ if (tag != 90) {+ break;+ }++ message.to = reader.string();+ continue;+ }+ if ((tag & 7) == 4 || tag == 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): SMTPMailDeliverySettingValue {+ return {+ server: isSet(object.server) ? String(object.server) : "",+ port: isSet(object.port) ? Number(object.port) : 0,+ encryption: isSet(object.encryption) ? sMTPMailDeliverySettingValue_EncryptionFromJSON(object.encryption) : 0,+ ca: isSet(object.ca) ? String(object.ca) : undefined,+ key: isSet(object.key) ? String(object.key) : undefined,+ cert: isSet(object.cert) ? String(object.cert) : undefined,+ authentication: isSet(object.authentication)+ ? sMTPMailDeliverySettingValue_AuthenticationFromJSON(object.authentication)+ : 0,+ username: isSet(object.username) ? String(object.username) : "",+ password: isSet(object.password) ? String(object.password) : undefined,+ from: isSet(object.from) ? String(object.from) : "",+ to: isSet(object.to) ? String(object.to) : "",+ };+ },++ toJSON(message: SMTPMailDeliverySettingValue): unknown {+ const obj: any = {};+ message.server !== undefined && (obj.server = message.server);+ message.port !== undefined && (obj.port = Math.round(message.port));+ message.encryption !== undefined &&+ (obj.encryption = sMTPMailDeliverySettingValue_EncryptionToJSON(message.encryption));+ message.ca !== undefined && (obj.ca = message.ca);+ message.key !== undefined && (obj.key = message.key);+ message.cert !== undefined && (obj.cert = message.cert);+ message.authentication !== undefined &&+ (obj.authentication = sMTPMailDeliverySettingValue_AuthenticationToJSON(message.authentication));+ message.username !== undefined && (obj.username = message.username);+ message.password !== undefined && (obj.password = message.password);+ message.from !== undefined && (obj.from = message.from);+ message.to !== undefined && (obj.to = message.to);+ return obj;+ },++ create(base?: DeepPartial<SMTPMailDeliverySettingValue>): SMTPMailDeliverySettingValue {+ return SMTPMailDeliverySettingValue.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<SMTPMailDeliverySettingValue>): SMTPMailDeliverySettingValue {+ const message = createBaseSMTPMailDeliverySettingValue();+ message.server = object.server ?? "";+ message.port = object.port ?? 0;+ message.encryption = object.encryption ?? 0;+ message.ca = object.ca ?? undefined;+ message.key = object.key ?? undefined;+ message.cert = object.cert ?? undefined;+ message.authentication = object.authentication ?? 0;+ message.username = object.username ?? "";+ message.password = object.password ?? undefined;+ message.from = object.from ?? "";+ message.to = object.to ?? "";return message;},};diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 9c47032e28..486feecabc 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -315,10 +315,14 @@- [v1/setting_service.proto](#v1_setting_service-proto)- [GetSettingRequest](#bytebase-v1-GetSettingRequest)- [GetSettingResponse](#bytebase-v1-GetSettingResponse)+ - [SMTPMailDeliverySettingValue](#bytebase-v1-SMTPMailDeliverySettingValue)- [SetSettingRequest](#bytebase-v1-SetSettingRequest)- [Setting](#bytebase-v1-Setting)- [Value](#bytebase-v1-Value)+ - [SMTPMailDeliverySettingValue.Authentication](#bytebase-v1-SMTPMailDeliverySettingValue-Authentication)+ - [SMTPMailDeliverySettingValue.Encryption](#bytebase-v1-SMTPMailDeliverySettingValue-Encryption)+- [SettingService](#bytebase-v1-SettingService)- [v1/sql_service.proto](#v1_sql_service-proto)@@ -4772,6 +4776,31 @@ The response message for getting a setting.+<a name="bytebase-v1-SMTPMailDeliverySettingValue"></a>++### SMTPMailDeliverySettingValue++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| server | [string](#string) | | The SMTP server address. |+| port | [int32](#int32) | | The SMTP server port. |+| encryption | [SMTPMailDeliverySettingValue.Encryption](#bytebase-v1-SMTPMailDeliverySettingValue-Encryption) | | The SMTP server encryption. |+| ca | [string](#string) | optional | The CA, KEY, and CERT for the SMTP server. Not used. |+| key | [string](#string) | optional | |+| cert | [string](#string) | optional | |+| authentication | [SMTPMailDeliverySettingValue.Authentication](#bytebase-v1-SMTPMailDeliverySettingValue-Authentication) | | |+| username | [string](#string) | | |+| password | [string](#string) | optional | If not specified, server will use the existed password. |+| from | [string](#string) | | The sender email address. |+| to | [string](#string) | | The recipient email address, used with validate_only to send test email. |++++++<a name="bytebase-v1-SetSettingRequest"></a>### SetSettingRequest@@ -4815,6 +4844,7 @@ The data in setting value.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- || string_value | [string](#string) | | Defines this value as being a string value. |+| smtp_mail_delivery_setting_value | [SMTPMailDeliverySettingValue](#bytebase-v1-SMTPMailDeliverySettingValue) | | |@@ -4822,6 +4852,35 @@ The data in setting value.++<a name="bytebase-v1-SMTPMailDeliverySettingValue-Authentication"></a>++### SMTPMailDeliverySettingValue.Authentication+We support four types of SMTP authentication: NONE, PLAIN, LOGIN, and CRAM-MD5.++| Name | Number | Description |+| ---- | ------ | ----------- |+| AUTHENTICATION_UNSPECIFIED | 0 | |+| AUTHENTICATION_NONE | 1 | |+| AUTHENTICATION_PLAIN | 2 | |+| AUTHENTICATION_LOGIN | 3 | |+| AUTHENTICATION_CRAM_MD5 | 4 | |++++<a name="bytebase-v1-SMTPMailDeliverySettingValue-Encryption"></a>++### SMTPMailDeliverySettingValue.Encryption+We support three types of SMTP encryption: NONE, STARTTLS, and SSL/TLS.++| Name | Number | Description |+| ---- | ------ | ----------- |+| ENCRYPTION_UNSPECIFIED | 0 | |+| ENCRYPTION_NONE | 1 | |+| ENCRYPTION_STARTTLS | 2 | |+| ENCRYPTION_SSL_TLS | 3 | |++diff --git a/proto/generated-go/v1/setting_service.pb.go b/proto/generated-go/v1/setting_service.pb.goindex 87eb063d63..fd69072695 100644--- a/proto/generated-go/v1/setting_service.pb.go+++ b/proto/generated-go/v1/setting_service.pb.go@@ -21,6 +21,115 @@ const (_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20))+// We support three types of SMTP encryption: NONE, STARTTLS, and SSL/TLS.+type SMTPMailDeliverySettingValue_Encryption int32++const (+ SMTPMailDeliverySettingValue_ENCRYPTION_UNSPECIFIED SMTPMailDeliverySettingValue_Encryption = 0+ SMTPMailDeliverySettingValue_ENCRYPTION_NONE SMTPMailDeliverySettingValue_Encryption = 1+ SMTPMailDeliverySettingValue_ENCRYPTION_STARTTLS SMTPMailDeliverySettingValue_Encryption = 2+ SMTPMailDeliverySettingValue_ENCRYPTION_SSL_TLS SMTPMailDeliverySettingValue_Encryption = 3+)++// Enum value maps for SMTPMailDeliverySettingValue_Encryption.+var (+ SMTPMailDeliverySettingValue_Encryption_name = map[int32]string{+ 0: "ENCRYPTION_UNSPECIFIED",+ 1: "ENCRYPTION_NONE",+ 2: "ENCRYPTION_STARTTLS",+ 3: "ENCRYPTION_SSL_TLS",+ }+ SMTPMailDeliverySettingValue_Encryption_value = map[string]int32{+ "ENCRYPTION_UNSPECIFIED": 0,+ "ENCRYPTION_NONE": 1,+ "ENCRYPTION_STARTTLS": 2,+ "ENCRYPTION_SSL_TLS": 3,+ }+)++func (x SMTPMailDeliverySettingValue_Encryption) Enum() *SMTPMailDeliverySettingValue_Encryption {+ p := new(SMTPMailDeliverySettingValue_Encryption)+ *p = x+ return p+}++func (x SMTPMailDeliverySettingValue_Encryption) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (SMTPMailDeliverySettingValue_Encryption) Descriptor() protoreflect.EnumDescriptor {+ return file_v1_setting_service_proto_enumTypes[0].Descriptor()+}++func (SMTPMailDeliverySettingValue_Encryption) Type() protoreflect.EnumType {+ return &file_v1_setting_service_proto_enumTypes[0]+}++func (x SMTPMailDeliverySettingValue_Encryption) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use SMTPMailDeliverySettingValue_Encryption.Descriptor instead.+func (SMTPMailDeliverySettingValue_Encryption) EnumDescriptor() ([]byte, []int) {+ return file_v1_setting_service_proto_rawDescGZIP(), []int{5, 0}+}++// We support four types of SMTP authentication: NONE, PLAIN, LOGIN, and CRAM-MD5.+type SMTPMailDeliverySettingValue_Authentication int32++const (+ SMTPMailDeliverySettingValue_AUTHENTICATION_UNSPECIFIED SMTPMailDeliverySettingValue_Authentication = 0+ SMTPMailDeliverySettingValue_AUTHENTICATION_NONE SMTPMailDeliverySettingValue_Authentication = 1+ SMTPMailDeliverySettingValue_AUTHENTICATION_PLAIN SMTPMailDeliverySettingValue_Authentication = 2+ SMTPMailDeliverySettingValue_AUTHENTICATION_LOGIN SMTPMailDeliverySettingValue_Authentication = 3+ SMTPMailDeliverySettingValue_AUTHENTICATION_CRAM_MD5 SMTPMailDeliverySettingValue_Authentication = 4+)++// Enum value maps for SMTPMailDeliverySettingValue_Authentication.+var (+ SMTPMailDeliverySettingValue_Authentication_name = map[int32]string{+ 0: "AUTHENTICATION_UNSPECIFIED",+ 1: "AUTHENTICATION_NONE",+ 2: "AUTHENTICATION_PLAIN",+ 3: "AUTHENTICATION_LOGIN",+ 4: "AUTHENTICATION_CRAM_MD5",+ }+ SMTPMailDeliverySettingValue_Authentication_value = map[string]int32{+ "AUTHENTICATION_UNSPECIFIED": 0,+ "AUTHENTICATION_NONE": 1,+ "AUTHENTICATION_PLAIN": 2,+ "AUTHENTICATION_LOGIN": 3,+ "AUTHENTICATION_CRAM_MD5": 4,+ }+)++func (x SMTPMailDeliverySettingValue_Authentication) Enum() *SMTPMailDeliverySettingValue_Authentication {+ p := new(SMTPMailDeliverySettingValue_Authentication)+ *p = x+ return p+}++func (x SMTPMailDeliverySettingValue_Authentication) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (SMTPMailDeliverySettingValue_Authentication) Descriptor() protoreflect.EnumDescriptor {+ return file_v1_setting_service_proto_enumTypes[1].Descriptor()+}++func (SMTPMailDeliverySettingValue_Authentication) Type() protoreflect.EnumType {+ return &file_v1_setting_service_proto_enumTypes[1]+}++func (x SMTPMailDeliverySettingValue_Authentication) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use SMTPMailDeliverySettingValue_Authentication.Descriptor instead.+func (SMTPMailDeliverySettingValue_Authentication) EnumDescriptor() ([]byte, []int) {+ return file_v1_setting_service_proto_rawDescGZIP(), []int{5, 1}+}+// The request message for getting a setting.type GetSettingRequest struct {state protoimpl.MessageState@@ -249,6 +358,7 @@ type Value struct {// Types that are assignable to Value://// *Value_StringValue+ // *Value_SmtpMailDeliverySettingValueValue isValue_Value `protobuf_oneof:"value"`}@@ -298,6 +408,13 @@ func (x *Value) GetStringValue() string {return ""}+func (x *Value) GetSmtpMailDeliverySettingValue() *SMTPMailDeliverySettingValue {+ if x, ok := x.GetValue().(*Value_SmtpMailDeliverySettingValue); ok {+ return x.SmtpMailDeliverySettingValue+ }+ return nil+}+type isValue_Value interface {isValue_Value()}@@ -307,8 +424,149 @@ type Value_StringValue struct {StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"`}+type Value_SmtpMailDeliverySettingValue struct {+ SmtpMailDeliverySettingValue *SMTPMailDeliverySettingValue `protobuf:"bytes,2,opt,name=smtp_mail_delivery_setting_value,json=smtpMailDeliverySettingValue,proto3,oneof"`+}+func (*Value_StringValue) isValue_Value() {}+func (*Value_SmtpMailDeliverySettingValue) isValue_Value() {}++type SMTPMailDeliverySettingValue struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The SMTP server address.+ Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`+ // The SMTP server port.+ Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`+ // The SMTP server encryption.+ Encryption SMTPMailDeliverySettingValue_Encryption `protobuf:"varint,3,opt,name=encryption,proto3,enum=bytebase.v1.SMTPMailDeliverySettingValue_Encryption" json:"encryption,omitempty"`+ // The CA, KEY, and CERT for the SMTP server.+ // Not used.+ Ca *string `protobuf:"bytes,4,opt,name=ca,proto3,oneof" json:"ca,omitempty"`+ Key *string `protobuf:"bytes,5,opt,name=key,proto3,oneof" json:"key,omitempty"`+ Cert *string `protobuf:"bytes,6,opt,name=cert,proto3,oneof" json:"cert,omitempty"`+ Authentication SMTPMailDeliverySettingValue_Authentication `protobuf:"varint,7,opt,name=authentication,proto3,enum=bytebase.v1.SMTPMailDeliverySettingValue_Authentication" json:"authentication,omitempty"`+ Username string `protobuf:"bytes,8,opt,name=username,proto3" json:"username,omitempty"`+ // If not specified, server will use the existed password.+ Password *string `protobuf:"bytes,9,opt,name=password,proto3,oneof" json:"password,omitempty"`+ // The sender email address.+ From string `protobuf:"bytes,10,opt,name=from,proto3" json:"from,omitempty"`+ // The recipient email address, used with validate_only to send test email.+ To string `protobuf:"bytes,11,opt,name=to,proto3" json:"to,omitempty"`+}++func (x *SMTPMailDeliverySettingValue) Reset() {+ *x = SMTPMailDeliverySettingValue{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_setting_service_proto_msgTypes[5]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *SMTPMailDeliverySettingValue) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*SMTPMailDeliverySettingValue) ProtoMessage() {}++func (x *SMTPMailDeliverySettingValue) ProtoReflect() protoreflect.Message {+ mi := &file_v1_setting_service_proto_msgTypes[5]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use SMTPMailDeliverySettingValue.ProtoReflect.Descriptor instead.+func (*SMTPMailDeliverySettingValue) Descriptor() ([]byte, []int) {+ return file_v1_setting_service_proto_rawDescGZIP(), []int{5}+}++func (x *SMTPMailDeliverySettingValue) GetServer() string {+ if x != nil {+ return x.Server+ }+ return ""+}++func (x *SMTPMailDeliverySettingValue) GetPort() int32 {+ if x != nil {+ return x.Port+ }+ return 0+}++func (x *SMTPMailDeliverySettingValue) GetEncryption() SMTPMailDeliverySettingValue_Encryption {+ if x != nil {+ return x.Encryption+ }+ return SMTPMailDeliverySettingValue_ENCRYPTION_UNSPECIFIED+}++func (x *SMTPMailDeliverySettingValue) GetCa() string {+ if x != nil && x.Ca != nil {+ return *x.Ca+ }+ return ""+}++func (x *SMTPMailDeliverySettingValue) GetKey() string {+ if x != nil && x.Key != nil {+ return *x.Key+ }+ return ""+}++func (x *SMTPMailDeliverySettingValue) GetCert() string {+ if x != nil && x.Cert != nil {+ return *x.Cert+ }+ return ""+}++func (x *SMTPMailDeliverySettingValue) GetAuthentication() SMTPMailDeliverySettingValue_Authentication {+ if x != nil {+ return x.Authentication+ }+ return SMTPMailDeliverySettingValue_AUTHENTICATION_UNSPECIFIED+}++func (x *SMTPMailDeliverySettingValue) GetUsername() string {+ if x != nil {+ return x.Username+ }+ return ""+}++func (x *SMTPMailDeliverySettingValue) GetPassword() string {+ if x != nil && x.Password != nil {+ return *x.Password+ }+ return ""+}++func (x *SMTPMailDeliverySettingValue) GetFrom() string {+ if x != nil {+ return x.From+ }+ return ""+}++func (x *SMTPMailDeliverySettingValue) GetTo() string {+ if x != nil {+ return x.To+ }+ return ""+}+var File_v1_setting_service_proto protoreflect.FileDescriptorvar file_v1_setting_service_proto_rawDesc = []byte{@@ -338,27 +596,81 @@ var file_v1_setting_service_proto_rawDesc = []byte{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, 0x35, 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, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c,- 0x75, 0x65, 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,+ 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,}var (@@ -373,27 +685,34 @@ func file_v1_setting_service_proto_rawDescGZIP() []byte {return file_v1_setting_service_proto_rawDescData}-var file_v1_setting_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5)+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{}{- (*GetSettingRequest)(nil), // 0: bytebase.v1.GetSettingRequest- (*GetSettingResponse)(nil), // 1: bytebase.v1.GetSettingResponse- (*SetSettingRequest)(nil), // 2: bytebase.v1.SetSettingRequest- (*Setting)(nil), // 3: bytebase.v1.Setting- (*Value)(nil), // 4: bytebase.v1.Value+ (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}var file_v1_setting_service_proto_depIdxs = []int32{- 3, // 0: bytebase.v1.GetSettingResponse.setting:type_name -> bytebase.v1.Setting- 3, // 1: bytebase.v1.SetSettingRequest.setting:type_name -> bytebase.v1.Setting- 4, // 2: bytebase.v1.Setting.value:type_name -> bytebase.v1.Value- 0, // 3: bytebase.v1.SettingService.GetSetting:input_type -> bytebase.v1.GetSettingRequest- 2, // 4: bytebase.v1.SettingService.SetSetting:input_type -> bytebase.v1.SetSettingRequest- 3, // 5: bytebase.v1.SettingService.GetSetting:output_type -> bytebase.v1.Setting- 3, // 6: bytebase.v1.SettingService.SetSetting:output_type -> bytebase.v1.Setting- 5, // [5:7] is the sub-list for method output_type- 3, // [3:5] is the sub-list for method input_type- 3, // [3:3] is the sub-list for extension type_name- 3, // [3:3] is the sub-list for extension extendee- 0, // [0:3] is the sub-list for field type_name+ 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}func init() { file_v1_setting_service_proto_init() }@@ -462,22 +781,37 @@ func file_v1_setting_service_proto_init() {return nil}}+ file_v1_setting_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*SMTPMailDeliverySettingValue); 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{}{(*Value_StringValue)(nil),+ (*Value_SmtpMailDeliverySettingValue)(nil),}+ file_v1_setting_service_proto_msgTypes[5].OneofWrappers = []interface{}{}type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_v1_setting_service_proto_rawDesc,- NumEnums: 0,- NumMessages: 5,+ NumEnums: 2,+ NumMessages: 6,NumExtensions: 0,NumServices: 1,},GoTypes: file_v1_setting_service_proto_goTypes,DependencyIndexes: file_v1_setting_service_proto_depIdxs,+ EnumInfos: file_v1_setting_service_proto_enumTypes,MessageInfos: file_v1_setting_service_proto_msgTypes,}.Build()File_v1_setting_service_proto = out.Filediff --git a/proto/v1/setting_service.proto b/proto/v1/setting_service.protoindex 69ef679656..0ef2e78cb2 100644--- a/proto/v1/setting_service.proto+++ b/proto/v1/setting_service.proto@@ -61,5 +61,50 @@ message Value {oneof value {// Defines this value as being a string value.string string_value = 1;+ SMTPMailDeliverySettingValue smtp_mail_delivery_setting_value = 2;}}++message SMTPMailDeliverySettingValue {+ // The SMTP server address.+ string server = 1;++ // The SMTP server port.+ int32 port = 2;++ // We support three types of SMTP encryption: NONE, STARTTLS, and SSL/TLS.+ enum Encryption {+ ENCRYPTION_UNSPECIFIED = 0;+ ENCRYPTION_NONE = 1;+ ENCRYPTION_STARTTLS = 2;+ ENCRYPTION_SSL_TLS = 3;+ }++ // The SMTP server encryption.+ Encryption encryption = 3;++ // The CA, KEY, and CERT for the SMTP server.+ // Not used.+ optional string ca = 4;+ optional string key = 5;+ optional string cert = 6;++ // We support four types of SMTP authentication: NONE, PLAIN, LOGIN, and CRAM-MD5.+ enum Authentication {+ AUTHENTICATION_UNSPECIFIED = 0;+ AUTHENTICATION_NONE = 1;+ AUTHENTICATION_PLAIN = 2;+ AUTHENTICATION_LOGIN = 3;+ AUTHENTICATION_CRAM_MD5 = 4;+ }+ Authentication authentication = 7;+ string username = 8;+ // If not specified, server will use the existed password.+ optional string password = 9;++ // The sender email address.+ string from = 10;++ // The recipient email address, used with validate_only to send test email.+ string to = 11;+}\ No newline at end of file