func (c *Client) RemoveRoomRoleForUser(ctx context.Context, userID string, roomID string) error {
	return c.authorizerService.RemoveRoomRoleForUser(ctx, userID, roomID)
}
RemoveRoomRoleForUser removes a previously assigned room scoped role from a user.
Users can have multiple room roles associated with them, but only one role per room.
package chatkit
import (
	"context"
	"net/http"
	"github.com/pusher/chatkit-server-go/internal/authenticator"
	"github.com/pusher/chatkit-server-go/internal/authorizer"
	"github.com/pusher/chatkit-server-go/internal/core"
	"github.com/pusher/chatkit-server-go/internal/cursors"
	"github.com/pusher/pusher-platform-go/auth"
	platformclient "github.com/pusher/pusher-platform-go/client"
	"github.com/pusher/pusher-platform-go/instance"
)
type Client struct {
	coreServiceV2        core.Service
	coreServiceV6        core.Service
	authorizerService    authorizer.Service
	cursorsService       cursors.Service
	authenticatorService authenticator.Service
}
func NewClient(instanceLocator string, key string) (*Client, error) {
	locatorComponents, err := instance.ParseInstanceLocator(instanceLocator)
	if err != nil {
		return nil, err
	}
	keyComponents, err := instance.ParseKey(key)
	if err != nil {
		return nil, err
	}
	baseClient := platformclient.New(platformclient.Options{
		Host: locatorComponents.Host(),
	})
	coreInstanceV2, err := instance.New(instance.Options{
		Locator:        instanceLocator,
		Key:            key,
		ServiceName:    "chatkit",
		ServiceVersion: "v2",
		Client:         baseClient,
	})
	if err != nil {
		return nil, err
	}
	coreInstanceV6, err := instance.New(instance.Options{
		Locator:        instanceLocator,
		Key:            key,
		ServiceName:    "chatkit",
		ServiceVersion: "v6",
		Client:         baseClient,
	})
	if err != nil {
		return nil, err
	}
	authorizerInstance, err := instance.New(instance.Options{
		Locator:        instanceLocator,
		Key:            key,
		ServiceName:    "chatkit_authorizer",
		ServiceVersion: "v2",
		Client:         baseClient,
	})
	if err != nil {
		return nil, err
	}
	cursorsInstance, err := instance.New(instance.Options{
		Locator:        instanceLocator,
		Key:            key,
		ServiceName:    "chatkit_cursors",
		ServiceVersion: "v2",
		Client:         baseClient,
	})
	if err != nil {
		return nil, err
	}
	return &Client{
		coreServiceV2:     core.NewService(coreInstanceV2),
		coreServiceV6:     core.NewService(coreInstanceV6),
		authorizerService: authorizer.NewService(authorizerInstance),
		cursorsService:    cursors.NewService(cursorsInstance),
		authenticatorService: authenticator.NewService(
			locatorComponents.InstanceID,
			keyComponents.Key,
			keyComponents.Secret,
		),
	}, nil
}
func (c *Client) GetUserReadCursors(ctx context.Context, userID string) ([]Cursor, error) {
	return c.cursorsService.GetUserReadCursors(ctx, userID)
}
func (c *Client) SetReadCursor(ctx context.Context, userID string, roomID string, position uint) error {
	return c.cursorsService.SetReadCursor(ctx, userID, roomID, position)
}
func (c *Client) GetReadCursorsForRoom(ctx context.Context, roomID string) ([]Cursor, error) {
	return c.cursorsService.GetReadCursorsForRoom(ctx, roomID)
}
func (c *Client) GetReadCursor(ctx context.Context, userID string, roomID string) (Cursor, error) {
	return c.cursorsService.GetReadCursor(ctx, userID, roomID)
}
func (c *Client) CursorsRequest(
	ctx context.Context,
	options platformclient.RequestOptions,
) (*http.Response, error) {
	return c.cursorsService.Request(ctx, options)
}
func (c *Client) GetRoles(ctx context.Context) ([]Role, error) {
	return c.authorizerService.GetRoles(ctx)
}
func (c *Client) CreateGlobalRole(ctx context.Context, options CreateRoleOptions) error {
	return c.authorizerService.CreateGlobalRole(ctx, options)
}
func (c *Client) CreateRoomRole(ctx context.Context, options CreateRoleOptions) error {
	return c.authorizerService.CreateRoomRole(ctx, options)
}
func (c *Client) DeleteGlobalRole(ctx context.Context, roleName string) error {
	return c.authorizerService.DeleteGlobalRole(ctx, roleName)
}
func (c *Client) DeleteRoomRole(ctx context.Context, roleName string) error {
	return c.authorizerService.DeleteRoomRole(ctx, roleName)
}
func (c *Client) GetPermissionsForGlobalRole(
	ctx context.Context,
	roleName string,
) ([]string, error) {
	return c.authorizerService.GetPermissionsForGlobalRole(ctx, roleName)
}
func (c *Client) GetPermissionsForRoomRole(
	ctx context.Context,
	roleName string,
) ([]string, error) {
	return c.authorizerService.GetPermissionsForRoomRole(ctx, roleName)
}
func (c *Client) UpdatePermissionsForGlobalRole(
	ctx context.Context,
	roleName string,
	options UpdateRolePermissionsOptions,
) error {
	return c.authorizerService.UpdatePermissionsForGlobalRole(ctx, roleName, options)
}
func (c *Client) UpdatePermissionsForRoomRole(
	ctx context.Context,
	roleName string,
	options UpdateRolePermissionsOptions,
) error {
	return c.authorizerService.UpdatePermissionsForRoomRole(ctx, roleName, options)
}
func (c *Client) GetUserRoles(ctx context.Context, userID string) ([]Role, error) {
	return c.authorizerService.GetUserRoles(ctx, userID)
}
func (c *Client) AssignGlobalRoleToUser(ctx context.Context, userID string, roleName string) error {
	return c.authorizerService.AssignGlobalRoleToUser(ctx, userID, roleName)
}
func (c *Client) AssignRoomRoleToUser(
	ctx context.Context,
	userID string,
	roomID string,
	roleName string,
) error {
	return c.authorizerService.AssignRoomRoleToUser(ctx, userID, roomID, roleName)
}
func (c *Client) RemoveGlobalRoleForUser(ctx context.Context, userID string) error {
	return c.authorizerService.RemoveGlobalRoleForUser(ctx, userID)
}