Skip to content

Find, verify, and analyze leaked credentials

Add source protos for Microsoft Teams scanner integration. (#284)

ahrav24dacc67fb19
diff --git a/pkg/pb/credentialspb/credentials.pb.go b/pkg/pb/credentialspb/credentials.pb.go
index 78e3e97dc..4abbb28f5 100644
--- a/pkg/pb/credentialspb/credentials.pb.go
+++ b/pkg/pb/credentialspb/credentials.pb.go
@@ -206,7 +206,7 @@ func (x *Header) GetValue() string {
return ""
}
-type ClientCrednetials struct {
+type ClientCredentials struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -216,8 +216,8 @@ type ClientCrednetials struct {
ClientSecret string `protobuf:"bytes,3,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
}
-func (x *ClientCrednetials) Reset() {
- *x = ClientCrednetials{}
+func (x *ClientCredentials) Reset() {
+ *x = ClientCredentials{}
if protoimpl.UnsafeEnabled {
mi := &file_credentials_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -225,13 +225,13 @@ func (x *ClientCrednetials) Reset() {
}
}
-func (x *ClientCrednetials) String() string {
+func (x *ClientCredentials) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ClientCrednetials) ProtoMessage() {}
+func (*ClientCredentials) ProtoMessage() {}
-func (x *ClientCrednetials) ProtoReflect() protoreflect.Message {
+func (x *ClientCredentials) ProtoReflect() protoreflect.Message {
mi := &file_credentials_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -243,26 +243,26 @@ func (x *ClientCrednetials) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ClientCrednetials.ProtoReflect.Descriptor instead.
-func (*ClientCrednetials) Descriptor() ([]byte, []int) {
+// Deprecated: Use ClientCredentials.ProtoReflect.Descriptor instead.
+func (*ClientCredentials) Descriptor() ([]byte, []int) {
return file_credentials_proto_rawDescGZIP(), []int{4}
}
-func (x *ClientCrednetials) GetTenantId() string {
+func (x *ClientCredentials) GetTenantId() string {
if x != nil {
return x.TenantId
}
return ""
}
-func (x *ClientCrednetials) GetClientId() string {
+func (x *ClientCredentials) GetClientId() string {
if x != nil {
return x.ClientId
}
return ""
}
-func (x *ClientCrednetials) GetClientSecret() string {
+func (x *ClientCredentials) GetClientSecret() string {
if x != nil {
return x.ClientSecret
}
@@ -662,7 +662,7 @@ var file_credentials_proto_rawDesc = []byte{
0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x72,
- 0x0a, 0x11, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x64, 0x6e, 0x65, 0x74, 0x69,
+ 0x0a, 0x11, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
0x61, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64,
0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
@@ -733,7 +733,7 @@ var file_credentials_proto_goTypes = []interface{}{
(*CloudEnvironment)(nil), // 1: credentials.CloudEnvironment
(*BasicAuth)(nil), // 2: credentials.BasicAuth
(*Header)(nil), // 3: credentials.Header
- (*ClientCrednetials)(nil), // 4: credentials.ClientCrednetials
+ (*ClientCredentials)(nil), // 4: credentials.ClientCredentials
(*ClientCertificate)(nil), // 5: credentials.ClientCertificate
(*Oauth2)(nil), // 6: credentials.Oauth2
(*KeySecret)(nil), // 7: credentials.KeySecret
@@ -805,7 +805,7 @@ func file_credentials_proto_init() {
}
}
file_credentials_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ClientCrednetials); i {
+ switch v := v.(*ClientCredentials); i {
case 0:
return &v.state
case 1:
diff --git a/pkg/pb/credentialspb/credentials.pb.validate.go b/pkg/pb/credentialspb/credentials.pb.validate.go
index cb18ce697..6839000e4 100644
--- a/pkg/pb/credentialspb/credentials.pb.validate.go
+++ b/pkg/pb/credentialspb/credentials.pb.validate.go
@@ -436,22 +436,22 @@ var _ interface {
ErrorName() string
} = HeaderValidationError{}
-// Validate checks the field values on ClientCrednetials with the rules defined
+// Validate checks the field values on ClientCredentials with the rules defined
// in the proto definition for this message. If any rules are violated, the
// first error encountered is returned, or nil if there are no violations.
-func (m *ClientCrednetials) Validate() error {
+func (m *ClientCredentials) Validate() error {
return m.validate(false)
}
-// ValidateAll checks the field values on ClientCrednetials with the rules
+// ValidateAll checks the field values on ClientCredentials with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
-// ClientCrednetialsMultiError, or nil if none found.
-func (m *ClientCrednetials) ValidateAll() error {
+// ClientCredentialsMultiError, or nil if none found.
+func (m *ClientCredentials) ValidateAll() error {
return m.validate(true)
}
-func (m *ClientCrednetials) validate(all bool) error {
+func (m *ClientCredentials) validate(all bool) error {
if m == nil {
return nil
}
@@ -465,18 +465,18 @@ func (m *ClientCrednetials) validate(all bool) error {
// no validation rules for ClientSecret
if len(errors) > 0 {
- return ClientCrednetialsMultiError(errors)
+ return ClientCredentialsMultiError(errors)
}
return nil
}
-// ClientCrednetialsMultiError is an error wrapping multiple validation errors
-// returned by ClientCrednetials.ValidateAll() if the designated constraints
+// ClientCredentialsMultiError is an error wrapping multiple validation errors
+// returned by ClientCredentials.ValidateAll() if the designated constraints
// aren't met.
-type ClientCrednetialsMultiError []error
+type ClientCredentialsMultiError []error
// Error returns a concatenation of all the error messages it wraps.
-func (m ClientCrednetialsMultiError) Error() string {
+func (m ClientCredentialsMultiError) Error() string {
var msgs []string
for _, err := range m {
msgs = append(msgs, err.Error())
@@ -485,11 +485,11 @@ func (m ClientCrednetialsMultiError) Error() string {
}
// AllErrors returns a list of validation violation errors.
-func (m ClientCrednetialsMultiError) AllErrors() []error { return m }
+func (m ClientCredentialsMultiError) AllErrors() []error { return m }
-// ClientCrednetialsValidationError is the validation error returned by
-// ClientCrednetials.Validate if the designated constraints aren't met.
-type ClientCrednetialsValidationError struct {
+// ClientCredentialsValidationError is the validation error returned by
+// ClientCredentials.Validate if the designated constraints aren't met.
+type ClientCredentialsValidationError struct {
field string
reason string
cause error
@@ -497,24 +497,24 @@ type ClientCrednetialsValidationError struct {
}
// Field function returns field value.
-func (e ClientCrednetialsValidationError) Field() string { return e.field }
+func (e ClientCredentialsValidationError) Field() string { return e.field }
// Reason function returns reason value.
-func (e ClientCrednetialsValidationError) Reason() string { return e.reason }
+func (e ClientCredentialsValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
-func (e ClientCrednetialsValidationError) Cause() error { return e.cause }
+func (e ClientCredentialsValidationError) Cause() error { return e.cause }
// Key function returns key value.
-func (e ClientCrednetialsValidationError) Key() bool { return e.key }
+func (e ClientCredentialsValidationError) Key() bool { return e.key }
// ErrorName returns error name.
-func (e ClientCrednetialsValidationError) ErrorName() string {
- return "ClientCrednetialsValidationError"
+func (e ClientCredentialsValidationError) ErrorName() string {
+ return "ClientCredentialsValidationError"
}
// Error satisfies the builtin error interface
-func (e ClientCrednetialsValidationError) Error() string {
+func (e ClientCredentialsValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
@@ -526,14 +526,14 @@ func (e ClientCrednetialsValidationError) Error() string {
}
return fmt.Sprintf(
- "invalid %sClientCrednetials.%s: %s%s",
+ "invalid %sClientCredentials.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
-var _ error = ClientCrednetialsValidationError{}
+var _ error = ClientCredentialsValidationError{}
var _ interface {
Field() string
@@ -541,7 +541,7 @@ var _ interface {
Key() bool
Cause() error
ErrorName() string
-} = ClientCrednetialsValidationError{}
+} = ClientCredentialsValidationError{}
// Validate checks the field values on ClientCertificate with the rules defined
// in the proto definition for this message. If any rules are violated, the
diff --git a/pkg/pb/source_metadatapb/source_metadata.pb.go b/pkg/pb/source_metadatapb/source_metadata.pb.go
index 7c3d3d9fa..b457ebeab 100644
--- a/pkg/pb/source_metadatapb/source_metadata.pb.go
+++ b/pkg/pb/source_metadatapb/source_metadata.pb.go
@@ -1712,6 +1712,101 @@ func (x *Jenkins) GetTimestamp() string {
return ""
}
+type Teams struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
+ ChannelName string `protobuf:"bytes,2,opt,name=channel_name,json=channelName,proto3" json:"channel_name,omitempty"`
+ Timestamp string `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
+ UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ Link string `protobuf:"bytes,5,opt,name=link,proto3" json:"link,omitempty"`
+ File string `protobuf:"bytes,6,opt,name=file,proto3" json:"file,omitempty"`
+ Email string `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"`
+}
+
+func (x *Teams) Reset() {
+ *x = Teams{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_source_metadata_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Teams) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Teams) ProtoMessage() {}
+
+func (x *Teams) ProtoReflect() protoreflect.Message {
+ mi := &file_source_metadata_proto_msgTypes[20]
+ 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 Teams.ProtoReflect.Descriptor instead.
+func (*Teams) Descriptor() ([]byte, []int) {
+ return file_source_metadata_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *Teams) GetChannelId() string {
+ if x != nil {
+ return x.ChannelId
+ }
+ return ""
+}
+
+func (x *Teams) GetChannelName() string {
+ if x != nil {
+ return x.ChannelName
+ }
+ return ""
+}
+
+func (x *Teams) GetTimestamp() string {
+ if x != nil {
+ return x.Timestamp
+ }
+ return ""
+}
+
+func (x *Teams) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+func (x *Teams) GetLink() string {
+ if x != nil {
+ return x.Link
+ }
+ return ""
+}
+
+func (x *Teams) GetFile() string {
+ if x != nil {
+ return x.File
+ }
+ return ""
+}
+
+func (x *Teams) GetEmail() string {
+ if x != nil {
+ return x.Email
+ }
+ return ""
+}
+
type MetaData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1738,13 +1833,14 @@ type MetaData struct {
// *MetaData_Buildkite
// *MetaData_Gerrit
// *MetaData_Jenkins
+ // *MetaData_Teams
Data isMetaData_Data `protobuf_oneof:"data"`
}
func (x *MetaData) Reset() {
*x = MetaData{}
if protoimpl.UnsafeEnabled {
- mi := &file_source_metadata_proto_msgTypes[20]
+ mi := &file_source_metadata_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1757,7 +1853,7 @@ func (x *MetaData) String() string {
func (*MetaData) ProtoMessage() {}
func (x *MetaData) ProtoReflect() protoreflect.Message {
- mi := &file_source_metadata_proto_msgTypes[20]
+ mi := &file_source_metadata_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1770,7 +1866,7 @@ func (x *MetaData) ProtoReflect() protoreflect.Message {
// Deprecated: Use MetaData.ProtoReflect.Descriptor instead.
func (*MetaData) Descriptor() ([]byte, []int) {
- return file_source_metadata_proto_rawDescGZIP(), []int{20}
+ return file_source_metadata_proto_rawDescGZIP(), []int{21}
}
func (m *MetaData) GetData() isMetaData_Data {
@@ -1920,6 +2016,13 @@ func (x *MetaData) GetJenkins() *Jenkins {
return nil
}
+func (x *MetaData) GetTeams() *Teams {
+ if x, ok := x.GetData().(*MetaData_Teams); ok {
+ return x.Teams
+ }
+ return nil
+}
+
type isMetaData_Data interface {
isMetaData_Data()
}
@@ -2004,6 +2107,10 @@ type MetaData_Jenkins struct {
Jenkins *Jenkins `protobuf:"bytes,20,opt,name=jenkins,proto3,oneof"`
}
+type MetaData_Teams struct {
+ Teams *Teams `protobuf:"bytes,21,opt,name=teams,proto3,oneof"`
+}
+
func (*MetaData_Azure) isMetaData_Data() {}
func (*MetaData_Bitbucket) isMetaData_Data() {}
@@ -2044,6 +2151,8 @@ func (*MetaData_Gerrit) isMetaData_Data() {}
func (*MetaData_Jenkins) isMetaData_Data() {}
+func (*MetaData_Teams) isMetaData_Data() {}
+
var File_source_metadata_proto protoreflect.FileDescriptor
var file_source_metadata_proto_rawDesc = []byte{
@@ -2234,76 +2343,91 @@ var file_source_metadata_proto_rawDesc = []byte{
0x62, 0x75, 0x69, 0x6c, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6c,
0x69, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12,
0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x82, 0x08,
- 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x7a,
- 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x7a, 0x75, 0x72,
- 0x65, 0x48, 0x00, 0x52, 0x05, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x62, 0x69,
- 0x74, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
- 0x42, 0x69, 0x74, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x09, 0x62, 0x69, 0x74,
- 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x37, 0x0a, 0x08, 0x63, 0x69, 0x72, 0x63, 0x6c, 0x65,
- 0x63, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x6c,
- 0x65, 0x43, 0x49, 0x48, 0x00, 0x52, 0x08, 0x63, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x63, 0x69, 0x12,
- 0x3d, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x63, 0x65,
- 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3a,
- 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x68, 0x75, 0x62, 0x18, 0x05, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
- 0x61, 0x74, 0x61, 0x2e, 0x44, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x68, 0x75, 0x62, 0x48, 0x00, 0x52,
- 0x09, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x68, 0x75, 0x62, 0x12, 0x28, 0x0a, 0x03, 0x65, 0x63,
- 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x43, 0x52, 0x48, 0x00, 0x52,
- 0x03, 0x65, 0x63, 0x72, 0x12, 0x28, 0x0a, 0x03, 0x67, 0x63, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
- 0x61, 0x74, 0x61, 0x2e, 0x47, 0x43, 0x53, 0x48, 0x00, 0x52, 0x03, 0x67, 0x63, 0x73, 0x12, 0x31,
- 0x0a, 0x06, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
+ 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xbe, 0x01,
+ 0x0a, 0x05, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e,
+ 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61,
+ 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65,
+ 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x68,
+ 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d,
+ 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69,
+ 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f,
+ 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
+ 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+ 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69,
+ 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0xb2,
+ 0x08, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x05, 0x61,
+ 0x7a, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x7a, 0x75,
+ 0x72, 0x65, 0x48, 0x00, 0x52, 0x05, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x62,
+ 0x69, 0x74, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
- 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x48, 0x00, 0x52, 0x06, 0x67, 0x69, 0x74, 0x68, 0x75,
- 0x62, 0x12, 0x31, 0x0a, 0x06, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x18, 0x09, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
- 0x61, 0x74, 0x61, 0x2e, 0x47, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x48, 0x00, 0x52, 0x06, 0x67, 0x69,
- 0x74, 0x6c, 0x61, 0x62, 0x12, 0x2b, 0x0a, 0x04, 0x6a, 0x69, 0x72, 0x61, 0x18, 0x0a, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61,
- 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4a, 0x69, 0x72, 0x61, 0x48, 0x00, 0x52, 0x04, 0x6a, 0x69, 0x72,
- 0x61, 0x12, 0x28, 0x0a, 0x03, 0x6e, 0x70, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
- 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
- 0x2e, 0x4e, 0x50, 0x4d, 0x48, 0x00, 0x52, 0x03, 0x6e, 0x70, 0x6d, 0x12, 0x2b, 0x0a, 0x04, 0x70,
- 0x79, 0x70, 0x69, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x79, 0x50, 0x69,
- 0x48, 0x00, 0x52, 0x04, 0x70, 0x79, 0x70, 0x69, 0x12, 0x25, 0x0a, 0x02, 0x73, 0x33, 0x18, 0x0d,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65,
- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x33, 0x48, 0x00, 0x52, 0x02, 0x73, 0x33, 0x12,
- 0x2e, 0x0a, 0x05, 0x73, 0x6c, 0x61, 0x63, 0x6b, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
- 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
- 0x2e, 0x53, 0x6c, 0x61, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x05, 0x73, 0x6c, 0x61, 0x63, 0x6b, 0x12,
- 0x3d, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x0f, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d,
- 0x48, 0x00, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x28,
- 0x0a, 0x03, 0x67, 0x69, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x69,
- 0x74, 0x48, 0x00, 0x52, 0x03, 0x67, 0x69, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x74, 0x65, 0x73, 0x74,
- 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
- 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52,
- 0x04, 0x74, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69,
- 0x74, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64,
- 0x6b, 0x69, 0x74, 0x65, 0x48, 0x00, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74,
- 0x65, 0x12, 0x31, 0x0a, 0x06, 0x67, 0x65, 0x72, 0x72, 0x69, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
- 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x72, 0x72, 0x69, 0x74, 0x48, 0x00, 0x52, 0x06, 0x67, 0x65,
- 0x72, 0x72, 0x69, 0x74, 0x12, 0x34, 0x0a, 0x07, 0x6a, 0x65, 0x6e, 0x6b, 0x69, 0x6e, 0x73, 0x18,
- 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d,
- 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4a, 0x65, 0x6e, 0x6b, 0x69, 0x6e, 0x73, 0x48,
- 0x00, 0x52, 0x07, 0x6a, 0x65, 0x6e, 0x6b, 0x69, 0x6e, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61,
- 0x74, 0x61, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
- 0x2f, 0x74, 0x72, 0x75, 0x66, 0x66, 0x6c, 0x65, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79,
- 0x2f, 0x74, 0x72, 0x75, 0x66, 0x66, 0x6c, 0x65, 0x68, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x70,
- 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x2e, 0x42, 0x69, 0x74, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x09, 0x62, 0x69,
+ 0x74, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x37, 0x0a, 0x08, 0x63, 0x69, 0x72, 0x63, 0x6c,
+ 0x65, 0x63, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x69, 0x72, 0x63,
+ 0x6c, 0x65, 0x43, 0x49, 0x48, 0x00, 0x52, 0x08, 0x63, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x63, 0x69,
+ 0x12, 0x3d, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x63,
+ 0x65, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12,
+ 0x3a, 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x68, 0x75, 0x62, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x68, 0x75, 0x62, 0x48, 0x00,
+ 0x52, 0x09, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x68, 0x75, 0x62, 0x12, 0x28, 0x0a, 0x03, 0x65,
+ 0x63, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x43, 0x52, 0x48, 0x00,
+ 0x52, 0x03, 0x65, 0x63, 0x72, 0x12, 0x28, 0x0a, 0x03, 0x67, 0x63, 0x73, 0x18, 0x07, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x43, 0x53, 0x48, 0x00, 0x52, 0x03, 0x67, 0x63, 0x73, 0x12,
+ 0x31, 0x0a, 0x06, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x17, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x48, 0x00, 0x52, 0x06, 0x67, 0x69, 0x74, 0x68,
+ 0x75, 0x62, 0x12, 0x31, 0x0a, 0x06, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x18, 0x09, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x48, 0x00, 0x52, 0x06, 0x67,
+ 0x69, 0x74, 0x6c, 0x61, 0x62, 0x12, 0x2b, 0x0a, 0x04, 0x6a, 0x69, 0x72, 0x61, 0x18, 0x0a, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4a, 0x69, 0x72, 0x61, 0x48, 0x00, 0x52, 0x04, 0x6a, 0x69,
+ 0x72, 0x61, 0x12, 0x28, 0x0a, 0x03, 0x6e, 0x70, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x14, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x4e, 0x50, 0x4d, 0x48, 0x00, 0x52, 0x03, 0x6e, 0x70, 0x6d, 0x12, 0x2b, 0x0a, 0x04,
+ 0x70, 0x79, 0x70, 0x69, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x79, 0x50,
+ 0x69, 0x48, 0x00, 0x52, 0x04, 0x70, 0x79, 0x70, 0x69, 0x12, 0x25, 0x0a, 0x02, 0x73, 0x33, 0x18,
+ 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x33, 0x48, 0x00, 0x52, 0x02, 0x73, 0x33,
+ 0x12, 0x2e, 0x0a, 0x05, 0x73, 0x6c, 0x61, 0x63, 0x6b, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x16, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x53, 0x6c, 0x61, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x05, 0x73, 0x6c, 0x61, 0x63, 0x6b,
+ 0x12, 0x3d, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x0f,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65,
+ 0x6d, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12,
+ 0x28, 0x0a, 0x03, 0x67, 0x69, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47,
+ 0x69, 0x74, 0x48, 0x00, 0x52, 0x03, 0x67, 0x69, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x74, 0x65, 0x73,
+ 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x48, 0x00,
+ 0x52, 0x04, 0x74, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b,
+ 0x69, 0x74, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x42, 0x75, 0x69, 0x6c,
+ 0x64, 0x6b, 0x69, 0x74, 0x65, 0x48, 0x00, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69,
+ 0x74, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x67, 0x65, 0x72, 0x72, 0x69, 0x74, 0x18, 0x13, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x72, 0x72, 0x69, 0x74, 0x48, 0x00, 0x52, 0x06, 0x67,
+ 0x65, 0x72, 0x72, 0x69, 0x74, 0x12, 0x34, 0x0a, 0x07, 0x6a, 0x65, 0x6e, 0x6b, 0x69, 0x6e, 0x73,
+ 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4a, 0x65, 0x6e, 0x6b, 0x69, 0x6e, 0x73,
+ 0x48, 0x00, 0x52, 0x07, 0x6a, 0x65, 0x6e, 0x6b, 0x69, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x05, 0x74,
+ 0x65, 0x61, 0x6d, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x61,
+ 0x6d, 0x73, 0x48, 0x00, 0x52, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x64,
+ 0x61, 0x74, 0x61, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
+ 0x6d, 0x2f, 0x74, 0x72, 0x75, 0x66, 0x66, 0x6c, 0x65, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
+ 0x79, 0x2f, 0x74, 0x72, 0x75, 0x66, 0x66, 0x6c, 0x65, 0x68, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x2f,
+ 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -2318,7 +2442,7 @@ func file_source_metadata_proto_rawDescGZIP() []byte {
return file_source_metadata_proto_rawDescData
}
-var file_source_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 21)
+var file_source_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
var file_source_metadata_proto_goTypes = []interface{}{
(*Azure)(nil), // 0: source_metadata.Azure
(*Bitbucket)(nil), // 1: source_metadata.Bitbucket
@@ -2340,7 +2464,8 @@ var file_source_metadata_proto_goTypes = []interface{}{
(*Gerrit)(nil), // 17: source_metadata.Gerrit
(*Test)(nil), // 18: source_metadata.Test
(*Jenkins)(nil), // 19: source_metadata.Jenkins
- (*MetaData)(nil), // 20: source_metadata.MetaData
+ (*Teams)(nil), // 20: source_metadata.Teams
+ (*MetaData)(nil), // 21: source_metadata.MetaData
}
var file_source_metadata_proto_depIdxs = []int32{
0, // 0: source_metadata.MetaData.azure:type_name -> source_metadata.Azure
@@ -2363,11 +2488,12 @@ var file_source_metadata_proto_depIdxs = []int32{
2, // 17: source_metadata.MetaData.buildkite:type_name -> source_metadata.Buildkite
17, // 18: source_metadata.MetaData.gerrit:type_name -> source_metadata.Gerrit
19, // 19: source_metadata.MetaData.jenkins:type_name -> source_metadata.Jenkins
- 20, // [20:20] is the sub-list for method output_type
- 20, // [20:20] 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
+ 20, // 20: source_metadata.MetaData.teams:type_name -> source_metadata.Teams
+ 21, // [21:21] is the sub-list for method output_type
+ 21, // [21:21] is the sub-list for method input_type
+ 21, // [21:21] is the sub-list for extension type_name
+ 21, // [21:21] is the sub-list for extension extendee
+ 0, // [0:21] is the sub-list for field type_name
}
func init() { file_source_metadata_proto_init() }
@@ -2617,6 +2743,18 @@ func file_source_metadata_proto_init() {
}
}
file_source_metadata_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Teams); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_source_metadata_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MetaData); i {
case 0:
return &v.state
@@ -2629,7 +2767,7 @@ func file_source_metadata_proto_init() {
}
}
}
- file_source_metadata_proto_msgTypes[20].OneofWrappers = []interface{}{
+ file_source_metadata_proto_msgTypes[21].OneofWrappers = []interface{}{
(*MetaData_Azure)(nil),
(*MetaData_Bitbucket)(nil),
(*MetaData_Circleci)(nil),
@@ -2650,6 +2788,7 @@ func file_source_metadata_proto_init() {
(*MetaData_Buildkite)(nil),
(*MetaData_Gerrit)(nil),
(*MetaData_Jenkins)(nil),
+ (*MetaData_Teams)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -2657,7 +2796,7 @@ func file_source_metadata_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_source_metadata_proto_rawDesc,
NumEnums: 0,
- NumMessages: 21,
+ NumMessages: 22,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/pkg/pb/source_metadatapb/source_metadata.pb.validate.go b/pkg/pb/source_metadatapb/source_metadata.pb.validate.go
index 8e34f4b57..a2fdf3a16 100644
--- a/pkg/pb/source_metadatapb/source_metadata.pb.validate.go
+++ b/pkg/pb/source_metadatapb/source_metadata.pb.validate.go
@@ -2209,6 +2209,117 @@ var _ interface {
ErrorName() string
} = JenkinsValidationError{}
+// Validate checks the field values on Teams with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Teams) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Teams with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in TeamsMultiError, or nil if none found.
+func (m *Teams) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Teams) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for ChannelId
+
+ // no validation rules for ChannelName
+
+ // no validation rules for Timestamp
+
+ // no validation rules for UserId
+
+ // no validation rules for Link
+
+ // no validation rules for File
+
+ // no validation rules for Email
+
+ if len(errors) > 0 {
+ return TeamsMultiError(errors)
+ }
+ return nil
+}
+
+// TeamsMultiError is an error wrapping multiple validation errors returned by
+// Teams.ValidateAll() if the designated constraints aren't met.
+type TeamsMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TeamsMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m TeamsMultiError) AllErrors() []error { return m }
+
+// TeamsValidationError is the validation error returned by Teams.Validate if
+// the designated constraints aren't met.
+type TeamsValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TeamsValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TeamsValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TeamsValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TeamsValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TeamsValidationError) ErrorName() string { return "TeamsValidationError" }
+
+// Error satisfies the builtin error interface
+func (e TeamsValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTeams.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TeamsValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TeamsValidationError{}
+
// Validate checks the field values on MetaData with the rules defined in the
// proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
@@ -2853,6 +2964,37 @@ func (m *MetaData) validate(all bool) error {
}
}
+ case *MetaData_Teams:
+
+ if all {
+ switch v := interface{}(m.GetTeams()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MetaDataValidationError{
+ field: "Teams",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MetaDataValidationError{
+ field: "Teams",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTeams()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MetaDataValidationError{
+ field: "Teams",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
}
if len(errors) > 0 {
diff --git a/pkg/pb/sourcespb/sources.pb.go b/pkg/pb/sourcespb/sources.pb.go
index a06daadc5..d5829f4ee 100644
--- a/pkg/pb/sourcespb/sources.pb.go
+++ b/pkg/pb/sourcespb/sources.pb.go
@@ -50,6 +50,7 @@ const (
SourceType_SOURCE_TYPE_BUILDKITE SourceType = 20
SourceType_SOURCE_TYPE_GERRIT SourceType = 21
SourceType_SOURCE_TYPE_JENKINS SourceType = 22
+ SourceType_SOURCE_TYPE_TEAMS SourceType = 23
)
// Enum value maps for SourceType.
@@ -78,6 +79,7 @@ var (
20: "SOURCE_TYPE_BUILDKITE",
21: "SOURCE_TYPE_GERRIT",
22: "SOURCE_TYPE_JENKINS",
+ 23: "SOURCE_TYPE_TEAMS",
}
SourceType_value = map[string]int32{
"SOURCE_TYPE_AZURE_STORAGE": 0,
@@ -103,6 +105,7 @@ var (
"SOURCE_TYPE_BUILDKITE": 20,
"SOURCE_TYPE_GERRIT": 21,
"SOURCE_TYPE_JENKINS": 22,
+ "SOURCE_TYPE_TEAMS": 23,
}
)
@@ -2002,6 +2005,96 @@ func (*Jenkins_BasicAuth) isJenkins_Credential() {}
func (*Jenkins_Header) isJenkins_Credential() {}
+type Teams struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
+ // Types that are assignable to Credential:
+ // *Teams_Authenticated
+ Credential isTeams_Credential `protobuf_oneof:"credential"`
+ Channels []string `protobuf:"bytes,3,rep,name=channels,proto3" json:"channels,omitempty"`
+ IgnoreList []string `protobuf:"bytes,4,rep,name=ignoreList,proto3" json:"ignoreList,omitempty"`
+}
+
+func (x *Teams) Reset() {
+ *x = Teams{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sources_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Teams) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Teams) ProtoMessage() {}
+
+func (x *Teams) ProtoReflect() protoreflect.Message {
+ mi := &file_sources_proto_msgTypes[21]
+ 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 Teams.ProtoReflect.Descriptor instead.
+func (*Teams) Descriptor() ([]byte, []int) {
+ return file_sources_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *Teams) GetEndpoint() string {
+ if x != nil {
+ return x.Endpoint
+ }
+ return ""
+}
+
+func (m *Teams) GetCredential() isTeams_Credential {
+ if m != nil {
+ return m.Credential
+ }
+ return nil
+}
+
+func (x *Teams) GetAuthenticated() *credentialspb.ClientCredentials {
+ if x, ok := x.GetCredential().(*Teams_Authenticated); ok {
+ return x.Authenticated
+ }
+ return nil
+}
+
+func (x *Teams) GetChannels() []string {
+ if x != nil {
+ return x.Channels
+ }
+ return nil
+}
+
+func (x *Teams) GetIgnoreList() []string {
+ if x != nil {
+ return x.IgnoreList
+ }
+ return nil
+}
+
+type isTeams_Credential interface {
+ isTeams_Credential()
+}
+
+type Teams_Authenticated struct {
+ Authenticated *credentialspb.ClientCredentials `protobuf:"bytes,2,opt,name=authenticated,proto3,oneof"`
+}
+
+func (*Teams_Authenticated) isTeams_Credential() {}
+
var File_sources_proto protoreflect.FileDescriptor
var file_sources_proto_rawDesc = []byte{
@@ -2244,51 +2337,64 @@ var file_sources_proto_rawDesc = []byte{
0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61,
0x64, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61,
- 0x6c, 0x2a, 0xfe, 0x04, 0x0a, 0x0a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
- 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,
- 0x41, 0x5a, 0x55, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x10, 0x00, 0x12,
- 0x19, 0x0a, 0x15, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42,
- 0x49, 0x54, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x4f,
- 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x49, 0x52, 0x43, 0x4c, 0x45,
- 0x43, 0x49, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54,
- 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x4c, 0x55, 0x45, 0x4e, 0x43, 0x45, 0x10, 0x03,
- 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,
- 0x44, 0x4f, 0x43, 0x4b, 0x45, 0x52, 0x48, 0x55, 0x42, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x53,
- 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50,
- 0x45, 0x5f, 0x45, 0x43, 0x52, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x4f, 0x55, 0x52, 0x43,
- 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x43, 0x53, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12,
+ 0x6c, 0x22, 0xbf, 0x01, 0x0a, 0x05, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x0a, 0x08, 0x65,
+ 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa,
+ 0x42, 0x05, 0x72, 0x03, 0x90, 0x01, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e,
+ 0x74, 0x12, 0x46, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74,
+ 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x72, 0x65, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65,
+ 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68,
+ 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x61,
+ 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x61,
+ 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x4c,
+ 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x67, 0x6e, 0x6f, 0x72,
+ 0x65, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
+ 0x69, 0x61, 0x6c, 0x2a, 0x95, 0x05, 0x0a, 0x0a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79,
+ 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50,
+ 0x45, 0x5f, 0x41, 0x5a, 0x55, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x10,
+ 0x00, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45,
+ 0x5f, 0x42, 0x49, 0x54, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14,
+ 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x49, 0x52, 0x43,
+ 0x4c, 0x45, 0x43, 0x49, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45,
+ 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x4c, 0x55, 0x45, 0x4e, 0x43, 0x45,
+ 0x10, 0x03, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50,
+ 0x45, 0x5f, 0x44, 0x4f, 0x43, 0x4b, 0x45, 0x52, 0x48, 0x55, 0x42, 0x5f, 0x49, 0x4d, 0x41, 0x47,
+ 0x45, 0x53, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54,
+ 0x59, 0x50, 0x45, 0x5f, 0x45, 0x43, 0x52, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x4f, 0x55,
+ 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x43, 0x53, 0x10, 0x06, 0x12, 0x16,
+ 0x0a, 0x12, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x49,
+ 0x54, 0x48, 0x55, 0x42, 0x10, 0x07, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45,
+ 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x5f, 0x47, 0x49, 0x54,
+ 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50,
+ 0x45, 0x5f, 0x47, 0x49, 0x54, 0x4c, 0x41, 0x42, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x4f,
+ 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4a, 0x49, 0x52, 0x41, 0x10, 0x0a,
+ 0x12, 0x24, 0x0a, 0x20, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,
+ 0x4e, 0x50, 0x4d, 0x5f, 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, 0x44, 0x5f, 0x50, 0x41, 0x43, 0x4b,
+ 0x41, 0x47, 0x45, 0x53, 0x10, 0x0b, 0x12, 0x25, 0x0a, 0x21, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45,
+ 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x59, 0x50, 0x49, 0x5f, 0x55, 0x4e, 0x41, 0x55, 0x54,
+ 0x48, 0x44, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x53, 0x10, 0x0c, 0x12, 0x12, 0x0a,
+ 0x0e, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x33, 0x10,
+ 0x0d, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45,
+ 0x5f, 0x53, 0x4c, 0x41, 0x43, 0x4b, 0x10, 0x0e, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x4f, 0x55, 0x52,
+ 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x59, 0x53, 0x54,
+ 0x45, 0x4d, 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54,
+ 0x59, 0x50, 0x45, 0x5f, 0x47, 0x49, 0x54, 0x10, 0x10, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x4f, 0x55,
+ 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x11, 0x12,
+ 0x1b, 0x0a, 0x17, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53,
+ 0x33, 0x5f, 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, 0x45, 0x44, 0x10, 0x12, 0x12, 0x2a, 0x0a, 0x26,
0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x49, 0x54, 0x48,
- 0x55, 0x42, 0x10, 0x07, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54,
- 0x59, 0x50, 0x45, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x5f, 0x47, 0x49, 0x54, 0x10, 0x08,
- 0x12, 0x16, 0x0a, 0x12, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,
- 0x47, 0x49, 0x54, 0x4c, 0x41, 0x42, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x4f, 0x55, 0x52,
- 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4a, 0x49, 0x52, 0x41, 0x10, 0x0a, 0x12, 0x24,
- 0x0a, 0x20, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x50,
- 0x4d, 0x5f, 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, 0x44, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47,
- 0x45, 0x53, 0x10, 0x0b, 0x12, 0x25, 0x0a, 0x21, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54,
- 0x59, 0x50, 0x45, 0x5f, 0x50, 0x59, 0x50, 0x49, 0x5f, 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, 0x44,
- 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x53, 0x10, 0x0c, 0x12, 0x12, 0x0a, 0x0e, 0x53,
- 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x33, 0x10, 0x0d, 0x12,
- 0x15, 0x0a, 0x11, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53,
- 0x4c, 0x41, 0x43, 0x4b, 0x10, 0x0e, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45,
- 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d,
- 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50,
- 0x45, 0x5f, 0x47, 0x49, 0x54, 0x10, 0x10, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x4f, 0x55, 0x52, 0x43,
- 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x11, 0x12, 0x1b, 0x0a,
- 0x17, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x33, 0x5f,
- 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, 0x45, 0x44, 0x10, 0x12, 0x12, 0x2a, 0x0a, 0x26, 0x53, 0x4f,
- 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x49, 0x54, 0x48, 0x55, 0x42,
- 0x5f, 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x45, 0x44,
- 0x5f, 0x4f, 0x52, 0x47, 0x10, 0x13, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45,
- 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x4b, 0x49, 0x54, 0x45, 0x10,
- 0x14, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45,
- 0x5f, 0x47, 0x45, 0x52, 0x52, 0x49, 0x54, 0x10, 0x15, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x4f, 0x55,
- 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4a, 0x45, 0x4e, 0x4b, 0x49, 0x4e, 0x53,
- 0x10, 0x16, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
- 0x2f, 0x74, 0x72, 0x75, 0x66, 0x66, 0x6c, 0x65, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79,
- 0x2f, 0x74, 0x72, 0x75, 0x66, 0x66, 0x6c, 0x65, 0x68, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x70,
- 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x70, 0x62, 0x62,
- 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x55, 0x42, 0x5f, 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54,
+ 0x45, 0x44, 0x5f, 0x4f, 0x52, 0x47, 0x10, 0x13, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x4f, 0x55, 0x52,
+ 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x4b, 0x49, 0x54,
+ 0x45, 0x10, 0x14, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59,
+ 0x50, 0x45, 0x5f, 0x47, 0x45, 0x52, 0x52, 0x49, 0x54, 0x10, 0x15, 0x12, 0x17, 0x0a, 0x13, 0x53,
+ 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4a, 0x45, 0x4e, 0x4b, 0x49,
+ 0x4e, 0x53, 0x10, 0x16, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54,
+ 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x53, 0x10, 0x17, 0x42, 0x3b, 0x5a, 0x39, 0x67,
+ 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x75, 0x66, 0x66, 0x6c,
+ 0x65, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x74, 0x72, 0x75, 0x66, 0x66, 0x6c,
+ 0x65, 0x68, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -2304,76 +2410,79 @@ func file_sources_proto_rawDescGZIP() []byte {
}
var file_sources_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
-var file_sources_proto_msgTypes = make([]protoimpl.MessageInfo, 21)
+var file_sources_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
var file_sources_proto_goTypes = []interface{}{
- (SourceType)(0), // 0: sources.SourceType
- (Confluence_GetAllSpacesScope)(0), // 1: sources.Confluence.GetAllSpacesScope
- (*LocalSource)(nil), // 2: sources.LocalSource
- (*AzureStorage)(nil), // 3: sources.AzureStorage
- (*Bitbucket)(nil), // 4: sources.Bitbucket
- (*CircleCI)(nil), // 5: sources.CircleCI
- (*Confluence)(nil), // 6: sources.Confluence
- (*DockerHub)(nil), // 7: sources.DockerHub
- (*ECR)(nil), // 8: sources.ECR
- (*Filesystem)(nil), // 9: sources.Filesystem
- (*GCS)(nil), // 10: sources.GCS
- (*Git)(nil), // 11: sources.Git
- (*GitLab)(nil), // 12: sources.GitLab
- (*GitHub)(nil), // 13: sources.GitHub
- (*JIRA)(nil), // 14: sources.JIRA
- (*NPMUnauthenticatedPackage)(nil), // 15: sources.NPMUnauthenticatedPackage
- (*PyPIUnauthenticatedPackage)(nil), // 16: sources.PyPIUnauthenticatedPackage
- (*S3)(nil), // 17: sources.S3
- (*Slack)(nil), // 18: sources.Slack
- (*Test)(nil), // 19: sources.Test
- (*Buildkite)(nil), // 20: sources.Buildkite
- (*Gerrit)(nil), // 21: sources.Gerrit
- (*Jenkins)(nil), // 22: sources.Jenkins
- (*durationpb.Duration)(nil), // 23: google.protobuf.Duration
- (*anypb.Any)(nil), // 24: google.protobuf.Any
- (*credentialspb.BasicAuth)(nil), // 25: credentials.BasicAuth
- (*credentialspb.Unauthenticated)(nil), // 26: credentials.Unauthenticated
- (*credentialspb.Oauth2)(nil), // 27: credentials.Oauth2
- (*credentialspb.KeySecret)(nil), // 28: credentials.KeySecret
- (*credentialspb.GitHubApp)(nil), // 29: credentials.GitHubApp
- (*credentialspb.CloudEnvironment)(nil), // 30: credentials.CloudEnvironment
- (*credentialspb.Header)(nil), // 31: credentials.Header
+ (SourceType)(0), // 0: sources.SourceType
+ (Confluence_GetAllSpacesScope)(0), // 1: sources.Confluence.GetAllSpacesScope
+ (*LocalSource)(nil), // 2: sources.LocalSource
+ (*AzureStorage)(nil), // 3: sources.AzureStorage
+ (*Bitbucket)(nil), // 4: sources.Bitbucket
+ (*CircleCI)(nil), // 5: sources.CircleCI
+ (*Confluence)(nil), // 6: sources.Confluence
+ (*DockerHub)(nil), // 7: sources.DockerHub
+ (*ECR)(nil), // 8: sources.ECR
+ (*Filesystem)(nil), // 9: sources.Filesystem
+ (*GCS)(nil), // 10: sources.GCS
+ (*Git)(nil), // 11: sources.Git
+ (*GitLab)(nil), // 12: sources.GitLab
+ (*GitHub)(nil), // 13: sources.GitHub
+ (*JIRA)(nil), // 14: sources.JIRA
+ (*NPMUnauthenticatedPackage)(nil), // 15: sources.NPMUnauthenticatedPackage
+ (*PyPIUnauthenticatedPackage)(nil), // 16: sources.PyPIUnauthenticatedPackage
+ (*S3)(nil), // 17: sources.S3
+ (*Slack)(nil), // 18: sources.Slack
+ (*Test)(nil), // 19: sources.Test
+ (*Buildkite)(nil), // 20: sources.Buildkite
+ (*Gerrit)(nil), // 21: sources.Gerrit
+ (*Jenkins)(nil), // 22: sources.Jenkins
+ (*Teams)(nil), // 23: sources.Teams
+ (*durationpb.Duration)(nil), // 24: google.protobuf.Duration
+ (*anypb.Any)(nil), // 25: google.protobuf.Any
+ (*credentialspb.BasicAuth)(nil), // 26: credentials.BasicAuth
+ (*credentialspb.Unauthenticated)(nil), // 27: credentials.Unauthenticated
+ (*credentialspb.Oauth2)(nil), // 28: credentials.Oauth2
+ (*credentialspb.KeySecret)(nil), // 29: credentials.KeySecret
+ (*credentialspb.GitHubApp)(nil), // 30: credentials.GitHubApp
+ (*credentialspb.CloudEnvironment)(nil), // 31: credentials.CloudEnvironment
+ (*credentialspb.Header)(nil), // 32: credentials.Header
+ (*credentialspb.ClientCredentials)(nil), // 33: credentials.ClientCredentials
}
var file_sources_proto_depIdxs = []int32{
- 23, // 0: sources.LocalSource.scan_interval:type_name -> google.protobuf.Duration
- 24, // 1: sources.LocalSource.connection:type_name -> google.protobuf.Any
- 25, // 2: sources.AzureStorage.basic_auth:type_name -> credentials.BasicAuth
- 26, // 3: sources.AzureStorage.unauthenticated:type_name -> credentials.Unauthenticated
- 27, // 4: sources.Bitbucket.oauth:type_name -> credentials.Oauth2
- 25, // 5: sources.Bitbucket.basic_auth:type_name -> credentials.BasicAuth
- 26, // 6: sources.Confluence.unauthenticated:type_name -> credentials.Unauthenticated
- 25, // 7: sources.Confluence.basic_auth:type_name -> credentials.BasicAuth
+ 24, // 0: sources.LocalSource.scan_interval:type_name -> google.protobuf.Duration
+ 25, // 1: sources.LocalSource.connection:type_name -> google.protobuf.Any
+ 26, // 2: sources.AzureStorage.basic_auth:type_name -> credentials.BasicAuth
+ 27, // 3: sources.AzureStorage.unauthenticated:type_name -> credentials.Unauthenticated
+ 28, // 4: sources.Bitbucket.oauth:type_name -> credentials.Oauth2
+ 26, // 5: sources.Bitbucket.basic_auth:type_name -> credentials.BasicAuth
+ 27, // 6: sources.Confluence.unauthenticated:type_name -> credentials.Unauthenticated
+ 26, // 7: sources.Confluence.basic_auth:type_name -> credentials.BasicAuth
1, // 8: sources.Confluence.spaces_scope:type_name -> sources.Confluence.GetAllSpacesScope
- 26, // 9: sources.DockerHub.unauthenticated:type_name -> credentials.Unauthenticated
- 28, // 10: sources.ECR.access_key:type_name -> credentials.KeySecret
- 25, // 11: sources.Git.basic_auth:type_name -> credentials.BasicAuth
- 26, // 12: sources.Git.unauthenticated:type_name -> credentials.Unauthenticated
- 27, // 13: sources.GitLab.oauth:type_name -> credentials.Oauth2
- 25, // 14: sources.GitLab.basic_auth:type_name -> credentials.BasicAuth
- 29, // 15: sources.GitHub.github_app:type_name -> credentials.GitHubApp
- 26, // 16: sources.GitHub.unauthenticated:type_name -> credentials.Unauthenticated
- 25, // 17: sources.JIRA.basic_auth:type_name -> credentials.BasicAuth
- 26, // 18: sources.JIRA.unauthenticated:type_name -> credentials.Unauthenticated
- 27, // 19: sources.JIRA.oauth:type_name -> credentials.Oauth2
- 26, // 20: sources.NPMUnauthenticatedPackage.unauthenticated:type_name -> credentials.Unauthenticated
- 26, // 21: sources.PyPIUnauthenticatedPackage.unauthenticated:type_name -> credentials.Unauthenticated
- 28, // 22: sources.S3.access_key:type_name -> credentials.KeySecret
- 26, // 23: sources.S3.unauthenticated:type_name -> credentials.Unauthenticated
- 30, // 24: sources.S3.cloud_environment:type_name -> credentials.CloudEnvironment
- 25, // 25: sources.Gerrit.basic_auth:type_name -> credentials.BasicAuth
- 26, // 26: sources.Gerrit.unauthenticated:type_name -> credentials.Unauthenticated
- 25, // 27: sources.Jenkins.basic_auth:type_name -> credentials.BasicAuth
- 31, // 28: sources.Jenkins.header:type_name -> credentials.Header
- 29, // [29:29] is the sub-list for method output_type
- 29, // [29:29] is the sub-list for method input_type
- 29, // [29:29] is the sub-list for extension type_name
- 29, // [29:29] is the sub-list for extension extendee
- 0, // [0:29] is the sub-list for field type_name
+ 27, // 9: sources.DockerHub.unauthenticated:type_name -> credentials.Unauthenticated
+ 29, // 10: sources.ECR.access_key:type_name -> credentials.KeySecret
+ 26, // 11: sources.Git.basic_auth:type_name -> credentials.BasicAuth
+ 27, // 12: sources.Git.unauthenticated:type_name -> credentials.Unauthenticated
+ 28, // 13: sources.GitLab.oauth:type_name -> credentials.Oauth2
+ 26, // 14: sources.GitLab.basic_auth:type_name -> credentials.BasicAuth
+ 30, // 15: sources.GitHub.github_app:type_name -> credentials.GitHubApp
+ 27, // 16: sources.GitHub.unauthenticated:type_name -> credentials.Unauthenticated
+ 26, // 17: sources.JIRA.basic_auth:type_name -> credentials.BasicAuth
+ 27, // 18: sources.JIRA.unauthenticated:type_name -> credentials.Unauthenticated
+ 28, // 19: sources.JIRA.oauth:type_name -> credentials.Oauth2
+ 27, // 20: sources.NPMUnauthenticatedPackage.unauthenticated:type_name -> credentials.Unauthenticated
+ 27, // 21: sources.PyPIUnauthenticatedPackage.unauthenticated:type_name -> credentials.Unauthenticated
+ 29, // 22: sources.S3.access_key:type_name -> credentials.KeySecret
+ 27, // 23: sources.S3.unauthenticated:type_name -> credentials.Unauthenticated
+ 31, // 24: sources.S3.cloud_environment:type_name -> credentials.CloudEnvironment
+ 26, // 25: sources.Gerrit.basic_auth:type_name -> credentials.BasicAuth
+ 27, // 26: sources.Gerrit.unauthenticated:type_name -> credentials.Unauthenticated
+ 26, // 27: sources.Jenkins.basic_auth:type_name -> credentials.BasicAuth
+ 32, // 28: sources.Jenkins.header:type_name -> credentials.Header
+ 33, // 29: sources.Teams.authenticated:type_name -> credentials.ClientCredentials
+ 30, // [30:30] is the sub-list for method output_type
+ 30, // [30:30] is the sub-list for method input_type
+ 30, // [30:30] is the sub-list for extension type_name
+ 30, // [30:30] is the sub-list for extension extendee
+ 0, // [0:30] is the sub-list for field type_name
}
func init() { file_sources_proto_init() }
@@ -2634,6 +2743,18 @@ func file_sources_proto_init() {
return nil
}
}
+ file_sources_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Teams); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
}
file_sources_proto_msgTypes[1].OneofWrappers = []interface{}{
(*AzureStorage_ConnectionString)(nil),
@@ -2707,13 +2828,16 @@ func file_sources_proto_init() {
(*Jenkins_BasicAuth)(nil),
(*Jenkins_Header)(nil),
}
+ file_sources_proto_msgTypes[21].OneofWrappers = []interface{}{
+ (*Teams_Authenticated)(nil),
+ }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_sources_proto_rawDesc,
NumEnums: 2,
- NumMessages: 21,
+ NumMessages: 22,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/pkg/pb/sourcespb/sources.pb.validate.go b/pkg/pb/sourcespb/sources.pb.validate.go
index 47cb822f0..d775edf4d 100644
--- a/pkg/pb/sourcespb/sources.pb.validate.go
+++ b/pkg/pb/sourcespb/sources.pb.validate.go
@@ -3173,3 +3173,147 @@ var _ interface {
Cause() error
ErrorName() string
} = JenkinsValidationError{}
+
+// Validate checks the field values on Teams with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Teams) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Teams with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in TeamsMultiError, or nil if none found.
+func (m *Teams) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Teams) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if _, err := url.Parse(m.GetEndpoint()); err != nil {
+ err = TeamsValidationError{
+ field: "Endpoint",
+ reason: "value must be a valid URI",
+ cause: err,
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ switch m.Credential.(type) {
+
+ case *Teams_Authenticated:
+
+ if all {
+ switch v := interface{}(m.GetAuthenticated()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TeamsValidationError{
+ field: "Authenticated",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TeamsValidationError{
+ field: "Authenticated",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetAuthenticated()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TeamsValidationError{
+ field: "Authenticated",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return TeamsMultiError(errors)
+ }
+ return nil
+}
+
+// TeamsMultiError is an error wrapping multiple validation errors returned by
+// Teams.ValidateAll() if the designated constraints aren't met.
+type TeamsMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TeamsMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m TeamsMultiError) AllErrors() []error { return m }
+
+// TeamsValidationError is the validation error returned by Teams.Validate if
+// the designated constraints aren't met.
+type TeamsValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TeamsValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TeamsValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TeamsValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TeamsValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TeamsValidationError) ErrorName() string { return "TeamsValidationError" }
+
+// Error satisfies the builtin error interface
+func (e TeamsValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTeams.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TeamsValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TeamsValidationError{}
diff --git a/proto/credentials.proto b/proto/credentials.proto
index a095016d1..a804c3f0a 100644
--- a/proto/credentials.proto
+++ b/proto/credentials.proto
@@ -18,7 +18,7 @@ message Header {
string value = 2;
}
-message ClientCrednetials {
+message ClientCredentials {
string tenant_id = 1;
string client_id =2;
string client_secret=3;
diff --git a/proto/source_metadata.proto b/proto/source_metadata.proto
index 39b5d3a74..ae07c030f 100644
--- a/proto/source_metadata.proto
+++ b/proto/source_metadata.proto
@@ -178,6 +178,16 @@ message Jenkins {
string timestamp = 4;
}
+message Teams {
+ string channel_id = 1;
+ string channel_name = 2;
+ string timestamp = 3;
+ string user_id = 4;
+ string link = 5;
+ string file = 6;
+ string email = 7;
+}
+
message MetaData {
oneof data {
Azure azure = 1;
@@ -200,5 +210,6 @@ message MetaData {
Buildkite buildkite = 18;
Gerrit gerrit = 19;
Jenkins jenkins = 20;
+ Teams teams = 21;
}
}
diff --git a/proto/sources.proto b/proto/sources.proto
index ec9fc685c..d4e1400e5 100644
--- a/proto/sources.proto
+++ b/proto/sources.proto
@@ -34,6 +34,7 @@ enum SourceType {
SOURCE_TYPE_BUILDKITE = 20;
SOURCE_TYPE_GERRIT = 21;
SOURCE_TYPE_JENKINS = 22;
+ SOURCE_TYPE_TEAMS = 23;
}
message LocalSource {
@@ -211,3 +212,12 @@ message Jenkins {
credentials.Header header = 3;
}
}
+
+message Teams {
+ string endpoint = 1 [(validate.rules).string.uri_ref = true];
+ oneof credential {
+ credentials.ClientCredentials authenticated = 2;
+ }
+ repeated string channels = 3;
+ repeated string ignoreList = 4;
+}