Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventBI ¶
type EventBI string
EventBI is a type used for the events sent by BI in the webhooks
const ( // EventConnectionSynced is emitted after a connection has been synced EventConnectionSynced EventBI = "CONNECTION_SYNCED" // EventConnectionDeleted is emitted after a connection has been deleted EventConnectionDeleted EventBI = "CONNECTION_DELETED" // EventAccountEnabled is emitted after a bank account was enabled EventAccountEnabled EventBI = "ACCOUNT_ENABLED" // EventAccountDisabled is emitted after a bank account was disabled EventAccountDisabled EventBI = "ACCOUNT_DISABLED" )
func ParseEventBI ¶
ParseEventBI returns the event of the webhook, or an error if the event cannot be handled by the stack.
type WebhookCall ¶
type WebhookCall struct { Instance *instance.Instance Token string BIurl string Event EventBI Payload map[string]interface{} // contains filtered or unexported fields }
WebhookCall contains the data relative to a call from BI for a webhook.
func (*WebhookCall) Fire ¶
func (c *WebhookCall) Fire() error
Fire is used when the stack receives a call for a BI webhook, with an bearer token and a JSON payload. It will try to find a matching io.cozy.account and a io.cozy.trigger, and launch a job for them if needed.
Click to show internal directories.
Click to hide internal directories.