Skip to content

Commit

Permalink
Removals from PubNubConfiguration and RouterConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
jguz-pubnub committed Feb 17, 2025
1 parent 291aad1 commit 884fe01
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 52 deletions.
24 changes: 1 addition & 23 deletions Sources/PubNub/Networking/HTTPRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import Foundation

/// Base configuration for PubNub Endpoints
public protocol RouterConfiguration: CustomStringConvertible {
public protocol RouterConfiguration {
/// Specifies the PubNub Publish Key to be used when publishing messages to a channel
var publishKey: String? { get }
/// Specifies the PubNub Subscribe Key to be used when subscribing to a channel
Expand All @@ -38,28 +38,6 @@ public protocol RouterConfiguration: CustomStringConvertible {
var maintainPresenceState: Bool { get }
}

extension RouterConfiguration {
var description: String {
String.formattedDescription(
self,
arguments: [
("publishKey", publishKey?.getLastCharacters(6) ?? "`Empty or invalid length`"),
("subscribeKey", subscribeKey.getLastCharacters(6) ?? "`Invalid length`"),
("uuid", uuid),
("useSecureConnections", useSecureConnections),
("origin", origin),
("authKey", authKey?.getLastCharacters(6) ?? "`Empty or invalid length`"),
("authToken", authToken?.getLastCharacters(6) ?? "`Empty or invalid length`"),
("cryptoModule", cryptoModule ?? "nil"),
("useRequestId", useRequestId),
("consumerIdentifiers", consumerIdentifiers ?? "nil"),
("enableEventEngine", enableEventEngine),
("maintainPresenceState", maintainPresenceState)
]
)
}
}

public extension RouterConfiguration {
/// The scheme used when creating the URL for the request
var urlScheme: String {
Expand Down
29 changes: 0 additions & 29 deletions Sources/PubNub/PubNubConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -247,32 +247,3 @@ public struct PubNubConfiguration: Hashable {
/// Ordered list of key-value pairs which identify various consumers.
public var consumerIdentifiers: [String: String] = [:]
}

extension PubNubConfiguration: CustomStringConvertible {
public var description: String {
String.formattedDescription(
self,
arguments: [
("publishKey", publishKey?.getLastCharacters(6) ?? "`Empty or invalid length`"),
("subscribeKey", subscribeKey.getLastCharacters(6) ?? "`Invalid length`"),
("cryptoModule", cryptoModule ?? "nil"),
("authKey", authKey?.getLastCharacters(6) ?? "`Empty or invalid length`"),
("authToken", authToken?.getLastCharacters(6) ?? "`Empty or invalid length`"),
("userId", userId),
("useSecureConnections", useSecureConnections),
("origin", origin),
("useInstanceId", useInstanceId),
("useRequestId", useRequestId),
("enableEventEngine", enableEventEngine),
("automaticRetry", automaticRetry ?? "nil"),
("urlSessionConfiguration", urlSessionConfiguration),
("durationUntilTimeout", durationUntilTimeout),
("heartbeatInterval", heartbeatInterval),
("supressLeaveEvents", supressLeaveEvents),
("requestMessageCountThreshold", requestMessageCountThreshold),
("filterExpression", filterExpression ?? "nil"),
("consumerIdentifiers", consumerIdentifiers)
]
)
}
}

0 comments on commit 884fe01

Please sign in to comment.