com.pubnub.api.models.consumer.access_manager.v3.ChannelGrant.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pubnub-kotlin-api Show documentation
Show all versions of pubnub-kotlin-api Show documentation
PubNub is a cross-platform client-to-client (1:1 and 1:many) push service in the cloud, capable of broadcasting real-time messages to millions of web and mobile clients simultaneously, in less than a quarter second!
package com.pubnub.api.models.consumer.access_manager.v3
interface ChannelGrant : PNGrant {
companion object {
fun name(
name: String,
read: Boolean = false,
write: Boolean = false,
manage: Boolean = false,
delete: Boolean = false,
create: Boolean = false,
get: Boolean = false,
join: Boolean = false,
update: Boolean = false,
): ChannelGrant =
PNChannelResourceGrant(
id = name,
read = read,
write = write,
manage = manage,
delete = delete,
create = create,
get = get,
join = join,
update = update,
)
fun pattern(
pattern: String,
read: Boolean = false,
write: Boolean = false,
manage: Boolean = false,
delete: Boolean = false,
create: Boolean = false,
get: Boolean = false,
join: Boolean = false,
update: Boolean = false,
): ChannelGrant =
PNChannelPatternGrant(
id = pattern,
read = read,
write = write,
manage = manage,
delete = delete,
create = create,
get = get,
join = join,
update = update,
)
}
}