All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pubnub.api.models.consumer.access_manager.v3.ChannelGrant.kt Maven / Gradle / Ivy

Go to download

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!

There is a newer version: 10.2.0
Show newest version
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,
            )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy