diff --git a/docs/gateway-protocol.md b/docs/gateway-protocol.md index 8855d3d0d0..f8c1afddd6 100644 --- a/docs/gateway-protocol.md +++ b/docs/gateway-protocol.md @@ -4,15 +4,12 @@ ## Table of Contents - [github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1/generated.proto](#github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1/generated.proto) - - [EventProtocol](#github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.EventProtocol) - [Gateway](#github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.Gateway) - [GatewayList](#github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.GatewayList) - [GatewayNotificationWatcher](#github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.GatewayNotificationWatcher) - [GatewaySpec](#github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.GatewaySpec) - [GatewayStatus](#github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.GatewayStatus) - [GatewayStatus.NodesEntry](#github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.GatewayStatus.NodesEntry) - - [Http](#github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.Http) - - [Nats](#github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.Nats) - [NodeStatus](#github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.NodeStatus) - [NotificationWatchers](#github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.NotificationWatchers) - [SensorNotificationWatcher](#github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.SensorNotificationWatcher) @@ -32,23 +29,6 @@ - - -### EventProtocol -Dispatch protocol contains configuration necessary to dispatch an event to sensor over different communication protocols - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| type | [string](#string) | optional | | -| http | [Http](#github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.Http) | optional | | -| nats | [Nats](#github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.Nats) | optional | | - - - - - - ### Gateway @@ -118,7 +98,7 @@ GatewaySpec represents gateway specifications | serviceSpec | [k8s.io.api.core.v1.Service](#k8s.io.api.core.v1.Service) | optional | ServiceSpec is the specifications of the service to expose the gateway Refer https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#service-v1-core | | watchers | [NotificationWatchers](#github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.NotificationWatchers) | optional | Watchers are components which are interested listening to notifications from this gateway These only need to be specified when gateway dispatch mechanism is through HTTP POST notifications. In future, support for NATS, KAFKA will be added as a means to dispatch notifications in which case specifying watchers would be unnecessary. | | processorPort | [string](#string) | optional | Port on which the gateway event source processor is running on. | -| eventProtocol | [EventProtocol](#github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.EventProtocol) | optional | EventProtocol is the underlying protocol used to send events from gateway to watchers(components interested in listening to event from this gateway) | +| eventProtocol | [github.com.argoproj.argo_events.pkg.apis.common.EventProtocol](#github.com.argoproj.argo_events.pkg.apis.common.EventProtocol) | optional | EventProtocol is the underlying protocol used to send events from gateway to watchers(components interested in listening to event from this gateway) | @@ -159,39 +139,6 @@ GatewayStatus contains information about the status of a gateway. - - -### Http - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| port | [string](#string) | optional | | - - - - - - - - -### Nats - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| url | [string](#string) | optional | | -| type | [string](#string) | optional | | -| clientId | [string](#string) | optional | | -| clusterId | [string](#string) | optional | | - - - - - - ### NodeStatus diff --git a/docs/sensor-protocol.md b/docs/sensor-protocol.md index f0fd74dbb2..4fe01d84b7 100644 --- a/docs/sensor-protocol.md +++ b/docs/sensor-protocol.md @@ -6,15 +6,12 @@ - [github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1/generated.proto](#github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1/generated.proto) - [ArtifactLocation](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.ArtifactLocation) - [ConfigmapArtifact](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.ConfigmapArtifact) - - [Data](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.Data) - [DataFilter](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.DataFilter) + - [DependencyGroup](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.DependencyGroup) - [EventDependency](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.EventDependency) - [EventDependencyFilter](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.EventDependencyFilter) - - [EventProtocol](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.EventProtocol) - [FileArtifact](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.FileArtifact) - [GroupVersionKind](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.GroupVersionKind) - - [Http](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.Http) - - [Nats](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.Nats) - [NodeStatus](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.NodeStatus) - [ResourceObject](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.ResourceObject) - [ResourceObject.LabelsEntry](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.ResourceObject.LabelsEntry) @@ -28,6 +25,7 @@ - [SensorStatus.NodesEntry](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.SensorStatus.NodesEntry) - [TimeFilter](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.TimeFilter) - [Trigger](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.Trigger) + - [TriggerCondition](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.TriggerCondition) - [URLArtifact](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.URLArtifact) @@ -81,34 +79,35 @@ ConfigmapArtifact contains information about artifact in k8 configmap - - -### Data + +### DataFilter +DataFilter describes constraints and filters for event data +Regular Expressions are purposefully not a feature as they are overkill for our uses here +See Rob Pike's Post: https://commandcenter.blogspot.com/2011/08/regular-expressions-in-lexing-and.html | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| filters | [DataFilter](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.DataFilter) | repeated | filter constraints | +| path | [string](#string) | optional | Path is the JSONPath of the event's (JSON decoded) data key Path is a series of keys separated by a dot. A key may contain wildcard characters '*' and '?'. To access an array value use the index as the key. The dot and wildcard characters can be escaped with '\\'. See https://github.com/tidwall/gjson#path-syntax for more information on how to use this. | +| type | [string](#string) | optional | Type contains the JSON type of the data | +| value | [string](#string) | repeated | Value is the allowed string values for this key Booleans are pased using strconv.ParseBool() Numbers are parsed using as float64 using strconv.ParseFloat() Strings are taken as is Nils this value is ignored | - + -### DataFilter -DataFilter describes constraints and filters for event data -Regular Expressions are purposefully not a feature as they are overkill for our uses here -See Rob Pike's Post: https://commandcenter.blogspot.com/2011/08/regular-expressions-in-lexing-and.html +### DependencyGroup +DependencyGroup is the group of dependencies | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| path | [string](#string) | optional | Path is the JSONPath of the event's (JSON decoded) data key Path is a series of keys separated by a dot. A key may contain wildcard characters '*' and '?'. To access an array value use the index as the key. The dot and wildcard characters can be escaped with '\\'. See https://github.com/tidwall/gjson#path-syntax for more information on how to use this. | -| type | [string](#string) | optional | Type contains the JSON type of the data | -| value | [string](#string) | optional | Value is the expected string value for this key Booleans are pased using strconv.ParseBool() Numbers are parsed using as float64 using strconv.ParseFloat() Strings are taken as is Nils this value is ignored | +| name | [string](#string) | optional | Name of the group | +| dependencies | [string](#string) | repeated | Dependencies of events | @@ -144,24 +143,7 @@ EventDependencyFilter defines filters and constraints for a event. | name | [string](#string) | optional | Name is the name of event filter | | time | [TimeFilter](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.TimeFilter) | optional | Time filter on the event with escalation | | context | [github.com.argoproj.argo_events.pkg.apis.common.EventContext](#github.com.argoproj.argo_events.pkg.apis.common.EventContext) | optional | Context filter constraints with escalation | -| data | [Data](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.Data) | optional | Data filter constraints with escalation | - - - - - - - - -### EventProtocol -EventProtocol contains configuration necessary to receieve an event from gateway over different communication protocols - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| type | [string](#string) | optional | Type defines the type of protocol over which events will be receieved | -| http | [Http](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.Http) | optional | Http contains the information required to setup a http server and listen to incoming events | -| nats | [Nats](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.Nats) | optional | Nats contains the information required to connect to nats server and get subscriptions | +| data | [DataFilter](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.DataFilter) | repeated | Data filter constraints with escalation | @@ -201,45 +183,6 @@ to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom - - -### Http -Http contains the information required to setup a http server and listen to incoming events - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| port | [string](#string) | optional | Port on which server will run | - - - - - - - - -### Nats -Nats contains the information required to connect to nats server and get subscriptions - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| url | [string](#string) | optional | URL is nats server/service URL | -| startWithLastReceived | [bool](#bool) | optional | Subscribe starting with most recently published value. Refer https://github.com/nats-io/go-nats-streaming | -| deliverAllAvailable | [bool](#bool) | optional | Receive all stored values in order. | -| startAtSequence | [string](#string) | optional | Receive messages starting at a specific sequence number | -| startAtTime | [string](#string) | optional | Subscribe starting at a specific time | -| startAtTimeDelta | [string](#string) | optional | Subscribe starting a specific amount of time in the past (e.g. 30 seconds ago) | -| durable | [bool](#bool) | optional | Durable subscriptions allow clients to assign a durable name to a subscription when it is created | -| clusterId | [string](#string) | optional | The NATS Streaming cluster ID | -| clientId | [string](#string) | optional | The NATS Streaming cluster ID | -| type | [string](#string) | optional | Type of the connection. either standard or streaming | - - - - - - ### NodeStatus @@ -392,7 +335,9 @@ SensorSpec represents desired sensor state | dependencies | [EventDependency](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.EventDependency) | repeated | Dependencies is a list of the events that this sensor is dependent on. | | triggers | [Trigger](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.Trigger) | repeated | Triggers is a list of the things that this sensor evokes. These are the outputs from this sensor. | | deploySpec | [k8s.io.api.core.v1.PodSpec](#k8s.io.api.core.v1.PodSpec) | optional | DeploySpec contains sensor pod specification. For more information, read https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#pod-v1-core | -| eventProtocol | [EventProtocol](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.EventProtocol) | optional | EventProtocol is the protocol through which sensor receives events from gateway | +| eventProtocol | [github.com.argoproj.argo_events.pkg.apis.common.EventProtocol](#github.com.argoproj.argo_events.pkg.apis.common.EventProtocol) | optional | EventProtocol is the protocol through which sensor receives events from gateway | +| circuit | [string](#string) | optional | Circuit is a boolean expression of dependency groups | +| dependencyGroups | [DependencyGroup](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.DependencyGroup) | repeated | DependencyGroups is a list of the groups of events. | @@ -439,7 +384,7 @@ SensorStatus contains information about the status of a sensor. ### TimeFilter TimeFilter describes a window in time. -Filters out event events that occur outside the time limits. +DataFilters out event events that occur outside the time limits. In other words, only events that occur after Start and before Stop will pass this filter. @@ -466,6 +411,24 @@ Trigger is an action taken, output produced, an event created, a message sent | resource | [ResourceObject](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.ResourceObject) | optional | Resource describes the resource that will be created by this action | | message | [string](#string) | optional | Message describes a message that will be sent on a queue | | replyStrategy | [RetryStrategy](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.RetryStrategy) | optional | RetryStrategy is the strategy to retry a trigger if it fails | +| when | [TriggerCondition](#github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.TriggerCondition) | optional | When is the condition to execute the trigger | + + + + + + + + +### TriggerCondition +TriggerCondition describes condition which must be satisfied in order to execute a trigger. +Depending upon condition type, status of dependency groups is used to evaluate the result. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| any | [string](#string) | repeated | Any acts as a OR operator between dependencies | +| all | [string](#string) | repeated | All acts as a AND operator between dependencies | diff --git a/examples/sensors/data-filter-webhook.yaml b/examples/sensors/data-filter-webhook.yaml index 4691b11c58..35196cc523 100644 --- a/examples/sensors/data-filter-webhook.yaml +++ b/examples/sensors/data-filter-webhook.yaml @@ -9,18 +9,19 @@ spec: deploySpec: containers: - name: "sensor" - image: "argoproj/sensor" + image: "argoproj/sensor:v0.7.1" imagePullPolicy: Always serviceAccountName: argo-events-sa dependencies: - - name: "webhook-gateway:foo" + - name: "webhook-gateway-http:foo" filters: name: "data-filter" data: - dataFilters: - - path: bucket - type: string - value: argo-workflow-input + - path: bucket + type: string + value: + - "argo-workflow-input" + - "argo-workflow-input1" eventProtocol: type: "HTTP" http: @@ -33,15 +34,18 @@ spec: version: v1alpha1 kind: Workflow source: - s3: - bucket: - name: workflows - key: hello-world.yaml - endpoint: minio-service.argo-events:9000 - insecure: true - accessKey: - key: accesskey - name: artifacts-minio - secretKey: - key: secretkey - name: artifacts-minio + inline: | + apiVersion: argoproj.io/v1alpha1 + kind: Workflow + metadata: + generateName: hello-world- + spec: + entrypoint: whalesay + templates: + - name: whalesay + container: + args: + - "hello world" + command: + - cowsay + image: "docker/whalesay:latest" diff --git a/examples/sensors/time-filter-webhook.yaml b/examples/sensors/time-filter-webhook.yaml index 3b44450efe..420f23e58a 100644 --- a/examples/sensors/time-filter-webhook.yaml +++ b/examples/sensors/time-filter-webhook.yaml @@ -21,10 +21,6 @@ spec: time: start: "22:14:05" stop: "23:04:05" - escalationPolicy: - name: "time-filter-escalation" - level: "Alert" - message: "time filter failed" triggers: - name: hello-world-workflow-trigger resource: diff --git a/examples/sensors/webhook-http-dependency-groups.yaml b/examples/sensors/webhook-http-dependency-groups.yaml index 98dd2900cf..e173e97628 100644 --- a/examples/sensors/webhook-http-dependency-groups.yaml +++ b/examples/sensors/webhook-http-dependency-groups.yaml @@ -11,12 +11,13 @@ spec: deploySpec: containers: - name: "sensor" - image: "argoproj/sensor:v0.7.1" + image: "argoproj/sensor" imagePullPolicy: Always serviceAccountName: argo-events-sa dependencies: - name: "webhook-gateway-http:endpoint1" filters: + name: "context-filter" context: source: host: xyz.com @@ -24,16 +25,17 @@ spec: - name: "webhook-gateway-http:endpoint2" - name: "webhook-gateway-http:endpoint3" - name: "webhook-gateway-http:endpoint4" - - name: "webhook-gateway-http:endpoint5" - - name: "webhook-gateway-http:endpoint6" - - name: "webhook-gateway-http:endpoint7" filters: name: "data-filter" data: - dataFilters: - - path: bucket - type: string - value: argo-workflow-input + - path: bucket + type: string + value: + - "argo-workflow-input" + - "argo-workflow-input1" + - name: "webhook-gateway-http:endpoint5" + - name: "webhook-gateway-http:endpoint6" + - name: "webhook-gateway-http:endpoint7" - name: "webhook-gateway-http:endpoint8" - name: "webhook-gateway-http:endpoint9" dependencyGroups: @@ -49,13 +51,13 @@ spec: - "webhook-gateway-http:endpoint4" - "webhook-gateway-http:endpoint5" - name: "group_4" - dependencies: - - "webhook-gateway-http:endpoint6" - - "webhook-gateway-http:endpoint7" - - "webhook-gateway-http:endpoint8" + dependencies: + - "webhook-gateway-http:endpoint6" + - "webhook-gateway-http:endpoint7" + - "webhook-gateway-http:endpoint8" - name: "group_5" - dependencies: - - "webhook-gateway-http:endpoint9" + dependencies: + - "webhook-gateway-http:endpoint9" circuit: "group_1 || group_2 || ((group_3 || group_4) && group_5)" eventProtocol: type: "HTTP" diff --git a/examples/sensors/webhook-nats.yaml b/examples/sensors/webhook-nats.yaml index f68540708e..30e3b63732 100644 --- a/examples/sensors/webhook-nats.yaml +++ b/examples/sensors/webhook-nats.yaml @@ -8,7 +8,7 @@ spec: deploySpec: containers: - name: "sensor" - image: "argoproj/sensor:v0.6.3" + image: "argoproj/sensor" imagePullPolicy: Always serviceAccountName: argo-events-sa dependencies: diff --git a/examples/sensors/webhook-with-complete-payload.yaml b/examples/sensors/webhook-with-complete-payload.yaml index 683a0a87cc..d51136bdc5 100644 --- a/examples/sensors/webhook-with-complete-payload.yaml +++ b/examples/sensors/webhook-with-complete-payload.yaml @@ -8,7 +8,7 @@ spec: deploySpec: containers: - name: "sensor" - image: "argoproj/sensor:v0.6.2" + image: "argoproj/sensor" imagePullPolicy: Always serviceAccountName: argo-events-sa eventProtocol: diff --git a/examples/sensors/webhook-with-resource-param.yaml b/examples/sensors/webhook-with-resource-param.yaml index bc8ad8b8aa..f41926ac21 100644 --- a/examples/sensors/webhook-with-resource-param.yaml +++ b/examples/sensors/webhook-with-resource-param.yaml @@ -8,7 +8,7 @@ spec: deploySpec: containers: - name: "sensor" - image: "argoproj/sensor:v0.6.2" + image: "argoproj/sensor" imagePullPolicy: Always serviceAccountName: argo-events-sa eventProtocol: diff --git a/pkg/apis/common/generated.pb.go b/pkg/apis/common/generated.pb.go index 5ac96b2433..3101b74d67 100644 --- a/pkg/apis/common/generated.pb.go +++ b/pkg/apis/common/generated.pb.go @@ -17,9 +17,9 @@ limitations under the License. package common -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" +import "github.com/gogo/protobuf/proto" +import "fmt" +import "math" import v11 "k8s.io/api/core/v1" @@ -27,10 +27,10 @@ import github_com_minio_minio_go "github.com/minio/minio-go" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" -import strings "strings" -import reflect "reflect" +import "strings" +import "reflect" -import io "io" +import "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package func (m *Event) Reset() { *m = Event{} } func (*Event) ProtoMessage() {} func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{0} + return fileDescriptor_generated_1ecb42411ad60761, []int{0} } func (m *Event) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ var xxx_messageInfo_Event proto.InternalMessageInfo func (m *EventContext) Reset() { *m = EventContext{} } func (*EventContext) ProtoMessage() {} func (*EventContext) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{1} + return fileDescriptor_generated_1ecb42411ad60761, []int{1} } func (m *EventContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ var xxx_messageInfo_EventContext proto.InternalMessageInfo func (m *EventProtocol) Reset() { *m = EventProtocol{} } func (*EventProtocol) ProtoMessage() {} func (*EventProtocol) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{2} + return fileDescriptor_generated_1ecb42411ad60761, []int{2} } func (m *EventProtocol) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,7 +130,7 @@ var xxx_messageInfo_EventProtocol proto.InternalMessageInfo func (m *Http) Reset() { *m = Http{} } func (*Http) ProtoMessage() {} func (*Http) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{3} + return fileDescriptor_generated_1ecb42411ad60761, []int{3} } func (m *Http) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,7 +158,7 @@ var xxx_messageInfo_Http proto.InternalMessageInfo func (m *Nats) Reset() { *m = Nats{} } func (*Nats) ProtoMessage() {} func (*Nats) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{4} + return fileDescriptor_generated_1ecb42411ad60761, []int{4} } func (m *Nats) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,7 +186,7 @@ var xxx_messageInfo_Nats proto.InternalMessageInfo func (m *S3Artifact) Reset() { *m = S3Artifact{} } func (*S3Artifact) ProtoMessage() {} func (*S3Artifact) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{5} + return fileDescriptor_generated_1ecb42411ad60761, []int{5} } func (m *S3Artifact) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -214,7 +214,7 @@ var xxx_messageInfo_S3Artifact proto.InternalMessageInfo func (m *S3Bucket) Reset() { *m = S3Bucket{} } func (*S3Bucket) ProtoMessage() {} func (*S3Bucket) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{6} + return fileDescriptor_generated_1ecb42411ad60761, []int{6} } func (m *S3Bucket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -242,7 +242,7 @@ var xxx_messageInfo_S3Bucket proto.InternalMessageInfo func (m *S3Filter) Reset() { *m = S3Filter{} } func (*S3Filter) ProtoMessage() {} func (*S3Filter) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{7} + return fileDescriptor_generated_1ecb42411ad60761, []int{7} } func (m *S3Filter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,7 +270,7 @@ var xxx_messageInfo_S3Filter proto.InternalMessageInfo func (m *URI) Reset() { *m = URI{} } func (*URI) ProtoMessage() {} func (*URI) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_fe300a967e896a62, []int{8} + return fileDescriptor_generated_1ecb42411ad60761, []int{8} } func (m *URI) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3022,10 +3022,10 @@ var ( ) func init() { - proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/common/generated.proto", fileDescriptor_generated_fe300a967e896a62) + proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/common/generated.proto", fileDescriptor_generated_1ecb42411ad60761) } -var fileDescriptor_generated_fe300a967e896a62 = []byte{ +var fileDescriptor_generated_1ecb42411ad60761 = []byte{ // 1309 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, 0x17, 0x8f, 0x13, 0xdb, 0xb1, 0xc7, 0xed, 0x37, 0xe9, 0xf4, 0x5b, 0x61, 0x05, 0xd5, 0x09, 0x46, diff --git a/pkg/apis/gateway/v1alpha1/generated.pb.go b/pkg/apis/gateway/v1alpha1/generated.pb.go index a14fedd9a5..b9d85e04cf 100644 --- a/pkg/apis/gateway/v1alpha1/generated.pb.go +++ b/pkg/apis/gateway/v1alpha1/generated.pb.go @@ -17,19 +17,19 @@ limitations under the License. package v1alpha1 -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import common "github.com/argoproj/argo-events/pkg/apis/common" +import "github.com/gogo/protobuf/proto" +import "fmt" +import "math" +import "github.com/argoproj/argo-events/pkg/apis/common" import v11 "k8s.io/api/core/v1" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" -import strings "strings" -import reflect "reflect" +import "strings" +import "reflect" -import io "io" +import "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -45,7 +45,7 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package func (m *Gateway) Reset() { *m = Gateway{} } func (*Gateway) ProtoMessage() {} func (*Gateway) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d7e7992cb16da963, []int{0} + return fileDescriptor_generated_d61eb949e4c0f5b3, []int{0} } func (m *Gateway) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -73,7 +73,7 @@ var xxx_messageInfo_Gateway proto.InternalMessageInfo func (m *GatewayList) Reset() { *m = GatewayList{} } func (*GatewayList) ProtoMessage() {} func (*GatewayList) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d7e7992cb16da963, []int{1} + return fileDescriptor_generated_d61eb949e4c0f5b3, []int{1} } func (m *GatewayList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -101,7 +101,7 @@ var xxx_messageInfo_GatewayList proto.InternalMessageInfo func (m *GatewayNotificationWatcher) Reset() { *m = GatewayNotificationWatcher{} } func (*GatewayNotificationWatcher) ProtoMessage() {} func (*GatewayNotificationWatcher) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d7e7992cb16da963, []int{2} + return fileDescriptor_generated_d61eb949e4c0f5b3, []int{2} } func (m *GatewayNotificationWatcher) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -129,7 +129,7 @@ var xxx_messageInfo_GatewayNotificationWatcher proto.InternalMessageInfo func (m *GatewaySpec) Reset() { *m = GatewaySpec{} } func (*GatewaySpec) ProtoMessage() {} func (*GatewaySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d7e7992cb16da963, []int{3} + return fileDescriptor_generated_d61eb949e4c0f5b3, []int{3} } func (m *GatewaySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -157,7 +157,7 @@ var xxx_messageInfo_GatewaySpec proto.InternalMessageInfo func (m *GatewayStatus) Reset() { *m = GatewayStatus{} } func (*GatewayStatus) ProtoMessage() {} func (*GatewayStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d7e7992cb16da963, []int{4} + return fileDescriptor_generated_d61eb949e4c0f5b3, []int{4} } func (m *GatewayStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -185,7 +185,7 @@ var xxx_messageInfo_GatewayStatus proto.InternalMessageInfo func (m *NodeStatus) Reset() { *m = NodeStatus{} } func (*NodeStatus) ProtoMessage() {} func (*NodeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d7e7992cb16da963, []int{5} + return fileDescriptor_generated_d61eb949e4c0f5b3, []int{5} } func (m *NodeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -213,7 +213,7 @@ var xxx_messageInfo_NodeStatus proto.InternalMessageInfo func (m *NotificationWatchers) Reset() { *m = NotificationWatchers{} } func (*NotificationWatchers) ProtoMessage() {} func (*NotificationWatchers) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d7e7992cb16da963, []int{6} + return fileDescriptor_generated_d61eb949e4c0f5b3, []int{6} } func (m *NotificationWatchers) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -241,7 +241,7 @@ var xxx_messageInfo_NotificationWatchers proto.InternalMessageInfo func (m *SensorNotificationWatcher) Reset() { *m = SensorNotificationWatcher{} } func (*SensorNotificationWatcher) ProtoMessage() {} func (*SensorNotificationWatcher) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d7e7992cb16da963, []int{7} + return fileDescriptor_generated_d61eb949e4c0f5b3, []int{7} } func (m *SensorNotificationWatcher) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2444,10 +2444,10 @@ var ( ) func init() { - proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1/generated.proto", fileDescriptor_generated_d7e7992cb16da963) + proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1/generated.proto", fileDescriptor_generated_d61eb949e4c0f5b3) } -var fileDescriptor_generated_d7e7992cb16da963 = []byte{ +var fileDescriptor_generated_d61eb949e4c0f5b3 = []byte{ // 1073 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x5d, 0x6f, 0x1b, 0x45, 0x17, 0xce, 0xda, 0x71, 0x6c, 0x8f, 0x93, 0x7e, 0xcc, 0xdb, 0x57, 0x2c, 0x46, 0x72, 0x2a, 0x5f, diff --git a/pkg/apis/sensor/v1alpha1/generated.pb.go b/pkg/apis/sensor/v1alpha1/generated.pb.go index 1f82beb1fa..3967b6f2f5 100644 --- a/pkg/apis/sensor/v1alpha1/generated.pb.go +++ b/pkg/apis/sensor/v1alpha1/generated.pb.go @@ -17,19 +17,19 @@ limitations under the License. package v1alpha1 -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import common "github.com/argoproj/argo-events/pkg/apis/common" +import "github.com/gogo/protobuf/proto" +import "fmt" +import "math" +import "github.com/argoproj/argo-events/pkg/apis/common" import v11 "k8s.io/api/core/v1" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" -import strings "strings" -import reflect "reflect" +import "strings" +import "reflect" -import io "io" +import "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -45,7 +45,7 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package func (m *ArtifactLocation) Reset() { *m = ArtifactLocation{} } func (*ArtifactLocation) ProtoMessage() {} func (*ArtifactLocation) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{0} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{0} } func (m *ArtifactLocation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -73,7 +73,7 @@ var xxx_messageInfo_ArtifactLocation proto.InternalMessageInfo func (m *ConfigmapArtifact) Reset() { *m = ConfigmapArtifact{} } func (*ConfigmapArtifact) ProtoMessage() {} func (*ConfigmapArtifact) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{1} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{1} } func (m *ConfigmapArtifact) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -98,38 +98,10 @@ func (m *ConfigmapArtifact) XXX_DiscardUnknown() { var xxx_messageInfo_ConfigmapArtifact proto.InternalMessageInfo -func (m *Data) Reset() { *m = Data{} } -func (*Data) ProtoMessage() {} -func (*Data) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{2} -} -func (m *Data) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (dst *Data) XXX_Merge(src proto.Message) { - xxx_messageInfo_Data.Merge(dst, src) -} -func (m *Data) XXX_Size() int { - return m.Size() -} -func (m *Data) XXX_DiscardUnknown() { - xxx_messageInfo_Data.DiscardUnknown(m) -} - -var xxx_messageInfo_Data proto.InternalMessageInfo - func (m *DataFilter) Reset() { *m = DataFilter{} } func (*DataFilter) ProtoMessage() {} func (*DataFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{3} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{2} } func (m *DataFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -157,7 +129,7 @@ var xxx_messageInfo_DataFilter proto.InternalMessageInfo func (m *DependencyGroup) Reset() { *m = DependencyGroup{} } func (*DependencyGroup) ProtoMessage() {} func (*DependencyGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{4} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{3} } func (m *DependencyGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -185,7 +157,7 @@ var xxx_messageInfo_DependencyGroup proto.InternalMessageInfo func (m *EventDependency) Reset() { *m = EventDependency{} } func (*EventDependency) ProtoMessage() {} func (*EventDependency) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{5} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{4} } func (m *EventDependency) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -213,7 +185,7 @@ var xxx_messageInfo_EventDependency proto.InternalMessageInfo func (m *EventDependencyFilter) Reset() { *m = EventDependencyFilter{} } func (*EventDependencyFilter) ProtoMessage() {} func (*EventDependencyFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{6} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{5} } func (m *EventDependencyFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -241,7 +213,7 @@ var xxx_messageInfo_EventDependencyFilter proto.InternalMessageInfo func (m *FileArtifact) Reset() { *m = FileArtifact{} } func (*FileArtifact) ProtoMessage() {} func (*FileArtifact) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{7} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{6} } func (m *FileArtifact) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -269,7 +241,7 @@ var xxx_messageInfo_FileArtifact proto.InternalMessageInfo func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} } func (*GroupVersionKind) ProtoMessage() {} func (*GroupVersionKind) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{8} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{7} } func (m *GroupVersionKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -297,7 +269,7 @@ var xxx_messageInfo_GroupVersionKind proto.InternalMessageInfo func (m *NodeStatus) Reset() { *m = NodeStatus{} } func (*NodeStatus) ProtoMessage() {} func (*NodeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{9} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{8} } func (m *NodeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -325,7 +297,7 @@ var xxx_messageInfo_NodeStatus proto.InternalMessageInfo func (m *ResourceObject) Reset() { *m = ResourceObject{} } func (*ResourceObject) ProtoMessage() {} func (*ResourceObject) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{10} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{9} } func (m *ResourceObject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -353,7 +325,7 @@ var xxx_messageInfo_ResourceObject proto.InternalMessageInfo func (m *ResourceParameter) Reset() { *m = ResourceParameter{} } func (*ResourceParameter) ProtoMessage() {} func (*ResourceParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{11} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{10} } func (m *ResourceParameter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -381,7 +353,7 @@ var xxx_messageInfo_ResourceParameter proto.InternalMessageInfo func (m *ResourceParameterSource) Reset() { *m = ResourceParameterSource{} } func (*ResourceParameterSource) ProtoMessage() {} func (*ResourceParameterSource) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{12} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{11} } func (m *ResourceParameterSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -409,7 +381,7 @@ var xxx_messageInfo_ResourceParameterSource proto.InternalMessageInfo func (m *RetryStrategy) Reset() { *m = RetryStrategy{} } func (*RetryStrategy) ProtoMessage() {} func (*RetryStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{13} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{12} } func (m *RetryStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -437,7 +409,7 @@ var xxx_messageInfo_RetryStrategy proto.InternalMessageInfo func (m *Sensor) Reset() { *m = Sensor{} } func (*Sensor) ProtoMessage() {} func (*Sensor) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{14} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{13} } func (m *Sensor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -465,7 +437,7 @@ var xxx_messageInfo_Sensor proto.InternalMessageInfo func (m *SensorList) Reset() { *m = SensorList{} } func (*SensorList) ProtoMessage() {} func (*SensorList) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{15} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{14} } func (m *SensorList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -493,7 +465,7 @@ var xxx_messageInfo_SensorList proto.InternalMessageInfo func (m *SensorSpec) Reset() { *m = SensorSpec{} } func (*SensorSpec) ProtoMessage() {} func (*SensorSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{16} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{15} } func (m *SensorSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -521,7 +493,7 @@ var xxx_messageInfo_SensorSpec proto.InternalMessageInfo func (m *SensorStatus) Reset() { *m = SensorStatus{} } func (*SensorStatus) ProtoMessage() {} func (*SensorStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{17} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{16} } func (m *SensorStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -549,7 +521,7 @@ var xxx_messageInfo_SensorStatus proto.InternalMessageInfo func (m *TimeFilter) Reset() { *m = TimeFilter{} } func (*TimeFilter) ProtoMessage() {} func (*TimeFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{18} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{17} } func (m *TimeFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -577,7 +549,7 @@ var xxx_messageInfo_TimeFilter proto.InternalMessageInfo func (m *Trigger) Reset() { *m = Trigger{} } func (*Trigger) ProtoMessage() {} func (*Trigger) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{19} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{18} } func (m *Trigger) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -605,7 +577,7 @@ var xxx_messageInfo_Trigger proto.InternalMessageInfo func (m *TriggerCondition) Reset() { *m = TriggerCondition{} } func (*TriggerCondition) ProtoMessage() {} func (*TriggerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{20} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{19} } func (m *TriggerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -633,7 +605,7 @@ var xxx_messageInfo_TriggerCondition proto.InternalMessageInfo func (m *URLArtifact) Reset() { *m = URLArtifact{} } func (*URLArtifact) ProtoMessage() {} func (*URLArtifact) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_eeefd321c74377c2, []int{21} + return fileDescriptor_generated_00c8a4131a6a39b4, []int{20} } func (m *URLArtifact) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -661,7 +633,6 @@ var xxx_messageInfo_URLArtifact proto.InternalMessageInfo func init() { proto.RegisterType((*ArtifactLocation)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.ArtifactLocation") proto.RegisterType((*ConfigmapArtifact)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.ConfigmapArtifact") - proto.RegisterType((*Data)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.Data") proto.RegisterType((*DataFilter)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.DataFilter") proto.RegisterType((*DependencyGroup)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.DependencyGroup") proto.RegisterType((*EventDependency)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.EventDependency") @@ -778,36 +749,6 @@ func (m *ConfigmapArtifact) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *Data) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Data) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.DataFilters) > 0 { - for _, msg := range m.DataFilters { - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - func (m *DataFilter) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -831,10 +772,21 @@ func (m *DataFilter) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) i += copy(dAtA[i:], m.Type) - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) + if len(m.Value) > 0 { + for _, s := range m.Value { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } return i, nil } @@ -955,15 +907,17 @@ func (m *EventDependencyFilter) MarshalTo(dAtA []byte) (int, error) { } i += n7 } - if m.Data != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Data.Size())) - n8, err := m.Data.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Data) > 0 { + for _, msg := range m.Data { + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n } - i += n8 } return i, nil } @@ -1058,19 +1012,19 @@ func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x32 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.StartedAt.Size())) - n9, err := m.StartedAt.MarshalTo(dAtA[i:]) + n8, err := m.StartedAt.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n9 + i += n8 dAtA[i] = 0x3a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.CompletedAt.Size())) - n10, err := m.CompletedAt.MarshalTo(dAtA[i:]) + n9, err := m.CompletedAt.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n10 + i += n9 dAtA[i] = 0x42 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) @@ -1079,11 +1033,11 @@ func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x4a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Event.Size())) - n11, err := m.Event.MarshalTo(dAtA[i:]) + n10, err := m.Event.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n11 + i += n10 } return i, nil } @@ -1144,19 +1098,19 @@ func (m *ResourceObject) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.GroupVersionKind.Size())) - n12, err := m.GroupVersionKind.MarshalTo(dAtA[i:]) + n11, err := m.GroupVersionKind.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n12 + i += n11 dAtA[i] = 0x32 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Source.Size())) - n13, err := m.Source.MarshalTo(dAtA[i:]) + n12, err := m.Source.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n13 + i += n12 return i, nil } @@ -1179,11 +1133,11 @@ func (m *ResourceParameter) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Src.Size())) - n14, err := m.Src.MarshalTo(dAtA[i:]) + n13, err := m.Src.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n14 + i += n13 } dAtA[i] = 0x12 i++ @@ -1260,27 +1214,27 @@ func (m *Sensor) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n15, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n14, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n15 + i += n14 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n16, err := m.Spec.MarshalTo(dAtA[i:]) + n15, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n16 + i += n15 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n17, err := m.Status.MarshalTo(dAtA[i:]) + n16, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n17 + i += n16 return i, nil } @@ -1302,11 +1256,11 @@ func (m *SensorList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n18, err := m.ListMeta.MarshalTo(dAtA[i:]) + n17, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n18 + i += n17 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -1365,21 +1319,21 @@ func (m *SensorSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.DeploySpec.Size())) - n19, err := m.DeploySpec.MarshalTo(dAtA[i:]) + n18, err := m.DeploySpec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n19 + i += n18 } if m.EventProtocol != nil { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.EventProtocol.Size())) - n20, err := m.EventProtocol.MarshalTo(dAtA[i:]) + n19, err := m.EventProtocol.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n20 + i += n19 } dAtA[i] = 0x2a i++ @@ -1422,19 +1376,19 @@ func (m *SensorStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.StartedAt.Size())) - n21, err := m.StartedAt.MarshalTo(dAtA[i:]) + n20, err := m.StartedAt.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n21 + i += n20 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.CompletedAt.Size())) - n22, err := m.CompletedAt.MarshalTo(dAtA[i:]) + n21, err := m.CompletedAt.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n22 + i += n21 dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) @@ -1463,11 +1417,11 @@ func (m *SensorStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n23, err := (&v).MarshalTo(dAtA[i:]) + n22, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n23 + i += n22 } } dAtA[i] = 0x30 @@ -1525,11 +1479,11 @@ func (m *Trigger) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size())) - n24, err := m.Resource.MarshalTo(dAtA[i:]) + n23, err := m.Resource.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n24 + i += n23 } dAtA[i] = 0x1a i++ @@ -1539,21 +1493,21 @@ func (m *Trigger) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.RetryStrategy.Size())) - n25, err := m.RetryStrategy.MarshalTo(dAtA[i:]) + n24, err := m.RetryStrategy.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n25 + i += n24 } if m.When != nil { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.When.Size())) - n26, err := m.When.MarshalTo(dAtA[i:]) + n25, err := m.When.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n26 + i += n25 } return i, nil } @@ -1689,21 +1643,6 @@ func (m *ConfigmapArtifact) Size() (n int) { return n } -func (m *Data) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataFilters) > 0 { - for _, e := range m.DataFilters { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - func (m *DataFilter) Size() (n int) { if m == nil { return 0 @@ -1714,8 +1653,12 @@ func (m *DataFilter) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.Type) n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Value) - n += 1 + l + sovGenerated(uint64(l)) + if len(m.Value) > 0 { + for _, s := range m.Value { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -1767,9 +1710,11 @@ func (m *EventDependencyFilter) Size() (n int) { l = m.Context.Size() n += 1 + l + sovGenerated(uint64(l)) } - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovGenerated(uint64(l)) + if len(m.Data) > 0 { + for _, e := range m.Data { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } } return n } @@ -2105,16 +2050,6 @@ func (this *ConfigmapArtifact) String() string { }, "") return s } -func (this *Data) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Data{`, - `DataFilters:` + strings.Replace(fmt.Sprintf("%v", this.DataFilters), "DataFilter", "DataFilter", 1) + `,`, - `}`, - }, "") - return s -} func (this *DataFilter) String() string { if this == nil { return "nil" @@ -2159,7 +2094,7 @@ func (this *EventDependencyFilter) String() string { `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Time:` + strings.Replace(fmt.Sprintf("%v", this.Time), "TimeFilter", "TimeFilter", 1) + `,`, `Context:` + strings.Replace(fmt.Sprintf("%v", this.Context), "EventContext", "common.EventContext", 1) + `,`, - `Data:` + strings.Replace(fmt.Sprintf("%v", this.Data), "Data", "Data", 1) + `,`, + `Data:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Data), "DataFilter", "DataFilter", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -2727,87 +2662,6 @@ func (m *ConfigmapArtifact) Unmarshal(dAtA []byte) error { } return nil } -func (m *Data) 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 ErrIntOverflowGenerated - } - 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: Data: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataFilters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataFilters = append(m.DataFilters, &DataFilter{}) - if err := m.DataFilters[len(m.DataFilters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *DataFilter) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2922,7 +2776,7 @@ func (m *DataFilter) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Value = string(dAtA[iNdEx:postIndex]) + m.Value = append(m.Value, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -3351,10 +3205,8 @@ func (m *EventDependencyFilter) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Data == nil { - m.Data = &Data{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Data = append(m.Data, DataFilter{}) + if err := m.Data[len(m.Data)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5927,127 +5779,126 @@ var ( ) func init() { - proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1/generated.proto", fileDescriptor_generated_eeefd321c74377c2) -} - -var fileDescriptor_generated_eeefd321c74377c2 = []byte{ - // 1887 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0xf2, 0x4b, 0xe4, 0xa3, 0x64, 0xc9, 0xd3, 0x14, 0x61, 0x55, 0x94, 0x14, 0xb6, 0x17, - 0xb7, 0x48, 0x96, 0xb6, 0x95, 0x06, 0x6e, 0x8b, 0x7e, 0x68, 0x49, 0x3b, 0x76, 0x24, 0xdb, 0xca, - 0xd0, 0x71, 0x80, 0xb4, 0x40, 0xbd, 0xda, 0x1d, 0x91, 0x1b, 0x2d, 0x77, 0x16, 0xbb, 0x43, 0x3a, - 0x2c, 0x8a, 0x26, 0xfd, 0x3c, 0xb6, 0xf9, 0x1f, 0xfa, 0x07, 0xf4, 0xd8, 0x7b, 0x4f, 0xbe, 0x14, - 0x48, 0x6f, 0x39, 0x11, 0x35, 0x0b, 0xf4, 0x8f, 0xf0, 0xa9, 0x98, 0x8f, 0xfd, 0xe0, 0xd2, 0x8a, - 0x69, 0x52, 0x27, 0xee, 0xbc, 0xf7, 0xe6, 0xbd, 0x37, 0xef, 0x6b, 0x7e, 0x43, 0xb8, 0xdb, 0x77, - 0xd9, 0x60, 0x74, 0x6a, 0xd8, 0x74, 0xd8, 0xb6, 0xc2, 0x3e, 0x0d, 0x42, 0xfa, 0x89, 0xf8, 0x78, - 0x9b, 0x8c, 0x89, 0xcf, 0xa2, 0x76, 0x70, 0xde, 0x6f, 0x5b, 0x81, 0x1b, 0xb5, 0x23, 0xe2, 0x47, - 0x34, 0x6c, 0x8f, 0x6f, 0x58, 0x5e, 0x30, 0xb0, 0x6e, 0xb4, 0xfb, 0xc4, 0x27, 0xa1, 0xc5, 0x88, - 0x63, 0x04, 0x21, 0x65, 0x14, 0xd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40, 0xdd, 0x71, - 0xa3, 0xc0, 0xb3, 0x26, 0x9c, 0xa8, 0xac, 0x7e, 0x43, 0x09, 0xd6, 0xbb, 0x29, 0x0b, 0x67, 0xe5, - 0x92, 0x79, 0x53, 0x7a, 0xf9, 0xbc, 0xe1, 0xee, 0x65, 0xe6, 0xcd, 0x75, 0x28, 0x07, 0x03, 0x2b, - 0x22, 0xe2, 0x36, 0xa9, 0x99, 0x7b, 0x71, 0x8c, 0x4e, 0x38, 0xf1, 0x05, 0x1f, 0xd2, 0xd4, 0x21, - 0x62, 0x81, 0xa5, 0x20, 0x7a, 0x02, 0xb5, 0x88, 0x59, 0x21, 0x23, 0xce, 0x21, 0x6b, 0x54, 0x44, - 0xfe, 0xdb, 0x86, 0x84, 0x08, 0x46, 0x16, 0x22, 0xa4, 0x39, 0xe7, 0x08, 0xc6, 0x18, 0xdf, 0x30, - 0xee, 0xbb, 0x76, 0x48, 0x79, 0xa9, 0xa6, 0x2d, 0xd6, 0x8b, 0x35, 0xe1, 0x54, 0x29, 0x3a, 0x83, - 0xba, 0x4d, 0x87, 0x81, 0x47, 0xa4, 0x8d, 0xcd, 0xd5, 0x6c, 0x24, 0x91, 0xea, 0xa4, 0xba, 0x70, - 0x56, 0x31, 0x4f, 0xfd, 0x90, 0x44, 0x91, 0xd5, 0x27, 0x8d, 0xea, 0x7c, 0xea, 0xef, 0x4b, 0x32, - 0x8e, 0xf9, 0xe8, 0x23, 0x28, 0x8b, 0x4a, 0x6e, 0xd4, 0x84, 0x33, 0xef, 0xae, 0xd6, 0x53, 0x66, - 0x8d, 0x87, 0x56, 0x7c, 0x62, 0xa9, 0x4f, 0xff, 0x7d, 0x19, 0xae, 0x60, 0x12, 0xd1, 0x51, 0x68, - 0x93, 0x87, 0xa7, 0x9f, 0x10, 0x9b, 0xcd, 0x5f, 0x99, 0xda, 0x12, 0x57, 0xe6, 0x6f, 0xa0, 0xe2, - 0x59, 0xa7, 0xc4, 0xe3, 0xe3, 0x93, 0x5f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0xbf, 0x44, - 0x97, 0xf8, 0xcb, 0xed, 0x26, 0xc0, 0x98, 0x84, 0xee, 0xd9, 0xa4, 0x43, 0x42, 0x39, 0xb0, 0xaa, - 0x29, 0xb2, 0x7a, 0x9c, 0x70, 0x70, 0x46, 0xca, 0x34, 0x9e, 0x3d, 0x6f, 0x6e, 0x7c, 0xf9, 0xbc, - 0xb9, 0xf1, 0xd5, 0xf3, 0xe6, 0xc6, 0xe7, 0xb3, 0xa6, 0xf6, 0x6c, 0xd6, 0xd4, 0xbe, 0x9c, 0x35, - 0xb5, 0xaf, 0x66, 0x4d, 0xed, 0x3f, 0xb3, 0xa6, 0xf6, 0xc5, 0x7f, 0x9b, 0x1b, 0x1f, 0x57, 0xe3, - 0xf3, 0xff, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x9c, 0x2e, 0x61, 0xcd, 0x18, 0x00, 0x00, + proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1/generated.proto", fileDescriptor_generated_00c8a4131a6a39b4) +} + +var fileDescriptor_generated_00c8a4131a6a39b4 = []byte{ + // 1863 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcb, 0x6f, 0x1b, 0xc7, + 0x19, 0xd7, 0xf2, 0x25, 0xf2, 0xa3, 0x64, 0xc9, 0xd3, 0x14, 0x61, 0x55, 0x94, 0x34, 0xb6, 0x17, + 0xb7, 0x48, 0x96, 0xb6, 0x94, 0x06, 0x6e, 0x8b, 0x3e, 0x44, 0xd2, 0x8e, 0x1d, 0xc9, 0xb6, 0x32, + 0x74, 0x1c, 0x20, 0x2d, 0x50, 0xaf, 0x76, 0x47, 0xe4, 0x46, 0xcb, 0x9d, 0xc5, 0xce, 0x50, 0x09, + 0x8b, 0x3e, 0xd2, 0xe7, 0xb1, 0xcd, 0xff, 0xd0, 0x3f, 0xa0, 0xc7, 0xde, 0x7b,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0x11, 0x9e, 0x07, 0x44, 0x43, 0x28, 0x7d, 0x3c, 0x24, 0xc1, 0xfa, 0xfc, 0x58, + 0x07, 0xa5, 0x4b, 0x03, 0xd7, 0x93, 0xbc, 0x54, 0xfe, 0x4b, 0xe2, 0x83, 0x21, 0x09, 0xb0, 0x44, + 0x30, 0xef, 0xc2, 0x6e, 0x5e, 0x07, 0x7d, 0x0d, 0x8a, 0x76, 0x30, 0x91, 0xb3, 0xaf, 0xa6, 0xf8, + 0xdf, 0x61, 0x30, 0xc1, 0x42, 0x26, 0x97, 0x7c, 0x5f, 0xff, 0x7f, 0x4a, 0x2d, 0xf9, 0x3e, 0x16, + 0x32, 0xd3, 0x81, 0x7a, 0xe6, 0xdf, 0x92, 0x4b, 0xfc, 0xe3, 0x6d, 0x1f, 0xe0, 0x82, 0x44, 0xde, + 0xd9, 0xa4, 0x4b, 0x22, 0xd5, 0xb0, 0xaa, 0x29, 0xb3, 0x7a, 0x9c, 0xac, 0xe0, 0x8c, 0x56, 0xc7, + 0x7a, 0xfa, 0xac, 0xb9, 0xf1, 0xf9, 0xb3, 0xe6, 0xc6, 0x17, 0xcf, 0x9a, 0x1b, 0x9f, 0xce, 0x9a, + 0xc6, 0xd3, 0x59, 0xd3, 0xf8, 0x7c, 0xd6, 0x34, 0xbe, 0x98, 0x35, 0x8d, 0x7f, 0xcd, 0x9a, 0xc6, + 0x67, 0xff, 0x6e, 0x6e, 0x7c, 0x58, 0x8d, 0xef, 0xff, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x12, + 0x2d, 0xde, 0x4c, 0x51, 0x18, 0x00, 0x00, } diff --git a/pkg/apis/sensor/v1alpha1/generated.proto b/pkg/apis/sensor/v1alpha1/generated.proto index 56fd214051..88c055e601 100644 --- a/pkg/apis/sensor/v1alpha1/generated.proto +++ b/pkg/apis/sensor/v1alpha1/generated.proto @@ -54,11 +54,6 @@ message ConfigmapArtifact { optional string key = 3; } -message Data { - // filter constraints - repeated DataFilter dataFilters = 1; -} - // DataFilter describes constraints and filters for event data // Regular Expressions are purposefully not a feature as they are overkill for our uses here // See Rob Pike's Post: https://commandcenter.blogspot.com/2011/08/regular-expressions-in-lexing-and.html @@ -72,12 +67,12 @@ message DataFilter { // Type contains the JSON type of the data optional string type = 2; - // Value is the expected string value for this key + // Value is the allowed string values for this key // Booleans are pased using strconv.ParseBool() // Numbers are parsed using as float64 using strconv.ParseFloat() // Strings are taken as is // Nils this value is ignored - optional string value = 3; + repeated string value = 3; } // DependencyGroup is the group of dependencies @@ -101,7 +96,7 @@ message EventDependency { // and proper escalations should proceed. optional int64 deadline = 2; - // DataFilters and rules governing tolerations of success and constraints on the context and data of an event + // Filters and rules governing tolerations of success and constraints on the context and data of an event optional EventDependencyFilter filters = 3; // Connected tells if subscription is already setup in case of nats protocol. @@ -120,7 +115,7 @@ message EventDependencyFilter { optional github.com.argoproj.argo_events.pkg.apis.common.EventContext context = 3; // Data filter constraints with escalation - optional Data data = 4; + repeated DataFilter data = 4; } // FileArtifact contains information about an artifact in a filesystem diff --git a/pkg/apis/sensor/v1alpha1/openapi_generated.go b/pkg/apis/sensor/v1alpha1/openapi_generated.go index 6d152d5622..0123dac4e3 100644 --- a/pkg/apis/sensor/v1alpha1/openapi_generated.go +++ b/pkg/apis/sensor/v1alpha1/openapi_generated.go @@ -22,15 +22,14 @@ limitations under the License. package v1alpha1 import ( - spec "github.com/go-openapi/spec" - common "k8s.io/kube-openapi/pkg/common" + "github.com/go-openapi/spec" + "k8s.io/kube-openapi/pkg/common" ) func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ArtifactLocation": schema_pkg_apis_sensor_v1alpha1_ArtifactLocation(ref), "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ConfigmapArtifact": schema_pkg_apis_sensor_v1alpha1_ConfigmapArtifact(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Data": schema_pkg_apis_sensor_v1alpha1_Data(ref), "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.DataFilter": schema_pkg_apis_sensor_v1alpha1_DataFilter(ref), "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.DependencyGroup": schema_pkg_apis_sensor_v1alpha1_DependencyGroup(ref), "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.EventDependency": schema_pkg_apis_sensor_v1alpha1_EventDependency(ref), @@ -130,34 +129,6 @@ func schema_pkg_apis_sensor_v1alpha1_ConfigmapArtifact(ref common.ReferenceCallb } } -func schema_pkg_apis_sensor_v1alpha1_Data(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "dataFilters": { - SchemaProps: spec.SchemaProps{ - Description: "filter constraints", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.DataFilter"), - }, - }, - }, - }, - }, - }, - Required: []string{"dataFilters"}, - }, - }, - Dependencies: []string{ - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.DataFilter"}, - } -} - func schema_pkg_apis_sensor_v1alpha1_DataFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -181,9 +152,16 @@ func schema_pkg_apis_sensor_v1alpha1_DataFilter(ref common.ReferenceCallback) co }, "value": { SchemaProps: spec.SchemaProps{ - Description: "Value is the expected string value for this key Booleans are pased using strconv.ParseBool() Numbers are parsed using as float64 using strconv.ParseFloat() Strings are taken as is Nils this value is ignored", - Type: []string{"string"}, - Format: "", + Description: "Value is the allowed string values for this key Booleans are pased using strconv.ParseBool() Numbers are parsed using as float64 using strconv.ParseFloat() Strings are taken as is Nils this value is ignored", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, @@ -253,7 +231,7 @@ func schema_pkg_apis_sensor_v1alpha1_EventDependency(ref common.ReferenceCallbac }, "filters": { SchemaProps: spec.SchemaProps{ - Description: "DataFilters and rules governing tolerations of success and constraints on the context and data of an event", + Description: "Filters and rules governing tolerations of success and constraints on the context and data of an event", Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.EventDependencyFilter"), }, }, @@ -302,7 +280,14 @@ func schema_pkg_apis_sensor_v1alpha1_EventDependencyFilter(ref common.ReferenceC "data": { SchemaProps: spec.SchemaProps{ Description: "Data filter constraints with escalation", - Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Data"), + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.DataFilter"), + }, + }, + }, }, }, }, @@ -310,7 +295,7 @@ func schema_pkg_apis_sensor_v1alpha1_EventDependencyFilter(ref common.ReferenceC }, }, Dependencies: []string{ - "github.com/argoproj/argo-events/pkg/apis/common.EventContext", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Data", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TimeFilter"}, + "github.com/argoproj/argo-events/pkg/apis/common.EventContext", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.DataFilter", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TimeFilter"}, } } diff --git a/pkg/apis/sensor/v1alpha1/types.go b/pkg/apis/sensor/v1alpha1/types.go index 40be2b4104..e332c940ec 100644 --- a/pkg/apis/sensor/v1alpha1/types.go +++ b/pkg/apis/sensor/v1alpha1/types.go @@ -107,7 +107,7 @@ type EventDependency struct { // and proper escalations should proceed. Deadline int64 `json:"deadline,omitempty" protobuf:"bytes,2,opt,name=deadline"` - // DataFilters and rules governing tolerations of success and constraints on the context and data of an event + // Filters and rules governing tolerations of success and constraints on the context and data of an event Filters EventDependencyFilter `json:"filters,omitempty" protobuf:"bytes,3,opt,name=filters"` // Connected tells if subscription is already setup in case of nats protocol. @@ -142,7 +142,7 @@ type EventDependencyFilter struct { Context *common.EventContext `json:"context,omitempty" protobuf:"bytes,3,opt,name=context"` // Data filter constraints with escalation - Data *Data `json:"data,omitempty" protobuf:"bytes,4,rep,name=data"` + Data []DataFilter `json:"data,omitempty" protobuf:"bytes,4,opt,name=data"` } // TimeFilter describes a window in time. @@ -171,11 +171,6 @@ const ( JSONTypeString JSONType = "string" ) -type Data struct { - // filter constraints - DataFilters []*DataFilter `json:"dataFilters" protobuf:"bytes,1,rep,name=dataFilters"` -} - // DataFilter describes constraints and filters for event data // Regular Expressions are purposefully not a feature as they are overkill for our uses here // See Rob Pike's Post: https://commandcenter.blogspot.com/2011/08/regular-expressions-in-lexing-and.html @@ -189,12 +184,12 @@ type DataFilter struct { // Type contains the JSON type of the data Type JSONType `json:"type" protobuf:"bytes,2,opt,name=type"` - // Value is the expected string value for this key + // Value is the allowed string values for this key // Booleans are pased using strconv.ParseBool() // Numbers are parsed using as float64 using strconv.ParseFloat() // Strings are taken as is // Nils this value is ignored - Value string `json:"value" protobuf:"bytes,3,opt,name=value"` + Value []string `json:"value" protobuf:"bytes,3,rep,name=value"` } // Trigger is an action taken, output produced, an event created, a message sent diff --git a/pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go index 735195f7dd..5e9b5f0169 100644 --- a/pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go @@ -20,9 +20,9 @@ limitations under the License. package v1alpha1 import ( - common "github.com/argoproj/argo-events/pkg/apis/common" - v1 "k8s.io/api/core/v1" - runtime "k8s.io/apimachinery/pkg/runtime" + "github.com/argoproj/argo-events/pkg/apis/common" + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -82,36 +82,14 @@ func (in *ConfigmapArtifact) DeepCopy() *ConfigmapArtifact { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Data) DeepCopyInto(out *Data) { - *out = *in - if in.DataFilters != nil { - in, out := &in.DataFilters, &out.DataFilters - *out = make([]*DataFilter, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(DataFilter) - **out = **in - } - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Data. -func (in *Data) DeepCopy() *Data { - if in == nil { - return nil - } - out := new(Data) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DataFilter) DeepCopyInto(out *DataFilter) { *out = *in + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = make([]string, len(*in)) + copy(*out, *in) + } return } @@ -178,8 +156,10 @@ func (in *EventDependencyFilter) DeepCopyInto(out *EventDependencyFilter) { } if in.Data != nil { in, out := &in.Data, &out.Data - *out = new(Data) - (*in).DeepCopyInto(*out) + *out = make([]DataFilter, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } return } diff --git a/sensors/event-handler.go b/sensors/event-handler.go index c4121e7fd5..d3137aff95 100644 --- a/sensors/event-handler.go +++ b/sensors/event-handler.go @@ -65,7 +65,6 @@ func (sec *sensorExecutionCtx) processUpdateNotification(ew *updateNotification) switch ew.notificationType { case v1alpha1.EventNotification: sec.log.Info().Str("event-dependency-name", ew.event.Context.Source.Host).Msg("received event notification") - // apply filters if any. ok, err := sec.filterEvent(ew.eventDependency.Filters, ew.event) if err != nil { diff --git a/sensors/signal-filter.go b/sensors/signal-filter.go index 60d85cd126..1c83ee75ab 100644 --- a/sensors/signal-filter.go +++ b/sensors/signal-filter.go @@ -147,16 +147,12 @@ func (sec *sensorExecutionCtx) filterContext(expected *apicommon.EventContext, a // applyDataFilter runs the dataFilter against the event's data // returns (true, nil) when data passes filters, false otherwise // TODO: split this function up into smaller pieces -func (sec *sensorExecutionCtx) filterData(data *v1alpha1.Data, event *apicommon.Event) (bool, error) { +func (sec *sensorExecutionCtx) filterData(data []v1alpha1.DataFilter, event *apicommon.Event) (bool, error) { // TODO: use the event.Context.SchemaURL to figure out correct data format to unmarshal to // for now, let's just use a simple map[string]interface{} for arbitrary data if data == nil { return true, nil } - dataFilters := data.DataFilters - if dataFilters == nil { - return true, nil - } if event == nil { return false, fmt.Errorf("nil event") } @@ -167,32 +163,45 @@ func (sec *sensorExecutionCtx) filterData(data *v1alpha1.Data, event *apicommon. if err != nil { return false, err } - for _, f := range dataFilters { +filter: + for _, f := range data { res := gjson.GetBytes(js, f.Path) if !res.Exists() { return false, nil } switch f.Type { case v1alpha1.JSONTypeBool: - val, err := strconv.ParseBool(f.Value) - if err != nil { - return false, err - } - if val != res.Bool() { - return false, nil + for _, value := range f.Value { + val, err := strconv.ParseBool(value) + if err != nil { + return false, err + } + if val == res.Bool() { + continue filter + } } + return false, nil + case v1alpha1.JSONTypeNumber: - val, err := strconv.ParseFloat(f.Value, 64) - if err != nil { - return false, err - } - if val != res.Float() { - return false, nil + for _, value := range f.Value { + val, err := strconv.ParseFloat(value, 64) + if err != nil { + return false, err + } + if val == res.Float() { + continue filter + } } + return false, nil + case v1alpha1.JSONTypeString: - if f.Value != res.Str { - return false, nil + for _, value := range f.Value { + if value == res.Str { + continue filter + } } + return false, nil + default: return false, fmt.Errorf("unsupported JSON type %s", f.Type) } diff --git a/sensors/signal-filter_test.go b/sensors/signal-filter_test.go index abc0dd0cad..aae0e2d64a 100644 --- a/sensors/signal-filter_test.go +++ b/sensors/signal-filter_test.go @@ -88,7 +88,7 @@ func Test_filterContext(t *testing.T) { func Test_filterData(t *testing.T) { type args struct { - data *v1alpha1.Data + data []v1alpha1.DataFilter event *apicommon.Event } tests := []struct { @@ -133,13 +133,11 @@ func Test_filterData(t *testing.T) { { name: "string filter, JSON data", args: args{ - data: &v1alpha1.Data{ - DataFilters: []*v1alpha1.DataFilter{ - { - Path: "k", - Type: v1alpha1.JSONTypeString, - Value: "v", - }, + data: []v1alpha1.DataFilter{ + { + Path: "k", + Type: v1alpha1.JSONTypeString, + Value: []string{"v"}, }, }, event: &apicommon.Event{ @@ -147,19 +145,18 @@ func Test_filterData(t *testing.T) { ContentType: "application/json", }, Payload: []byte("{\"k\": \"v\"}"), - }}, + }, + }, want: true, wantErr: false, }, { name: "number filter, JSON data", - args: args{data: &v1alpha1.Data{ - DataFilters: []*v1alpha1.DataFilter{ - { - Path: "k", - Type: v1alpha1.JSONTypeNumber, - Value: "1.0", - }, + args: args{data: []v1alpha1.DataFilter{ + { + Path: "k", + Type: v1alpha1.JSONTypeNumber, + Value: []string{"1.0"}, }, }, event: &apicommon.Event{ @@ -174,23 +171,21 @@ func Test_filterData(t *testing.T) { { name: "multiple filters, nested JSON data", args: args{ - data: &v1alpha1.Data{ - DataFilters: []*v1alpha1.DataFilter{ - { - Path: "k", - Type: v1alpha1.JSONTypeString, - Value: "v", - }, - { - Path: "k1.k", - Type: v1alpha1.JSONTypeNumber, - Value: "3.14", - }, - { - Path: "k1.k2", - Type: v1alpha1.JSONTypeString, - Value: "hello,world", - }, + data: []v1alpha1.DataFilter{ + { + Path: "k", + Type: v1alpha1.JSONTypeString, + Value: []string{"v"}, + }, + { + Path: "k1.k", + Type: v1alpha1.JSONTypeNumber, + Value: []string{"3.14"}, + }, + { + Path: "k1.k2", + Type: v1alpha1.JSONTypeString, + Value: []string{"hello,world", "hello there"}, }, }, event: &apicommon.Event{