Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the sources/v1alpha1 API group. +k8s:deepcopy-gen=package +groupName=sources.triggermesh.io
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- func WithSource(ctx context.Context, s EventSource) context.Context
- func ZendeskSourceName(subdomain, name string) string
- type EventSource
- type EventSourceStatus
- func (in *EventSourceStatus) DeepCopy() *EventSourceStatus
- func (in *EventSourceStatus) DeepCopyInto(out *EventSourceStatus)
- func (s *EventSourceStatus) InitializeConditions()
- func (s *EventSourceStatus) MarkNoSink()
- func (s *EventSourceStatus) MarkSink(uri *apis.URL)
- func (s *EventSourceStatus) PropagateAvailability(obj interface{})
- type HTTPSource
- func (s *HTTPSource) AsEventSource() string
- func (in *HTTPSource) DeepCopy() *HTTPSource
- func (in *HTTPSource) DeepCopyInto(out *HTTPSource)
- func (in *HTTPSource) DeepCopyObject() runtime.Object
- func (s *HTTPSource) GetConditionSet() pkgapis.ConditionSet
- func (s *HTTPSource) GetEventTypes() []string
- func (*HTTPSource) GetGroupVersionKind() schema.GroupVersionKind
- func (s *HTTPSource) GetSink() *duckv1.Destination
- func (s *HTTPSource) GetSourceStatus() *EventSourceStatus
- func (s *HTTPSource) GetStatus() *duckv1.Status
- type HTTPSourceList
- type HTTPSourceSpec
- type SecretValueFromSource
- type SlackSource
- func (s *SlackSource) AsEventSource() string
- func (in *SlackSource) DeepCopy() *SlackSource
- func (in *SlackSource) DeepCopyInto(out *SlackSource)
- func (in *SlackSource) DeepCopyObject() runtime.Object
- func (*SlackSource) GetConditionSet() pkgapis.ConditionSet
- func (*SlackSource) GetEventTypes() []string
- func (*SlackSource) GetGroupVersionKind() schema.GroupVersionKind
- func (s *SlackSource) GetSink() *duckv1.Destination
- func (s *SlackSource) GetSourceStatus() *EventSourceStatus
- func (s *SlackSource) GetStatus() *duckv1.Status
- type SlackSourceList
- type SlackSourceSpec
- type ValueFromField
- type ZendeskSource
- func (s *ZendeskSource) AsEventSource() string
- func (in *ZendeskSource) DeepCopy() *ZendeskSource
- func (in *ZendeskSource) DeepCopyInto(out *ZendeskSource)
- func (in *ZendeskSource) DeepCopyObject() runtime.Object
- func (*ZendeskSource) GetConditionSet() apis.ConditionSet
- func (*ZendeskSource) GetEventTypes() []string
- func (*ZendeskSource) GetGroupVersionKind() schema.GroupVersionKind
- func (s *ZendeskSource) GetSink() *duckv1.Destination
- func (s *ZendeskSource) GetSourceStatus() *EventSourceStatus
- func (s *ZendeskSource) GetStatus() *duckv1.Status
- func (s *ZendeskSource) GetUntypedSpec() interface{}
- type ZendeskSourceList
- type ZendeskSourceSpec
- type ZendeskSourceStatus
Constants ¶
const ( // ConditionReady has status True when the source is ready to send events. ConditionReady = apis.ConditionReady // ConditionSinkProvided has status True when the source has been configured with a sink target. ConditionSinkProvided apis.ConditionType = "SinkProvided" // ConditionDeployed has status True when the source's adapter is up and running. ConditionDeployed apis.ConditionType = "Deployed" )
Status conditions
const ( // ReasonSinkNotFound is set on a SinkProvided condition when a sink does not exist. ReasonSinkNotFound = "SinkNotFound" // ReasonSinkEmpty is set on a SinkProvided condition when a sink URI is empty. ReasonSinkEmpty = "EmptySinkURI" ReasonUnavailable = "AdapterUnavailable" )
Reasons for status conditions
const ( // ZendeskReasonNoURL is set on a TargetSynced condition when the adapter URL is empty. ZendeskReasonNoURL = "MissingAdapterURL" // ZendeskReasonNoSecret is set on a TargetSynced condition when required secrets can't be obtained. ZendeskReasonNoSecret = "MissingSecret" // ZendeskReasonFailedSync is set on a TargetSynced condition when a CRUD API call returns an error. ZendeskReasonFailedSync = "FailedSync" )
Reasons for status conditions
const (
SlackGenericEventType = "com.slack.events"
)
Supported event types
const ( // ZendeskConditionTargetSynced has status True when the Zendesk Target and Trigger have been synced. ZendeskConditionTargetSynced apis.ConditionType = "TargetSynced" )
Status conditions
const (
// ZendeskTicketCreatedEventType is generated upon creation of a Ticket.
ZendeskTicketCreatedEventType = "com.zendesk.ticket.created"
)
Supported event types
Variables ¶
var ( // SchemeGroupVersion contains the group and version used to register types for this custom API. SchemeGroupVersion = schema.GroupVersion{Group: sources.GroupName, Version: "v1alpha1"} // SchemeBuilder creates a Scheme builder that is used to register types for this custom API. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme registers the types stored in SchemeBuilder. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource.
func WithSource ¶
func WithSource(ctx context.Context, s EventSource) context.Context
WithSource returns a copy of the parent context in which the value associated with the source key is the given event source.
func ZendeskSourceName ¶
ZendeskSourceName returns a unique reference to the source suitable for use as as a CloudEvent source.
Types ¶
type EventSource ¶
type EventSource interface { metav1.Object runtime.Object // OwnerRefable is used to construct a generic reconciler for each // source type, and convert source objects to owner references. kmeta.OwnerRefable // KRShaped is used by generated reconcilers to perform pre and // post-reconcile status updates. duckv1.KRShaped // GetSink returns the source's event sink. GetSink() *duckv1.Destination // GetSourceStatus returns the source's status. GetSourceStatus() *EventSourceStatus // GetEventTypes returns the event types generated by the source. GetEventTypes() []string // AsEventSource returns a unique reference to the source suitable for // use as a CloudEvent source attribute. AsEventSource() string }
EventSource is implemented by all event source types.
func SourceFromContext ¶
func SourceFromContext(ctx context.Context) EventSource
SourceFromContext returns the source stored in the context.
type EventSourceStatus ¶
type EventSourceStatus struct { duckv1.SourceStatus `json:",inline"` duckv1.AddressStatus `json:",inline"` }
EventSourceStatus defines the observed state of an event source.
func (*EventSourceStatus) DeepCopy ¶
func (in *EventSourceStatus) DeepCopy() *EventSourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSourceStatus.
func (*EventSourceStatus) DeepCopyInto ¶
func (in *EventSourceStatus) DeepCopyInto(out *EventSourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EventSourceStatus) InitializeConditions ¶
func (s *EventSourceStatus) InitializeConditions()
InitializeConditions sets relevant unset conditions to Unknown state.
func (*EventSourceStatus) MarkNoSink ¶
func (s *EventSourceStatus) MarkNoSink()
MarkNoSink sets the SinkProvided condition to False.
func (*EventSourceStatus) MarkSink ¶
func (s *EventSourceStatus) MarkSink(uri *apis.URL)
MarkSink sets the SinkProvided condition to True using the given URI.
func (*EventSourceStatus) PropagateAvailability ¶
func (s *EventSourceStatus) PropagateAvailability(obj interface{})
PropagateAvailability uses the readiness of the provided Deployment or Service to determine whether the Deployed condition should be marked as True or False.
type HTTPSource ¶
type HTTPSource struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec HTTPSourceSpec `json:"spec,omitempty"` Status EventSourceStatus `json:"status,omitempty"` }
HTTPSource is the schema for the event source.
func (*HTTPSource) AsEventSource ¶
func (s *HTTPSource) AsEventSource() string
AsEventSource implements EventSource.
func (*HTTPSource) DeepCopy ¶
func (in *HTTPSource) DeepCopy() *HTTPSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPSource.
func (*HTTPSource) DeepCopyInto ¶
func (in *HTTPSource) DeepCopyInto(out *HTTPSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HTTPSource) DeepCopyObject ¶
func (in *HTTPSource) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*HTTPSource) GetConditionSet ¶
func (s *HTTPSource) GetConditionSet() pkgapis.ConditionSet
GetConditionSet implements duckv1.KRShaped.
func (*HTTPSource) GetEventTypes ¶
func (s *HTTPSource) GetEventTypes() []string
GetEventTypes implements EventSource.
func (*HTTPSource) GetGroupVersionKind ¶
func (*HTTPSource) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind implements kmeta.OwnerRefable.
func (*HTTPSource) GetSink ¶
func (s *HTTPSource) GetSink() *duckv1.Destination
GetSink implements EventSource.
func (*HTTPSource) GetSourceStatus ¶
func (s *HTTPSource) GetSourceStatus() *EventSourceStatus
GetSourceStatus implements EventSource.
func (*HTTPSource) GetStatus ¶
func (s *HTTPSource) GetStatus() *duckv1.Status
GetStatus implements duckv1.KRShaped.
type HTTPSourceList ¶
type HTTPSourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []HTTPSource `json:"items"` }
HTTPSourceList contains a list of event sources.
func (*HTTPSourceList) DeepCopy ¶
func (in *HTTPSourceList) DeepCopy() *HTTPSourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPSourceList.
func (*HTTPSourceList) DeepCopyInto ¶
func (in *HTTPSourceList) DeepCopyInto(out *HTTPSourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HTTPSourceList) DeepCopyObject ¶
func (in *HTTPSourceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HTTPSourceSpec ¶
type HTTPSourceSpec struct { // inherits duck/v1 SourceSpec, which currently provides: // * Sink - a reference to an object that will resolve to a domain name or // a URI directly to use as the sink. // * CloudEventOverrides - defines overrides to control the output format // and modifications of the event sent to the sink. duckv1.SourceSpec `json:",inline"` // EventType for the event that will be generated. EventType string `json:"eventType"` // EventSource for the event that will be generated. EventSource *string `json:"eventSource,omitempty"` // BasicAuthUsername used for basic authentication. // +optional BasicAuthUsername *string `json:"basicAuthUsername,omitempty"` // BasicAuthPassword used for basic authentication. // +optional BasicAuthPassword SecretValueFromSource `json:"basicAuthPassword,omitempty"` }
HTTPSourceSpec defines the desired state of the event source.
func (*HTTPSourceSpec) DeepCopy ¶
func (in *HTTPSourceSpec) DeepCopy() *HTTPSourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPSourceSpec.
func (*HTTPSourceSpec) DeepCopyInto ¶
func (in *HTTPSourceSpec) DeepCopyInto(out *HTTPSourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretValueFromSource ¶
type SecretValueFromSource struct { // The Secret key to select from. SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty"` }
SecretValueFromSource represents the source of a secret value
func (*SecretValueFromSource) DeepCopy ¶
func (in *SecretValueFromSource) DeepCopy() *SecretValueFromSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretValueFromSource.
func (*SecretValueFromSource) DeepCopyInto ¶
func (in *SecretValueFromSource) DeepCopyInto(out *SecretValueFromSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SlackSource ¶
type SlackSource struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec SlackSourceSpec `json:"spec,omitempty"` Status EventSourceStatus `json:"status,omitempty"` }
SlackSource is the schema for the event source.
func (*SlackSource) AsEventSource ¶
func (s *SlackSource) AsEventSource() string
AsEventSource implements EventSource.
func (*SlackSource) DeepCopy ¶
func (in *SlackSource) DeepCopy() *SlackSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlackSource.
func (*SlackSource) DeepCopyInto ¶
func (in *SlackSource) DeepCopyInto(out *SlackSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SlackSource) DeepCopyObject ¶
func (in *SlackSource) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*SlackSource) GetConditionSet ¶
func (*SlackSource) GetConditionSet() pkgapis.ConditionSet
GetConditionSet implements duckv1.KRShaped.
func (*SlackSource) GetEventTypes ¶
func (*SlackSource) GetEventTypes() []string
GetEventTypes implements EventSource.
func (*SlackSource) GetGroupVersionKind ¶
func (*SlackSource) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind implements kmeta.OwnerRefable.
func (*SlackSource) GetSink ¶
func (s *SlackSource) GetSink() *duckv1.Destination
GetSink implements EventSource.
func (*SlackSource) GetSourceStatus ¶
func (s *SlackSource) GetSourceStatus() *EventSourceStatus
GetSourceStatus implements EventSource.
func (*SlackSource) GetStatus ¶
func (s *SlackSource) GetStatus() *duckv1.Status
GetStatus implements duckv1.KRShaped.
type SlackSourceList ¶
type SlackSourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []SlackSource `json:"items"` }
SlackSourceList contains a list of event sources.
func (*SlackSourceList) DeepCopy ¶
func (in *SlackSourceList) DeepCopy() *SlackSourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlackSourceList.
func (*SlackSourceList) DeepCopyInto ¶
func (in *SlackSourceList) DeepCopyInto(out *SlackSourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SlackSourceList) DeepCopyObject ¶
func (in *SlackSourceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SlackSourceSpec ¶
type SlackSourceSpec struct { // inherits duck/v1 SourceSpec, which currently provides: // * Sink - a reference to an object that will resolve to a domain name or // a URI directly to use as the sink. // * CloudEventOverrides - defines overrides to control the output format // and modifications of the event sent to the sink. duckv1.SourceSpec `json:",inline"` // SigningSecret can be set to the value of Slack request signing secret // to authenticate callbacks. // See: https://api.slack.com/authentication/verifying-requests-from-slack // +optional SigningSecret *SecretValueFromSource `json:"signingSecret,omitempty"` // AppID identifies the Slack application generating this event. // It helps identifying the App sourcing events when multiple Slack // applications shared an endpoint. See: https://api.slack.com/events-api // +optional AppID *string `json:"appID,omitempty"` }
SlackSourceSpec defines the desired state of the event source.
func (*SlackSourceSpec) DeepCopy ¶
func (in *SlackSourceSpec) DeepCopy() *SlackSourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlackSourceSpec.
func (*SlackSourceSpec) DeepCopyInto ¶
func (in *SlackSourceSpec) DeepCopyInto(out *SlackSourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValueFromField ¶
type ValueFromField struct { // Field value. // +optional Value string `json:"value,omitempty"` // Field value from a Kubernetes Secret. // +optional ValueFromSecret *corev1.SecretKeySelector `json:"valueFromSecret,omitempty"` }
ValueFromField is a struct field that can have its value either defined explicitly or sourced from another entity.
func (*ValueFromField) DeepCopy ¶
func (in *ValueFromField) DeepCopy() *ValueFromField
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValueFromField.
func (*ValueFromField) DeepCopyInto ¶
func (in *ValueFromField) DeepCopyInto(out *ValueFromField)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ZendeskSource ¶
type ZendeskSource struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ZendeskSourceSpec `json:"spec,omitempty"` Status ZendeskSourceStatus `json:"status,omitempty"` }
ZendeskSource is the schema for the event source.
func (*ZendeskSource) AsEventSource ¶
func (s *ZendeskSource) AsEventSource() string
AsEventSource implements EventSource.
func (*ZendeskSource) DeepCopy ¶
func (in *ZendeskSource) DeepCopy() *ZendeskSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZendeskSource.
func (*ZendeskSource) DeepCopyInto ¶
func (in *ZendeskSource) DeepCopyInto(out *ZendeskSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ZendeskSource) DeepCopyObject ¶
func (in *ZendeskSource) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ZendeskSource) GetConditionSet ¶
func (*ZendeskSource) GetConditionSet() apis.ConditionSet
GetConditionSet implements duckv1.KRShaped.
func (*ZendeskSource) GetEventTypes ¶
func (*ZendeskSource) GetEventTypes() []string
GetEventTypes implements EventSource.
func (*ZendeskSource) GetGroupVersionKind ¶
func (*ZendeskSource) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind implements kmeta.OwnerRefable.
func (*ZendeskSource) GetSink ¶
func (s *ZendeskSource) GetSink() *duckv1.Destination
GetSink implements EventSource.
func (*ZendeskSource) GetSourceStatus ¶
func (s *ZendeskSource) GetSourceStatus() *EventSourceStatus
GetSourceStatus implements EventSource.
func (*ZendeskSource) GetStatus ¶
func (s *ZendeskSource) GetStatus() *duckv1.Status
GetStatus implements duckv1.KRShaped.
func (*ZendeskSource) GetUntypedSpec ¶
func (s *ZendeskSource) GetUntypedSpec() interface{}
GetUntypedSpec implements apis.HasSpec.
type ZendeskSourceList ¶
type ZendeskSourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ZendeskSource `json:"items"` }
ZendeskSourceList contains a list of event sources.
func (*ZendeskSourceList) DeepCopy ¶
func (in *ZendeskSourceList) DeepCopy() *ZendeskSourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZendeskSourceList.
func (*ZendeskSourceList) DeepCopyInto ¶
func (in *ZendeskSourceList) DeepCopyInto(out *ZendeskSourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ZendeskSourceList) DeepCopyObject ¶
func (in *ZendeskSourceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ZendeskSourceSpec ¶
type ZendeskSourceSpec struct { // inherits duck/v1 SourceSpec, which currently provides: // * Sink - a reference to an object that will resolve to a domain name or // a URI directly to use as the sink. // * CloudEventOverrides - defines overrides to control the output format // and modifications of the event sent to the sink. duckv1.SourceSpec `json:",inline"` // Token identifies the API token used for creating the proper credentials to interface with Zendesk // allowing the source to auto-register the webhook to authenticate callbacks. Token SecretValueFromSource `json:"token,omitempty"` // Email identifies the email used for creating the proper credentials to interface with Zendesk // allowing the source to auto-register the webhook to authenticate callbacks. Email string `json:"email,omitempty"` // WebhookPassword used for basic authentication for events sent from Zendesk // to the adapter. WebhookPassword SecretValueFromSource `json:"webhookPassword,omitempty"` // WebhookUsername used for basic authentication for events sent from Zendesk // to the adapter. WebhookUsername string `json:"webhookUsername,omitempty"` // Subdomain identifies Zendesk subdomain Subdomain string `json:"subdomain,omitempty"` }
ZendeskSourceSpec defines the desired state of the event source.
func (*ZendeskSourceSpec) DeepCopy ¶
func (in *ZendeskSourceSpec) DeepCopy() *ZendeskSourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZendeskSourceSpec.
func (*ZendeskSourceSpec) DeepCopyInto ¶
func (in *ZendeskSourceSpec) DeepCopyInto(out *ZendeskSourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ZendeskSourceStatus ¶
type ZendeskSourceStatus struct {
EventSourceStatus `json:",inline"`
}
ZendeskSourceStatus defines the observed state of the event source.
func (*ZendeskSourceStatus) DeepCopy ¶
func (in *ZendeskSourceStatus) DeepCopy() *ZendeskSourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZendeskSourceStatus.
func (*ZendeskSourceStatus) DeepCopyInto ¶
func (in *ZendeskSourceStatus) DeepCopyInto(out *ZendeskSourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ZendeskSourceStatus) MarkTargetNotSynced ¶
func (s *ZendeskSourceStatus) MarkTargetNotSynced(reason, msg string)
MarkTargetNotSynced sets the TargetSynced condition to False with the given reason and associated message.
func (*ZendeskSourceStatus) MarkTargetSynced ¶
func (s *ZendeskSourceStatus) MarkTargetSynced()
MarkTargetSynced sets the TargetSynced condition to True.