(channel-type? channel-type)
Is CHANNEL-TYPE a valid value as a channel type? :tv:
Is CHANNEL-TYPE a valid value as a channel type? :tv:
Map which contains the definitions for each type of pulse channel we allow. Each key is a channel type with a map which contains any other relevant information for defining the channel. E.g.
{:email {:name "Email", :recipients? true} :slack {:name "Slack", :recipients? false}}
Map which contains the definitions for each type of pulse channel we allow. Each key is a channel type with a map which contains any other relevant information for defining the channel. E.g. {:email {:name "Email", :recipients? true} :slack {:name "Slack", :recipients? false}}
(create-pulse-channel! {:keys [channel_type details pulse_id recipients
schedule_type schedule_day schedule_hour
schedule_frame]
:or {details {} recipients []}})
Create a new PulseChannel
along with all related data associated with the channel such as PulseChannelRecipients
.
Create a new `PulseChannel` along with all related data associated with the channel such as `PulseChannelRecipients`.
(day-of-week? day)
Is DAY a valid day-of-week
choice?
Is DAY a valid `day-of-week` choice?
Simple vector
of the days in the week used for reference and lookups.
NOTE: order is important here!!
we use the same ordering as the clj-time day-of-week
function (1 = Monday, 7 = Sunday) except
that we are 0 based instead.
Simple `vector` of the days in the week used for reference and lookups. NOTE: order is important here!! we use the same ordering as the clj-time `day-of-week` function (1 = Monday, 7 = Sunday) except that we are 0 based instead.
(hour-of-day? hour)
Predicate function which returns true
if the given hour is a valid hour of the day (24 hour), false
otherwise.
Predicate function which returns `true` if the given hour is a valid hour of the day (24 hour), `false` otherwise.
(PulseChannel)
(PulseChannel id)
(PulseChannel & kvs)
Entity for 'pulse_channel' table; instance of PulseChannelInstance.
Entity for 'pulse_channel' table; instance of PulseChannelInstance.
(recipients {:keys [id details]})
Return the PulseChannelRecipients
associated with this PULSE-CHANNEL.
Return the `PulseChannelRecipients` associated with this PULSE-CHANNEL.
(retrieve-scheduled-channels hour weekday monthday monthweek)
Fetch all PulseChannels
that are scheduled to run at a given time described by HOUR, WEEKDAY, MONTHDAY, and MONTHWEEK.
Examples: (retrieve-scheduled-channels 14 "mon" :first :first) - 2pm on the first Monday of the month (retrieve-scheduled-channels 8 "wed" :other :last) - 8am on Wednesday of the last week of the month
Based on the given input the appropriate PulseChannels
are returned:
Fetch all `PulseChannels` that are scheduled to run at a given time described by HOUR, WEEKDAY, MONTHDAY, and MONTHWEEK. Examples: (retrieve-scheduled-channels 14 "mon" :first :first) - 2pm on the first Monday of the month (retrieve-scheduled-channels 8 "wed" :other :last) - 8am on Wednesday of the last week of the month Based on the given input the appropriate `PulseChannels` are returned: * HOURLY scheduled channels are always included. * DAILY scheduled channels are included if the HOUR matches. * WEEKLY scheduled channels are included if the WEEKDAY & HOUR match. * MONTHLY scheduled channels are included if the MONTHDAY, MONTHWEEK, WEEKDAY, & HOUR all match.
(schedule-frame? frame)
Is FRAME a valid schedule frame?
Is FRAME a valid schedule frame?
(schedule-type? schedule-type)
Predicate function which returns true
if the given argument is a valid value as a schedule-type, false
otherwise.
Predicate function which returns `true` if the given argument is a valid value as a schedule-type, `false` otherwise.
(supports-recipients? channel)
Does given CHANNEL type support a list of recipients? :tv:
Does given CHANNEL type support a list of recipients? :tv:
(update-pulse-channel! {:keys [id channel_type enabled details recipients
schedule_type schedule_day schedule_hour
schedule_frame]
:or {details {} recipients []}})
Updates an existing PulseChannel
along with all related data associated with the channel such as PulseChannelRecipients
.
Updates an existing `PulseChannel` along with all related data associated with the channel such as `PulseChannelRecipients`.
(update-recipients! id user-ids)
Update the PulseChannelRecipients
for PULSE-CHANNEL.
USER-IDS should be a definitive collection of all IDs of users who should receive the pulse.
PulseChannelRecipients
object, one will be created.PulseChannelRecipients
has no corresponding ID in USER-IDs, it will be deleted.Update the `PulseChannelRecipients` for PULSE-CHANNEL. USER-IDS should be a definitive collection of *all* IDs of users who should receive the pulse. * If an ID in USER-IDS has no corresponding existing `PulseChannelRecipients` object, one will be created. * If an existing `PulseChannelRecipients` has no corresponding ID in USER-IDs, it will be deleted.
(valid-schedule? schedule-type schedule-hour schedule-day schedule-frame)
Predicate function which returns true
if the combination of scheduling choices is valid, false
otherwise.
Predicate function which returns `true` if the combination of scheduling choices is valid, `false` otherwise.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close