diff --git a/event_reporter/utils/app_version.go b/event_reporter/utils/app_version.go index b6c1e8479dae0..0d89efb242118 100644 --- a/event_reporter/utils/app_version.go +++ b/event_reporter/utils/app_version.go @@ -3,22 +3,11 @@ package utils import ( "encoding/json" - "github.com/argoproj/argo-cd/v2/pkg/apiclient/events" "github.com/argoproj/argo-cd/v2/pkg/sources_server_client" "github.com/argoproj/argo-cd/v2/reposerver/apiclient" log "github.com/sirupsen/logrus" ) -func RepoAppVersionsToEvent(applicationVersions *apiclient.ApplicationVersions) (*events.ApplicationVersions, error) { - applicationVersionsEvents := &events.ApplicationVersions{} - applicationVersionsData, _ := json.Marshal(applicationVersions) - err := json.Unmarshal(applicationVersionsData, applicationVersionsEvents) - if err != nil { - return nil, err - } - return applicationVersionsEvents, nil -} - func SourcesAppVersionsToRepo(logCtx *log.Logger, applicationVersions *sources_server_client.AppVersionResult) *apiclient.ApplicationVersions { if applicationVersions == nil { return nil diff --git a/pkg/apiclient/events/events.pb.go b/pkg/apiclient/events/events.pb.go deleted file mode 100644 index 101b5a0c40330..0000000000000 --- a/pkg/apiclient/events/events.pb.go +++ /dev/null @@ -1,3517 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: server/application/events.proto - -// Events Service -// -// Events Service API provides a generic event-source that allows -// listening for argo-cd events natively from argo-events. - -package events - -import ( - fmt "fmt" - _ "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - proto "github.com/gogo/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - io "io" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// * -// The actual object that will be send -// with each event. -type EventPayload struct { - // The timestamp of the event - Timestamp string `protobuf:"bytes,1,req,name=timestamp" json:"timestamp"` - // The object that the event is about - Object []byte `protobuf:"bytes,2,req,name=object" json:"object,omitempty"` - // The object source information - Source *ObjectSource `protobuf:"bytes,3,req,name=source" json:"source,omitempty"` - // The errors of this object - Errors []*ObjectError `protobuf:"bytes,4,rep,name=errors" json:"errors,omitempty"` - // A version of the application and its dependencies - AppVersions *ApplicationVersions `protobuf:"bytes,5,opt,name=appVersions" json:"appVersions,omitempty"` - // A version of codefresh runtime - RuntimeVersion string `protobuf:"bytes,6,req,name=runtimeVersion" json:"runtimeVersion"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EventPayload) Reset() { *m = EventPayload{} } -func (m *EventPayload) String() string { return proto.CompactTextString(m) } -func (*EventPayload) ProtoMessage() {} -func (*EventPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_3ad9267ec62b112f, []int{0} -} -func (m *EventPayload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventPayload.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventPayload) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventPayload.Merge(m, src) -} -func (m *EventPayload) XXX_Size() int { - return m.Size() -} -func (m *EventPayload) XXX_DiscardUnknown() { - xxx_messageInfo_EventPayload.DiscardUnknown(m) -} - -var xxx_messageInfo_EventPayload proto.InternalMessageInfo - -func (m *EventPayload) GetTimestamp() string { - if m != nil { - return m.Timestamp - } - return "" -} - -func (m *EventPayload) GetObject() []byte { - if m != nil { - return m.Object - } - return nil -} - -func (m *EventPayload) GetSource() *ObjectSource { - if m != nil { - return m.Source - } - return nil -} - -func (m *EventPayload) GetErrors() []*ObjectError { - if m != nil { - return m.Errors - } - return nil -} - -func (m *EventPayload) GetAppVersions() *ApplicationVersions { - if m != nil { - return m.AppVersions - } - return nil -} - -func (m *EventPayload) GetRuntimeVersion() string { - if m != nil { - return m.RuntimeVersion - } - return "" -} - -// * -// Holds information about the object source -type ObjectSource struct { - DesiredManifest string `protobuf:"bytes,1,opt,name=desiredManifest" json:"desiredManifest"` - ActualManifest string `protobuf:"bytes,2,opt,name=actualManifest" json:"actualManifest"` - RepoURL string `protobuf:"bytes,3,opt,name=repoURL" json:"repoURL"` - Revision string `protobuf:"bytes,4,opt,name=revision" json:"revision"` - CommitMessage string `protobuf:"bytes,5,opt,name=commitMessage" json:"commitMessage"` - CommitAuthor string `protobuf:"bytes,6,opt,name=commitAuthor" json:"commitAuthor"` - CommitDate *v1.Time `protobuf:"bytes,7,opt,name=commitDate" json:"commitDate,omitempty"` - AppName string `protobuf:"bytes,8,opt,name=appName" json:"appName"` - AppLabels map[string]string `protobuf:"bytes,9,rep,name=appLabels" json:"appLabels" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - SyncStatus string `protobuf:"bytes,10,opt,name=syncStatus" json:"syncStatus"` - SyncStartedAt v1.Time `protobuf:"bytes,11,opt,name=syncStartedAt" json:"syncStartedAt"` - SyncFinishedAt *v1.Time `protobuf:"bytes,12,opt,name=syncFinishedAt" json:"syncFinishedAt,omitempty"` - HealthStatus *string `protobuf:"bytes,13,opt,name=healthStatus" json:"healthStatus,omitempty"` - HealthMessage *string `protobuf:"bytes,14,opt,name=healthMessage" json:"healthMessage,omitempty"` - Cluster string `protobuf:"bytes,15,opt,name=cluster" json:"cluster"` - HistoryId int64 `protobuf:"varint,16,opt,name=historyId" json:"historyId"` - OperationSyncRevision string `protobuf:"bytes,17,opt,name=operationSyncRevision" json:"operationSyncRevision"` - AppUID string `protobuf:"bytes,18,opt,name=appUID" json:"appUID"` - AppNamespace string `protobuf:"bytes,19,opt,name=appNamespace" json:"appNamespace"` - AppInstanceLabelKey string `protobuf:"bytes,20,opt,name=appInstanceLabelKey" json:"appInstanceLabelKey"` - TrackingMethod string `protobuf:"bytes,21,opt,name=trackingMethod" json:"trackingMethod"` - Revisions []string `protobuf:"bytes,22,rep,name=revisions" json:"revisions,omitempty"` - OperationSyncRevisions []string `protobuf:"bytes,23,rep,name=operationSyncRevisions" json:"operationSyncRevisions,omitempty"` - ClusterName *string `protobuf:"bytes,24,opt,name=clusterName" json:"clusterName,omitempty"` - AppMultiSourced bool `protobuf:"varint,25,req,name=appMultiSourced" json:"appMultiSourced"` - AppSourceIdx int32 `protobuf:"varint,26,req,name=appSourceIdx" json:"appSourceIdx"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ObjectSource) Reset() { *m = ObjectSource{} } -func (m *ObjectSource) String() string { return proto.CompactTextString(m) } -func (*ObjectSource) ProtoMessage() {} -func (*ObjectSource) Descriptor() ([]byte, []int) { - return fileDescriptor_3ad9267ec62b112f, []int{1} -} -func (m *ObjectSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ObjectSource.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ObjectSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectSource.Merge(m, src) -} -func (m *ObjectSource) XXX_Size() int { - return m.Size() -} -func (m *ObjectSource) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ObjectSource proto.InternalMessageInfo - -func (m *ObjectSource) GetDesiredManifest() string { - if m != nil { - return m.DesiredManifest - } - return "" -} - -func (m *ObjectSource) GetActualManifest() string { - if m != nil { - return m.ActualManifest - } - return "" -} - -func (m *ObjectSource) GetRepoURL() string { - if m != nil { - return m.RepoURL - } - return "" -} - -func (m *ObjectSource) GetRevision() string { - if m != nil { - return m.Revision - } - return "" -} - -func (m *ObjectSource) GetCommitMessage() string { - if m != nil { - return m.CommitMessage - } - return "" -} - -func (m *ObjectSource) GetCommitAuthor() string { - if m != nil { - return m.CommitAuthor - } - return "" -} - -func (m *ObjectSource) GetCommitDate() *v1.Time { - if m != nil { - return m.CommitDate - } - return nil -} - -func (m *ObjectSource) GetAppName() string { - if m != nil { - return m.AppName - } - return "" -} - -func (m *ObjectSource) GetAppLabels() map[string]string { - if m != nil { - return m.AppLabels - } - return nil -} - -func (m *ObjectSource) GetSyncStatus() string { - if m != nil { - return m.SyncStatus - } - return "" -} - -func (m *ObjectSource) GetSyncStartedAt() v1.Time { - if m != nil { - return m.SyncStartedAt - } - return v1.Time{} -} - -func (m *ObjectSource) GetSyncFinishedAt() *v1.Time { - if m != nil { - return m.SyncFinishedAt - } - return nil -} - -func (m *ObjectSource) GetHealthStatus() string { - if m != nil && m.HealthStatus != nil { - return *m.HealthStatus - } - return "" -} - -func (m *ObjectSource) GetHealthMessage() string { - if m != nil && m.HealthMessage != nil { - return *m.HealthMessage - } - return "" -} - -func (m *ObjectSource) GetCluster() string { - if m != nil { - return m.Cluster - } - return "" -} - -func (m *ObjectSource) GetHistoryId() int64 { - if m != nil { - return m.HistoryId - } - return 0 -} - -func (m *ObjectSource) GetOperationSyncRevision() string { - if m != nil { - return m.OperationSyncRevision - } - return "" -} - -func (m *ObjectSource) GetAppUID() string { - if m != nil { - return m.AppUID - } - return "" -} - -func (m *ObjectSource) GetAppNamespace() string { - if m != nil { - return m.AppNamespace - } - return "" -} - -func (m *ObjectSource) GetAppInstanceLabelKey() string { - if m != nil { - return m.AppInstanceLabelKey - } - return "" -} - -func (m *ObjectSource) GetTrackingMethod() string { - if m != nil { - return m.TrackingMethod - } - return "" -} - -func (m *ObjectSource) GetRevisions() []string { - if m != nil { - return m.Revisions - } - return nil -} - -func (m *ObjectSource) GetOperationSyncRevisions() []string { - if m != nil { - return m.OperationSyncRevisions - } - return nil -} - -func (m *ObjectSource) GetClusterName() string { - if m != nil && m.ClusterName != nil { - return *m.ClusterName - } - return "" -} - -func (m *ObjectSource) GetAppMultiSourced() bool { - if m != nil { - return m.AppMultiSourced - } - return false -} - -func (m *ObjectSource) GetAppSourceIdx() int32 { - if m != nil { - return m.AppSourceIdx - } - return 0 -} - -// * -// Holds error information; present only when error sent with application but not resource itself -type ObjectError struct { - Type string `protobuf:"bytes,1,opt,name=type" json:"type"` - Level string `protobuf:"bytes,2,opt,name=level" json:"level"` - Message string `protobuf:"bytes,3,opt,name=message" json:"message"` - LastSeen v1.Time `protobuf:"bytes,4,opt,name=lastSeen" json:"lastSeen"` - SourceReference *ErrorSourceReference `protobuf:"bytes,5,opt,name=sourceReference" json:"sourceReference,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ObjectError) Reset() { *m = ObjectError{} } -func (m *ObjectError) String() string { return proto.CompactTextString(m) } -func (*ObjectError) ProtoMessage() {} -func (*ObjectError) Descriptor() ([]byte, []int) { - return fileDescriptor_3ad9267ec62b112f, []int{2} -} -func (m *ObjectError) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ObjectError.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ObjectError) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectError.Merge(m, src) -} -func (m *ObjectError) XXX_Size() int { - return m.Size() -} -func (m *ObjectError) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectError.DiscardUnknown(m) -} - -var xxx_messageInfo_ObjectError proto.InternalMessageInfo - -func (m *ObjectError) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *ObjectError) GetLevel() string { - if m != nil { - return m.Level - } - return "" -} - -func (m *ObjectError) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func (m *ObjectError) GetLastSeen() v1.Time { - if m != nil { - return m.LastSeen - } - return v1.Time{} -} - -func (m *ObjectError) GetSourceReference() *ErrorSourceReference { - if m != nil { - return m.SourceReference - } - return nil -} - -// * -// Holds application resource metadata to which the error related -type ErrorSourceReference struct { - Group string `protobuf:"bytes,1,opt,name=group" json:"group"` - Version string `protobuf:"bytes,2,opt,name=version" json:"version"` - Kind string `protobuf:"bytes,3,req,name=kind" json:"kind"` - Name string `protobuf:"bytes,4,req,name=name" json:"name"` - Namespace string `protobuf:"bytes,5,opt,name=namespace" json:"namespace"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ErrorSourceReference) Reset() { *m = ErrorSourceReference{} } -func (m *ErrorSourceReference) String() string { return proto.CompactTextString(m) } -func (*ErrorSourceReference) ProtoMessage() {} -func (*ErrorSourceReference) Descriptor() ([]byte, []int) { - return fileDescriptor_3ad9267ec62b112f, []int{3} -} -func (m *ErrorSourceReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ErrorSourceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ErrorSourceReference.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ErrorSourceReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ErrorSourceReference.Merge(m, src) -} -func (m *ErrorSourceReference) XXX_Size() int { - return m.Size() -} -func (m *ErrorSourceReference) XXX_DiscardUnknown() { - xxx_messageInfo_ErrorSourceReference.DiscardUnknown(m) -} - -var xxx_messageInfo_ErrorSourceReference proto.InternalMessageInfo - -func (m *ErrorSourceReference) GetGroup() string { - if m != nil { - return m.Group - } - return "" -} - -func (m *ErrorSourceReference) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *ErrorSourceReference) GetKind() string { - if m != nil { - return m.Kind - } - return "" -} - -func (m *ErrorSourceReference) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ErrorSourceReference) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - -type Dependencies struct { - // Content of Chart.lock - Lock *string `protobuf:"bytes,1,opt,name=lock" json:"lock,omitempty"` - // Content of Chart.yaml - Deps *string `protobuf:"bytes,2,opt,name=deps" json:"deps,omitempty"` - // Content of requirements.yaml - Requirements *string `protobuf:"bytes,3,opt,name=requirements" json:"requirements,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Dependencies) Reset() { *m = Dependencies{} } -func (m *Dependencies) String() string { return proto.CompactTextString(m) } -func (*Dependencies) ProtoMessage() {} -func (*Dependencies) Descriptor() ([]byte, []int) { - return fileDescriptor_3ad9267ec62b112f, []int{4} -} -func (m *Dependencies) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Dependencies) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Dependencies.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Dependencies) XXX_Merge(src proto.Message) { - xxx_messageInfo_Dependencies.Merge(m, src) -} -func (m *Dependencies) XXX_Size() int { - return m.Size() -} -func (m *Dependencies) XXX_DiscardUnknown() { - xxx_messageInfo_Dependencies.DiscardUnknown(m) -} - -var xxx_messageInfo_Dependencies proto.InternalMessageInfo - -func (m *Dependencies) GetLock() string { - if m != nil && m.Lock != nil { - return *m.Lock - } - return "" -} - -func (m *Dependencies) GetDeps() string { - if m != nil && m.Deps != nil { - return *m.Deps - } - return "" -} - -func (m *Dependencies) GetRequirements() string { - if m != nil && m.Requirements != nil { - return *m.Requirements - } - return "" -} - -type ApplicationVersions struct { - // Application version presented by single value - AppVersion *string `protobuf:"bytes,1,opt,name=appVersion" json:"appVersion,omitempty"` - // Yaml content of dependencies - Dependencies *Dependencies `protobuf:"bytes,2,opt,name=dependencies" json:"dependencies,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ApplicationVersions) Reset() { *m = ApplicationVersions{} } -func (m *ApplicationVersions) String() string { return proto.CompactTextString(m) } -func (*ApplicationVersions) ProtoMessage() {} -func (*ApplicationVersions) Descriptor() ([]byte, []int) { - return fileDescriptor_3ad9267ec62b112f, []int{5} -} -func (m *ApplicationVersions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ApplicationVersions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ApplicationVersions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ApplicationVersions) XXX_Merge(src proto.Message) { - xxx_messageInfo_ApplicationVersions.Merge(m, src) -} -func (m *ApplicationVersions) XXX_Size() int { - return m.Size() -} -func (m *ApplicationVersions) XXX_DiscardUnknown() { - xxx_messageInfo_ApplicationVersions.DiscardUnknown(m) -} - -var xxx_messageInfo_ApplicationVersions proto.InternalMessageInfo - -func (m *ApplicationVersions) GetAppVersion() string { - if m != nil && m.AppVersion != nil { - return *m.AppVersion - } - return "" -} - -func (m *ApplicationVersions) GetDependencies() *Dependencies { - if m != nil { - return m.Dependencies - } - return nil -} - -func init() { - proto.RegisterType((*EventPayload)(nil), "generic.EventPayload") - proto.RegisterType((*ObjectSource)(nil), "generic.ObjectSource") - proto.RegisterMapType((map[string]string)(nil), "generic.ObjectSource.AppLabelsEntry") - proto.RegisterType((*ObjectError)(nil), "generic.ObjectError") - proto.RegisterType((*ErrorSourceReference)(nil), "generic.ErrorSourceReference") - proto.RegisterType((*Dependencies)(nil), "generic.Dependencies") - proto.RegisterType((*ApplicationVersions)(nil), "generic.ApplicationVersions") -} - -func init() { proto.RegisterFile("server/application/events.proto", fileDescriptor_3ad9267ec62b112f) } - -var fileDescriptor_3ad9267ec62b112f = []byte{ - // 1058 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xdd, 0x6e, 0x1b, 0xc5, - 0x17, 0xff, 0xfb, 0x23, 0x6e, 0x7c, 0xec, 0xa4, 0xfd, 0x4f, 0xd3, 0x32, 0x44, 0x21, 0x5d, 0x59, - 0xbd, 0xb0, 0xaa, 0x76, 0xad, 0x04, 0x54, 0x95, 0x0a, 0x21, 0xa5, 0x4a, 0x80, 0x40, 0x02, 0x68, - 0x43, 0x7b, 0xd1, 0xbb, 0xc9, 0xee, 0xa9, 0x3d, 0xf5, 0x7a, 0x66, 0x98, 0x19, 0x5b, 0xf8, 0x3d, - 0xe0, 0x25, 0x78, 0x92, 0x5e, 0xf2, 0x04, 0x08, 0xe5, 0x31, 0xb8, 0x42, 0xb3, 0x3b, 0xb6, 0x67, - 0x8d, 0x91, 0x28, 0x77, 0x33, 0xbf, 0xf3, 0x3b, 0x67, 0xe6, 0x7c, 0xce, 0xc0, 0x03, 0x83, 0x7a, - 0x86, 0x7a, 0xc0, 0x94, 0xca, 0x79, 0xca, 0x2c, 0x97, 0x62, 0x80, 0x33, 0x14, 0xd6, 0xc4, 0x4a, - 0x4b, 0x2b, 0xc9, 0xad, 0x21, 0x0a, 0xd4, 0x3c, 0xdd, 0xbf, 0x18, 0x72, 0x3b, 0x9a, 0x5e, 0xc7, - 0xa9, 0x9c, 0x0c, 0x98, 0x1e, 0x4a, 0xa5, 0xe5, 0xdb, 0x62, 0xf1, 0x24, 0xcd, 0x06, 0xb3, 0xe3, - 0x81, 0x1a, 0x0f, 0x07, 0x4c, 0x71, 0x53, 0x31, 0x35, 0x3b, 0x62, 0xb9, 0x1a, 0xb1, 0xa3, 0x41, - 0x61, 0x85, 0x59, 0xcc, 0x4a, 0xb3, 0xfb, 0x9f, 0x8c, 0x9f, 0x99, 0x98, 0x4b, 0xa7, 0x31, 0x61, - 0xe9, 0x88, 0x0b, 0xd4, 0xf3, 0x95, 0x89, 0x09, 0x5a, 0x36, 0x98, 0xfd, 0x5d, 0x6b, 0x6f, 0x28, - 0x8b, 0x83, 0xad, 0x1c, 0xb8, 0x95, 0x47, 0x0f, 0x86, 0x52, 0x0e, 0x73, 0x74, 0xaa, 0x03, 0x26, - 0x84, 0xb4, 0xc5, 0xd9, 0xde, 0x81, 0xde, 0x2f, 0x75, 0xe8, 0x9e, 0x39, 0x8f, 0xbe, 0x67, 0xf3, - 0x5c, 0xb2, 0x8c, 0xf4, 0xa0, 0x6d, 0xf9, 0x04, 0x8d, 0x65, 0x13, 0x45, 0x6b, 0x51, 0xbd, 0xdf, - 0x7e, 0xd1, 0x7c, 0xf7, 0xfb, 0x83, 0xff, 0x25, 0x2b, 0x98, 0xdc, 0x87, 0x96, 0xbc, 0x7e, 0x8b, - 0xa9, 0xa5, 0xf5, 0xa8, 0xde, 0xef, 0x26, 0x7e, 0x47, 0x9e, 0x40, 0xcb, 0xc8, 0xa9, 0x4e, 0x91, - 0x36, 0xa2, 0x7a, 0xbf, 0x73, 0x7c, 0x2f, 0xf6, 0xe1, 0x89, 0xbf, 0x2b, 0x08, 0x57, 0x85, 0x30, - 0xf1, 0x24, 0xf2, 0x18, 0x5a, 0xa8, 0xb5, 0xd4, 0x86, 0x36, 0xa3, 0x46, 0xbf, 0x73, 0xbc, 0xb7, - 0x46, 0x3f, 0x73, 0xc2, 0xc4, 0x73, 0xc8, 0xe7, 0xd0, 0x61, 0x4a, 0xbd, 0x42, 0x6d, 0xdc, 0xf5, - 0xe9, 0x56, 0x54, 0xeb, 0x77, 0x8e, 0x0f, 0x96, 0x2a, 0x27, 0xab, 0xb8, 0x2e, 0x38, 0x49, 0xa8, - 0x40, 0x1e, 0xc3, 0xae, 0x9e, 0x0a, 0xe7, 0x84, 0x87, 0x68, 0x2b, 0xf0, 0x6e, 0x4d, 0xd6, 0xfb, - 0x19, 0xa0, 0x1b, 0x5e, 0x9a, 0xc4, 0x70, 0x3b, 0x43, 0xc3, 0x35, 0x66, 0x97, 0x4c, 0xf0, 0x37, - 0x68, 0x2c, 0xad, 0x45, 0xb5, 0xa5, 0xfe, 0xba, 0xd0, 0x1d, 0xc7, 0x52, 0x3b, 0x65, 0xf9, 0x92, - 0x5e, 0x0f, 0xe8, 0x6b, 0x32, 0x72, 0x08, 0xb7, 0x34, 0x2a, 0xf9, 0x32, 0xb9, 0xa0, 0x8d, 0x80, - 0xb6, 0x00, 0x49, 0x04, 0xdb, 0x1a, 0x67, 0xbc, 0xb8, 0x76, 0x33, 0x20, 0x2c, 0x51, 0xf2, 0x08, - 0x76, 0x52, 0x39, 0x99, 0x70, 0x7b, 0x89, 0xc6, 0xb0, 0x21, 0x16, 0x01, 0x5a, 0xd0, 0xaa, 0x22, - 0xd2, 0x87, 0x6e, 0x09, 0x9c, 0x4c, 0xed, 0x48, 0x6a, 0xda, 0x0a, 0xa8, 0x15, 0x09, 0xf9, 0x1a, - 0xa0, 0xdc, 0x9f, 0x32, 0x8b, 0xf4, 0x56, 0x11, 0xf3, 0x47, 0x71, 0x59, 0x9d, 0x71, 0x58, 0x9d, - 0xb1, 0x1a, 0x0f, 0x1d, 0x60, 0x62, 0x57, 0x9d, 0xf1, 0xec, 0x28, 0xfe, 0x81, 0x4f, 0x30, 0x09, - 0xb4, 0x9d, 0x8f, 0x4c, 0xa9, 0x6f, 0xd9, 0x04, 0xe9, 0x76, 0xe8, 0xa3, 0x07, 0xc9, 0x57, 0xd0, - 0x66, 0x4a, 0x5d, 0xb0, 0x6b, 0xcc, 0x0d, 0x6d, 0x17, 0x15, 0xf1, 0x70, 0x63, 0x01, 0xb9, 0x5c, - 0x97, 0xb4, 0x33, 0x61, 0xf5, 0x7c, 0x51, 0x9f, 0x4b, 0x65, 0xf2, 0x10, 0xc0, 0xcc, 0x45, 0x7a, - 0x65, 0x99, 0x9d, 0x1a, 0x0a, 0xc1, 0x61, 0x01, 0x4e, 0x5e, 0xc1, 0x8e, 0xdf, 0x69, 0x8b, 0xd9, - 0x89, 0xa5, 0x9d, 0xf7, 0x75, 0x6f, 0x11, 0xdd, 0x8a, 0x19, 0x92, 0xc0, 0xae, 0x03, 0xbe, 0xe0, - 0x82, 0x9b, 0x51, 0x61, 0xb8, 0xfb, 0xde, 0x71, 0x5b, 0xb3, 0x40, 0x7a, 0xd0, 0x1d, 0x21, 0xcb, - 0xed, 0xc8, 0xfb, 0xb4, 0xe3, 0x7c, 0x4a, 0x2a, 0x18, 0x79, 0x08, 0x3b, 0xe5, 0x7e, 0x51, 0x01, - 0xbb, 0x05, 0xa9, 0x0a, 0xba, 0x2c, 0xa4, 0xf9, 0xd4, 0x58, 0xd4, 0xf4, 0x76, 0x98, 0x05, 0x0f, - 0xba, 0xfe, 0x1f, 0x71, 0x63, 0xa5, 0x9e, 0x9f, 0x67, 0xf4, 0x4e, 0x54, 0xeb, 0x37, 0x16, 0xf1, - 0x5d, 0xc2, 0xe4, 0x39, 0xdc, 0x93, 0xca, 0x8d, 0x1e, 0x2e, 0xc5, 0xd5, 0x5c, 0xa4, 0xc9, 0xa2, - 0x34, 0xff, 0x1f, 0x58, 0xdc, 0x4c, 0x21, 0x07, 0xd0, 0x62, 0x4a, 0xbd, 0x3c, 0x3f, 0xa5, 0x24, - 0x20, 0x7b, 0xcc, 0x55, 0xa6, 0x2f, 0x07, 0xa3, 0x58, 0x8a, 0xf4, 0x6e, 0x58, 0x99, 0xa1, 0x84, - 0x3c, 0x85, 0xbb, 0x4c, 0xa9, 0x73, 0x61, 0x2c, 0x13, 0x29, 0x16, 0x89, 0xff, 0x06, 0xe7, 0x74, - 0x2f, 0x50, 0xd8, 0x44, 0x70, 0x7d, 0x69, 0x35, 0x4b, 0xc7, 0x5c, 0x0c, 0x2f, 0xd1, 0x8e, 0x64, - 0x46, 0xef, 0x85, 0x7d, 0x59, 0x95, 0x91, 0x03, 0x68, 0x2f, 0x3a, 0xcc, 0xd0, 0xfb, 0x51, 0xa3, - 0xdf, 0x4e, 0x56, 0x00, 0x79, 0x0a, 0xf7, 0x37, 0x3a, 0x69, 0xe8, 0x07, 0x05, 0xf5, 0x1f, 0xa4, - 0x24, 0x82, 0x8e, 0x0f, 0x77, 0xd1, 0x0d, 0xb4, 0xc8, 0x53, 0x08, 0xb9, 0x69, 0xc3, 0x94, 0xba, - 0x9c, 0xe6, 0x96, 0x97, 0x35, 0x9f, 0xd1, 0x0f, 0xa3, 0x7a, 0x7f, 0x7b, 0x31, 0x6d, 0xd6, 0x84, - 0x3e, 0x6e, 0xe5, 0xee, 0x3c, 0xfb, 0x89, 0xee, 0x47, 0xf5, 0xfe, 0x56, 0x10, 0xb7, 0xa5, 0x64, - 0xff, 0x33, 0xd8, 0xad, 0xb6, 0x0f, 0xb9, 0x03, 0x8d, 0x31, 0xce, 0xcb, 0x69, 0x96, 0xb8, 0x25, - 0xd9, 0x83, 0xad, 0x19, 0xcb, 0xa7, 0x58, 0x8e, 0xac, 0xa4, 0xdc, 0x3c, 0xaf, 0x3f, 0xab, 0xf5, - 0xfe, 0xac, 0x41, 0x27, 0x18, 0xce, 0x84, 0x42, 0xd3, 0xce, 0x15, 0x56, 0x46, 0x61, 0x81, 0x90, - 0x7d, 0xd8, 0xca, 0x71, 0x86, 0x79, 0x65, 0xec, 0x95, 0x90, 0xab, 0xc1, 0x89, 0xaf, 0xd1, 0xca, - 0xb4, 0xf3, 0x20, 0xb9, 0x80, 0xed, 0x9c, 0x19, 0x7b, 0x85, 0x58, 0x4e, 0xbb, 0xff, 0xd2, 0x94, - 0x4b, 0x0b, 0xe4, 0x4b, 0xb8, 0x5d, 0x3e, 0x38, 0x09, 0xbe, 0x41, 0x8d, 0x22, 0x45, 0xff, 0x78, - 0x7c, 0xb4, 0x9c, 0x2e, 0x85, 0x33, 0x57, 0x55, 0x52, 0xb2, 0xae, 0xd5, 0xfb, 0xb5, 0x06, 0x7b, - 0x9b, 0x98, 0xce, 0xd7, 0xa1, 0x96, 0x53, 0x55, 0x09, 0x43, 0x09, 0x39, 0x5f, 0x67, 0xfe, 0xbd, - 0x09, 0x23, 0xb1, 0x00, 0x5d, 0x04, 0xc7, 0x5c, 0x64, 0xc5, 0x8b, 0xb9, 0x8c, 0xa0, 0x43, 0x9c, - 0x44, 0xb8, 0xf2, 0x68, 0x86, 0x12, 0x87, 0xb8, 0x1e, 0x15, 0xcb, 0x16, 0x09, 0xe7, 0xfc, 0x0a, - 0xee, 0xbd, 0x86, 0xee, 0x29, 0x2a, 0x14, 0x19, 0x8a, 0x94, 0xa3, 0x21, 0x04, 0x9a, 0xb9, 0x4c, - 0xc7, 0x3e, 0xcd, 0xc5, 0xda, 0x61, 0x19, 0x2a, 0xe3, 0xd3, 0x5c, 0xac, 0xdd, 0xa4, 0xd1, 0xf8, - 0xe3, 0x94, 0x6b, 0x9c, 0xb8, 0x7f, 0x4e, 0x99, 0xa0, 0xa4, 0x82, 0xf5, 0x14, 0xdc, 0xdd, 0xf0, - 0xdc, 0x92, 0x43, 0x80, 0xd5, 0x83, 0xeb, 0x0f, 0x0a, 0x10, 0xf2, 0x29, 0x74, 0xb3, 0xe0, 0x4a, - 0xc5, 0xb1, 0xe1, 0x27, 0x21, 0xbc, 0x6f, 0x52, 0xa1, 0xbe, 0x38, 0x79, 0x77, 0x73, 0x58, 0xfb, - 0xed, 0xe6, 0xb0, 0xf6, 0xc7, 0xcd, 0x61, 0xed, 0xf5, 0xc7, 0xff, 0xee, 0xb3, 0x95, 0xe6, 0x1c, - 0x85, 0xf5, 0x1f, 0xb6, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x55, 0x67, 0xad, 0x9d, 0xcc, 0x09, - 0x00, 0x00, -} - -func (m *EventPayload) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventPayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - i -= len(m.RuntimeVersion) - copy(dAtA[i:], m.RuntimeVersion) - i = encodeVarintEvents(dAtA, i, uint64(len(m.RuntimeVersion))) - i-- - dAtA[i] = 0x32 - if m.AppVersions != nil { - { - size, err := m.AppVersions.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.Errors) > 0 { - for iNdEx := len(m.Errors) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Errors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.Source == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("source") - } else { - { - size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Object == nil { - return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("object") - } else { - i -= len(m.Object) - copy(dAtA[i:], m.Object) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Object))) - i-- - dAtA[i] = 0x12 - } - i -= len(m.Timestamp) - copy(dAtA[i:], m.Timestamp) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Timestamp))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ObjectSource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ObjectSource) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ObjectSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - i = encodeVarintEvents(dAtA, i, uint64(m.AppSourceIdx)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd0 - i-- - if m.AppMultiSourced { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc8 - if m.ClusterName != nil { - i -= len(*m.ClusterName) - copy(dAtA[i:], *m.ClusterName) - i = encodeVarintEvents(dAtA, i, uint64(len(*m.ClusterName))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 - } - if len(m.OperationSyncRevisions) > 0 { - for iNdEx := len(m.OperationSyncRevisions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.OperationSyncRevisions[iNdEx]) - copy(dAtA[i:], m.OperationSyncRevisions[iNdEx]) - i = encodeVarintEvents(dAtA, i, uint64(len(m.OperationSyncRevisions[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xba - } - } - if len(m.Revisions) > 0 { - for iNdEx := len(m.Revisions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Revisions[iNdEx]) - copy(dAtA[i:], m.Revisions[iNdEx]) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Revisions[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - } - i -= len(m.TrackingMethod) - copy(dAtA[i:], m.TrackingMethod) - i = encodeVarintEvents(dAtA, i, uint64(len(m.TrackingMethod))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - i -= len(m.AppInstanceLabelKey) - copy(dAtA[i:], m.AppInstanceLabelKey) - i = encodeVarintEvents(dAtA, i, uint64(len(m.AppInstanceLabelKey))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - i -= len(m.AppNamespace) - copy(dAtA[i:], m.AppNamespace) - i = encodeVarintEvents(dAtA, i, uint64(len(m.AppNamespace))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - i -= len(m.AppUID) - copy(dAtA[i:], m.AppUID) - i = encodeVarintEvents(dAtA, i, uint64(len(m.AppUID))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - i -= len(m.OperationSyncRevision) - copy(dAtA[i:], m.OperationSyncRevision) - i = encodeVarintEvents(dAtA, i, uint64(len(m.OperationSyncRevision))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - i = encodeVarintEvents(dAtA, i, uint64(m.HistoryId)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - i -= len(m.Cluster) - copy(dAtA[i:], m.Cluster) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Cluster))) - i-- - dAtA[i] = 0x7a - if m.HealthMessage != nil { - i -= len(*m.HealthMessage) - copy(dAtA[i:], *m.HealthMessage) - i = encodeVarintEvents(dAtA, i, uint64(len(*m.HealthMessage))) - i-- - dAtA[i] = 0x72 - } - if m.HealthStatus != nil { - i -= len(*m.HealthStatus) - copy(dAtA[i:], *m.HealthStatus) - i = encodeVarintEvents(dAtA, i, uint64(len(*m.HealthStatus))) - i-- - dAtA[i] = 0x6a - } - if m.SyncFinishedAt != nil { - { - size, err := m.SyncFinishedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } - { - size, err := m.SyncStartedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - i -= len(m.SyncStatus) - copy(dAtA[i:], m.SyncStatus) - i = encodeVarintEvents(dAtA, i, uint64(len(m.SyncStatus))) - i-- - dAtA[i] = 0x52 - if len(m.AppLabels) > 0 { - for k := range m.AppLabels { - v := m.AppLabels[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintEvents(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintEvents(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintEvents(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x4a - } - } - i -= len(m.AppName) - copy(dAtA[i:], m.AppName) - i = encodeVarintEvents(dAtA, i, uint64(len(m.AppName))) - i-- - dAtA[i] = 0x42 - if m.CommitDate != nil { - { - size, err := m.CommitDate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - i -= len(m.CommitAuthor) - copy(dAtA[i:], m.CommitAuthor) - i = encodeVarintEvents(dAtA, i, uint64(len(m.CommitAuthor))) - i-- - dAtA[i] = 0x32 - i -= len(m.CommitMessage) - copy(dAtA[i:], m.CommitMessage) - i = encodeVarintEvents(dAtA, i, uint64(len(m.CommitMessage))) - i-- - dAtA[i] = 0x2a - i -= len(m.Revision) - copy(dAtA[i:], m.Revision) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Revision))) - i-- - dAtA[i] = 0x22 - i -= len(m.RepoURL) - copy(dAtA[i:], m.RepoURL) - i = encodeVarintEvents(dAtA, i, uint64(len(m.RepoURL))) - i-- - dAtA[i] = 0x1a - i -= len(m.ActualManifest) - copy(dAtA[i:], m.ActualManifest) - i = encodeVarintEvents(dAtA, i, uint64(len(m.ActualManifest))) - i-- - dAtA[i] = 0x12 - i -= len(m.DesiredManifest) - copy(dAtA[i:], m.DesiredManifest) - i = encodeVarintEvents(dAtA, i, uint64(len(m.DesiredManifest))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ObjectError) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ObjectError) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ObjectError) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.SourceReference != nil { - { - size, err := m.SourceReference.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - { - size, err := m.LastSeen.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x1a - i -= len(m.Level) - copy(dAtA[i:], m.Level) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Level))) - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ErrorSourceReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ErrorSourceReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ErrorSourceReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x2a - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x22 - i -= len(m.Kind) - copy(dAtA[i:], m.Kind) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Kind))) - i-- - dAtA[i] = 0x1a - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - i -= len(m.Group) - copy(dAtA[i:], m.Group) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Group))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Dependencies) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Dependencies) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Dependencies) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Requirements != nil { - i -= len(*m.Requirements) - copy(dAtA[i:], *m.Requirements) - i = encodeVarintEvents(dAtA, i, uint64(len(*m.Requirements))) - i-- - dAtA[i] = 0x1a - } - if m.Deps != nil { - i -= len(*m.Deps) - copy(dAtA[i:], *m.Deps) - i = encodeVarintEvents(dAtA, i, uint64(len(*m.Deps))) - i-- - dAtA[i] = 0x12 - } - if m.Lock != nil { - i -= len(*m.Lock) - copy(dAtA[i:], *m.Lock) - i = encodeVarintEvents(dAtA, i, uint64(len(*m.Lock))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ApplicationVersions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ApplicationVersions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ApplicationVersions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Dependencies != nil { - { - size, err := m.Dependencies.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.AppVersion != nil { - i -= len(*m.AppVersion) - copy(dAtA[i:], *m.AppVersion) - i = encodeVarintEvents(dAtA, i, uint64(len(*m.AppVersion))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { - offset -= sovEvents(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *EventPayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Timestamp) - n += 1 + l + sovEvents(uint64(l)) - if m.Object != nil { - l = len(m.Object) - n += 1 + l + sovEvents(uint64(l)) - } - if m.Source != nil { - l = m.Source.Size() - n += 1 + l + sovEvents(uint64(l)) - } - if len(m.Errors) > 0 { - for _, e := range m.Errors { - l = e.Size() - n += 1 + l + sovEvents(uint64(l)) - } - } - if m.AppVersions != nil { - l = m.AppVersions.Size() - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.RuntimeVersion) - n += 1 + l + sovEvents(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ObjectSource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DesiredManifest) - n += 1 + l + sovEvents(uint64(l)) - l = len(m.ActualManifest) - n += 1 + l + sovEvents(uint64(l)) - l = len(m.RepoURL) - n += 1 + l + sovEvents(uint64(l)) - l = len(m.Revision) - n += 1 + l + sovEvents(uint64(l)) - l = len(m.CommitMessage) - n += 1 + l + sovEvents(uint64(l)) - l = len(m.CommitAuthor) - n += 1 + l + sovEvents(uint64(l)) - if m.CommitDate != nil { - l = m.CommitDate.Size() - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.AppName) - n += 1 + l + sovEvents(uint64(l)) - if len(m.AppLabels) > 0 { - for k, v := range m.AppLabels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovEvents(uint64(len(k))) + 1 + len(v) + sovEvents(uint64(len(v))) - n += mapEntrySize + 1 + sovEvents(uint64(mapEntrySize)) - } - } - l = len(m.SyncStatus) - n += 1 + l + sovEvents(uint64(l)) - l = m.SyncStartedAt.Size() - n += 1 + l + sovEvents(uint64(l)) - if m.SyncFinishedAt != nil { - l = m.SyncFinishedAt.Size() - n += 1 + l + sovEvents(uint64(l)) - } - if m.HealthStatus != nil { - l = len(*m.HealthStatus) - n += 1 + l + sovEvents(uint64(l)) - } - if m.HealthMessage != nil { - l = len(*m.HealthMessage) - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.Cluster) - n += 1 + l + sovEvents(uint64(l)) - n += 2 + sovEvents(uint64(m.HistoryId)) - l = len(m.OperationSyncRevision) - n += 2 + l + sovEvents(uint64(l)) - l = len(m.AppUID) - n += 2 + l + sovEvents(uint64(l)) - l = len(m.AppNamespace) - n += 2 + l + sovEvents(uint64(l)) - l = len(m.AppInstanceLabelKey) - n += 2 + l + sovEvents(uint64(l)) - l = len(m.TrackingMethod) - n += 2 + l + sovEvents(uint64(l)) - if len(m.Revisions) > 0 { - for _, s := range m.Revisions { - l = len(s) - n += 2 + l + sovEvents(uint64(l)) - } - } - if len(m.OperationSyncRevisions) > 0 { - for _, s := range m.OperationSyncRevisions { - l = len(s) - n += 2 + l + sovEvents(uint64(l)) - } - } - if m.ClusterName != nil { - l = len(*m.ClusterName) - n += 2 + l + sovEvents(uint64(l)) - } - n += 3 - n += 2 + sovEvents(uint64(m.AppSourceIdx)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ObjectError) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovEvents(uint64(l)) - l = len(m.Level) - n += 1 + l + sovEvents(uint64(l)) - l = len(m.Message) - n += 1 + l + sovEvents(uint64(l)) - l = m.LastSeen.Size() - n += 1 + l + sovEvents(uint64(l)) - if m.SourceReference != nil { - l = m.SourceReference.Size() - n += 1 + l + sovEvents(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ErrorSourceReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Group) - n += 1 + l + sovEvents(uint64(l)) - l = len(m.Version) - n += 1 + l + sovEvents(uint64(l)) - l = len(m.Kind) - n += 1 + l + sovEvents(uint64(l)) - l = len(m.Name) - n += 1 + l + sovEvents(uint64(l)) - l = len(m.Namespace) - n += 1 + l + sovEvents(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Dependencies) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Lock != nil { - l = len(*m.Lock) - n += 1 + l + sovEvents(uint64(l)) - } - if m.Deps != nil { - l = len(*m.Deps) - n += 1 + l + sovEvents(uint64(l)) - } - if m.Requirements != nil { - l = len(*m.Requirements) - n += 1 + l + sovEvents(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ApplicationVersions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AppVersion != nil { - l = len(*m.AppVersion) - n += 1 + l + sovEvents(uint64(l)) - } - if m.Dependencies != nil { - l = m.Dependencies.Size() - n += 1 + l + sovEvents(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovEvents(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEvents(x uint64) (n int) { - return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *EventPayload) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventPayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Timestamp = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Object = append(m.Object[:0], dAtA[iNdEx:postIndex]...) - if m.Object == nil { - m.Object = []byte{} - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000002) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Source == nil { - m.Source = &ObjectSource{} - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000004) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Errors = append(m.Errors, &ObjectError{}) - if err := m.Errors[len(m.Errors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppVersions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AppVersions == nil { - m.AppVersions = &ApplicationVersions{} - } - if err := m.AppVersions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RuntimeVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - hasFields[0] |= uint64(0x00000008) - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("object") - } - if hasFields[0]&uint64(0x00000004) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("source") - } - if hasFields[0]&uint64(0x00000008) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("runtimeVersion") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ObjectSource) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ObjectSource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ObjectSource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DesiredManifest", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DesiredManifest = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActualManifest", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ActualManifest = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RepoURL", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RepoURL = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Revision = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommitMessage", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CommitMessage = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommitAuthor", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CommitAuthor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommitDate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CommitDate == nil { - m.CommitDate = &v1.Time{} - } - if err := m.CommitDate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AppName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppLabels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AppLabels == nil { - m.AppLabels = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthEvents - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthEvents - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthEvents - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthEvents - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.AppLabels[mapkey] = mapvalue - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SyncStatus", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SyncStatus = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SyncStartedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SyncStartedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SyncFinishedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SyncFinishedAt == nil { - m.SyncFinishedAt = &v1.Time{} - } - if err := m.SyncFinishedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HealthStatus", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.HealthStatus = &s - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HealthMessage", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.HealthMessage = &s - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cluster = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistoryId", wireType) - } - m.HistoryId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HistoryId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperationSyncRevision", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OperationSyncRevision = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppUID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AppUID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 19: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppNamespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AppNamespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppInstanceLabelKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AppInstanceLabelKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TrackingMethod", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TrackingMethod = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 22: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Revisions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Revisions = append(m.Revisions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 23: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperationSyncRevisions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OperationSyncRevisions = append(m.OperationSyncRevisions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 24: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.ClusterName = &s - iNdEx = postIndex - case 25: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AppMultiSourced", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AppMultiSourced = bool(v != 0) - hasFields[0] |= uint64(0x00000001) - case 26: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AppSourceIdx", wireType) - } - m.AppSourceIdx = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AppSourceIdx |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000002) - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("appMultiSourced") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("appSourceIdx") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ObjectError) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ObjectError: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ObjectError: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Level = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastSeen", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastSeen.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceReference", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SourceReference == nil { - m.SourceReference = &ErrorSourceReference{} - } - if err := m.SourceReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ErrorSourceReference) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ErrorSourceReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ErrorSourceReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Group = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - hasFields[0] |= uint64(0x00000002) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("kind") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Dependencies) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Dependencies: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Dependencies: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Lock", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Lock = &s - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deps", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Deps = &s - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Requirements", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Requirements = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ApplicationVersions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ApplicationVersions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ApplicationVersions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.AppVersion = &s - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dependencies", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Dependencies == nil { - m.Dependencies = &Dependencies{} - } - if err := m.Dependencies.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEvents(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEvents - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEvents - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEvents - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") -) diff --git a/server/application/events.proto b/server/application/events.proto deleted file mode 100644 index cd0d39ec3afb1..0000000000000 --- a/server/application/events.proto +++ /dev/null @@ -1,103 +0,0 @@ -syntax = "proto2"; -option go_package = "github.com/argoproj/argo-cd/v2/pkg/apiclient/events"; - -// Events Service -// -// Events Service API provides a generic event-source that allows -// listening for argo-cd events natively from argo-events. -package generic; - -import "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1/generated.proto"; -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; - -/** -* The actual object that will be send -* with each event. -*/ -message EventPayload { - // The timestamp of the event - required string timestamp = 1 [(gogoproto.nullable) = false]; - // The object that the event is about - required bytes object = 2; - // The object source information - required ObjectSource source = 3; - // The errors of this object - repeated ObjectError errors = 4; - // A version of the application and its dependencies - optional ApplicationVersions appVersions = 5; - // A version of codefresh runtime - required string runtimeVersion = 6 [(gogoproto.nullable) = false]; -} - -/** -* Holds information about the object source -*/ -message ObjectSource { - optional string desiredManifest = 1 [(gogoproto.nullable) = false]; - optional string actualManifest = 2 [(gogoproto.nullable) = false]; - optional string repoURL = 3 [(gogoproto.nullable) = false]; - optional string revision = 4 [(gogoproto.nullable) = false]; // sync.revision - optional string commitMessage = 5 [(gogoproto.nullable) = false]; - optional string commitAuthor = 6 [(gogoproto.nullable) = false]; - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time commitDate = 7; - optional string appName = 8 [(gogoproto.nullable) = false]; - map appLabels = 9 [(gogoproto.nullable) = false]; - optional string syncStatus = 10 [(gogoproto.nullable) = false]; - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time syncStartedAt = 11 [(gogoproto.nullable) = false]; - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time syncFinishedAt = 12; - optional string healthStatus = 13; - optional string healthMessage = 14; - optional string cluster = 15 [(gogoproto.nullable) = false]; // destination.server - optional int64 historyId = 16 [(gogoproto.nullable) = false]; // legacy - optional string operationSyncRevision = 17 [(gogoproto.nullable) = false]; - optional string appUID = 18 [(gogoproto.nullable) = false]; - optional string appNamespace = 19 [(gogoproto.nullable) = false]; - optional string appInstanceLabelKey = 20 [(gogoproto.nullable) = false]; - optional string trackingMethod = 21 [(gogoproto.nullable) = false]; - repeated string revisions = 22; // sync.revisions - repeated string operationSyncRevisions = 23; // syncResult.revisions - optional string clusterName = 24; // destination.name - required bool appMultiSourced = 25 [(gogoproto.nullable) = false]; - required int32 appSourceIdx = 26 [(gogoproto.nullable) = false]; -} - -/** -* Holds error information; present only when error sent with application but not resource itself -*/ -message ObjectError { - optional string type = 1 [(gogoproto.nullable) = false]; - optional string level = 2 [(gogoproto.nullable) = false]; - optional string message = 3 [(gogoproto.nullable) = false]; - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastSeen = 4 [(gogoproto.nullable) = false]; - optional ErrorSourceReference sourceReference = 5; -} - -/** -* Holds application resource metadata to which the error related -*/ -message ErrorSourceReference { - optional string group = 1 [(gogoproto.nullable) = false]; - optional string version = 2 [(gogoproto.nullable) = false]; - required string kind = 3 [(gogoproto.nullable) = false]; - required string name = 4 [(gogoproto.nullable) = false]; - optional string namespace = 5 [(gogoproto.nullable) = false]; -} - -message Dependencies { - // Content of Chart.lock - optional string lock = 1; - // Content of Chart.yaml - optional string deps = 2; - // Content of requirements.yaml - optional string requirements = 3; -} - -message ApplicationVersions { - // Application version presented by single value - optional string appVersion = 1; - // Yaml content of dependencies - optional Dependencies dependencies = 2; -} -